@odx/angular 6.0.0 → 6.0.1

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 (650) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/animations/lib/expand.d.ts +44 -0
  3. package/animations/lib/fade.d.ts +70 -0
  4. package/animations/lib/slide.d.ts +21 -0
  5. package/animations/lib/wait-for-child-animations.d.ts +38 -0
  6. package/breakpoints/lib/breakpoints.config.d.ts +38 -0
  7. package/breakpoints/lib/breakpoints.service.d.ts +43 -0
  8. package/breakpoints/lib/directives/match-breakpoints.directive.d.ts +36 -0
  9. package/breakpoints/lib/helpers/configure-breakpoint.d.ts +19 -0
  10. package/cdk/a11y/lib/directives/interactive.directive.d.ts +32 -0
  11. package/cdk/a11y/lib/directives/list-focus-manager-option.directive.d.ts +22 -0
  12. package/cdk/a11y/lib/directives/list-focus-manager.directive.d.ts +17 -0
  13. package/cdk/active-indicator/lib/active-indicator.directive.d.ts +63 -0
  14. package/cdk/autocomplete-control/lib/autocomplete-control.d.ts +53 -0
  15. package/cdk/checkbox-control/lib/checkbox-control.directive.d.ts +3 -0
  16. package/cdk/connected-overlay/lib/connected-overlay.service.d.ts +44 -0
  17. package/cdk/connected-overlay/lib/helpers/compute-overlay-position.d.ts +10 -0
  18. package/cdk/connected-overlay/lib/models/connected-overlay-ref.d.ts +49 -0
  19. package/cdk/custom-form-control/lib/custom-form-control.d.ts +108 -0
  20. package/cdk/custom-form-control/lib/input-control.directive.d.ts +75 -0
  21. package/cdk/dynamic-view/lib/dynamic-view.directive.d.ts +25 -0
  22. package/cdk/dynamic-view/lib/dynamic-view.service.d.ts +30 -0
  23. package/cdk/dynamic-view/lib/helpers/create-projectable-nodes.d.ts +22 -0
  24. package/cdk/dynamic-view/lib/helpers/is-dynamic-text-content.d.ts +22 -0
  25. package/cdk/dynamic-view/lib/helpers/is-dynamic-view.d.ts +22 -0
  26. package/cdk/dynamic-view/lib/models/dynamic-component-ref.d.ts +39 -0
  27. package/cdk/dynamic-view/lib/models/dynamic-template-ref.d.ts +36 -0
  28. package/cdk/event-plugins/lib/event-plugins.config.d.ts +35 -0
  29. package/cdk/event-plugins/lib/models/event-plugin.d.ts +57 -0
  30. package/cdk/event-plugins/lib/plugins/debounce-event-plugin.d.ts +32 -0
  31. package/cdk/event-plugins/lib/plugins/defer-event-plugin.d.ts +24 -0
  32. package/cdk/expandable/lib/directives/expandable-container.directive.d.ts +41 -0
  33. package/cdk/expandable/lib/directives/expandable-item.directive.d.ts +47 -0
  34. package/cdk/option-control/lib/option-control.d.ts +47 -0
  35. package/cdk/radio-group-control/lib/radio-control.directive.d.ts +8 -0
  36. package/cdk/radio-group-control/lib/radio-group-control.directive.d.ts +11 -0
  37. package/components/accordion/lib/accordion.component.d.ts +8 -0
  38. package/components/accordion/lib/components/accordion-item/accordion-item.component.d.ts +37 -1
  39. package/components/accordion/lib/directives/accordion-item-title.d.ts +3 -0
  40. package/components/action-group/action-group.component.d.ts +6 -0
  41. package/components/area-header/area-header.component.d.ts +8 -0
  42. package/components/area-header/directives/area-header-content.directive.d.ts +3 -0
  43. package/components/area-header/directives/area-header-subtitle.directive.d.ts +3 -0
  44. package/components/autocomplete/lib/autocomplete.component.d.ts +17 -0
  45. package/components/avatar/lib/avatar.component.d.ts +8 -0
  46. package/components/badge/lib/badge.component.d.ts +10 -0
  47. package/components/badge/lib/badge.directive.d.ts +15 -0
  48. package/components/bar/lib/bar.component.d.ts +7 -0
  49. package/components/bar/lib/directives/bar-button.directive.d.ts +3 -0
  50. package/components/bar/lib/directives/bar-label.directive.d.ts +3 -0
  51. package/components/breadcrumbs/lib/breadcrumbs.component.d.ts +3 -0
  52. package/components/button/lib/button.component.d.ts +10 -0
  53. package/components/button-group/lib/button-group.component.d.ts +15 -0
  54. package/components/calendar/lib/calendar.component.d.ts +48 -0
  55. package/components/calendar/lib/calendar.config.d.ts +17 -0
  56. package/components/calendar/lib/calendar.service.d.ts +48 -0
  57. package/components/calendar/lib/components/calendar-header/calendar-header.component.d.ts +24 -0
  58. package/components/calendar/lib/components/calendar-month/calendar-month.component.d.ts +6 -0
  59. package/components/calendar/lib/components/calendar-year/calendar-year.component.d.ts +6 -0
  60. package/components/calendar/lib/components/calendar-years/calendar-years.component.d.ts +6 -0
  61. package/components/calendar/lib/daterange.service.d.ts +16 -0
  62. package/components/calendar/lib/directives/calendar-cell.directive.d.ts +37 -0
  63. package/components/calendar/lib/directives/calendar-view.directive.d.ts +41 -0
  64. package/components/calendar/lib/pipes/date-label.pipe.d.ts +5 -0
  65. package/components/calendar/lib/services/calendar-month.service.d.ts +1 -0
  66. package/components/calendar/lib/services/calendar-year.service.d.ts +1 -0
  67. package/components/calendar/lib/services/calendar-years.service.d.ts +1 -0
  68. package/components/calendar/lib/utils/check-cell-in-range.d.ts +1 -0
  69. package/components/calendar/lib/utils/check-identical-date.d.ts +1 -0
  70. package/components/calendar/lib/utils/get-A11y-label.d.ts +1 -0
  71. package/components/calendar/lib/utils/is-date-disabled.d.ts +1 -0
  72. package/components/calendar/lib/utils/parse-date.d.ts +1 -0
  73. package/components/calendar/lib/utils/validate-daterange.d.ts +1 -0
  74. package/components/calendar/lib/utils/validate-max-date.d.ts +1 -0
  75. package/components/calendar/lib/utils/validate-min-date.d.ts +1 -0
  76. package/components/calendar/lib/utils/validate-next-date-set.d.ts +1 -0
  77. package/components/calendar/lib/utils/validate-previous-date-set.d.ts +1 -0
  78. package/components/checkbox/lib/checkbox.component.d.ts +32 -0
  79. package/components/checkbox/lib/checkbox.validator.d.ts +23 -0
  80. package/components/chip/lib/components/chip/chip.component.d.ts +14 -0
  81. package/components/chip/lib/components/chip-list/chip-list.component.d.ts +3 -0
  82. package/components/chip/lib/components/chip-list-row/chip-list-row.component.d.ts +3 -0
  83. package/components/circular-progress/lib/circular-progress.component.d.ts +20 -0
  84. package/components/content-box/lib/content-box.component.d.ts +3 -0
  85. package/components/content-box/lib/directives/content-box-footer.directive.d.ts +3 -0
  86. package/components/content-box/lib/directives/content-box-header.directive.d.ts +3 -0
  87. package/components/datepicker/lib/datepicker.component.d.ts +47 -0
  88. package/components/datepicker/lib/datepicker.config.d.ts +19 -0
  89. package/components/datepicker/lib/directives/datepicker-input-control.directive.d.ts +30 -0
  90. package/components/datepicker/lib/utils/get-datepicker-input-pattern.d.ts +2 -0
  91. package/components/datepicker/lib/utils/get-datepicker-input-value-as-date.d.ts +1 -0
  92. package/components/daterangepicker/lib/daterangepicker.component.d.ts +89 -0
  93. package/components/daterangepicker/lib/daterangepicker.config.d.ts +19 -0
  94. package/components/daterangepicker/lib/directives/daterangepicker-input-control.directive.d.ts +30 -0
  95. package/components/daterangepicker/lib/range.validator.d.ts +15 -0
  96. package/components/daterangepicker/lib/required.validator.d.ts +6 -0
  97. package/components/daterangepicker/lib/utils/get-daterangepicker-input-pattern.d.ts +2 -0
  98. package/components/daterangepicker/lib/utils/get-daterangepicker-input-value-as-date.d.ts +1 -0
  99. package/components/dropdown/lib/dropdown.component.d.ts +16 -0
  100. package/components/dropdown/lib/dropdown.directive.d.ts +67 -0
  101. package/components/dropdown/lib/helpers/close-current-dropdown.d.ts +5 -0
  102. package/components/error-page/lib/error-page.component.d.ts +7 -0
  103. package/components/error-page/lib/error-page.config.d.ts +18 -0
  104. package/components/footer/lib/footer.component.d.ts +9 -6
  105. package/components/footer/lib/footer.config.d.ts +2 -0
  106. package/components/form-field/lib/components/form-field-info/form-field-info.component.d.ts +13 -0
  107. package/components/form-field/lib/components/form-group/form-group.component.d.ts +16 -0
  108. package/components/form-field/lib/directives/form-field-control.directive.d.ts +5 -0
  109. package/components/form-field/lib/directives/form-field-error.directive.d.ts +6 -0
  110. package/components/form-field/lib/directives/form-field-hint.directive.d.ts +3 -0
  111. package/components/form-field/lib/directives/form-field-label.directive.d.ts +3 -0
  112. package/components/form-field/lib/directives/form.directive.d.ts +13 -0
  113. package/components/form-field/lib/form-field.component.d.ts +20 -0
  114. package/components/form-field/lib/form-field.service.d.ts +42 -0
  115. package/components/form-field/lib/services/form-field-error.service.d.ts +24 -0
  116. package/components/header/lib/directives/header-avatar.directive.d.ts +4 -0
  117. package/components/header/lib/directives/header-title.directive.d.ts +3 -0
  118. package/components/header/lib/header.component.d.ts +3 -0
  119. package/components/header-navigation/lib/directives/header-navigation-link.directive.d.ts +3 -0
  120. package/components/header-navigation/lib/header-navigation.component.d.ts +6 -0
  121. package/components/icon/lib/helpers/unpack-icon-identifier.d.ts +14 -0
  122. package/components/icon/lib/icon.component.d.ts +24 -0
  123. package/components/icon/lib/icon.config.d.ts +26 -0
  124. package/components/inline-message/lib/inline-message.component.d.ts +13 -0
  125. package/components/link/link.directive.d.ts +3 -0
  126. package/components/list/lib/components/expandable-list-item/expandable-list-item.component.d.ts +6 -0
  127. package/components/list/lib/components/list-item/list-item.component.d.ts +17 -1
  128. package/components/list/lib/list.component.d.ts +5 -0
  129. package/components/loading-spinner/lib/loading-spinner.component.d.ts +8 -0
  130. package/components/loading-spinner/lib/loading-spinner.directive.d.ts +22 -0
  131. package/components/logo/logo.directive.d.ts +15 -0
  132. package/components/main-menu/lib/directives/main-menu-button.directive.d.ts +5 -1
  133. package/components/main-menu/lib/directives/main-menu-close.directive.d.ts +3 -0
  134. package/components/main-menu/lib/directives/main-menu-item.directive.d.ts +16 -0
  135. package/components/main-menu/lib/helpers/create-main-menu-links.d.ts +1 -0
  136. package/components/main-menu/lib/main-menu.component.d.ts +42 -0
  137. package/components/main-menu/lib/main-menu.config.d.ts +31 -0
  138. package/components/main-menu/lib/main-menu.service.d.ts +28 -0
  139. package/components/mainfilter-group/lib/mainfilter-group.component.d.ts +4 -0
  140. package/components/menu/lib/directives/menu-item.directive.d.ts +6 -0
  141. package/components/menu/lib/menu.component.d.ts +13 -1
  142. package/components/menu/lib/menu.directive.d.ts +31 -0
  143. package/components/modal/lib/components/basic-modal/basic-modal.component.d.ts +14 -0
  144. package/components/modal/lib/components/modal-footer/modal-footer.component.d.ts +3 -0
  145. package/components/modal/lib/components/modal-header/modal-header.component.d.ts +9 -0
  146. package/components/modal/lib/components/modal-hero/modal-hero.component.d.ts +21 -0
  147. package/components/modal/lib/directives/modal-close.directive.d.ts +25 -1
  148. package/components/modal/lib/directives/modal-content.directive.d.ts +3 -0
  149. package/components/modal/lib/directives/modal-dismiss.directive.d.ts +18 -1
  150. package/components/modal/lib/helpers/inject-modal-ref.d.ts +21 -0
  151. package/components/modal/lib/helpers/provide-modal-ref.d.ts +9 -0
  152. package/components/modal/lib/modal.component.d.ts +25 -0
  153. package/components/modal/lib/modal.config.d.ts +33 -0
  154. package/components/modal/lib/modal.directive.d.ts +29 -0
  155. package/components/modal/lib/modal.service.d.ts +54 -0
  156. package/components/modal/lib/models/modal-ref.d.ts +34 -0
  157. package/components/navigation-back/lib/navigation-back.component.d.ts +3 -0
  158. package/components/notification/lib/components/notification-center/notification-center.component.d.ts +0 -2
  159. package/components/notification/lib/directives/notification-center.directive.d.ts +18 -4
  160. package/components/notification/lib/helpers/get-notifications-by-tag.d.ts +1 -0
  161. package/components/notification/lib/helpers/sort-notifications.d.ts +1 -0
  162. package/components/notification/lib/helpers/to-notification-collection.d.ts +1 -0
  163. package/components/notification/lib/models/notification-feature.d.ts +15 -0
  164. package/components/notification/lib/notification.config.d.ts +54 -0
  165. package/components/notification/lib/notification.logger.d.ts +1 -0
  166. package/components/notification/lib/notification.service.d.ts +55 -0
  167. package/components/notification/lib/notification.tokens.d.ts +3 -0
  168. package/components/notification/lib/services/notification-center.service.d.ts +9 -0
  169. package/components/paginator/lib/paginator.component.d.ts +89 -0
  170. package/components/paginator/lib/paginator.config.d.ts +24 -2
  171. package/components/progress/lib/progress.component.d.ts +15 -0
  172. package/components/radio-group/lib/radio-group.component.d.ts +11 -0
  173. package/components/rail-navigation/lib/components/rail-navigation-item/rail-navigation-item.component.d.ts +19 -0
  174. package/components/rail-navigation/lib/rail-navigation.component.d.ts +26 -0
  175. package/components/rich-list/lib/components/rich-list-content/rich-list-content.component.d.ts +4 -0
  176. package/components/rich-list/lib/components/rich-list-header/rich-list-header.component.d.ts +4 -0
  177. package/components/rich-list/lib/components/rich-list-item/rich-list-item.component.d.ts +9 -1
  178. package/components/rich-list/lib/rich-list.component.d.ts +9 -2
  179. package/components/select/lib/components/select-option/select-option.component.d.ts +39 -2
  180. package/components/select/lib/directives/select-input-control.directive.d.ts +11 -0
  181. package/components/select/lib/pipes/select-search-filter.pipe.d.ts +10 -0
  182. package/components/select/lib/select.component.d.ts +59 -0
  183. package/components/slider/lib/slider.directive.d.ts +19 -0
  184. package/components/spinbox/lib/spinbox.component.d.ts +16 -0
  185. package/components/switch/lib/switch.component.d.ts +10 -0
  186. package/components/switch/lib/switch.validator.d.ts +12 -0
  187. package/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.d.ts +28 -0
  188. package/components/tab-bar/lib/tab-bar.component.d.ts +69 -0
  189. package/components/table/lib/components/check-cell/check-cell.component.d.ts +18 -0
  190. package/components/table/lib/components/header-title/header-title.component.d.ts +33 -1
  191. package/components/table/lib/directives/table-cell.directive.d.ts +4 -0
  192. package/components/table/lib/directives/table-row.directive.d.ts +4 -0
  193. package/components/table/lib/table.component.d.ts +36 -0
  194. package/components/timepicker/lib/timepicker.component.d.ts +11 -2
  195. package/components/timepicker/lib/utils/generate-time-stamps.d.ts +2 -1
  196. package/components/timepicker/lib/utils/ngx-mask-helper.d.ts +2 -2
  197. package/components/toast/lib/toast.config.d.ts +26 -0
  198. package/components/toast/lib/toast.service.d.ts +35 -0
  199. package/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.d.ts +11 -0
  200. package/components/toggle-button-group/lib/toggle-button-group.component.d.ts +12 -0
  201. package/components/tooltip/lib/tooltip.component.d.ts +20 -0
  202. package/components/tooltip/lib/tooltip.directive.d.ts +35 -0
  203. package/components/wizard/lib/components/wizard-step/wizard-step.component.d.ts +34 -0
  204. package/components/wizard/lib/wizard.component.d.ts +20 -0
  205. package/esm2022/animations/lib/expand.mjs +45 -1
  206. package/esm2022/animations/lib/fade.mjs +71 -1
  207. package/esm2022/animations/lib/slide.mjs +22 -1
  208. package/esm2022/animations/lib/wait-for-child-animations.mjs +39 -1
  209. package/esm2022/breakpoints/lib/breakpoints.config.mjs +39 -1
  210. package/esm2022/breakpoints/lib/breakpoints.service.mjs +44 -1
  211. package/esm2022/breakpoints/lib/directives/match-breakpoints.directive.mjs +37 -1
  212. package/esm2022/breakpoints/lib/helpers/configure-breakpoint.mjs +20 -1
  213. package/esm2022/cdk/a11y/lib/directives/interactive.directive.mjs +33 -1
  214. package/esm2022/cdk/a11y/lib/directives/list-focus-manager-option.directive.mjs +23 -1
  215. package/esm2022/cdk/a11y/lib/directives/list-focus-manager.directive.mjs +18 -1
  216. package/esm2022/cdk/active-indicator/lib/active-indicator.directive.mjs +64 -1
  217. package/esm2022/cdk/autocomplete-control/lib/autocomplete-control.mjs +39 -1
  218. package/esm2022/cdk/checkbox-control/lib/checkbox-control.directive.mjs +4 -1
  219. package/esm2022/cdk/connected-overlay/lib/connected-overlay.service.mjs +45 -1
  220. package/esm2022/cdk/connected-overlay/lib/helpers/compute-overlay-position.mjs +11 -1
  221. package/esm2022/cdk/connected-overlay/lib/models/connected-overlay-ref.mjs +50 -1
  222. package/esm2022/cdk/custom-form-control/lib/custom-form-control.mjs +109 -3
  223. package/esm2022/cdk/custom-form-control/lib/input-control.directive.mjs +76 -1
  224. package/esm2022/cdk/dynamic-view/lib/dynamic-view.directive.mjs +18 -1
  225. package/esm2022/cdk/dynamic-view/lib/dynamic-view.service.mjs +31 -1
  226. package/esm2022/cdk/dynamic-view/lib/helpers/create-projectable-nodes.mjs +23 -1
  227. package/esm2022/cdk/dynamic-view/lib/helpers/is-dynamic-text-content.mjs +23 -1
  228. package/esm2022/cdk/dynamic-view/lib/helpers/is-dynamic-view.mjs +23 -1
  229. package/esm2022/cdk/dynamic-view/lib/models/dynamic-component-ref.mjs +40 -1
  230. package/esm2022/cdk/dynamic-view/lib/models/dynamic-template-ref.mjs +37 -1
  231. package/esm2022/cdk/event-plugins/lib/event-plugins.config.mjs +36 -1
  232. package/esm2022/cdk/event-plugins/lib/models/event-plugin.mjs +45 -1
  233. package/esm2022/cdk/event-plugins/lib/plugins/debounce-event-plugin.mjs +33 -1
  234. package/esm2022/cdk/event-plugins/lib/plugins/defer-event-plugin.mjs +25 -1
  235. package/esm2022/cdk/expandable/lib/directives/expandable-container.directive.mjs +42 -1
  236. package/esm2022/cdk/expandable/lib/directives/expandable-item.directive.mjs +48 -1
  237. package/esm2022/cdk/option-control/lib/option-control.mjs +48 -1
  238. package/esm2022/cdk/radio-group-control/lib/radio-control.directive.mjs +9 -1
  239. package/esm2022/cdk/radio-group-control/lib/radio-group-control.directive.mjs +12 -1
  240. package/esm2022/components/accordion/lib/accordion.component.mjs +9 -1
  241. package/esm2022/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +31 -1
  242. package/esm2022/components/accordion/lib/directives/accordion-item-title.mjs +4 -1
  243. package/esm2022/components/action-group/action-group.component.mjs +7 -1
  244. package/esm2022/components/area-header/area-header.component.mjs +9 -1
  245. package/esm2022/components/area-header/directives/area-header-content.directive.mjs +4 -1
  246. package/esm2022/components/area-header/directives/area-header-subtitle.directive.mjs +4 -1
  247. package/esm2022/components/autocomplete/lib/autocomplete.component.mjs +18 -1
  248. package/esm2022/components/avatar/lib/avatar.component.mjs +9 -1
  249. package/esm2022/components/badge/lib/badge.component.mjs +11 -1
  250. package/esm2022/components/badge/lib/badge.directive.mjs +16 -1
  251. package/esm2022/components/bar/lib/bar.component.mjs +8 -1
  252. package/esm2022/components/bar/lib/directives/bar-button.directive.mjs +4 -1
  253. package/esm2022/components/bar/lib/directives/bar-label.directive.mjs +4 -1
  254. package/esm2022/components/breadcrumbs/lib/breadcrumbs.component.mjs +4 -1
  255. package/esm2022/components/button/lib/button.component.mjs +11 -1
  256. package/esm2022/components/button-group/lib/button-group.component.mjs +16 -1
  257. package/esm2022/components/calendar/lib/calendar.component.mjs +35 -1
  258. package/esm2022/components/calendar/lib/calendar.config.mjs +18 -1
  259. package/esm2022/components/calendar/lib/calendar.service.mjs +49 -1
  260. package/esm2022/components/calendar/lib/components/calendar-header/calendar-header.component.mjs +19 -1
  261. package/esm2022/components/calendar/lib/components/calendar-month/calendar-month.component.mjs +7 -1
  262. package/esm2022/components/calendar/lib/components/calendar-year/calendar-year.component.mjs +7 -1
  263. package/esm2022/components/calendar/lib/components/calendar-years/calendar-years.component.mjs +7 -1
  264. package/esm2022/components/calendar/lib/daterange.service.mjs +17 -1
  265. package/esm2022/components/calendar/lib/directives/calendar-cell.directive.mjs +26 -1
  266. package/esm2022/components/calendar/lib/directives/calendar-view.directive.mjs +39 -1
  267. package/esm2022/components/calendar/lib/pipes/date-label.pipe.mjs +6 -1
  268. package/esm2022/components/calendar/lib/services/calendar-month.service.mjs +2 -1
  269. package/esm2022/components/calendar/lib/services/calendar-year.service.mjs +2 -1
  270. package/esm2022/components/calendar/lib/services/calendar-years.service.mjs +2 -1
  271. package/esm2022/components/calendar/lib/utils/check-cell-in-range.mjs +2 -1
  272. package/esm2022/components/calendar/lib/utils/check-identical-date.mjs +2 -1
  273. package/esm2022/components/calendar/lib/utils/get-A11y-label.mjs +2 -1
  274. package/esm2022/components/calendar/lib/utils/is-date-disabled.mjs +2 -1
  275. package/esm2022/components/calendar/lib/utils/parse-date.mjs +2 -1
  276. package/esm2022/components/calendar/lib/utils/validate-daterange.mjs +2 -1
  277. package/esm2022/components/calendar/lib/utils/validate-max-date.mjs +2 -1
  278. package/esm2022/components/calendar/lib/utils/validate-min-date.mjs +2 -1
  279. package/esm2022/components/calendar/lib/utils/validate-next-date-set.mjs +2 -1
  280. package/esm2022/components/calendar/lib/utils/validate-previous-date-set.mjs +2 -1
  281. package/esm2022/components/checkbox/lib/checkbox.component.mjs +33 -1
  282. package/esm2022/components/checkbox/lib/checkbox.validator.mjs +24 -1
  283. package/esm2022/components/chip/lib/components/chip/chip.component.mjs +15 -1
  284. package/esm2022/components/chip/lib/components/chip-list/chip-list.component.mjs +4 -1
  285. package/esm2022/components/chip/lib/components/chip-list-row/chip-list-row.component.mjs +4 -1
  286. package/esm2022/components/circular-progress/lib/circular-progress.component.mjs +21 -1
  287. package/esm2022/components/content-box/lib/content-box.component.mjs +4 -1
  288. package/esm2022/components/content-box/lib/directives/content-box-footer.directive.mjs +4 -1
  289. package/esm2022/components/content-box/lib/directives/content-box-header.directive.mjs +4 -1
  290. package/esm2022/components/datepicker/lib/datepicker.component.mjs +33 -1
  291. package/esm2022/components/datepicker/lib/datepicker.config.mjs +20 -1
  292. package/esm2022/components/datepicker/lib/directives/datepicker-input-control.directive.mjs +31 -1
  293. package/esm2022/components/datepicker/lib/utils/get-datepicker-input-pattern.mjs +3 -1
  294. package/esm2022/components/datepicker/lib/utils/get-datepicker-input-value-as-date.mjs +2 -1
  295. package/esm2022/components/daterangepicker/lib/daterangepicker.component.mjs +65 -1
  296. package/esm2022/components/daterangepicker/lib/daterangepicker.config.mjs +20 -1
  297. package/esm2022/components/daterangepicker/lib/directives/daterangepicker-input-control.directive.mjs +31 -1
  298. package/esm2022/components/daterangepicker/lib/range.validator.mjs +16 -1
  299. package/esm2022/components/daterangepicker/lib/required.validator.mjs +15 -1
  300. package/esm2022/components/daterangepicker/lib/utils/get-daterangepicker-input-pattern.mjs +3 -1
  301. package/esm2022/components/daterangepicker/lib/utils/get-daterangepicker-input-value-as-date.mjs +2 -1
  302. package/esm2022/components/dropdown/lib/dropdown.component.mjs +8 -1
  303. package/esm2022/components/dropdown/lib/dropdown.directive.mjs +55 -1
  304. package/esm2022/components/dropdown/lib/helpers/close-current-dropdown.mjs +6 -1
  305. package/esm2022/components/error-page/lib/error-page.component.mjs +8 -1
  306. package/esm2022/components/error-page/lib/error-page.config.mjs +9 -1
  307. package/esm2022/components/footer/lib/footer.component.mjs +10 -7
  308. package/esm2022/components/footer/lib/footer.config.mjs +3 -1
  309. package/esm2022/components/form-field/lib/components/form-field-info/form-field-info.component.mjs +14 -1
  310. package/esm2022/components/form-field/lib/components/form-group/form-group.component.mjs +13 -1
  311. package/esm2022/components/form-field/lib/directives/form-field-control.directive.mjs +6 -1
  312. package/esm2022/components/form-field/lib/directives/form-field-error.directive.mjs +4 -1
  313. package/esm2022/components/form-field/lib/directives/form-field-hint.directive.mjs +4 -1
  314. package/esm2022/components/form-field/lib/directives/form-field-label.directive.mjs +4 -1
  315. package/esm2022/components/form-field/lib/directives/form.directive.mjs +14 -1
  316. package/esm2022/components/form-field/lib/form-field.component.mjs +14 -1
  317. package/esm2022/components/form-field/lib/form-field.service.mjs +43 -1
  318. package/esm2022/components/form-field/lib/services/form-field-error.service.mjs +25 -1
  319. package/esm2022/components/header/lib/directives/header-avatar.directive.mjs +5 -1
  320. package/esm2022/components/header/lib/directives/header-title.directive.mjs +4 -1
  321. package/esm2022/components/header/lib/header.component.mjs +4 -1
  322. package/esm2022/components/header-navigation/lib/directives/header-navigation-link.directive.mjs +4 -1
  323. package/esm2022/components/header-navigation/lib/header-navigation.component.mjs +4 -1
  324. package/esm2022/components/icon/lib/helpers/unpack-icon-identifier.mjs +15 -1
  325. package/esm2022/components/icon/lib/icon.component.mjs +25 -1
  326. package/esm2022/components/icon/lib/icon.config.mjs +20 -1
  327. package/esm2022/components/inline-message/lib/inline-message.component.mjs +14 -1
  328. package/esm2022/components/link/link.directive.mjs +4 -1
  329. package/esm2022/components/list/lib/components/expandable-list-item/expandable-list-item.component.mjs +7 -1
  330. package/esm2022/components/list/lib/components/list-item/list-item.component.mjs +18 -2
  331. package/esm2022/components/list/lib/list.component.mjs +6 -1
  332. package/esm2022/components/loading-spinner/lib/loading-spinner.component.mjs +10 -2
  333. package/esm2022/components/loading-spinner/lib/loading-spinner.directive.mjs +23 -1
  334. package/esm2022/components/logo/logo.directive.mjs +16 -1
  335. package/esm2022/components/main-menu/lib/directives/main-menu-button.directive.mjs +5 -1
  336. package/esm2022/components/main-menu/lib/directives/main-menu-close.directive.mjs +4 -1
  337. package/esm2022/components/main-menu/lib/directives/main-menu-item.directive.mjs +17 -1
  338. package/esm2022/components/main-menu/lib/helpers/create-main-menu-links.mjs +2 -1
  339. package/esm2022/components/main-menu/lib/main-menu.component.mjs +37 -1
  340. package/esm2022/components/main-menu/lib/main-menu.config.mjs +32 -1
  341. package/esm2022/components/main-menu/lib/main-menu.service.mjs +29 -1
  342. package/esm2022/components/mainfilter-group/lib/mainfilter-group.component.mjs +5 -1
  343. package/esm2022/components/menu/lib/directives/menu-item.directive.mjs +7 -1
  344. package/esm2022/components/menu/lib/menu.component.mjs +13 -1
  345. package/esm2022/components/menu/lib/menu.directive.mjs +19 -1
  346. package/esm2022/components/modal/lib/components/basic-modal/basic-modal.component.mjs +15 -1
  347. package/esm2022/components/modal/lib/components/modal-footer/modal-footer.component.mjs +4 -1
  348. package/esm2022/components/modal/lib/components/modal-header/modal-header.component.mjs +4 -1
  349. package/esm2022/components/modal/lib/components/modal-hero/modal-hero.component.mjs +12 -1
  350. package/esm2022/components/modal/lib/directives/modal-close.directive.mjs +25 -1
  351. package/esm2022/components/modal/lib/directives/modal-content.directive.mjs +4 -1
  352. package/esm2022/components/modal/lib/directives/modal-dismiss.directive.mjs +18 -1
  353. package/esm2022/components/modal/lib/helpers/inject-modal-ref.mjs +22 -1
  354. package/esm2022/components/modal/lib/helpers/provide-modal-ref.mjs +10 -1
  355. package/esm2022/components/modal/lib/modal.component.mjs +21 -2
  356. package/esm2022/components/modal/lib/modal.config.mjs +34 -1
  357. package/esm2022/components/modal/lib/modal.directive.mjs +25 -1
  358. package/esm2022/components/modal/lib/modal.service.mjs +39 -1
  359. package/esm2022/components/modal/lib/models/modal-ref.mjs +34 -1
  360. package/esm2022/components/navigation-back/lib/navigation-back.component.mjs +4 -1
  361. package/esm2022/components/notification/lib/components/notification-center/notification-center.component.mjs +1 -3
  362. package/esm2022/components/notification/lib/directives/notification-center.directive.mjs +19 -5
  363. package/esm2022/components/notification/lib/helpers/get-notifications-by-tag.mjs +2 -1
  364. package/esm2022/components/notification/lib/helpers/sort-notifications.mjs +2 -1
  365. package/esm2022/components/notification/lib/helpers/to-notification-collection.mjs +2 -1
  366. package/esm2022/components/notification/lib/models/notification-feature.mjs +16 -1
  367. package/esm2022/components/notification/lib/notification.config.mjs +45 -1
  368. package/esm2022/components/notification/lib/notification.logger.mjs +2 -1
  369. package/esm2022/components/notification/lib/notification.service.mjs +56 -1
  370. package/esm2022/components/notification/lib/notification.tokens.mjs +4 -1
  371. package/esm2022/components/notification/lib/services/notification-center.service.mjs +10 -1
  372. package/esm2022/components/paginator/lib/paginator.component.mjs +90 -1
  373. package/esm2022/components/paginator/lib/paginator.config.mjs +29 -1
  374. package/esm2022/components/progress/lib/progress.component.mjs +16 -1
  375. package/esm2022/components/radio-group/lib/radio-group.component.mjs +13 -2
  376. package/esm2022/components/rail-navigation/lib/components/rail-navigation-item/rail-navigation-item.component.mjs +17 -1
  377. package/esm2022/components/rail-navigation/lib/rail-navigation.component.mjs +27 -1
  378. package/esm2022/components/rich-list/lib/components/rich-list-content/rich-list-content.component.mjs +5 -1
  379. package/esm2022/components/rich-list/lib/components/rich-list-header/rich-list-header.component.mjs +5 -1
  380. package/esm2022/components/rich-list/lib/components/rich-list-item/rich-list-item.component.mjs +10 -2
  381. package/esm2022/components/rich-list/lib/rich-list.component.mjs +10 -3
  382. package/esm2022/components/select/lib/components/select-option/select-option.component.mjs +47 -6
  383. package/esm2022/components/select/lib/directives/select-input-control.directive.mjs +12 -2
  384. package/esm2022/components/select/lib/pipes/select-search-filter.pipe.mjs +11 -1
  385. package/esm2022/components/select/lib/select.component.mjs +56 -2
  386. package/esm2022/components/slider/lib/slider.directive.mjs +20 -1
  387. package/esm2022/components/spinbox/lib/spinbox.component.mjs +17 -1
  388. package/esm2022/components/switch/lib/switch.component.mjs +11 -1
  389. package/esm2022/components/switch/lib/switch.validator.mjs +13 -1
  390. package/esm2022/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.mjs +29 -1
  391. package/esm2022/components/tab-bar/lib/tab-bar.component.mjs +70 -1
  392. package/esm2022/components/table/lib/components/check-cell/check-cell.component.mjs +19 -1
  393. package/esm2022/components/table/lib/components/header-title/header-title.component.mjs +30 -2
  394. package/esm2022/components/table/lib/directives/table-cell.directive.mjs +5 -1
  395. package/esm2022/components/table/lib/directives/table-row.directive.mjs +5 -1
  396. package/esm2022/components/table/lib/table.component.mjs +30 -1
  397. package/esm2022/components/timepicker/lib/timepicker.component.mjs +15 -6
  398. package/esm2022/components/timepicker/lib/utils/generate-time-stamps.mjs +5 -3
  399. package/esm2022/components/timepicker/lib/utils/ngx-mask-helper.mjs +3 -3
  400. package/esm2022/components/toast/lib/toast.config.mjs +27 -1
  401. package/esm2022/components/toast/lib/toast.service.mjs +36 -1
  402. package/esm2022/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.mjs +12 -1
  403. package/esm2022/components/toggle-button-group/lib/toggle-button-group.component.mjs +14 -2
  404. package/esm2022/components/tooltip/lib/tooltip.component.mjs +18 -1
  405. package/esm2022/components/tooltip/lib/tooltip.directive.mjs +36 -1
  406. package/esm2022/components/wizard/lib/components/wizard-step/wizard-step.component.mjs +35 -1
  407. package/esm2022/components/wizard/lib/wizard.component.mjs +21 -1
  408. package/esm2022/internal/translate/lib/translate.config.mjs +32 -1
  409. package/esm2022/internal/translate/lib/translate.service.mjs +30 -1
  410. package/esm2022/lib/controllers/controller.mjs +26 -1
  411. package/esm2022/lib/controllers/disabled.controller.mjs +60 -1
  412. package/esm2022/lib/controllers/readonly.controller.mjs +57 -1
  413. package/esm2022/lib/directives/click-outside.directive.mjs +30 -1
  414. package/esm2022/lib/directives/delegate-focus.directive.mjs +15 -1
  415. package/esm2022/lib/services/window-ref.mjs +67 -1
  416. package/esm2022/lib/tokens/identity-matcher.mjs +25 -1
  417. package/esm2022/lib/tokens/string-search-handler.mjs +25 -1
  418. package/esm2022/lib/tokens/stringify.mjs +26 -1
  419. package/esm2022/localization/lib/features/with-http-language-header.mjs +54 -1
  420. package/esm2022/localization/lib/features/with-http-language-query-param.mjs +52 -1
  421. package/esm2022/localization/lib/loaders/browser-language-loader.mjs +33 -1
  422. package/esm2022/localization/lib/localization.config.mjs +71 -1
  423. package/esm2022/localization/lib/localization.service.mjs +42 -3
  424. package/esm2022/rxjs/index.mjs +2 -2
  425. package/esm2022/rxjs/lib/delay-until.mjs +23 -1
  426. package/esm2022/rxjs/lib/from-element-mutation.mjs +22 -1
  427. package/esm2022/rxjs/lib/from-element-resize.mjs +25 -1
  428. package/esm2022/rxjs/lib/from-events.mjs +25 -1
  429. package/esm2022/rxjs/lib/from-query-list.mjs +24 -0
  430. package/esm2022/sdk/lib/application-environment.mjs +51 -1
  431. package/esm2022/theming/lib/helpers/prefers-dark-theme.mjs +19 -1
  432. package/esm2022/theming/lib/helpers/resolve-theme.mjs +26 -1
  433. package/esm2022/theming/lib/helpers/theme-storage.mjs +43 -1
  434. package/esm2022/theming/lib/theming.config.mjs +34 -1
  435. package/esm2022/theming/lib/theming.service.mjs +32 -1
  436. package/esm2022/utils/lib/decorators/pure.mjs +52 -1
  437. package/esm2022/utils/lib/helpers/angular.mjs +37 -1
  438. package/esm2022/utils/lib/helpers/array.mjs +5 -1
  439. package/esm2022/utils/lib/helpers/build-url.mjs +21 -1
  440. package/esm2022/utils/lib/helpers/build-website-url.mjs +3 -2
  441. package/esm2022/utils/lib/helpers/cache-storage-client.mjs +52 -1
  442. package/esm2022/utils/lib/helpers/coercion.mjs +18 -1
  443. package/esm2022/utils/lib/helpers/debounce.mjs +28 -1
  444. package/esm2022/utils/lib/helpers/defer-fn.mjs +21 -1
  445. package/esm2022/utils/lib/helpers/dom.mjs +71 -1
  446. package/esm2022/utils/lib/helpers/get-axis.mjs +21 -1
  447. package/esm2022/utils/lib/helpers/get-language-code.mjs +18 -1
  448. package/esm2022/utils/lib/helpers/get-opposite-side.mjs +22 -1
  449. package/esm2022/utils/lib/helpers/get-side.mjs +18 -1
  450. package/esm2022/utils/lib/helpers/get-unique-id.mjs +34 -1
  451. package/esm2022/utils/lib/helpers/match-url.mjs +41 -1
  452. package/esm2022/utils/lib/helpers/ng-changes.mjs +30 -1
  453. package/esm2022/utils/lib/helpers/provide-config.mjs +57 -1
  454. package/esm2022/utils/lib/helpers/queue.mjs +84 -1
  455. package/esm2022/utils/lib/helpers/type-guards.mjs +58 -1
  456. package/esm2022/utils/lib/helpers/until-destroyed.mjs +39 -1
  457. package/fesm2022/odx-angular-animations.mjs +173 -0
  458. package/fesm2022/odx-angular-animations.mjs.map +1 -1
  459. package/fesm2022/odx-angular-breakpoints.mjs +136 -0
  460. package/fesm2022/odx-angular-breakpoints.mjs.map +1 -1
  461. package/fesm2022/odx-angular-cdk-a11y.mjs +71 -0
  462. package/fesm2022/odx-angular-cdk-a11y.mjs.map +1 -1
  463. package/fesm2022/odx-angular-cdk-active-indicator.mjs +63 -0
  464. package/fesm2022/odx-angular-cdk-active-indicator.mjs.map +1 -1
  465. package/fesm2022/odx-angular-cdk-autocomplete-control.mjs +38 -0
  466. package/fesm2022/odx-angular-cdk-autocomplete-control.mjs.map +1 -1
  467. package/fesm2022/odx-angular-cdk-checkbox-control.mjs +3 -0
  468. package/fesm2022/odx-angular-cdk-checkbox-control.mjs.map +1 -1
  469. package/fesm2022/odx-angular-cdk-connected-overlay.mjs +103 -0
  470. package/fesm2022/odx-angular-cdk-connected-overlay.mjs.map +1 -1
  471. package/fesm2022/odx-angular-cdk-custom-form-control.mjs +183 -2
  472. package/fesm2022/odx-angular-cdk-custom-form-control.mjs.map +1 -1
  473. package/fesm2022/odx-angular-cdk-dynamic-view.mjs +188 -0
  474. package/fesm2022/odx-angular-cdk-dynamic-view.mjs.map +1 -1
  475. package/fesm2022/odx-angular-cdk-event-plugins.mjs +135 -0
  476. package/fesm2022/odx-angular-cdk-event-plugins.mjs.map +1 -1
  477. package/fesm2022/odx-angular-cdk-expandable.mjs +88 -0
  478. package/fesm2022/odx-angular-cdk-expandable.mjs.map +1 -1
  479. package/fesm2022/odx-angular-cdk-option-control.mjs +47 -0
  480. package/fesm2022/odx-angular-cdk-option-control.mjs.map +1 -1
  481. package/fesm2022/odx-angular-cdk-radio-group-control.mjs +19 -0
  482. package/fesm2022/odx-angular-cdk-radio-group-control.mjs.map +1 -1
  483. package/fesm2022/odx-angular-components-accordion.mjs +41 -0
  484. package/fesm2022/odx-angular-components-accordion.mjs.map +1 -1
  485. package/fesm2022/odx-angular-components-action-group.mjs +6 -0
  486. package/fesm2022/odx-angular-components-action-group.mjs.map +1 -1
  487. package/fesm2022/odx-angular-components-area-header.mjs +14 -0
  488. package/fesm2022/odx-angular-components-area-header.mjs.map +1 -1
  489. package/fesm2022/odx-angular-components-autocomplete.mjs +17 -0
  490. package/fesm2022/odx-angular-components-autocomplete.mjs.map +1 -1
  491. package/fesm2022/odx-angular-components-avatar.mjs +8 -0
  492. package/fesm2022/odx-angular-components-avatar.mjs.map +1 -1
  493. package/fesm2022/odx-angular-components-badge.mjs +25 -0
  494. package/fesm2022/odx-angular-components-badge.mjs.map +1 -1
  495. package/fesm2022/odx-angular-components-bar.mjs +13 -0
  496. package/fesm2022/odx-angular-components-bar.mjs.map +1 -1
  497. package/fesm2022/odx-angular-components-breadcrumbs.mjs +3 -0
  498. package/fesm2022/odx-angular-components-breadcrumbs.mjs.map +1 -1
  499. package/fesm2022/odx-angular-components-button-group.mjs +15 -0
  500. package/fesm2022/odx-angular-components-button-group.mjs.map +1 -1
  501. package/fesm2022/odx-angular-components-button.mjs +10 -0
  502. package/fesm2022/odx-angular-components-button.mjs.map +1 -1
  503. package/fesm2022/odx-angular-components-calendar.mjs +232 -0
  504. package/fesm2022/odx-angular-components-calendar.mjs.map +1 -1
  505. package/fesm2022/odx-angular-components-checkbox.mjs +55 -0
  506. package/fesm2022/odx-angular-components-checkbox.mjs.map +1 -1
  507. package/fesm2022/odx-angular-components-chip.mjs +20 -0
  508. package/fesm2022/odx-angular-components-chip.mjs.map +1 -1
  509. package/fesm2022/odx-angular-components-circular-progress.mjs +20 -0
  510. package/fesm2022/odx-angular-components-circular-progress.mjs.map +1 -1
  511. package/fesm2022/odx-angular-components-content-box.mjs +9 -0
  512. package/fesm2022/odx-angular-components-content-box.mjs.map +1 -1
  513. package/fesm2022/odx-angular-components-datepicker.mjs +84 -0
  514. package/fesm2022/odx-angular-components-datepicker.mjs.map +1 -1
  515. package/fesm2022/odx-angular-components-daterangepicker.mjs +145 -0
  516. package/fesm2022/odx-angular-components-daterangepicker.mjs.map +1 -1
  517. package/fesm2022/odx-angular-components-dropdown.mjs +66 -0
  518. package/fesm2022/odx-angular-components-dropdown.mjs.map +1 -1
  519. package/fesm2022/odx-angular-components-error-page.mjs +15 -0
  520. package/fesm2022/odx-angular-components-error-page.mjs.map +1 -1
  521. package/fesm2022/odx-angular-components-footer.mjs +11 -6
  522. package/fesm2022/odx-angular-components-footer.mjs.map +1 -1
  523. package/fesm2022/odx-angular-components-form-field.mjs +131 -0
  524. package/fesm2022/odx-angular-components-form-field.mjs.map +1 -1
  525. package/fesm2022/odx-angular-components-header-navigation.mjs +6 -0
  526. package/fesm2022/odx-angular-components-header-navigation.mjs.map +1 -1
  527. package/fesm2022/odx-angular-components-header.mjs +10 -0
  528. package/fesm2022/odx-angular-components-header.mjs.map +1 -1
  529. package/fesm2022/odx-angular-components-icon.mjs +57 -0
  530. package/fesm2022/odx-angular-components-icon.mjs.map +1 -1
  531. package/fesm2022/odx-angular-components-inline-message.mjs +13 -0
  532. package/fesm2022/odx-angular-components-inline-message.mjs.map +1 -1
  533. package/fesm2022/odx-angular-components-link.mjs +3 -0
  534. package/fesm2022/odx-angular-components-link.mjs.map +1 -1
  535. package/fesm2022/odx-angular-components-list.mjs +28 -1
  536. package/fesm2022/odx-angular-components-list.mjs.map +1 -1
  537. package/fesm2022/odx-angular-components-loading-spinner.mjs +30 -0
  538. package/fesm2022/odx-angular-components-loading-spinner.mjs.map +1 -1
  539. package/fesm2022/odx-angular-components-logo.mjs +15 -0
  540. package/fesm2022/odx-angular-components-logo.mjs.map +1 -1
  541. package/fesm2022/odx-angular-components-main-menu.mjs +119 -0
  542. package/fesm2022/odx-angular-components-main-menu.mjs.map +1 -1
  543. package/fesm2022/odx-angular-components-mainfilter-group.mjs +4 -0
  544. package/fesm2022/odx-angular-components-mainfilter-group.mjs.map +1 -1
  545. package/fesm2022/odx-angular-components-menu.mjs +36 -0
  546. package/fesm2022/odx-angular-components-menu.mjs.map +1 -1
  547. package/fesm2022/odx-angular-components-modal.mjs +252 -0
  548. package/fesm2022/odx-angular-components-modal.mjs.map +1 -1
  549. package/fesm2022/odx-angular-components-navigation-back.mjs +3 -0
  550. package/fesm2022/odx-angular-components-navigation-back.mjs.map +1 -1
  551. package/fesm2022/odx-angular-components-notification.mjs +148 -6
  552. package/fesm2022/odx-angular-components-notification.mjs.map +1 -1
  553. package/fesm2022/odx-angular-components-paginator.mjs +117 -0
  554. package/fesm2022/odx-angular-components-paginator.mjs.map +1 -1
  555. package/fesm2022/odx-angular-components-progress.mjs +15 -0
  556. package/fesm2022/odx-angular-components-progress.mjs.map +1 -1
  557. package/fesm2022/odx-angular-components-radio-group.mjs +11 -0
  558. package/fesm2022/odx-angular-components-radio-group.mjs.map +1 -1
  559. package/fesm2022/odx-angular-components-rail-navigation.mjs +42 -0
  560. package/fesm2022/odx-angular-components-rail-navigation.mjs.map +1 -1
  561. package/fesm2022/odx-angular-components-rich-list.mjs +26 -3
  562. package/fesm2022/odx-angular-components-rich-list.mjs.map +1 -1
  563. package/fesm2022/odx-angular-components-select.mjs +122 -7
  564. package/fesm2022/odx-angular-components-select.mjs.map +1 -1
  565. package/fesm2022/odx-angular-components-slider.mjs +19 -0
  566. package/fesm2022/odx-angular-components-slider.mjs.map +1 -1
  567. package/fesm2022/odx-angular-components-spinbox.mjs +16 -0
  568. package/fesm2022/odx-angular-components-spinbox.mjs.map +1 -1
  569. package/fesm2022/odx-angular-components-switch.mjs +22 -0
  570. package/fesm2022/odx-angular-components-switch.mjs.map +1 -1
  571. package/fesm2022/odx-angular-components-tab-bar.mjs +97 -0
  572. package/fesm2022/odx-angular-components-tab-bar.mjs.map +1 -1
  573. package/fesm2022/odx-angular-components-table.mjs +84 -1
  574. package/fesm2022/odx-angular-components-table.mjs.map +1 -1
  575. package/fesm2022/odx-angular-components-timepicker.mjs +20 -9
  576. package/fesm2022/odx-angular-components-timepicker.mjs.map +1 -1
  577. package/fesm2022/odx-angular-components-toast.mjs +61 -0
  578. package/fesm2022/odx-angular-components-toast.mjs.map +1 -1
  579. package/fesm2022/odx-angular-components-toggle-button-group.mjs +23 -0
  580. package/fesm2022/odx-angular-components-toggle-button-group.mjs.map +1 -1
  581. package/fesm2022/odx-angular-components-tooltip.mjs +52 -0
  582. package/fesm2022/odx-angular-components-tooltip.mjs.map +1 -1
  583. package/fesm2022/odx-angular-components-wizard.mjs +54 -0
  584. package/fesm2022/odx-angular-components-wizard.mjs.map +1 -1
  585. package/fesm2022/odx-angular-internal-translate.mjs +60 -0
  586. package/fesm2022/odx-angular-internal-translate.mjs.map +1 -1
  587. package/fesm2022/odx-angular-localization.mjs +247 -2
  588. package/fesm2022/odx-angular-localization.mjs.map +1 -1
  589. package/fesm2022/odx-angular-rxjs.mjs +115 -5
  590. package/fesm2022/odx-angular-rxjs.mjs.map +1 -1
  591. package/fesm2022/odx-angular-sdk.mjs +50 -0
  592. package/fesm2022/odx-angular-sdk.mjs.map +1 -1
  593. package/fesm2022/odx-angular-theming.mjs +149 -0
  594. package/fesm2022/odx-angular-theming.mjs.map +1 -1
  595. package/fesm2022/odx-angular-utils.mjs +709 -1
  596. package/fesm2022/odx-angular-utils.mjs.map +1 -1
  597. package/fesm2022/odx-angular.mjs +322 -0
  598. package/fesm2022/odx-angular.mjs.map +1 -1
  599. package/internal/translate/lib/translate.config.d.ts +31 -0
  600. package/internal/translate/lib/translate.service.d.ts +29 -0
  601. package/lib/controllers/controller.d.ts +25 -0
  602. package/lib/controllers/disabled.controller.d.ts +59 -0
  603. package/lib/controllers/readonly.controller.d.ts +56 -0
  604. package/lib/directives/click-outside.directive.d.ts +29 -0
  605. package/lib/directives/delegate-focus.directive.d.ts +14 -0
  606. package/lib/services/window-ref.d.ts +66 -0
  607. package/lib/tokens/identity-matcher.d.ts +41 -0
  608. package/lib/tokens/string-search-handler.d.ts +39 -0
  609. package/lib/tokens/stringify.d.ts +42 -0
  610. package/localization/lib/features/with-http-language-header.d.ts +63 -0
  611. package/localization/lib/features/with-http-language-query-param.d.ts +61 -0
  612. package/localization/lib/loaders/browser-language-loader.d.ts +32 -0
  613. package/localization/lib/localization.config.d.ts +81 -0
  614. package/localization/lib/localization.service.d.ts +39 -0
  615. package/package.json +1 -1
  616. package/rxjs/index.d.ts +1 -1
  617. package/rxjs/lib/delay-until.d.ts +22 -0
  618. package/rxjs/lib/from-element-mutation.d.ts +21 -0
  619. package/rxjs/lib/from-element-resize.d.ts +24 -0
  620. package/rxjs/lib/from-events.d.ts +24 -0
  621. package/rxjs/lib/from-query-list.d.ts +22 -0
  622. package/sdk/lib/application-environment.d.ts +59 -0
  623. package/theming/lib/helpers/prefers-dark-theme.d.ts +18 -0
  624. package/theming/lib/helpers/resolve-theme.d.ts +25 -0
  625. package/theming/lib/helpers/theme-storage.d.ts +42 -0
  626. package/theming/lib/theming.config.d.ts +46 -0
  627. package/theming/lib/theming.service.d.ts +31 -0
  628. package/utils/lib/decorators/pure.d.ts +51 -0
  629. package/utils/lib/helpers/angular.d.ts +36 -0
  630. package/utils/lib/helpers/array.d.ts +4 -0
  631. package/utils/lib/helpers/build-url.d.ts +20 -0
  632. package/utils/lib/helpers/build-website-url.d.ts +2 -1
  633. package/utils/lib/helpers/cache-storage-client.d.ts +51 -0
  634. package/utils/lib/helpers/coercion.d.ts +17 -0
  635. package/utils/lib/helpers/debounce.d.ts +27 -0
  636. package/utils/lib/helpers/defer-fn.d.ts +20 -0
  637. package/utils/lib/helpers/dom.d.ts +70 -0
  638. package/utils/lib/helpers/get-axis.d.ts +20 -0
  639. package/utils/lib/helpers/get-language-code.d.ts +17 -0
  640. package/utils/lib/helpers/get-opposite-side.d.ts +21 -0
  641. package/utils/lib/helpers/get-side.d.ts +17 -0
  642. package/utils/lib/helpers/get-unique-id.d.ts +33 -0
  643. package/utils/lib/helpers/match-url.d.ts +40 -0
  644. package/utils/lib/helpers/ng-changes.d.ts +52 -0
  645. package/utils/lib/helpers/provide-config.d.ts +56 -0
  646. package/utils/lib/helpers/queue.d.ts +83 -0
  647. package/utils/lib/helpers/type-guards.d.ts +57 -0
  648. package/utils/lib/helpers/until-destroyed.d.ts +38 -0
  649. package/esm2022/rxjs/lib/form-query-list.mjs +0 -5
  650. package/rxjs/lib/form-query-list.d.ts +0 -3
@@ -4,6 +4,25 @@ import { inject, Injectable, TemplateRef, ViewContainerRef, Directive, Input, Ng
4
4
  import { of, map, distinctUntilChanged, shareReplay, BehaviorSubject, switchMap, tap } from 'rxjs';
5
5
  import { BreakpointObserver } from '@angular/cdk/layout';
6
6
 
7
+ /**
8
+ * Generates a configuration object containing CSS media query strings for a named breakpoint.
9
+ * The function creates media queries for three scenarios: below (`<`), exactly (`=`), and above (`>`) the specified breakpoint.
10
+ *
11
+ * @template T - The string literal type representing the name of the breakpoint.
12
+ * @param {T} name - The name of the breakpoint (e.g., 'md' for medium).
13
+ * @param {number} min - The minimum width (inclusive) where the breakpoint starts.
14
+ * @param {number} max - The maximum width (exclusive) where the breakpoint ends.
15
+ * @returns {BreakpointConfig<T>} An object containing media query strings for targeting screen sizes relative to the breakpoint.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * // Define a medium (md) breakpoint
20
+ * const mdBreakpoint = configureBreakpoint('md', 768, 1024);
21
+ * console.log(mdBreakpoint['<md']); // Outputs: "(max-width: 767px)"
22
+ * console.log(mdBreakpoint['=md']); // Outputs: "(min-width: 768px) and (max-width: 1023px)"
23
+ * console.log(mdBreakpoint['>md']); // Outputs: "(min-width: 768px)"
24
+ * ```
25
+ */
7
26
  function configureBreakpoint(name, min, max) {
8
27
  return {
9
28
  [`<${name}`]: `(max-width: ${min - 1}px)`,
@@ -12,6 +31,21 @@ function configureBreakpoint(name, min, max) {
12
31
  };
13
32
  }
14
33
 
34
+ /**
35
+ * Defines default responsive breakpoints for the application. These breakpoints are used to
36
+ * apply responsive styles and behaviors across various device sizes. Each breakpoint is
37
+ * configured with a name, a minimum width, and a maximum width, defining the range of device
38
+ * sizes it targets.
39
+ *
40
+ * @constant
41
+ * @type {Record<string, string>}
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * // Accessing a breakpoint value
46
+ * console.log(DEFAULT_BREAKPOINTS['=phone']); // Outputs: "(min-width: 480px) and (max-width: 767px)"
47
+ * ```
48
+ */
15
49
  const DEFAULT_BREAKPOINTS = {
16
50
  ...configureBreakpoint('phone-s', 360, 480),
17
51
  ...configureBreakpoint('phone', 480, 768),
@@ -19,19 +53,85 @@ const DEFAULT_BREAKPOINTS = {
19
53
  ...configureBreakpoint('desktop-s', 960, 1200),
20
54
  ...configureBreakpoint('desktop', 1200, 9999),
21
55
  };
56
+ /**
57
+ * Provides Angular dependency injection tokens for accessing and configuring breakpoints
58
+ * within the application. This enables a type-safe and modular way to manage responsive
59
+ * design breakpoints across the app.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * // Providing custom breakpoints in an Angular module
64
+ * import { NgModule } from '@angular/core';
65
+ * import { provideBreakpointsConfig } from '@odx/angular/breakpoints';
66
+ *
67
+ * @NgModule({
68
+ * providers: [
69
+ * provideBreakpointsConfig({
70
+ * breakpoints: {
71
+ * ...configureBreakpoint('custom-tablet', 640, 1024),
72
+ * },
73
+ * }),
74
+ * ],
75
+ * })
76
+ * export class CustomModule {}
77
+ * ```
78
+ */
22
79
  const { BreakpointsConfig, BreakpointsDefaultConfig, injectBreakpointsConfig, provideBreakpointsConfig } = createConfigTokens('Breakpoints', '@odx/angular/breakpoints', {
23
80
  breakpoints: DEFAULT_BREAKPOINTS,
24
81
  });
25
82
 
83
+ /**
84
+ * Service to observe and react to changes in viewport size based on predefined breakpoints.
85
+ * Utilizes Angular CDK's BreakpointObserver for listening to media query changes and integrates
86
+ * it with the application's custom breakpoints configuration.
87
+ *
88
+ * @Injectable({ providedIn: 'root' })
89
+ */
26
90
  class BreakpointsService {
27
91
  constructor() {
28
92
  this.breakpointObserver = inject(BreakpointObserver);
29
93
  this.config = injectBreakpointsConfig();
30
94
  }
95
+ /**
96
+ * Observes the specified breakpoints and returns an Observable that emits true if any
97
+ * of the specified breakpoints match the current viewport size, and false otherwise.
98
+ *
99
+ * @param {BreakpointName[]} breakpoints - An array of breakpoints to observe.
100
+ * @returns {Observable<boolean>} - An Observable that emits true if the viewport matches the specified breakpoints.
101
+ *
102
+ * @example
103
+ * ```ts
104
+ * // Component that uses BreakpointsService to apply dynamic styles based on breakpoints
105
+ * @Component({
106
+ * selector: 'app-responsive-component',
107
+ * templateUrl: './responsive-component.component.html',
108
+ * })
109
+ * export class ResponsiveComponent {
110
+ * isMobile$: Observable<boolean>;
111
+ *
112
+ * constructor(private breakpointsService: BreakpointsService) {
113
+ * this.isMobile$ = this.breakpointsService.observe(['phone', 'tablet']);
114
+ * }
115
+ * }
116
+ * ```
117
+ */
31
118
  observe(breakpoints) {
32
119
  const mediaQueries = this.getMediaQueries(breakpoints);
33
120
  return this.createBreakpointObserver(mediaQueries);
34
121
  }
122
+ /**
123
+ * Checks if any of the specified breakpoints match the current viewport size.
124
+ *
125
+ * @param {BreakpointName[]} breakpoints - An array of breakpoints to check.
126
+ * @returns {boolean} - Returns true if the viewport matches the specified breakpoints, false otherwise.
127
+ *
128
+ * @example
129
+ * ```ts
130
+ * // Checking if the current viewport matches the 'desktop' breakpoint
131
+ * const isDesktop = this.breakpointsService.matches(['desktop']);
132
+ * console.log(`Is desktop view? ${isDesktop}`);
133
+ * ```
134
+ */
35
135
  matches(breakpoints) {
36
136
  const mediaQueries = this.getMediaQueries(breakpoints);
37
137
  return this.breakpointObserver.isMatched(mediaQueries);
@@ -52,6 +152,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
52
152
  args: [{ providedIn: 'root' }]
53
153
  }] });
54
154
 
155
+ /**
156
+ * A structural directive that conditionally includes an Angular template based on whether the viewport matches
157
+ * specified breakpoints. It leverages the BreakpointsService to observe changes in viewport size and apply
158
+ * the appropriate template.
159
+ *
160
+ * @Directive
161
+ * @param {BreakpointsService} breakpointsService - Injects BreakpointsService to observe breakpoint changes.
162
+ * @param {TemplateRef} template - Injects the Angular template to render when breakpoints match.
163
+ * @param {ViewContainerRef} viewContainer - Injects the container where the template will be rendered.
164
+ *
165
+ * @example
166
+ * ```html
167
+ * // Usage in a component template to conditionally display content based on breakpoints
168
+ * // Assume 'mobile' and 'tablet' are defined breakpoints
169
+ * <ng-template [odxMatchBreakpoints]="['mobile', 'tablet']">
170
+ * Content to display on mobile and tablet sizes.
171
+ * </ng-template>
172
+ * <ng-template [odxMatchBreakpoints]="['desktop']" [odxMatchBreakpointsElse]="elseTemplate">
173
+ * Content to display on desktop size.
174
+ * </ng-template>
175
+ * <ng-template #elseTemplate>
176
+ * Content to display when not on desktop size.
177
+ * </ng-template>
178
+ * ```
179
+ */
55
180
  class MatchBreakpointsDirective {
56
181
  constructor() {
57
182
  this.breakpoints$$ = new BehaviorSubject([]);
@@ -59,9 +184,20 @@ class MatchBreakpointsDirective {
59
184
  this.takeUntilDestroyed = untilDestroyed();
60
185
  this.template = inject(TemplateRef);
61
186
  this.viewContainer = inject(ViewContainerRef);
187
+ /**
188
+ * Optionally specifies a template to render when the viewport does not match the specified breakpoints.
189
+ *
190
+ * @param {TemplateRef<unknown>} elseTemplate - The template to render when the viewport does not match the breakpoints.
191
+ */
62
192
  // eslint-disable-next-line @angular-eslint/no-input-rename
63
193
  this.elseTemplate = null;
64
194
  }
195
+ /**
196
+ * Sets the breakpoints to observe. The directive's content is displayed if the current viewport matches
197
+ * any of the specified breakpoints.
198
+ *
199
+ * @param {BreakpointName | BreakpointName[]} value - The breakpoint(s) to match against the current viewport size.
200
+ */
65
201
  set breakpoints(value) {
66
202
  this.breakpoints$$.next(coerceArray(value ?? []));
67
203
  }
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-breakpoints.mjs","sources":["../../../../libs/angular/breakpoints/src/lib/helpers/configure-breakpoint.ts","../../../../libs/angular/breakpoints/src/lib/breakpoints.config.ts","../../../../libs/angular/breakpoints/src/lib/breakpoints.service.ts","../../../../libs/angular/breakpoints/src/lib/directives/match-breakpoints.directive.ts","../../../../libs/angular/breakpoints/src/lib/breakpoints.module.ts","../../../../libs/angular/breakpoints/src/odx-angular-breakpoints.ts"],"sourcesContent":["type BreakpointOperators = '<' | '=' | '>';\ntype BreakpointConfig<T extends string> = Record<`${BreakpointOperators}${T}`, string>;\n\nexport function configureBreakpoint<T extends string>(name: T, min: number, max: number): BreakpointConfig<T> {\n return {\n [`<${name}` as const]: `(max-width: ${min - 1}px)`,\n [`=${name}` as const]: `(min-width: ${min}px) and (max-width: ${max - 1}px)`,\n [`>${name}` as const]: `(min-width: ${min}px)`,\n } as BreakpointConfig<T>;\n}\n","import { createConfigTokens } from '@odx/angular/utils';\nimport { configureBreakpoint } from './helpers/configure-breakpoint';\n\nexport const DEFAULT_BREAKPOINTS = {\n ...configureBreakpoint('phone-s', 360, 480),\n ...configureBreakpoint('phone', 480, 768),\n ...configureBreakpoint('tablet', 768, 960),\n ...configureBreakpoint('desktop-s', 960, 1200),\n ...configureBreakpoint('desktop', 1200, 9999),\n} as const;\n\nexport interface BreakpointsConfig {\n breakpoints: Partial<OdxAngular.Breakpoints>;\n}\n\nexport const { BreakpointsConfig, BreakpointsDefaultConfig, injectBreakpointsConfig, provideBreakpointsConfig } = createConfigTokens(\n 'Breakpoints',\n '@odx/angular/breakpoints',\n {\n breakpoints: DEFAULT_BREAKPOINTS,\n } as BreakpointsConfig\n);\n","import { BreakpointObserver } from '@angular/cdk/layout';\nimport { inject, Injectable } from '@angular/core';\nimport { distinctUntilChanged, map, Observable, of, shareReplay } from 'rxjs';\nimport { injectBreakpointsConfig } from './breakpoints.config';\nimport { BreakpointName } from './models';\n\n@Injectable({ providedIn: 'root' })\nexport class BreakpointsService {\n private readonly breakpointObserver = inject(BreakpointObserver);\n private readonly config = injectBreakpointsConfig();\n\n public observe(breakpoints: BreakpointName[]): Observable<boolean> {\n const mediaQueries = this.getMediaQueries(breakpoints);\n\n return this.createBreakpointObserver(mediaQueries);\n }\n\n public matches(breakpoints: BreakpointName[]): boolean {\n const mediaQueries = this.getMediaQueries(breakpoints);\n\n return this.breakpointObserver.isMatched(mediaQueries);\n }\n\n private getMediaQueries(breakpointNames: BreakpointName[]): string[] {\n return breakpointNames.map((name) => this.config.breakpoints[name] as string).filter(Boolean);\n }\n\n private createBreakpointObserver(mediaQueries: string[]): Observable<boolean> {\n if (mediaQueries.length < 1) return of(false);\n\n return this.breakpointObserver.observe(mediaQueries).pipe(\n map(({ matches }) => matches),\n distinctUntilChanged(),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n }\n}\n","import { Directive, inject, Input, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { coerceArray, untilDestroyed } from '@odx/angular/utils';\nimport { BehaviorSubject, switchMap, tap } from 'rxjs';\nimport { BreakpointsService } from '../breakpoints.service';\nimport { BreakpointName } from '../models';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[odxMatchBreakpoints]',\n})\nexport class MatchBreakpointsDirective implements OnInit {\n private readonly breakpoints$$ = new BehaviorSubject<BreakpointName[]>([]);\n private readonly breakpointsService = inject(BreakpointsService);\n private readonly takeUntilDestroyed = untilDestroyed();\n private readonly template = inject(TemplateRef);\n private readonly viewContainer = inject(ViewContainerRef);\n\n @Input('odxMatchBreakpoints')\n public set breakpoints(value: BreakpointName | BreakpointName[] | null | undefined) {\n this.breakpoints$$.next(coerceArray(value ?? []));\n }\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxMatchBreakpointsElse')\n public elseTemplate?: TemplateRef<unknown> | null = null;\n\n public ngOnInit(): void {\n this.breakpoints$$\n .pipe(\n switchMap((breakpoints) => this.breakpointsService.observe(breakpoints)),\n tap((matchesBreakpoints) => this.render(matchesBreakpoints)),\n this.takeUntilDestroyed(),\n )\n .subscribe();\n }\n\n private render(matchesBreakpoints: boolean): void {\n this.viewContainer.clear();\n const template = matchesBreakpoints ? this.template : this.elseTemplate;\n if (template) {\n const viewRef = this.viewContainer.createEmbeddedView(template);\n viewRef.markForCheck();\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { MatchBreakpointsDirective } from './directives';\n\nconst modules = [MatchBreakpointsDirective];\n\n@NgModule({\n imports: modules,\n exports: modules,\n})\nexport class BreakpointsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;SAGgB,mBAAmB,CAAmB,IAAO,EAAE,GAAW,EAAE,GAAW,EAAA;IACrF,OAAO;QACL,CAAC,CAAA,CAAA,EAAI,IAAI,CAAW,CAAA,GAAG,CAAe,YAAA,EAAA,GAAG,GAAG,CAAC,CAAK,GAAA,CAAA;QAClD,CAAC,CAAA,CAAA,EAAI,IAAI,CAAA,CAAW,GAAG,CAAe,YAAA,EAAA,GAAG,CAAuB,oBAAA,EAAA,GAAG,GAAG,CAAC,CAAK,GAAA,CAAA;AAC5E,QAAA,CAAC,IAAI,IAAI,CAAA,CAAW,GAAG,CAAA,YAAA,EAAe,GAAG,CAAK,GAAA,CAAA;KACxB,CAAC;AAC3B;;ACNa,MAAA,mBAAmB,GAAG;AACjC,IAAA,GAAG,mBAAmB,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,CAAC;AAC3C,IAAA,GAAG,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC;AACzC,IAAA,GAAG,mBAAmB,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAC;AAC1C,IAAA,GAAG,mBAAmB,CAAC,WAAW,EAAE,GAAG,EAAE,IAAI,CAAC;AAC9C,IAAA,GAAG,mBAAmB,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;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AiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;gHAAjB,iBAAiB,EAAA,OAAA,EAAA,CANb,yBAAyB,CAAA,EAAA,OAAA,EAAA,CAAzB,yBAAyB,CAAA,EAAA,CAAA,CAAA,EAAA;gHAM7B,iBAAiB,EAAA,CAAA,CAAA,EAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,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-breakpoints.mjs","sources":["../../../../libs/angular/breakpoints/src/lib/helpers/configure-breakpoint.ts","../../../../libs/angular/breakpoints/src/lib/breakpoints.config.ts","../../../../libs/angular/breakpoints/src/lib/breakpoints.service.ts","../../../../libs/angular/breakpoints/src/lib/directives/match-breakpoints.directive.ts","../../../../libs/angular/breakpoints/src/lib/breakpoints.module.ts","../../../../libs/angular/breakpoints/src/odx-angular-breakpoints.ts"],"sourcesContent":["type BreakpointOperators = '<' | '=' | '>';\ntype BreakpointConfig<T extends string> = Record<`${BreakpointOperators}${T}`, string>;\n\n/**\n * Generates a configuration object containing CSS media query strings for a named breakpoint.\n * The function creates media queries for three scenarios: below (`<`), exactly (`=`), and above (`>`) the specified breakpoint.\n *\n * @template T - The string literal type representing the name of the breakpoint.\n * @param {T} name - The name of the breakpoint (e.g., 'md' for medium).\n * @param {number} min - The minimum width (inclusive) where the breakpoint starts.\n * @param {number} max - The maximum width (exclusive) where the breakpoint ends.\n * @returns {BreakpointConfig<T>} An object containing media query strings for targeting screen sizes relative to the breakpoint.\n *\n * @example\n * ```ts\n * // Define a medium (md) breakpoint\n * const mdBreakpoint = configureBreakpoint('md', 768, 1024);\n * console.log(mdBreakpoint['<md']); // Outputs: \"(max-width: 767px)\"\n * console.log(mdBreakpoint['=md']); // Outputs: \"(min-width: 768px) and (max-width: 1023px)\"\n * console.log(mdBreakpoint['>md']); // Outputs: \"(min-width: 768px)\"\n * ```\n */\nexport function configureBreakpoint<T extends string>(name: T, min: number, max: number): BreakpointConfig<T> {\n return {\n [`<${name}` as const]: `(max-width: ${min - 1}px)`,\n [`=${name}` as const]: `(min-width: ${min}px) and (max-width: ${max - 1}px)`,\n [`>${name}` as const]: `(min-width: ${min}px)`,\n } as BreakpointConfig<T>;\n}\n","import { createConfigTokens } from '@odx/angular/utils';\nimport { configureBreakpoint } from './helpers/configure-breakpoint';\n\n/**\n * Defines default responsive breakpoints for the application. These breakpoints are used to\n * apply responsive styles and behaviors across various device sizes. Each breakpoint is\n * configured with a name, a minimum width, and a maximum width, defining the range of device\n * sizes it targets.\n *\n * @constant\n * @type {Record<string, string>}\n *\n * @example\n * ```ts\n * // Accessing a breakpoint value\n * console.log(DEFAULT_BREAKPOINTS['=phone']); // Outputs: \"(min-width: 480px) and (max-width: 767px)\"\n * ```\n */\nexport const DEFAULT_BREAKPOINTS = {\n ...configureBreakpoint('phone-s', 360, 480),\n ...configureBreakpoint('phone', 480, 768),\n ...configureBreakpoint('tablet', 768, 960),\n ...configureBreakpoint('desktop-s', 960, 1200),\n ...configureBreakpoint('desktop', 1200, 9999),\n} as const;\n\nexport interface BreakpointsConfig {\n breakpoints: Partial<OdxAngular.Breakpoints>;\n}\n\n/**\n * Provides Angular dependency injection tokens for accessing and configuring breakpoints\n * within the application. This enables a type-safe and modular way to manage responsive\n * design breakpoints across the app.\n *\n * @example\n * ```ts\n * // Providing custom breakpoints in an Angular module\n * import { NgModule } from '@angular/core';\n * import { provideBreakpointsConfig } from '@odx/angular/breakpoints';\n *\n * @NgModule({\n * providers: [\n * provideBreakpointsConfig({\n * breakpoints: {\n * ...configureBreakpoint('custom-tablet', 640, 1024),\n * },\n * }),\n * ],\n * })\n * export class CustomModule {}\n * ```\n */\nexport const { BreakpointsConfig, BreakpointsDefaultConfig, injectBreakpointsConfig, provideBreakpointsConfig } = createConfigTokens(\n 'Breakpoints',\n '@odx/angular/breakpoints',\n {\n breakpoints: DEFAULT_BREAKPOINTS,\n } as BreakpointsConfig,\n);\n","import { BreakpointObserver } from '@angular/cdk/layout';\nimport { inject, Injectable } from '@angular/core';\nimport { distinctUntilChanged, map, Observable, of, shareReplay } from 'rxjs';\nimport { injectBreakpointsConfig } from './breakpoints.config';\nimport { BreakpointName } from './models';\n\n/**\n * Service to observe and react to changes in viewport size based on predefined breakpoints.\n * Utilizes Angular CDK's BreakpointObserver for listening to media query changes and integrates\n * it with the application's custom breakpoints configuration.\n *\n * @Injectable({ providedIn: 'root' })\n */\n@Injectable({ providedIn: 'root' })\nexport class BreakpointsService {\n private readonly breakpointObserver = inject(BreakpointObserver);\n private readonly config = injectBreakpointsConfig();\n\n /**\n * Observes the specified breakpoints and returns an Observable that emits true if any\n * of the specified breakpoints match the current viewport size, and false otherwise.\n *\n * @param {BreakpointName[]} breakpoints - An array of breakpoints to observe.\n * @returns {Observable<boolean>} - An Observable that emits true if the viewport matches the specified breakpoints.\n *\n * @example\n * ```ts\n * // Component that uses BreakpointsService to apply dynamic styles based on breakpoints\n * @Component({\n * selector: 'app-responsive-component',\n * templateUrl: './responsive-component.component.html',\n * })\n * export class ResponsiveComponent {\n * isMobile$: Observable<boolean>;\n *\n * constructor(private breakpointsService: BreakpointsService) {\n * this.isMobile$ = this.breakpointsService.observe(['phone', 'tablet']);\n * }\n * }\n * ```\n */\n public observe(breakpoints: BreakpointName[]): Observable<boolean> {\n const mediaQueries = this.getMediaQueries(breakpoints);\n\n return this.createBreakpointObserver(mediaQueries);\n }\n\n /**\n * Checks if any of the specified breakpoints match the current viewport size.\n *\n * @param {BreakpointName[]} breakpoints - An array of breakpoints to check.\n * @returns {boolean} - Returns true if the viewport matches the specified breakpoints, false otherwise.\n *\n * @example\n * ```ts\n * // Checking if the current viewport matches the 'desktop' breakpoint\n * const isDesktop = this.breakpointsService.matches(['desktop']);\n * console.log(`Is desktop view? ${isDesktop}`);\n * ```\n */\n public matches(breakpoints: BreakpointName[]): boolean {\n const mediaQueries = this.getMediaQueries(breakpoints);\n\n return this.breakpointObserver.isMatched(mediaQueries);\n }\n\n private getMediaQueries(breakpointNames: BreakpointName[]): string[] {\n return breakpointNames.map((name) => this.config.breakpoints[name] as string).filter(Boolean);\n }\n\n private createBreakpointObserver(mediaQueries: string[]): Observable<boolean> {\n if (mediaQueries.length < 1) return of(false);\n\n return this.breakpointObserver.observe(mediaQueries).pipe(\n map(({ matches }) => matches),\n distinctUntilChanged(),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n }\n}\n","import { Directive, inject, Input, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { coerceArray, untilDestroyed } from '@odx/angular/utils';\nimport { BehaviorSubject, switchMap, tap } from 'rxjs';\nimport { BreakpointsService } from '../breakpoints.service';\nimport { BreakpointName } from '../models';\n\n/**\n * A structural directive that conditionally includes an Angular template based on whether the viewport matches\n * specified breakpoints. It leverages the BreakpointsService to observe changes in viewport size and apply\n * the appropriate template.\n *\n * @Directive\n * @param {BreakpointsService} breakpointsService - Injects BreakpointsService to observe breakpoint changes.\n * @param {TemplateRef} template - Injects the Angular template to render when breakpoints match.\n * @param {ViewContainerRef} viewContainer - Injects the container where the template will be rendered.\n *\n * @example\n * ```html\n * // Usage in a component template to conditionally display content based on breakpoints\n * // Assume 'mobile' and 'tablet' are defined breakpoints\n * <ng-template [odxMatchBreakpoints]=\"['mobile', 'tablet']\">\n * Content to display on mobile and tablet sizes.\n * </ng-template>\n * <ng-template [odxMatchBreakpoints]=\"['desktop']\" [odxMatchBreakpointsElse]=\"elseTemplate\">\n * Content to display on desktop size.\n * </ng-template>\n * <ng-template #elseTemplate>\n * Content to display when not on desktop size.\n * </ng-template>\n * ```\n */\n@Directive({\n standalone: true,\n selector: 'ng-template[odxMatchBreakpoints]',\n})\nexport class MatchBreakpointsDirective implements OnInit {\n private readonly breakpoints$$ = new BehaviorSubject<BreakpointName[]>([]);\n private readonly breakpointsService = inject(BreakpointsService);\n private readonly takeUntilDestroyed = untilDestroyed();\n private readonly template = inject(TemplateRef);\n private readonly viewContainer = inject(ViewContainerRef);\n\n /**\n * Sets the breakpoints to observe. The directive's content is displayed if the current viewport matches\n * any of the specified breakpoints.\n *\n * @param {BreakpointName | BreakpointName[]} value - The breakpoint(s) to match against the current viewport size.\n */\n @Input('odxMatchBreakpoints')\n public set breakpoints(value: BreakpointName | BreakpointName[] | null | undefined) {\n this.breakpoints$$.next(coerceArray(value ?? []));\n }\n\n /**\n * Optionally specifies a template to render when the viewport does not match the specified breakpoints.\n *\n * @param {TemplateRef<unknown>} elseTemplate - The template to render when the viewport does not match the breakpoints.\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxMatchBreakpointsElse')\n public elseTemplate?: TemplateRef<unknown> | null = null;\n\n public ngOnInit(): void {\n this.breakpoints$$\n .pipe(\n switchMap((breakpoints) => this.breakpointsService.observe(breakpoints)),\n tap((matchesBreakpoints) => this.render(matchesBreakpoints)),\n this.takeUntilDestroyed(),\n )\n .subscribe();\n }\n\n private render(matchesBreakpoints: boolean): void {\n this.viewContainer.clear();\n const template = matchesBreakpoints ? this.template : this.elseTemplate;\n if (template) {\n const viewRef = this.viewContainer.createEmbeddedView(template);\n viewRef.markForCheck();\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { MatchBreakpointsDirective } from './directives';\n\nconst modules = [MatchBreakpointsDirective];\n\n@NgModule({\n imports: modules,\n exports: modules,\n})\nexport class BreakpointsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAGA;;;;;;;;;;;;;;;;;;AAkBG;SACa,mBAAmB,CAAmB,IAAO,EAAE,GAAW,EAAE,GAAW,EAAA;IACrF,OAAO;QACL,CAAC,CAAA,CAAA,EAAI,IAAI,CAAW,CAAA,GAAG,CA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AA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,OAAO;AACjB,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
@@ -7,10 +7,42 @@ import { __decorate } from 'tslib';
7
7
  import { CSSComponent } from '@odx/angular/internal';
8
8
  import { injectElement, deferFn } from '@odx/angular/utils';
9
9
 
10
+ /**
11
+ * Directive that makes an element interactive, responding to click, Enter key, and Space key events.
12
+ * It automatically handles the disabled state through `DisabledController`, inhibiting interactions when disabled.
13
+ * This directive can be useful for creating custom buttons or interactive elements that are not natively interactive,
14
+ * such as divs or custom components.
15
+ *
16
+ * @Directive
17
+ * @CSSComponent cdk-interactive - A CSS Component class that can be targeted for styling interactive elements.
18
+ * @selector '[odxCdkInteractive]' - Applies this directive to any element with the 'odxCdkInteractive' attribute.
19
+ * @hostDirectives {WithDisabledState, WithTabIndex} - Applies disabled state and tab index handling.
20
+ * @host role='button' - Assigns a role of 'button' to the host element for accessibility.
21
+ *
22
+ * @example
23
+ * Applying the directive to a div element to make it interactive:
24
+ * ```html
25
+ * <div odxCdkInteractive (odxCdkInteractive)="onInteract($event)">
26
+ * Click or press Enter/Space to interact
27
+ * </div>
28
+ * ```
29
+ *
30
+ * @example
31
+ * Using the directive on a custom Angular component
32
+ * ```html
33
+ * <app-custom-button odxCdkInteractive (odxCdkInteractive)="onCustomButtonInteract($event)">
34
+ * </app-custom-button>
35
+ * ```
36
+ */
10
37
  let InteractiveDirective = class InteractiveDirective {
11
38
  constructor() {
12
39
  this.disabledController = DisabledController.inject();
13
40
  this.element = injectElement();
41
+ /**
42
+ * Emits an event when the element is interacted with via click, Enter key, or Space key.
43
+ *
44
+ * @emits {MouseEvent | KeyboardEvent} - The event that triggered the interaction.
45
+ */
14
46
  this.interact = new EventEmitter();
15
47
  }
16
48
  handleEvents(event) {
@@ -48,14 +80,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
48
80
  args: ['keyup.space', ['$event']]
49
81
  }] } });
50
82
 
83
+ /**
84
+ * Directive to make an element focusable as part of a list, integrating with Angular CDK's FocusKeyManager.
85
+ * It listens to the disabled state controlled by `DisabledController` to manage focus correctly based on
86
+ * the enabled state of the element.
87
+ *
88
+ * @example
89
+ * In a component template, apply this directive to list items that should be focusable and managed by a FocusKeyManager:
90
+ * ```html
91
+ * <li odxListFocusManagerOption *ngFor="let item of items">
92
+ * {{ item }}
93
+ * </li>
94
+ * ```
95
+ */
51
96
  class ListFocusManagerOptionDirective {
52
97
  constructor() {
53
98
  this.disabledController = DisabledController.inject();
54
99
  this.element = injectElement();
55
100
  }
101
+ /**
102
+ * Reflects the disabled state of the element, managed by `DisabledController`.
103
+ * If disabled, the element is not focusable.
104
+ *
105
+ * @returns {boolean} True if the directive's host element is disabled.
106
+ */
56
107
  get disabled() {
57
108
  return !!this.disabledController?.disabled;
58
109
  }
110
+ /**
111
+ * Focuses the host element. If the element is disabled, it will not be focused.
112
+ */
59
113
  focus() {
60
114
  this.element.nativeElement.focus();
61
115
  }
@@ -70,6 +124,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
70
124
  }]
71
125
  }] });
72
126
 
127
+ /**
128
+ * Directive that sets up keyboard navigation for a list or a group of focusable elements.
129
+ * Utilizes `FocusKeyManager` from Angular CDK to manage focus among items.
130
+ * It automatically skips disabled items and wraps around when navigating past the first or last item.
131
+ * Handles keydown events to navigate through the focusable options.
132
+ *
133
+ * @example
134
+ * In a component template, use this directive on a container element and `odxListFocusManagerOption`
135
+ * on each focusable list item:
136
+ * ```html
137
+ * <ul odxListFocusManager>
138
+ * <li odxListFocusManagerOption *ngFor="let item of items">
139
+ * {{ item }}
140
+ * </li>
141
+ * </ul>
142
+ * ```
143
+ */
73
144
  class ListFocusManagerDirective {
74
145
  constructor() {
75
146
  this.keyManager = null;
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-cdk-a11y.mjs","sources":["../../../../libs/angular/cdk/a11y/src/lib/directives/interactive.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/directives/list-focus-manager-option.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/directives/list-focus-manager.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/a11y.module.ts","../../../../libs/angular/cdk/a11y/src/odx-angular-cdk-a11y.ts"],"sourcesContent":["import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\nimport { DisabledController, WithDisabledState, WithTabIndex } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('cdk-interactive')\n@Directive({\n selector: '[odxCdkInteractive]',\n standalone: true,\n hostDirectives: [WithDisabledState, WithTabIndex],\n host: {\n role: 'button',\n },\n})\nexport class InteractiveDirective {\n private readonly disabledController = DisabledController.inject();\n\n public readonly element = injectElement();\n\n @Output('odxCdkInteractive')\n public interact = new EventEmitter<MouseEvent | KeyboardEvent>();\n\n @HostListener('click', ['$event'])\n @HostListener('keyup.enter', ['$event'])\n @HostListener('keyup.space', ['$event'])\n protected handleEvents(event: MouseEvent | KeyboardEvent) {\n if (this.disabledController?.disabled) return;\n this.interact.next(event);\n }\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport { Directive } from '@angular/core';\nimport { DisabledController } from '@odx/angular';\nimport { injectElement } from '@odx/angular/utils';\n\n@Directive({\n selector: '[odxListFocusManagerOption]',\n standalone: true,\n})\nexport class ListFocusManagerOptionDirective implements FocusableOption {\n private readonly disabledController = DisabledController.inject();\n private readonly element = injectElement();\n\n public get disabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n public focus(): void {\n this.element.nativeElement.focus();\n }\n}\n","import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { AfterContentInit, ContentChildren, Directive, HostListener, OnDestroy, QueryList } from '@angular/core';\nimport { deferFn } from '@odx/angular/utils';\nimport { ListFocusManagerOptionDirective } from './list-focus-manager-option.directive';\n\n@Directive({\n selector: '[odxListFocusManager]',\n standalone: true,\n})\nexport class ListFocusManagerDirective implements AfterContentInit, OnDestroy {\n private keyManager: FocusKeyManager<ListFocusManagerOptionDirective> | null = null;\n\n @ContentChildren(ListFocusManagerOptionDirective)\n protected options!: QueryList<ListFocusManagerOptionDirective>;\n\n public ngAfterContentInit(): void {\n this.keyManager = new FocusKeyManager(this.options)\n .withHomeAndEnd()\n .withWrap()\n .skipPredicate((item) => item.disabled);\n deferFn(() => this.keyManager?.setFirstItemActive());\n }\n\n public ngOnDestroy(): void {\n this.keyManager?.destroy();\n this.keyManager = null;\n }\n\n @HostListener('keydown', ['$event'])\n protected onKeyDown(event: KeyboardEvent): void {\n this.keyManager?.onKeydown(event);\n }\n}\n","import { A11yModule as NgCdkA11yModule } from '@angular/cdk/a11y';\nimport { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { InteractiveDirective, ListFocusManagerDirective, ListFocusManagerOptionDirective } from './directives';\n\nconst modules = [ListFocusManagerDirective, ListFocusManagerOptionDirective, InteractiveDirective];\n\n@NgModule({\n imports: [NgCdkA11yModule, ...modules],\n exports: [CoreModule, NgCdkA11yModule, ...modules],\n})\nexport class A11yModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgCdkA11yModule"],"mappings":";;;;;;;;;AAca,IAAA,oBAAoB,GAA1B,MAAM,oBAAoB,CAAA;AAA1B,IAAA,WAAA,GAAA;AACY,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC;QAElD,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAGnC,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAA8B,CAAC;AASlE,KAAA;AAJW,IAAA,YAAY,CAAC,KAAiC,EAAA;AACtD,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE,QAAQ;YAAE,OAAO;AAC9C,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAA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AAU,YAHXA,YAAe,EAHV,yBAAyB,EAAE,+BAA+B,EAAE,oBAAoB,CAIrF,EAAA,OAAA,EAAA,CAAA,UAAU,EAAEA,YAAe,EAJtB,yBAAyB,EAAE,+BAA+B,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;AAMpF,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,EAHX,OAAA,EAAA,CAAAA,YAAe,EACf,UAAU,EAAEA,YAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAE1B,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAACA,YAAe,EAAE,GAAG,OAAO,CAAC;oBACtC,OAAO,EAAE,CAAC,UAAU,EAAEA,YAAe,EAAE,GAAG,OAAO,CAAC;AACnD,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-cdk-a11y.mjs","sources":["../../../../libs/angular/cdk/a11y/src/lib/directives/interactive.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/directives/list-focus-manager-option.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/directives/list-focus-manager.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/a11y.module.ts","../../../../libs/angular/cdk/a11y/src/odx-angular-cdk-a11y.ts"],"sourcesContent":["import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\nimport { DisabledController, WithDisabledState, WithTabIndex } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Directive that makes an element interactive, responding to click, Enter key, and Space key events.\n * It automatically handles the disabled state through `DisabledController`, inhibiting interactions when disabled.\n * This directive can be useful for creating custom buttons or interactive elements that are not natively interactive,\n * such as divs or custom components.\n *\n * @Directive\n * @CSSComponent cdk-interactive - A CSS Component class that can be targeted for styling interactive elements.\n * @selector '[odxCdkInteractive]' - Applies this directive to any element with the 'odxCdkInteractive' attribute.\n * @hostDirectives {WithDisabledState, WithTabIndex} - Applies disabled state and tab index handling.\n * @host role='button' - Assigns a role of 'button' to the host element for accessibility.\n *\n * @example\n * Applying the directive to a div element to make it interactive:\n * ```html\n * <div odxCdkInteractive (odxCdkInteractive)=\"onInteract($event)\">\n * Click or press Enter/Space to interact\n * </div>\n * ```\n *\n * @example\n * Using the directive on a custom Angular component\n * ```html\n * <app-custom-button odxCdkInteractive (odxCdkInteractive)=\"onCustomButtonInteract($event)\">\n * </app-custom-button>\n * ```\n */\n@CSSComponent('cdk-interactive')\n@Directive({\n selector: '[odxCdkInteractive]',\n standalone: true,\n hostDirectives: [WithDisabledState, WithTabIndex],\n host: {\n role: 'button',\n },\n})\nexport class InteractiveDirective {\n private readonly disabledController = DisabledController.inject();\n\n public readonly element = injectElement();\n\n /**\n * Emits an event when the element is interacted with via click, Enter key, or Space key.\n *\n * @emits {MouseEvent | KeyboardEvent} - The event that triggered the interaction.\n */\n @Output('odxCdkInteractive')\n public interact = new EventEmitter<MouseEvent | KeyboardEvent>();\n\n @HostListener('click', ['$event'])\n @HostListener('keyup.enter', ['$event'])\n @HostListener('keyup.space', ['$event'])\n protected handleEvents(event: MouseEvent | KeyboardEvent) {\n if (this.disabledController?.disabled) return;\n this.interact.next(event);\n }\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport { Directive } from '@angular/core';\nimport { DisabledController } from '@odx/angular';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Directive to make an element focusable as part of a list, integrating with Angular CDK's FocusKeyManager.\n * It listens to the disabled state controlled by `DisabledController` to manage focus correctly based on\n * the enabled state of the element.\n *\n * @example\n * In a component template, apply this directive to list items that should be focusable and managed by a FocusKeyManager:\n * ```html\n * <li odxListFocusManagerOption *ngFor=\"let item of items\">\n * {{ item }}\n * </li>\n * ```\n */\n@Directive({\n selector: '[odxListFocusManagerOption]',\n standalone: true,\n})\nexport class ListFocusManagerOptionDirective implements FocusableOption {\n private readonly disabledController = DisabledController.inject();\n private readonly element = injectElement();\n\n /**\n * Reflects the disabled state of the element, managed by `DisabledController`.\n * If disabled, the element is not focusable.\n *\n * @returns {boolean} True if the directive's host element is disabled.\n */\n public get disabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Focuses the host element. If the element is disabled, it will not be focused.\n */\n public focus(): void {\n this.element.nativeElement.focus();\n }\n}\n","import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { AfterContentInit, ContentChildren, Directive, HostListener, OnDestroy, QueryList } from '@angular/core';\nimport { deferFn } from '@odx/angular/utils';\nimport { ListFocusManagerOptionDirective } from './list-focus-manager-option.directive';\n\n/**\n * Directive that sets up keyboard navigation for a list or a group of focusable elements.\n * Utilizes `FocusKeyManager` from Angular CDK to manage focus among items.\n * It automatically skips disabled items and wraps around when navigating past the first or last item.\n * Handles keydown events to navigate through the focusable options.\n *\n * @example\n * In a component template, use this directive on a container element and `odxListFocusManagerOption`\n * on each focusable list item:\n * ```html\n * <ul odxListFocusManager>\n * <li odxListFocusManagerOption *ngFor=\"let item of items\">\n * {{ item }}\n * </li>\n * </ul>\n * ```\n */\n@Directive({\n selector: '[odxListFocusManager]',\n standalone: true,\n})\nexport class ListFocusManagerDirective implements AfterContentInit, OnDestroy {\n private keyManager: FocusKeyManager<ListFocusManagerOptionDirective> | null = null;\n\n @ContentChildren(ListFocusManagerOptionDirective)\n protected options!: QueryList<ListFocusManagerOptionDirective>;\n\n public ngAfterContentInit(): void {\n this.keyManager = new FocusKeyManager(this.options)\n .withHomeAndEnd()\n .withWrap()\n .skipPredicate((item) => item.disabled);\n deferFn(() => this.keyManager?.setFirstItemActive());\n }\n\n public ngOnDestroy(): void {\n this.keyManager?.destroy();\n this.keyManager = null;\n }\n\n @HostListener('keydown', ['$event'])\n protected onKeyDown(event: KeyboardEvent): void {\n this.keyManager?.onKeydown(event);\n }\n}\n","import { A11yModule as NgCdkA11yModule } from '@angular/cdk/a11y';\nimport { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { InteractiveDirective, ListFocusManagerDirective, ListFocusManagerOptionDirective } from './directives';\n\nconst modules = [ListFocusManagerDirective, ListFocusManagerOptionDirective, InteractiveDirective];\n\n@NgModule({\n imports: [NgCdkA11yModule, ...modules],\n exports: [CoreModule, NgCdkA11yModule, ...modules],\n})\nexport class A11yModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgCdkA11yModule"],"mappings":";;;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;AAUU,IAAA,oBAAoB,GAA1B,MAAM,oBAAoB,CAAA;AAA1B,IAAA,WAAA,GAAA;AACY,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC;QAElD,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAE1C;;;;AAIG;AAEI,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAA8B,CAAC;AASlE,KAAA;AAJW,IAAA,YAAY,CAAC,KAAiC,EAAA;AACtD,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE,QAAQ;YAAE,OAAO;AAC9C,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3B;+GAnBU,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,SAAA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,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,EAHX,OAAA,EAAA,CAAAA,YAAe,EACf,UAAU,EAAEA,YAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAE1B,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAACA,YAAe,EAAE,GAAG,OAAO,CAAC;oBACtC,OAAO,EAAE,CAAC,UAAU,EAAEA,YAAe,EAAE,GAAG,OAAO,CAAC;AACnD,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
@@ -17,6 +17,42 @@ const ActiveIndicatorPosition = {
17
17
  END: 'end',
18
18
  };
19
19
 
20
+ /**
21
+ * `ActiveIndicatorDirective` is designed to adjust an indicator's position and size dynamically to highlight
22
+ * the active element within a container. It's useful for tabs, menus, or any list where an active state is visually represented.
23
+ * The directive can be customized to align the indicator based on the active element's position and supports
24
+ * both horizontal and vertical orientations.
25
+ *
26
+ * To use this directive, apply it to the element you want to use as an active indicator.
27
+ * Then, bind the active element using the `odxActiveIndicator` input. Optionally, specify
28
+ * the container element with `odxActiveIndicatorParent` if the container is not the immediate parent of the indicator.
29
+ *
30
+ * @example
31
+ * ```html
32
+ * <div class="tabs-container" #tabsContainer>
33
+ * <div class="tab" *ngFor="let tab of tabs" [class.active]="tab.isActive" #tabElement>{{ tab.label }}</div>
34
+ * <div class="indicator" [odxActiveIndicator]="activeTabElement" [odxActiveIndicatorParent]="tabsContainer"></div>
35
+ * </div>
36
+ * ```
37
+ *
38
+ * ```ts
39
+ * @Component({
40
+ * selector: 'app-tabs',
41
+ * templateUrl: './tabs.component.html',
42
+ * imports: [ActiveIndicatorDirective, NgForOf],
43
+ * })
44
+ * export class TabsComponent {
45
+ * tabs = [{ label: 'Tab 1', isActive: true }, { label: 'Tab 2', isActive: false }];
46
+ * @ViewChildren('tabElement') tabElements?: QueryList<ElementRef>;
47
+ * @ViewChild('tabsContainer') tabsContainer!: ElementRef;
48
+ *
49
+ * get activeTabElement(): HTMLElement {
50
+ * const activeTab = this.tabElements?.find((tab) => tab.nativeElement.classList.contains('active'));
51
+ * return activeTab ? activeTab.nativeElement : null;
52
+ * }
53
+ * }
54
+ * ```
55
+ */
20
56
  let ActiveIndicatorDirective = class ActiveIndicatorDirective {
21
57
  constructor() {
22
58
  this.takeUntilDestroyed = untilDestroyed();
@@ -25,11 +61,38 @@ let ActiveIndicatorDirective = class ActiveIndicatorDirective {
25
61
  return parentElement ? fromElementResize$(parentElement) : EMPTY;
26
62
  }));
27
63
  this.element = injectElement();
64
+ /**
65
+ * Indicates whether the element is active or not.
66
+ *
67
+ * @type {boolean}
68
+ */
28
69
  this.isActive = false;
70
+ /**
71
+ * The currently active element to which the indicator should align.
72
+ * It dynamically updates the indicator's position and size based on this element.
73
+ *
74
+ * @type {HTMLElement | null}
75
+ */
29
76
  this.activeElement = null;
77
+ /**
78
+ * The direction in which the indicator should move.
79
+ *
80
+ * @type {ActiveIndicatorDirection}
81
+ */
30
82
  this.direction = ActiveIndicatorDirection.HORIZONTAL;
83
+ /**
84
+ * The position of the indicator relative to the active element.
85
+ *
86
+ * @type {ActiveIndicatorPosition}
87
+ */
31
88
  this.position = ActiveIndicatorPosition.CENTER;
32
89
  }
90
+ /**
91
+ * The parent container element of the active elements.
92
+ * If not set, the indicator's immediate parent element is used.
93
+ *
94
+ * @type {HTMLElement | null}
95
+ */
33
96
  set parent(value) {
34
97
  this.parentElement$$.next(value);
35
98
  }
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-cdk-active-indicator.mjs","sources":["../../../../libs/angular/cdk/active-indicator/src/lib/models/active-indicator-direction.ts","../../../../libs/angular/cdk/active-indicator/src/lib/models/active-indicator-position.ts","../../../../libs/angular/cdk/active-indicator/src/lib/active-indicator.directive.ts","../../../../libs/angular/cdk/active-indicator/src/odx-angular-cdk-active-indicator.ts"],"sourcesContent":["export type ActiveIndicatorDirection = typeof ActiveIndicatorDirection[keyof typeof ActiveIndicatorDirection];\n\nexport const ActiveIndicatorDirection = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n} as const;\n","export type ActiveIndicatorPosition = typeof ActiveIndicatorPosition[keyof typeof ActiveIndicatorPosition];\n\nexport const ActiveIndicatorPosition = {\n START: 'start',\n CENTER: 'center',\n END: 'end',\n} as const;\n","import { AfterViewInit, Directive, Input, OnChanges } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { fromElementResize$ } from '@odx/angular/rxjs';\nimport { NgChanges, applyStyles, disableCSSTransitions, hasChanged, injectElement, isPresent, px, untilDestroyed } from '@odx/angular/utils';\nimport { BehaviorSubject, EMPTY, distinctUntilChanged, switchMap } from 'rxjs';\nimport { ActiveIndicatorPosition } from './models';\nimport { ActiveIndicatorDirection } from './models/active-indicator-direction';\n\n@CSSComponent('cdk-active-indicator')\n@Directive({\n standalone: true,\n selector: '[odxActiveIndicator]',\n})\nexport class ActiveIndicatorDirective implements OnChanges, AfterViewInit {\n private readonly takeUntilDestroyed = untilDestroyed();\n private readonly parentElement$$ = new BehaviorSubject<HTMLElement | null>(null);\n private readonly onResize$ = this.parentElement$$.pipe(\n distinctUntilChanged(),\n switchMap((parentElement) => {\n return parentElement ? fromElementResize$(parentElement) : EMPTY;\n }),\n );\n\n public readonly element = injectElement();\n\n @CSSModifier()\n public isActive = false;\n\n @Input('odxActiveIndicator')\n public activeElement?: HTMLElement | null = null;\n\n @Input('odxActiveIndicatorParent')\n public set parent(value: HTMLElement | null) {\n this.parentElement$$.next(value);\n }\n public get parent(): HTMLElement | null {\n return this.parentElement$$.getValue();\n }\n\n @CSSModifier()\n @Input('odxActiveIndicatorDirection')\n public direction: ActiveIndicatorDirection = ActiveIndicatorDirection.HORIZONTAL;\n\n @Input('odxActiveIndicatorPosition')\n public position: ActiveIndicatorPosition = ActiveIndicatorPosition.CENTER;\n\n public ngAfterViewInit(): void {\n this.onResize$.pipe(this.takeUntilDestroyed()).subscribe(() => this.updateStyles());\n this.parent ??= this.element.nativeElement.parentElement;\n }\n\n public ngOnChanges(changes: NgChanges<ActiveIndicatorDirective>): void {\n if (hasChanged(changes, 'activeElement', false)) {\n this.isActive = !!this.activeElement;\n }\n if (hasChanged(changes, ['activeElement', 'direction', 'position'])) {\n this.updateStyles(!isPresent(changes.activeElement?.previousValue));\n }\n }\n\n private updateStyles(disableTransition = false): void {\n if (!this.activeElement) return;\n const isHorizontal = this.direction === ActiveIndicatorDirection.HORIZONTAL;\n const isVertical = this.direction === ActiveIndicatorDirection.VERTICAL;\n const relativeOffset = this.getIndicatorRelativeOffset();\n\n let transform = null;\n if (isHorizontal) {\n const positionX = this.getIndicatorPositionX(this.activeElement);\n transform = `translateX(${px(positionX)}) translateX(${relativeOffset}%)`;\n }\n if (isVertical) {\n const positionY = this.getIndicatorPositionY(this.activeElement);\n transform = `translateY(${px(positionY)}) translateY(${relativeOffset}%)`;\n }\n\n disableTransition && disableCSSTransitions(this.element.nativeElement, true);\n applyStyles(this.element.nativeElement, {\n transform,\n width: isHorizontal ? px(this.activeElement.offsetWidth) : null,\n height: isVertical ? px(this.activeElement.offsetHeight) : null,\n });\n disableTransition && disableCSSTransitions(this.element.nativeElement, false);\n }\n\n private getIndicatorPositionX(activeElement: HTMLElement): number {\n switch (this.position) {\n case ActiveIndicatorPosition.START:\n return activeElement.offsetLeft;\n case ActiveIndicatorPosition.CENTER:\n return activeElement.offsetLeft + activeElement.offsetWidth / 2;\n case ActiveIndicatorPosition.END:\n return activeElement.offsetLeft + activeElement.offsetWidth;\n }\n }\n\n private getIndicatorPositionY(activeElement: HTMLElement): number {\n switch (this.position) {\n case ActiveIndicatorPosition.START:\n return activeElement.offsetTop;\n case ActiveIndicatorPosition.CENTER:\n return activeElement.offsetTop + activeElement.offsetHeight / 2;\n case ActiveIndicatorPosition.END:\n return activeElement.offsetTop + activeElement.offsetHeight;\n }\n }\n\n private getIndicatorRelativeOffset(): number {\n switch (this.position) {\n case ActiveIndicatorPosition.START:\n return 0;\n case ActiveIndicatorPosition.CENTER:\n return -50;\n case ActiveIndicatorPosition.END:\n return -100;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEa,MAAA,wBAAwB,GAAG;AACtC,IAAA,UAAU,EAAE,YAAY;AACxB,IAAA,QAAQ,EAAE,UAAU;;;ACFT,MAAA,uBAAuB,GAAG;AACrC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,GAAG,EAAE,KAAK;;;ACQC,IAAA,wBAAwB,GAA9B,MAAM,wBAAwB,CAAA;AAA9B,IAAA,WAAA,GAAA;QACY,IAAkB,CAAA,kBAAA,GAAG,cAAc,EAAE,CAAC;AACtC,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,eAAe,CAAqB,IAAI,CAAC,CAAC;AAChE,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CACpD,oBAAoB,EAAE,EACtB,SAAS,CAAC,CAAC,aAAa,KAAI;AAC1B,YAAA,OAAO,aAAa,GAAG,kBAAkB,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;SAClE,CAAC,CACH,CAAC;QAEc,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;QAGnC,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QAGjB,IAAa,CAAA,aAAA,GAAwB,IAAI,CAAC;AAY1C,QAAA,IAAA,CAAA,SAAS,GAA6B,wBAAwB,CAAC,UAAU,CAAC;AAG1E,QAAA,IAAA,CAAA,QAAQ,GAA4B,uBAAuB,CAAC,MAAM,CAAC;AAyE3E,KAAA;IAtFC,IACW,MAAM,CAAC,KAAyB,EAAA;AACzC,QAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK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,KAAA,CAAA,CAAA,CAAA;AA5BtE,wBAAwB,GAAA,UAAA,CAAA;IALpC,YAAY,CAAC,sBAAsB,CAAC;AAKxB,CAAA,EAAA,wBAAwB,CAwGpC,CAAA;4FAxGY,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,sBAAsB;AACjC,iBAAA,CAAA;AAcQ,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,QAAQ,MAGR,aAAa,EAAA,CAAA;sBADnB,KAAK;uBAAC,oBAAoB,CAAA;gBAIhB,MAAM,EAAA,CAAA;sBADhB,KAAK;uBAAC,0BAA0B,CAAA;gBAU1B,SAAS,EAAA,CAAA;sBADf,KAAK;uBAAC,6BAA6B,CAAA;gBAI7B,QAAQ,EAAA,CAAA;sBADd,KAAK;uBAAC,4BAA4B,CAAA;;;AC3CrC;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-cdk-active-indicator.mjs","sources":["../../../../libs/angular/cdk/active-indicator/src/lib/models/active-indicator-direction.ts","../../../../libs/angular/cdk/active-indicator/src/lib/models/active-indicator-position.ts","../../../../libs/angular/cdk/active-indicator/src/lib/active-indicator.directive.ts","../../../../libs/angular/cdk/active-indicator/src/odx-angular-cdk-active-indicator.ts"],"sourcesContent":["export type ActiveIndicatorDirection = typeof ActiveIndicatorDirection[keyof typeof ActiveIndicatorDirection];\n\nexport const ActiveIndicatorDirection = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n} as const;\n","export type ActiveIndicatorPosition = typeof ActiveIndicatorPosition[keyof typeof ActiveIndicatorPosition];\n\nexport const ActiveIndicatorPosition = {\n START: 'start',\n CENTER: 'center',\n END: 'end',\n} as const;\n","import { AfterViewInit, Directive, Input, OnChanges } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { fromElementResize$ } from '@odx/angular/rxjs';\nimport { NgChanges, applyStyles, disableCSSTransitions, hasChanged, injectElement, isPresent, px, untilDestroyed } from '@odx/angular/utils';\nimport { BehaviorSubject, EMPTY, distinctUntilChanged, switchMap } from 'rxjs';\nimport { ActiveIndicatorPosition } from './models';\nimport { ActiveIndicatorDirection } from './models/active-indicator-direction';\n\n/**\n * `ActiveIndicatorDirective` is designed to adjust an indicator's position and size dynamically to highlight\n * the active element within a container. It's useful for tabs, menus, or any list where an active state is visually represented.\n * The directive can be customized to align the indicator based on the active element's position and supports\n * both horizontal and vertical orientations.\n *\n * To use this directive, apply it to the element you want to use as an active indicator.\n * Then, bind the active element using the `odxActiveIndicator` input. Optionally, specify\n * the container element with `odxActiveIndicatorParent` if the container is not the immediate parent of the indicator.\n *\n * @example\n * ```html\n * <div class=\"tabs-container\" #tabsContainer>\n * <div class=\"tab\" *ngFor=\"let tab of tabs\" [class.active]=\"tab.isActive\" #tabElement>{{ tab.label }}</div>\n * <div class=\"indicator\" [odxActiveIndicator]=\"activeTabElement\" [odxActiveIndicatorParent]=\"tabsContainer\"></div>\n * </div>\n * ```\n *\n * ```ts\n * @Component({\n * selector: 'app-tabs',\n * templateUrl: './tabs.component.html',\n * imports: [ActiveIndicatorDirective, NgForOf],\n * })\n * export class TabsComponent {\n * tabs = [{ label: 'Tab 1', isActive: true }, { label: 'Tab 2', isActive: false }];\n * @ViewChildren('tabElement') tabElements?: QueryList<ElementRef>;\n * @ViewChild('tabsContainer') tabsContainer!: ElementRef;\n *\n * get activeTabElement(): HTMLElement {\n * const activeTab = this.tabElements?.find((tab) => tab.nativeElement.classList.contains('active'));\n * return activeTab ? activeTab.nativeElement : null;\n * }\n * }\n * ```\n */\n@CSSComponent('cdk-active-indicator')\n@Directive({\n standalone: true,\n selector: '[odxActiveIndicator]',\n})\nexport class ActiveIndicatorDirective implements OnChanges, AfterViewInit {\n private readonly takeUntilDestroyed = untilDestroyed();\n private readonly parentElement$$ = new BehaviorSubject<HTMLElement | null>(null);\n private readonly onResize$ = this.parentElement$$.pipe(\n distinctUntilChanged(),\n switchMap((parentElement) => {\n return parentElement ? fromElementResize$(parentElement) : EMPTY;\n }),\n );\n\n public readonly element = injectElement();\n\n /**\n * Indicates whether the element is active or not.\n *\n * @type {boolean}\n */\n @CSSModifier()\n public isActive = false;\n\n /**\n * The currently active element to which the indicator should align.\n * It dynamically updates the indicator's position and size based on this element.\n *\n * @type {HTMLElement | null}\n */\n @Input('odxActiveIndicator')\n public activeElement?: HTMLElement | null = null;\n\n /**\n * The parent container element of the active elements.\n * If not set, the indicator's immediate parent element is used.\n *\n * @type {HTMLElement | null}\n */\n @Input('odxActiveIndicatorParent')\n public set parent(value: HTMLElement | null) {\n this.parentElement$$.next(value);\n }\n public get parent(): HTMLElement | null {\n return this.parentElement$$.getValue();\n }\n\n /**\n * The direction in which the indicator should move.\n *\n * @type {ActiveIndicatorDirection}\n */\n @CSSModifier()\n @Input('odxActiveIndicatorDirection')\n public direction: ActiveIndicatorDirection = ActiveIndicatorDirection.HORIZONTAL;\n\n /**\n * The position of the indicator relative to the active element.\n *\n * @type {ActiveIndicatorPosition}\n */\n @Input('odxActiveIndicatorPosition')\n public position: ActiveIndicatorPosition = ActiveIndicatorPosition.CENTER;\n\n public ngAfterViewInit(): void {\n this.onResize$.pipe(this.takeUntilDestroyed()).subscribe(() => this.updateStyles());\n this.parent ??= this.element.nativeElement.parentElement;\n }\n\n public ngOnChanges(changes: NgChanges<ActiveIndicatorDirective>): void {\n if (hasChanged(changes, 'activeElement', false)) {\n this.isActive = !!this.activeElement;\n }\n if (hasChanged(changes, ['activeElement', 'direction', 'position'])) {\n this.updateStyles(!isPresent(changes.activeElement?.previousValue));\n }\n }\n\n private updateStyles(disableTransition = false): void {\n if (!this.activeElement) return;\n const isHorizontal = this.direction === ActiveIndicatorDirection.HORIZONTAL;\n const isVertical = this.direction === ActiveIndicatorDirection.VERTICAL;\n const relativeOffset = this.getIndicatorRelativeOffset();\n\n let transform = null;\n if (isHorizontal) {\n const positionX = this.getIndicatorPositionX(this.activeElement);\n transform = `translateX(${px(positionX)}) translateX(${relativeOffset}%)`;\n }\n if (isVertical) {\n const positionY = this.getIndicatorPositionY(this.activeElement);\n transform = `translateY(${px(positionY)}) translateY(${relativeOffset}%)`;\n }\n\n disableTransition && disableCSSTransitions(this.element.nativeElement, true);\n applyStyles(this.element.nativeElement, {\n transform,\n width: isHorizontal ? px(this.activeElement.offsetWidth) : null,\n height: isVertical ? px(this.activeElement.offsetHeight) : null,\n });\n disableTransition && disableCSSTransitions(this.element.nativeElement, false);\n }\n\n private getIndicatorPositionX(activeElement: HTMLElement): number {\n switch (this.position) {\n case ActiveIndicatorPosition.START:\n return activeElement.offsetLeft;\n case ActiveIndicatorPosition.CENTER:\n return activeElement.offsetLeft + activeElement.offsetWidth / 2;\n case ActiveIndicatorPosition.END:\n return activeElement.offsetLeft + activeElement.offsetWidth;\n }\n }\n\n private getIndicatorPositionY(activeElement: HTMLElement): number {\n switch (this.position) {\n case ActiveIndicatorPosition.START:\n return activeElement.offsetTop;\n case ActiveIndicatorPosition.CENTER:\n return activeElement.offsetTop + activeElement.offsetHeight / 2;\n case ActiveIndicatorPosition.END:\n return activeElement.offsetTop + activeElement.offsetHeight;\n }\n }\n\n private getIndicatorRelativeOffset(): number {\n switch (this.position) {\n case ActiveIndicatorPosition.START:\n return 0;\n case ActiveIndicatorPosition.CENTER:\n return -50;\n case ActiveIndicatorPosition.END:\n return -100;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEa,MAAA,wBAAwB,GAAG;AACtC,IAAA,UAAU,EAAE,YAAY;AACxB,IAAA,QAAQ,EAAE,UAAU;;;ACFT,MAAA,uBAAuB,GAAG;AACrC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,GAAG,EAAE,KAAK;;;ACGZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AA,QAAQ,MASR,aAAa,EAAA,CAAA;sBADnB,KAAK;uBAAC,oBAAoB,CAAA;gBAUhB,MAAM,EAAA,CAAA;sBADhB,KAAK;uBAAC,0BAA0B,CAAA;gBAe1B,SAAS,EAAA,CAAA;sBADf,KAAK;uBAAC,6BAA6B,CAAA;gBAS7B,QAAQ,EAAA,CAAA;sBADd,KAAK;uBAAC,4BAA4B,CAAA;;;AC1GrC;;AAEG;;;;"}
@@ -8,6 +8,21 @@ import { FormFieldComponent } from '@odx/angular/components/form-field';
8
8
  import { untilDestroyed, injectElement, isFunction, Pure } from '@odx/angular/utils';
9
9
  import { __decorate, __metadata } from 'tslib';
10
10
 
11
+ /**
12
+ * `AutocompleteControl` is a base directive to enhance an input field with autocomplete functionality,
13
+ * providing keyboard navigation and selection for options displayed in a dropdown. It's designed to be extended
14
+ * for specific implementations.
15
+ * Extends `CustomFormControl` to provide form control behavior and state management.
16
+ *
17
+ * @see {CustomFormControl}
18
+ *
19
+ * This directive manages the open/close state of the dropdown, the loading state indication, and the interaction between
20
+ * the autocomplete input and the dropdown options. It utilizes `ActiveDescendantKeyManager` for keyboard navigation among options.
21
+ *
22
+ * Extend this directive to create a fully functional autocomplete control tailored to your data type and UI requirements.
23
+ *
24
+ * @template T - The type of the items displayed in the autocomplete dropdown.
25
+ */
11
26
  class AutocompleteControl extends CustomFormControl {
12
27
  get dropdownReferenceElement() {
13
28
  return this.formField?.controlElement.nativeElement ?? this.element.nativeElement;
@@ -26,6 +41,18 @@ class AutocompleteControl extends CustomFormControl {
26
41
  this.smoothScrollEnabled = false;
27
42
  this.element = injectElement();
28
43
  this.isLoading = false;
44
+ /**
45
+ * Emits the selected option when an option is selected from the dropdown.
46
+ *
47
+ * @emits {T} - The selected option.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * autocompleteControl.optionSelected.subscribe((selectedOption) => {
52
+ * console.log('Selected option:', selectedOption);
53
+ * });
54
+ * ```
55
+ */
29
56
  this.optionSelected = new EventEmitter();
30
57
  detectControllerChanges(this).subscribe();
31
58
  }
@@ -36,6 +63,17 @@ class AutocompleteControl extends CustomFormControl {
36
63
  this.handleQueryListOption(this.options);
37
64
  this.handleSearchFieldChanges();
38
65
  }
66
+ /**
67
+ * Scrolls the specified option element into view.
68
+ * @param {OptionControl<T>} option - The option control containing the element to scroll into view.
69
+ * @returns {void}
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * const optionControl: OptionControl<string> = { element: myOptionElement };
74
+ * scrollOptionIntoView(optionControl);
75
+ * ```
76
+ */
39
77
  scrollOptionIntoView({ element }) {
40
78
  const behavior = this.smoothScrollEnabled ? 'smooth' : undefined;
41
79
  if (isFunction(element.nativeElement.scrollIntoView)) {