@veloceapps/sdk 0.0.0-watch

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (351) hide show
  1. package/README.md +7 -0
  2. package/cms/cms.actions.d.ts +12 -0
  3. package/cms/cms.default.d.ts +5 -0
  4. package/cms/cms.elements.d.ts +4 -0
  5. package/cms/components/element-children/element-children.component.d.ts +10 -0
  6. package/cms/components/element-children/element-children.module.d.ts +8 -0
  7. package/cms/components/element-renderer/element-renderer.component.d.ts +35 -0
  8. package/cms/components/element-renderer/element-renderer.module.d.ts +7 -0
  9. package/cms/components/element.component.d.ts +13 -0
  10. package/cms/components/index.d.ts +1 -0
  11. package/cms/components/plugin.component.d.ts +15 -0
  12. package/cms/components/preview/index.d.ts +2 -0
  13. package/cms/components/preview/preview.component.d.ts +34 -0
  14. package/cms/components/preview/preview.module.d.ts +11 -0
  15. package/cms/decorators/element.decorator.d.ts +2 -0
  16. package/cms/decorators/index.d.ts +1 -0
  17. package/cms/directives/custom-template.directive.d.ts +12 -0
  18. package/cms/engine/models/entity.d.ts +11 -0
  19. package/cms/engine/models/plugin.d.ts +5 -0
  20. package/cms/index.d.ts +11 -0
  21. package/cms/injection-tokens.d.ts +11 -0
  22. package/cms/launcher.module.d.ts +10 -0
  23. package/cms/modules/federated/default-options.d.ts +4 -0
  24. package/cms/modules/federated/export.d.ts +1 -0
  25. package/cms/modules/federated/federated.component.d.ts +26 -0
  26. package/cms/modules/federated/federated.module.d.ts +9 -0
  27. package/cms/modules/federated/federated.types.d.ts +30 -0
  28. package/cms/modules/federated/federated.utils.d.ts +1 -0
  29. package/cms/package.json +10 -0
  30. package/cms/plugins/configuration.plugin.d.ts +23 -0
  31. package/cms/plugins/io.plugin.d.ts +9 -0
  32. package/cms/plugins/script.plugin.d.ts +13 -0
  33. package/cms/services/dynamic-module.service.d.ts +15 -0
  34. package/cms/services/element-context.service.d.ts +8 -0
  35. package/cms/services/index.d.ts +3 -0
  36. package/cms/services/integration.state.d.ts +17 -0
  37. package/cms/services/io-provider.service.d.ts +15 -0
  38. package/cms/services/launcher.service.d.ts +18 -0
  39. package/cms/services/templates.service.d.ts +9 -0
  40. package/cms/types/common.types.d.ts +103 -0
  41. package/cms/types/configuration.types.d.ts +17 -0
  42. package/cms/types/elements.types.d.ts +2 -0
  43. package/cms/types/index.d.ts +5 -0
  44. package/cms/types/integration.types.d.ts +4 -0
  45. package/cms/types/path.types.d.ts +11 -0
  46. package/cms/utils/element.utils.d.ts +15 -0
  47. package/cms/utils/elements-resolver.d.ts +20 -0
  48. package/cms/utils/index.d.ts +3 -0
  49. package/cms/utils/path.utils.d.ts +5 -0
  50. package/cms/veloce-sdk-cms.d.ts +5 -0
  51. package/cms/vendor-map.d.ts +689 -0
  52. package/core/core.module.d.ts +8 -0
  53. package/core/index.d.ts +6 -0
  54. package/core/modules/configuration/configuration.module.d.ts +7 -0
  55. package/core/modules/configuration/helpers.d.ts +3 -0
  56. package/core/modules/configuration/index.d.ts +4 -0
  57. package/core/modules/configuration/services/configuration-runtime.service.d.ts +28 -0
  58. package/core/modules/configuration/services/configuration.service.d.ts +40 -0
  59. package/core/modules/configuration/services/runtime-context.service.d.ts +14 -0
  60. package/core/modules/configuration/types/configuration-runtime.types.d.ts +6 -0
  61. package/core/modules/flow-configuration/flow-configuration.module.d.ts +6 -0
  62. package/core/modules/flow-configuration/index.d.ts +4 -0
  63. package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +37 -0
  64. package/core/modules/flow-configuration/services/flow-update.service.d.ts +12 -0
  65. package/core/modules/flow-configuration/types/update.types.d.ts +12 -0
  66. package/core/modules/index.d.ts +2 -0
  67. package/core/package.json +10 -0
  68. package/core/services/context.service.d.ts +17 -0
  69. package/core/services/index.d.ts +3 -0
  70. package/core/services/product-images.service.d.ts +12 -0
  71. package/core/services/quote-draft.service.d.ts +31 -0
  72. package/core/types/index.d.ts +3 -0
  73. package/core/types/quote-states.types.d.ts +6 -0
  74. package/core/types/runtime.types.d.ts +31 -0
  75. package/core/types/ui-definition.types.d.ts +26 -0
  76. package/core/utils/index.d.ts +2 -0
  77. package/core/utils/line-item.utils.d.ts +26 -0
  78. package/core/utils/line-item.worker.d.ts +12 -0
  79. package/core/veloce-sdk-core.d.ts +5 -0
  80. package/esm2015/cms/cms.actions.js +17 -0
  81. package/esm2015/cms/cms.default.js +6 -0
  82. package/esm2015/cms/cms.elements.js +29 -0
  83. package/esm2015/cms/components/element-children/element-children.component.js +23 -0
  84. package/esm2015/cms/components/element-children/element-children.module.js +18 -0
  85. package/esm2015/cms/components/element-renderer/element-renderer.component.js +143 -0
  86. package/esm2015/cms/components/element-renderer/element-renderer.module.js +16 -0
  87. package/esm2015/cms/components/element.component.js +31 -0
  88. package/esm2015/cms/components/index.js +2 -0
  89. package/esm2015/cms/components/plugin.component.js +16 -0
  90. package/esm2015/cms/components/preview/index.js +3 -0
  91. package/esm2015/cms/components/preview/preview.component.js +105 -0
  92. package/esm2015/cms/components/preview/preview.module.js +23 -0
  93. package/esm2015/cms/decorators/element.decorator.js +6 -0
  94. package/esm2015/cms/decorators/index.js +2 -0
  95. package/esm2015/cms/directives/custom-template.directive.js +25 -0
  96. package/esm2015/cms/engine/models/entity.js +18 -0
  97. package/esm2015/cms/engine/models/plugin.js +6 -0
  98. package/esm2015/cms/index.js +11 -0
  99. package/esm2015/cms/injection-tokens.js +8 -0
  100. package/esm2015/cms/launcher.module.js +23 -0
  101. package/esm2015/cms/modules/federated/default-options.js +5 -0
  102. package/esm2015/cms/modules/federated/export.js +2 -0
  103. package/esm2015/cms/modules/federated/federated.component.js +82 -0
  104. package/esm2015/cms/modules/federated/federated.module.js +19 -0
  105. package/esm2015/cms/modules/federated/federated.types.js +2 -0
  106. package/esm2015/cms/modules/federated/federated.utils.js +37 -0
  107. package/esm2015/cms/plugins/configuration.plugin.js +94 -0
  108. package/esm2015/cms/plugins/io.plugin.js +37 -0
  109. package/esm2015/cms/plugins/script.plugin.js +66 -0
  110. package/esm2015/cms/services/dynamic-module.service.js +33 -0
  111. package/esm2015/cms/services/element-context.service.js +10 -0
  112. package/esm2015/cms/services/index.js +4 -0
  113. package/esm2015/cms/services/integration.state.js +40 -0
  114. package/esm2015/cms/services/io-provider.service.js +51 -0
  115. package/esm2015/cms/services/launcher.service.js +57 -0
  116. package/esm2015/cms/services/templates.service.js +19 -0
  117. package/esm2015/cms/types/common.types.js +2 -0
  118. package/esm2015/cms/types/configuration.types.js +2 -0
  119. package/esm2015/cms/types/elements.types.js +2 -0
  120. package/esm2015/cms/types/index.js +6 -0
  121. package/esm2015/cms/types/integration.types.js +2 -0
  122. package/esm2015/cms/types/path.types.js +2 -0
  123. package/esm2015/cms/utils/element.utils.js +149 -0
  124. package/esm2015/cms/utils/elements-resolver.js +108 -0
  125. package/esm2015/cms/utils/index.js +4 -0
  126. package/esm2015/cms/utils/path.utils.js +67 -0
  127. package/esm2015/cms/veloce-sdk-cms.js +5 -0
  128. package/esm2015/cms/vendor-map.js +35 -0
  129. package/esm2015/core/core.module.js +18 -0
  130. package/esm2015/core/index.js +7 -0
  131. package/esm2015/core/modules/configuration/configuration.module.js +34 -0
  132. package/esm2015/core/modules/configuration/helpers.js +10 -0
  133. package/esm2015/core/modules/configuration/index.js +5 -0
  134. package/esm2015/core/modules/configuration/services/configuration-runtime.service.js +90 -0
  135. package/esm2015/core/modules/configuration/services/configuration.service.js +153 -0
  136. package/esm2015/core/modules/configuration/services/runtime-context.service.js +61 -0
  137. package/esm2015/core/modules/configuration/types/configuration-runtime.types.js +2 -0
  138. package/esm2015/core/modules/flow-configuration/flow-configuration.module.js +18 -0
  139. package/esm2015/core/modules/flow-configuration/index.js +5 -0
  140. package/esm2015/core/modules/flow-configuration/services/flow-configuration.service.js +90 -0
  141. package/esm2015/core/modules/flow-configuration/services/flow-update.service.js +114 -0
  142. package/esm2015/core/modules/flow-configuration/types/update.types.js +2 -0
  143. package/esm2015/core/modules/index.js +3 -0
  144. package/esm2015/core/services/context.service.js +44 -0
  145. package/esm2015/core/services/index.js +4 -0
  146. package/esm2015/core/services/product-images.service.js +30 -0
  147. package/esm2015/core/services/quote-draft.service.js +88 -0
  148. package/esm2015/core/types/index.js +4 -0
  149. package/esm2015/core/types/quote-states.types.js +2 -0
  150. package/esm2015/core/types/runtime.types.js +16 -0
  151. package/esm2015/core/types/ui-definition.types.js +2 -0
  152. package/esm2015/core/utils/index.js +3 -0
  153. package/esm2015/core/utils/line-item.utils.js +98 -0
  154. package/esm2015/core/utils/line-item.worker.js +19 -0
  155. package/esm2015/core/veloce-sdk-core.js +5 -0
  156. package/esm2015/index.js +2 -0
  157. package/esm2015/runtime/components/component-preview/component-preview.component.js +125 -0
  158. package/esm2015/runtime/components/index.js +5 -0
  159. package/esm2015/runtime/components/section-renderer/section-renderer.component.js +71 -0
  160. package/esm2015/runtime/components/ui-runtime/runtime.component.js +427 -0
  161. package/esm2015/runtime/components/ui-runtime-preview/runtime-preview.component.js +109 -0
  162. package/esm2015/runtime/execution/components/children-placeholder/children-placeholder.component.js +68 -0
  163. package/esm2015/runtime/execution/components/context-provider/context-provider.component.js +36 -0
  164. package/esm2015/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.js +72 -0
  165. package/esm2015/runtime/execution/components/federated/federated.component.js +81 -0
  166. package/esm2015/runtime/execution/components/velo-attribute/velo-attribute.component.js +65 -0
  167. package/esm2015/runtime/execution/components/velo-multiselect/velo-multiselect.component.js +136 -0
  168. package/esm2015/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.js +80 -0
  169. package/esm2015/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.js +101 -0
  170. package/esm2015/runtime/execution/components/velo-port-radio/velo-port-radio.component.js +150 -0
  171. package/esm2015/runtime/execution/components/velo-type/velo-type.component.js +121 -0
  172. package/esm2015/runtime/execution/directives/section-script.directive.js +242 -0
  173. package/esm2015/runtime/execution/directives/sf-query.directive.js +34 -0
  174. package/esm2015/runtime/execution/directives/velo-attribute.directive.js +86 -0
  175. package/esm2015/runtime/execution/directives/velo-port.directive.js +373 -0
  176. package/esm2015/runtime/execution/directives/vl-approval.directive.js +22 -0
  177. package/esm2015/runtime/execution/directives/vl-document-attachments.directive.js +35 -0
  178. package/esm2015/runtime/execution/directives/vl-document-templates.directive.js +59 -0
  179. package/esm2015/runtime/execution/directives/vl-quote.directive.js +41 -0
  180. package/esm2015/runtime/execution/directives/vl-ramp.directive.js +51 -0
  181. package/esm2015/runtime/execution/runtime-execution.module.js +163 -0
  182. package/esm2015/runtime/execution/utils/federated.util.js +37 -0
  183. package/esm2015/runtime/index.js +5 -0
  184. package/esm2015/runtime/runtime.module.js +104 -0
  185. package/esm2015/runtime/services/cart.service.js +28 -0
  186. package/esm2015/runtime/services/collapsible-state.service.js +34 -0
  187. package/esm2015/runtime/services/configuration.service.js +102 -0
  188. package/esm2015/runtime/services/current-state.service.js +17 -0
  189. package/esm2015/runtime/services/form-scope.service.js +30 -0
  190. package/esm2015/runtime/services/index.js +4 -0
  191. package/esm2015/runtime/services/product-model-cache.service.js +30 -0
  192. package/esm2015/runtime/services/runtime-context.service.js +56 -0
  193. package/esm2015/runtime/services/runtime-form.service.js +224 -0
  194. package/esm2015/runtime/services/runtime.service.js +108 -0
  195. package/esm2015/runtime/services/section-helper.service.js +27 -0
  196. package/esm2015/runtime/services/section-scope.service.js +36 -0
  197. package/esm2015/runtime/services/section-store.service.js +22 -0
  198. package/esm2015/runtime/services/section.service.js +124 -0
  199. package/esm2015/runtime/types/bound-data.types.js +7 -0
  200. package/esm2015/runtime/types/index.js +2 -0
  201. package/esm2015/runtime/types/runtime.types.js +2 -0
  202. package/esm2015/runtime/types/script-registry.types.js +51 -0
  203. package/esm2015/runtime/utils/line-item.util.js +273 -0
  204. package/esm2015/runtime/utils/section.utils.js +26 -0
  205. package/esm2015/runtime/utils/sections-binder.helper.js +105 -0
  206. package/esm2015/runtime/veloce-sdk-runtime.js +5 -0
  207. package/esm2015/src/components/dialog/dialog.component.js +30 -0
  208. package/esm2015/src/components/dialog/dialog.module.js +19 -0
  209. package/esm2015/src/components/dialog/dialog.types.js +2 -0
  210. package/esm2015/src/components/header/cart-overlay/cart-preview.component.js +116 -0
  211. package/esm2015/src/components/header/cart-overlay/cart-preview.module.js +23 -0
  212. package/esm2015/src/components/header/header.component.js +196 -0
  213. package/esm2015/src/components/header/header.module.js +23 -0
  214. package/esm2015/src/components/header/header.types.js +2 -0
  215. package/esm2015/src/constants.js +2 -0
  216. package/esm2015/src/flow-routing.module.js +97 -0
  217. package/esm2015/src/flow.component.js +35 -0
  218. package/esm2015/src/flow.module.js +52 -0
  219. package/esm2015/src/guards/context.guard.js +75 -0
  220. package/esm2015/src/guards/index.js +2 -0
  221. package/esm2015/src/guards/product-unload.guard.js +43 -0
  222. package/esm2015/src/guards/root.guard.js +41 -0
  223. package/esm2015/src/index.js +7 -0
  224. package/esm2015/src/pages/catalog/catalog.component.js +117 -0
  225. package/esm2015/src/pages/catalog/catalog.module.js +20 -0
  226. package/esm2015/src/pages/debug/debug.component.js +65 -0
  227. package/esm2015/src/pages/debug/debug.module.js +48 -0
  228. package/esm2015/src/pages/legacy-product/legacy-product.component.js +132 -0
  229. package/esm2015/src/pages/legacy-product/legacy-product.module.js +21 -0
  230. package/esm2015/src/pages/product/product.component.js +95 -0
  231. package/esm2015/src/pages/product/product.module.js +20 -0
  232. package/esm2015/src/pages/record-not-found/record-not-found.component.js +29 -0
  233. package/esm2015/src/pages/record-not-found/record-not-found.module.js +20 -0
  234. package/esm2015/src/pages/shopping-cart/shopping-cart.component.js +117 -0
  235. package/esm2015/src/pages/shopping-cart/shopping-cart.module.js +20 -0
  236. package/esm2015/src/resolvers/flow.resolver.js +58 -0
  237. package/esm2015/src/resolvers/quote.resolver.js +45 -0
  238. package/esm2015/src/services/flow-dialog.service.js +80 -0
  239. package/esm2015/src/services/flow-router.service.js +124 -0
  240. package/esm2015/src/services/flow.service.js +67 -0
  241. package/esm2015/src/services/index.js +2 -0
  242. package/esm2015/src/types/context-route.types.js +2 -0
  243. package/esm2015/src/types/flow-customization.types.js +3 -0
  244. package/esm2015/src/types/index.js +3 -0
  245. package/esm2015/src/types/route.types.js +2 -0
  246. package/esm2015/src/utils/flow.utils.js +12 -0
  247. package/esm2015/src/utils/index.js +2 -0
  248. package/esm2015/veloce-sdk.js +5 -0
  249. package/fesm2015/veloce-sdk-cms.js +1301 -0
  250. package/fesm2015/veloce-sdk-cms.js.map +1 -0
  251. package/fesm2015/veloce-sdk-core.js +837 -0
  252. package/fesm2015/veloce-sdk-core.js.map +1 -0
  253. package/fesm2015/veloce-sdk-runtime.js +3895 -0
  254. package/fesm2015/veloce-sdk-runtime.js.map +1 -0
  255. package/fesm2015/veloce-sdk.js +1635 -0
  256. package/fesm2015/veloce-sdk.js.map +1 -0
  257. package/index.d.ts +1 -0
  258. package/package.json +49 -0
  259. package/runtime/components/component-preview/component-preview.component.d.ts +27 -0
  260. package/runtime/components/index.d.ts +4 -0
  261. package/runtime/components/section-renderer/section-renderer.component.d.ts +25 -0
  262. package/runtime/components/ui-runtime/runtime.component.d.ts +53 -0
  263. package/runtime/components/ui-runtime-preview/runtime-preview.component.d.ts +27 -0
  264. package/runtime/execution/components/children-placeholder/children-placeholder.component.d.ts +30 -0
  265. package/runtime/execution/components/context-provider/context-provider.component.d.ts +14 -0
  266. package/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.d.ts +25 -0
  267. package/runtime/execution/components/federated/federated.component.d.ts +36 -0
  268. package/runtime/execution/components/velo-attribute/velo-attribute.component.d.ts +19 -0
  269. package/runtime/execution/components/velo-multiselect/velo-multiselect.component.d.ts +35 -0
  270. package/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.d.ts +22 -0
  271. package/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.d.ts +22 -0
  272. package/runtime/execution/components/velo-port-radio/velo-port-radio.component.d.ts +28 -0
  273. package/runtime/execution/components/velo-type/velo-type.component.d.ts +31 -0
  274. package/runtime/execution/directives/section-script.directive.d.ts +59 -0
  275. package/runtime/execution/directives/sf-query.directive.d.ts +15 -0
  276. package/runtime/execution/directives/velo-attribute.directive.d.ts +26 -0
  277. package/runtime/execution/directives/velo-port.directive.d.ts +74 -0
  278. package/runtime/execution/directives/vl-approval.directive.d.ts +10 -0
  279. package/runtime/execution/directives/vl-document-attachments.directive.d.ts +15 -0
  280. package/runtime/execution/directives/vl-document-templates.directive.d.ts +33 -0
  281. package/runtime/execution/directives/vl-quote.directive.d.ts +14 -0
  282. package/runtime/execution/directives/vl-ramp.directive.d.ts +15 -0
  283. package/runtime/execution/runtime-execution.module.d.ts +27 -0
  284. package/runtime/execution/utils/federated.util.d.ts +6 -0
  285. package/runtime/index.d.ts +4 -0
  286. package/runtime/package.json +10 -0
  287. package/runtime/runtime.module.d.ts +18 -0
  288. package/runtime/services/cart.service.d.ts +15 -0
  289. package/runtime/services/collapsible-state.service.d.ts +15 -0
  290. package/runtime/services/configuration.service.d.ts +19 -0
  291. package/runtime/services/current-state.service.d.ts +8 -0
  292. package/runtime/services/form-scope.service.d.ts +20 -0
  293. package/runtime/services/index.d.ts +3 -0
  294. package/runtime/services/product-model-cache.service.d.ts +14 -0
  295. package/runtime/services/runtime-context.service.d.ts +16 -0
  296. package/runtime/services/runtime-form.service.d.ts +24 -0
  297. package/runtime/services/runtime.service.d.ts +43 -0
  298. package/runtime/services/section-helper.service.d.ts +8 -0
  299. package/runtime/services/section-scope.service.d.ts +14 -0
  300. package/runtime/services/section-store.service.d.ts +11 -0
  301. package/runtime/services/section.service.d.ts +30 -0
  302. package/runtime/types/bound-data.types.d.ts +13 -0
  303. package/runtime/types/index.d.ts +1 -0
  304. package/runtime/types/runtime.types.d.ts +19 -0
  305. package/runtime/types/script-registry.types.d.ts +13 -0
  306. package/runtime/utils/line-item.util.d.ts +34 -0
  307. package/runtime/utils/section.utils.d.ts +2 -0
  308. package/runtime/utils/sections-binder.helper.d.ts +16 -0
  309. package/runtime/veloce-sdk-runtime.d.ts +5 -0
  310. package/src/components/dialog/dialog.component.d.ts +13 -0
  311. package/src/components/dialog/dialog.module.d.ts +9 -0
  312. package/src/components/dialog/dialog.types.d.ts +6 -0
  313. package/src/components/header/cart-overlay/cart-preview.component.d.ts +31 -0
  314. package/src/components/header/cart-overlay/cart-preview.module.d.ts +13 -0
  315. package/src/components/header/header.component.d.ts +48 -0
  316. package/src/components/header/header.module.d.ts +13 -0
  317. package/src/components/header/header.types.d.ts +19 -0
  318. package/src/constants.d.ts +1 -0
  319. package/src/flow-routing.module.d.ts +11 -0
  320. package/src/flow.component.d.ts +17 -0
  321. package/src/flow.module.d.ts +15 -0
  322. package/src/guards/context.guard.d.ts +18 -0
  323. package/src/guards/index.d.ts +1 -0
  324. package/src/guards/product-unload.guard.d.ts +16 -0
  325. package/src/guards/root.guard.d.ts +15 -0
  326. package/src/index.d.ts +6 -0
  327. package/src/pages/catalog/catalog.component.d.ts +32 -0
  328. package/src/pages/catalog/catalog.module.d.ts +10 -0
  329. package/src/pages/debug/debug.component.d.ts +27 -0
  330. package/src/pages/debug/debug.module.d.ts +14 -0
  331. package/src/pages/legacy-product/legacy-product.component.d.ts +37 -0
  332. package/src/pages/legacy-product/legacy-product.module.d.ts +10 -0
  333. package/src/pages/product/product.component.d.ts +30 -0
  334. package/src/pages/product/product.module.d.ts +10 -0
  335. package/src/pages/record-not-found/record-not-found.component.d.ts +11 -0
  336. package/src/pages/record-not-found/record-not-found.module.d.ts +9 -0
  337. package/src/pages/shopping-cart/shopping-cart.component.d.ts +32 -0
  338. package/src/pages/shopping-cart/shopping-cart.module.d.ts +10 -0
  339. package/src/resolvers/flow.resolver.d.ts +14 -0
  340. package/src/resolvers/quote.resolver.d.ts +18 -0
  341. package/src/services/flow-dialog.service.d.ts +20 -0
  342. package/src/services/flow-router.service.d.ts +35 -0
  343. package/src/services/flow.service.d.ts +17 -0
  344. package/src/services/index.d.ts +1 -0
  345. package/src/types/context-route.types.d.ts +5 -0
  346. package/src/types/flow-customization.types.d.ts +11 -0
  347. package/src/types/index.d.ts +2 -0
  348. package/src/types/route.types.d.ts +9 -0
  349. package/src/utils/flow.utils.d.ts +1 -0
  350. package/src/utils/index.d.ts +1 -0
  351. package/veloce-sdk.d.ts +5 -0
@@ -0,0 +1,1301 @@
1
+ import { __decorate, __param, __awaiter, __rest } from 'tslib';
2
+ import * as i0 from '@angular/core';
3
+ import { InjectionToken, Component, ChangeDetectionStrategy, Inject, Injector, Injectable, Directive, ViewContainerRef, SkipSelf, ViewChild, Input, NgModule, ViewEncapsulation } from '@angular/core';
4
+ import * as rxjs from 'rxjs';
5
+ import { BehaviorSubject, Subject, takeUntil, map, filter, from, tap, of, switchMap, forkJoin, catchError } from 'rxjs';
6
+ import * as lodash from 'lodash';
7
+ import { compact, isArray, pull, flatten, set } from 'lodash';
8
+ import * as i7 from '@angular/common';
9
+ import { DOCUMENT, CommonModule } from '@angular/common';
10
+ import { UUID, CoreModule } from '@veloce/core';
11
+ import { DragDropModule } from '@angular/cdk/drag-drop';
12
+ import * as angularForms from '@angular/forms';
13
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
14
+ import * as i2 from '@veloce/sdk/core';
15
+ import { ConfigurationService, LineItemWorker, generateLineItem, getAttributeValue, QuoteDraftService, FlowConfigurationService, ProductImagesService, lineItemUtils, SdkCoreModule } from '@veloce/sdk/core';
16
+ import * as i1 from '@veloce/components';
17
+ import { LoaderModule } from '@veloce/components';
18
+ import { transform } from '@babel/standalone';
19
+ import { SalesforceApiService, QuoteApiService, DocumentTemplatesApiService, DocumentAttachmentApiService, RampApiService, CatalogApiService, DeltaApiService, ApiModule } from '@veloce/api';
20
+ import * as rxjsOperators from 'rxjs/operators';
21
+ import * as i3 from 'primeng/api';
22
+ import { DialogService } from 'primeng/dynamicdialog';
23
+
24
+ var FlowAction;
25
+ (function (FlowAction) {
26
+ FlowAction["FLOW_CONFIGURE_PRODUCT"] = "FLOW_CONFIGURE_PRODUCT";
27
+ FlowAction["FLOW_NAVIGATE_BACK"] = "FLOW_NAVIGATE_BACK";
28
+ FlowAction["FLOW_APPLY_PRODUCT_CONFIGURATION"] = "FLOW_APPLY_PRODUCT_CONFIGURATION";
29
+ })(FlowAction || (FlowAction = {}));
30
+ const ConfigureProductAction = ({ lineItemId, productId, }) => ({
31
+ type: FlowAction.FLOW_CONFIGURE_PRODUCT,
32
+ payload: { lineItemId, productId },
33
+ });
34
+ const NavigateBackAction = () => ({
35
+ type: FlowAction.FLOW_NAVIGATE_BACK,
36
+ });
37
+ const ApplyProductConfigurationAction = () => ({
38
+ type: FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION,
39
+ });
40
+
41
+ var cmsInjectionTokens = /*#__PURE__*/Object.freeze({
42
+ __proto__: null,
43
+ get FlowAction () { return FlowAction; },
44
+ ConfigureProductAction: ConfigureProductAction,
45
+ NavigateBackAction: NavigateBackAction,
46
+ ApplyProductConfigurationAction: ApplyProductConfigurationAction
47
+ });
48
+
49
+ const DEFAULT_PLUGINS_TOKEN = new InjectionToken('DEFAULT_PLUGINS_TOKEN');
50
+ const UI_DEFINITION_METADATA = new InjectionToken('UI_DEFINITION_METADATA_TOKEN');
51
+ const ELEMENT_METADATA = new InjectionToken('ELEMENT_METADATA_TOKEN');
52
+ const SHARED_ELEMENT_METADATA = new InjectionToken('SHARED_ELEMENT_METADATA_TOKEN');
53
+ const ELEMENT_CONFIG = new InjectionToken('ELEMENT_CONFIG_TOKEN');
54
+ const VENDOR_MAP = new InjectionToken('VENDOR_MAP');
55
+
56
+ var cmsActions = /*#__PURE__*/Object.freeze({
57
+ __proto__: null,
58
+ DEFAULT_PLUGINS_TOKEN: DEFAULT_PLUGINS_TOKEN,
59
+ UI_DEFINITION_METADATA: UI_DEFINITION_METADATA,
60
+ ELEMENT_METADATA: ELEMENT_METADATA,
61
+ SHARED_ELEMENT_METADATA: SHARED_ELEMENT_METADATA,
62
+ ELEMENT_CONFIG: ELEMENT_CONFIG,
63
+ VENDOR_MAP: VENDOR_MAP
64
+ });
65
+
66
+ class Entity {
67
+ constructor(injector) {
68
+ this.injector = injector;
69
+ this.plugins = [];
70
+ this.config = this.injector.get(ELEMENT_CONFIG);
71
+ this.defaultPlugins = this.injector.get(DEFAULT_PLUGINS_TOKEN);
72
+ }
73
+ initPlugins() {
74
+ var _a;
75
+ this.defaultPlugins.forEach(plugin => this.registerPlugin(new plugin(this)));
76
+ (_a = this.config.plugins) === null || _a === void 0 ? void 0 : _a.forEach(plugin => this.registerPlugin(new plugin(this)));
77
+ }
78
+ registerPlugin(plugin) {
79
+ this.plugins.push(plugin);
80
+ }
81
+ }
82
+
83
+ let ElementComponent = class ElementComponent extends Entity {
84
+ constructor(injector) {
85
+ super(injector);
86
+ this.injector = injector;
87
+ this.model$ = new BehaviorSubject(undefined);
88
+ super.initPlugins();
89
+ }
90
+ ngOnInit() {
91
+ this.plugins.forEach(plugin => { var _a; return (_a = plugin.ngOnInit) === null || _a === void 0 ? void 0 : _a.call(plugin); });
92
+ }
93
+ ngAfterViewInit() {
94
+ this.plugins.forEach(plugin => { var _a; return (_a = plugin.ngAfterViewInit) === null || _a === void 0 ? void 0 : _a.call(plugin); });
95
+ }
96
+ ngOnDestroy() {
97
+ this.plugins.forEach(plugin => { var _a; return (_a = plugin.ngOnDestroy) === null || _a === void 0 ? void 0 : _a.call(plugin); });
98
+ }
99
+ };
100
+ ElementComponent = __decorate([
101
+ Component({
102
+ template: '',
103
+ changeDetection: ChangeDetectionStrategy.OnPush,
104
+ jit: true,
105
+ }),
106
+ __param(0, Inject(Injector))
107
+ ], ElementComponent);
108
+
109
+ const parseBoundPath = (path) => {
110
+ var _a, _b;
111
+ const regexp = new RegExp(`(?:\\/)(?:\\w+)(?:\\/)(?:ports|attributes)(?:\\/)(?:\\w+)|(?:\\/)(?:\\w+)`, 'g');
112
+ const blocks = (_b = (_a = path.match(regexp)) === null || _a === void 0 ? void 0 : _a.map(match => {
113
+ const [type, property, name] = compact(match.split('/'));
114
+ return { type, property, name };
115
+ })) !== null && _b !== void 0 ? _b : [];
116
+ return blocks;
117
+ };
118
+ const parsePath = (path) => {
119
+ var _a, _b, _c, _d;
120
+ const segments = path.split('/');
121
+ let module;
122
+ let variable;
123
+ if ((_a = segments[0]) === null || _a === void 0 ? void 0 : _a.startsWith('@')) {
124
+ module = (_b = segments.shift()) === null || _b === void 0 ? void 0 : _b.substring(1);
125
+ }
126
+ if (((_c = segments[segments.length - 1]) === null || _c === void 0 ? void 0 : _c[0]) === ':') {
127
+ variable = (_d = segments.pop()) === null || _d === void 0 ? void 0 : _d.substring(1);
128
+ }
129
+ const isAbsolute = !segments[0];
130
+ const nonEmptySegments = segments.filter(Boolean);
131
+ if (!isAbsolute && nonEmptySegments[0] === '.') {
132
+ nonEmptySegments.shift();
133
+ }
134
+ return {
135
+ isAbsolute,
136
+ segments: nonEmptySegments,
137
+ module,
138
+ variable,
139
+ };
140
+ };
141
+ const findElementByModule = (elements, module, elementName) => {
142
+ for (const el of elements) {
143
+ if (el.module === module && el.name === elementName) {
144
+ return el;
145
+ }
146
+ const child = findElementByModule(el.children, module, elementName);
147
+ if (child) {
148
+ return child;
149
+ }
150
+ }
151
+ return;
152
+ };
153
+ const getAbsolutePath = (elements, subject, path) => {
154
+ var _a, _b, _c;
155
+ if (path.module) {
156
+ return (_a = findElementByModule(elements, path.module, path.segments[0])) === null || _a === void 0 ? void 0 : _a.path;
157
+ }
158
+ const subjectSegments = (_c = (_b = subject.path) === null || _b === void 0 ? void 0 : _b.split('/')) !== null && _c !== void 0 ? _c : [];
159
+ const segments = [...path.segments];
160
+ if (path.isAbsolute) {
161
+ return segments.join('/');
162
+ }
163
+ while (segments.length) {
164
+ const segment = segments.shift();
165
+ if (segment === '..') {
166
+ subjectSegments.pop();
167
+ }
168
+ else if (segment) {
169
+ subjectSegments.push(segment);
170
+ }
171
+ }
172
+ return subjectSegments.join('/');
173
+ };
174
+
175
+ class DynamicModuleService {
176
+ constructor() {
177
+ this._elementsTree = [];
178
+ this._componentFactories = [];
179
+ }
180
+ set componentFactories(data) {
181
+ this._componentFactories = data;
182
+ }
183
+ get componentFactories() {
184
+ return this._componentFactories;
185
+ }
186
+ getComponentFactory(element) {
187
+ return this.componentFactories.find(f => f.componentType.path === element.path);
188
+ }
189
+ get elementsTree() {
190
+ return this._elementsTree;
191
+ }
192
+ set elementsTree(tree) {
193
+ this._elementsTree = tree;
194
+ }
195
+ clear() {
196
+ this._elementsTree = [];
197
+ this.componentFactories = [];
198
+ }
199
+ }
200
+ DynamicModuleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DynamicModuleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
201
+ DynamicModuleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DynamicModuleService });
202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DynamicModuleService, decorators: [{
203
+ type: Injectable
204
+ }] });
205
+
206
+ class IOProviderService {
207
+ constructor(dynamicModuleService) {
208
+ this.dynamicModuleService = dynamicModuleService;
209
+ this.inputs = {};
210
+ }
211
+ connect(el, name, target) {
212
+ var _a;
213
+ return (_a = this.resolveTarget(el, name, target)) === null || _a === void 0 ? void 0 : _a.asObservable();
214
+ }
215
+ provide(el, name, target) {
216
+ return this.resolveTarget(el, name, target);
217
+ }
218
+ resolveTarget(el, name, target) {
219
+ var _a, _b;
220
+ const isHost = !target;
221
+ if (isHost) {
222
+ return this.createSubjectSafe((_a = el.path) !== null && _a !== void 0 ? _a : '', name);
223
+ }
224
+ const elPath = parsePath(target);
225
+ const pathIsValue = elPath.segments.length === 1 && elPath.segments[0].startsWith('"') && elPath.segments[0].endsWith('"');
226
+ const finalName = (_b = elPath.variable) !== null && _b !== void 0 ? _b : name;
227
+ const value = pathIsValue ? new BehaviorSubject(elPath.segments[0].slice(1, -1)) : undefined;
228
+ const absolutePath = !pathIsValue ? getAbsolutePath(this.dynamicModuleService.elementsTree, el, elPath) : el.path;
229
+ return this.createSubjectSafe(absolutePath !== null && absolutePath !== void 0 ? absolutePath : '', finalName, value);
230
+ }
231
+ createSubjectSafe(path, name, subject) {
232
+ if (!this.inputs[path]) {
233
+ this.inputs[path] = {};
234
+ }
235
+ const subjectAlreadyExists = Boolean(this.inputs[path][name]);
236
+ if (!this.inputs[path][name]) {
237
+ this.inputs[path][name] = subject !== null && subject !== void 0 ? subject : new BehaviorSubject(undefined);
238
+ }
239
+ if (subject && subjectAlreadyExists) {
240
+ // push delayed value to workaround 'changed after it was checked' issue
241
+ setTimeout(() => this.inputs[path][name].next(subject.value));
242
+ }
243
+ return this.inputs[path][name];
244
+ }
245
+ }
246
+ IOProviderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IOProviderService, deps: [{ token: DynamicModuleService }], target: i0.ɵɵFactoryTarget.Injectable });
247
+ IOProviderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IOProviderService });
248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IOProviderService, decorators: [{
249
+ type: Injectable
250
+ }], ctorParameters: function () { return [{ type: DynamicModuleService }]; } });
251
+
252
+ class TemplatesService {
253
+ constructor() {
254
+ this.templates = {};
255
+ }
256
+ register(name, templateRef) {
257
+ this.templates[name] = templateRef;
258
+ }
259
+ get(name) {
260
+ return this.templates[name];
261
+ }
262
+ }
263
+ TemplatesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TemplatesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
264
+ TemplatesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TemplatesService });
265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TemplatesService, decorators: [{
266
+ type: Injectable
267
+ }] });
268
+
269
+ class IOPlugin {
270
+ constructor(host) {
271
+ var _a, _b;
272
+ this.host = host;
273
+ const elementMetadata = this.host.injector.get(ELEMENT_METADATA);
274
+ const inputProvider = this.host.injector.get(IOProviderService);
275
+ const inputs = Object.entries((_a = elementMetadata.inputs) !== null && _a !== void 0 ? _a : {});
276
+ const outputs = Object.entries((_b = elementMetadata.outputs) !== null && _b !== void 0 ? _b : {});
277
+ inputs.forEach(([key, path]) => {
278
+ var _a;
279
+ if (path && typeof path !== 'string') {
280
+ console.error(`The value of '${key}' input should be a string`);
281
+ }
282
+ if (((_a = elementMetadata.outputs) === null || _a === void 0 ? void 0 : _a[key]) !== undefined) {
283
+ console.warn(`'${key}' appears both in inputs and outputs. To prevent inconsistent behavior please keep them unique `);
284
+ }
285
+ this.host[key] = inputProvider.connect(elementMetadata, key, path);
286
+ });
287
+ outputs.forEach(([key, path]) => {
288
+ if (path && typeof path !== 'string') {
289
+ console.error(`The value of '${key}' output should be a string`);
290
+ }
291
+ this.host[key] = inputProvider.provide(elementMetadata, key, path);
292
+ });
293
+ }
294
+ }
295
+ IOPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IOPlugin, deps: [{ token: ElementComponent }], target: i0.ɵɵFactoryTarget.Directive });
296
+ IOPlugin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: IOPlugin, ngImport: i0 });
297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IOPlugin, decorators: [{
298
+ type: Directive
299
+ }], ctorParameters: function () { return [{ type: ElementComponent }]; } });
300
+
301
+ class ScriptPlugin {
302
+ constructor(host) {
303
+ this.host = host;
304
+ this.normalizeImports = (script, elementPath) => {
305
+ const regexp = new RegExp(`import([ \\n\\t]*(?:[^ \\n\\t\\{\\}]+[ \\n\\t]*,?)?(?:[ \\n\\t]*\\{(?:[ \\n\\t]*[^ \\n\\t"'\\{\\}]+[ \\n\\t]*,?)+\\})?[ \\n\\t]*)from[ \\n\\t]*(['"])([^'"\\n]+)(?:['"]);`, 'g');
306
+ const result = script.replace(regexp, (match, g1, g2, src) => {
307
+ const imports = g1
308
+ .trim()
309
+ .slice(1, -1)
310
+ .split(',')
311
+ .map(item => item.trim());
312
+ imports.forEach(item => {
313
+ var _a;
314
+ if (!((_a = this.vendorMap[src]) === null || _a === void 0 ? void 0 : _a[item])) {
315
+ throw new Error(`Failed to import ${item} from '${src}' in ${elementPath}/script.ts`);
316
+ }
317
+ });
318
+ return `const ${g1} = vendor['${src}'];`;
319
+ });
320
+ return result;
321
+ };
322
+ this.document = this.host.injector.get(DOCUMENT);
323
+ this.vendorMap = this.host.injector.get(VENDOR_MAP);
324
+ const elementMetadata = this.host.injector.get(ELEMENT_METADATA);
325
+ const sharedElementMetadata = this.host.injector.get(SHARED_ELEMENT_METADATA);
326
+ this.addScript(sharedElementMetadata);
327
+ this.addScript(elementMetadata);
328
+ }
329
+ addScript(metadata) {
330
+ var _a;
331
+ if (!(metadata === null || metadata === void 0 ? void 0 : metadata.script)) {
332
+ return;
333
+ }
334
+ const id = btoa(UUID.UUID());
335
+ const script = this.document.createElement('script');
336
+ script.type = `text/javascript`;
337
+ let scriptContent = this.normalizeImports(metadata.script, (_a = metadata.path) !== null && _a !== void 0 ? _a : metadata.name);
338
+ const classMatch = /export class (\S+)/.exec(scriptContent);
339
+ const className = classMatch === null || classMatch === void 0 ? void 0 : classMatch[1];
340
+ if (!classMatch || !className) {
341
+ console.error("Script doesn't have exported class");
342
+ return;
343
+ }
344
+ scriptContent = scriptContent.replace(classMatch[0], `class ${className}`);
345
+ script.text = `var ${id} = function(vendor) {${scriptContent}
346
+ return ${className}; };`;
347
+ this.document.body.appendChild(script);
348
+ const ScriptClass = window[id](this.vendorMap);
349
+ if (ScriptClass instanceof Object) {
350
+ this.host.registerPlugin(new ScriptClass(this.host));
351
+ }
352
+ this.document.body.removeChild(script);
353
+ }
354
+ }
355
+ ScriptPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ScriptPlugin, deps: [{ token: ElementComponent }], target: i0.ɵɵFactoryTarget.Directive });
356
+ ScriptPlugin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ScriptPlugin, ngImport: i0 });
357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ScriptPlugin, decorators: [{
358
+ type: Directive
359
+ }], ctorParameters: function () { return [{ type: ElementComponent }]; } });
360
+
361
+ /*
362
+ * ScriptPlugin must always be the last plugin in the list to make sure user code is running after all pre-initializers.
363
+ */
364
+ const CONFIG = {
365
+ CUSTOM: {
366
+ component: ElementComponent,
367
+ plugins: [IOPlugin, ScriptPlugin],
368
+ },
369
+ CONTAINER: {
370
+ component: ElementComponent,
371
+ defaultTemplate: '<element-children></element-children>',
372
+ plugins: [ScriptPlugin],
373
+ },
374
+ SERVICE: {
375
+ component: ElementComponent,
376
+ plugins: [IOPlugin, ScriptPlugin],
377
+ suppressTemplate: true,
378
+ suppressStyles: true,
379
+ },
380
+ REFERENCE: {
381
+ component: ElementComponent,
382
+ plugins: [IOPlugin, ScriptPlugin],
383
+ suppressTemplate: true,
384
+ },
385
+ };
386
+
387
+ const EXPORTED_CLASS_REGEX = /export class (\S+)/;
388
+ const METADATA_DECORATOR_REGEX = /@ElementDefinition\(([\s\S]+)\)(\n|.)*export class/g;
389
+ class UiBuildError extends Error {
390
+ constructor(message, affectedMetadata) {
391
+ super(message);
392
+ this.name = this.constructor.name;
393
+ this.affectedMetadata = affectedMetadata;
394
+ }
395
+ }
396
+ const elementToMetadata = (el, parentPath) => {
397
+ var _a;
398
+ const script = el.script && window.atob(el.script);
399
+ const template = el.template && window.atob(el.template);
400
+ const styles = el.styles && window.atob(el.styles);
401
+ const exportedClassName = script && ((_a = EXPORTED_CLASS_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
402
+ if (!exportedClassName) {
403
+ throw new Error("Script doesn't have exported class");
404
+ }
405
+ const elementMetadata = extractElementMetadata(script || '');
406
+ const path = (parentPath ? parentPath + '/' : '') + elementMetadata.name;
407
+ return Object.assign(Object.assign({}, elementMetadata), { path, script: script === null || script === void 0 ? void 0 : script.replace(METADATA_DECORATOR_REGEX, 'export class'), template,
408
+ styles, children: el.children.map(child => elementToMetadata(child, path)) });
409
+ };
410
+ const metadataToElement = (metadata, recursive = true) => {
411
+ const elMetadata = {
412
+ name: metadata.name,
413
+ isShared: metadata.isShared,
414
+ type: metadata.type,
415
+ model: metadata.model,
416
+ module: metadata.module,
417
+ reference: metadata.reference,
418
+ inputs: metadata.inputs,
419
+ outputs: metadata.outputs,
420
+ children: metadata.children.map(({ name }) => name),
421
+ };
422
+ const normalizedElMetadata = normalizeElementMetadata(elMetadata);
423
+ if (!metadata.script || !EXPORTED_CLASS_REGEX.test(metadata.script)) {
424
+ throw new UiBuildError(`'${metadata.name}' component script is missing an exported class`, metadata);
425
+ }
426
+ const script = metadata.script &&
427
+ window.btoa(metadata.script.replace(EXPORTED_CLASS_REGEX, `@ElementDefinition(${stringifyElementMetadata(normalizedElMetadata)})\nexport class Script`));
428
+ const template = metadata.template && window.btoa(metadata.template);
429
+ const styles = metadata.styles && window.btoa(metadata.styles);
430
+ return {
431
+ script,
432
+ template,
433
+ styles,
434
+ children: recursive ? metadata.children.map(meta => metadataToElement(meta)) : [],
435
+ };
436
+ };
437
+ const normalizeElementMetadata = (elementMetadata) => {
438
+ var _a, _b, _c, _d;
439
+ const metadata = Object.assign({}, elementMetadata);
440
+ // model
441
+ const { lineItem, path } = (_a = metadata.model) !== null && _a !== void 0 ? _a : {};
442
+ const model = lineItem ? { lineItem } : path ? { path } : undefined;
443
+ if (model) {
444
+ metadata.model = model;
445
+ }
446
+ else {
447
+ delete metadata.model;
448
+ }
449
+ // module
450
+ if (!metadata.module) {
451
+ delete metadata.module;
452
+ }
453
+ // reference
454
+ if (!metadata.reference) {
455
+ delete metadata.reference;
456
+ }
457
+ // inputs
458
+ const inputs = Object.entries((_b = metadata.inputs) !== null && _b !== void 0 ? _b : {}).reduce((acc, [key, value]) => {
459
+ return Object.assign(Object.assign({}, acc), { [key]: value || null });
460
+ }, {});
461
+ if (inputs && Object.keys(inputs).length > 0) {
462
+ metadata.inputs = inputs;
463
+ }
464
+ else {
465
+ delete metadata.inputs;
466
+ }
467
+ // outputs
468
+ const outputs = Object.entries((_c = metadata.outputs) !== null && _c !== void 0 ? _c : {}).reduce((acc, [key, value]) => {
469
+ return Object.assign(Object.assign({}, acc), { [key]: value || null });
470
+ }, {});
471
+ if (outputs && Object.keys(outputs).length > 0) {
472
+ metadata.outputs = outputs;
473
+ }
474
+ else {
475
+ delete metadata.outputs;
476
+ }
477
+ // children
478
+ if (!((_d = metadata.children) === null || _d === void 0 ? void 0 : _d.length)) {
479
+ delete metadata.children;
480
+ }
481
+ // isShared
482
+ if (!metadata.isShared) {
483
+ delete metadata.isShared;
484
+ }
485
+ return metadata;
486
+ };
487
+ const extractElementMetadata = (script) => {
488
+ var _a;
489
+ const metadataString = ((_a = METADATA_DECORATOR_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
490
+ // need to reset regex last index to prevent null result for next execution
491
+ METADATA_DECORATOR_REGEX.lastIndex = 0;
492
+ return new Function(`return ${metadataString}`)();
493
+ };
494
+ const extendElementMetadata = (script, extend) => {
495
+ var _a;
496
+ const metadataString = ((_a = METADATA_DECORATOR_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
497
+ // need to reset regex last index to prevent null result for next execution
498
+ METADATA_DECORATOR_REGEX.lastIndex = 0;
499
+ if (!metadataString) {
500
+ return script;
501
+ }
502
+ const updated = Object.assign(Object.assign({}, new Function(`return ${metadataString}`)()), extend);
503
+ return script.replace(metadataString, stringifyElementMetadata(updated));
504
+ };
505
+ const getElementConfig = (type) => {
506
+ return CONFIG[type];
507
+ };
508
+ const doesElementSupportIO = (type) => {
509
+ var _a, _b;
510
+ return (_b = (_a = getElementConfig(type).plugins) === null || _a === void 0 ? void 0 : _a.includes(IOPlugin)) !== null && _b !== void 0 ? _b : false;
511
+ };
512
+ function stringifyElementMetadata(elementMetadata) {
513
+ const cleaned = JSON.stringify(elementMetadata, null, 2);
514
+ return cleaned.replace(/^[\t ]*"[^:\n\r]+(?<!\\)":/gm, function (match) {
515
+ return match.replace(/"/g, '');
516
+ });
517
+ }
518
+ const isValidScript = (script) => {
519
+ var _a;
520
+ if (!script) {
521
+ return false;
522
+ }
523
+ const exportedClassName = script && ((_a = EXPORTED_CLASS_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
524
+ if (!exportedClassName) {
525
+ return false;
526
+ }
527
+ const meta = extractElementMetadata(script);
528
+ if (!meta.name || !meta.type) {
529
+ return false;
530
+ }
531
+ return true;
532
+ };
533
+
534
+ class ElementContextService {
535
+ }
536
+ ElementContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
537
+ ElementContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementContextService });
538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementContextService, decorators: [{
539
+ type: Injectable
540
+ }] });
541
+
542
+ class ElementRendererComponent {
543
+ constructor(parentInjector, dynamicModuleService, elementContext, ioProviderService, configurationService, elementRef, cdr) {
544
+ this.parentInjector = parentInjector;
545
+ this.dynamicModuleService = dynamicModuleService;
546
+ this.elementContext = elementContext;
547
+ this.ioProviderService = ioProviderService;
548
+ this.configurationService = configurationService;
549
+ this.elementRef = elementRef;
550
+ this.cdr = cdr;
551
+ this.refs = {};
552
+ this.destroy$ = new Subject();
553
+ }
554
+ ngOnInit() {
555
+ this.elementContext.metadata = this.meta;
556
+ this.factory = this.dynamicModuleService.getComponentFactory(this.meta);
557
+ this.createComponents();
558
+ }
559
+ ngOnDestroy() {
560
+ this.destroyComponents();
561
+ this.destroy$.next();
562
+ this.destroy$.complete();
563
+ }
564
+ createComponents() {
565
+ const modelMeta = this.meta.model;
566
+ if (!modelMeta) {
567
+ this.refs[UUID.UUID()] = this.createComponent();
568
+ return;
569
+ }
570
+ if (modelMeta.lineItem) {
571
+ this.createFromLineItem(modelMeta.lineItem);
572
+ }
573
+ else if (modelMeta.path) {
574
+ this.createFromPath(modelMeta.path);
575
+ }
576
+ }
577
+ createFromPath(path) {
578
+ const array$ = this.ioProviderService.connect(this.meta, 'children$', path);
579
+ array$ === null || array$ === void 0 ? void 0 : array$.pipe(takeUntil(this.destroy$)).subscribe(children => {
580
+ if (!isArray(children)) {
581
+ return;
582
+ }
583
+ this.processChildren(children);
584
+ });
585
+ }
586
+ createFromLineItem(path) {
587
+ var _a, _b;
588
+ const parentComp = this.parentInjector.get(ElementRendererComponent, null);
589
+ const parentPath = (_a = parentComp === null || parentComp === void 0 ? void 0 : parentComp.meta.model) === null || _a === void 0 ? void 0 : _a.lineItem;
590
+ const pathBlocks = parseBoundPath(path).reverse();
591
+ const { property, name } = (_b = pathBlocks[1]) !== null && _b !== void 0 ? _b : {};
592
+ const finalPath = pathBlocks[0];
593
+ const children$ = this.getParentLineItem$(parentComp).pipe(map(model => {
594
+ var _a;
595
+ if (property === 'ports' && !finalPath.property && parentPath !== path) {
596
+ return (_a = model.lineItems.filter(({ port }) => port === name)) !== null && _a !== void 0 ? _a : [];
597
+ }
598
+ return [model];
599
+ }));
600
+ children$.pipe(takeUntil(this.destroy$)).subscribe(children => {
601
+ this.processChildren(children);
602
+ });
603
+ }
604
+ processChildren(children) {
605
+ const refs = children.reduce((acc, data) => {
606
+ var _a;
607
+ const key = String((_a = data === null || data === void 0 ? void 0 : data.id) !== null && _a !== void 0 ? _a : UUID.UUID());
608
+ const ref = this.refs[key] ? this.updateComponent(key, data) : this.createComponent(data);
609
+ return ref ? Object.assign(Object.assign({}, acc), { [key]: ref }) : acc;
610
+ }, {});
611
+ const existingKeys = Object.keys(this.refs);
612
+ const newKeys = Object.keys(refs);
613
+ pull(existingKeys, ...newKeys).forEach(key => {
614
+ this.destroyComponent(key);
615
+ });
616
+ this.refs = refs;
617
+ this.cdr.detectChanges();
618
+ }
619
+ getParentLineItem$(parentComp) {
620
+ var _a;
621
+ const parentRefs = Object.values((_a = parentComp === null || parentComp === void 0 ? void 0 : parentComp.refs) !== null && _a !== void 0 ? _a : {});
622
+ const parentRef = parentRefs.find(ref => { var _a; return (_a = ref === null || ref === void 0 ? void 0 : ref.location.nativeElement) === null || _a === void 0 ? void 0 : _a.contains(this.elementRef.nativeElement); });
623
+ const parentModel$ = parentRef === null || parentRef === void 0 ? void 0 : parentRef.instance.model$;
624
+ return parentModel$ !== null && parentModel$ !== void 0 ? parentModel$ : this.configurationService.get();
625
+ }
626
+ createComponent(data) {
627
+ var _a, _b;
628
+ if (!this.factory) {
629
+ return;
630
+ }
631
+ const componentRef = (_a = this.el) === null || _a === void 0 ? void 0 : _a.createComponent(this.factory);
632
+ if (componentRef) {
633
+ componentRef.location.nativeElement.setAttribute('name', this.meta.name);
634
+ componentRef.location.nativeElement.setAttribute('path', this.meta.path);
635
+ (_b = componentRef.instance) === null || _b === void 0 ? void 0 : _b.model$.next(data);
636
+ }
637
+ return componentRef;
638
+ }
639
+ updateComponent(key, data) {
640
+ const ref = this.refs[key];
641
+ ref === null || ref === void 0 ? void 0 : ref.instance.model$.next(data);
642
+ return ref;
643
+ }
644
+ destroyComponent(key) {
645
+ var _a;
646
+ (_a = this.refs[key]) === null || _a === void 0 ? void 0 : _a.destroy();
647
+ delete this.refs[key];
648
+ }
649
+ destroyComponents() {
650
+ Object.values(this.refs).forEach(ref => ref === null || ref === void 0 ? void 0 : ref.destroy());
651
+ this.refs = {};
652
+ }
653
+ }
654
+ ElementRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementRendererComponent, deps: [{ token: i0.Injector, skipSelf: true }, { token: DynamicModuleService }, { token: ElementContextService }, { token: IOProviderService }, { token: i2.ConfigurationService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
655
+ ElementRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: { meta: "meta" }, providers: [ElementContextService], viewQueries: [{ propertyName: "el", first: true, predicate: ["el"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-template #el></ng-template>\n", styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
656
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementRendererComponent, decorators: [{
657
+ type: Component,
658
+ args: [{
659
+ selector: 'vl-cms-element-renderer',
660
+ templateUrl: './element-renderer.component.html',
661
+ styleUrls: ['./element-renderer.component.scss'],
662
+ changeDetection: ChangeDetectionStrategy.OnPush,
663
+ providers: [ElementContextService],
664
+ }]
665
+ }], ctorParameters: function () { return [{ type: i0.Injector, decorators: [{
666
+ type: SkipSelf
667
+ }] }, { type: DynamicModuleService }, { type: ElementContextService }, { type: IOProviderService }, { type: i2.ConfigurationService }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { el: [{
668
+ type: ViewChild,
669
+ args: ['el', { read: ViewContainerRef, static: true }]
670
+ }], meta: [{
671
+ type: Input
672
+ }] } });
673
+
674
+ class ElementChildrenComponent {
675
+ constructor(elementContext) {
676
+ this.elementContext = elementContext;
677
+ this.metadata = this.elementContext.metadata;
678
+ }
679
+ }
680
+ ElementChildrenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementChildrenComponent, deps: [{ token: ElementContextService }], target: i0.ɵɵFactoryTarget.Component });
681
+ ElementChildrenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ElementChildrenComponent, selector: "element-children", ngImport: i0, template: "<ng-container *ngIf=\"metadata?.children.length\">\n <ng-container *ngFor=\"let child of metadata.children\">\n <vl-cms-element-renderer [meta]=\"child\"></vl-cms-element-renderer>\n </ng-container>\n</ng-container>\n", styles: [":host{display:contents}\n"], components: [{ type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: ["meta"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
682
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementChildrenComponent, decorators: [{
683
+ type: Component,
684
+ args: [{
685
+ // eslint-disable-next-line @angular-eslint/component-selector
686
+ selector: 'element-children',
687
+ templateUrl: 'element-children.component.html',
688
+ styleUrls: ['./element-children.component.scss'],
689
+ changeDetection: ChangeDetectionStrategy.OnPush,
690
+ }]
691
+ }], ctorParameters: function () { return [{ type: ElementContextService }]; } });
692
+
693
+ // eslint-disable-next-line @angular-eslint/directive-selector
694
+ class CustomTemplateDirective {
695
+ constructor(templateRef, templatesService) {
696
+ this.templateRef = templateRef;
697
+ this.templatesService = templatesService;
698
+ }
699
+ ngAfterViewInit() {
700
+ if (!this.customTemplate) {
701
+ return;
702
+ }
703
+ this.templatesService.register(this.customTemplate, this.templateRef);
704
+ }
705
+ }
706
+ CustomTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CustomTemplateDirective, deps: [{ token: i0.TemplateRef }, { token: TemplatesService }], target: i0.ɵɵFactoryTarget.Directive });
707
+ CustomTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: CustomTemplateDirective, selector: "[customTemplate]", inputs: { customTemplate: "customTemplate" }, ngImport: i0 });
708
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CustomTemplateDirective, decorators: [{
709
+ type: Directive,
710
+ args: [{ selector: '[customTemplate]' }]
711
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: TemplatesService }]; }, propDecorators: { customTemplate: [{
712
+ type: Input
713
+ }] } });
714
+
715
+ const defaultOptions = {
716
+ suppressLoading: false,
717
+ loadingLabel: 'LOADING',
718
+ };
719
+
720
+ const moduleMap = {};
721
+ function loadRemoteEntry(remoteEntry) {
722
+ return new Promise((resolve, reject) => {
723
+ if (moduleMap[remoteEntry]) {
724
+ resolve();
725
+ return;
726
+ }
727
+ const script = document.createElement('script');
728
+ script.src = remoteEntry;
729
+ script.onerror = reject;
730
+ script.onload = () => {
731
+ moduleMap[remoteEntry] = true;
732
+ resolve(); // window is the global namespace
733
+ };
734
+ document.body.append(script);
735
+ });
736
+ }
737
+ function lookupExposedModule(remoteName, exposedModule) {
738
+ return __awaiter(this, void 0, void 0, function* () {
739
+ // Initializes the share scope. This fills it with known provided modules from this build and all remotes
740
+ yield __webpack_init_sharing__('default');
741
+ const container = window[remoteName]; // or get the container somewhere else
742
+ // Initialize the container, it may provide shared modules
743
+ yield container.init(__webpack_share_scopes__.default);
744
+ const factory = yield container.get(exposedModule);
745
+ const Module = factory();
746
+ return Module;
747
+ });
748
+ }
749
+ function loadRemoteModule(remoteEntry, remoteName, exposedModule) {
750
+ return __awaiter(this, void 0, void 0, function* () {
751
+ yield loadRemoteEntry(remoteEntry);
752
+ return yield lookupExposedModule(remoteName, exposedModule);
753
+ });
754
+ }
755
+
756
+ class FederatedComponent {
757
+ constructor(injector, compiler, appRef, renderer) {
758
+ this.injector = injector;
759
+ this.compiler = compiler;
760
+ this.appRef = appRef;
761
+ this.renderer = renderer;
762
+ this.isLoading$ = new BehaviorSubject(false);
763
+ // configs
764
+ this.suppressLoading = defaultOptions.suppressLoading;
765
+ this.loadingLabel = defaultOptions.loadingLabel;
766
+ }
767
+ ngOnChanges(changes) {
768
+ var _a, _b, _c, _d;
769
+ if (changes.data && this.instance) {
770
+ this.instance.data = this.data;
771
+ }
772
+ if (changes.options) {
773
+ this.suppressLoading = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.suppressLoading) !== null && _b !== void 0 ? _b : defaultOptions.suppressLoading;
774
+ this.loadingLabel = (_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.loadingLabel) !== null && _d !== void 0 ? _d : defaultOptions.loadingLabel;
775
+ }
776
+ }
777
+ ngOnInit() {
778
+ this.isLoading$.next(true);
779
+ }
780
+ ngAfterViewInit() {
781
+ var _a, _b, _c, _d, _e, _f;
782
+ const remoteEntry = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.remoteEntry) !== null && _b !== void 0 ? _b : this.remoteEntry;
783
+ const remoteName = (_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.remoteName) !== null && _d !== void 0 ? _d : this.remoteName;
784
+ const exposedModule = (_f = (_e = this.options) === null || _e === void 0 ? void 0 : _e.exposedModule) !== null && _f !== void 0 ? _f : this.exposedModule;
785
+ if (!remoteEntry || !remoteName || !exposedModule) {
786
+ return;
787
+ }
788
+ loadRemoteModule(remoteEntry, remoteName, exposedModule).then(federated => {
789
+ this.compiler.compileModuleAsync(federated[exposedModule]).then(moduleFactory => {
790
+ var _a, _b, _c;
791
+ const rootModuleRef = moduleFactory.create(this.injector);
792
+ const rootComponentFactory = rootModuleRef.componentFactoryResolver.resolveComponentFactory(federated[exposedModule].rootComponent);
793
+ const node = document.createElement('div');
794
+ const { instance, hostView } = rootComponentFactory.create(this.injector, [], node);
795
+ this.instance = instance;
796
+ this.instance.data = this.data;
797
+ this.renderer.appendChild((_a = this.moduleHostRef) === null || _a === void 0 ? void 0 : _a.nativeElement, node);
798
+ this.appRef.attachView(hostView);
799
+ (_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.onReady) === null || _c === void 0 ? void 0 : _c.call(_b);
800
+ this.isLoading$.next(false);
801
+ });
802
+ });
803
+ }
804
+ }
805
+ FederatedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FederatedComponent, deps: [{ token: i0.Injector }, { token: i0.Compiler }, { token: i0.ApplicationRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
806
+ FederatedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FederatedComponent, selector: "veloce-host-federated", inputs: { remoteEntry: "remoteEntry", remoteName: "remoteName", exposedModule: "exposedModule", data: "data", options: "options" }, viewQueries: [{ propertyName: "moduleHostRef", first: true, predicate: ["moduleHost"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #moduleHost></div>\n\n<vl-loader *ngIf=\"!suppressLoading && (isLoading$ | async)\" [label]=\"loadingLabel\"></vl-loader>\n", styles: [":host{display:block}div{height:100%}\n"], components: [{ type: i1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i7.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FederatedComponent, decorators: [{
808
+ type: Component,
809
+ args: [{
810
+ // eslint-disable-next-line @angular-eslint/component-selector
811
+ selector: 'veloce-host-federated',
812
+ templateUrl: './federated.component.html',
813
+ styleUrls: ['./federated.component.scss'],
814
+ changeDetection: ChangeDetectionStrategy.OnPush,
815
+ }]
816
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }, { type: i0.ApplicationRef }, { type: i0.Renderer2 }]; }, propDecorators: { moduleHostRef: [{
817
+ type: ViewChild,
818
+ args: ['moduleHost', { static: false }]
819
+ }], remoteEntry: [{
820
+ type: Input
821
+ }], remoteName: [{
822
+ type: Input
823
+ }], exposedModule: [{
824
+ type: Input
825
+ }], data: [{
826
+ type: Input
827
+ }], options: [{
828
+ type: Input
829
+ }] } });
830
+
831
+ class FederatedModule {
832
+ }
833
+ FederatedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FederatedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
834
+ FederatedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FederatedModule, declarations: [FederatedComponent], imports: [CommonModule, LoaderModule], exports: [FederatedComponent] });
835
+ FederatedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FederatedModule, imports: [[CommonModule, LoaderModule]] });
836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FederatedModule, decorators: [{
837
+ type: NgModule,
838
+ args: [{
839
+ declarations: [FederatedComponent],
840
+ imports: [CommonModule, LoaderModule],
841
+ exports: [FederatedComponent],
842
+ }]
843
+ }] });
844
+
845
+ class ConfigurationPlugin {
846
+ constructor(host) {
847
+ var _a, _b;
848
+ this.host = host;
849
+ this.destroy$ = new Subject();
850
+ this.elementMetadata = this.host.injector.get(ELEMENT_METADATA);
851
+ this.configurationService = this.host.injector.get(ConfigurationService);
852
+ if ((_a = this.elementMetadata.model) === null || _a === void 0 ? void 0 : _a.lineItem) {
853
+ this.host.model$.pipe(takeUntil(this.destroy$)).subscribe(model => (this.modelSnapshot = model));
854
+ const pathBlocks = parseBoundPath((_b = this.elementMetadata.model) === null || _b === void 0 ? void 0 : _b.lineItem);
855
+ const { type, property, name } = pathBlocks.reverse()[0];
856
+ this.host.boundName = name !== null && name !== void 0 ? name : type;
857
+ this.register(type, property, name);
858
+ }
859
+ }
860
+ ngOnDestroy() {
861
+ this.destroy$.next();
862
+ this.destroy$.complete();
863
+ }
864
+ register(type, property, name) {
865
+ if (!type) {
866
+ return;
867
+ }
868
+ if (!property) {
869
+ this.registerType();
870
+ }
871
+ else if (property === 'ports' && name) {
872
+ this.registerPort(name);
873
+ }
874
+ else if (property === 'attributes' && name) {
875
+ this.registerAttribute(name);
876
+ }
877
+ }
878
+ registerType() {
879
+ const remove = (id) => {
880
+ const rootLineItem = this.configurationService.getSnapshot();
881
+ if (!rootLineItem) {
882
+ return;
883
+ }
884
+ this.configurationService.patch(new LineItemWorker(rootLineItem).remove(id).li);
885
+ };
886
+ this.typeHost.remove = remove;
887
+ }
888
+ registerPort(name) {
889
+ const add = (type, attributes = []) => {
890
+ if (!this.modelSnapshot) {
891
+ return;
892
+ }
893
+ const portDomain = this.modelSnapshot.portDomains[name];
894
+ if (!portDomain) {
895
+ return;
896
+ }
897
+ const generated = generateLineItem(portDomain.name, type, this.modelSnapshot.id, attributes);
898
+ this.configurationService.patch(new LineItemWorker(this.modelSnapshot).insert(this.modelSnapshot.id, generated).li);
899
+ };
900
+ this.portHost.addPortItem = add;
901
+ }
902
+ registerAttribute(name) {
903
+ var _a;
904
+ if (!this.host.model$) {
905
+ return;
906
+ }
907
+ const value$ = (_a = this.host.model$) === null || _a === void 0 ? void 0 : _a.pipe(map(model => { var _a; return getAttributeValue((_a = model === null || model === void 0 ? void 0 : model.attributes) !== null && _a !== void 0 ? _a : [], name); }));
908
+ const patch = (value) => {
909
+ if (!this.modelSnapshot) {
910
+ return;
911
+ }
912
+ this.configurationService.patch(new LineItemWorker(this.modelSnapshot).patchAttribute([{ name, value }]).li);
913
+ };
914
+ this.attributeHost.value$ = value$;
915
+ this.attributeHost.patch = patch;
916
+ }
917
+ get attributeHost() {
918
+ return this.host;
919
+ }
920
+ get typeHost() {
921
+ return this.host;
922
+ }
923
+ get portHost() {
924
+ return this.host;
925
+ }
926
+ }
927
+ ConfigurationPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationPlugin, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
928
+ ConfigurationPlugin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ConfigurationPlugin, ngImport: i0 });
929
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationPlugin, decorators: [{
930
+ type: Directive
931
+ }], ctorParameters: function () { return [{ type: undefined }]; } });
932
+
933
+ const DEFAULT_PLUGINS = {
934
+ CONFIGURATION: [ConfigurationPlugin],
935
+ DEFAULT: [],
936
+ };
937
+
938
+ const InitAction = { type: 'INIT' };
939
+ const ClearAction = { type: 'CLEAR' };
940
+ class IntegrationState {
941
+ constructor() {
942
+ this.stateSubj$ = new BehaviorSubject({});
943
+ this.action$ = new BehaviorSubject(InitAction);
944
+ }
945
+ get state$() {
946
+ return this.stateSubj$.asObservable();
947
+ }
948
+ get state() {
949
+ return this.stateSubj$.getValue();
950
+ }
951
+ patchState(update) {
952
+ this.stateSubj$.next(Object.assign(Object.assign({}, this.stateSubj$.getValue()), update));
953
+ }
954
+ dispatch(action) {
955
+ this.action$.next(action);
956
+ }
957
+ listen$(actionType) {
958
+ return this.action$.pipe(filter(action => action.type === actionType), map(action => action.payload));
959
+ }
960
+ listenAll$() {
961
+ return this.action$.asObservable();
962
+ }
963
+ clear() {
964
+ this.stateSubj$.next({});
965
+ this.action$.next(ClearAction);
966
+ }
967
+ }
968
+ IntegrationState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IntegrationState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
969
+ IntegrationState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IntegrationState, providedIn: 'root' });
970
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IntegrationState, decorators: [{
971
+ type: Injectable,
972
+ args: [{ providedIn: 'root' }]
973
+ }] });
974
+
975
+ const vendorMap = {
976
+ '@veloce/sdk/core': Object.assign({ ConfigurationService,
977
+ QuoteDraftService,
978
+ FlowConfigurationService,
979
+ LineItemWorker,
980
+ ProductImagesService }, lineItemUtils),
981
+ '@veloce/sdk/cms': Object.assign(Object.assign(Object.assign({}, cmsInjectionTokens), cmsActions), { TemplatesService,
982
+ IntegrationState }),
983
+ '@veloce/api': {
984
+ SalesforceApiService,
985
+ QuoteApiService,
986
+ DocumentTemplatesApiService,
987
+ DocumentAttachmentApiService,
988
+ RampApiService,
989
+ CatalogApiService,
990
+ DeltaApiService,
991
+ },
992
+ '@angular/core': i0,
993
+ '@angular/forms': angularForms,
994
+ rxjs: rxjs,
995
+ 'rxjs/operators': rxjsOperators,
996
+ lodash: lodash,
997
+ };
998
+
999
+ class ElementsResolver {
1000
+ constructor(uiDef, elements) {
1001
+ this.uiDef = uiDef;
1002
+ this.renderableElements = [];
1003
+ this.sharedElements = [];
1004
+ this.elements = this.transpileScripts(elements);
1005
+ const flatElements = this.flattenElements(this.elements);
1006
+ for (const el of flatElements) {
1007
+ if (this.isSharedElement(el)) {
1008
+ this.sharedElements.push(el);
1009
+ }
1010
+ else {
1011
+ this.renderableElements.push(el);
1012
+ }
1013
+ }
1014
+ }
1015
+ transpile(el) {
1016
+ var _a;
1017
+ if (!el.script) {
1018
+ return;
1019
+ }
1020
+ const transformed = transform(el.script, {
1021
+ filename: el.name + '.ts',
1022
+ presets: ['typescript'],
1023
+ sourceMaps: 'inline',
1024
+ });
1025
+ return (_a = transformed.code) !== null && _a !== void 0 ? _a : undefined;
1026
+ }
1027
+ transpileScripts(elements) {
1028
+ return elements.map(el => (Object.assign(Object.assign({}, el), { script: this.transpile(el), children: this.transpileScripts(el.children) })));
1029
+ }
1030
+ flattenElements(elements) {
1031
+ return flatten(elements.map(el => [el, ...this.flattenElements(el.children)]));
1032
+ }
1033
+ isSharedElement(el) {
1034
+ return Boolean(el.isShared) && el.type !== 'REFERENCE';
1035
+ }
1036
+ getSharedElement(element) {
1037
+ if (element.type !== 'REFERENCE') {
1038
+ return;
1039
+ }
1040
+ return this.sharedElements.find(el => element.reference === el.name);
1041
+ }
1042
+ resolveElementTemplate(element) {
1043
+ const config = CONFIG[element.type];
1044
+ const template = !config.suppressTemplate ? element.template : '';
1045
+ return template || config.defaultTemplate || '';
1046
+ }
1047
+ resolveElementStyles(element) {
1048
+ var _a;
1049
+ const config = CONFIG[element.type];
1050
+ return !config.suppressStyles ? (_a = element.styles) !== null && _a !== void 0 ? _a : '' : '';
1051
+ }
1052
+ processElementMetadata(sourceElement) {
1053
+ var _a, _b;
1054
+ const sharedElement = this.getSharedElement(sourceElement);
1055
+ let finalElement;
1056
+ if (sourceElement.type === 'REFERENCE') {
1057
+ if (!sharedElement) {
1058
+ console.warn(`Shared element "${sourceElement.reference}" not found`);
1059
+ return;
1060
+ }
1061
+ finalElement = Object.assign(Object.assign({}, sourceElement), { type: sharedElement.type, template: sharedElement.template, styles: ((_a = sharedElement.styles) !== null && _a !== void 0 ? _a : '') + '\n' + ((_b = sourceElement.styles) !== null && _b !== void 0 ? _b : ''), inputs: Object.assign(Object.assign({}, sharedElement.inputs), sourceElement.inputs), outputs: Object.assign(Object.assign({}, sharedElement.outputs), sourceElement.outputs) });
1062
+ }
1063
+ else {
1064
+ finalElement = sourceElement;
1065
+ }
1066
+ finalElement.template = this.resolveElementTemplate(finalElement);
1067
+ finalElement.styles = this.resolveElementStyles(finalElement);
1068
+ return finalElement;
1069
+ }
1070
+ resolveElement(sourceElement) {
1071
+ var _a;
1072
+ const element = this.processElementMetadata(sourceElement);
1073
+ if (!element) {
1074
+ return;
1075
+ }
1076
+ const config = CONFIG[element.type];
1077
+ const defaultPlugins = (_a = DEFAULT_PLUGINS[this.uiDef.type]) !== null && _a !== void 0 ? _a : [];
1078
+ if (!config) {
1079
+ console.warn(`Unknown element type "${element.type}"`);
1080
+ return;
1081
+ }
1082
+ const component = Object.assign(Object.assign({ selector: 'vl-element', template: element.template }, (element.styles ? { styles: [element.styles] } : {})), { providers: [
1083
+ { provide: DEFAULT_PLUGINS_TOKEN, useValue: defaultPlugins },
1084
+ { provide: UI_DEFINITION_METADATA, useValue: this.uiDef },
1085
+ { provide: ELEMENT_METADATA, useValue: element },
1086
+ { provide: SHARED_ELEMENT_METADATA, useValue: this.getSharedElement(sourceElement) },
1087
+ { provide: ELEMENT_CONFIG, useValue: config },
1088
+ { provide: VENDOR_MAP, useValue: vendorMap },
1089
+ ] });
1090
+ const cmp = Component(component)(class C extends config.component {
1091
+ });
1092
+ set(cmp, 'path', element.path);
1093
+ return cmp;
1094
+ }
1095
+ getNgComponents() {
1096
+ return this.renderableElements.map(el => this.resolveElement(el)).filter(Boolean);
1097
+ }
1098
+ }
1099
+
1100
+ class LauncherService {
1101
+ constructor(compiler, dynamicModuleService) {
1102
+ this.compiler = compiler;
1103
+ this.dynamicModuleService = dynamicModuleService;
1104
+ }
1105
+ compileModule(elements, uiDefs) {
1106
+ this.module = this.getModule(elements, uiDefs);
1107
+ return from(this.compiler.compileModuleAndAllComponentsAsync(this.module)).pipe(tap(m => {
1108
+ this.dynamicModuleService.componentFactories = m.componentFactories;
1109
+ this.moduleInstance = m;
1110
+ }));
1111
+ }
1112
+ destroy() {
1113
+ if (this.moduleInstance) {
1114
+ this.dynamicModuleService.clear();
1115
+ this.moduleInstance = undefined;
1116
+ }
1117
+ if (this.module) {
1118
+ this.compiler.clearCacheFor(this.module);
1119
+ this.module = undefined;
1120
+ }
1121
+ }
1122
+ getModule(elements, uiDef) {
1123
+ const staticComponents = [ElementChildrenComponent, ElementRendererComponent, CustomTemplateDirective];
1124
+ const elementsResolver = new ElementsResolver(uiDef, elements);
1125
+ this.dynamicModuleService.elementsTree = elementsResolver.elements;
1126
+ let DynamicModule = class DynamicModule {
1127
+ };
1128
+ DynamicModule = __decorate([
1129
+ NgModule({
1130
+ imports: [CommonModule, FormsModule, ReactiveFormsModule, FederatedModule, DragDropModule],
1131
+ declarations: [...staticComponents, ...elementsResolver.getNgComponents()],
1132
+ jit: true,
1133
+ })
1134
+ ], DynamicModule);
1135
+ return DynamicModule;
1136
+ }
1137
+ }
1138
+ LauncherService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherService, deps: [{ token: i0.Compiler }, { token: DynamicModuleService }], target: i0.ɵɵFactoryTarget.Injectable });
1139
+ LauncherService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherService });
1140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherService, decorators: [{
1141
+ type: Injectable
1142
+ }], ctorParameters: function () { return [{ type: i0.Compiler }, { type: DynamicModuleService }]; } });
1143
+
1144
+ class PreviewComponent {
1145
+ constructor(launcherService, configurationService, messageService, runtimeService, integrationState) {
1146
+ this.launcherService = launcherService;
1147
+ this.configurationService = configurationService;
1148
+ this.messageService = messageService;
1149
+ this.runtimeService = runtimeService;
1150
+ this.integrationState = integrationState;
1151
+ this.clearState = true;
1152
+ this.state$ = new BehaviorSubject({ loading: true, failure: false });
1153
+ this.elements = [];
1154
+ this.destroy$ = new Subject();
1155
+ }
1156
+ ngOnInit() {
1157
+ this.startPreview();
1158
+ }
1159
+ ngOnDestroy() {
1160
+ this.destroy$.next();
1161
+ this.destroy$.complete();
1162
+ this.configurationService.reset();
1163
+ if (this.clearState) {
1164
+ this.integrationState.clear();
1165
+ }
1166
+ }
1167
+ initializeConfiguration$() {
1168
+ const isAlreadyInitialized = this.runtimeService.isInitialized;
1169
+ if (!this.uiDefinition || this.uiDefinition.type !== 'CONFIGURATION' || isAlreadyInitialized) {
1170
+ return of({});
1171
+ }
1172
+ if (!this.modelId) {
1173
+ console.warn(`No modelId is given for uiDefinition with '${this.uiDefinition.type}' type`);
1174
+ return of({});
1175
+ }
1176
+ // If still not initialized - init configuration in Test mode
1177
+ return this.runtimeService
1178
+ .initTestMode(this.modelId, this.uiDefinition)
1179
+ .pipe(switchMap(() => this.configurationService.configure()));
1180
+ }
1181
+ elementToMetadataSafe(elements) {
1182
+ var _a, _b;
1183
+ try {
1184
+ return elements.map(element => elementToMetadata(element));
1185
+ }
1186
+ catch (e) {
1187
+ console.error(e);
1188
+ if (!((_b = (_a = this.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.suppressToastMessages)) {
1189
+ this.messageService.add({ severity: 'error', summary: String(e) });
1190
+ }
1191
+ return [];
1192
+ }
1193
+ }
1194
+ startPreview() {
1195
+ if (!this.uiDefinition) {
1196
+ return;
1197
+ }
1198
+ const _a = this.uiDefinition, { children } = _a, uiDefinitionMeta = __rest(_a, ["children"]);
1199
+ this.elements = this.elementToMetadataSafe(children);
1200
+ const compilation$ = this.launcherService.compileModule(this.elements, uiDefinitionMeta);
1201
+ forkJoin([compilation$, this.initializeConfiguration$()])
1202
+ .pipe(tap(() => this.state$.next({ loading: false, failure: false })), catchError(error => {
1203
+ var _a, _b;
1204
+ console.error(error);
1205
+ if (!((_b = (_a = this.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.suppressToastMessages)) {
1206
+ this.messageService.add({ severity: 'error', summary: error });
1207
+ }
1208
+ this.state$.next({ loading: false, failure: true });
1209
+ return of();
1210
+ }), takeUntil(this.destroy$))
1211
+ .subscribe();
1212
+ }
1213
+ }
1214
+ PreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreviewComponent, deps: [{ token: LauncherService }, { token: i2.ConfigurationService }, { token: i3.MessageService }, { token: i2.ConfigurationRuntimeService }, { token: IntegrationState }], target: i0.ɵɵFactoryTarget.Component });
1215
+ PreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: PreviewComponent, selector: "vl-cms-preview", inputs: { modelId: "modelId", uiDefinition: "uiDefinition", clearState: "clearState" }, providers: [IOProviderService, TemplatesService], ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-element-renderer *ngFor=\"let el of elements\" [meta]=\"el\"></vl-cms-element-renderer>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [":host{flex-grow:1;display:flex;flex-direction:column;height:100%}\n"], components: [{ type: i1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: ["meta"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i7.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
1216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreviewComponent, decorators: [{
1217
+ type: Component,
1218
+ args: [{
1219
+ selector: 'vl-cms-preview',
1220
+ templateUrl: './preview.component.html',
1221
+ styleUrls: ['./preview.component.scss'],
1222
+ changeDetection: ChangeDetectionStrategy.OnPush,
1223
+ providers: [IOProviderService, TemplatesService],
1224
+ // use shadow DOM to prevent UI from being affected by global styles
1225
+ encapsulation: ViewEncapsulation.ShadowDom,
1226
+ }]
1227
+ }], ctorParameters: function () { return [{ type: LauncherService }, { type: i2.ConfigurationService }, { type: i3.MessageService }, { type: i2.ConfigurationRuntimeService }, { type: IntegrationState }]; }, propDecorators: { modelId: [{
1228
+ type: Input
1229
+ }], uiDefinition: [{
1230
+ type: Input
1231
+ }], clearState: [{
1232
+ type: Input
1233
+ }] } });
1234
+
1235
+ class ElementRendererModule {
1236
+ }
1237
+ ElementRendererModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementRendererModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1238
+ ElementRendererModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementRendererModule, declarations: [ElementRendererComponent], exports: [ElementRendererComponent] });
1239
+ ElementRendererModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementRendererModule });
1240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementRendererModule, decorators: [{
1241
+ type: NgModule,
1242
+ args: [{
1243
+ declarations: [ElementRendererComponent],
1244
+ exports: [ElementRendererComponent],
1245
+ }]
1246
+ }] });
1247
+
1248
+ class ElementChildrenModule {
1249
+ }
1250
+ ElementChildrenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementChildrenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1251
+ ElementChildrenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [ElementRendererModule], exports: [ElementChildrenComponent] });
1252
+ ElementChildrenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementChildrenModule, imports: [[ElementRendererModule]] });
1253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementChildrenModule, decorators: [{
1254
+ type: NgModule,
1255
+ args: [{
1256
+ declarations: [ElementChildrenComponent],
1257
+ imports: [ElementRendererModule],
1258
+ exports: [ElementChildrenComponent],
1259
+ }]
1260
+ }] });
1261
+
1262
+ class PreviewModule {
1263
+ }
1264
+ PreviewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1265
+ PreviewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreviewModule, declarations: [PreviewComponent], imports: [CommonModule, LoaderModule, ElementRendererModule, ElementChildrenModule], exports: [PreviewComponent] });
1266
+ PreviewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreviewModule, providers: [IntegrationState], imports: [[CommonModule, LoaderModule, ElementRendererModule, ElementChildrenModule]] });
1267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreviewModule, decorators: [{
1268
+ type: NgModule,
1269
+ args: [{
1270
+ declarations: [PreviewComponent],
1271
+ imports: [CommonModule, LoaderModule, ElementRendererModule, ElementChildrenModule],
1272
+ providers: [IntegrationState],
1273
+ exports: [PreviewComponent],
1274
+ }]
1275
+ }] });
1276
+
1277
+ function ElementDefinition(definition) {
1278
+ return function (constructor) {
1279
+ return constructor;
1280
+ };
1281
+ }
1282
+
1283
+ class LauncherModule {
1284
+ }
1285
+ LauncherModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1286
+ LauncherModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherModule, imports: [CommonModule, CoreModule, ApiModule, SdkCoreModule] });
1287
+ LauncherModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherModule, providers: [LauncherService, IntegrationState, DynamicModuleService, DialogService], imports: [[CommonModule, CoreModule, ApiModule, SdkCoreModule]] });
1288
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherModule, decorators: [{
1289
+ type: NgModule,
1290
+ args: [{
1291
+ imports: [CommonModule, CoreModule, ApiModule, SdkCoreModule],
1292
+ providers: [LauncherService, IntegrationState, DynamicModuleService, DialogService],
1293
+ }]
1294
+ }] });
1295
+
1296
+ /**
1297
+ * Generated bundle index. Do not edit.
1298
+ */
1299
+
1300
+ export { ApplyProductConfigurationAction, ConfigureProductAction, DEFAULT_PLUGINS_TOKEN, ELEMENT_CONFIG, ELEMENT_METADATA, ElementComponent, ElementDefinition, ElementsResolver, FlowAction, IntegrationState, LauncherModule, LauncherService, NavigateBackAction, PreviewComponent, PreviewModule, SHARED_ELEMENT_METADATA, TemplatesService, UI_DEFINITION_METADATA, UiBuildError, VENDOR_MAP, doesElementSupportIO, elementToMetadata, extendElementMetadata, extractElementMetadata, findElementByModule, getAbsolutePath, getElementConfig, isValidScript, metadataToElement, normalizeElementMetadata, parseBoundPath, parsePath, stringifyElementMetadata };
1301
+ //# sourceMappingURL=veloce-sdk-cms.js.map