@odx/angular 6.0.0 → 6.1.0

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 (669) hide show
  1. package/CHANGELOG.md +22 -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/dynamic-view/lib/tokens/dynamic-view-context.d.ts +4 -0
  29. package/cdk/dynamic-view/lib/tokens/dynamic-view-default-host.d.ts +10 -0
  30. package/cdk/event-plugins/lib/event-plugins.config.d.ts +35 -0
  31. package/cdk/event-plugins/lib/models/event-plugin.d.ts +57 -0
  32. package/cdk/event-plugins/lib/plugins/debounce-event-plugin.d.ts +32 -0
  33. package/cdk/event-plugins/lib/plugins/defer-event-plugin.d.ts +24 -0
  34. package/cdk/expandable/lib/directives/expandable-container.directive.d.ts +41 -0
  35. package/cdk/expandable/lib/directives/expandable-item.directive.d.ts +47 -0
  36. package/cdk/option-control/lib/option-control.d.ts +47 -0
  37. package/cdk/radio-group-control/lib/radio-control.directive.d.ts +8 -0
  38. package/cdk/radio-group-control/lib/radio-group-control.directive.d.ts +11 -0
  39. package/components/accordion/lib/accordion.component.d.ts +8 -0
  40. package/components/accordion/lib/components/accordion-item/accordion-item.component.d.ts +37 -1
  41. package/components/accordion/lib/directives/accordion-item-title.d.ts +3 -0
  42. package/components/action-group/action-group.component.d.ts +6 -0
  43. package/components/area-header/area-header.component.d.ts +8 -0
  44. package/components/area-header/directives/area-header-content.directive.d.ts +3 -0
  45. package/components/area-header/directives/area-header-subtitle.directive.d.ts +3 -0
  46. package/components/autocomplete/lib/autocomplete.component.d.ts +18 -0
  47. package/components/avatar/lib/avatar.component.d.ts +8 -0
  48. package/components/badge/lib/badge.component.d.ts +10 -0
  49. package/components/badge/lib/badge.directive.d.ts +15 -0
  50. package/components/bar/lib/bar.component.d.ts +7 -0
  51. package/components/bar/lib/directives/bar-button.directive.d.ts +3 -0
  52. package/components/bar/lib/directives/bar-label.directive.d.ts +3 -0
  53. package/components/breadcrumbs/lib/breadcrumbs.component.d.ts +3 -0
  54. package/components/button/lib/button.component.d.ts +10 -0
  55. package/components/button-group/lib/button-group.component.d.ts +15 -0
  56. package/components/calendar/lib/calendar.component.d.ts +48 -0
  57. package/components/calendar/lib/calendar.config.d.ts +17 -0
  58. package/components/calendar/lib/calendar.service.d.ts +48 -0
  59. package/components/calendar/lib/components/calendar-header/calendar-header.component.d.ts +24 -0
  60. package/components/calendar/lib/components/calendar-month/calendar-month.component.d.ts +6 -0
  61. package/components/calendar/lib/components/calendar-year/calendar-year.component.d.ts +6 -0
  62. package/components/calendar/lib/components/calendar-years/calendar-years.component.d.ts +6 -0
  63. package/components/calendar/lib/daterange.service.d.ts +16 -0
  64. package/components/calendar/lib/directives/calendar-cell.directive.d.ts +37 -0
  65. package/components/calendar/lib/directives/calendar-view.directive.d.ts +41 -0
  66. package/components/calendar/lib/pipes/date-label.pipe.d.ts +5 -0
  67. package/components/calendar/lib/services/calendar-month.service.d.ts +1 -0
  68. package/components/calendar/lib/services/calendar-year.service.d.ts +1 -0
  69. package/components/calendar/lib/services/calendar-years.service.d.ts +1 -0
  70. package/components/calendar/lib/utils/check-cell-in-range.d.ts +1 -0
  71. package/components/calendar/lib/utils/check-identical-date.d.ts +1 -0
  72. package/components/calendar/lib/utils/get-A11y-label.d.ts +1 -0
  73. package/components/calendar/lib/utils/is-date-disabled.d.ts +1 -0
  74. package/components/calendar/lib/utils/parse-date.d.ts +1 -0
  75. package/components/calendar/lib/utils/validate-daterange.d.ts +1 -0
  76. package/components/calendar/lib/utils/validate-max-date.d.ts +1 -0
  77. package/components/calendar/lib/utils/validate-min-date.d.ts +1 -0
  78. package/components/calendar/lib/utils/validate-next-date-set.d.ts +1 -0
  79. package/components/calendar/lib/utils/validate-previous-date-set.d.ts +1 -0
  80. package/components/checkbox/lib/checkbox.component.d.ts +32 -0
  81. package/components/checkbox/lib/checkbox.validator.d.ts +23 -0
  82. package/components/chip/lib/components/chip/chip.component.d.ts +14 -0
  83. package/components/chip/lib/components/chip-list/chip-list.component.d.ts +3 -0
  84. package/components/chip/lib/components/chip-list-row/chip-list-row.component.d.ts +3 -0
  85. package/components/circular-progress/lib/circular-progress.component.d.ts +20 -0
  86. package/components/content-box/lib/content-box.component.d.ts +3 -0
  87. package/components/content-box/lib/directives/content-box-footer.directive.d.ts +3 -0
  88. package/components/content-box/lib/directives/content-box-header.directive.d.ts +3 -0
  89. package/components/datepicker/lib/datepicker.component.d.ts +47 -0
  90. package/components/datepicker/lib/datepicker.config.d.ts +19 -0
  91. package/components/datepicker/lib/directives/datepicker-input-control.directive.d.ts +30 -0
  92. package/components/datepicker/lib/utils/get-datepicker-input-pattern.d.ts +2 -0
  93. package/components/datepicker/lib/utils/get-datepicker-input-value-as-date.d.ts +1 -0
  94. package/components/daterangepicker/lib/daterangepicker.component.d.ts +89 -0
  95. package/components/daterangepicker/lib/daterangepicker.config.d.ts +19 -0
  96. package/components/daterangepicker/lib/directives/daterangepicker-input-control.directive.d.ts +30 -0
  97. package/components/daterangepicker/lib/range.validator.d.ts +15 -0
  98. package/components/daterangepicker/lib/required.validator.d.ts +6 -0
  99. package/components/daterangepicker/lib/utils/get-daterangepicker-input-pattern.d.ts +2 -0
  100. package/components/daterangepicker/lib/utils/get-daterangepicker-input-value-as-date.d.ts +1 -0
  101. package/components/dropdown/lib/dropdown.component.d.ts +16 -0
  102. package/components/dropdown/lib/dropdown.directive.d.ts +67 -0
  103. package/components/dropdown/lib/helpers/close-current-dropdown.d.ts +5 -0
  104. package/components/error-page/lib/error-page.component.d.ts +7 -0
  105. package/components/error-page/lib/error-page.config.d.ts +18 -0
  106. package/components/footer/lib/footer.component.d.ts +9 -6
  107. package/components/footer/lib/footer.config.d.ts +2 -0
  108. package/components/form-field/lib/components/form-field-info/form-field-info.component.d.ts +13 -0
  109. package/components/form-field/lib/components/form-group/form-group.component.d.ts +16 -0
  110. package/components/form-field/lib/directives/form-field-control.directive.d.ts +5 -0
  111. package/components/form-field/lib/directives/form-field-error.directive.d.ts +6 -0
  112. package/components/form-field/lib/directives/form-field-hint.directive.d.ts +3 -0
  113. package/components/form-field/lib/directives/form-field-label.directive.d.ts +3 -0
  114. package/components/form-field/lib/directives/form.directive.d.ts +13 -0
  115. package/components/form-field/lib/form-field.component.d.ts +20 -0
  116. package/components/form-field/lib/form-field.service.d.ts +42 -0
  117. package/components/form-field/lib/services/form-field-error.service.d.ts +24 -0
  118. package/components/header/lib/directives/header-avatar.directive.d.ts +4 -0
  119. package/components/header/lib/directives/header-title.directive.d.ts +3 -0
  120. package/components/header/lib/header.component.d.ts +3 -0
  121. package/components/header-navigation/lib/directives/header-navigation-link.directive.d.ts +3 -0
  122. package/components/header-navigation/lib/header-navigation.component.d.ts +6 -0
  123. package/components/icon/lib/helpers/unpack-icon-identifier.d.ts +14 -0
  124. package/components/icon/lib/icon.component.d.ts +24 -0
  125. package/components/icon/lib/icon.config.d.ts +26 -0
  126. package/components/inline-message/lib/inline-message.component.d.ts +13 -0
  127. package/components/link/link.directive.d.ts +3 -0
  128. package/components/list/lib/components/expandable-list-item/expandable-list-item.component.d.ts +6 -0
  129. package/components/list/lib/components/list-item/list-item.component.d.ts +17 -1
  130. package/components/list/lib/list.component.d.ts +5 -0
  131. package/components/loading-spinner/lib/loading-spinner.component.d.ts +8 -0
  132. package/components/loading-spinner/lib/loading-spinner.directive.d.ts +22 -0
  133. package/components/logo/logo.directive.d.ts +15 -0
  134. package/components/main-menu/lib/directives/main-menu-button.directive.d.ts +5 -1
  135. package/components/main-menu/lib/directives/main-menu-close.directive.d.ts +3 -0
  136. package/components/main-menu/lib/directives/main-menu-item.directive.d.ts +16 -0
  137. package/components/main-menu/lib/helpers/create-main-menu-links.d.ts +1 -0
  138. package/components/main-menu/lib/main-menu.component.d.ts +42 -0
  139. package/components/main-menu/lib/main-menu.config.d.ts +31 -0
  140. package/components/main-menu/lib/main-menu.service.d.ts +28 -0
  141. package/components/mainfilter-group/lib/mainfilter-group.component.d.ts +4 -0
  142. package/components/menu/lib/directives/menu-item.directive.d.ts +6 -0
  143. package/components/menu/lib/menu.component.d.ts +13 -1
  144. package/components/menu/lib/menu.directive.d.ts +31 -0
  145. package/components/modal/lib/components/basic-modal/basic-modal.component.d.ts +14 -0
  146. package/components/modal/lib/components/modal-footer/modal-footer.component.d.ts +3 -0
  147. package/components/modal/lib/components/modal-header/modal-header.component.d.ts +9 -0
  148. package/components/modal/lib/components/modal-hero/modal-hero.component.d.ts +21 -0
  149. package/components/modal/lib/directives/modal-close.directive.d.ts +25 -1
  150. package/components/modal/lib/directives/modal-content.directive.d.ts +3 -0
  151. package/components/modal/lib/directives/modal-dismiss.directive.d.ts +18 -1
  152. package/components/modal/lib/helpers/inject-modal-ref.d.ts +21 -0
  153. package/components/modal/lib/helpers/provide-modal-ref.d.ts +9 -0
  154. package/components/modal/lib/modal.component.d.ts +25 -0
  155. package/components/modal/lib/modal.config.d.ts +33 -0
  156. package/components/modal/lib/modal.directive.d.ts +29 -0
  157. package/components/modal/lib/modal.service.d.ts +54 -0
  158. package/components/modal/lib/models/modal-ref.d.ts +34 -0
  159. package/components/navigation-back/lib/navigation-back.component.d.ts +3 -0
  160. package/components/notification/lib/components/notification-center/notification-center.component.d.ts +0 -2
  161. package/components/notification/lib/directives/notification-center.directive.d.ts +18 -4
  162. package/components/notification/lib/helpers/get-notifications-by-tag.d.ts +1 -0
  163. package/components/notification/lib/helpers/sort-notifications.d.ts +1 -0
  164. package/components/notification/lib/helpers/to-notification-collection.d.ts +1 -0
  165. package/components/notification/lib/models/notification-feature.d.ts +15 -0
  166. package/components/notification/lib/notification.config.d.ts +54 -0
  167. package/components/notification/lib/notification.logger.d.ts +1 -0
  168. package/components/notification/lib/notification.service.d.ts +55 -0
  169. package/components/notification/lib/notification.tokens.d.ts +3 -0
  170. package/components/notification/lib/services/notification-center.service.d.ts +9 -0
  171. package/components/paginator/lib/paginator.component.d.ts +89 -0
  172. package/components/paginator/lib/paginator.config.d.ts +24 -2
  173. package/components/progress/lib/progress.component.d.ts +15 -0
  174. package/components/radio-group/lib/components/radio-button/radio-button.component.d.ts +18 -1
  175. package/components/radio-group/lib/radio-group.component.d.ts +11 -0
  176. package/components/rail-navigation/lib/components/rail-navigation-item/rail-navigation-item.component.d.ts +19 -0
  177. package/components/rail-navigation/lib/rail-navigation.component.d.ts +26 -0
  178. package/components/rich-list/lib/components/rich-list-content/rich-list-content.component.d.ts +4 -0
  179. package/components/rich-list/lib/components/rich-list-header/rich-list-header.component.d.ts +4 -0
  180. package/components/rich-list/lib/components/rich-list-item/rich-list-item.component.d.ts +9 -1
  181. package/components/rich-list/lib/rich-list.component.d.ts +9 -2
  182. package/components/select/lib/components/select-option/select-option.component.d.ts +39 -2
  183. package/components/select/lib/directives/select-input-control.directive.d.ts +11 -0
  184. package/components/select/lib/pipes/select-search-filter.pipe.d.ts +10 -0
  185. package/components/select/lib/select.component.d.ts +59 -0
  186. package/components/slider/lib/slider.directive.d.ts +19 -0
  187. package/components/spinbox/lib/spinbox.component.d.ts +16 -0
  188. package/components/switch/lib/switch.component.d.ts +10 -0
  189. package/components/switch/lib/switch.validator.d.ts +12 -0
  190. package/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.d.ts +28 -0
  191. package/components/tab-bar/lib/tab-bar.component.d.ts +69 -0
  192. package/components/table/lib/components/check-cell/check-cell.component.d.ts +18 -0
  193. package/components/table/lib/components/header-title/header-title.component.d.ts +33 -1
  194. package/components/table/lib/directives/table-cell.directive.d.ts +4 -0
  195. package/components/table/lib/directives/table-row.directive.d.ts +4 -0
  196. package/components/table/lib/table.component.d.ts +36 -0
  197. package/components/timepicker/lib/timepicker.component.d.ts +11 -2
  198. package/components/timepicker/lib/utils/generate-time-stamps.d.ts +2 -1
  199. package/components/timepicker/lib/utils/ngx-mask-helper.d.ts +2 -2
  200. package/components/toast/lib/components/toast-item/toast-item.component.d.ts +5 -4
  201. package/components/toast/lib/models/toast.d.ts +4 -2
  202. package/components/toast/lib/toast.config.d.ts +26 -0
  203. package/components/toast/lib/toast.service.d.ts +35 -0
  204. package/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.d.ts +11 -0
  205. package/components/toggle-button-group/lib/toggle-button-group.component.d.ts +12 -0
  206. package/components/tooltip/lib/helpers/resolve-tooltip-trigger-events.d.ts +7 -0
  207. package/components/tooltip/lib/tooltip.component.d.ts +20 -0
  208. package/components/tooltip/lib/tooltip.directive.d.ts +35 -0
  209. package/components/wizard/lib/components/wizard-step/wizard-step.component.d.ts +34 -0
  210. package/components/wizard/lib/wizard.component.d.ts +20 -0
  211. package/esm2022/animations/lib/expand.mjs +45 -1
  212. package/esm2022/animations/lib/fade.mjs +71 -1
  213. package/esm2022/animations/lib/slide.mjs +22 -1
  214. package/esm2022/animations/lib/wait-for-child-animations.mjs +39 -1
  215. package/esm2022/breakpoints/lib/breakpoints.config.mjs +39 -1
  216. package/esm2022/breakpoints/lib/breakpoints.service.mjs +44 -1
  217. package/esm2022/breakpoints/lib/directives/match-breakpoints.directive.mjs +37 -1
  218. package/esm2022/breakpoints/lib/helpers/configure-breakpoint.mjs +20 -1
  219. package/esm2022/cdk/a11y/lib/directives/interactive.directive.mjs +33 -1
  220. package/esm2022/cdk/a11y/lib/directives/list-focus-manager-option.directive.mjs +23 -1
  221. package/esm2022/cdk/a11y/lib/directives/list-focus-manager.directive.mjs +18 -1
  222. package/esm2022/cdk/active-indicator/lib/active-indicator.directive.mjs +64 -1
  223. package/esm2022/cdk/autocomplete-control/lib/autocomplete-control.mjs +40 -2
  224. package/esm2022/cdk/checkbox-control/lib/checkbox-control.directive.mjs +4 -1
  225. package/esm2022/cdk/connected-overlay/lib/connected-overlay.service.mjs +45 -1
  226. package/esm2022/cdk/connected-overlay/lib/helpers/compute-overlay-position.mjs +11 -1
  227. package/esm2022/cdk/connected-overlay/lib/models/connected-overlay-ref.mjs +50 -1
  228. package/esm2022/cdk/custom-form-control/lib/custom-form-control.mjs +109 -3
  229. package/esm2022/cdk/custom-form-control/lib/input-control.directive.mjs +76 -1
  230. package/esm2022/cdk/dynamic-view/lib/dynamic-view.directive.mjs +18 -1
  231. package/esm2022/cdk/dynamic-view/lib/dynamic-view.service.mjs +31 -1
  232. package/esm2022/cdk/dynamic-view/lib/helpers/create-projectable-nodes.mjs +23 -1
  233. package/esm2022/cdk/dynamic-view/lib/helpers/is-dynamic-text-content.mjs +23 -1
  234. package/esm2022/cdk/dynamic-view/lib/helpers/is-dynamic-view.mjs +23 -1
  235. package/esm2022/cdk/dynamic-view/lib/models/dynamic-component-ref.mjs +40 -1
  236. package/esm2022/cdk/dynamic-view/lib/models/dynamic-template-ref.mjs +37 -1
  237. package/esm2022/cdk/dynamic-view/lib/tokens/dynamic-view-context.mjs +5 -1
  238. package/esm2022/cdk/dynamic-view/lib/tokens/dynamic-view-default-host.mjs +11 -1
  239. package/esm2022/cdk/event-plugins/lib/event-plugins.config.mjs +36 -1
  240. package/esm2022/cdk/event-plugins/lib/models/event-plugin.mjs +45 -1
  241. package/esm2022/cdk/event-plugins/lib/plugins/debounce-event-plugin.mjs +33 -1
  242. package/esm2022/cdk/event-plugins/lib/plugins/defer-event-plugin.mjs +25 -1
  243. package/esm2022/cdk/expandable/lib/directives/expandable-container.directive.mjs +42 -1
  244. package/esm2022/cdk/expandable/lib/directives/expandable-item.directive.mjs +48 -1
  245. package/esm2022/cdk/option-control/lib/option-control.mjs +48 -1
  246. package/esm2022/cdk/radio-group-control/lib/radio-control.directive.mjs +9 -1
  247. package/esm2022/cdk/radio-group-control/lib/radio-group-control.directive.mjs +12 -1
  248. package/esm2022/components/accordion/lib/accordion.component.mjs +9 -1
  249. package/esm2022/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +31 -1
  250. package/esm2022/components/accordion/lib/directives/accordion-item-title.mjs +4 -1
  251. package/esm2022/components/action-group/action-group.component.mjs +7 -1
  252. package/esm2022/components/area-header/area-header.component.mjs +9 -1
  253. package/esm2022/components/area-header/directives/area-header-content.directive.mjs +4 -1
  254. package/esm2022/components/area-header/directives/area-header-subtitle.directive.mjs +4 -1
  255. package/esm2022/components/autocomplete/lib/autocomplete.component.mjs +29 -5
  256. package/esm2022/components/avatar/lib/avatar.component.mjs +9 -1
  257. package/esm2022/components/badge/lib/badge.component.mjs +11 -1
  258. package/esm2022/components/badge/lib/badge.directive.mjs +16 -1
  259. package/esm2022/components/bar/lib/bar.component.mjs +8 -1
  260. package/esm2022/components/bar/lib/directives/bar-button.directive.mjs +4 -1
  261. package/esm2022/components/bar/lib/directives/bar-label.directive.mjs +4 -1
  262. package/esm2022/components/breadcrumbs/lib/breadcrumbs.component.mjs +4 -1
  263. package/esm2022/components/button/lib/button.component.mjs +11 -1
  264. package/esm2022/components/button-group/lib/button-group.component.mjs +16 -1
  265. package/esm2022/components/calendar/lib/calendar.component.mjs +35 -1
  266. package/esm2022/components/calendar/lib/calendar.config.mjs +18 -1
  267. package/esm2022/components/calendar/lib/calendar.service.mjs +49 -1
  268. package/esm2022/components/calendar/lib/components/calendar-header/calendar-header.component.mjs +19 -1
  269. package/esm2022/components/calendar/lib/components/calendar-month/calendar-month.component.mjs +7 -1
  270. package/esm2022/components/calendar/lib/components/calendar-year/calendar-year.component.mjs +7 -1
  271. package/esm2022/components/calendar/lib/components/calendar-years/calendar-years.component.mjs +7 -1
  272. package/esm2022/components/calendar/lib/daterange.service.mjs +17 -1
  273. package/esm2022/components/calendar/lib/directives/calendar-cell.directive.mjs +26 -1
  274. package/esm2022/components/calendar/lib/directives/calendar-view.directive.mjs +39 -1
  275. package/esm2022/components/calendar/lib/pipes/date-label.pipe.mjs +6 -1
  276. package/esm2022/components/calendar/lib/services/calendar-month.service.mjs +2 -1
  277. package/esm2022/components/calendar/lib/services/calendar-year.service.mjs +2 -1
  278. package/esm2022/components/calendar/lib/services/calendar-years.service.mjs +2 -1
  279. package/esm2022/components/calendar/lib/utils/check-cell-in-range.mjs +2 -1
  280. package/esm2022/components/calendar/lib/utils/check-identical-date.mjs +2 -1
  281. package/esm2022/components/calendar/lib/utils/get-A11y-label.mjs +2 -1
  282. package/esm2022/components/calendar/lib/utils/is-date-disabled.mjs +2 -1
  283. package/esm2022/components/calendar/lib/utils/parse-date.mjs +2 -1
  284. package/esm2022/components/calendar/lib/utils/validate-daterange.mjs +2 -1
  285. package/esm2022/components/calendar/lib/utils/validate-max-date.mjs +2 -1
  286. package/esm2022/components/calendar/lib/utils/validate-min-date.mjs +2 -1
  287. package/esm2022/components/calendar/lib/utils/validate-next-date-set.mjs +2 -1
  288. package/esm2022/components/calendar/lib/utils/validate-previous-date-set.mjs +2 -1
  289. package/esm2022/components/checkbox/lib/checkbox.component.mjs +33 -1
  290. package/esm2022/components/checkbox/lib/checkbox.validator.mjs +24 -1
  291. package/esm2022/components/chip/lib/components/chip/chip.component.mjs +15 -1
  292. package/esm2022/components/chip/lib/components/chip-list/chip-list.component.mjs +4 -1
  293. package/esm2022/components/chip/lib/components/chip-list-row/chip-list-row.component.mjs +4 -1
  294. package/esm2022/components/circular-progress/lib/circular-progress.component.mjs +21 -1
  295. package/esm2022/components/content-box/lib/content-box.component.mjs +4 -1
  296. package/esm2022/components/content-box/lib/directives/content-box-footer.directive.mjs +4 -1
  297. package/esm2022/components/content-box/lib/directives/content-box-header.directive.mjs +4 -1
  298. package/esm2022/components/datepicker/lib/datepicker.component.mjs +33 -1
  299. package/esm2022/components/datepicker/lib/datepicker.config.mjs +20 -1
  300. package/esm2022/components/datepicker/lib/directives/datepicker-input-control.directive.mjs +31 -1
  301. package/esm2022/components/datepicker/lib/utils/get-datepicker-input-pattern.mjs +3 -1
  302. package/esm2022/components/datepicker/lib/utils/get-datepicker-input-value-as-date.mjs +2 -1
  303. package/esm2022/components/daterangepicker/lib/daterangepicker.component.mjs +65 -1
  304. package/esm2022/components/daterangepicker/lib/daterangepicker.config.mjs +20 -1
  305. package/esm2022/components/daterangepicker/lib/directives/daterangepicker-input-control.directive.mjs +31 -1
  306. package/esm2022/components/daterangepicker/lib/range.validator.mjs +16 -1
  307. package/esm2022/components/daterangepicker/lib/required.validator.mjs +15 -1
  308. package/esm2022/components/daterangepicker/lib/utils/get-daterangepicker-input-pattern.mjs +3 -1
  309. package/esm2022/components/daterangepicker/lib/utils/get-daterangepicker-input-value-as-date.mjs +2 -1
  310. package/esm2022/components/dropdown/lib/dropdown.component.mjs +8 -1
  311. package/esm2022/components/dropdown/lib/dropdown.directive.mjs +55 -1
  312. package/esm2022/components/dropdown/lib/helpers/close-current-dropdown.mjs +6 -1
  313. package/esm2022/components/error-page/lib/error-page.component.mjs +8 -1
  314. package/esm2022/components/error-page/lib/error-page.config.mjs +9 -1
  315. package/esm2022/components/footer/lib/footer.component.mjs +10 -7
  316. package/esm2022/components/footer/lib/footer.config.mjs +3 -1
  317. package/esm2022/components/form-field/lib/components/form-field-info/form-field-info.component.mjs +14 -1
  318. package/esm2022/components/form-field/lib/components/form-group/form-group.component.mjs +13 -1
  319. package/esm2022/components/form-field/lib/directives/form-field-control.directive.mjs +6 -1
  320. package/esm2022/components/form-field/lib/directives/form-field-error.directive.mjs +4 -1
  321. package/esm2022/components/form-field/lib/directives/form-field-hint.directive.mjs +4 -1
  322. package/esm2022/components/form-field/lib/directives/form-field-label.directive.mjs +4 -1
  323. package/esm2022/components/form-field/lib/directives/form.directive.mjs +14 -1
  324. package/esm2022/components/form-field/lib/form-field.component.mjs +14 -1
  325. package/esm2022/components/form-field/lib/form-field.service.mjs +43 -1
  326. package/esm2022/components/form-field/lib/services/form-field-error.service.mjs +25 -1
  327. package/esm2022/components/header/lib/directives/header-avatar.directive.mjs +5 -1
  328. package/esm2022/components/header/lib/directives/header-title.directive.mjs +4 -1
  329. package/esm2022/components/header/lib/header.component.mjs +4 -1
  330. package/esm2022/components/header-navigation/lib/directives/header-navigation-link.directive.mjs +4 -1
  331. package/esm2022/components/header-navigation/lib/header-navigation.component.mjs +4 -1
  332. package/esm2022/components/icon/lib/helpers/unpack-icon-identifier.mjs +15 -1
  333. package/esm2022/components/icon/lib/icon.component.mjs +25 -1
  334. package/esm2022/components/icon/lib/icon.config.mjs +20 -1
  335. package/esm2022/components/inline-message/lib/inline-message.component.mjs +14 -1
  336. package/esm2022/components/link/link.directive.mjs +4 -1
  337. package/esm2022/components/list/lib/components/expandable-list-item/expandable-list-item.component.mjs +7 -1
  338. package/esm2022/components/list/lib/components/list-item/list-item.component.mjs +18 -2
  339. package/esm2022/components/list/lib/list.component.mjs +6 -1
  340. package/esm2022/components/loading-spinner/lib/loading-spinner.component.mjs +10 -2
  341. package/esm2022/components/loading-spinner/lib/loading-spinner.directive.mjs +23 -1
  342. package/esm2022/components/logo/logo.directive.mjs +16 -1
  343. package/esm2022/components/main-menu/lib/directives/main-menu-button.directive.mjs +5 -1
  344. package/esm2022/components/main-menu/lib/directives/main-menu-close.directive.mjs +4 -1
  345. package/esm2022/components/main-menu/lib/directives/main-menu-item.directive.mjs +17 -1
  346. package/esm2022/components/main-menu/lib/helpers/create-main-menu-links.mjs +2 -1
  347. package/esm2022/components/main-menu/lib/main-menu.component.mjs +37 -1
  348. package/esm2022/components/main-menu/lib/main-menu.config.mjs +32 -1
  349. package/esm2022/components/main-menu/lib/main-menu.service.mjs +29 -1
  350. package/esm2022/components/mainfilter-group/lib/mainfilter-group.component.mjs +5 -1
  351. package/esm2022/components/menu/lib/directives/menu-item.directive.mjs +7 -1
  352. package/esm2022/components/menu/lib/menu.component.mjs +13 -1
  353. package/esm2022/components/menu/lib/menu.directive.mjs +19 -1
  354. package/esm2022/components/modal/lib/components/basic-modal/basic-modal.component.mjs +15 -1
  355. package/esm2022/components/modal/lib/components/modal-footer/modal-footer.component.mjs +4 -1
  356. package/esm2022/components/modal/lib/components/modal-header/modal-header.component.mjs +4 -1
  357. package/esm2022/components/modal/lib/components/modal-hero/modal-hero.component.mjs +12 -1
  358. package/esm2022/components/modal/lib/directives/modal-close.directive.mjs +25 -1
  359. package/esm2022/components/modal/lib/directives/modal-content.directive.mjs +4 -1
  360. package/esm2022/components/modal/lib/directives/modal-dismiss.directive.mjs +18 -1
  361. package/esm2022/components/modal/lib/helpers/inject-modal-ref.mjs +22 -1
  362. package/esm2022/components/modal/lib/helpers/provide-modal-ref.mjs +10 -1
  363. package/esm2022/components/modal/lib/modal.component.mjs +21 -2
  364. package/esm2022/components/modal/lib/modal.config.mjs +34 -1
  365. package/esm2022/components/modal/lib/modal.directive.mjs +25 -1
  366. package/esm2022/components/modal/lib/modal.service.mjs +39 -1
  367. package/esm2022/components/modal/lib/models/modal-ref.mjs +34 -1
  368. package/esm2022/components/navigation-back/lib/navigation-back.component.mjs +4 -1
  369. package/esm2022/components/notification/lib/components/notification-center/notification-center.component.mjs +1 -3
  370. package/esm2022/components/notification/lib/directives/notification-center.directive.mjs +19 -5
  371. package/esm2022/components/notification/lib/helpers/get-notifications-by-tag.mjs +2 -1
  372. package/esm2022/components/notification/lib/helpers/sort-notifications.mjs +2 -1
  373. package/esm2022/components/notification/lib/helpers/to-notification-collection.mjs +2 -1
  374. package/esm2022/components/notification/lib/models/notification-feature.mjs +16 -1
  375. package/esm2022/components/notification/lib/notification.config.mjs +45 -1
  376. package/esm2022/components/notification/lib/notification.logger.mjs +2 -1
  377. package/esm2022/components/notification/lib/notification.service.mjs +56 -1
  378. package/esm2022/components/notification/lib/notification.tokens.mjs +4 -1
  379. package/esm2022/components/notification/lib/services/notification-center.service.mjs +10 -1
  380. package/esm2022/components/paginator/lib/paginator.component.mjs +90 -1
  381. package/esm2022/components/paginator/lib/paginator.config.mjs +29 -1
  382. package/esm2022/components/progress/lib/progress.component.mjs +16 -1
  383. package/esm2022/components/radio-group/lib/components/radio-button/radio-button.component.mjs +20 -3
  384. package/esm2022/components/radio-group/lib/radio-group.component.mjs +13 -2
  385. package/esm2022/components/rail-navigation/lib/components/rail-navigation-item/rail-navigation-item.component.mjs +17 -1
  386. package/esm2022/components/rail-navigation/lib/rail-navigation.component.mjs +27 -1
  387. package/esm2022/components/rich-list/lib/components/rich-list-content/rich-list-content.component.mjs +5 -1
  388. package/esm2022/components/rich-list/lib/components/rich-list-header/rich-list-header.component.mjs +5 -1
  389. package/esm2022/components/rich-list/lib/components/rich-list-item/rich-list-item.component.mjs +10 -2
  390. package/esm2022/components/rich-list/lib/rich-list.component.mjs +10 -3
  391. package/esm2022/components/select/lib/components/select-option/select-option.component.mjs +49 -7
  392. package/esm2022/components/select/lib/directives/select-input-control.directive.mjs +12 -2
  393. package/esm2022/components/select/lib/pipes/select-search-filter.pipe.mjs +11 -1
  394. package/esm2022/components/select/lib/select.component.mjs +59 -5
  395. package/esm2022/components/slider/lib/slider.directive.mjs +20 -1
  396. package/esm2022/components/spinbox/lib/spinbox.component.mjs +17 -1
  397. package/esm2022/components/switch/lib/switch.component.mjs +11 -1
  398. package/esm2022/components/switch/lib/switch.validator.mjs +13 -1
  399. package/esm2022/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.mjs +29 -1
  400. package/esm2022/components/tab-bar/lib/tab-bar.component.mjs +71 -1
  401. package/esm2022/components/table/lib/components/check-cell/check-cell.component.mjs +19 -1
  402. package/esm2022/components/table/lib/components/header-title/header-title.component.mjs +30 -2
  403. package/esm2022/components/table/lib/directives/table-cell.directive.mjs +5 -1
  404. package/esm2022/components/table/lib/directives/table-row.directive.mjs +5 -1
  405. package/esm2022/components/table/lib/table.component.mjs +30 -1
  406. package/esm2022/components/timepicker/lib/timepicker.component.mjs +15 -6
  407. package/esm2022/components/timepicker/lib/utils/generate-time-stamps.mjs +5 -3
  408. package/esm2022/components/timepicker/lib/utils/ngx-mask-helper.mjs +3 -3
  409. package/esm2022/components/toast/lib/components/toast-container/toast-container.component.mjs +3 -3
  410. package/esm2022/components/toast/lib/components/toast-item/toast-item.component.mjs +5 -3
  411. package/esm2022/components/toast/lib/models/toast.mjs +1 -1
  412. package/esm2022/components/toast/lib/toast.config.mjs +27 -1
  413. package/esm2022/components/toast/lib/toast.service.mjs +36 -1
  414. package/esm2022/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.mjs +12 -1
  415. package/esm2022/components/toggle-button-group/lib/toggle-button-group.component.mjs +14 -2
  416. package/esm2022/components/tooltip/lib/helpers/resolve-tooltip-trigger-events.mjs +8 -1
  417. package/esm2022/components/tooltip/lib/tooltip.component.mjs +18 -1
  418. package/esm2022/components/tooltip/lib/tooltip.directive.mjs +36 -1
  419. package/esm2022/components/wizard/lib/components/wizard-step/wizard-step.component.mjs +35 -1
  420. package/esm2022/components/wizard/lib/wizard.component.mjs +21 -1
  421. package/esm2022/internal/lib/helpers/decorator-property-name.mjs +9 -1
  422. package/esm2022/internal/translate/lib/translate.config.mjs +32 -1
  423. package/esm2022/internal/translate/lib/translate.service.mjs +30 -1
  424. package/esm2022/lib/controllers/controller.mjs +26 -1
  425. package/esm2022/lib/controllers/disabled.controller.mjs +60 -1
  426. package/esm2022/lib/controllers/readonly.controller.mjs +57 -1
  427. package/esm2022/lib/directives/click-outside.directive.mjs +30 -1
  428. package/esm2022/lib/directives/delegate-focus.directive.mjs +15 -1
  429. package/esm2022/lib/services/window-ref.mjs +67 -1
  430. package/esm2022/lib/tokens/identity-matcher.mjs +25 -1
  431. package/esm2022/lib/tokens/string-search-handler.mjs +25 -1
  432. package/esm2022/lib/tokens/stringify.mjs +26 -1
  433. package/esm2022/localization/lib/features/with-http-language-header.mjs +54 -1
  434. package/esm2022/localization/lib/features/with-http-language-query-param.mjs +52 -1
  435. package/esm2022/localization/lib/loaders/browser-language-loader.mjs +33 -1
  436. package/esm2022/localization/lib/localization.config.mjs +71 -1
  437. package/esm2022/localization/lib/localization.service.mjs +42 -3
  438. package/esm2022/localization/lib/models/localization-feature.mjs +8 -1
  439. package/esm2022/rxjs/index.mjs +2 -2
  440. package/esm2022/rxjs/lib/delay-until.mjs +23 -1
  441. package/esm2022/rxjs/lib/from-element-mutation.mjs +22 -1
  442. package/esm2022/rxjs/lib/from-element-resize.mjs +25 -1
  443. package/esm2022/rxjs/lib/from-events.mjs +25 -1
  444. package/esm2022/rxjs/lib/from-query-list.mjs +24 -0
  445. package/esm2022/sdk/lib/application-environment.mjs +51 -1
  446. package/esm2022/theming/lib/helpers/prefers-dark-theme.mjs +19 -1
  447. package/esm2022/theming/lib/helpers/resolve-theme.mjs +26 -1
  448. package/esm2022/theming/lib/helpers/theme-storage.mjs +43 -1
  449. package/esm2022/theming/lib/theming.config.mjs +34 -1
  450. package/esm2022/theming/lib/theming.service.mjs +32 -1
  451. package/esm2022/utils/lib/decorators/pure.mjs +52 -1
  452. package/esm2022/utils/lib/helpers/angular.mjs +37 -1
  453. package/esm2022/utils/lib/helpers/array.mjs +5 -1
  454. package/esm2022/utils/lib/helpers/build-url.mjs +21 -1
  455. package/esm2022/utils/lib/helpers/build-website-url.mjs +3 -2
  456. package/esm2022/utils/lib/helpers/cache-storage-client.mjs +52 -1
  457. package/esm2022/utils/lib/helpers/coercion.mjs +18 -1
  458. package/esm2022/utils/lib/helpers/debounce.mjs +28 -1
  459. package/esm2022/utils/lib/helpers/defer-fn.mjs +21 -1
  460. package/esm2022/utils/lib/helpers/dom.mjs +71 -1
  461. package/esm2022/utils/lib/helpers/get-axis.mjs +21 -1
  462. package/esm2022/utils/lib/helpers/get-language-code.mjs +18 -1
  463. package/esm2022/utils/lib/helpers/get-opposite-side.mjs +22 -1
  464. package/esm2022/utils/lib/helpers/get-side.mjs +18 -1
  465. package/esm2022/utils/lib/helpers/get-unique-id.mjs +34 -1
  466. package/esm2022/utils/lib/helpers/match-url.mjs +41 -1
  467. package/esm2022/utils/lib/helpers/ng-changes.mjs +30 -1
  468. package/esm2022/utils/lib/helpers/provide-config.mjs +57 -1
  469. package/esm2022/utils/lib/helpers/queue.mjs +84 -1
  470. package/esm2022/utils/lib/helpers/type-guards.mjs +58 -1
  471. package/esm2022/utils/lib/helpers/until-destroyed.mjs +39 -1
  472. package/fesm2022/odx-angular-animations.mjs +173 -0
  473. package/fesm2022/odx-angular-animations.mjs.map +1 -1
  474. package/fesm2022/odx-angular-breakpoints.mjs +136 -0
  475. package/fesm2022/odx-angular-breakpoints.mjs.map +1 -1
  476. package/fesm2022/odx-angular-cdk-a11y.mjs +71 -0
  477. package/fesm2022/odx-angular-cdk-a11y.mjs.map +1 -1
  478. package/fesm2022/odx-angular-cdk-active-indicator.mjs +63 -0
  479. package/fesm2022/odx-angular-cdk-active-indicator.mjs.map +1 -1
  480. package/fesm2022/odx-angular-cdk-autocomplete-control.mjs +39 -1
  481. package/fesm2022/odx-angular-cdk-autocomplete-control.mjs.map +1 -1
  482. package/fesm2022/odx-angular-cdk-checkbox-control.mjs +3 -0
  483. package/fesm2022/odx-angular-cdk-checkbox-control.mjs.map +1 -1
  484. package/fesm2022/odx-angular-cdk-connected-overlay.mjs +103 -0
  485. package/fesm2022/odx-angular-cdk-connected-overlay.mjs.map +1 -1
  486. package/fesm2022/odx-angular-cdk-custom-form-control.mjs +183 -2
  487. package/fesm2022/odx-angular-cdk-custom-form-control.mjs.map +1 -1
  488. package/fesm2022/odx-angular-cdk-dynamic-view.mjs +202 -0
  489. package/fesm2022/odx-angular-cdk-dynamic-view.mjs.map +1 -1
  490. package/fesm2022/odx-angular-cdk-event-plugins.mjs +135 -0
  491. package/fesm2022/odx-angular-cdk-event-plugins.mjs.map +1 -1
  492. package/fesm2022/odx-angular-cdk-expandable.mjs +88 -0
  493. package/fesm2022/odx-angular-cdk-expandable.mjs.map +1 -1
  494. package/fesm2022/odx-angular-cdk-option-control.mjs +47 -0
  495. package/fesm2022/odx-angular-cdk-option-control.mjs.map +1 -1
  496. package/fesm2022/odx-angular-cdk-radio-group-control.mjs +19 -0
  497. package/fesm2022/odx-angular-cdk-radio-group-control.mjs.map +1 -1
  498. package/fesm2022/odx-angular-components-accordion.mjs +41 -0
  499. package/fesm2022/odx-angular-components-accordion.mjs.map +1 -1
  500. package/fesm2022/odx-angular-components-action-group.mjs +6 -0
  501. package/fesm2022/odx-angular-components-action-group.mjs.map +1 -1
  502. package/fesm2022/odx-angular-components-area-header.mjs +14 -0
  503. package/fesm2022/odx-angular-components-area-header.mjs.map +1 -1
  504. package/fesm2022/odx-angular-components-autocomplete.mjs +28 -4
  505. package/fesm2022/odx-angular-components-autocomplete.mjs.map +1 -1
  506. package/fesm2022/odx-angular-components-avatar.mjs +8 -0
  507. package/fesm2022/odx-angular-components-avatar.mjs.map +1 -1
  508. package/fesm2022/odx-angular-components-badge.mjs +25 -0
  509. package/fesm2022/odx-angular-components-badge.mjs.map +1 -1
  510. package/fesm2022/odx-angular-components-bar.mjs +13 -0
  511. package/fesm2022/odx-angular-components-bar.mjs.map +1 -1
  512. package/fesm2022/odx-angular-components-breadcrumbs.mjs +3 -0
  513. package/fesm2022/odx-angular-components-breadcrumbs.mjs.map +1 -1
  514. package/fesm2022/odx-angular-components-button-group.mjs +15 -0
  515. package/fesm2022/odx-angular-components-button-group.mjs.map +1 -1
  516. package/fesm2022/odx-angular-components-button.mjs +10 -0
  517. package/fesm2022/odx-angular-components-button.mjs.map +1 -1
  518. package/fesm2022/odx-angular-components-calendar.mjs +232 -0
  519. package/fesm2022/odx-angular-components-calendar.mjs.map +1 -1
  520. package/fesm2022/odx-angular-components-checkbox.mjs +55 -0
  521. package/fesm2022/odx-angular-components-checkbox.mjs.map +1 -1
  522. package/fesm2022/odx-angular-components-chip.mjs +20 -0
  523. package/fesm2022/odx-angular-components-chip.mjs.map +1 -1
  524. package/fesm2022/odx-angular-components-circular-progress.mjs +20 -0
  525. package/fesm2022/odx-angular-components-circular-progress.mjs.map +1 -1
  526. package/fesm2022/odx-angular-components-content-box.mjs +9 -0
  527. package/fesm2022/odx-angular-components-content-box.mjs.map +1 -1
  528. package/fesm2022/odx-angular-components-datepicker.mjs +84 -0
  529. package/fesm2022/odx-angular-components-datepicker.mjs.map +1 -1
  530. package/fesm2022/odx-angular-components-daterangepicker.mjs +145 -0
  531. package/fesm2022/odx-angular-components-daterangepicker.mjs.map +1 -1
  532. package/fesm2022/odx-angular-components-dropdown.mjs +66 -0
  533. package/fesm2022/odx-angular-components-dropdown.mjs.map +1 -1
  534. package/fesm2022/odx-angular-components-error-page.mjs +15 -0
  535. package/fesm2022/odx-angular-components-error-page.mjs.map +1 -1
  536. package/fesm2022/odx-angular-components-footer.mjs +11 -6
  537. package/fesm2022/odx-angular-components-footer.mjs.map +1 -1
  538. package/fesm2022/odx-angular-components-form-field.mjs +131 -0
  539. package/fesm2022/odx-angular-components-form-field.mjs.map +1 -1
  540. package/fesm2022/odx-angular-components-header-navigation.mjs +6 -0
  541. package/fesm2022/odx-angular-components-header-navigation.mjs.map +1 -1
  542. package/fesm2022/odx-angular-components-header.mjs +10 -0
  543. package/fesm2022/odx-angular-components-header.mjs.map +1 -1
  544. package/fesm2022/odx-angular-components-icon.mjs +57 -0
  545. package/fesm2022/odx-angular-components-icon.mjs.map +1 -1
  546. package/fesm2022/odx-angular-components-inline-message.mjs +13 -0
  547. package/fesm2022/odx-angular-components-inline-message.mjs.map +1 -1
  548. package/fesm2022/odx-angular-components-link.mjs +3 -0
  549. package/fesm2022/odx-angular-components-link.mjs.map +1 -1
  550. package/fesm2022/odx-angular-components-list.mjs +28 -1
  551. package/fesm2022/odx-angular-components-list.mjs.map +1 -1
  552. package/fesm2022/odx-angular-components-loading-spinner.mjs +30 -0
  553. package/fesm2022/odx-angular-components-loading-spinner.mjs.map +1 -1
  554. package/fesm2022/odx-angular-components-logo.mjs +15 -0
  555. package/fesm2022/odx-angular-components-logo.mjs.map +1 -1
  556. package/fesm2022/odx-angular-components-main-menu.mjs +119 -0
  557. package/fesm2022/odx-angular-components-main-menu.mjs.map +1 -1
  558. package/fesm2022/odx-angular-components-mainfilter-group.mjs +4 -0
  559. package/fesm2022/odx-angular-components-mainfilter-group.mjs.map +1 -1
  560. package/fesm2022/odx-angular-components-menu.mjs +36 -0
  561. package/fesm2022/odx-angular-components-menu.mjs.map +1 -1
  562. package/fesm2022/odx-angular-components-modal.mjs +252 -0
  563. package/fesm2022/odx-angular-components-modal.mjs.map +1 -1
  564. package/fesm2022/odx-angular-components-navigation-back.mjs +3 -0
  565. package/fesm2022/odx-angular-components-navigation-back.mjs.map +1 -1
  566. package/fesm2022/odx-angular-components-notification.mjs +148 -6
  567. package/fesm2022/odx-angular-components-notification.mjs.map +1 -1
  568. package/fesm2022/odx-angular-components-paginator.mjs +117 -0
  569. package/fesm2022/odx-angular-components-paginator.mjs.map +1 -1
  570. package/fesm2022/odx-angular-components-progress.mjs +15 -0
  571. package/fesm2022/odx-angular-components-progress.mjs.map +1 -1
  572. package/fesm2022/odx-angular-components-radio-group.mjs +30 -2
  573. package/fesm2022/odx-angular-components-radio-group.mjs.map +1 -1
  574. package/fesm2022/odx-angular-components-rail-navigation.mjs +42 -0
  575. package/fesm2022/odx-angular-components-rail-navigation.mjs.map +1 -1
  576. package/fesm2022/odx-angular-components-rich-list.mjs +26 -3
  577. package/fesm2022/odx-angular-components-rich-list.mjs.map +1 -1
  578. package/fesm2022/odx-angular-components-select.mjs +126 -11
  579. package/fesm2022/odx-angular-components-select.mjs.map +1 -1
  580. package/fesm2022/odx-angular-components-slider.mjs +19 -0
  581. package/fesm2022/odx-angular-components-slider.mjs.map +1 -1
  582. package/fesm2022/odx-angular-components-spinbox.mjs +16 -0
  583. package/fesm2022/odx-angular-components-spinbox.mjs.map +1 -1
  584. package/fesm2022/odx-angular-components-switch.mjs +22 -0
  585. package/fesm2022/odx-angular-components-switch.mjs.map +1 -1
  586. package/fesm2022/odx-angular-components-tab-bar.mjs +98 -0
  587. package/fesm2022/odx-angular-components-tab-bar.mjs.map +1 -1
  588. package/fesm2022/odx-angular-components-table.mjs +84 -1
  589. package/fesm2022/odx-angular-components-table.mjs.map +1 -1
  590. package/fesm2022/odx-angular-components-timepicker.mjs +20 -9
  591. package/fesm2022/odx-angular-components-timepicker.mjs.map +1 -1
  592. package/fesm2022/odx-angular-components-toast.mjs +67 -4
  593. package/fesm2022/odx-angular-components-toast.mjs.map +1 -1
  594. package/fesm2022/odx-angular-components-toggle-button-group.mjs +23 -0
  595. package/fesm2022/odx-angular-components-toggle-button-group.mjs.map +1 -1
  596. package/fesm2022/odx-angular-components-tooltip.mjs +59 -0
  597. package/fesm2022/odx-angular-components-tooltip.mjs.map +1 -1
  598. package/fesm2022/odx-angular-components-wizard.mjs +54 -0
  599. package/fesm2022/odx-angular-components-wizard.mjs.map +1 -1
  600. package/fesm2022/odx-angular-internal-translate.mjs +60 -0
  601. package/fesm2022/odx-angular-internal-translate.mjs.map +1 -1
  602. package/fesm2022/odx-angular-internal.mjs +8 -0
  603. package/fesm2022/odx-angular-internal.mjs.map +1 -1
  604. package/fesm2022/odx-angular-localization.mjs +254 -2
  605. package/fesm2022/odx-angular-localization.mjs.map +1 -1
  606. package/fesm2022/odx-angular-rxjs.mjs +115 -5
  607. package/fesm2022/odx-angular-rxjs.mjs.map +1 -1
  608. package/fesm2022/odx-angular-sdk.mjs +50 -0
  609. package/fesm2022/odx-angular-sdk.mjs.map +1 -1
  610. package/fesm2022/odx-angular-theming.mjs +149 -0
  611. package/fesm2022/odx-angular-theming.mjs.map +1 -1
  612. package/fesm2022/odx-angular-utils.mjs +709 -1
  613. package/fesm2022/odx-angular-utils.mjs.map +1 -1
  614. package/fesm2022/odx-angular.mjs +322 -0
  615. package/fesm2022/odx-angular.mjs.map +1 -1
  616. package/internal/lib/helpers/decorator-property-name.d.ts +8 -0
  617. package/internal/translate/lib/translate.config.d.ts +31 -0
  618. package/internal/translate/lib/translate.service.d.ts +29 -0
  619. package/lib/controllers/controller.d.ts +25 -0
  620. package/lib/controllers/disabled.controller.d.ts +59 -0
  621. package/lib/controllers/readonly.controller.d.ts +56 -0
  622. package/lib/directives/click-outside.directive.d.ts +29 -0
  623. package/lib/directives/delegate-focus.directive.d.ts +14 -0
  624. package/lib/services/window-ref.d.ts +66 -0
  625. package/lib/tokens/identity-matcher.d.ts +41 -0
  626. package/lib/tokens/string-search-handler.d.ts +39 -0
  627. package/lib/tokens/stringify.d.ts +42 -0
  628. package/localization/lib/features/with-http-language-header.d.ts +63 -0
  629. package/localization/lib/features/with-http-language-query-param.d.ts +61 -0
  630. package/localization/lib/loaders/browser-language-loader.d.ts +32 -0
  631. package/localization/lib/localization.config.d.ts +81 -0
  632. package/localization/lib/localization.service.d.ts +39 -0
  633. package/localization/lib/models/localization-feature.d.ts +7 -0
  634. package/package.json +1 -1
  635. package/rxjs/index.d.ts +1 -1
  636. package/rxjs/lib/delay-until.d.ts +22 -0
  637. package/rxjs/lib/from-element-mutation.d.ts +21 -0
  638. package/rxjs/lib/from-element-resize.d.ts +24 -0
  639. package/rxjs/lib/from-events.d.ts +24 -0
  640. package/rxjs/lib/from-query-list.d.ts +22 -0
  641. package/sdk/lib/application-environment.d.ts +59 -0
  642. package/theming/lib/helpers/prefers-dark-theme.d.ts +18 -0
  643. package/theming/lib/helpers/resolve-theme.d.ts +25 -0
  644. package/theming/lib/helpers/theme-storage.d.ts +42 -0
  645. package/theming/lib/theming.config.d.ts +46 -0
  646. package/theming/lib/theming.service.d.ts +31 -0
  647. package/utils/lib/decorators/pure.d.ts +51 -0
  648. package/utils/lib/helpers/angular.d.ts +36 -0
  649. package/utils/lib/helpers/array.d.ts +4 -0
  650. package/utils/lib/helpers/build-url.d.ts +20 -0
  651. package/utils/lib/helpers/build-website-url.d.ts +2 -1
  652. package/utils/lib/helpers/cache-storage-client.d.ts +51 -0
  653. package/utils/lib/helpers/coercion.d.ts +17 -0
  654. package/utils/lib/helpers/debounce.d.ts +27 -0
  655. package/utils/lib/helpers/defer-fn.d.ts +20 -0
  656. package/utils/lib/helpers/dom.d.ts +70 -0
  657. package/utils/lib/helpers/get-axis.d.ts +20 -0
  658. package/utils/lib/helpers/get-language-code.d.ts +17 -0
  659. package/utils/lib/helpers/get-opposite-side.d.ts +21 -0
  660. package/utils/lib/helpers/get-side.d.ts +17 -0
  661. package/utils/lib/helpers/get-unique-id.d.ts +33 -0
  662. package/utils/lib/helpers/match-url.d.ts +40 -0
  663. package/utils/lib/helpers/ng-changes.d.ts +52 -0
  664. package/utils/lib/helpers/provide-config.d.ts +56 -0
  665. package/utils/lib/helpers/queue.d.ts +83 -0
  666. package/utils/lib/helpers/type-guards.d.ts +57 -0
  667. package/utils/lib/helpers/until-destroyed.d.ts +38 -0
  668. package/esm2022/rxjs/lib/form-query-list.mjs +0 -5
  669. package/rxjs/lib/form-query-list.d.ts +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-internal.mjs","sources":["../../../../libs/angular/internal/src/lib/helpers/camel-to-kebab-case.ts","../../../../libs/angular/internal/src/lib/helpers/decorator-property-name.ts","../../../../libs/angular/internal/src/lib/helpers/deepmerge.ts","../../../../libs/angular/internal/src/lib/helpers/fast-equals.ts","../../../../libs/angular/internal/src/lib/helpers/get-css-variables.ts","../../../../libs/angular/internal/src/lib/helpers/get-enum-values.ts","../../../../libs/angular/internal/src/lib/decorators/css-component.ts","../../../../libs/angular/internal/src/lib/decorators/css-modifier.ts","../../../../libs/angular/internal/src/lib/logger.ts","../../../../libs/angular/internal/src/odx-angular-internal.ts"],"sourcesContent":["/** @internal */\n/* istanbul ignore next */\nexport function camelToKebabCase(value: string): string {\n if (value !== value.toLowerCase()) {\n return value.replace(/[A-Z]/g, (match, index) => {\n const char = match.toLowerCase();\n\n return index === 0 ? char : `-${char}`;\n });\n }\n return value;\n}\n","export function decoratorPropertyName<D extends string, T extends string>(decoratorName: D, propertyName: T): `__ODX_${D}_${T}__` {\n return `__ODX_${decoratorName}_${propertyName}__`;\n}\n","import { deepmergeCustom, DeepMergeLeafURI } from 'deepmerge-ts';\n\nexport const deepmerge = deepmergeCustom<{ DeepMergeArraysURI: DeepMergeLeafURI }>({\n mergeArrays: false,\n mergeSets: false,\n});\n","import { deepEqual } from 'fast-equals';\n\nexport const fastDeepEqual = (obj1: unknown, obj2: unknown) => deepEqual(obj1, obj2);\n","interface CSSVariableDefinition {\n name: string;\n value: string;\n}\n\n/* istanbul ignore next */\nfunction isSameDomain({ href }: StyleSheet): boolean {\n return !href || href.startsWith(window.location.origin);\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function getCSSVariables(filter: RegExp, selector = ':root'): CSSVariableDefinition[] {\n const stylesheets = Array.from(document.styleSheets).filter(isSameDomain);\n\n return stylesheets.reduce<CSSVariableDefinition[]>((variables, { cssRules }) => {\n const rules = Array.from(cssRules).filter(({ type }) => type === CSSRule.STYLE_RULE) as CSSStyleRule[];\n for (const { style, selectorText } of rules) {\n for (const propName of Array.from(style)) {\n const name = propName.trim();\n if (!name.startsWith('--') || !filter.test(name) || (selector && selectorText !== selector)) continue;\n variables.push({ name, value: style.getPropertyValue(propName).trim() });\n }\n }\n return variables;\n }, []);\n}\n","/** @internal */\nexport function getEnumValues<TEnum, TKeys extends string>(e: { [key in TKeys]: TEnum }): TEnum[] {\n const keys = Object.keys(e) as TKeys[];\n return keys.filter((key) => e[key] !== undefined).map((key) => e[key]);\n}\n","import { ElementRef, Type } from '@angular/core';\nimport { decoratorPropertyName } from '../helpers';\n\nexport const CSS_COMPONENT_NAME = decoratorPropertyName('CSSComponent', 'name');\n\n/** @internal */\nexport interface CSSComponent {\n readonly element: ElementRef<HTMLElement>;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function CSSComponent(name: string, prefix = 'odx') {\n return (target: Type<CSSComponent>) => {\n const cssClass = `${prefix}-${name}`;\n Object.defineProperty(target.prototype, CSS_COMPONENT_NAME, {\n value: cssClass,\n });\n\n (function (this: unknown, ngOnInit?: () => void) {\n target.prototype.ngOnInit = function (this: CSSComponent) {\n this.element.nativeElement.classList.add(cssClass);\n ngOnInit?.call(this);\n };\n })(target.prototype.ngOnInit);\n };\n}\n","import { camelToKebabCase, decoratorPropertyName } from '../helpers';\nimport { CSSComponent, CSS_COMPONENT_NAME } from './css-component';\n\n/** @internal */\ninterface CSSModifierOptions {\n withComponentPrefix?: boolean;\n withPrefix?: boolean;\n}\n\ntype CSSComponentInstance = CSSComponent & Record<string, unknown>;\n\n/** @internal */\n/* istanbul ignore next */\nexport function CSSModifier(options?: CSSModifierOptions) {\n return (target: CSSComponent, propertyKey: PropertyKey) => {\n const propertyKeyName = propertyKey.toString();\n const propertyKeyKebabCase = camelToKebabCase(propertyKeyName);\n const propertySymbol = decoratorPropertyName('CSSModifier', propertyKeyName);\n const propertyDefaultValue = decoratorPropertyName('CSSModifier', `${propertyKeyName}_default`);\n\n function createModifierClass(this: CSSComponentInstance, value: unknown) {\n if (typeof value === 'boolean' || (typeof value === 'string' && value.length > 0)) {\n let modifier = typeof value === 'boolean' ? propertyKeyKebabCase : value;\n if (options?.withPrefix) {\n modifier = `${propertyKeyName}-${modifier}`;\n }\n if (options?.withComponentPrefix ?? true) {\n return `${this[CSS_COMPONENT_NAME]}--${modifier}`;\n }\n return modifier;\n }\n return null;\n }\n\n function getter(this: CSSComponentInstance) {\n return this[propertySymbol];\n }\n\n function setter(this: CSSComponentInstance, value: unknown) {\n this[propertyDefaultValue] ??= value;\n const currentValue = this[propertySymbol] ?? null;\n const nextValue = value ?? this[propertyDefaultValue] ?? null;\n\n if (nextValue !== currentValue) {\n const currentModifierClass = createModifierClass.call(this, currentValue);\n if (currentModifierClass !== null) {\n this.element.nativeElement.classList.remove(currentModifierClass);\n }\n const newModifierClass = createModifierClass.call(this, nextValue);\n if (newModifierClass !== null && (typeof nextValue === 'boolean' ? nextValue : true)) {\n this.element.nativeElement.classList.add(newModifierClass);\n }\n }\n this[propertySymbol] = nextValue;\n }\n Object.defineProperty(target, propertyKey, {\n get: getter,\n set: setter,\n });\n };\n}\n","import { isDevMode } from '@angular/core';\n\nexport class Logger {\n private isEnabled: boolean;\n private readonly name: string;\n private readonly prefix: string;\n\n constructor(name: string) {\n this.name = name;\n this.prefix = `[${this.name}]`;\n this.isEnabled = isDevMode();\n }\n\n public log(...data: unknown[]): void {\n this.handle('log', data);\n }\n\n public info(...data: unknown[]): void {\n this.handle('info', data);\n }\n\n public warn(...data: unknown[]): void {\n this.handle('warn', data);\n }\n\n public error(...data: unknown[]): void {\n this.handle('error', data);\n }\n\n public debug(...data: unknown[]): void {\n this.handle('debug', data);\n }\n\n public group(name: string, groupHandler: (this: Logger, log: (...data: unknown[]) => void) => void, collapsed = true): void {\n if (!this.isEnabled) return;\n console[collapsed ? 'groupCollapsed' : 'group'](this.prefix, name);\n groupHandler.apply(this, [console.info]);\n console.groupEnd();\n }\n\n public enable(): void {\n this.isEnabled = true;\n }\n\n public disable(): void {\n this.isEnabled = false;\n }\n\n protected handle(method: 'debug' | 'log' | 'info' | 'warn' | 'error', data: unknown[]): void {\n if (!this.isEnabled) return;\n console[method](this.prefix, ...data);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;AACM,SAAU,gBAAgB,CAAC,KAAa,EAAA;AAC5C,IAAA,IAAI,KAAK,KAAK,KAAK,CAAC,WAAW,EAAE,EAAE;QACjC,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAI;AAC9C,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;AAEjC,YAAA,OAAO,KAAK,KAAK,CAAC,GAAG,IAAI,GAAG,CAAI,CAAA,EAAA,IAAI,EAAE,CAAC;AACzC,SAAC,CAAC,CAAC;AACJ,KAAA;AACD,IAAA,OAAO,KAAK,CAAC;AACf;;ACXgB,SAAA,qBAAqB,CAAqC,aAAgB,EAAE,YAAe,EAAA;AACzG,IAAA,OAAO,CAAS,MAAA,EAAA,aAAa,CAAI,CAAA,EAAA,YAAY,IAAI,CAAC;AACpD;;ACAO,MAAM,SAAS,GAAG,eAAe,CAA2C;AACjF,IAAA,WAAW,EAAE,KAAK;AAClB,IAAA,SAAS,EAAE,KAAK;AACjB,CAAA;;ACHY,MAAA,aAAa,GAAG,CAAC,IAAa,EAAE,IAAa,KAAK,SAAS,CAAC,IAAI,EAAE,IAAI;;ACGnF;AACA,SAAS,YAAY,CAAC,EAAE,IAAI,EAAc,EAAA;AACxC,IAAA,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC1D,CAAC;AAED;AACA;SACgB,eAAe,CAAC,MAAc,EAAE,QAAQ,GAAG,OAAO,EAAA;AAChE,IAAA,MAAM,WAAW,G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A;QAClH,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE,OAAO;AAC5B,QAAA,OAAO,CAAC,SAAS,GAAG,gBAAgB,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACnE,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACzC,OAAO,CAAC,QAAQ,EAAE,CAAC;KACpB;IAEM,MAAM,GAAA;AACX,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;KACvB;IAEM,OAAO,GAAA;AACZ,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;KACxB;IAES,MAAM,CAAC,MAAmD,EAAE,IAAe,EAAA;QACnF,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE,OAAO;QAC5B,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;KACvC;AACF;;ACpDD;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-internal.mjs","sources":["../../../../libs/angular/internal/src/lib/helpers/camel-to-kebab-case.ts","../../../../libs/angular/internal/src/lib/helpers/decorator-property-name.ts","../../../../libs/angular/internal/src/lib/helpers/deepmerge.ts","../../../../libs/angular/internal/src/lib/helpers/fast-equals.ts","../../../../libs/angular/internal/src/lib/helpers/get-css-variables.ts","../../../../libs/angular/internal/src/lib/helpers/get-enum-values.ts","../../../../libs/angular/internal/src/lib/decorators/css-component.ts","../../../../libs/angular/internal/src/lib/decorators/css-modifier.ts","../../../../libs/angular/internal/src/lib/logger.ts","../../../../libs/angular/internal/src/odx-angular-internal.ts"],"sourcesContent":["/** @internal */\n/* istanbul ignore next */\nexport function camelToKebabCase(value: string): string {\n if (value !== value.toLowerCase()) {\n return value.replace(/[A-Z]/g, (match, index) => {\n const char = match.toLowerCase();\n\n return index === 0 ? char : `-${char}`;\n });\n }\n return value;\n}\n","/**\n * @internal\n * Generates a unique property name for a decorator.\n *\n * @param {string} decoratorName - The name of the decorator.\n * @param {string} propertyName - The name of the property.\n * @returns {string} - The unique property name.\n */\nexport function decoratorPropertyName<D extends string, T extends string>(decoratorName: D, propertyName: T): `__ODX_${D}_${T}__` {\n return `__ODX_${decoratorName}_${propertyName}__`;\n}\n","import { deepmergeCustom, DeepMergeLeafURI } from 'deepmerge-ts';\n\nexport const deepmerge = deepmergeCustom<{ DeepMergeArraysURI: DeepMergeLeafURI }>({\n mergeArrays: false,\n mergeSets: false,\n});\n","import { deepEqual } from 'fast-equals';\n\nexport const fastDeepEqual = (obj1: unknown, obj2: unknown) => deepEqual(obj1, obj2);\n","interface CSSVariableDefinition {\n name: string;\n value: string;\n}\n\n/* istanbul ignore next */\nfunction isSameDomain({ href }: StyleSheet): boolean {\n return !href || href.startsWith(window.location.origin);\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function getCSSVariables(filter: RegExp, selector = ':root'): CSSVariableDefinition[] {\n const stylesheets = Array.from(document.styleSheets).filter(isSameDomain);\n\n return stylesheets.reduce<CSSVariableDefinition[]>((variables, { cssRules }) => {\n const rules = Array.from(cssRules).filter(({ type }) => type === CSSRule.STYLE_RULE) as CSSStyleRule[];\n for (const { style, selectorText } of rules) {\n for (const propName of Array.from(style)) {\n const name = propName.trim();\n if (!name.startsWith('--') || !filter.test(name) || (selector && selectorText !== selector)) continue;\n variables.push({ name, value: style.getPropertyValue(propName).trim() });\n }\n }\n return variables;\n }, []);\n}\n","/** @internal */\nexport function getEnumValues<TEnum, TKeys extends string>(e: { [key in TKeys]: TEnum }): TEnum[] {\n const keys = Object.keys(e) as TKeys[];\n return keys.filter((key) => e[key] !== undefined).map((key) => e[key]);\n}\n","import { ElementRef, Type } from '@angular/core';\nimport { decoratorPropertyName } from '../helpers';\n\nexport const CSS_COMPONENT_NAME = decoratorPropertyName('CSSComponent', 'name');\n\n/** @internal */\nexport interface CSSComponent {\n readonly element: ElementRef<HTMLElement>;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function CSSComponent(name: string, prefix = 'odx') {\n return (target: Type<CSSComponent>) => {\n const cssClass = `${prefix}-${name}`;\n Object.defineProperty(target.prototype, CSS_COMPONENT_NAME, {\n value: cssClass,\n });\n\n (function (this: unknown, ngOnInit?: () => void) {\n target.prototype.ngOnInit = function (this: CSSComponent) {\n this.element.nativeElement.classList.add(cssClass);\n ngOnInit?.call(this);\n };\n })(target.prototype.ngOnInit);\n };\n}\n","import { camelToKebabCase, decoratorPropertyName } from '../helpers';\nimport { CSSComponent, CSS_COMPONENT_NAME } from './css-component';\n\n/** @internal */\ninterface CSSModifierOptions {\n withComponentPrefix?: boolean;\n withPrefix?: boolean;\n}\n\ntype CSSComponentInstance = CSSComponent & Record<string, unknown>;\n\n/** @internal */\n/* istanbul ignore next */\nexport function CSSModifier(options?: CSSModifierOptions) {\n return (target: CSSComponent, propertyKey: PropertyKey) => {\n const propertyKeyName = propertyKey.toString();\n const propertyKeyKebabCase = camelToKebabCase(propertyKeyName);\n const propertySymbol = decoratorPropertyName('CSSModifier', propertyKeyName);\n const propertyDefaultValue = decoratorPropertyName('CSSModifier', `${propertyKeyName}_default`);\n\n function createModifierClass(this: CSSComponentInstance, value: unknown) {\n if (typeof value === 'boolean' || (typeof value === 'string' && value.length > 0)) {\n let modifier = typeof value === 'boolean' ? propertyKeyKebabCase : value;\n if (options?.withPrefix) {\n modifier = `${propertyKeyName}-${modifier}`;\n }\n if (options?.withComponentPrefix ?? true) {\n return `${this[CSS_COMPONENT_NAME]}--${modifier}`;\n }\n return modifier;\n }\n return null;\n }\n\n function getter(this: CSSComponentInstance) {\n return this[propertySymbol];\n }\n\n function setter(this: CSSComponentInstance, value: unknown) {\n this[propertyDefaultValue] ??= value;\n const currentValue = this[propertySymbol] ?? null;\n const nextValue = value ?? this[propertyDefaultValue] ?? null;\n\n if (nextValue !== currentValue) {\n const currentModifierClass = createModifierClass.call(this, currentValue);\n if (currentModifierClass !== null) {\n this.element.nativeElement.classList.remove(currentModifierClass);\n }\n const newModifierClass = createModifierClass.call(this, nextValue);\n if (newModifierClass !== null && (typeof nextValue === 'boolean' ? nextValue : true)) {\n this.element.nativeElement.classList.add(newModifierClass);\n }\n }\n this[propertySymbol] = nextValue;\n }\n Object.defineProperty(target, propertyKey, {\n get: getter,\n set: setter,\n });\n };\n}\n","import { isDevMode } from '@angular/core';\n\nexport class Logger {\n private isEnabled: boolean;\n private readonly name: string;\n private readonly prefix: string;\n\n constructor(name: string) {\n this.name = name;\n this.prefix = `[${this.name}]`;\n this.isEnabled = isDevMode();\n }\n\n public log(...data: unknown[]): void {\n this.handle('log', data);\n }\n\n public info(...data: unknown[]): void {\n this.handle('info', data);\n }\n\n public warn(...data: unknown[]): void {\n this.handle('warn', data);\n }\n\n public error(...data: unknown[]): void {\n this.handle('error', data);\n }\n\n public debug(...data: unknown[]): void {\n this.handle('debug', data);\n }\n\n public group(name: string, groupHandler: (this: Logger, log: (...data: unknown[]) => void) => void, collapsed = true): void {\n if (!this.isEnabled) return;\n console[collapsed ? 'groupCollapsed' : 'group'](this.prefix, name);\n groupHandler.apply(this, [console.info]);\n console.groupEnd();\n }\n\n public enable(): void {\n this.isEnabled = true;\n }\n\n public disable(): void {\n this.isEnabled = false;\n }\n\n protected handle(method: 'debug' | 'log' | 'info' | 'warn' | 'error', data: unknown[]): void {\n if (!this.isEnabled) return;\n console[method](this.prefix, ...data);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;AACM,SAAU,gBAAgB,CAAC,KAAa,EAAA;AAC5C,IAAA,IAAI,KAAK,KAAK,KAAK,CAAC,WAAW,EAAE,EAAE;QACjC,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAI;AAC9C,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;AAEjC,YAAA,OAAO,KAAK,KAAK,CAA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C,IAAI,CAAC,SAAS;YAAE,OAAO;QAC5B,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;KACvC;AACF;;ACpDD;;AAEG;;;;"}
@@ -7,9 +7,79 @@ import { Logger } from '@odx/angular/internal';
7
7
  import { WindowRef } from '@odx/angular';
8
8
 
9
9
  const DEFAULT_AVAILABLE_LANGUAGES = ['en-US', 'en-GB', 'en', 'de-DE', 'de', 'es-ES', 'es', 'fr-FR', 'fr-CA', 'fr'];
10
+ /**
11
+ * Utilizes `createConfigTokens` to generate configuration tokens and related utilities for the
12
+ * localization settings within the application. It defines a structured and type-safe approach
13
+ * for managing localization configurations, such as available languages, and potentially
14
+ * a dynamic loader for the active language. The generated tokens and utilities facilitate accessing
15
+ * and providing these configurations throughout the application.
16
+ *
17
+ * @const {InjectionToken<LocalizationConfig>} LocalizationConfig - An InjectionToken for accessing
18
+ * the localization configuration within Angular's dependency injection framework. Use this token to inject
19
+ * localization configurations into services, components, or other tokens.
20
+ *
21
+ * @const {LocalizationConfig} LocalizationDefaultConfig - The default configuration values for localization,
22
+ * based on the provided settings. Includes the default available languages.
23
+ *
24
+ * @const {Function} injectLocalizationConfig - A utility function that returns the injected value of
25
+ * `LocalizationConfig` token. Use this function to access the current localization configuration in
26
+ * a type-safe manner.
27
+ *
28
+ * @const {Function} provideLocalizationConfig - A utility function to provide the `LocalizationConfig` token
29
+ * with specific values. Use this function to configure and override default localization settings within
30
+ * an Angular module or component.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * // Providing localization settings in an Angular module
35
+ * @NgModule({
36
+ * providers: [
37
+ * provideLocalizationConfig({
38
+ * availableLanguages: ['en', 'es', 'fr'],
39
+ * })
40
+ * ]
41
+ * })
42
+ * export class AppModule { }
43
+ *
44
+ * // Injecting and using the localization configuration in a service
45
+ * @Injectable({ providedIn: 'root' })
46
+ * export class MyLocalizationService {
47
+ * constructor(@Inject(LocalizationConfig) private config: LocalizationConfig) {
48
+ * console.log('Available languages:', config.availableLanguages);
49
+ * }
50
+ * }
51
+ * ```
52
+ */
10
53
  const { LocalizationConfig, LocalizationDefaultConfig, injectLocalizationConfig, provideLocalizationConfig } = createConfigTokens('Localization', '@odx/angular/internal/translate', {
11
54
  availableLanguages: DEFAULT_AVAILABLE_LANGUAGES,
12
55
  });
56
+ /**
57
+ * Sets up the localization configuration for the application and initializes the localization
58
+ * system with the provided configuration and features. This function is typically called
59
+ * within the main module or a core module of the application to ensure localization settings
60
+ * are available and active as early as possible.
61
+ *
62
+ * @param {Partial<LocalizationConfig>} config The localization configuration settings, including
63
+ * available languages and optionally, a custom loader for the active language.
64
+ * @param {...LocalizationFeature[]} features Additional localization features or configurations
65
+ * to be registered as part of the application's environment providers.
66
+ * @returns {EnvironmentProviders} A collection of providers for setting up the application's
67
+ * localization environment, to be used with Angular's environment-specific injector configuration.
68
+ * @example
69
+ * ```ts
70
+ * // Example of providing localization settings in an Angular module
71
+ * @NgModule({
72
+ * imports: [...],
73
+ * providers: [
74
+ * provideLocalization({
75
+ * availableLanguages: ['en', 'es', 'fr'],
76
+ * activeLanguageLoader: () => fetch('/api/user/language').then(res => res.text()),
77
+ * }),
78
+ * ],
79
+ * })
80
+ * export class AppModule {}
81
+ * ```
82
+ */
13
83
  function provideLocalization(config, ...features) {
14
84
  return makeEnvironmentProviders([
15
85
  provideLocalizationConfig(config),
@@ -30,16 +100,48 @@ class LocalizationService {
30
100
  this.localizationConfig = injectLocalizationConfig();
31
101
  this.injector = inject(Injector);
32
102
  this.localeState$ = new BehaviorSubject(new Intl.Locale(this.localizationConfig.availableLanguages[0]));
103
+ /**
104
+ * Represents an observable stream of the active language in the localization service.
105
+ * The active language is determined by the locale state.
106
+ *
107
+ * @emits {string} The active language.
108
+ */
33
109
  this.activeLanguage$ = this.localeState$.pipe(filter(Boolean), map((x) => x.baseName), distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));
110
+ /**
111
+ * Gets the list of available languages for localization.
112
+ *
113
+ * @type {string[]} The list of available languages.
114
+ */
34
115
  this.availableLanguages = this.localizationConfig.availableLanguages;
116
+ /** Default language derived from the first entry in the available languages list.
117
+ *
118
+ * @type {string}
119
+ */
35
120
  this.defaultLanguage = this.availableLanguages[0];
36
121
  }
122
+ /**
123
+ * Retrieves the currently active language. Falls back to the default language if
124
+ * no active language is set.
125
+ *
126
+ * @returns {string} Full locale name e.g. 'en-US' or just 'en' if no region info is attached.
127
+ */
37
128
  getActiveLanguage() {
38
- return this.localeState$.getValue()?.baseName ?? new Intl.Locale(this.defaultLanguage).baseName; // returns full locale name e.g. 'en-US' or just 'en' if no region info is attached
129
+ return this.localeState$.getValue()?.baseName ?? new Intl.Locale(this.defaultLanguage).baseName;
39
130
  }
131
+ /**
132
+ * Retrieves the active language subtag.
133
+ *
134
+ * @returns {string} The two-digit language subtag, e.g. 'en', 'fr'.
135
+ */
40
136
  getActiveLanguageSubtag() {
41
- return this.localeState$.getValue()?.language ?? new Intl.Locale(this.defaultLanguage).language; // returns two digits language subtag, e.g. 'en', 'fr'
137
+ return this.localeState$.getValue()?.language ?? new Intl.Locale(this.defaultLanguage).language;
42
138
  }
139
+ /**
140
+ * Sets the active language based on the provided language code. If the language is not
141
+ * recognized, it logs an error and does not change the active language.
142
+ *
143
+ * @param {string} language The language code to set as the active language.
144
+ */
43
145
  setActiveLanguage(language) {
44
146
  try {
45
147
  const locale = new Intl.Locale(language);
@@ -54,6 +156,13 @@ class LocalizationService {
54
156
  logger.error(error);
55
157
  }
56
158
  }
159
+ /**
160
+ * Loads the active language for the localization service.
161
+ * This method runs in an injection context and sets the active language based on the result of the active language loader.
162
+ * If the active language loader fails, the default language is set as the active language.
163
+ *
164
+ * @returns {Promise<void>} A promise that resolves when the active language is loaded and set.
165
+ */
57
166
  async loadActiveLanguage() {
58
167
  return runInInjectionContext(this.injector, async () => {
59
168
  const activeLanguageLoader$ = this.createActiveLanguageLoader$();
@@ -79,11 +188,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
79
188
  args: [{ providedIn: 'root' }]
80
189
  }] });
81
190
 
191
+ /**
192
+ * @internal
193
+ * Creates a feature provider for the localization module.
194
+ *
195
+ * @param {Provider[] | EnvironmentProviders} provider - The providers to be used for the localization feature.
196
+ * @returns {LocalizationFeature} The localization feature provider.
197
+ */
82
198
  function makeLocalizationFeature(provider) {
83
199
  return provider;
84
200
  }
85
201
 
86
202
  const HTTP_LANGUAGE_HEADER = 'Accept-Language';
203
+ /**
204
+ * Creates an HTTP interceptor function that adds a language header to outgoing HTTP requests,
205
+ * but only for URLs matching the provided criteria. This allows the server to respond with
206
+ * resources localized in the user's current language.
207
+ *
208
+ * @param {HttpLanguageHeaderInterceptorConfig} config - The configuration for the interceptor,
209
+ * including the list of allowed URLs and optionally a custom header name.
210
+ * @returns {HttpInterceptorFn} An Angular HTTP interceptor function that conditionally adds
211
+ * the current language as an HTTP header based on the request URL.
212
+ *
213
+ * @example
214
+ * ```ts
215
+ * // Use in HTTP client module setup
216
+ * import { HttpClientModule } from '@angular/common/http';
217
+ * import { httpLanguageHeaderInterceptor, HTTP_LANGUAGE_HEADER } from '@odx/angular/localization';
218
+ *
219
+ * @NgModule({
220
+ * imports: [HttpClientModule],
221
+ * providers: [
222
+ * provideHttpClient(withInterceptors([
223
+ * httpLanguageHeaderInterceptor({ allowedUrls: ['/api'], headerName: HTTP_LANGUAGE_HEADER })
224
+ * ]))
225
+ * ]
226
+ * })
227
+ * export class AppModule {}
228
+ * ```
229
+ */
87
230
  function httpLanguageHeaderInterceptor({ allowedUrls, headerName }) {
88
231
  return (req, next) => {
89
232
  const language$ = inject(LocalizationService).activeLanguage$.pipe(take(1));
@@ -95,12 +238,64 @@ function httpLanguageHeaderInterceptor({ allowedUrls, headerName }) {
95
238
  return next(req);
96
239
  };
97
240
  }
241
+ /**
242
+ * Provides a localization feature that automatically adds a language header to HTTP requests
243
+ * for specified URLs, using the current active language. This function simplifies setting up
244
+ * the HTTP language header interceptor by wrapping it into a LocalizationFeature, making it easy
245
+ * to integrate with the application's localization infrastructure.
246
+ *
247
+ * @param {HttpLanguageHeaderInterceptorConfig} config - The configuration for the language header
248
+ * interceptor, specifying which URLs should include the language header and optionally defining a
249
+ * custom header name.
250
+ * @returns {LocalizationFeature} A localization feature object that can be used to configure
251
+ * the application's localization settings to include automatic language header addition for HTTP requests.
252
+ *
253
+ * @example
254
+ * ```ts
255
+ * // Example usage with the localization provider
256
+ * import { provideLocalization, LocalizationModule, withHttpLanguageHeader } from '@odx/angular/localization';
257
+ *
258
+ * @NgModule({
259
+ * imports: [LocalizationModule],
260
+ * providers: [
261
+ * provideLocalization({}, withHttpLanguageHeader({ allowedUrls: ['/api'] }))
262
+ * ]
263
+ * })
264
+ * export class AppModule {}
265
+ * ```
266
+ */
98
267
  function withHttpLanguageHeader(config) {
99
268
  const providers = provideHttpClient(withInterceptors([httpLanguageHeaderInterceptor(config)]));
100
269
  return makeLocalizationFeature(providers);
101
270
  }
102
271
 
103
272
  const HTTP_LANGUAGE_QUERY = 'language';
273
+ /**
274
+ * Creates an HTTP interceptor function that appends the current language as a query parameter
275
+ * to outgoing HTTP requests that match specified URLs. This interceptor enables dynamic content
276
+ * localization by informing the backend of the user's preferred language.
277
+ *
278
+ * @param {HttpLanguageQueryParamInterceptorConfig} config - Configuration for the interceptor,
279
+ * including allowed URLs and an optional custom name for the query parameter.
280
+ * @returns {HttpInterceptorFn} The interceptor function ready to be applied to the HTTP client.
281
+ *
282
+ * @example
283
+ * ```ts
284
+ * // Applying the interceptor in an Angular module
285
+ * import { HttpClientModule } from '@angular/common/http';
286
+ * import { withHttpLanguageQueryParam } from '@odx/angular/localization';
287
+ *
288
+ * @NgModule({
289
+ * imports: [HttpClientModule],
290
+ * providers: [
291
+ * provideHttpClient(withInterceptors([
292
+ * withHttpLanguageQueryParam({ allowedUrls: ['/api/resources'] })
293
+ * ]))
294
+ * ]
295
+ * })
296
+ * export class ApiModule {}
297
+ * ```
298
+ */
104
299
  function withHttpLanguageQueryParamInterceptor({ allowedUrls, queryParamName }) {
105
300
  return (req, next) => {
106
301
  const language$ = inject(LocalizationService).activeLanguage$.pipe(take(1));
@@ -112,11 +307,68 @@ function withHttpLanguageQueryParamInterceptor({ allowedUrls, queryParamName })
112
307
  return next(req);
113
308
  };
114
309
  }
310
+ /**
311
+ * Registers the HTTP interceptor that appends the current language as a query parameter to
312
+ * outgoing requests for configured URLs as a localization feature. This utility function
313
+ * simplifies the setup by bundling the interceptor into a feature that can be easily integrated
314
+ * with localization configurations.
315
+ *
316
+ * @param {HttpLanguageQueryParamInterceptorConfig} config - Configuration for appending the
317
+ * language query parameter, including allowed URLs and an optional parameter name.
318
+ * @returns {LocalizationFeature} A localization feature encapsulating the interceptor, ready
319
+ * for integration with the application's localization setup.
320
+ *
321
+ * @example
322
+ * ```ts
323
+ * // Integrating the localization feature in an Angular module
324
+ * import { provideLocalization } from '@angular/core';
325
+ * import { withHttpLanguageQueryParam } from '@odx/angular/localization';
326
+ *
327
+ * @NgModule({
328
+ * providers: [
329
+ * provideLocalization({}, withHttpLanguageQueryParam({ allowedUrls: ['/api'] }))
330
+ * ]
331
+ * })
332
+ * export class AppModule {}
333
+ * ```
334
+ */
115
335
  function withHttpLanguageQueryParam(config) {
116
336
  const providers = provideHttpClient(withInterceptors([withHttpLanguageQueryParamInterceptor(config)]));
117
337
  return makeLocalizationFeature(providers);
118
338
  }
119
339
 
340
+ /**
341
+ * Asynchronously loads the browser's current language setting by utilizing the `WindowRef` service.
342
+ * This function is intended to be used as a dynamic language loader within a localization configuration,
343
+ * allowing applications to automatically adapt to the user's preferred language as specified in their
344
+ * browser settings.
345
+ *
346
+ * The `WindowRef` service abstracts window-related operations, making it easier to interact with global
347
+ * browser properties and methods in a testable and platform-agnostic way. This function makes use of
348
+ * `WindowRef` to access the navigator's language setting in a safe and Angular-friendly manner.
349
+ *
350
+ * @returns {Promise<string>} A promise that resolves to the language code (e.g., 'en', 'fr') of the
351
+ * browser's currently configured language. This can then be used to set the active language in a
352
+ * localization configuration.
353
+ *
354
+ * @example
355
+ * ```ts
356
+ * // Example usage in a localization configuration
357
+ * import { provideLocalization } from '@odx/angular/utils';
358
+ * import { browserLanguageLoader } from '@odx/angular/localization';
359
+ *
360
+ * @NgModule({
361
+ * providers: [
362
+ * provideLocalization({
363
+ * activeLanguageLoader: browserLanguageLoader,
364
+ * availableLanguages: ['en', 'es', 'fr'],
365
+ * availableLocales: ['en-US', 'es-ES', 'fr-FR']
366
+ * })
367
+ * ]
368
+ * })
369
+ * export class AppModule { }
370
+ * ```
371
+ */
120
372
  const browserLanguageLoader = async () => {
121
373
  return inject(WindowRef).getLanguage();
122
374
  };
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-localization.mjs","sources":["../../../../libs/angular/localization/src/lib/localization.config.ts","../../../../libs/angular/localization/src/lib/localization.logger.ts","../../../../libs/angular/localization/src/lib/localization.service.ts","../../../../libs/angular/localization/src/lib/models/localization-feature.ts","../../../../libs/angular/localization/src/lib/features/with-http-language-header.ts","../../../../libs/angular/localization/src/lib/features/with-http-language-query-param.ts","../../../../libs/angular/localization/src/lib/loaders/browser-language-loader.ts","../../../../libs/angular/localization/src/odx-angular-localization.ts"],"sourcesContent":["import { APP_INITIALIZER, EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { createConfigTokens } from '@odx/angular/utils';\nimport { LocalizationService } from './localization.service';\nimport { LanguageLoaderFn, LocalizationFeature } from './models';\n\nexport const DEFAULT_AVAILABLE_LANGUAGES = ['en-US', 'en-GB', 'en', 'de-DE', 'de', 'es-ES', 'es', 'fr-FR', 'fr-CA', 'fr'];\nexport interface LocalizationConfig {\n activeLanguageLoader?: LanguageLoaderFn;\n availableLanguages: string[];\n}\n\nexport const { LocalizationConfig, LocalizationDefaultConfig, injectLocalizationConfig, provideLocalizationConfig } = createConfigTokens(\n 'Localization',\n '@odx/angular/internal/translate',\n {\n availableLanguages: DEFAULT_AVAILABLE_LANGUAGES,\n } as LocalizationConfig,\n);\n\nexport function provideLocalization(config: Partial<LocalizationConfig>, ...features: LocalizationFeature[]): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideLocalizationConfig(config),\n {\n provide: APP_INITIALIZER,\n useFactory: (localizationService: LocalizationService) => () => localizationService.loadActiveLanguage(),\n deps: [LocalizationService],\n multi: true,\n },\n features,\n ]);\n}\n","import { Logger } from '@odx/angular/internal';\n\nexport default new Logger('@odx/angular/localization');\n","import { Injectable, Injector, inject, runInInjectionContext } from '@angular/core';\nimport { BehaviorSubject, Observable, distinctUntilChanged, filter, firstValueFrom, from, isObservable, map, of, shareReplay } from 'rxjs';\nimport { injectLocalizationConfig } from './localization.config';\nimport logger from './localization.logger';\n\n@Injectable({ providedIn: 'root' })\nexport class LocalizationService {\n private readonly localizationConfig = injectLocalizationConfig();\n private readonly injector = inject(Injector);\n private readonly localeState$ = new BehaviorSubject<Intl.Locale | undefined>(new Intl.Locale(this.localizationConfig.availableLanguages[0]));\n\n public readonly activeLanguage$ = this.localeState$.pipe(\n filter(Boolean),\n map((x) => x.baseName),\n distinctUntilChanged(),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n\n public readonly availableLanguages = this.localizationConfig.availableLanguages;\n public readonly defaultLanguage = this.availableLanguages[0];\n\n public getActiveLanguage(): string {\n return this.localeState$.getValue()?.baseName ?? new Intl.Locale(this.defaultLanguage).baseName; // returns full locale name e.g. 'en-US' or just 'en' if no region info is attached\n }\n\n public getActiveLanguageSubtag(): string {\n return this.localeState$.getValue()?.language ?? new Intl.Locale(this.defaultLanguage).language; // returns two digits language subtag, e.g. 'en', 'fr'\n }\n\n public setActiveLanguage(language: string): void {\n try {\n const locale = new Intl.Locale(language);\n if (this.availableLanguages.includes(locale.baseName) || this.availableLanguages.includes(locale.language)) {\n this.localeState$.next(locale);\n } else {\n throw new Error(`Unrecognizable language '${language}'. Make sure it's a part of availableLanguages inside LocalizationService config.`);\n }\n } catch (error) {\n logger.error(error);\n }\n }\n\n public async loadActiveLanguage(): Promise<void> {\n return runInInjectionContext(this.injector, async () => {\n const activeLanguageLoader$ = this.createActiveLanguageLoader$();\n const activeLanguage = await firstValueFrom(activeLanguageLoader$).catch(() => null);\n this.setActiveLanguage(activeLanguage ?? this.defaultLanguage);\n });\n }\n\n private createActiveLanguageLoader$(): Observable<string | undefined> {\n const language = this.localizationConfig.activeLanguageLoader?.();\n if (isObservable(language)) {\n return language;\n }\n if (language instanceof Promise) {\n return from(language);\n }\n return of(language);\n }\n}\n","import { EnvironmentProviders, Provider } from '@angular/core';\n\nexport type LocalizationFeature = EnvironmentProviders & { ɵodxBrand: '@odx/angular/localization::LocalizationFeature' };\n\nexport function makeLocalizationFeature(provider: Provider[] | EnvironmentProviders): LocalizationFeature {\n return provider as never as LocalizationFeature;\n}\n","import { HttpInterceptorFn, provideHttpClient, withInterceptors } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { matchUrl } from '@odx/angular/utils';\nimport { switchMap, take } from 'rxjs';\nimport { LocalizationService } from '../localization.service';\nimport { LocalizationFeature, makeLocalizationFeature } from '../models';\n\nexport const HTTP_LANGUAGE_HEADER = 'Accept-Language';\n\nexport interface HttpLanguageHeaderInterceptorConfig {\n allowedUrls: Array<string | RegExp>;\n headerName?: string;\n}\n\nexport function httpLanguageHeaderInterceptor({ allowedUrls, headerName }: HttpLanguageHeaderInterceptorConfig): HttpInterceptorFn {\n return (req, next) => {\n const language$ = inject(LocalizationService).activeLanguage$.pipe(take(1));\n for (const allowedUrl of allowedUrls) {\n if (!matchUrl(req.url, allowedUrl)) continue;\n return language$.pipe(switchMap((language) => next(req.clone({ setHeaders: { [headerName ?? HTTP_LANGUAGE_HEADER]: language } }))));\n }\n return next(req);\n };\n}\n\nexport function withHttpLanguageHeader(config: HttpLanguageHeaderInterceptorConfig): LocalizationFeature {\n const providers = provideHttpClient(withInterceptors([httpLanguageHeaderInterceptor(config)]));\n\n return makeLocalizationFeature(providers);\n}\n","import { HttpInterceptorFn, provideHttpClient, withInterceptors } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { matchUrl } from '@odx/angular/utils';\nimport { switchMap, take } from 'rxjs';\nimport { LocalizationService } from '../localization.service';\nimport { LocalizationFeature, makeLocalizationFeature } from '../models';\n\nexport const HTTP_LANGUAGE_QUERY = 'language';\n\nexport interface HttpLanguageQueryParamInterceptorConfig {\n allowedUrls: Array<string | RegExp>;\n queryParamName?: string;\n}\n\nexport function withHttpLanguageQueryParamInterceptor({ allowedUrls, queryParamName }: HttpLanguageQueryParamInterceptorConfig): HttpInterceptorFn {\n return (req, next) => {\n const language$ = inject(LocalizationService).activeLanguage$.pipe(take(1));\n for (const allowedUrl of allowedUrls) {\n if (!matchUrl(req.url, allowedUrl)) continue;\n return language$.pipe(switchMap((language) => next(req.clone({ setParams: { [queryParamName ?? HTTP_LANGUAGE_QUERY]: language } }))));\n }\n return next(req);\n };\n}\n\nexport function withHttpLanguageQueryParam(config: HttpLanguageQueryParamInterceptorConfig): LocalizationFeature {\n const providers = provideHttpClient(withInterceptors([withHttpLanguageQueryParamInterceptor(config)]));\n\n return makeLocalizationFeature(providers);\n}\n","import { inject } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { LanguageLoaderFn } from '../models';\n\nexport const browserLanguageLoader: LanguageLoaderFn = async () => {\n return inject(WindowRef).getLanguage();\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKa,MAAA,2BAA2B,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAM7G,MAAA,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,GAAG,kBAAkB,CACtI,cAAc,EACd,iCAAiC,EACjC;AACE,IAAA,kBAAkB,EAAE,2BAA2B;AAC1B,C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AAEK,SAAU,0BAA0B,CAAC,MAA+C,EAAA;AACxF,IAAA,MAAM,SAAS,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,qCAAqC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvG,IAAA,OAAO,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C;;ACzBa,MAAA,qBAAqB,GAAqB,YAAW;AAChE,IAAA,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;AACzC;;ACNA;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-localization.mjs","sources":["../../../../libs/angular/localization/src/lib/localization.config.ts","../../../../libs/angular/localization/src/lib/localization.logger.ts","../../../../libs/angular/localization/src/lib/localization.service.ts","../../../../libs/angular/localization/src/lib/models/localization-feature.ts","../../../../libs/angular/localization/src/lib/features/with-http-language-header.ts","../../../../libs/angular/localization/src/lib/features/with-http-language-query-param.ts","../../../../libs/angular/localization/src/lib/loaders/browser-language-loader.ts","../../../../libs/angular/localization/src/odx-angular-localization.ts"],"sourcesContent":["import { APP_INITIALIZER, EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { createConfigTokens } from '@odx/angular/utils';\nimport { LocalizationService } from './localization.service';\nimport { LanguageLoaderFn, LocalizationFeature } from './models';\n\nexport const DEFAULT_AVAILABLE_LANGUAGES = ['en-US', 'en-GB', 'en', 'de-DE', 'de', 'es-ES', 'es', 'fr-FR', 'fr-CA', 'fr'];\n\n/**\n * Defines the structure for the localization configuration used throughout the application.\n * It allows specifying available languages, and includes an optional loader\n * function for dynamically determining the active language.\n *\n * @property {LanguageLoaderFn} [activeLanguageLoader] Optional function for loading the\n * active language dynamically, useful for scenarios where the application's language\n * needs to be determined based on user settings, browser settings, or external data.\n * @property {string[]} availableLanguages An array of language codes representing the\n * languages available in the application.\n */\nexport interface LocalizationConfig {\n activeLanguageLoader?: LanguageLoaderFn;\n availableLanguages: string[];\n}\n\n/**\n * Utilizes `createConfigTokens` to generate configuration tokens and related utilities for the\n * localization settings within the application. It defines a structured and type-safe approach\n * for managing localization configurations, such as available languages, and potentially\n * a dynamic loader for the active language. The generated tokens and utilities facilitate accessing\n * and providing these configurations throughout the application.\n *\n * @const {InjectionToken<LocalizationConfig>} LocalizationConfig - An InjectionToken for accessing\n * the localization configuration within Angular's dependency injection framework. Use this token to inject\n * localization configurations into services, components, or other tokens.\n *\n * @const {LocalizationConfig} LocalizationDefaultConfig - The default configuration values for localization,\n * based on the provided settings. Includes the default available languages.\n *\n * @const {Function} injectLocalizationConfig - A utility function that returns the injected value of\n * `LocalizationConfig` token. Use this function to access the current localization configuration in\n * a type-safe manner.\n *\n * @const {Function} provideLocalizationConfig - A utility function to provide the `LocalizationConfig` token\n * with specific values. Use this function to configure and override default localization settings within\n * an Angular module or component.\n *\n * @example\n * ```ts\n * // Providing localization settings in an Angular module\n * @NgModule({\n * providers: [\n * provideLocalizationConfig({\n * availableLanguages: ['en', 'es', 'fr'],\n * })\n * ]\n * })\n * export class AppModule { }\n *\n * // Injecting and using the localization configuration in a service\n * @Injectable({ providedIn: 'root' })\n * export class MyLocalizationService {\n * constructor(@Inject(LocalizationConfig) private config: LocalizationConfig) {\n * console.log('Available languages:', config.availableLanguages);\n * }\n * }\n * ```\n */\nexport const { LocalizationConfig, LocalizationDefaultConfig, injectLocalizationConfig, provideLocalizationConfig } = createConfigTokens(\n 'Localization',\n '@odx/angular/internal/translate',\n {\n availableLanguages: DEFAULT_AVAILABLE_LANGUAGES,\n } as LocalizationConfig,\n);\n\n/**\n * Sets up the localization configuration for the application and initializes the localization\n * system with the provided configuration and features. This function is typically called\n * within the main module or a core module of the application to ensure localization settings\n * are available and active as early as possible.\n *\n * @param {Partial<LocalizationConfig>} config The localization configuration settings, including\n * available languages and optionally, a custom loader for the active language.\n * @param {...LocalizationFeature[]} features Additional localization features or configurations\n * to be registered as part of the application's environment providers.\n * @returns {EnvironmentProviders} A collection of providers for setting up the application's\n * localization environment, to be used with Angular's environment-specific injector configuration.\n * @example\n * ```ts\n * // Example of providing localization settings in an Angular module\n * @NgModule({\n * imports: [...],\n * providers: [\n * provideLocalization({\n * availableLanguages: ['en', 'es', 'fr'],\n * activeLanguageLoader: () => fetch('/api/user/language').then(res => res.text()),\n * }),\n * ],\n * })\n * export class AppModule {}\n * ```\n */\nexport function provideLocalization(config: Partial<LocalizationConfig>, ...features: LocalizationFeature[]): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideLocalizationConfig(config),\n {\n provide: APP_INITIALIZER,\n useFactory: (localizationService: LocalizationService) => () => localizationService.loadActiveLanguage(),\n deps: [LocalizationService],\n multi: true,\n },\n features,\n ]);\n}\n","import { Logger } from '@odx/angular/internal';\n\nexport default new Logger('@odx/angular/localization');\n","import { Injectable, Injector, inject, runInInjectionContext } from '@angular/core';\nimport { BehaviorSubject, Observable, distinctUntilChanged, filter, firstValueFrom, from, isObservable, map, of, shareReplay } from 'rxjs';\nimport { injectLocalizationConfig } from './localization.config';\nimport logger from './localization.logger';\n\n@Injectable({ providedIn: 'root' })\nexport class LocalizationService {\n private readonly localizationConfig = injectLocalizationConfig();\n private readonly injector = inject(Injector);\n private readonly localeState$ = new BehaviorSubject<Intl.Locale | undefined>(new Intl.Locale(this.localizationConfig.availableLanguages[0]));\n\n /**\n * Represents an observable stream of the active language in the localization service.\n * The active language is determined by the locale state.\n *\n * @emits {string} The active language.\n */\n public readonly activeLanguage$ = this.localeState$.pipe(\n filter(Boolean),\n map((x) => x.baseName),\n distinctUntilChanged(),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n\n /**\n * Gets the list of available languages for localization.\n *\n * @type {string[]} The list of available languages.\n */\n public readonly availableLanguages = this.localizationConfig.availableLanguages;\n\n /** Default language derived from the first entry in the available languages list.\n *\n * @type {string}\n */\n public readonly defaultLanguage = this.availableLanguages[0];\n\n /**\n * Retrieves the currently active language. Falls back to the default language if\n * no active language is set.\n *\n * @returns {string} Full locale name e.g. 'en-US' or just 'en' if no region info is attached.\n */\n public getActiveLanguage(): string {\n return this.localeState$.getValue()?.baseName ?? new Intl.Locale(this.defaultLanguage).baseName;\n }\n\n /**\n * Retrieves the active language subtag.\n *\n * @returns {string} The two-digit language subtag, e.g. 'en', 'fr'.\n */\n public getActiveLanguageSubtag(): string {\n return this.localeState$.getValue()?.language ?? new Intl.Locale(this.defaultLanguage).language;\n }\n\n /**\n * Sets the active language based on the provided language code. If the language is not\n * recognized, it logs an error and does not change the active language.\n *\n * @param {string} language The language code to set as the active language.\n */\n public setActiveLanguage(language: string): void {\n try {\n const locale = new Intl.Locale(language);\n if (this.availableLanguages.includes(locale.baseName) || this.availableLanguages.includes(locale.language)) {\n this.localeState$.next(locale);\n } else {\n throw new Error(`Unrecognizable language '${language}'. Make sure it's a part of availableLanguages inside LocalizationService config.`);\n }\n } catch (error) {\n logger.error(error);\n }\n }\n\n /**\n * Loads the active language for the localization service.\n * This method runs in an injection context and sets the active language based on the result of the active language loader.\n * If the active language loader fails, the default language is set as the active language.\n *\n * @returns {Promise<void>} A promise that resolves when the active language is loaded and set.\n */\n public async loadActiveLanguage(): Promise<void> {\n return runInInjectionContext(this.injector, async () => {\n const activeLanguageLoader$ = this.createActiveLanguageLoader$();\n const activeLanguage = await firstValueFrom(activeLanguageLoader$).catch(() => null);\n this.setActiveLanguage(activeLanguage ?? this.defaultLanguage);\n });\n }\n\n private createActiveLanguageLoader$(): Observable<string | undefined> {\n const language = this.localizationConfig.activeLanguageLoader?.();\n if (isObservable(language)) {\n return language;\n }\n if (language instanceof Promise) {\n return from(language);\n }\n return of(language);\n }\n}\n","import { EnvironmentProviders, Provider } from '@angular/core';\n\nexport type LocalizationFeature = EnvironmentProviders & { ɵodxBrand: '@odx/angular/localization::LocalizationFeature' };\n\n/**\n * @internal\n * Creates a feature provider for the localization module.\n *\n * @param {Provider[] | EnvironmentProviders} provider - The providers to be used for the localization feature.\n * @returns {LocalizationFeature} The localization feature provider.\n */\nexport function makeLocalizationFeature(provider: Provider[] | EnvironmentProviders): LocalizationFeature {\n return provider as never as LocalizationFeature;\n}\n","import { HttpInterceptorFn, provideHttpClient, withInterceptors } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { matchUrl } from '@odx/angular/utils';\nimport { switchMap, take } from 'rxjs';\nimport { LocalizationService } from '../localization.service';\nimport { LocalizationFeature, makeLocalizationFeature } from '../models';\n\nexport const HTTP_LANGUAGE_HEADER = 'Accept-Language';\n\n/**\n * Configuration object for the HTTP language header interceptor. It specifies which URLs\n * the interceptor should apply to and allows customizing the name of the header used to transmit\n * the current language setting.\n *\n * @property {Array<string | RegExp>} allowedUrls - An array of strings or RegExp patterns\n * indicating the URLs to which the language header should be added.\n * @property {string} [headerName=HTTP_LANGUAGE_HEADER] - Optional. The name of the HTTP header\n * through which the current language setting will be transmitted. Defaults to 'Accept-Language'.\n */\nexport interface HttpLanguageHeaderInterceptorConfig {\n allowedUrls: Array<string | RegExp>;\n headerName?: string;\n}\n\n/**\n * Creates an HTTP interceptor function that adds a language header to outgoing HTTP requests,\n * but only for URLs matching the provided criteria. This allows the server to respond with\n * resources localized in the user's current language.\n *\n * @param {HttpLanguageHeaderInterceptorConfig} config - The configuration for the interceptor,\n * including the list of allowed URLs and optionally a custom header name.\n * @returns {HttpInterceptorFn} An Angular HTTP interceptor function that conditionally adds\n * the current language as an HTTP header based on the request URL.\n *\n * @example\n * ```ts\n * // Use in HTTP client module setup\n * import { HttpClientModule } from '@angular/common/http';\n * import { httpLanguageHeaderInterceptor, HTTP_LANGUAGE_HEADER } from '@odx/angular/localization';\n *\n * @NgModule({\n * imports: [HttpClientModule],\n * providers: [\n * provideHttpClient(withInterceptors([\n * httpLanguageHeaderInterceptor({ allowedUrls: ['/api'], headerName: HTTP_LANGUAGE_HEADER })\n * ]))\n * ]\n * })\n * export class AppModule {}\n * ```\n */\nexport function httpLanguageHeaderInterceptor({ allowedUrls, headerName }: HttpLanguageHeaderInterceptorConfig): HttpInterceptorFn {\n return (req, next) => {\n const language$ = inject(LocalizationService).activeLanguage$.pipe(take(1));\n for (const allowedUrl of allowedUrls) {\n if (!matchUrl(req.url, allowedUrl)) continue;\n return language$.pipe(switchMap((language) => next(req.clone({ setHeaders: { [headerName ?? HTTP_LANGUAGE_HEADER]: language } }))));\n }\n return next(req);\n };\n}\n\n/**\n * Provides a localization feature that automatically adds a language header to HTTP requests\n * for specified URLs, using the current active language. This function simplifies setting up\n * the HTTP language header interceptor by wrapping it into a LocalizationFeature, making it easy\n * to integrate with the application's localization infrastructure.\n *\n * @param {HttpLanguageHeaderInterceptorConfig} config - The configuration for the language header\n * interceptor, specifying which URLs should include the language header and optionally defining a\n * custom header name.\n * @returns {LocalizationFeature} A localization feature object that can be used to configure\n * the application's localization settings to include automatic language header addition for HTTP requests.\n *\n * @example\n * ```ts\n * // Example usage with the localization provider\n * import { provideLocalization, LocalizationModule, withHttpLanguageHeader } from '@odx/angular/localization';\n *\n * @NgModule({\n * imports: [LocalizationModule],\n * providers: [\n * provideLocalization({}, withHttpLanguageHeader({ allowedUrls: ['/api'] }))\n * ]\n * })\n * export class AppModule {}\n * ```\n */\nexport function withHttpLanguageHeader(config: HttpLanguageHeaderInterceptorConfig): LocalizationFeature {\n const providers = provideHttpClient(withInterceptors([httpLanguageHeaderInterceptor(config)]));\n\n return makeLocalizationFeature(providers);\n}\n","import { HttpInterceptorFn, provideHttpClient, withInterceptors } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { matchUrl } from '@odx/angular/utils';\nimport { switchMap, take } from 'rxjs';\nimport { LocalizationService } from '../localization.service';\nimport { LocalizationFeature, makeLocalizationFeature } from '../models';\n\nexport const HTTP_LANGUAGE_QUERY = 'language';\n\n/**\n * Defines the configuration options for the HTTP interceptor that appends the current\n * language setting as a query parameter to outgoing requests. This configuration specifies\n * which requests should have the language parameter appended based on their URLs.\n *\n * @property {Array<string | RegExp>} allowedUrls - URLs (or patterns matching URLs) to which\n * the language query parameter should be appended.\n * @property {string} [queryParamName=HTTP_LANGUAGE_QUERY] - The name of the query parameter\n * used to transmit the current language. Defaults to 'language'.\n */\nexport interface HttpLanguageQueryParamInterceptorConfig {\n allowedUrls: Array<string | RegExp>;\n queryParamName?: string;\n}\n\n/**\n * Creates an HTTP interceptor function that appends the current language as a query parameter\n * to outgoing HTTP requests that match specified URLs. This interceptor enables dynamic content\n * localization by informing the backend of the user's preferred language.\n *\n * @param {HttpLanguageQueryParamInterceptorConfig} config - Configuration for the interceptor,\n * including allowed URLs and an optional custom name for the query parameter.\n * @returns {HttpInterceptorFn} The interceptor function ready to be applied to the HTTP client.\n *\n * @example\n * ```ts\n * // Applying the interceptor in an Angular module\n * import { HttpClientModule } from '@angular/common/http';\n * import { withHttpLanguageQueryParam } from '@odx/angular/localization';\n *\n * @NgModule({\n * imports: [HttpClientModule],\n * providers: [\n * provideHttpClient(withInterceptors([\n * withHttpLanguageQueryParam({ allowedUrls: ['/api/resources'] })\n * ]))\n * ]\n * })\n * export class ApiModule {}\n * ```\n */\nexport function withHttpLanguageQueryParamInterceptor({ allowedUrls, queryParamName }: HttpLanguageQueryParamInterceptorConfig): HttpInterceptorFn {\n return (req, next) => {\n const language$ = inject(LocalizationService).activeLanguage$.pipe(take(1));\n for (const allowedUrl of allowedUrls) {\n if (!matchUrl(req.url, allowedUrl)) continue;\n return language$.pipe(switchMap((language) => next(req.clone({ setParams: { [queryParamName ?? HTTP_LANGUAGE_QUERY]: language } }))));\n }\n return next(req);\n };\n}\n\n/**\n * Registers the HTTP interceptor that appends the current language as a query parameter to\n * outgoing requests for configured URLs as a localization feature. This utility function\n * simplifies the setup by bundling the interceptor into a feature that can be easily integrated\n * with localization configurations.\n *\n * @param {HttpLanguageQueryParamInterceptorConfig} config - Configuration for appending the\n * language query parameter, including allowed URLs and an optional parameter name.\n * @returns {LocalizationFeature} A localization feature encapsulating the interceptor, ready\n * for integration with the application's localization setup.\n *\n * @example\n * ```ts\n * // Integrating the localization feature in an Angular module\n * import { provideLocalization } from '@angular/core';\n * import { withHttpLanguageQueryParam } from '@odx/angular/localization';\n *\n * @NgModule({\n * providers: [\n * provideLocalization({}, withHttpLanguageQueryParam({ allowedUrls: ['/api'] }))\n * ]\n * })\n * export class AppModule {}\n * ```\n */\nexport function withHttpLanguageQueryParam(config: HttpLanguageQueryParamInterceptorConfig): LocalizationFeature {\n const providers = provideHttpClient(withInterceptors([withHttpLanguageQueryParamInterceptor(config)]));\n\n return makeLocalizationFeature(providers);\n}\n","import { inject } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { LanguageLoaderFn } from '../models';\n\n/**\n * Asynchronously loads the browser's current language setting by utilizing the `WindowRef` service.\n * This function is intended to be used as a dynamic language loader within a localization configuration,\n * allowing applications to automatically adapt to the user's preferred language as specified in their\n * browser settings.\n *\n * The `WindowRef` service abstracts window-related operations, making it easier to interact with global\n * browser properties and methods in a testable and platform-agnostic way. This function makes use of\n * `WindowRef` to access the navigator's language setting in a safe and Angular-friendly manner.\n *\n * @returns {Promise<string>} A promise that resolves to the language code (e.g., 'en', 'fr') of the\n * browser's currently configured language. This can then be used to set the active language in a\n * localization configuration.\n *\n * @example\n * ```ts\n * // Example usage in a localization configuration\n * import { provideLocalization } from '@odx/angular/utils';\n * import { browserLanguageLoader } from '@odx/angular/localization';\n *\n * @NgModule({\n * providers: [\n * provideLocalization({\n * activeLanguageLoader: browserLanguageLoader,\n * availableLanguages: ['en', 'es', 'fr'],\n * availableLocales: ['en-US', 'es-ES', 'fr-FR']\n * })\n * ]\n * })\n * export class AppModule { }\n * ```\n */\nexport const browserLanguageLoader: LanguageLoaderFn = async () => {\n return inject(WindowRef).getLanguage();\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKa,MAAA,2BAA2B,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAkB1H;;;;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,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5E,QAAA,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;YACpC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC;gBAAE,SAAS;AAC7C,YAAA,OAAO,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,cAAc,IAAI,mBAAmB,GAAG,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACvI,SAAA;AACD,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,KAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AACG,SAAU,0BAA0B,CAAC,MAA+C,EAAA;AACxF,IAAA,MAAM,SAAS,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,qCAAqC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvG,IAAA,OAAO,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C;;ACtFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;AACU,MAAA,qBAAqB,GAAqB,YAAW;AAChE,IAAA,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;AACzC;;ACtCA;;AAEG;;;;"}
@@ -1,14 +1,53 @@
1
- import { switchMap, timer, map, takeUntil, startWith, Observable, debounceTime, merge, fromEvent } from 'rxjs';
1
+ import { switchMap, timer, map, takeUntil, Observable, debounceTime, merge, fromEvent, startWith } from 'rxjs';
2
2
  import { createMutationObserver, createResizeObserver } from '@odx/angular/utils';
3
3
 
4
+ /**
5
+ * Delays the emission of each value from the source Observable by a time span determined by the `delay` function.
6
+ * If the `notifier` Observable emits before the delay expires, the delayed emission is cancelled.
7
+ *
8
+ * This operator is useful for postponing the observable emissions until certain conditions are met,
9
+ * represented by the passage of time defined by `delay`. It also allows for a way to preemptively
10
+ * cancel the delay in response to another observable's emission.
11
+ *
12
+ * @template T The type of items emitted by the source Observable.
13
+ * @param {() => number} delay A function that returns the delay (in milliseconds) before the source Observable's values are emitted.
14
+ * @param {Observable<unknown>} notifier An Observable that cancels the delay when it emits.
15
+ * @returns {MonoTypeOperatorFunction<T>} An Observable that emits the source Observable's items with a delay if not cancelled.
16
+ * @example
17
+ * ```ts
18
+ * // Delay each number emission by 1 second, unless the 'cancel' button is clicked.
19
+ * const delayedNumbers$ = of(1, 2, 3).pipe(
20
+ * delayUntil(() => 1000, fromEvent(cancelButton, 'click'))
21
+ * );
22
+ *
23
+ * delayedNumbers$.subscribe(console.log);
24
+ * ```
25
+ */
4
26
  function delayUntil(delay, notifier) {
5
27
  return (source$) => source$.pipe(switchMap((value) => timer(delay()).pipe(map(() => value), takeUntil(notifier))));
6
28
  }
7
29
 
8
- function fromQueryList(queryList) {
9
- return queryList.changes.pipe(startWith(queryList));
10
- }
11
-
30
+ /**
31
+ * Creates an RxJS Observable that emits mutation records for changes in a DOM element's attributes,
32
+ * child list, and subtree. It uses the `MutationObserver` Web API to observe mutations on the specified
33
+ * element according to the options provided.
34
+ *
35
+ * @param {Element} element The DOM element to observe for mutations.
36
+ * @param {MutationObserverInit} options An object that specifies which DOM mutations should be reported.
37
+ * Options include attributes, childList, subtree, attributeOldValue, characterData, characterDataOldValue,
38
+ * and attributeFilter.
39
+ * @returns {Observable<MutationRecord>} An Observable that emits a `MutationRecord` each time a mutation
40
+ * matching the specified options occurs in the observed element.
41
+ * @example
42
+ * ```ts
43
+ * // Observing changes to the child list of an element
44
+ * const element = document.getElementById('my-element');
45
+ * const mutationOptions = { childList: true };
46
+ *
47
+ * fromElementMutation$(element, mutationOptions).subscribe((mutation) => console.log('Mutation detected:', mutation));
48
+ * ```
49
+ * Note: Always remember to unsubscribe from the observable to prevent memory leaks.
50
+ */
12
51
  function fromElementMutation$(element, options) {
13
52
  return new Observable((observer) => {
14
53
  const mutationObserver = createMutationObserver(observer, (events) => events.length > 0);
@@ -17,6 +56,30 @@ function fromElementMutation$(element, options) {
17
56
  });
18
57
  }
19
58
 
59
+ /**
60
+ * Creates an RxJS Observable that emits an array of `ResizeObserverEntry` objects whenever
61
+ * the target element's size changes. This function provides a reactive way to observe
62
+ * and respond to changes in an element's dimensions, using the `ResizeObserver` Web API.
63
+ *
64
+ * The observable debounces the emitted values to improve performance and reduce the frequency
65
+ * of change detection runs in Angular applications. The debounce time can be adjusted via
66
+ * the `debounceDuration` parameter.
67
+ *
68
+ * @param {Element} element The DOM element to observe for size changes.
69
+ * @param {number} [debounceDuration=50] The time, in milliseconds, to debounce the emitted
70
+ * values. Defaults to 50ms.
71
+ * @returns {Observable<ResizeObserverEntry[]>} An Observable that emits the resize events
72
+ * for the observed element. Each emission is an array of `ResizeObserverEntry` objects, one
73
+ * for each observed element that experienced a resize.
74
+ * @example
75
+ * ```ts
76
+ * // Observing resize events of an element with a 100ms debounce duration
77
+ * const element = document.getElementById('resizable-element');
78
+ * fromElementResize$(element, 100).subscribe((entries) => console.log('Element resized:', entries));
79
+ * ```
80
+ *
81
+ * Always unsubscribe from the observable to clean up resources and prevent memory leaks.
82
+ */
20
83
  function fromElementResize$(element, debounceDuration = 50) {
21
84
  return new Observable((observer) => {
22
85
  const resizeObserver = createResizeObserver((events) => {
@@ -29,10 +92,57 @@ function fromElementResize$(element, debounceDuration = 50) {
29
92
  }).pipe(debounceTime(debounceDuration));
30
93
  }
31
94
 
95
+ /**
96
+ * Creates an Observable that emits events of a specific type from one or multiple event targets.
97
+ * It listens to multiple event types on the given target(s) and emits the events through a single
98
+ * Observable stream, simplifying the handling of related event types.
99
+ *
100
+ * @template T The event object type that the Observable will emit.
101
+ * @param {HasEventTargetAddRemove<T> | HasEventTargetAddRemove<T>[]} target The DOM element(s) or event target(s) to listen on.
102
+ * @param {...string[]} events The names of the events to listen for on the target(s).
103
+ * @returns {Observable<T>} An Observable that emits an event each time one of the specified events occurs on the given target(s).
104
+ *
105
+ * @example
106
+ * ```ts
107
+ * // Listen to both 'click' and 'keyup' events on document
108
+ * fromEvents(document, 'click', 'keyup').subscribe(event => {
109
+ * console.log('Event occurred:', event);
110
+ * });
111
+ *
112
+ * // Listen to 'mousemove' event on multiple elements
113
+ * const elements = [document.getElementById('first'), document.getElementById('second')];
114
+ * fromEvents(elements, 'mousemove').subscribe(event => {
115
+ * console.log('Mouse moved over:', event.target);
116
+ * });
117
+ * ```
118
+ */
32
119
  function fromEvents(target, ...events) {
33
120
  return merge(...events.map((event) => fromEvent(target, event)));
34
121
  }
35
122
 
123
+ /**
124
+ * Creates an Observable from an Angular QueryList. The Observable emits the initial state
125
+ * of the QueryList and continues to emit updates every time the QueryList changes.
126
+ * This utility function is useful for integrating Angular's QueryList changes into
127
+ * the RxJS reactive data flow, allowing developers to apply RxJS operators and
128
+ * subscriptions to respond to QueryList updates.
129
+ *
130
+ * @template T The type of elements contained within the QueryList.
131
+ * @param {QueryList<T>} queryList The QueryList instance to observe.
132
+ * @returns {Observable<QueryList<T>>} An Observable that emits the current state of the QueryList
133
+ * and updates whenever the QueryList changes.
134
+ * @example
135
+ * ```ts
136
+ * // Assuming 'items' is a QueryList of component instances or DOM elements
137
+ * fromQueryList(items).subscribe(queryList => {
138
+ * console.log('QueryList changed:', queryList);
139
+ * });
140
+ * ```
141
+ */
142
+ function fromQueryList(queryList) {
143
+ return queryList.changes.pipe(startWith(queryList));
144
+ }
145
+
36
146
  /**
37
147
  * Generated bundle index. Do not edit.
38
148
  */