@odx/angular 1.0.0-rc.2 → 1.0.0-rc.20

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 (816) hide show
  1. package/README.md +6 -7
  2. package/animations/index.d.ts +1 -0
  3. package/animations/lib/wait-for-child-animations.d.ts +1 -0
  4. package/cdk/a11y/README.md +3 -0
  5. package/cdk/a11y/index.d.ts +2 -0
  6. package/cdk/a11y/lib/a11y.module.d.ts +11 -0
  7. package/cdk/a11y/lib/directives/index.d.ts +3 -0
  8. package/cdk/a11y/lib/directives/interactive.directive.d.ts +11 -0
  9. package/cdk/a11y/lib/directives/list-focus-manager-option.directive.d.ts +10 -0
  10. package/cdk/a11y/lib/directives/list-focus-manager.directive.d.ts +12 -0
  11. package/cdk/active-indicator/README.md +3 -0
  12. package/cdk/active-indicator/index.d.ts +2 -0
  13. package/cdk/active-indicator/lib/active-indicator.directive.d.ts +25 -0
  14. package/cdk/active-indicator/lib/models/active-indicator-direction.d.ts +5 -0
  15. package/cdk/active-indicator/lib/models/active-indicator-position.d.ts +6 -0
  16. package/cdk/active-indicator/lib/models/index.d.ts +2 -0
  17. package/cdk/checkbox-control/lib/checkbox-control.directive.d.ts +4 -3
  18. package/cdk/connected-overlay/README.md +3 -0
  19. package/cdk/connected-overlay/index.d.ts +3 -0
  20. package/cdk/connected-overlay/lib/connected-overlay.component.d.ts +28 -0
  21. package/cdk/connected-overlay/lib/connected-overlay.service.d.ts +10 -0
  22. package/cdk/connected-overlay/lib/helpers/compute-overlay-position.d.ts +3 -0
  23. package/cdk/connected-overlay/lib/helpers/index.d.ts +1 -0
  24. package/cdk/connected-overlay/lib/models/connected-overlay-options.d.ts +25 -0
  25. package/cdk/connected-overlay/lib/models/connected-overlay-ref.d.ts +12 -0
  26. package/cdk/connected-overlay/lib/models/index.d.ts +2 -0
  27. package/cdk/custom-form-control/lib/control.directive.d.ts +1 -1
  28. package/cdk/custom-form-control/lib/custom-form-control.d.ts +8 -14
  29. package/cdk/dynamic-view/lib/dynamic-view.component.d.ts +4 -4
  30. package/cdk/dynamic-view/lib/dynamic-view.directive.d.ts +3 -1
  31. package/cdk/dynamic-view/lib/dynamic-view.service.d.ts +1 -0
  32. package/cdk/dynamic-view/lib/facade/dynamic-content.d.ts +3 -3
  33. package/cdk/dynamic-view/lib/facade/dynamic-view-ref.d.ts +1 -0
  34. package/cdk/dynamic-view/lib/helpers/create-projectable-nodes.d.ts +2 -0
  35. package/cdk/dynamic-view/lib/helpers/index.d.ts +1 -0
  36. package/cdk/dynamic-view/lib/models/dynamic-component-ref.d.ts +2 -0
  37. package/cdk/dynamic-view/lib/models/dynamic-template-ref.d.ts +1 -0
  38. package/cdk/dynamic-view/lib/models/dynamic-view-options.d.ts +7 -3
  39. package/cdk/dynamic-view/lib/tokens/dynamic-view-default-host.d.ts +3 -0
  40. package/cdk/dynamic-view/lib/tokens/index.d.ts +1 -0
  41. package/cdk/expandable/index.d.ts +1 -0
  42. package/cdk/expandable/lib/directives/expandable-item.directive.d.ts +2 -2
  43. package/cdk/expandable/lib/directives/extandable-container.directive.d.ts +2 -2
  44. package/cdk/expandable/lib/expandable.tokens.d.ts +3 -0
  45. package/cdk/expandable/lib/facade/expandable-container.d.ts +4 -4
  46. package/cdk/expandable/lib/facade/expandable-item.d.ts +6 -6
  47. package/cdk/radio-group-control/lib/radio-control.directive.d.ts +1 -1
  48. package/cdk/radio-group-control/lib/radio-group-control.directive.d.ts +3 -2
  49. package/components/accordion/lib/accordion.component.d.ts +1 -1
  50. package/components/accordion/lib/components/accordion-item/accordion-item.component.d.ts +1 -1
  51. package/components/accordion/lib/directives/accordion-item-title.d.ts +1 -1
  52. package/components/action-group/action-group.component.d.ts +1 -1
  53. package/components/area-header/area-header.component.d.ts +1 -1
  54. package/components/area-header/directives/area-header-content.directive.d.ts +1 -1
  55. package/components/area-header/directives/area-header-subtitle.directive.d.ts +1 -1
  56. package/components/area-header/models/area-header-size.d.ts +1 -1
  57. package/components/avatar/lib/avatar.component.d.ts +3 -2
  58. package/components/avatar/lib/models/avatar-size.d.ts +1 -1
  59. package/components/avatar/lib/models/avatar-variant.d.ts +5 -0
  60. package/components/avatar/lib/models/index.d.ts +1 -0
  61. package/components/badge/lib/badge.component.d.ts +7 -17
  62. package/components/badge/lib/badge.directive.d.ts +17 -13
  63. package/components/badge/lib/models/badge-variant.d.ts +1 -1
  64. package/components/badge/lib/models/index.d.ts +0 -1
  65. package/components/bar/README.md +3 -0
  66. package/components/bar/index.d.ts +5 -0
  67. package/components/bar/lib/bar.component.d.ts +6 -0
  68. package/components/bar/lib/bar.module.d.ts +10 -0
  69. package/components/bar/lib/directives/bar-button.directive.d.ts +10 -0
  70. package/components/bar/lib/directives/bar-label.directive.d.ts +6 -0
  71. package/components/bar/lib/models/bar-button-variant.d.ts +5 -0
  72. package/components/breadcrumbs/README.md +3 -0
  73. package/components/breadcrumbs/index.d.ts +1 -0
  74. package/components/breadcrumbs/lib/breadcrumbs.component.d.ts +17 -0
  75. package/components/button/lib/button.component.d.ts +3 -4
  76. package/components/button/lib/models/button-size.d.ts +1 -1
  77. package/components/button/lib/models/button-variant.d.ts +1 -1
  78. package/components/button-group/lib/button-group.component.d.ts +1 -1
  79. package/components/checkbox/index.d.ts +2 -0
  80. package/components/checkbox/lib/checkbox.component.d.ts +2 -1
  81. package/components/checkbox/lib/checkbox.module.d.ts +9 -0
  82. package/components/checkbox/lib/checkbox.validator.d.ts +6 -0
  83. package/components/chip/README.md +3 -0
  84. package/components/chip/index.d.ts +2 -0
  85. package/components/chip/lib/chip.component.d.ts +15 -0
  86. package/components/chip/lib/models/chip-size.d.ts +5 -0
  87. package/components/chip/lib/models/chip-variant.d.ts +7 -0
  88. package/components/chip/lib/models/index.d.ts +2 -0
  89. package/components/circular-progress/README.md +3 -0
  90. package/components/circular-progress/index.d.ts +2 -0
  91. package/components/circular-progress/lib/circular-progress.component.d.ts +29 -0
  92. package/components/circular-progress/lib/models/circular-progress-size.d.ts +7 -0
  93. package/components/circular-progress/lib/models/index.d.ts +1 -0
  94. package/components/content-box/lib/content-box.component.d.ts +1 -1
  95. package/components/content-box/lib/directives/content-box-footer-directive.d.ts +1 -1
  96. package/components/content-box/lib/directives/content-box-header-directive.d.ts +1 -1
  97. package/components/dropdown/README.md +3 -0
  98. package/components/dropdown/index.d.ts +5 -0
  99. package/components/dropdown/lib/dropdown.component.d.ts +12 -0
  100. package/components/dropdown/lib/dropdown.directive.d.ts +42 -0
  101. package/components/dropdown/lib/dropdown.module.d.ts +8 -0
  102. package/components/dropdown/lib/helpers/close-current-dropdown.d.ts +1 -0
  103. package/components/dropdown/lib/helpers/index.d.ts +1 -0
  104. package/components/dropdown/lib/models/close-dropdown-event.d.ts +4 -0
  105. package/components/dropdown/lib/models/dropdown-options.d.ts +3 -0
  106. package/components/dropdown/lib/models/index.d.ts +2 -0
  107. package/components/form-field/index.d.ts +1 -0
  108. package/components/form-field/lib/components/form-field-info/form-field-info.component.d.ts +1 -1
  109. package/components/form-field/lib/components/form-group/form-group.component.d.ts +1 -2
  110. package/components/form-field/lib/directives/form-field-control.directive.d.ts +3 -4
  111. package/components/form-field/lib/directives/form-field-error.directive.d.ts +1 -1
  112. package/components/form-field/lib/directives/form-field-hint.directive.d.ts +1 -1
  113. package/components/form-field/lib/directives/form-field-label.directive.d.ts +1 -1
  114. package/components/form-field/lib/directives/form.directive.d.ts +1 -1
  115. package/components/form-field/lib/form-field.component.d.ts +8 -2
  116. package/components/form-field/lib/form-field.config.d.ts +3 -7
  117. package/components/form-field/lib/form-field.module.d.ts +0 -4
  118. package/components/form-field/lib/models/form-field-error-resolver.d.ts +1 -1
  119. package/components/form-field/lib/models/form-field-error.d.ts +1 -0
  120. package/components/form-field/lib/models/form-field-variant.d.ts +5 -0
  121. package/components/form-field/lib/models/index.d.ts +1 -0
  122. package/components/form-field/lib/services/form-field-error.service.d.ts +1 -0
  123. package/components/header/lib/directives/header-avatar.directive.d.ts +5 -2
  124. package/components/header/lib/directives/header-title.directive.d.ts +1 -1
  125. package/components/header/lib/header.component.d.ts +1 -1
  126. package/components/header/lib/header.module.d.ts +2 -3
  127. package/components/icon/lib/icon.component.d.ts +1 -1
  128. package/components/icon/lib/models/icon-size.d.ts +2 -1
  129. package/components/inline-message/README.md +3 -0
  130. package/components/inline-message/index.d.ts +2 -0
  131. package/components/inline-message/lib/inline-message.component.d.ts +9 -0
  132. package/components/inline-message/lib/models/index.d.ts +1 -0
  133. package/components/inline-message/lib/models/inline-message-variant.d.ts +7 -0
  134. package/components/launch-tile/README.md +3 -0
  135. package/components/launch-tile/index.d.ts +3 -0
  136. package/components/launch-tile/lib/components/index.d.ts +2 -0
  137. package/components/launch-tile/lib/components/launch-tile-footer/launch-tile-footer.component.d.ts +5 -0
  138. package/components/launch-tile/lib/components/launch-tile-subtitle/launch-tile-subtitle.component.d.ts +5 -0
  139. package/components/launch-tile/lib/launch-tile.component.d.ts +17 -0
  140. package/components/launch-tile/lib/launch-tile.module.d.ts +14 -0
  141. package/components/link/link.directive.d.ts +2 -4
  142. package/components/list/README.md +3 -0
  143. package/components/list/index.d.ts +3 -0
  144. package/components/list/lib/components/index.d.ts +1 -0
  145. package/components/list/lib/components/list-item/list-item.component.d.ts +12 -0
  146. package/components/list/lib/list.component.d.ts +6 -0
  147. package/components/list/lib/list.module.d.ts +9 -0
  148. package/components/loading-spinner/README.md +3 -0
  149. package/components/loading-spinner/index.d.ts +3 -0
  150. package/components/loading-spinner/lib/loading-spinner.component.d.ts +15 -0
  151. package/components/loading-spinner/lib/loading-spinner.directive.d.ts +27 -0
  152. package/components/loading-spinner/lib/loading-spinner.module.d.ts +9 -0
  153. package/components/logo/logo.directive.d.ts +1 -1
  154. package/components/logo/models/logo-size.d.ts +1 -1
  155. package/components/logo/models/logo-variant.d.ts +1 -1
  156. package/components/main-menu/lib/directives/main-menu-button.directive.d.ts +1 -1
  157. package/components/main-menu/lib/directives/main-menu-item.directive.d.ts +9 -4
  158. package/components/main-menu/lib/main-menu.component.d.ts +3 -1
  159. package/components/menu/README.md +3 -0
  160. package/components/menu/index.d.ts +4 -0
  161. package/components/menu/lib/directives/index.d.ts +1 -0
  162. package/components/menu/lib/directives/menu-item.directive.d.ts +8 -0
  163. package/components/menu/lib/menu.component.d.ts +11 -0
  164. package/components/menu/lib/menu.directive.d.ts +16 -0
  165. package/components/menu/lib/menu.module.d.ts +10 -0
  166. package/components/modal/index.d.ts +0 -1
  167. package/components/modal/lib/components/basic-modal/basic-modal.component.d.ts +10 -0
  168. package/components/modal/lib/components/index.d.ts +2 -0
  169. package/components/modal/lib/components/modal-footer/modal-footer.component.d.ts +1 -1
  170. package/components/modal/lib/components/modal-header/modal-header.component.d.ts +2 -1
  171. package/components/modal/lib/components/modal-hero/modal-hero.component.d.ts +11 -0
  172. package/components/modal/lib/directives/modal-close.directive.d.ts +2 -2
  173. package/components/modal/lib/directives/modal-content.directive.d.ts +1 -1
  174. package/components/modal/lib/directives/modal-dismiss.directive.d.ts +1 -1
  175. package/components/modal/lib/helpers/inject-modal-ref.d.ts +1 -1
  176. package/components/modal/lib/modal.component.d.ts +11 -6
  177. package/components/modal/lib/modal.config.d.ts +2 -2
  178. package/components/modal/lib/modal.directive.d.ts +8 -4
  179. package/components/modal/lib/modal.module.d.ts +9 -12
  180. package/components/modal/lib/modal.service.d.ts +9 -6
  181. package/components/modal/lib/models/basic-modal-options.d.ts +17 -0
  182. package/components/modal/lib/models/index.d.ts +3 -0
  183. package/components/modal/lib/models/modal-hero-variant.d.ts +7 -0
  184. package/components/modal/lib/models/modal-options.d.ts +3 -1
  185. package/components/modal/lib/models/modal-ref.d.ts +9 -5
  186. package/components/modal/lib/models/modal-size.d.ts +2 -1
  187. package/components/modal/lib/models/modal-type.d.ts +1 -1
  188. package/components/modal/lib/models/modal-variant.d.ts +5 -0
  189. package/components/progress/README.md +3 -0
  190. package/components/progress/index.d.ts +1 -0
  191. package/components/progress/lib/progress.component.d.ts +14 -0
  192. package/components/radio-group/lib/components/radio-button/radio-button.component.d.ts +2 -2
  193. package/components/radio-group/lib/radio-group.component.d.ts +1 -1
  194. package/components/rail-navigation/README.md +3 -0
  195. package/components/rail-navigation/index.d.ts +3 -0
  196. package/components/rail-navigation/lib/components/rail-navigation-item.component.d.ts +13 -0
  197. package/components/rail-navigation/lib/rail-navigation.component.d.ts +14 -0
  198. package/components/rail-navigation/lib/rail-navigation.module.d.ts +9 -0
  199. package/components/select/README.md +3 -0
  200. package/components/select/index.d.ts +7 -0
  201. package/components/select/lib/abstract/index.d.ts +2 -0
  202. package/components/select/lib/abstract/select-control-option.d.ts +9 -0
  203. package/components/select/lib/abstract/select-control.d.ts +12 -0
  204. package/components/select/lib/components/index.d.ts +1 -0
  205. package/components/select/lib/components/option/option.component.d.ts +27 -0
  206. package/components/select/lib/directives/index.d.ts +1 -0
  207. package/components/select/lib/directives/select-search-field.directive.d.ts +13 -0
  208. package/components/select/lib/pipes/index.d.ts +1 -0
  209. package/components/select/lib/pipes/select-search-filter.pipe.d.ts +13 -0
  210. package/components/select/lib/select.component.d.ts +53 -0
  211. package/components/select/lib/select.module.d.ts +11 -0
  212. package/components/select/lib/select.tokens.d.ts +3 -0
  213. package/components/slider/README.md +3 -0
  214. package/components/slider/index.d.ts +1 -0
  215. package/components/slider/lib/slider.directive.d.ts +12 -0
  216. package/components/spinbox/README.md +3 -0
  217. package/components/spinbox/index.d.ts +1 -0
  218. package/components/spinbox/lib/spinbox.component.d.ts +25 -0
  219. package/components/switch/index.d.ts +2 -0
  220. package/components/switch/lib/switch.component.d.ts +2 -1
  221. package/components/switch/lib/switch.module.d.ts +9 -0
  222. package/components/switch/lib/switch.validator.d.ts +6 -0
  223. package/components/tab-bar/README.md +3 -0
  224. package/components/tab-bar/index.d.ts +4 -0
  225. package/components/tab-bar/lib/components/index.d.ts +1 -0
  226. package/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.d.ts +23 -0
  227. package/components/tab-bar/lib/models/index.d.ts +1 -0
  228. package/components/tab-bar/lib/models/tab-change-event.d.ts +5 -0
  229. package/components/tab-bar/lib/tab-bar.component.d.ts +31 -0
  230. package/components/tab-bar/lib/tab-bar.config.d.ts +3 -0
  231. package/components/tab-bar/lib/tab-bar.module.d.ts +9 -0
  232. package/components/toast/README.md +3 -0
  233. package/components/toast/index.d.ts +5 -0
  234. package/components/toast/lib/components/index.d.ts +2 -0
  235. package/components/toast/lib/components/toast-container/toast-container.component.d.ts +23 -0
  236. package/components/toast/lib/components/toast-item/toast-item.component.d.ts +20 -0
  237. package/components/toast/lib/models/index.d.ts +5 -0
  238. package/components/toast/lib/models/toast-action.d.ts +7 -0
  239. package/components/toast/lib/models/toast-ref.d.ts +7 -0
  240. package/components/toast/lib/models/toast-variant.d.ts +7 -0
  241. package/components/toast/lib/models/toast.d.ts +10 -0
  242. package/components/toast/lib/models/toast.options.d.ts +4 -0
  243. package/components/toast/lib/toast.config.d.ts +3 -0
  244. package/components/toast/lib/toast.module.d.ts +9 -0
  245. package/components/toast/lib/toast.service.d.ts +16 -0
  246. package/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.d.ts +5 -2
  247. package/components/toggle-button-group/lib/toggle-button-group.component.d.ts +11 -2
  248. package/components/tooltip/README.md +3 -0
  249. package/components/tooltip/index.d.ts +3 -0
  250. package/components/tooltip/lib/helpers/index.d.ts +1 -0
  251. package/components/tooltip/lib/helpers/resolve-tooltip-trigger-events.d.ts +2 -0
  252. package/components/tooltip/lib/models/index.d.ts +3 -0
  253. package/components/tooltip/lib/models/tooltip-options.d.ts +10 -0
  254. package/components/tooltip/lib/models/tooltip-size.d.ts +7 -0
  255. package/components/tooltip/lib/models/tooltip-trigger.d.ts +1 -0
  256. package/components/tooltip/lib/tooltip.component.d.ts +13 -0
  257. package/components/tooltip/lib/tooltip.directive.d.ts +33 -0
  258. package/esm2020/animations/index.mjs +2 -1
  259. package/esm2020/animations/lib/expand.mjs +6 -4
  260. package/esm2020/animations/lib/fade.mjs +2 -5
  261. package/esm2020/animations/lib/wait-for-child-animations.mjs +3 -0
  262. package/esm2020/cdk/a11y/index.mjs +3 -0
  263. package/esm2020/cdk/a11y/lib/a11y.module.mjs +19 -0
  264. package/esm2020/cdk/a11y/lib/directives/index.mjs +4 -0
  265. package/esm2020/cdk/a11y/lib/directives/interactive.directive.mjs +49 -0
  266. package/esm2020/cdk/a11y/lib/directives/list-focus-manager-option.directive.mjs +26 -0
  267. package/esm2020/cdk/a11y/lib/directives/list-focus-manager.directive.mjs +40 -0
  268. package/esm2020/cdk/a11y/odx-angular-cdk-a11y.mjs +5 -0
  269. package/esm2020/cdk/active-indicator/index.mjs +3 -0
  270. package/esm2020/cdk/active-indicator/lib/active-indicator.directive.mjs +128 -0
  271. package/esm2020/cdk/active-indicator/lib/models/active-indicator-direction.mjs +5 -0
  272. package/esm2020/cdk/active-indicator/lib/models/active-indicator-position.mjs +6 -0
  273. package/esm2020/cdk/active-indicator/lib/models/index.mjs +3 -0
  274. package/esm2020/cdk/active-indicator/odx-angular-cdk-active-indicator.mjs +5 -0
  275. package/esm2020/cdk/checkbox-control/lib/checkbox-control.directive.mjs +21 -19
  276. package/esm2020/cdk/connected-overlay/index.mjs +4 -0
  277. package/esm2020/cdk/connected-overlay/lib/connected-overlay.component.mjs +116 -0
  278. package/esm2020/cdk/connected-overlay/lib/connected-overlay.service.mjs +25 -0
  279. package/esm2020/cdk/connected-overlay/lib/helpers/compute-overlay-position.mjs +55 -0
  280. package/esm2020/cdk/connected-overlay/lib/helpers/index.mjs +2 -0
  281. package/esm2020/cdk/connected-overlay/lib/models/connected-overlay-options.mjs +12 -0
  282. package/esm2020/cdk/connected-overlay/lib/models/connected-overlay-ref.mjs +15 -0
  283. package/esm2020/cdk/connected-overlay/lib/models/index.mjs +3 -0
  284. package/esm2020/cdk/connected-overlay/odx-angular-cdk-connected-overlay.mjs +5 -0
  285. package/esm2020/cdk/custom-form-control/lib/control.directive.mjs +3 -3
  286. package/esm2020/cdk/custom-form-control/lib/custom-form-control.mjs +35 -59
  287. package/esm2020/cdk/dynamic-view/lib/dynamic-view.component.mjs +23 -14
  288. package/esm2020/cdk/dynamic-view/lib/dynamic-view.directive.mjs +24 -10
  289. package/esm2020/cdk/dynamic-view/lib/dynamic-view.service.mjs +11 -9
  290. package/esm2020/cdk/dynamic-view/lib/facade/dynamic-view-ref.mjs +1 -1
  291. package/esm2020/cdk/dynamic-view/lib/helpers/create-projectable-nodes.mjs +9 -0
  292. package/esm2020/cdk/dynamic-view/lib/helpers/index.mjs +2 -1
  293. package/esm2020/cdk/dynamic-view/lib/models/dynamic-component-ref.mjs +29 -8
  294. package/esm2020/cdk/dynamic-view/lib/models/dynamic-template-ref.mjs +12 -6
  295. package/esm2020/cdk/dynamic-view/lib/models/dynamic-view-options.mjs +1 -1
  296. package/esm2020/cdk/dynamic-view/lib/tokens/dynamic-view-default-host.mjs +10 -0
  297. package/esm2020/cdk/dynamic-view/lib/tokens/index.mjs +2 -1
  298. package/esm2020/cdk/expandable/index.mjs +2 -1
  299. package/esm2020/cdk/expandable/lib/directives/expandable-item.directive.mjs +7 -8
  300. package/esm2020/cdk/expandable/lib/directives/extandable-container.directive.mjs +5 -7
  301. package/esm2020/cdk/expandable/lib/expandable.module.mjs +4 -4
  302. package/esm2020/cdk/expandable/lib/expandable.tokens.mjs +3 -0
  303. package/esm2020/cdk/expandable/lib/facade/expandable-container.mjs +2 -3
  304. package/esm2020/cdk/expandable/lib/facade/expandable-item.mjs +2 -3
  305. package/esm2020/cdk/radio-group-control/lib/radio-control.directive.mjs +12 -12
  306. package/esm2020/cdk/radio-group-control/lib/radio-group-control.directive.mjs +14 -10
  307. package/esm2020/cdk/radio-group-control/lib/radio-group-control.module.mjs +4 -4
  308. package/esm2020/components/accordion/lib/accordion.component.mjs +7 -7
  309. package/esm2020/components/accordion/lib/accordion.module.mjs +4 -4
  310. package/esm2020/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +8 -6
  311. package/esm2020/components/accordion/lib/directives/accordion-item-title.mjs +3 -3
  312. package/esm2020/components/action-group/action-group.component.mjs +5 -5
  313. package/esm2020/components/area-header/area-header.component.mjs +6 -5
  314. package/esm2020/components/area-header/area-header.module.mjs +4 -4
  315. package/esm2020/components/area-header/directives/area-header-content.directive.mjs +3 -3
  316. package/esm2020/components/area-header/directives/area-header-subtitle.directive.mjs +3 -3
  317. package/esm2020/components/avatar/lib/avatar.component.mjs +14 -8
  318. package/esm2020/components/avatar/lib/models/avatar-variant.mjs +5 -0
  319. package/esm2020/components/avatar/lib/models/index.mjs +2 -1
  320. package/esm2020/components/badge/lib/badge.component.mjs +18 -65
  321. package/esm2020/components/badge/lib/badge.directive.mjs +50 -25
  322. package/esm2020/components/badge/lib/models/index.mjs +1 -2
  323. package/esm2020/components/bar/index.mjs +6 -0
  324. package/esm2020/components/bar/lib/bar.component.mjs +21 -0
  325. package/esm2020/components/bar/lib/bar.module.mjs +20 -0
  326. package/esm2020/components/bar/lib/directives/bar-button.directive.mjs +38 -0
  327. package/esm2020/components/bar/lib/directives/bar-label.directive.mjs +24 -0
  328. package/esm2020/components/bar/lib/models/bar-button-variant.mjs +5 -0
  329. package/esm2020/components/bar/odx-angular-components-bar.mjs +5 -0
  330. package/esm2020/components/breadcrumbs/index.mjs +2 -0
  331. package/esm2020/components/breadcrumbs/lib/breadcrumbs.component.mjs +50 -0
  332. package/esm2020/components/breadcrumbs/odx-angular-components-breadcrumbs.mjs +5 -0
  333. package/esm2020/components/button/lib/button.component.mjs +12 -18
  334. package/esm2020/components/button-group/lib/button-group.component.mjs +3 -3
  335. package/esm2020/components/checkbox/index.mjs +3 -1
  336. package/esm2020/components/checkbox/lib/checkbox.component.mjs +8 -7
  337. package/esm2020/components/checkbox/lib/checkbox.module.mjs +19 -0
  338. package/esm2020/components/checkbox/lib/checkbox.validator.mjs +28 -0
  339. package/esm2020/components/chip/index.mjs +3 -0
  340. package/esm2020/components/chip/lib/chip.component.mjs +54 -0
  341. package/esm2020/components/chip/lib/models/chip-size.mjs +5 -0
  342. package/esm2020/components/chip/lib/models/chip-variant.mjs +7 -0
  343. package/esm2020/components/chip/lib/models/index.mjs +3 -0
  344. package/esm2020/components/chip/odx-angular-components-chip.mjs +5 -0
  345. package/esm2020/components/circular-progress/index.mjs +3 -0
  346. package/esm2020/components/circular-progress/lib/circular-progress.component.mjs +98 -0
  347. package/esm2020/components/circular-progress/lib/models/circular-progress-size.mjs +7 -0
  348. package/esm2020/components/circular-progress/lib/models/index.mjs +2 -0
  349. package/esm2020/components/circular-progress/odx-angular-components-circular-progress.mjs +5 -0
  350. package/esm2020/components/content-box/lib/content-box.component.mjs +3 -3
  351. package/esm2020/components/content-box/lib/content-box.module.mjs +4 -4
  352. package/esm2020/components/content-box/lib/directives/content-box-footer-directive.mjs +3 -3
  353. package/esm2020/components/content-box/lib/directives/content-box-header-directive.mjs +3 -3
  354. package/esm2020/components/dropdown/index.mjs +6 -0
  355. package/esm2020/components/dropdown/lib/dropdown.component.mjs +40 -0
  356. package/esm2020/components/dropdown/lib/dropdown.directive.mjs +157 -0
  357. package/esm2020/components/dropdown/lib/dropdown.module.mjs +18 -0
  358. package/esm2020/components/dropdown/lib/helpers/close-current-dropdown.mjs +5 -0
  359. package/esm2020/components/dropdown/lib/helpers/index.mjs +2 -0
  360. package/esm2020/components/dropdown/lib/models/close-dropdown-event.mjs +7 -0
  361. package/esm2020/components/dropdown/lib/models/dropdown-options.mjs +8 -0
  362. package/esm2020/components/dropdown/lib/models/index.mjs +3 -0
  363. package/esm2020/components/dropdown/odx-angular-components-dropdown.mjs +5 -0
  364. package/esm2020/components/form-field/index.mjs +2 -1
  365. package/esm2020/components/form-field/lib/components/form-field-info/form-field-info.component.mjs +3 -3
  366. package/esm2020/components/form-field/lib/components/form-group/form-group.component.mjs +11 -13
  367. package/esm2020/components/form-field/lib/directives/form-field-control.directive.mjs +22 -15
  368. package/esm2020/components/form-field/lib/directives/form-field-error.directive.mjs +3 -3
  369. package/esm2020/components/form-field/lib/directives/form-field-hint.directive.mjs +3 -3
  370. package/esm2020/components/form-field/lib/directives/form-field-label.directive.mjs +3 -3
  371. package/esm2020/components/form-field/lib/directives/form.directive.mjs +3 -3
  372. package/esm2020/components/form-field/lib/form-field.component.mjs +31 -13
  373. package/esm2020/components/form-field/lib/form-field.config.mjs +4 -4
  374. package/esm2020/components/form-field/lib/form-field.module.mjs +5 -13
  375. package/esm2020/components/form-field/lib/form-field.service.mjs +3 -3
  376. package/esm2020/components/form-field/lib/models/form-field-error.mjs +1 -1
  377. package/esm2020/components/form-field/lib/models/form-field-variant.mjs +5 -0
  378. package/esm2020/components/form-field/lib/models/index.mjs +2 -1
  379. package/esm2020/components/form-field/lib/services/form-field-error.service.mjs +16 -16
  380. package/esm2020/components/header/lib/directives/header-avatar.directive.mjs +13 -6
  381. package/esm2020/components/header/lib/directives/header-title.directive.mjs +3 -3
  382. package/esm2020/components/header/lib/header.component.mjs +5 -6
  383. package/esm2020/components/header/lib/header.module.mjs +7 -11
  384. package/esm2020/components/icon/lib/icon.component.mjs +3 -3
  385. package/esm2020/components/icon/lib/models/icon-size.mjs +2 -1
  386. package/esm2020/components/inline-message/index.mjs +3 -0
  387. package/esm2020/components/inline-message/lib/inline-message.component.mjs +42 -0
  388. package/esm2020/components/inline-message/lib/models/index.mjs +2 -0
  389. package/esm2020/components/inline-message/lib/models/inline-message-variant.mjs +7 -0
  390. package/esm2020/components/inline-message/odx-angular-components-inline-message.mjs +5 -0
  391. package/esm2020/components/launch-tile/index.mjs +4 -0
  392. package/esm2020/components/launch-tile/lib/components/index.mjs +3 -0
  393. package/esm2020/components/launch-tile/lib/components/launch-tile-footer/launch-tile-footer.component.mjs +13 -0
  394. package/esm2020/components/launch-tile/lib/components/launch-tile-subtitle/launch-tile-subtitle.component.mjs +13 -0
  395. package/esm2020/components/launch-tile/lib/launch-tile.component.mjs +56 -0
  396. package/esm2020/components/launch-tile/lib/launch-tile.module.mjs +23 -0
  397. package/esm2020/components/launch-tile/odx-angular-components-launch-tile.mjs +5 -0
  398. package/esm2020/components/link/link.directive.mjs +7 -14
  399. package/esm2020/components/list/index.mjs +4 -0
  400. package/esm2020/components/list/lib/components/index.mjs +2 -0
  401. package/esm2020/components/list/lib/components/list-item/list-item.component.mjs +40 -0
  402. package/esm2020/components/list/lib/list.component.mjs +21 -0
  403. package/esm2020/components/list/lib/list.module.mjs +19 -0
  404. package/esm2020/components/list/odx-angular-components-list.mjs +5 -0
  405. package/esm2020/components/loading-spinner/index.mjs +4 -0
  406. package/esm2020/components/loading-spinner/lib/loading-spinner.component.mjs +58 -0
  407. package/esm2020/components/loading-spinner/lib/loading-spinner.directive.mjs +98 -0
  408. package/esm2020/components/loading-spinner/lib/loading-spinner.module.mjs +19 -0
  409. package/esm2020/components/loading-spinner/odx-angular-components-loading-spinner.mjs +5 -0
  410. package/esm2020/components/logo/logo.directive.mjs +8 -6
  411. package/esm2020/components/main-menu/lib/directives/main-menu-button.directive.mjs +3 -3
  412. package/esm2020/components/main-menu/lib/directives/main-menu-item.directive.mjs +30 -17
  413. package/esm2020/components/main-menu/lib/main-menu.component.mjs +12 -11
  414. package/esm2020/components/main-menu/lib/main-menu.module.mjs +4 -4
  415. package/esm2020/components/main-menu/lib/main-menu.service.mjs +3 -3
  416. package/esm2020/components/menu/index.mjs +5 -0
  417. package/esm2020/components/menu/lib/directives/index.mjs +2 -0
  418. package/esm2020/components/menu/lib/directives/menu-item.directive.mjs +37 -0
  419. package/esm2020/components/menu/lib/menu.component.mjs +46 -0
  420. package/esm2020/components/menu/lib/menu.directive.mjs +54 -0
  421. package/esm2020/components/menu/lib/menu.module.mjs +20 -0
  422. package/esm2020/components/menu/odx-angular-components-menu.mjs +5 -0
  423. package/esm2020/components/modal/index.mjs +1 -2
  424. package/esm2020/components/modal/lib/components/basic-modal/basic-modal.component.mjs +42 -0
  425. package/esm2020/components/modal/lib/components/index.mjs +3 -1
  426. package/esm2020/components/modal/lib/components/modal-footer/modal-footer.component.mjs +3 -3
  427. package/esm2020/components/modal/lib/components/modal-header/modal-header.component.mjs +10 -8
  428. package/esm2020/components/modal/lib/components/modal-hero/modal-hero.component.mjs +39 -0
  429. package/esm2020/components/modal/lib/directives/modal-close.directive.mjs +10 -5
  430. package/esm2020/components/modal/lib/directives/modal-content.directive.mjs +3 -3
  431. package/esm2020/components/modal/lib/directives/modal-dismiss.directive.mjs +3 -3
  432. package/esm2020/components/modal/lib/helpers/inject-modal-ref.mjs +1 -1
  433. package/esm2020/components/modal/lib/modal.component.mjs +43 -20
  434. package/esm2020/components/modal/lib/modal.config.mjs +5 -3
  435. package/esm2020/components/modal/lib/modal.directive.mjs +24 -6
  436. package/esm2020/components/modal/lib/modal.module.mjs +33 -15
  437. package/esm2020/components/modal/lib/modal.service.mjs +47 -40
  438. package/esm2020/components/modal/lib/models/basic-modal-options.mjs +2 -0
  439. package/esm2020/components/modal/lib/models/index.mjs +4 -1
  440. package/esm2020/components/modal/lib/models/modal-hero-variant.mjs +7 -0
  441. package/esm2020/components/modal/lib/models/modal-options.mjs +1 -1
  442. package/esm2020/components/modal/lib/models/modal-ref.mjs +25 -10
  443. package/esm2020/components/modal/lib/models/modal-size.mjs +2 -1
  444. package/esm2020/components/modal/lib/models/modal-variant.mjs +5 -0
  445. package/esm2020/components/progress/index.mjs +2 -0
  446. package/esm2020/components/progress/lib/progress.component.mjs +51 -0
  447. package/esm2020/components/progress/odx-angular-components-progress.mjs +5 -0
  448. package/esm2020/components/radio-group/lib/components/radio-button/radio-button.component.mjs +8 -9
  449. package/esm2020/components/radio-group/lib/radio-group.component.mjs +9 -9
  450. package/esm2020/components/radio-group/lib/radio-group.module.mjs +4 -4
  451. package/esm2020/components/rail-navigation/index.mjs +4 -0
  452. package/esm2020/components/rail-navigation/lib/components/rail-navigation-item.component.mjs +38 -0
  453. package/esm2020/components/rail-navigation/lib/rail-navigation.component.mjs +47 -0
  454. package/esm2020/components/rail-navigation/lib/rail-navigation.module.mjs +19 -0
  455. package/esm2020/components/rail-navigation/odx-angular-components-rail-navigation.mjs +5 -0
  456. package/esm2020/components/select/index.mjs +8 -0
  457. package/esm2020/components/select/lib/abstract/index.mjs +3 -0
  458. package/esm2020/components/select/lib/abstract/select-control-option.mjs +2 -0
  459. package/esm2020/components/select/lib/abstract/select-control.mjs +2 -0
  460. package/esm2020/components/select/lib/components/index.mjs +2 -0
  461. package/esm2020/components/select/lib/components/option/option.component.mjs +96 -0
  462. package/esm2020/components/select/lib/directives/index.mjs +2 -0
  463. package/esm2020/components/select/lib/directives/select-search-field.directive.mjs +47 -0
  464. package/esm2020/components/select/lib/pipes/index.mjs +2 -0
  465. package/esm2020/components/select/lib/pipes/select-search-filter.pipe.mjs +51 -0
  466. package/esm2020/components/select/lib/select.component.mjs +219 -0
  467. package/esm2020/components/select/lib/select.module.mjs +21 -0
  468. package/esm2020/components/select/lib/select.tokens.mjs +3 -0
  469. package/esm2020/components/select/odx-angular-components-select.mjs +5 -0
  470. package/esm2020/components/slider/index.mjs +2 -0
  471. package/esm2020/components/slider/lib/slider.directive.mjs +42 -0
  472. package/esm2020/components/slider/odx-angular-components-slider.mjs +5 -0
  473. package/esm2020/components/spinbox/index.mjs +2 -0
  474. package/esm2020/components/spinbox/lib/spinbox.component.mjs +91 -0
  475. package/esm2020/components/spinbox/odx-angular-components-spinbox.mjs +5 -0
  476. package/esm2020/components/switch/index.mjs +3 -1
  477. package/esm2020/components/switch/lib/switch.component.mjs +8 -7
  478. package/esm2020/components/switch/lib/switch.module.mjs +19 -0
  479. package/esm2020/components/switch/lib/switch.validator.mjs +28 -0
  480. package/esm2020/components/tab-bar/index.mjs +5 -0
  481. package/esm2020/components/tab-bar/lib/components/index.mjs +2 -0
  482. package/esm2020/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.mjs +79 -0
  483. package/esm2020/components/tab-bar/lib/models/index.mjs +2 -0
  484. package/esm2020/components/tab-bar/lib/models/tab-change-event.mjs +2 -0
  485. package/esm2020/components/tab-bar/lib/tab-bar.component.mjs +115 -0
  486. package/esm2020/components/tab-bar/lib/tab-bar.config.mjs +3 -0
  487. package/esm2020/components/tab-bar/lib/tab-bar.module.mjs +19 -0
  488. package/esm2020/components/tab-bar/odx-angular-components-tab-bar.mjs +5 -0
  489. package/esm2020/components/toast/index.mjs +6 -0
  490. package/esm2020/components/toast/lib/components/index.mjs +3 -0
  491. package/esm2020/components/toast/lib/components/toast-container/toast-container.component.mjs +87 -0
  492. package/esm2020/components/toast/lib/components/toast-item/toast-item.component.mjs +75 -0
  493. package/esm2020/components/toast/lib/models/index.mjs +6 -0
  494. package/esm2020/components/toast/lib/models/toast-action.mjs +2 -0
  495. package/esm2020/components/toast/lib/models/toast-ref.mjs +2 -0
  496. package/esm2020/components/toast/lib/models/toast-variant.mjs +7 -0
  497. package/esm2020/components/toast/lib/models/toast.mjs +2 -0
  498. package/esm2020/components/toast/lib/models/toast.options.mjs +2 -0
  499. package/esm2020/components/toast/lib/toast.config.mjs +6 -0
  500. package/esm2020/components/toast/lib/toast.module.mjs +18 -0
  501. package/esm2020/components/toast/lib/toast.service.mjs +38 -0
  502. package/esm2020/components/toast/odx-angular-components-toast.mjs +5 -0
  503. package/esm2020/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.mjs +14 -12
  504. package/esm2020/components/toggle-button-group/lib/toggle-button-group.component.mjs +41 -13
  505. package/esm2020/components/toggle-button-group/lib/toggle-button-group.module.mjs +4 -4
  506. package/esm2020/components/tooltip/index.mjs +4 -0
  507. package/esm2020/components/tooltip/lib/helpers/index.mjs +2 -0
  508. package/esm2020/components/tooltip/lib/helpers/resolve-tooltip-trigger-events.mjs +9 -0
  509. package/esm2020/components/tooltip/lib/models/index.mjs +4 -0
  510. package/esm2020/components/tooltip/lib/models/tooltip-options.mjs +10 -0
  511. package/esm2020/components/tooltip/lib/models/tooltip-size.mjs +7 -0
  512. package/esm2020/components/tooltip/lib/models/tooltip-trigger.mjs +2 -0
  513. package/esm2020/components/tooltip/lib/tooltip.component.mjs +39 -0
  514. package/esm2020/components/tooltip/lib/tooltip.directive.mjs +132 -0
  515. package/esm2020/components/tooltip/odx-angular-components-tooltip.mjs +5 -0
  516. package/esm2020/index.mjs +2 -1
  517. package/esm2020/internal/decorators/css-component.mjs +3 -8
  518. package/esm2020/internal/decorators/css-modifier.mjs +21 -18
  519. package/esm2020/internal/helpers/decorator-property-name.mjs +4 -0
  520. package/esm2020/internal/helpers/index.mjs +2 -1
  521. package/esm2020/internal/helpers/with-mutiple-descriptors.mjs +22 -13
  522. package/esm2020/lib/controllers/controller.mjs +16 -14
  523. package/esm2020/lib/controllers/disabled.controller.mjs +29 -43
  524. package/esm2020/lib/controllers/readonly.controller.mjs +33 -23
  525. package/esm2020/lib/core.module.mjs +7 -6
  526. package/esm2020/lib/directives/click-outside.directive.mjs +17 -13
  527. package/esm2020/lib/directives/delegate-focus.directive.mjs +40 -0
  528. package/esm2020/lib/directives/index.mjs +4 -1
  529. package/esm2020/lib/directives/with-disabled-state.directive.mjs +41 -0
  530. package/esm2020/lib/directives/with-tabindex.directive.mjs +23 -0
  531. package/esm2020/lib/services/window-ref.mjs +18 -7
  532. package/esm2020/lib/tokens/identity-matcher.mjs +7 -0
  533. package/esm2020/lib/tokens/index.mjs +4 -0
  534. package/esm2020/lib/tokens/string-search-handler.mjs +9 -0
  535. package/esm2020/lib/tokens/stringify.mjs +8 -0
  536. package/esm2020/rxjs/index.mjs +4 -2
  537. package/esm2020/rxjs/lib/delay-until.mjs +5 -0
  538. package/esm2020/rxjs/lib/form-query-list.mjs +5 -0
  539. package/esm2020/rxjs/lib/from-element-resize.mjs +14 -0
  540. package/esm2020/utils/lib/decorators/index.mjs +2 -1
  541. package/esm2020/utils/lib/decorators/pure.mjs +37 -0
  542. package/esm2020/utils/lib/decorators/transform.mjs +3 -3
  543. package/esm2020/utils/lib/helpers/angular.mjs +5 -2
  544. package/esm2020/utils/lib/helpers/build-url.mjs +4 -0
  545. package/esm2020/utils/lib/helpers/defer-fn.mjs +4 -0
  546. package/esm2020/utils/lib/helpers/dom.mjs +32 -2
  547. package/esm2020/utils/lib/helpers/event-manager.mjs +30 -0
  548. package/esm2020/utils/lib/helpers/get-axis.mjs +14 -0
  549. package/esm2020/utils/lib/helpers/get-opposite-side.mjs +15 -0
  550. package/esm2020/utils/lib/helpers/get-side.mjs +4 -0
  551. package/esm2020/utils/lib/helpers/get-unique-id.mjs +7 -0
  552. package/esm2020/utils/lib/helpers/index.mjs +10 -2
  553. package/esm2020/utils/lib/helpers/provide-config.mjs +25 -0
  554. package/esm2020/utils/lib/helpers/queue.mjs +49 -0
  555. package/esm2020/utils/lib/types/axis.mjs +5 -0
  556. package/esm2020/utils/lib/types/index.mjs +4 -1
  557. package/esm2020/utils/lib/types/position.mjs +15 -0
  558. package/esm2020/utils/lib/types/side.mjs +7 -0
  559. package/fesm2015/odx-angular-animations.mjs +10 -6
  560. package/fesm2015/odx-angular-animations.mjs.map +1 -1
  561. package/fesm2015/odx-angular-cdk-a11y.mjs +131 -0
  562. package/fesm2015/odx-angular-cdk-a11y.mjs.map +1 -0
  563. package/fesm2015/odx-angular-cdk-active-indicator.mjs +145 -0
  564. package/fesm2015/odx-angular-cdk-active-indicator.mjs.map +1 -0
  565. package/fesm2015/odx-angular-cdk-checkbox-control.mjs +21 -19
  566. package/fesm2015/odx-angular-cdk-checkbox-control.mjs.map +1 -1
  567. package/fesm2015/odx-angular-cdk-connected-overlay.mjs +222 -0
  568. package/fesm2015/odx-angular-cdk-connected-overlay.mjs.map +1 -0
  569. package/fesm2015/odx-angular-cdk-custom-form-control.mjs +39 -63
  570. package/fesm2015/odx-angular-cdk-custom-form-control.mjs.map +1 -1
  571. package/fesm2015/odx-angular-cdk-dynamic-view.mjs +109 -42
  572. package/fesm2015/odx-angular-cdk-dynamic-view.mjs.map +1 -1
  573. package/fesm2015/odx-angular-cdk-expandable.mjs +16 -22
  574. package/fesm2015/odx-angular-cdk-expandable.mjs.map +1 -1
  575. package/fesm2015/odx-angular-cdk-radio-group-control.mjs +27 -24
  576. package/fesm2015/odx-angular-cdk-radio-group-control.mjs.map +1 -1
  577. package/fesm2015/odx-angular-components-accordion.mjs +20 -18
  578. package/fesm2015/odx-angular-components-accordion.mjs.map +1 -1
  579. package/fesm2015/odx-angular-components-action-group.mjs +4 -4
  580. package/fesm2015/odx-angular-components-action-group.mjs.map +1 -1
  581. package/fesm2015/odx-angular-components-area-header.mjs +15 -14
  582. package/fesm2015/odx-angular-components-area-header.mjs.map +1 -1
  583. package/fesm2015/odx-angular-components-avatar.mjs +18 -7
  584. package/fesm2015/odx-angular-components-avatar.mjs.map +1 -1
  585. package/fesm2015/odx-angular-components-badge.mjs +63 -97
  586. package/fesm2015/odx-angular-components-badge.mjs.map +1 -1
  587. package/fesm2015/odx-angular-components-bar.mjs +95 -0
  588. package/fesm2015/odx-angular-components-bar.mjs.map +1 -0
  589. package/fesm2015/odx-angular-components-breadcrumbs.mjs +56 -0
  590. package/fesm2015/odx-angular-components-breadcrumbs.mjs.map +1 -0
  591. package/fesm2015/odx-angular-components-button-group.mjs +3 -3
  592. package/fesm2015/odx-angular-components-button.mjs +11 -18
  593. package/fesm2015/odx-angular-components-button.mjs.map +1 -1
  594. package/fesm2015/odx-angular-components-checkbox.mjs +49 -8
  595. package/fesm2015/odx-angular-components-checkbox.mjs.map +1 -1
  596. package/fesm2015/odx-angular-components-chip.mjs +71 -0
  597. package/fesm2015/odx-angular-components-chip.mjs.map +1 -0
  598. package/fesm2015/odx-angular-components-circular-progress.mjs +110 -0
  599. package/fesm2015/odx-angular-components-circular-progress.mjs.map +1 -0
  600. package/fesm2015/odx-angular-components-content-box.mjs +13 -13
  601. package/fesm2015/odx-angular-components-dropdown.mjs +223 -0
  602. package/fesm2015/odx-angular-components-dropdown.mjs.map +1 -0
  603. package/fesm2015/odx-angular-components-form-field.mjs +96 -78
  604. package/fesm2015/odx-angular-components-form-field.mjs.map +1 -1
  605. package/fesm2015/odx-angular-components-header.mjs +25 -23
  606. package/fesm2015/odx-angular-components-header.mjs.map +1 -1
  607. package/fesm2015/odx-angular-components-icon.mjs +4 -3
  608. package/fesm2015/odx-angular-components-icon.mjs.map +1 -1
  609. package/fesm2015/odx-angular-components-inline-message.mjs +54 -0
  610. package/fesm2015/odx-angular-components-inline-message.mjs.map +1 -0
  611. package/fesm2015/odx-angular-components-launch-tile.mjs +100 -0
  612. package/fesm2015/odx-angular-components-launch-tile.mjs.map +1 -0
  613. package/fesm2015/odx-angular-components-link.mjs +6 -14
  614. package/fesm2015/odx-angular-components-link.mjs.map +1 -1
  615. package/fesm2015/odx-angular-components-list.mjs +76 -0
  616. package/fesm2015/odx-angular-components-list.mjs.map +1 -0
  617. package/fesm2015/odx-angular-components-loading-spinner.mjs +171 -0
  618. package/fesm2015/odx-angular-components-loading-spinner.mjs.map +1 -0
  619. package/fesm2015/odx-angular-components-logo.mjs +7 -5
  620. package/fesm2015/odx-angular-components-logo.mjs.map +1 -1
  621. package/fesm2015/odx-angular-components-main-menu.mjs +64 -53
  622. package/fesm2015/odx-angular-components-main-menu.mjs.map +1 -1
  623. package/fesm2015/odx-angular-components-menu.mjs +140 -0
  624. package/fesm2015/odx-angular-components-menu.mjs.map +1 -0
  625. package/fesm2015/odx-angular-components-modal.mjs +265 -155
  626. package/fesm2015/odx-angular-components-modal.mjs.map +1 -1
  627. package/fesm2015/odx-angular-components-progress.mjs +57 -0
  628. package/fesm2015/odx-angular-components-progress.mjs.map +1 -0
  629. package/fesm2015/odx-angular-components-radio-group.mjs +18 -19
  630. package/fesm2015/odx-angular-components-radio-group.mjs.map +1 -1
  631. package/fesm2015/odx-angular-components-rail-navigation.mjs +97 -0
  632. package/fesm2015/odx-angular-components-rail-navigation.mjs.map +1 -0
  633. package/fesm2015/odx-angular-components-select.mjs +416 -0
  634. package/fesm2015/odx-angular-components-select.mjs.map +1 -0
  635. package/fesm2015/odx-angular-components-slider.mjs +48 -0
  636. package/fesm2015/odx-angular-components-slider.mjs.map +1 -0
  637. package/fesm2015/odx-angular-components-spinbox.mjs +100 -0
  638. package/fesm2015/odx-angular-components-spinbox.mjs.map +1 -0
  639. package/fesm2015/odx-angular-components-switch.mjs +49 -8
  640. package/fesm2015/odx-angular-components-switch.mjs.map +1 -1
  641. package/fesm2015/odx-angular-components-tab-bar.mjs +209 -0
  642. package/fesm2015/odx-angular-components-tab-bar.mjs.map +1 -0
  643. package/fesm2015/odx-angular-components-toast.mjs +216 -0
  644. package/fesm2015/odx-angular-components-toast.mjs.map +1 -0
  645. package/fesm2015/odx-angular-components-toggle-button-group.mjs +58 -26
  646. package/fesm2015/odx-angular-components-toggle-button-group.mjs.map +1 -1
  647. package/fesm2015/odx-angular-components-tooltip.mjs +187 -0
  648. package/fesm2015/odx-angular-components-tooltip.mjs.map +1 -0
  649. package/fesm2015/odx-angular-internal.mjs +63 -54
  650. package/fesm2015/odx-angular-internal.mjs.map +1 -1
  651. package/fesm2015/odx-angular-rxjs.mjs +23 -6
  652. package/fesm2015/odx-angular-rxjs.mjs.map +1 -1
  653. package/fesm2015/odx-angular-utils.mjs +242 -15
  654. package/fesm2015/odx-angular-utils.mjs.map +1 -1
  655. package/fesm2015/odx-angular.mjs +231 -98
  656. package/fesm2015/odx-angular.mjs.map +1 -1
  657. package/fesm2020/odx-angular-animations.mjs +10 -9
  658. package/fesm2020/odx-angular-animations.mjs.map +1 -1
  659. package/fesm2020/odx-angular-cdk-a11y.mjs +127 -0
  660. package/fesm2020/odx-angular-cdk-a11y.mjs.map +1 -0
  661. package/fesm2020/odx-angular-cdk-active-indicator.mjs +143 -0
  662. package/fesm2020/odx-angular-cdk-active-indicator.mjs.map +1 -0
  663. package/fesm2020/odx-angular-cdk-checkbox-control.mjs +21 -19
  664. package/fesm2020/odx-angular-cdk-checkbox-control.mjs.map +1 -1
  665. package/fesm2020/odx-angular-cdk-connected-overlay.mjs +218 -0
  666. package/fesm2020/odx-angular-cdk-connected-overlay.mjs.map +1 -0
  667. package/fesm2020/odx-angular-cdk-custom-form-control.mjs +37 -61
  668. package/fesm2020/odx-angular-cdk-custom-form-control.mjs.map +1 -1
  669. package/fesm2020/odx-angular-cdk-dynamic-view.mjs +102 -37
  670. package/fesm2020/odx-angular-cdk-dynamic-view.mjs.map +1 -1
  671. package/fesm2020/odx-angular-cdk-expandable.mjs +16 -22
  672. package/fesm2020/odx-angular-cdk-expandable.mjs.map +1 -1
  673. package/fesm2020/odx-angular-cdk-radio-group-control.mjs +27 -24
  674. package/fesm2020/odx-angular-cdk-radio-group-control.mjs.map +1 -1
  675. package/fesm2020/odx-angular-components-accordion.mjs +20 -18
  676. package/fesm2020/odx-angular-components-accordion.mjs.map +1 -1
  677. package/fesm2020/odx-angular-components-action-group.mjs +4 -4
  678. package/fesm2020/odx-angular-components-action-group.mjs.map +1 -1
  679. package/fesm2020/odx-angular-components-area-header.mjs +15 -14
  680. package/fesm2020/odx-angular-components-area-header.mjs.map +1 -1
  681. package/fesm2020/odx-angular-components-avatar.mjs +18 -7
  682. package/fesm2020/odx-angular-components-avatar.mjs.map +1 -1
  683. package/fesm2020/odx-angular-components-badge.mjs +60 -90
  684. package/fesm2020/odx-angular-components-badge.mjs.map +1 -1
  685. package/fesm2020/odx-angular-components-bar.mjs +95 -0
  686. package/fesm2020/odx-angular-components-bar.mjs.map +1 -0
  687. package/fesm2020/odx-angular-components-breadcrumbs.mjs +56 -0
  688. package/fesm2020/odx-angular-components-breadcrumbs.mjs.map +1 -0
  689. package/fesm2020/odx-angular-components-button-group.mjs +3 -3
  690. package/fesm2020/odx-angular-components-button.mjs +11 -17
  691. package/fesm2020/odx-angular-components-button.mjs.map +1 -1
  692. package/fesm2020/odx-angular-components-checkbox.mjs +49 -8
  693. package/fesm2020/odx-angular-components-checkbox.mjs.map +1 -1
  694. package/fesm2020/odx-angular-components-chip.mjs +71 -0
  695. package/fesm2020/odx-angular-components-chip.mjs.map +1 -0
  696. package/fesm2020/odx-angular-components-circular-progress.mjs +110 -0
  697. package/fesm2020/odx-angular-components-circular-progress.mjs.map +1 -0
  698. package/fesm2020/odx-angular-components-content-box.mjs +13 -13
  699. package/fesm2020/odx-angular-components-dropdown.mjs +226 -0
  700. package/fesm2020/odx-angular-components-dropdown.mjs.map +1 -0
  701. package/fesm2020/odx-angular-components-form-field.mjs +95 -78
  702. package/fesm2020/odx-angular-components-form-field.mjs.map +1 -1
  703. package/fesm2020/odx-angular-components-header.mjs +25 -23
  704. package/fesm2020/odx-angular-components-header.mjs.map +1 -1
  705. package/fesm2020/odx-angular-components-icon.mjs +4 -3
  706. package/fesm2020/odx-angular-components-icon.mjs.map +1 -1
  707. package/fesm2020/odx-angular-components-inline-message.mjs +54 -0
  708. package/fesm2020/odx-angular-components-inline-message.mjs.map +1 -0
  709. package/fesm2020/odx-angular-components-launch-tile.mjs +99 -0
  710. package/fesm2020/odx-angular-components-launch-tile.mjs.map +1 -0
  711. package/fesm2020/odx-angular-components-link.mjs +6 -13
  712. package/fesm2020/odx-angular-components-link.mjs.map +1 -1
  713. package/fesm2020/odx-angular-components-list.mjs +76 -0
  714. package/fesm2020/odx-angular-components-list.mjs.map +1 -0
  715. package/fesm2020/odx-angular-components-loading-spinner.mjs +169 -0
  716. package/fesm2020/odx-angular-components-loading-spinner.mjs.map +1 -0
  717. package/fesm2020/odx-angular-components-logo.mjs +7 -5
  718. package/fesm2020/odx-angular-components-logo.mjs.map +1 -1
  719. package/fesm2020/odx-angular-components-main-menu.mjs +63 -52
  720. package/fesm2020/odx-angular-components-main-menu.mjs.map +1 -1
  721. package/fesm2020/odx-angular-components-menu.mjs +142 -0
  722. package/fesm2020/odx-angular-components-menu.mjs.map +1 -0
  723. package/fesm2020/odx-angular-components-modal.mjs +268 -152
  724. package/fesm2020/odx-angular-components-modal.mjs.map +1 -1
  725. package/fesm2020/odx-angular-components-progress.mjs +57 -0
  726. package/fesm2020/odx-angular-components-progress.mjs.map +1 -0
  727. package/fesm2020/odx-angular-components-radio-group.mjs +18 -19
  728. package/fesm2020/odx-angular-components-radio-group.mjs.map +1 -1
  729. package/fesm2020/odx-angular-components-rail-navigation.mjs +97 -0
  730. package/fesm2020/odx-angular-components-rail-navigation.mjs.map +1 -0
  731. package/fesm2020/odx-angular-components-select.mjs +409 -0
  732. package/fesm2020/odx-angular-components-select.mjs.map +1 -0
  733. package/fesm2020/odx-angular-components-slider.mjs +48 -0
  734. package/fesm2020/odx-angular-components-slider.mjs.map +1 -0
  735. package/fesm2020/odx-angular-components-spinbox.mjs +97 -0
  736. package/fesm2020/odx-angular-components-spinbox.mjs.map +1 -0
  737. package/fesm2020/odx-angular-components-switch.mjs +49 -8
  738. package/fesm2020/odx-angular-components-switch.mjs.map +1 -1
  739. package/fesm2020/odx-angular-components-tab-bar.mjs +203 -0
  740. package/fesm2020/odx-angular-components-tab-bar.mjs.map +1 -0
  741. package/fesm2020/odx-angular-components-toast.mjs +215 -0
  742. package/fesm2020/odx-angular-components-toast.mjs.map +1 -0
  743. package/fesm2020/odx-angular-components-toggle-button-group.mjs +55 -26
  744. package/fesm2020/odx-angular-components-toggle-button-group.mjs.map +1 -1
  745. package/fesm2020/odx-angular-components-tooltip.mjs +192 -0
  746. package/fesm2020/odx-angular-components-tooltip.mjs.map +1 -0
  747. package/fesm2020/odx-angular-internal.mjs +61 -52
  748. package/fesm2020/odx-angular-internal.mjs.map +1 -1
  749. package/fesm2020/odx-angular-rxjs.mjs +23 -6
  750. package/fesm2020/odx-angular-rxjs.mjs.map +1 -1
  751. package/fesm2020/odx-angular-utils.mjs +236 -15
  752. package/fesm2020/odx-angular-utils.mjs.map +1 -1
  753. package/fesm2020/odx-angular.mjs +225 -95
  754. package/fesm2020/odx-angular.mjs.map +1 -1
  755. package/index.d.ts +1 -0
  756. package/internal/decorators/css-component.d.ts +1 -2
  757. package/internal/decorators/css-modifier.d.ts +0 -1
  758. package/internal/helpers/decorator-property-name.d.ts +1 -0
  759. package/internal/helpers/index.d.ts +1 -0
  760. package/internal/helpers/with-mutiple-descriptors.d.ts +1 -1
  761. package/lib/controllers/controller.d.ts +2 -3
  762. package/lib/controllers/disabled.controller.d.ts +5 -7
  763. package/lib/controllers/readonly.controller.d.ts +5 -2
  764. package/lib/core.module.d.ts +2 -1
  765. package/lib/directives/click-outside.directive.d.ts +3 -4
  766. package/lib/directives/delegate-focus.directive.d.ts +11 -0
  767. package/lib/directives/index.d.ts +3 -0
  768. package/lib/directives/with-disabled-state.directive.d.ts +13 -0
  769. package/lib/directives/with-tabindex.directive.d.ts +7 -0
  770. package/lib/services/window-ref.d.ts +5 -0
  771. package/lib/tokens/identity-matcher.d.ts +3 -0
  772. package/lib/tokens/index.d.ts +3 -0
  773. package/lib/tokens/string-search-handler.d.ts +3 -0
  774. package/lib/tokens/stringify.d.ts +3 -0
  775. package/package.json +181 -12
  776. package/rxjs/index.d.ts +3 -1
  777. package/rxjs/lib/delay-until.d.ts +2 -0
  778. package/rxjs/lib/form-query-list.d.ts +3 -0
  779. package/rxjs/lib/from-element-resize.d.ts +2 -0
  780. package/utils/lib/decorators/index.d.ts +1 -0
  781. package/utils/lib/decorators/pure.d.ts +1 -0
  782. package/utils/lib/decorators/transform.d.ts +2 -2
  783. package/utils/lib/helpers/angular.d.ts +2 -1
  784. package/utils/lib/helpers/build-url.d.ts +1 -0
  785. package/utils/lib/helpers/defer-fn.d.ts +1 -0
  786. package/utils/lib/helpers/dom.d.ts +6 -1
  787. package/utils/lib/helpers/event-manager.d.ts +12 -0
  788. package/utils/lib/helpers/get-axis.d.ts +2 -0
  789. package/utils/lib/helpers/get-opposite-side.d.ts +2 -0
  790. package/utils/lib/helpers/get-side.d.ts +2 -0
  791. package/utils/lib/helpers/get-unique-id.d.ts +1 -0
  792. package/utils/lib/helpers/index.d.ts +9 -1
  793. package/utils/lib/helpers/ng-changes.d.ts +1 -1
  794. package/utils/lib/helpers/provide-config.d.ts +12 -0
  795. package/utils/lib/helpers/queue.d.ts +22 -0
  796. package/utils/lib/types/axis.d.ts +5 -0
  797. package/utils/lib/types/get-properties.d.ts +2 -2
  798. package/utils/lib/types/index.d.ts +3 -0
  799. package/utils/lib/types/position.d.ts +15 -0
  800. package/utils/lib/types/side.d.ts +7 -0
  801. package/components/badge/lib/badge.config.d.ts +0 -3
  802. package/components/badge/lib/facade/badge-host.d.ts +0 -3
  803. package/components/badge/lib/facade/index.d.ts +0 -1
  804. package/components/badge/lib/models/badge-position.d.ts +0 -5
  805. package/components/modal/lib/services/index.d.ts +0 -1
  806. package/components/modal/lib/services/open-modal-manager.service.d.ts +0 -15
  807. package/esm2020/components/badge/lib/badge.config.mjs +0 -3
  808. package/esm2020/components/badge/lib/facade/badge-host.mjs +0 -2
  809. package/esm2020/components/badge/lib/facade/index.mjs +0 -2
  810. package/esm2020/components/badge/lib/models/badge-position.mjs +0 -5
  811. package/esm2020/components/modal/lib/services/index.mjs +0 -2
  812. package/esm2020/components/modal/lib/services/open-modal-manager.service.mjs +0 -42
  813. package/esm2020/rxjs/lib/mark-for-check.mjs +0 -5
  814. package/esm2020/utils/lib/helpers/provide-module-config.mjs +0 -21
  815. package/rxjs/lib/mark-for-check.d.ts +0 -3
  816. package/utils/lib/helpers/provide-module-config.d.ts +0 -12
@@ -1,24 +1,37 @@
1
- import { AsyncPipe } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { inject, ChangeDetectorRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ApplicationRef, createComponent, EnvironmentInjector, InjectionToken, Injector, Injectable, ViewContainerRef, Directive } from '@angular/core';
4
- import { isObservable } from 'rxjs';
5
- import { isString, isTemplateRef, isComponent, hasChanged } from '@odx/angular/utils';
2
+ import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, reflectComponentType, ApplicationRef, createComponent, EnvironmentInjector, InjectionToken, inject, Injector, Injectable, ViewContainerRef, TemplateRef, Directive } from '@angular/core';
3
+ import { injectElement, isString, isViewContainer, getInjector, isTemplateRef, isComponent, hasChanged } from '@odx/angular/utils';
4
+ import { isObservable, distinctUntilChanged } from 'rxjs';
5
+ import { deepmerge } from 'deepmerge-ts';
6
+ import { DOCUMENT } from '@angular/common';
6
7
 
7
8
  class DynamicViewComponent {
8
9
  constructor() {
9
- this.asyncPipe = new AsyncPipe(inject(ChangeDetectorRef));
10
- this.resolveContent = () => null;
10
+ this.element = injectElement();
11
+ this.currentSubscription = null;
11
12
  }
12
13
  set content(value) {
13
- this.resolveContent = isObservable(value) ? () => this.asyncPipe.transform(value) : () => value;
14
+ if (isObservable(value)) {
15
+ this.ngOnDestroy();
16
+ this.currentSubscription = value.pipe(distinctUntilChanged()).subscribe((innerValue) => {
17
+ this.setContent(innerValue);
18
+ });
19
+ }
20
+ else {
21
+ this.setContent(value);
22
+ }
14
23
  }
15
24
  ngOnDestroy() {
16
- this.asyncPipe?.ngOnDestroy();
25
+ this.currentSubscription?.unsubscribe();
26
+ this.currentSubscription = null;
27
+ }
28
+ setContent(value) {
29
+ this.element.nativeElement.innerHTML = value;
17
30
  }
18
31
  }
19
- DynamicViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DynamicViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
- DynamicViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: DynamicViewComponent, isStandalone: true, selector: "odx-dynamic-view", inputs: { content: "content" }, host: { properties: { "innerHTML": "resolveContent()" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DynamicViewComponent, decorators: [{
32
+ DynamicViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DynamicViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
33
+ DynamicViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.4", type: DynamicViewComponent, isStandalone: true, selector: "odx-dynamic-view", inputs: { content: "content" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DynamicViewComponent, decorators: [{
22
35
  type: Component,
23
36
  args: [{
24
37
  selector: 'odx-dynamic-view',
@@ -26,14 +39,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
26
39
  changeDetection: ChangeDetectionStrategy.OnPush,
27
40
  encapsulation: ViewEncapsulation.None,
28
41
  standalone: true,
29
- host: {
30
- '[innerHTML]': 'resolveContent()',
31
- },
32
42
  }]
33
43
  }], propDecorators: { content: [{
34
44
  type: Input
35
45
  }] } });
36
46
 
47
+ function createProjectableNodes(component, nodes) {
48
+ const componentType = reflectComponentType(component);
49
+ if (componentType && componentType.ngContentSelectors.length > 0) {
50
+ return componentType.ngContentSelectors.map((selector) => (selector === '*' ? nodes : []));
51
+ }
52
+ return [];
53
+ }
54
+
37
55
  function isDynamicTextContent(value) {
38
56
  return isString(value) || isObservable(value);
39
57
  }
@@ -43,16 +61,26 @@ class DynamicComponentRef {
43
61
  this.options = options;
44
62
  this.application = this.options.injector.get(ApplicationRef);
45
63
  this.componentRef = null;
46
- const { component, context, injector, vcr } = options;
64
+ this.componentInputs = null;
65
+ const { component, context, injector, projectableNodes, host } = options;
47
66
  this.componentRef = createComponent(component, {
48
67
  environmentInjector: injector.get(EnvironmentInjector),
49
68
  elementInjector: injector,
69
+ projectableNodes,
50
70
  });
51
- if (vcr) {
52
- vcr.insert(this.componentRef.hostView);
71
+ this.componentInputs =
72
+ reflectComponentType(this.componentRef.componentType)?.inputs.reduce((acc, { propName }) => {
73
+ acc[propName] = true;
74
+ return acc;
75
+ }, {}) ?? null;
76
+ if (isViewContainer(host)) {
77
+ host.insert(this.componentRef.hostView);
53
78
  }
54
79
  else {
55
80
  this.application.attachView(this.componentRef.hostView);
81
+ if (host) {
82
+ host.appendChild(this.getElement());
83
+ }
56
84
  }
57
85
  if (context) {
58
86
  this.update(context);
@@ -66,20 +94,29 @@ class DynamicComponentRef {
66
94
  this.componentRef = null;
67
95
  return;
68
96
  }
69
- if (this.componentRef && !this.options.vcr) {
97
+ if (this.componentRef && !isViewContainer(this.options.host)) {
70
98
  this.application.detachView(this.componentRef.hostView);
71
99
  }
72
100
  this.componentRef?.destroy();
73
101
  this.componentRef = null;
102
+ this.componentInputs = null;
74
103
  }
75
104
  getElement() {
76
105
  return this.componentRef?.location.nativeElement ?? null;
77
106
  }
78
107
  update(context) {
79
- for (const key in context) {
80
- this.componentRef?.setInput(key, context[key]);
108
+ this.options.context = deepmerge(this.options.context, context);
109
+ if (!this.componentRef)
110
+ return;
111
+ for (const key in this.options.context) {
112
+ if (this.componentInputs?.[key]) {
113
+ this.componentRef.setInput(key, this.options.context[key]);
114
+ }
81
115
  }
82
116
  }
117
+ getContext() {
118
+ return this.options.context ?? {};
119
+ }
83
120
  getView() {
84
121
  return this.componentRef?.hostView ?? null;
85
122
  }
@@ -100,7 +137,7 @@ class DynamicTemplateRef {
100
137
  this.embeddedViewRef = null;
101
138
  return;
102
139
  }
103
- if (!this.options.vcr && this.embeddedViewRef) {
140
+ if (!isViewContainer(this.options.host) && this.embeddedViewRef) {
104
141
  this.application.detachView(this.embeddedViewRef);
105
142
  }
106
143
  this.embeddedViewRef?.destroy();
@@ -110,17 +147,21 @@ class DynamicTemplateRef {
110
147
  return this.embeddedViewRef?.rootNodes?.[0] ?? null;
111
148
  }
112
149
  update(context) {
150
+ this.options.context = deepmerge(this.options.context, context);
113
151
  if (this.embeddedViewRef) {
114
- this.embeddedViewRef.context = context;
152
+ this.embeddedViewRef.context = this.options.context;
115
153
  this.detectChanges();
116
154
  }
117
155
  }
156
+ getContext() {
157
+ return this.options.context ?? {};
158
+ }
118
159
  getView() {
119
160
  return this.embeddedViewRef;
120
161
  }
121
- create({ context, template, vcr }) {
122
- if (vcr) {
123
- this.embeddedViewRef = vcr.createEmbeddedView(template, context, { injector: this.options.injector });
162
+ create({ context, template, host }) {
163
+ if (isViewContainer(host)) {
164
+ this.embeddedViewRef = host.createEmbeddedView(template, context, { injector: this.options.injector });
124
165
  }
125
166
  else {
126
167
  this.embeddedViewRef = template.createEmbeddedView(context ?? {}, this.options.injector);
@@ -135,15 +176,25 @@ function isDynamicView(value) {
135
176
 
136
177
  const DYNAMIC_VIEW_CONTEXT = new InjectionToken('@odx/angular/cdk/dynamic-view::DynamicViewContext');
137
178
 
179
+ const ODX_DYNAMIC_VIEW_DEFAULT_HOST = new InjectionToken('@odx/angular/cdk/dynamic-view::DynamicViewDefaultHost', {
180
+ providedIn: 'root',
181
+ factory: () => inject(DOCUMENT).body,
182
+ });
183
+ function getDynamicViewDefaultHost() {
184
+ return inject(ODX_DYNAMIC_VIEW_DEFAULT_HOST);
185
+ }
186
+
138
187
  class DynamicViewService {
139
188
  constructor() {
140
- this.injector = inject(Injector);
189
+ this.injector = getInjector();
190
+ this.defaultHost = getDynamicViewDefaultHost();
141
191
  }
142
192
  createView(content, options = {}) {
143
193
  const viewOptions = {
144
194
  ...options,
195
+ host: options.host ?? this.defaultHost,
145
196
  injector: Injector.create({
146
- providers: [{ provide: DYNAMIC_VIEW_CONTEXT, useValue: options.context }],
197
+ providers: [{ provide: DYNAMIC_VIEW_CONTEXT, useValue: options.context }, options.providers ?? []],
147
198
  parent: options.injector ?? this.injector,
148
199
  }),
149
200
  };
@@ -163,9 +214,9 @@ class DynamicViewService {
163
214
  throw new Error('Content type is not supported');
164
215
  }
165
216
  }
166
- DynamicViewService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DynamicViewService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
167
- DynamicViewService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DynamicViewService, providedIn: 'root' });
168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DynamicViewService, decorators: [{
217
+ DynamicViewService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DynamicViewService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
218
+ DynamicViewService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DynamicViewService, providedIn: 'root' });
219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DynamicViewService, decorators: [{
169
220
  type: Injectable,
170
221
  args: [{ providedIn: 'root' }]
171
222
  }] });
@@ -174,7 +225,10 @@ class DynamicViewDirective {
174
225
  constructor() {
175
226
  this.dynamicViewService = inject(DynamicViewService);
176
227
  this.viewContainer = inject(ViewContainerRef);
228
+ this.template = inject(TemplateRef);
177
229
  this.viewRef = null;
230
+ this.contentViewRef = null;
231
+ // eslint-disable-next-line @angular-eslint/no-input-rename
178
232
  this.content = null;
179
233
  }
180
234
  ngOnInit() {
@@ -199,8 +253,10 @@ class DynamicViewDirective {
199
253
  return this.viewRef;
200
254
  }
201
255
  render(reRender = true) {
202
- if (!this.content)
256
+ if (!this.content) {
257
+ this.destroy();
203
258
  return;
259
+ }
204
260
  if (!reRender && this.viewRef) {
205
261
  this.viewRef?.update({ content: this.content });
206
262
  return;
@@ -214,24 +270,33 @@ class DynamicViewDirective {
214
270
  }
215
271
  }
216
272
  else {
273
+ let projectableNodes = [];
274
+ if (isComponent(this.content)) {
275
+ this.contentViewRef = this.dynamicViewService.createView(this.template, { injector: this.injector });
276
+ const rootNodes = this.contentViewRef.getView().rootNodes;
277
+ projectableNodes = createProjectableNodes(this.content, rootNodes);
278
+ }
217
279
  this.viewRef = this.dynamicViewService.createView(this.content, {
218
280
  context: this.context ?? undefined,
219
281
  injector: this.injector ?? this.viewContainer.injector,
220
- vcr: this.viewContainer,
282
+ projectableNodes,
283
+ host: this.viewContainer,
221
284
  });
222
285
  }
223
286
  }
224
287
  destroy() {
288
+ this.contentViewRef?.destroy();
225
289
  this.viewRef?.destroy();
290
+ this.contentViewRef = null;
226
291
  this.viewRef = null;
227
292
  }
228
293
  }
229
- DynamicViewDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DynamicViewDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
230
- DynamicViewDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: DynamicViewDirective, isStandalone: true, selector: "[odxDynamicView]", inputs: { content: ["odxDynamicView", "content"], injector: ["odxDynamicViewInjector", "injector"], context: ["odxDynamicViewContext", "context"] }, usesOnChanges: true, ngImport: i0 });
231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DynamicViewDirective, decorators: [{
294
+ DynamicViewDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DynamicViewDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
295
+ DynamicViewDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.4", type: DynamicViewDirective, isStandalone: true, selector: "ng-template[odxDynamicView]", inputs: { content: ["odxDynamicView", "content"], injector: ["odxDynamicViewInjector", "injector"], context: ["odxDynamicViewContext", "context"] }, usesOnChanges: true, ngImport: i0 });
296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: DynamicViewDirective, decorators: [{
232
297
  type: Directive,
233
298
  args: [{
234
- selector: '[odxDynamicView]',
299
+ selector: 'ng-template[odxDynamicView]',
235
300
  standalone: true,
236
301
  }]
237
302
  }], propDecorators: { content: [{
@@ -249,5 +314,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
249
314
  * Generated bundle index. Do not edit.
250
315
  */
251
316
 
252
- export { DYNAMIC_VIEW_CONTEXT, DynamicComponentRef, DynamicTemplateRef, DynamicViewComponent, DynamicViewDirective, DynamicViewService, isDynamicTextContent, isDynamicView };
317
+ export { DYNAMIC_VIEW_CONTEXT, DynamicComponentRef, DynamicTemplateRef, DynamicViewComponent, DynamicViewDirective, DynamicViewService, ODX_DYNAMIC_VIEW_DEFAULT_HOST, createProjectableNodes, getDynamicViewDefaultHost, isDynamicTextContent, isDynamicView };
253
318
  //# sourceMappingURL=odx-angular-cdk-dynamic-view.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-cdk-dynamic-view.mjs","sources":["../../../../libs/angular/cdk/dynamic-view/src/lib/dynamic-view.component.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/helpers/is-dynamic-text-content.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/models/dynamic-component-ref.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/models/dynamic-template-ref.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/helpers/is-dynamic-view.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/tokens/dynamic-view-context.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/dynamic-view.service.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/dynamic-view.directive.ts","../../../../libs/angular/cdk/dynamic-view/src/odx-angular-cdk-dynamic-view.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, Input, OnDestroy, ViewEncapsulation } from '@angular/core';\nimport { isObservable } from 'rxjs';\nimport { DynamicTextContent } from './facade';\n\n@Component({\n selector: 'odx-dynamic-view',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n host: {\n '[innerHTML]': 'resolveContent()',\n },\n})\nexport class DynamicViewComponent implements OnDestroy {\n protected asyncPipe = new AsyncPipe(inject(ChangeDetectorRef));\n protected resolveContent: () => string | null = () => null;\n\n @Input()\n public set content(value: DynamicTextContent) {\n this.resolveContent = isObservable(value) ? () => this.asyncPipe.transform(value) : () => value;\n }\n\n public ngOnDestroy(): void {\n this.asyncPipe?.ngOnDestroy();\n }\n}\n","import { isString } from '@odx/angular/utils';\nimport { isObservable } from 'rxjs';\nimport { DynamicTextContent } from '../facade';\n\nexport function isDynamicTextContent(value: unknown): value is DynamicTextContent {\n return isString(value) || isObservable(value);\n}\n","import { ApplicationRef, ComponentRef, createComponent, EnvironmentInjector, Type, ViewRef } from '@angular/core';\nimport { GetDynamicViewContext } from '../facade';\nimport { DynamicViewRef } from '../facade/dynamic-view-ref';\nimport { DynamicViewOptions } from './dynamic-view-options';\n\nexport interface DynamicComponentOptions<T extends Type<unknown>> extends DynamicViewOptions<T> {\n component: T;\n}\n\nexport class DynamicComponentRef<T extends Type<unknown>, C extends GetDynamicViewContext<T>> implements DynamicViewRef<T> {\n private readonly application = this.options.injector.get(ApplicationRef);\n private componentRef: ComponentRef<T> | null = null;\n\n constructor(private readonly options: DynamicComponentOptions<T>) {\n const { component, context, injector, vcr } = options;\n this.componentRef = createComponent(component as Type<T>, {\n environmentInjector: injector.get(EnvironmentInjector),\n elementInjector: injector,\n });\n\n if (vcr) {\n vcr.insert(this.componentRef.hostView);\n } else {\n this.application.attachView(this.componentRef.hostView);\n }\n if (context) {\n this.update(context as C);\n }\n }\n\n public detectChanges(): void {\n this.componentRef?.changeDetectorRef.detectChanges();\n }\n\n public destroy(): void {\n if (this.componentRef?.hostView.destroyed) {\n this.componentRef = null;\n return;\n }\n if (this.componentRef && !this.options.vcr) {\n this.application.detachView(this.componentRef.hostView);\n }\n this.componentRef?.destroy();\n this.componentRef = null;\n }\n\n public getElement(): Element {\n return this.componentRef?.location.nativeElement ?? null;\n }\n\n public update(context: C): void {\n for (const key in context) {\n this.componentRef?.setInput(key, context[key]);\n }\n }\n\n public getView(): ViewRef | null {\n return this.componentRef?.hostView ?? null;\n }\n}\n","import { ApplicationRef, EmbeddedViewRef, TemplateRef as NgTemplateRef, ViewRef } from '@angular/core';\nimport { DynamicViewRef, GetDynamicViewContext } from '../facade';\nimport { DynamicViewOptions } from './dynamic-view-options';\n\nexport interface DynamicTemplateOptions<T extends NgTemplateRef<unknown>> extends DynamicViewOptions<T> {\n template: T;\n}\n\nexport class DynamicTemplateRef<T extends NgTemplateRef<unknown> = NgTemplateRef<unknown>> implements DynamicViewRef<T> {\n private readonly application = this.options.injector.get(ApplicationRef);\n private embeddedViewRef: EmbeddedViewRef<unknown> | null = null;\n\n constructor(private readonly options: DynamicTemplateOptions<T>) {\n this.create(options);\n }\n\n public detectChanges(): void {\n this.embeddedViewRef?.detectChanges();\n }\n\n public destroy(): void {\n if (this.embeddedViewRef?.destroyed) {\n this.embeddedViewRef = null;\n return;\n }\n if (!this.options.vcr && this.embeddedViewRef) {\n this.application.detachView(this.embeddedViewRef);\n }\n this.embeddedViewRef?.destroy();\n this.embeddedViewRef = null;\n }\n\n public getElement(): Element {\n return this.embeddedViewRef?.rootNodes?.[0] ?? null;\n }\n\n public update(context: GetDynamicViewContext<T>): void {\n if (this.embeddedViewRef) {\n this.embeddedViewRef.context = context;\n this.detectChanges();\n }\n }\n\n public getView(): ViewRef | null {\n return this.embeddedViewRef;\n }\n\n private create({ context, template, vcr }: DynamicTemplateOptions<T>) {\n if (vcr) {\n this.embeddedViewRef = vcr.createEmbeddedView(template, context, { injector: this.options.injector });\n } else {\n this.embeddedViewRef = template.createEmbeddedView(context ?? {}, this.options.injector);\n this.application.attachView(this.embeddedViewRef);\n }\n }\n}\n","import { DynamicContent, DynamicViewRef } from '../facade';\nimport { DynamicComponentRef, DynamicTemplateRef } from '../models';\n\nexport function isDynamicView(value: unknown): value is DynamicViewRef<DynamicContent> {\n return value instanceof DynamicComponentRef || value instanceof DynamicTemplateRef;\n}\n","import { InjectionToken, TemplateRef } from '@angular/core';\n\nexport interface DynamicViewContextWithImplicitTemplate<T = unknown> {\n $implicit: TemplateRef<T>;\n}\n\nexport const DYNAMIC_VIEW_CONTEXT = new InjectionToken('@odx/angular/cdk/dynamic-view::DynamicViewContext');\n","import { inject, Injectable, Injector } from '@angular/core';\nimport { isComponent, isTemplateRef } from '@odx/angular/utils';\nimport { DynamicViewComponent } from './dynamic-view.component';\nimport { DynamicContent, DynamicViewRef } from './facade';\nimport { isDynamicTextContent } from './helpers';\nimport { DynamicComponentRef, DynamicViewOptions } from './models';\nimport { DynamicTemplateRef } from './models/dynamic-template-ref';\nimport { DYNAMIC_VIEW_CONTEXT } from './tokens';\n\n@Injectable({ providedIn: 'root' })\nexport class DynamicViewService {\n private readonly injector = inject(Injector);\n\n public createView<T extends DynamicContent>(content: T, options: Partial<DynamicViewOptions<T>> = {}): DynamicViewRef<T> {\n const viewOptions = {\n ...options,\n injector: Injector.create({\n providers: [{ provide: DYNAMIC_VIEW_CONTEXT, useValue: options.context }],\n parent: options.injector ?? this.injector,\n }),\n };\n if (isTemplateRef(content)) {\n return new DynamicTemplateRef({ ...viewOptions, template: content });\n }\n if (isComponent(content)) {\n return new DynamicComponentRef({ ...viewOptions, context: options.context, component: content });\n }\n if (isDynamicTextContent(content)) {\n return new DynamicComponentRef({\n ...viewOptions,\n component: DynamicViewComponent,\n context: { content },\n });\n }\n throw new Error('Content type is not supported');\n }\n}\n","import { Directive, inject, Injector, Input, OnChanges, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';\nimport { hasChanged, NgChanges } from '@odx/angular/utils';\nimport { DynamicViewService } from './dynamic-view.service';\nimport { DynamicContent, DynamicViewRef, GetDynamicViewContext } from './facade';\nimport { isDynamicTextContent, isDynamicView } from './helpers';\n\n@Directive({\n selector: '[odxDynamicView]',\n standalone: true,\n})\nexport class DynamicViewDirective<T extends DynamicContent<unknown> = DynamicContent<unknown>> implements OnDestroy, OnInit, OnChanges {\n private readonly dynamicViewService = inject(DynamicViewService);\n private readonly viewContainer = inject(ViewContainerRef);\n private viewRef: DynamicViewRef<T> | null = null;\n\n @Input('odxDynamicView')\n public content?: T | DynamicViewRef<T> | null = null;\n\n @Input('odxDynamicViewInjector')\n public injector?: Injector;\n\n @Input('odxDynamicViewContext')\n public context?: GetDynamicViewContext<T>;\n\n public ngOnInit(): void {\n this.render();\n }\n\n public ngOnChanges(changes: NgChanges<DynamicViewDirective<DynamicContent>>): void {\n if (hasChanged(changes, 'injector')) {\n this.render();\n }\n if (hasChanged(changes, 'content')) {\n const hasChangedTextContent = isDynamicTextContent(changes.content?.previousValue) && isDynamicTextContent(changes.content?.currentValue);\n this.render(!hasChangedTextContent);\n }\n if (hasChanged(changes, 'context')) {\n this.viewRef?.update(changes.context?.currentValue ?? {});\n }\n }\n\n public ngOnDestroy(): void {\n this.destroy();\n }\n\n public getView(): DynamicViewRef<T> | null {\n return this.viewRef;\n }\n\n private render(reRender = true) {\n if (!this.content) return;\n if (!reRender && this.viewRef) {\n this.viewRef?.update({ content: this.content } as object);\n return;\n }\n this.viewRef?.destroy();\n if (isDynamicView(this.content)) {\n this.viewRef = this.content;\n const hostView = this.viewRef.getView();\n if (hostView) {\n this.viewContainer.insert(hostView);\n }\n } else {\n this.viewRef = this.dynamicViewService.createView(this.content, {\n context: this.context ?? undefined,\n injector: this.injector ?? this.viewContainer.injector,\n vcr: this.viewContainer,\n });\n }\n }\n\n private destroy() {\n this.viewRef?.destroy();\n this.viewRef = null;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAea,oBAAoB,CAAA;AAVjC,IAAA,WAAA,GAAA;QAWY,IAAS,CAAA,SAAA,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC;AACrD,QAAA,IAAA,CAAA,cAAc,GAAwB,MAAM,IAAI,CAAC;AAU5D,KAAA;IARC,IACW,OAAO,CAAC,KAAyB,EAAA;AAC1C,QAAA,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,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A,CAAA,EAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;8BAOQ,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,gBAAgB,CAAA;gBAIhB,QAAQ,EAAA,CAAA;sBADd,KAAK;uBAAC,wBAAwB,CAAA;gBAIxB,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,uBAAuB,CAAA;;;ACrBhC;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-cdk-dynamic-view.mjs","sources":["../../../../libs/angular/cdk/dynamic-view/src/lib/dynamic-view.component.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/helpers/create-projectable-nodes.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/helpers/is-dynamic-text-content.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/models/dynamic-component-ref.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/models/dynamic-template-ref.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/helpers/is-dynamic-view.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/tokens/dynamic-view-context.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/tokens/dynamic-view-default-host.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/dynamic-view.service.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/dynamic-view.directive.ts","../../../../libs/angular/cdk/dynamic-view/src/odx-angular-cdk-dynamic-view.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, OnDestroy, ViewEncapsulation } from '@angular/core';\nimport { injectElement } from '@odx/angular/utils';\nimport { distinctUntilChanged, isObservable, Subscription } from 'rxjs';\nimport { DynamicTextContent } from './facade';\n\n@Component({\n selector: 'odx-dynamic-view',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n})\nexport class DynamicViewComponent implements OnDestroy {\n private readonly element = injectElement();\n private currentSubscription: Subscription | null = null;\n\n @Input()\n public set content(value: DynamicTextContent) {\n if (isObservable(value)) {\n this.ngOnDestroy();\n this.currentSubscription = value.pipe(distinctUntilChanged()).subscribe((innerValue) => {\n this.setContent(innerValue);\n });\n } else {\n this.setContent(value);\n }\n }\n\n public ngOnDestroy(): void {\n this.currentSubscription?.unsubscribe();\n this.currentSubscription = null;\n }\n\n private setContent(value: string): void {\n this.element.nativeElement.innerHTML = value;\n }\n}\n","import { reflectComponentType, Type } from '@angular/core';\n\nexport function createProjectableNodes(component: Type<unknown>, nodes: Node[]): Node[][] {\n const componentType = reflectComponentType(component);\n if (componentType && componentType.ngContentSelectors.length > 0) {\n return componentType.ngContentSelectors.map((selector) => (selector === '*' ? nodes : []));\n }\n return [];\n}\n","import { isString } from '@odx/angular/utils';\nimport { isObservable } from 'rxjs';\nimport { DynamicTextContent } from '../facade';\n\nexport function isDynamicTextContent(value: unknown): value is DynamicTextContent {\n return isString(value) || isObservable(value);\n}\n","import { ApplicationRef, ComponentRef, createComponent, EnvironmentInjector, reflectComponentType, Type, ViewRef } from '@angular/core';\nimport { isViewContainer } from '@odx/angular/utils';\nimport { deepmerge } from 'deepmerge-ts';\nimport { GetDynamicViewContext } from '../facade';\nimport { DynamicViewRef } from '../facade/dynamic-view-ref';\nimport { DynamicViewOptions } from './dynamic-view-options';\n\nexport interface DynamicComponentOptions<T extends Type<unknown>> extends DynamicViewOptions<T> {\n component: T;\n}\n\nexport class DynamicComponentRef<T extends Type<unknown>, C extends GetDynamicViewContext<T>> implements DynamicViewRef<T> {\n private readonly application = this.options.injector.get(ApplicationRef);\n private componentRef: ComponentRef<T> | null = null;\n private componentInputs: Record<string, true> | null = null;\n\n constructor(private readonly options: DynamicComponentOptions<T>) {\n const { component, context, injector, projectableNodes, host } = options;\n\n this.componentRef = createComponent(component as Type<T>, {\n environmentInjector: injector.get(EnvironmentInjector),\n elementInjector: injector,\n projectableNodes,\n });\n this.componentInputs =\n reflectComponentType(this.componentRef.componentType)?.inputs.reduce((acc, { propName }) => {\n acc[propName] = true;\n return acc;\n }, {} as Record<string, true>) ?? null;\n\n if (isViewContainer(host)) {\n host.insert(this.componentRef.hostView);\n } else {\n this.application.attachView(this.componentRef.hostView);\n if (host) {\n host.appendChild(this.getElement());\n }\n }\n if (context) {\n this.update(context as C);\n }\n }\n\n public detectChanges(): void {\n this.componentRef?.changeDetectorRef.detectChanges();\n }\n\n public destroy(): void {\n if (this.componentRef?.hostView.destroyed) {\n this.componentRef = null;\n return;\n }\n if (this.componentRef && !isViewContainer(this.options.host)) {\n this.application.detachView(this.componentRef.hostView);\n }\n this.componentRef?.destroy();\n this.componentRef = null;\n this.componentInputs = null;\n }\n\n public getElement(): Element {\n return this.componentRef?.location.nativeElement ?? null;\n }\n\n public update(context: C): void {\n this.options.context = deepmerge(this.options.context, context) as C;\n if (!this.componentRef) return;\n for (const key in this.options.context) {\n if (this.componentInputs?.[key]) {\n this.componentRef.setInput(key, this.options.context[key]);\n }\n }\n }\n\n public getContext(): GetDynamicViewContext<T> {\n return this.options.context ?? {};\n }\n\n public getView(): ViewRef | null {\n return this.componentRef?.hostView ?? null;\n }\n}\n","import { ApplicationRef, EmbeddedViewRef, TemplateRef as NgTemplateRef, ViewRef } from '@angular/core';\nimport { isViewContainer } from '@odx/angular/utils';\nimport { deepmerge } from 'deepmerge-ts';\nimport { DynamicViewRef, GetDynamicViewContext } from '../facade';\nimport { DynamicViewOptions } from './dynamic-view-options';\n\nexport interface DynamicTemplateOptions<T extends NgTemplateRef<unknown>> extends DynamicViewOptions<T> {\n template: T;\n}\n\nexport class DynamicTemplateRef<T extends NgTemplateRef<unknown> = NgTemplateRef<unknown>> implements DynamicViewRef<T> {\n private readonly application = this.options.injector.get(ApplicationRef);\n private embeddedViewRef: EmbeddedViewRef<unknown> | null = null;\n\n constructor(private readonly options: DynamicTemplateOptions<T>) {\n this.create(options);\n }\n\n public detectChanges(): void {\n this.embeddedViewRef?.detectChanges();\n }\n\n public destroy(): void {\n if (this.embeddedViewRef?.destroyed) {\n this.embeddedViewRef = null;\n return;\n }\n if (!isViewContainer(this.options.host) && this.embeddedViewRef) {\n this.application.detachView(this.embeddedViewRef);\n }\n this.embeddedViewRef?.destroy();\n this.embeddedViewRef = null;\n }\n\n public getElement(): Element {\n return this.embeddedViewRef?.rootNodes?.[0] ?? null;\n }\n\n public update(context: GetDynamicViewContext<T>): void {\n this.options.context = deepmerge(this.options.context, context) as GetDynamicViewContext<T>;\n if (this.embeddedViewRef) {\n this.embeddedViewRef.context = this.options.context;\n this.detectChanges();\n }\n }\n\n public getContext(): GetDynamicViewContext<T> {\n return this.options.context ?? {};\n }\n\n public getView(): ViewRef | null {\n return this.embeddedViewRef;\n }\n\n private create({ context, template, host }: DynamicTemplateOptions<T>) {\n if (isViewContainer(host)) {\n this.embeddedViewRef = host.createEmbeddedView(template, context, { injector: this.options.injector });\n } else {\n this.embeddedViewRef = template.createEmbeddedView(context ?? {}, this.options.injector);\n this.application.attachView(this.embeddedViewRef);\n }\n }\n}\n","import { DynamicContent, DynamicViewRef } from '../facade';\nimport { DynamicComponentRef, DynamicTemplateRef } from '../models';\n\nexport function isDynamicView(value: unknown): value is DynamicViewRef<DynamicContent> {\n return value instanceof DynamicComponentRef || value instanceof DynamicTemplateRef;\n}\n","import { InjectionToken, TemplateRef } from '@angular/core';\n\nexport interface DynamicViewContextWithImplicitTemplate<T = unknown> {\n $implicit: TemplateRef<T>;\n}\n\nexport const DYNAMIC_VIEW_CONTEXT = new InjectionToken('@odx/angular/cdk/dynamic-view::DynamicViewContext');\n","import { DOCUMENT } from '@angular/common';\nimport { inject, InjectionToken } from '@angular/core';\n\nexport const ODX_DYNAMIC_VIEW_DEFAULT_HOST = new InjectionToken<Element>('@odx/angular/cdk/dynamic-view::DynamicViewDefaultHost', {\n providedIn: 'root',\n factory: () => inject(DOCUMENT).body,\n});\n\nexport function getDynamicViewDefaultHost(): Element {\n return inject(ODX_DYNAMIC_VIEW_DEFAULT_HOST);\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { getInjector, isComponent, isTemplateRef } from '@odx/angular/utils';\nimport { DynamicViewComponent } from './dynamic-view.component';\nimport { DynamicContent, DynamicViewRef } from './facade';\nimport { isDynamicTextContent } from './helpers';\nimport { DynamicComponentRef, DynamicViewOptions } from './models';\nimport { DynamicTemplateRef } from './models/dynamic-template-ref';\nimport { DYNAMIC_VIEW_CONTEXT, getDynamicViewDefaultHost } from './tokens';\n\n@Injectable({ providedIn: 'root' })\nexport class DynamicViewService {\n private readonly injector = getInjector();\n private readonly defaultHost = getDynamicViewDefaultHost();\n\n public createView<T extends DynamicContent>(content: T, options: Partial<DynamicViewOptions<T>> = {}): DynamicViewRef<T> {\n const viewOptions: DynamicViewOptions<T> = {\n ...options,\n host: options.host ?? this.defaultHost,\n injector: Injector.create({\n providers: [{ provide: DYNAMIC_VIEW_CONTEXT, useValue: options.context }, options.providers ?? []],\n parent: options.injector ?? this.injector,\n }),\n };\n if (isTemplateRef(content)) {\n return new DynamicTemplateRef({ ...viewOptions, template: content });\n }\n if (isComponent(content)) {\n return new DynamicComponentRef({ ...viewOptions, context: options.context, component: content });\n }\n if (isDynamicTextContent(content)) {\n return new DynamicComponentRef({\n ...viewOptions,\n component: DynamicViewComponent,\n context: { content },\n }) as never;\n }\n throw new Error('Content type is not supported');\n }\n}\n","import { Directive, EmbeddedViewRef, inject, Injector, Input, OnChanges, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { hasChanged, isComponent, NgChanges } from '@odx/angular/utils';\nimport { DynamicViewService } from './dynamic-view.service';\nimport { DynamicContent, DynamicViewRef, GetDynamicViewContext } from './facade';\nimport { createProjectableNodes, isDynamicTextContent, isDynamicView } from './helpers';\n\n@Directive({\n selector: 'ng-template[odxDynamicView]',\n standalone: true,\n})\nexport class DynamicViewDirective<T extends DynamicContent<unknown> = DynamicContent<unknown>> implements OnDestroy, OnInit, OnChanges {\n private readonly dynamicViewService = inject(DynamicViewService);\n private readonly viewContainer = inject(ViewContainerRef);\n private readonly template = inject(TemplateRef);\n private viewRef: DynamicViewRef<T> | null = null;\n private contentViewRef: DynamicViewRef<TemplateRef<unknown>> | null = null;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxDynamicView')\n public content?: T | DynamicViewRef<T> | null = null;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxDynamicViewInjector')\n public injector?: Injector;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxDynamicViewContext')\n public context?: GetDynamicViewContext<T>;\n\n public ngOnInit(): void {\n this.render();\n }\n\n public ngOnChanges(changes: NgChanges<DynamicViewDirective<DynamicContent>>): void {\n if (hasChanged(changes, 'injector')) {\n this.render();\n }\n if (hasChanged(changes, 'content')) {\n const hasChangedTextContent = isDynamicTextContent(changes.content?.previousValue) && isDynamicTextContent(changes.content?.currentValue);\n this.render(!hasChangedTextContent);\n }\n if (hasChanged(changes, 'context')) {\n this.viewRef?.update(changes.context?.currentValue ?? {});\n }\n }\n\n public ngOnDestroy(): void {\n this.destroy();\n }\n\n public getView(): DynamicViewRef<T> | null {\n return this.viewRef;\n }\n\n private render(reRender = true) {\n if (!this.content) {\n this.destroy();\n return;\n }\n if (!reRender && this.viewRef) {\n this.viewRef?.update({ content: this.content } as object);\n return;\n }\n this.viewRef?.destroy();\n if (isDynamicView(this.content)) {\n this.viewRef = this.content;\n const hostView = this.viewRef.getView();\n if (hostView) {\n this.viewContainer.insert(hostView);\n }\n } else {\n let projectableNodes: Node[][] = [];\n if (isComponent(this.content)) {\n this.contentViewRef = this.dynamicViewService.createView(this.template, { injector: this.injector });\n const rootNodes = (this.contentViewRef.getView() as EmbeddedViewRef<unknown>).rootNodes;\n projectableNodes = createProjectableNodes(this.content, rootNodes);\n }\n this.viewRef = this.dynamicViewService.createView(this.content, {\n context: this.context ?? undefined,\n injector: this.injector ?? this.viewContainer.injector,\n projectableNodes,\n host: this.viewContainer,\n });\n }\n }\n\n private destroy() {\n this.contentViewRef?.destroy();\n this.viewRef?.destroy();\n this.contentViewRef = null;\n this.viewRef = null;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAYa,oBAAoB,CAAA;AAPjC,IAAA,WAAA,GAAA;QAQmB,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;QACnC,IAAmB,CAAA,mBAAA,GAAwB,IAAI,CAAC;AAsBzD,KAAA;IApBC,IACW,OAAO,CAAC,KAAyB,EAAA;AAC1C,QAAA,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE;YACvB,IAAI,CAAC,WAAW,EAAE,CAAC;AACnB,YAAA,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,KAAI;AACrF,gBAAA,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAC9B,aAAC,CAAC,CAAC;AACJ,SAAA;AAAM,aAAA;AACL,YAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACxB,SAAA;KACF;IAEM,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,CAAC;AACxC,QAAA,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;KACjC;AAEO,IAAA,UAAU,CAAC,KAAa,EAAA;QAC9B,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,GAAG,KAAK,CAAC;KAC9C;;iHAvBU,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,IAAA,GAAA,EAAA,CA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A,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;8BAUQ,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,gBAAgB,CAAA;gBAKhB,QAAQ,EAAA,CAAA;sBADd,KAAK;uBAAC,wBAAwB,CAAA;gBAKxB,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,uBAAuB,CAAA;;;AC1BhC;;AAEG;;;;"}
@@ -1,19 +1,14 @@
1
1
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, ChangeDetectorRef, Directive, Input, NgModule } from '@angular/core';
3
+ import { InjectionToken, inject, ChangeDetectorRef, Directive, Input, NgModule } from '@angular/core';
4
4
  import { __decorate, __metadata } from 'tslib';
5
5
  import { Transform } from '@odx/angular/utils';
6
6
 
7
- class ExpandableContainer {
8
- }
9
-
10
- class ExpandableItem {
11
- }
7
+ const EXPANDABLE_CONTAINER = new InjectionToken('@odx/angular/cdk/expandable::ExpandableContainer');
12
8
 
13
- class ExpandableItemDirective extends ExpandableItem {
9
+ class ExpandableItemDirective {
14
10
  constructor() {
15
- super(...arguments);
16
- this.container = inject(ExpandableContainer, { optional: true, skipSelf: true });
11
+ this.container = inject(EXPANDABLE_CONTAINER, { optional: true, skipSelf: true });
17
12
  this.changeDetectorRef = inject(ChangeDetectorRef);
18
13
  this._expanded = false;
19
14
  this.id = `odx-expandable-item-${ExpandableItemDirective.ID++}`;
@@ -42,9 +37,9 @@ class ExpandableItemDirective extends ExpandableItem {
42
37
  }
43
38
  }
44
39
  ExpandableItemDirective.ID = 0;
45
- ExpandableItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ExpandableItemDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
46
- ExpandableItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: ExpandableItemDirective, isStandalone: true, selector: "[odxExpandableItem]", inputs: { expanded: "expanded" }, usesInheritance: true, ngImport: i0 });
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ExpandableItemDirective, decorators: [{
40
+ ExpandableItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ExpandableItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
41
+ ExpandableItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.4", type: ExpandableItemDirective, isStandalone: true, selector: "[odxExpandableItem]", inputs: { expanded: "expanded" }, ngImport: i0 });
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ExpandableItemDirective, decorators: [{
48
43
  type: Directive,
49
44
  args: [{
50
45
  standalone: true,
@@ -54,9 +49,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
54
49
  type: Input
55
50
  }] } });
56
51
 
57
- class ExpandableContainerDirective extends ExpandableContainer {
52
+ class ExpandableContainerDirective {
58
53
  constructor() {
59
- super(...arguments);
60
54
  this.openItems = {};
61
55
  this.multiple = false;
62
56
  }
@@ -75,13 +69,13 @@ class ExpandableContainerDirective extends ExpandableContainer {
75
69
  this.openItems[item.id] = item;
76
70
  }
77
71
  }
78
- ExpandableContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ExpandableContainerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
79
- ExpandableContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: ExpandableContainerDirective, isStandalone: true, selector: "[odxExpandableContainer]", inputs: { multiple: "multiple" }, usesInheritance: true, ngImport: i0 });
72
+ ExpandableContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ExpandableContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
73
+ ExpandableContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.4", type: ExpandableContainerDirective, isStandalone: true, selector: "[odxExpandableContainer]", inputs: { multiple: "multiple" }, ngImport: i0 });
80
74
  __decorate([
81
75
  Transform(coerceBooleanProperty),
82
76
  __metadata("design:type", Object)
83
77
  ], ExpandableContainerDirective.prototype, "multiple", void 0);
84
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ExpandableContainerDirective, decorators: [{
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ExpandableContainerDirective, decorators: [{
85
79
  type: Directive,
86
80
  args: [{
87
81
  standalone: true,
@@ -94,10 +88,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
94
88
  const modules = [ExpandableContainerDirective, ExpandableItemDirective];
95
89
  class ExpandableModule {
96
90
  }
97
- ExpandableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ExpandableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
98
- ExpandableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: ExpandableModule, imports: [ExpandableContainerDirective, ExpandableItemDirective], exports: [ExpandableContainerDirective, ExpandableItemDirective] });
99
- ExpandableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ExpandableModule });
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ExpandableModule, decorators: [{
91
+ ExpandableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ExpandableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
92
+ ExpandableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.4", ngImport: i0, type: ExpandableModule, imports: [ExpandableContainerDirective, ExpandableItemDirective], exports: [ExpandableContainerDirective, ExpandableItemDirective] });
93
+ ExpandableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ExpandableModule });
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: ExpandableModule, decorators: [{
101
95
  type: NgModule,
102
96
  args: [{
103
97
  imports: modules,
@@ -109,5 +103,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
109
103
  * Generated bundle index. Do not edit.
110
104
  */
111
105
 
112
- export { ExpandableContainer, ExpandableContainerDirective, ExpandableItem, ExpandableItemDirective, ExpandableModule };
106
+ export { EXPANDABLE_CONTAINER, ExpandableContainerDirective, ExpandableItemDirective, ExpandableModule };
113
107
  //# sourceMappingURL=odx-angular-cdk-expandable.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-cdk-expandable.mjs","sources":["../../../../libs/angular/cdk/expandable/src/lib/facade/expandable-container.ts","../../../../libs/angular/cdk/expandable/src/lib/facade/expandable-item.ts","../../../../libs/angular/cdk/expandable/src/lib/directives/expandable-item.directive.ts","../../../../libs/angular/cdk/expandable/src/lib/directives/extandable-container.directive.ts","../../../../libs/angular/cdk/expandable/src/lib/expandable.module.ts","../../../../libs/angular/cdk/expandable/src/odx-angular-cdk-expandable.ts"],"sourcesContent":["import { ExpandableItem } from './expandable-item';\n\nexport abstract class ExpandableContainer {\n public abstract close(item: ExpandableItem): void;\n public abstract closeAll(): void;\n public abstract open(item: ExpandableItem): void;\n}\n","export abstract class ExpandableItem {\n public abstract readonly id: string;\n public abstract expanded: boolean;\n\n public abstract close(): void;\n public abstract open(): void;\n public abstract toggle(): void;\n}\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ChangeDetectorRef, Directive, inject, Input } from '@angular/core';\nimport { ExpandableContainer, ExpandableItem } from '../facade';\n\n@Directive({\n standalone: true,\n selector: '[odxExpandableItem]',\n})\nexport class ExpandableItemDirective extends ExpandableItem {\n public static ID = 0;\n public static ngAcceptInputType_expanded: BooleanInput;\n\n private readonly container = inject(ExpandableContainer, { optional: true, skipSelf: true });\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private _expanded = false;\n\n public readonly id = `odx-expandable-item-${ExpandableItemDirective.ID++}`;\n\n @Input()\n public set expanded(value: boolean) {\n this._expanded = coerceBooleanProperty(value);\n if (this._expanded) {\n this.container?.open(this);\n } else {\n this.container?.close(this);\n }\n this.changeDetectorRef.markForCheck();\n }\n public get expanded(): boolean {\n return this._expanded;\n }\n\n public toggle(): void {\n this.expanded = !this.expanded;\n }\n\n public open(): void {\n this.expanded = true;\n }\n\n public close(): void {\n this.expanded = false;\n }\n}\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Directive, Input } from '@angular/core';\nimport { Transform } from '@odx/angular/utils';\nimport { ExpandableContainer, ExpandableItem } from '../facade';\n\n@Directive({\n standalone: true,\n selector: '[odxExpandableContainer]',\n})\nexport class ExpandableContainerDirective extends ExpandableContainer {\n public static ngAcceptInputType_multiple: BooleanInput;\n\n private openItems: Record<string, ExpandableItem> = {};\n\n @Transform(coerceBooleanProperty)\n @Input()\n public multiple = false;\n\n public close(item: ExpandableItem): void {\n delete this.openItems[item.id];\n }\n\n public closeAll(): void {\n for (const item of Object.values(this.openItems)) {\n item.close();\n }\n }\n\n public open(item: ExpandableItem): void {\n if (!this.multiple) {\n this.closeAll();\n }\n this.openItems[item.id] = item;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ExpandableContainerDirective, ExpandableItemDirective } from './directives';\n\nconst modules = [ExpandableContainerDirective, ExpandableItemDirective];\n\n@NgModule({\n imports: modules,\n exports: modules,\n})\nexport class ExpandableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAEsB,mBAAmB,CAAA;AAIxC;;MCNqB,cAAc,CAAA;AAOnC;;ACCK,MAAO,uBAAwB,SAAQ,cAAc,CAAA;AAJ3D,IAAA,WAAA,GAAA;;AAQmB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAC5E,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACvD,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;AAEV,QAAA,IAAA,CAAA,EAAE,GAAG,CAAuB,oBAAA,EAAA,uBAAuB,CAAC,EAAE,EAAE,EAAE,CAAC;AA2B5E,KAAA;IAzBC,IACW,QAAQ,CAAC,KAAc,EAAA;AAChC,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;QAC9C,IAAI,IAAI,CAAC,SAAS,EAAE;AAClB,YAAA,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5B,SAAA;AAAM,aAAA;AACL,YAAA,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,SAAA;AACD,QAAA,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;KACvC;AACD,IAAA,IAAW,QAAQ,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IAEM,MAAM,GAAA;AACX,QAAA,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;KAChC;IAEM,IAAI,GAAA;AACT,QAAA,IAAI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AAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,OAAO;AACjB,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-cdk-expandable.mjs","sources":["../../../../libs/angular/cdk/expandable/src/lib/expandable.tokens.ts","../../../../libs/angular/cdk/expandable/src/lib/directives/expandable-item.directive.ts","../../../../libs/angular/cdk/expandable/src/lib/directives/extandable-container.directive.ts","../../../../libs/angular/cdk/expandable/src/lib/expandable.module.ts","../../../../libs/angular/cdk/expandable/src/odx-angular-cdk-expandable.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ExpandableContainer } from './facade';\n\nexport const EXPANDABLE_CONTAINER = new InjectionToken<ExpandableContainer>('@odx/angular/cdk/expandable::ExpandableContainer');\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ChangeDetectorRef, Directive, inject, Input } from '@angular/core';\nimport { EXPANDABLE_CONTAINER } from '../expandable.tokens';\nimport { ExpandableItem } from '../facade';\n\n@Directive({\n standalone: true,\n selector: '[odxExpandableItem]',\n})\nexport class ExpandableItemDirective implements ExpandableItem {\n public static ID = 0;\n public static ngAcceptInputType_expanded: BooleanInput;\n\n private readonly container = inject(EXPANDABLE_CONTAINER, { optional: true, skipSelf: true });\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private _expanded = false;\n\n public readonly id = `odx-expandable-item-${ExpandableItemDirective.ID++}`;\n\n @Input()\n public set expanded(value: boolean) {\n this._expanded = coerceBooleanProperty(value);\n if (this._expanded) {\n this.container?.open(this);\n } else {\n this.container?.close(this);\n }\n this.changeDetectorRef.markForCheck();\n }\n public get expanded(): boolean {\n return this._expanded;\n }\n\n public toggle(): void {\n this.expanded = !this.expanded;\n }\n\n public open(): void {\n this.expanded = true;\n }\n\n public close(): void {\n this.expanded = false;\n }\n}\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Directive, Input } from '@angular/core';\nimport { Transform } from '@odx/angular/utils';\nimport { ExpandableContainer, ExpandableItem } from '../facade';\n\n@Directive({\n standalone: true,\n selector: '[odxExpandableContainer]',\n})\nexport class ExpandableContainerDirective implements ExpandableContainer {\n public static ngAcceptInputType_multiple: BooleanInput;\n\n private openItems: Record<string, ExpandableItem> = {};\n\n @Transform(coerceBooleanProperty)\n @Input()\n public multiple = false;\n\n public close(item: ExpandableItem): void {\n delete this.openItems[item.id];\n }\n\n public closeAll(): void {\n for (const item of Object.values(this.openItems)) {\n item.close();\n }\n }\n\n public open(item: ExpandableItem): void {\n if (!this.multiple) {\n this.closeAll();\n }\n this.openItems[item.id] = item;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ExpandableContainerDirective, ExpandableItemDirective } from './directives';\n\nconst modules = [ExpandableContainerDirective, ExpandableItemDirective];\n\n@NgModule({\n imports: modules,\n exports: modules,\n})\nexport class ExpandableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAGa,oBAAoB,GAAG,IAAI,cAAc,CAAsB,kDAAkD;;MCMjH,uBAAuB,CAAA;AAJpC,IAAA,WAAA,GAAA;AAQmB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,oBAAoB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7E,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACvD,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;AAEV,QAAA,IAAA,CAAA,EAAE,GAAG,CAAuB,oBAAA,EAAA,uBAAuB,CAAC,EAAE,EAAE,EAAE,CAAC;AA2B5E,KAAA;IAzBC,IACW,QAAQ,CAAC,KAAc,EAAA;AAChC,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,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,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YANZ,4BAA4B,EAAE,uBAAuB,CAArD,EAAA,OAAA,EAAA,CAAA,4BAA4B,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;8GAMzD,gBAAgB,EAAA,CAAA,CAAA;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,OAAO;AACjB,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
@@ -1,29 +1,32 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Directive, HostListener, inject, ChangeDetectorRef, Input, NgModule } from '@angular/core';
2
+ import { InjectionToken, forwardRef, Directive, HostListener, inject, Input, NgModule } from '@angular/core';
3
3
  import { DisabledController, ReadonlyController, detectControllerChanges, CoreModule } from '@odx/angular';
4
- import { booleanToAttributeString } from '@odx/angular/utils';
4
+ import { injectElement, booleanToAttributeString } from '@odx/angular/utils';
5
5
  import { CustomFormControl } from '@odx/angular/cdk/custom-form-control';
6
6
 
7
7
  const RADIO_GROUP_CONTROL = new InjectionToken('@odx/angular/cdk/radio-group-control::RadioGroupControl');
8
8
  class RadioGroupControlDirective extends CustomFormControl {
9
9
  constructor() {
10
10
  super(null);
11
+ this.hostElement = injectElement();
11
12
  }
12
- onFocusOut() {
13
- this.onTouched();
13
+ onFocusOut(event) {
14
+ if (event.target !== this.hostElement.nativeElement) {
15
+ this.onTouched();
16
+ }
14
17
  }
15
18
  }
16
- RadioGroupControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RadioGroupControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
17
- RadioGroupControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: RadioGroupControlDirective, isStandalone: true, selector: "[odxRadioGroupControl]", host: { listeners: { "focusout": "onFocusOut()" } }, providers: [
19
+ RadioGroupControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RadioGroupControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
20
+ RadioGroupControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.4", type: RadioGroupControlDirective, isStandalone: true, selector: "[odxRadioGroupControl]", host: { listeners: { "focusout": "onFocusOut($event)" } }, providers: [
18
21
  {
19
22
  provide: RADIO_GROUP_CONTROL,
20
- useExisting: RadioGroupControlDirective,
23
+ useExisting: forwardRef(() => RadioGroupControlDirective),
21
24
  multi: false,
22
25
  },
23
26
  DisabledController.connect(),
24
27
  ReadonlyController.connect(),
25
28
  ], usesInheritance: true, ngImport: i0 });
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RadioGroupControlDirective, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RadioGroupControlDirective, decorators: [{
27
30
  type: Directive,
28
31
  args: [{
29
32
  standalone: true,
@@ -31,7 +34,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
31
34
  providers: [
32
35
  {
33
36
  provide: RADIO_GROUP_CONTROL,
34
- useExisting: RadioGroupControlDirective,
37
+ useExisting: forwardRef(() => RadioGroupControlDirective),
35
38
  multi: false,
36
39
  },
37
40
  DisabledController.connect(),
@@ -40,27 +43,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
40
43
  }]
41
44
  }], ctorParameters: function () { return []; }, propDecorators: { onFocusOut: [{
42
45
  type: HostListener,
43
- args: ['focusout']
46
+ args: ['focusout', ['$event']]
44
47
  }] } });
45
48
 
46
49
  class RadioControlDirective {
50
+ get ariaChecked() {
51
+ return booleanToAttributeString(this.isActive);
52
+ }
53
+ get isActive() {
54
+ return this.radioGroupControl.value === this.value;
55
+ }
47
56
  constructor() {
48
57
  this.disabledController = DisabledController.inject();
49
58
  this.readonlyController = ReadonlyController.inject();
50
59
  this.radioGroupControl = inject(RADIO_GROUP_CONTROL, { skipSelf: true });
51
60
  this.value = null;
52
- detectControllerChanges(inject(ChangeDetectorRef), this.radioGroupControl).subscribe();
53
- }
54
- get ariaChecked() {
55
- return booleanToAttributeString(this.isActive);
56
- }
57
- get isActive() {
58
- return this.radioGroupControl.controlValue === this.value;
61
+ detectControllerChanges(this.radioGroupControl).subscribe();
59
62
  }
60
63
  }
61
- RadioControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RadioControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
62
- RadioControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: RadioControlDirective, isStandalone: true, selector: "[odxRadioControl]", inputs: { value: "value" }, host: { properties: { "class.is-active": "isActive", "class.is-disabled": "disabledController?.disabled", "class.is-readonly": "readonlyController?.readonly", "class.has-error": "radioGroupControl.hasError" } }, providers: [DisabledController.connect(), ReadonlyController.connect()], ngImport: i0 });
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RadioControlDirective, decorators: [{
64
+ RadioControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RadioControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
65
+ RadioControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.4", type: RadioControlDirective, isStandalone: true, selector: "[odxRadioControl]", inputs: { value: "value" }, host: { properties: { "class.is-active": "isActive", "class.is-disabled": "disabledController?.disabled", "class.is-readonly": "readonlyController?.readonly", "class.has-error": "radioGroupControl.hasError" } }, providers: [DisabledController.connect(), ReadonlyController.connect()], ngImport: i0 });
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RadioControlDirective, decorators: [{
64
67
  type: Directive,
65
68
  args: [{
66
69
  standalone: true,
@@ -80,10 +83,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
80
83
  const modules = [RadioGroupControlDirective, RadioControlDirective];
81
84
  class RadioGroupControlModule {
82
85
  }
83
- RadioGroupControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RadioGroupControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
84
- RadioGroupControlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: RadioGroupControlModule, imports: [RadioGroupControlDirective, RadioControlDirective], exports: [CoreModule, RadioGroupControlDirective, RadioControlDirective] });
85
- RadioGroupControlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RadioGroupControlModule, imports: [CoreModule] });
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: RadioGroupControlModule, decorators: [{
86
+ RadioGroupControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RadioGroupControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
87
+ RadioGroupControlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.4", ngImport: i0, type: RadioGroupControlModule, imports: [RadioGroupControlDirective, RadioControlDirective], exports: [CoreModule, RadioGroupControlDirective, RadioControlDirective] });
88
+ RadioGroupControlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RadioGroupControlModule, imports: [CoreModule] });
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.4", ngImport: i0, type: RadioGroupControlModule, decorators: [{
87
90
  type: NgModule,
88
91
  args: [{
89
92
  imports: modules,