@odx/angular 1.0.0-rc.9 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (597) hide show
  1. package/cdk/a11y/lib/directives/interactive.directive.d.ts +2 -2
  2. package/cdk/a11y/lib/directives/list-focus-manager-option.directive.d.ts +1 -2
  3. package/cdk/active-indicator/lib/models/active-indicator-direction.d.ts +1 -1
  4. package/cdk/active-indicator/lib/models/active-indicator-position.d.ts +1 -1
  5. package/cdk/checkbox-control/lib/checkbox-control.directive.d.ts +3 -1
  6. package/cdk/connected-overlay/lib/connected-overlay.component.d.ts +2 -2
  7. package/cdk/connected-overlay/lib/helpers/index.d.ts +0 -2
  8. package/cdk/connected-overlay/lib/models/connected-overlay-options.d.ts +3 -2
  9. package/cdk/custom-form-control/lib/custom-form-control.d.ts +5 -1
  10. package/cdk/dynamic-view/lib/facade/dynamic-content.d.ts +3 -3
  11. package/cdk/dynamic-view/lib/models/dynamic-component-ref.d.ts +1 -0
  12. package/cdk/radio-group-control/lib/radio-group-control.directive.d.ts +2 -1
  13. package/components/action-group/action-group.component.d.ts +1 -1
  14. package/components/area-header/area-header.component.d.ts +1 -1
  15. package/components/area-header/models/area-header-size.d.ts +1 -1
  16. package/components/avatar/lib/avatar.component.d.ts +3 -2
  17. package/components/avatar/lib/models/avatar-size.d.ts +1 -1
  18. package/components/avatar/lib/models/avatar-variant.d.ts +5 -0
  19. package/components/avatar/lib/models/index.d.ts +1 -0
  20. package/components/badge/lib/badge.component.d.ts +7 -17
  21. package/components/badge/lib/badge.directive.d.ts +16 -12
  22. package/components/badge/lib/models/badge-variant.d.ts +1 -1
  23. package/components/badge/lib/models/index.d.ts +0 -1
  24. package/components/bar/lib/models/bar-button-variant.d.ts +1 -1
  25. package/components/button/index.d.ts +1 -0
  26. package/components/button/lib/directives/index.d.ts +1 -0
  27. package/components/button/lib/directives/responsive-button.directive.d.ts +6 -0
  28. package/components/button/lib/models/button-size.d.ts +1 -1
  29. package/components/button/lib/models/button-variant.d.ts +1 -1
  30. package/components/card/README.md +3 -0
  31. package/components/card/index.d.ts +5 -0
  32. package/components/card/lib/card.component.d.ts +20 -0
  33. package/components/card/lib/card.module.d.ts +16 -0
  34. package/components/card/lib/components/card-footer/card-footer.component.d.ts +5 -0
  35. package/components/card/lib/components/index.d.ts +2 -0
  36. package/components/card/lib/components/launch-card-subtitle/launch-card-subtitle.component.d.ts +5 -0
  37. package/components/card/lib/directives/card-content.directive.d.ts +5 -0
  38. package/components/card/lib/directives/card-title.directive.d.ts +5 -0
  39. package/components/card/lib/directives/index.d.ts +2 -0
  40. package/components/card/lib/models/card-variant.d.ts +6 -0
  41. package/components/card/lib/models/index.d.ts +1 -0
  42. package/components/chip/lib/models/chip-size.d.ts +1 -1
  43. package/components/chip/lib/models/chip-variant.d.ts +1 -1
  44. package/components/circular-progress/lib/circular-progress.component.d.ts +2 -1
  45. package/components/circular-progress/lib/models/circular-progress-size.d.ts +1 -1
  46. package/components/content-box/lib/content-box.module.d.ts +2 -2
  47. package/components/content-box/lib/directives/index.d.ts +2 -2
  48. package/components/dropdown/lib/dropdown.directive.d.ts +3 -2
  49. package/components/dropdown/lib/models/dropdown-options.d.ts +1 -1
  50. package/components/form-field/index.d.ts +1 -0
  51. package/components/form-field/lib/form-field.component.d.ts +8 -3
  52. package/components/form-field/lib/form-field.config.d.ts +3 -2
  53. package/components/form-field/lib/form-field.module.d.ts +0 -4
  54. package/components/form-field/lib/models/form-field-error-resolver.d.ts +1 -1
  55. package/components/form-field/lib/models/form-field-error.d.ts +1 -0
  56. package/components/form-field/lib/models/form-field-variant.d.ts +5 -0
  57. package/components/form-field/lib/models/index.d.ts +1 -0
  58. package/components/form-field/lib/services/form-field-error.service.d.ts +1 -0
  59. package/components/header/lib/directives/header-avatar.directive.d.ts +5 -2
  60. package/components/header/lib/header.component.d.ts +1 -1
  61. package/components/icon/index.d.ts +1 -0
  62. package/components/icon/lib/icon.component.d.ts +3 -5
  63. package/components/icon/lib/icon.config.d.ts +4 -0
  64. package/components/icon/lib/models/icon-size.d.ts +1 -1
  65. package/components/inline-message/lib/models/inline-message-variant.d.ts +1 -1
  66. package/components/list/lib/components/expandable-list-item/expandable-list-item.component.d.ts +14 -0
  67. package/components/list/lib/components/index.d.ts +1 -0
  68. package/components/list/lib/list.component.d.ts +4 -2
  69. package/components/list/lib/list.module.d.ts +3 -2
  70. package/components/loading-spinner/lib/loading-spinner.directive.d.ts +3 -1
  71. package/components/logo/models/logo-size.d.ts +1 -1
  72. package/components/logo/models/logo-variant.d.ts +1 -1
  73. package/components/main-menu/lib/directives/main-menu-item.directive.d.ts +2 -0
  74. package/components/mainfilter-group/README.md +3 -0
  75. package/components/mainfilter-group/index.d.ts +1 -0
  76. package/components/mainfilter-group/lib/mainfilter-group.component.d.ts +6 -0
  77. package/components/menu/lib/directives/menu-item.directive.d.ts +1 -2
  78. package/components/menu/lib/menu.component.d.ts +4 -1
  79. package/components/menu/lib/menu.directive.d.ts +5 -4
  80. package/components/modal/index.d.ts +1 -1
  81. package/components/modal/lib/modal.config.d.ts +2 -2
  82. package/components/modal/lib/modal.module.d.ts +0 -4
  83. package/components/modal/lib/modal.service.d.ts +7 -3
  84. package/components/modal/lib/models/basic-modal-options.d.ts +1 -1
  85. package/components/modal/lib/models/modal-hero-variant.d.ts +1 -1
  86. package/components/modal/lib/models/modal-options.d.ts +2 -1
  87. package/components/modal/lib/models/modal-ref.d.ts +6 -4
  88. package/components/modal/lib/models/modal-size.d.ts +2 -1
  89. package/components/modal/lib/models/modal-type.d.ts +1 -1
  90. package/components/modal/lib/models/modal-variant.d.ts +1 -1
  91. package/components/navigation-back/README.md +3 -0
  92. package/components/navigation-back/index.d.ts +1 -0
  93. package/components/navigation-back/lib/navigation-back.component.d.ts +6 -0
  94. package/components/select/lib/abstract/select-control-option.d.ts +2 -0
  95. package/components/select/lib/abstract/select-control.d.ts +1 -0
  96. package/components/select/lib/components/option/option.component.d.ts +6 -2
  97. package/components/select/lib/select.component.d.ts +10 -5
  98. package/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.d.ts +5 -2
  99. package/components/toast/lib/components/toast-item/toast-item.component.d.ts +1 -1
  100. package/components/toast/lib/models/toast-variant.d.ts +1 -1
  101. package/components/toast/lib/toast.config.d.ts +2 -2
  102. package/components/toast/lib/toast.module.d.ts +0 -4
  103. package/components/toast/lib/toast.service.d.ts +1 -1
  104. package/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.d.ts +4 -1
  105. package/components/toggle-button-group/lib/toggle-button-group.component.d.ts +8 -3
  106. package/components/tooltip/lib/models/tooltip-size.d.ts +1 -1
  107. package/components/tooltip/lib/models/tooltip-trigger.d.ts +1 -1
  108. package/components/tooltip/lib/tooltip.component.d.ts +3 -2
  109. package/components/tooltip/lib/tooltip.directive.d.ts +3 -3
  110. package/esm2020/animations/lib/expand.mjs +3 -3
  111. package/esm2020/cdk/a11y/lib/a11y.module.mjs +4 -4
  112. package/esm2020/cdk/a11y/lib/directives/interactive.directive.mjs +4 -4
  113. package/esm2020/cdk/a11y/lib/directives/list-focus-manager-option.directive.mjs +5 -7
  114. package/esm2020/cdk/a11y/lib/directives/list-focus-manager.directive.mjs +3 -3
  115. package/esm2020/cdk/active-indicator/lib/active-indicator.directive.mjs +3 -3
  116. package/esm2020/cdk/checkbox-control/lib/checkbox-control.directive.mjs +16 -12
  117. package/esm2020/cdk/connected-overlay/lib/connected-overlay.component.mjs +8 -8
  118. package/esm2020/cdk/connected-overlay/lib/connected-overlay.service.mjs +5 -5
  119. package/esm2020/cdk/connected-overlay/lib/helpers/compute-overlay-position.mjs +4 -6
  120. package/esm2020/cdk/connected-overlay/lib/helpers/index.mjs +1 -3
  121. package/esm2020/cdk/connected-overlay/lib/models/connected-overlay-options.mjs +3 -2
  122. package/esm2020/cdk/custom-form-control/lib/control.directive.mjs +3 -3
  123. package/esm2020/cdk/custom-form-control/lib/custom-form-control.mjs +44 -20
  124. package/esm2020/cdk/dynamic-view/lib/dynamic-view.component.mjs +3 -3
  125. package/esm2020/cdk/dynamic-view/lib/dynamic-view.directive.mjs +7 -5
  126. package/esm2020/cdk/dynamic-view/lib/dynamic-view.service.mjs +3 -3
  127. package/esm2020/cdk/dynamic-view/lib/models/dynamic-component-ref.mjs +15 -4
  128. package/esm2020/cdk/dynamic-view/lib/models/dynamic-template-ref.mjs +2 -2
  129. package/esm2020/cdk/expandable/lib/directives/expandable-item.directive.mjs +3 -3
  130. package/esm2020/cdk/expandable/lib/directives/extandable-container.directive.mjs +3 -3
  131. package/esm2020/cdk/expandable/lib/expandable.module.mjs +4 -4
  132. package/esm2020/cdk/radio-group-control/lib/radio-control.directive.mjs +10 -10
  133. package/esm2020/cdk/radio-group-control/lib/radio-group-control.directive.mjs +14 -10
  134. package/esm2020/cdk/radio-group-control/lib/radio-group-control.module.mjs +4 -4
  135. package/esm2020/components/accordion/lib/accordion.component.mjs +6 -6
  136. package/esm2020/components/accordion/lib/accordion.module.mjs +4 -4
  137. package/esm2020/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +5 -5
  138. package/esm2020/components/accordion/lib/directives/accordion-item-title.mjs +3 -3
  139. package/esm2020/components/action-group/action-group.component.mjs +5 -5
  140. package/esm2020/components/area-header/area-header.component.mjs +7 -6
  141. package/esm2020/components/area-header/area-header.module.mjs +4 -4
  142. package/esm2020/components/area-header/directives/area-header-content.directive.mjs +3 -3
  143. package/esm2020/components/area-header/directives/area-header-subtitle.directive.mjs +3 -3
  144. package/esm2020/components/avatar/lib/avatar.component.mjs +14 -8
  145. package/esm2020/components/avatar/lib/models/avatar-variant.mjs +5 -0
  146. package/esm2020/components/avatar/lib/models/index.mjs +2 -1
  147. package/esm2020/components/badge/lib/badge.component.mjs +18 -65
  148. package/esm2020/components/badge/lib/badge.directive.mjs +50 -25
  149. package/esm2020/components/badge/lib/models/index.mjs +1 -2
  150. package/esm2020/components/bar/lib/bar.component.mjs +3 -3
  151. package/esm2020/components/bar/lib/bar.module.mjs +4 -4
  152. package/esm2020/components/bar/lib/directives/bar-button.directive.mjs +6 -7
  153. package/esm2020/components/bar/lib/directives/bar-label.directive.mjs +3 -3
  154. package/esm2020/components/breadcrumbs/lib/breadcrumbs.component.mjs +3 -3
  155. package/esm2020/components/button/index.mjs +2 -1
  156. package/esm2020/components/button/lib/button.component.mjs +8 -10
  157. package/esm2020/components/button/lib/directives/index.mjs +2 -0
  158. package/esm2020/components/button/lib/directives/responsive-button.directive.mjs +24 -0
  159. package/esm2020/components/button-group/lib/button-group.component.mjs +3 -3
  160. package/esm2020/components/card/index.mjs +6 -0
  161. package/esm2020/components/card/lib/card.component.mjs +67 -0
  162. package/esm2020/components/card/lib/card.module.mjs +53 -0
  163. package/esm2020/components/card/lib/components/card-footer/card-footer.component.mjs +13 -0
  164. package/esm2020/components/card/lib/components/index.mjs +3 -0
  165. package/esm2020/components/card/lib/components/launch-card-subtitle/launch-card-subtitle.component.mjs +13 -0
  166. package/esm2020/components/card/lib/directives/card-content.directive.mjs +17 -0
  167. package/esm2020/components/card/lib/directives/card-title.directive.mjs +17 -0
  168. package/esm2020/components/card/lib/directives/index.mjs +3 -0
  169. package/esm2020/components/card/lib/models/card-variant.mjs +6 -0
  170. package/esm2020/components/card/lib/models/index.mjs +2 -0
  171. package/esm2020/components/card/odx-angular-components-card.mjs +5 -0
  172. package/esm2020/components/checkbox/lib/checkbox.component.mjs +5 -5
  173. package/esm2020/components/checkbox/lib/checkbox.module.mjs +4 -4
  174. package/esm2020/components/checkbox/lib/checkbox.validator.mjs +3 -3
  175. package/esm2020/components/chip/lib/chip.component.mjs +5 -5
  176. package/esm2020/components/circular-progress/lib/circular-progress.component.mjs +8 -6
  177. package/esm2020/components/content-box/lib/content-box.component.mjs +3 -3
  178. package/esm2020/components/content-box/lib/content-box.module.mjs +7 -7
  179. package/esm2020/components/content-box/lib/directives/{content-box-footer-directive.mjs → content-box-footer.directive.mjs} +4 -4
  180. package/esm2020/components/content-box/lib/directives/{content-box-header-directive.mjs → content-box-header.directive.mjs} +4 -4
  181. package/esm2020/components/content-box/lib/directives/index.mjs +3 -3
  182. package/esm2020/components/dropdown/lib/dropdown.component.mjs +3 -3
  183. package/esm2020/components/dropdown/lib/dropdown.directive.mjs +10 -7
  184. package/esm2020/components/dropdown/lib/dropdown.module.mjs +4 -4
  185. package/esm2020/components/dropdown/lib/models/dropdown-options.mjs +3 -2
  186. package/esm2020/components/form-field/index.mjs +2 -1
  187. package/esm2020/components/form-field/lib/components/form-field-info/form-field-info.component.mjs +3 -3
  188. package/esm2020/components/form-field/lib/components/form-group/form-group.component.mjs +3 -3
  189. package/esm2020/components/form-field/lib/directives/form-field-control.directive.mjs +6 -6
  190. package/esm2020/components/form-field/lib/directives/form-field-error.directive.mjs +3 -3
  191. package/esm2020/components/form-field/lib/directives/form-field-hint.directive.mjs +3 -3
  192. package/esm2020/components/form-field/lib/directives/form-field-label.directive.mjs +3 -3
  193. package/esm2020/components/form-field/lib/directives/form.directive.mjs +3 -3
  194. package/esm2020/components/form-field/lib/form-field.component.mjs +32 -15
  195. package/esm2020/components/form-field/lib/form-field.config.mjs +4 -3
  196. package/esm2020/components/form-field/lib/form-field.module.mjs +5 -13
  197. package/esm2020/components/form-field/lib/form-field.service.mjs +3 -3
  198. package/esm2020/components/form-field/lib/models/form-field-error.mjs +1 -1
  199. package/esm2020/components/form-field/lib/models/form-field-variant.mjs +5 -0
  200. package/esm2020/components/form-field/lib/models/index.mjs +2 -1
  201. package/esm2020/components/form-field/lib/services/form-field-error.service.mjs +16 -16
  202. package/esm2020/components/header/lib/directives/header-avatar.directive.mjs +13 -6
  203. package/esm2020/components/header/lib/directives/header-title.directive.mjs +3 -3
  204. package/esm2020/components/header/lib/header.component.mjs +5 -5
  205. package/esm2020/components/header/lib/header.module.mjs +4 -4
  206. package/esm2020/components/icon/index.mjs +2 -1
  207. package/esm2020/components/icon/lib/icon.component.mjs +12 -21
  208. package/esm2020/components/icon/lib/icon.config.mjs +5 -0
  209. package/esm2020/components/inline-message/lib/inline-message.component.mjs +8 -9
  210. package/esm2020/components/link/link.directive.mjs +3 -3
  211. package/esm2020/components/list/lib/components/expandable-list-item/expandable-list-item.component.mjs +49 -0
  212. package/esm2020/components/list/lib/components/index.mjs +2 -1
  213. package/esm2020/components/list/lib/components/list-item/list-item.component.mjs +3 -3
  214. package/esm2020/components/list/lib/list.component.mjs +22 -11
  215. package/esm2020/components/list/lib/list.module.mjs +7 -7
  216. package/esm2020/components/loading-spinner/lib/loading-spinner.component.mjs +3 -3
  217. package/esm2020/components/loading-spinner/lib/loading-spinner.directive.mjs +13 -6
  218. package/esm2020/components/loading-spinner/lib/loading-spinner.module.mjs +4 -4
  219. package/esm2020/components/logo/logo.directive.mjs +8 -6
  220. package/esm2020/components/main-menu/lib/directives/main-menu-button.directive.mjs +3 -3
  221. package/esm2020/components/main-menu/lib/directives/main-menu-item.directive.mjs +13 -5
  222. package/esm2020/components/main-menu/lib/main-menu.component.mjs +5 -5
  223. package/esm2020/components/main-menu/lib/main-menu.module.mjs +4 -4
  224. package/esm2020/components/main-menu/lib/main-menu.service.mjs +3 -3
  225. package/esm2020/components/mainfilter-group/index.mjs +2 -0
  226. package/esm2020/components/mainfilter-group/lib/mainfilter-group.component.mjs +21 -0
  227. package/esm2020/components/mainfilter-group/odx-angular-components-mainfilter-group.mjs +5 -0
  228. package/esm2020/components/menu/lib/directives/menu-item.directive.mjs +6 -8
  229. package/esm2020/components/menu/lib/menu.component.mjs +22 -11
  230. package/esm2020/components/menu/lib/menu.directive.mjs +11 -4
  231. package/esm2020/components/menu/lib/menu.module.mjs +4 -4
  232. package/esm2020/components/modal/index.mjs +2 -2
  233. package/esm2020/components/modal/lib/components/basic-modal/basic-modal.component.mjs +3 -3
  234. package/esm2020/components/modal/lib/components/modal-footer/modal-footer.component.mjs +3 -3
  235. package/esm2020/components/modal/lib/components/modal-header/modal-header.component.mjs +5 -5
  236. package/esm2020/components/modal/lib/components/modal-hero/modal-hero.component.mjs +5 -5
  237. package/esm2020/components/modal/lib/directives/modal-close.directive.mjs +3 -3
  238. package/esm2020/components/modal/lib/directives/modal-content.directive.mjs +3 -3
  239. package/esm2020/components/modal/lib/directives/modal-dismiss.directive.mjs +3 -3
  240. package/esm2020/components/modal/lib/modal.component.mjs +5 -5
  241. package/esm2020/components/modal/lib/modal.config.mjs +4 -3
  242. package/esm2020/components/modal/lib/modal.directive.mjs +3 -3
  243. package/esm2020/components/modal/lib/modal.module.mjs +5 -13
  244. package/esm2020/components/modal/lib/modal.service.mjs +37 -26
  245. package/esm2020/components/modal/lib/models/modal-options.mjs +1 -1
  246. package/esm2020/components/modal/lib/models/modal-ref.mjs +20 -12
  247. package/esm2020/components/modal/lib/models/modal-size.mjs +2 -1
  248. package/esm2020/components/navigation-back/index.mjs +2 -0
  249. package/esm2020/components/navigation-back/lib/navigation-back.component.mjs +22 -0
  250. package/esm2020/components/navigation-back/odx-angular-components-navigation-back.mjs +5 -0
  251. package/esm2020/components/progress/lib/progress.component.mjs +3 -3
  252. package/esm2020/components/radio-group/lib/components/radio-button/radio-button.component.mjs +3 -3
  253. package/esm2020/components/radio-group/lib/radio-group.component.mjs +7 -7
  254. package/esm2020/components/radio-group/lib/radio-group.module.mjs +4 -4
  255. package/esm2020/components/rail-navigation/lib/components/rail-navigation-item.component.mjs +5 -5
  256. package/esm2020/components/rail-navigation/lib/rail-navigation.component.mjs +3 -3
  257. package/esm2020/components/rail-navigation/lib/rail-navigation.module.mjs +4 -4
  258. package/esm2020/components/select/lib/abstract/select-control-option.mjs +1 -1
  259. package/esm2020/components/select/lib/abstract/select-control.mjs +1 -1
  260. package/esm2020/components/select/lib/components/option/option.component.mjs +37 -20
  261. package/esm2020/components/select/lib/directives/select-search-field.directive.mjs +3 -3
  262. package/esm2020/components/select/lib/pipes/select-search-filter.pipe.mjs +3 -3
  263. package/esm2020/components/select/lib/select.component.mjs +82 -35
  264. package/esm2020/components/select/lib/select.module.mjs +4 -4
  265. package/esm2020/components/slider/lib/slider.directive.mjs +3 -3
  266. package/esm2020/components/spinbox/lib/spinbox.component.mjs +8 -8
  267. package/esm2020/components/switch/lib/switch.component.mjs +5 -5
  268. package/esm2020/components/switch/lib/switch.module.mjs +4 -4
  269. package/esm2020/components/switch/lib/switch.validator.mjs +3 -3
  270. package/esm2020/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.mjs +15 -6
  271. package/esm2020/components/tab-bar/lib/tab-bar.component.mjs +7 -7
  272. package/esm2020/components/tab-bar/lib/tab-bar.module.mjs +4 -4
  273. package/esm2020/components/toast/lib/components/toast-container/toast-container.component.mjs +3 -3
  274. package/esm2020/components/toast/lib/components/toast-item/toast-item.component.mjs +9 -8
  275. package/esm2020/components/toast/lib/toast.config.mjs +3 -3
  276. package/esm2020/components/toast/lib/toast.module.mjs +5 -13
  277. package/esm2020/components/toast/lib/toast.service.mjs +7 -7
  278. package/esm2020/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.mjs +13 -7
  279. package/esm2020/components/toggle-button-group/lib/toggle-button-group.component.mjs +23 -12
  280. package/esm2020/components/toggle-button-group/lib/toggle-button-group.module.mjs +4 -4
  281. package/esm2020/components/tooltip/lib/tooltip.component.mjs +4 -4
  282. package/esm2020/components/tooltip/lib/tooltip.directive.mjs +11 -12
  283. package/esm2020/internal/decorators/css-component.mjs +3 -8
  284. package/esm2020/internal/decorators/css-modifier.mjs +21 -18
  285. package/esm2020/internal/helpers/decorator-property-name.mjs +4 -0
  286. package/esm2020/internal/helpers/deepmerge.mjs +6 -0
  287. package/esm2020/internal/helpers/index.mjs +3 -1
  288. package/esm2020/internal/helpers/with-mutiple-descriptors.mjs +22 -13
  289. package/esm2020/lib/controllers/controller.mjs +3 -3
  290. package/esm2020/lib/controllers/disabled.controller.mjs +26 -20
  291. package/esm2020/lib/controllers/readonly.controller.mjs +30 -21
  292. package/esm2020/lib/core.module.mjs +9 -8
  293. package/esm2020/lib/directives/click-outside.directive.mjs +29 -17
  294. package/esm2020/lib/directives/delegate-focus.directive.mjs +40 -0
  295. package/esm2020/lib/directives/index.mjs +2 -2
  296. package/esm2020/lib/directives/with-disabled-state.directive.mjs +9 -9
  297. package/esm2020/lib/directives/with-tabindex.directive.mjs +3 -3
  298. package/esm2020/lib/services/window-ref.mjs +13 -6
  299. package/esm2020/theming/index.mjs +5 -0
  300. package/esm2020/theming/lib/helpers/index.mjs +4 -0
  301. package/esm2020/theming/lib/helpers/prefers-dark-theme.mjs +4 -0
  302. package/esm2020/theming/lib/helpers/resolve-theme.mjs +5 -0
  303. package/esm2020/theming/lib/helpers/theme-storage.mjs +19 -0
  304. package/esm2020/theming/lib/models/index.mjs +2 -0
  305. package/esm2020/theming/lib/models/theme.mjs +6 -0
  306. package/esm2020/theming/lib/theming.config.mjs +21 -0
  307. package/esm2020/theming/lib/theming.service.mjs +42 -0
  308. package/esm2020/theming/odx-angular-theming.mjs +5 -0
  309. package/esm2020/utils/lib/decorators/transform.mjs +3 -3
  310. package/esm2020/utils/lib/helpers/build-url.mjs +4 -0
  311. package/esm2020/utils/lib/helpers/dom.mjs +2 -2
  312. package/esm2020/utils/lib/helpers/event-manager.mjs +3 -3
  313. package/esm2020/utils/lib/helpers/get-axis.mjs +14 -0
  314. package/esm2020/utils/lib/helpers/get-opposite-side.mjs +15 -0
  315. package/esm2020/utils/lib/helpers/get-side.mjs +4 -0
  316. package/esm2020/utils/lib/helpers/index.mjs +6 -2
  317. package/esm2020/utils/lib/helpers/provide-config.mjs +25 -0
  318. package/esm2020/utils/lib/helpers/queue.mjs +36 -11
  319. package/esm2020/utils/lib/types/axis.mjs +5 -0
  320. package/esm2020/utils/lib/types/index.mjs +4 -1
  321. package/esm2020/utils/lib/types/position.mjs +15 -0
  322. package/esm2020/utils/lib/types/side.mjs +7 -0
  323. package/fesm2015/odx-angular-animations.mjs +2 -2
  324. package/fesm2015/odx-angular-animations.mjs.map +1 -1
  325. package/fesm2015/odx-angular-cdk-a11y.mjs +13 -14
  326. package/fesm2015/odx-angular-cdk-a11y.mjs.map +1 -1
  327. package/fesm2015/odx-angular-cdk-active-indicator.mjs +3 -3
  328. package/fesm2015/odx-angular-cdk-checkbox-control.mjs +16 -12
  329. package/fesm2015/odx-angular-cdk-checkbox-control.mjs.map +1 -1
  330. package/fesm2015/odx-angular-cdk-connected-overlay.mjs +13 -31
  331. package/fesm2015/odx-angular-cdk-connected-overlay.mjs.map +1 -1
  332. package/fesm2015/odx-angular-cdk-custom-form-control.mjs +47 -24
  333. package/fesm2015/odx-angular-cdk-custom-form-control.mjs.map +1 -1
  334. package/fesm2015/odx-angular-cdk-dynamic-view.mjs +26 -12
  335. package/fesm2015/odx-angular-cdk-dynamic-view.mjs.map +1 -1
  336. package/fesm2015/odx-angular-cdk-expandable.mjs +10 -10
  337. package/fesm2015/odx-angular-cdk-radio-group-control.mjs +26 -23
  338. package/fesm2015/odx-angular-cdk-radio-group-control.mjs.map +1 -1
  339. package/fesm2015/odx-angular-components-accordion.mjs +16 -16
  340. package/fesm2015/odx-angular-components-accordion.mjs.map +1 -1
  341. package/fesm2015/odx-angular-components-action-group.mjs +4 -4
  342. package/fesm2015/odx-angular-components-action-group.mjs.map +1 -1
  343. package/fesm2015/odx-angular-components-area-header.mjs +16 -15
  344. package/fesm2015/odx-angular-components-area-header.mjs.map +1 -1
  345. package/fesm2015/odx-angular-components-avatar.mjs +18 -7
  346. package/fesm2015/odx-angular-components-avatar.mjs.map +1 -1
  347. package/fesm2015/odx-angular-components-badge.mjs +63 -97
  348. package/fesm2015/odx-angular-components-badge.mjs.map +1 -1
  349. package/fesm2015/odx-angular-components-bar.mjs +15 -16
  350. package/fesm2015/odx-angular-components-bar.mjs.map +1 -1
  351. package/fesm2015/odx-angular-components-breadcrumbs.mjs +3 -3
  352. package/fesm2015/odx-angular-components-button-group.mjs +3 -3
  353. package/fesm2015/odx-angular-components-button.mjs +31 -11
  354. package/fesm2015/odx-angular-components-button.mjs.map +1 -1
  355. package/fesm2015/odx-angular-components-card.mjs +174 -0
  356. package/fesm2015/odx-angular-components-card.mjs.map +1 -0
  357. package/fesm2015/odx-angular-components-checkbox.mjs +11 -11
  358. package/fesm2015/odx-angular-components-checkbox.mjs.map +1 -1
  359. package/fesm2015/odx-angular-components-chip.mjs +4 -4
  360. package/fesm2015/odx-angular-components-chip.mjs.map +1 -1
  361. package/fesm2015/odx-angular-components-circular-progress.mjs +7 -5
  362. package/fesm2015/odx-angular-components-circular-progress.mjs.map +1 -1
  363. package/fesm2015/odx-angular-components-content-box.mjs +13 -13
  364. package/fesm2015/odx-angular-components-content-box.mjs.map +1 -1
  365. package/fesm2015/odx-angular-components-dropdown.mjs +18 -14
  366. package/fesm2015/odx-angular-components-dropdown.mjs.map +1 -1
  367. package/fesm2015/odx-angular-components-form-field.mjs +80 -64
  368. package/fesm2015/odx-angular-components-form-field.mjs.map +1 -1
  369. package/fesm2015/odx-angular-components-header.mjs +23 -17
  370. package/fesm2015/odx-angular-components-header.mjs.map +1 -1
  371. package/fesm2015/odx-angular-components-icon.mjs +16 -22
  372. package/fesm2015/odx-angular-components-icon.mjs.map +1 -1
  373. package/fesm2015/odx-angular-components-inline-message.mjs +7 -8
  374. package/fesm2015/odx-angular-components-inline-message.mjs.map +1 -1
  375. package/fesm2015/odx-angular-components-link.mjs +3 -3
  376. package/fesm2015/odx-angular-components-list.mjs +70 -20
  377. package/fesm2015/odx-angular-components-list.mjs.map +1 -1
  378. package/fesm2015/odx-angular-components-loading-spinner.mjs +21 -13
  379. package/fesm2015/odx-angular-components-loading-spinner.mjs.map +1 -1
  380. package/fesm2015/odx-angular-components-logo.mjs +7 -5
  381. package/fesm2015/odx-angular-components-logo.mjs.map +1 -1
  382. package/fesm2015/odx-angular-components-main-menu.mjs +57 -49
  383. package/fesm2015/odx-angular-components-main-menu.mjs.map +1 -1
  384. package/fesm2015/odx-angular-components-mainfilter-group.mjs +27 -0
  385. package/fesm2015/odx-angular-components-mainfilter-group.mjs.map +1 -0
  386. package/fesm2015/odx-angular-components-menu.mjs +41 -24
  387. package/fesm2015/odx-angular-components-menu.mjs.map +1 -1
  388. package/fesm2015/odx-angular-components-modal.mjs +91 -118
  389. package/fesm2015/odx-angular-components-modal.mjs.map +1 -1
  390. package/fesm2015/odx-angular-components-navigation-back.mjs +28 -0
  391. package/fesm2015/odx-angular-components-navigation-back.mjs.map +1 -0
  392. package/fesm2015/odx-angular-components-progress.mjs +3 -3
  393. package/fesm2015/odx-angular-components-radio-group.mjs +13 -13
  394. package/fesm2015/odx-angular-components-radio-group.mjs.map +1 -1
  395. package/fesm2015/odx-angular-components-rail-navigation.mjs +11 -11
  396. package/fesm2015/odx-angular-components-rail-navigation.mjs.map +1 -1
  397. package/fesm2015/odx-angular-components-select.mjs +126 -68
  398. package/fesm2015/odx-angular-components-select.mjs.map +1 -1
  399. package/fesm2015/odx-angular-components-slider.mjs +3 -3
  400. package/fesm2015/odx-angular-components-spinbox.mjs +8 -8
  401. package/fesm2015/odx-angular-components-spinbox.mjs.map +1 -1
  402. package/fesm2015/odx-angular-components-switch.mjs +11 -11
  403. package/fesm2015/odx-angular-components-switch.mjs.map +1 -1
  404. package/fesm2015/odx-angular-components-tab-bar.mjs +25 -16
  405. package/fesm2015/odx-angular-components-tab-bar.mjs.map +1 -1
  406. package/fesm2015/odx-angular-components-toast.mjs +23 -29
  407. package/fesm2015/odx-angular-components-toast.mjs.map +1 -1
  408. package/fesm2015/odx-angular-components-toggle-button-group.mjs +40 -20
  409. package/fesm2015/odx-angular-components-toggle-button-group.mjs.map +1 -1
  410. package/fesm2015/odx-angular-components-tooltip.mjs +13 -14
  411. package/fesm2015/odx-angular-components-tooltip.mjs.map +1 -1
  412. package/fesm2015/odx-angular-internal.mjs +69 -53
  413. package/fesm2015/odx-angular-internal.mjs.map +1 -1
  414. package/fesm2015/odx-angular-theming.mjs +99 -0
  415. package/fesm2015/odx-angular-theming.mjs.map +1 -0
  416. package/fesm2015/odx-angular-utils.mjs +119 -25
  417. package/fesm2015/odx-angular-utils.mjs.map +1 -1
  418. package/fesm2015/odx-angular.mjs +147 -108
  419. package/fesm2015/odx-angular.mjs.map +1 -1
  420. package/fesm2020/odx-angular-animations.mjs +2 -2
  421. package/fesm2020/odx-angular-animations.mjs.map +1 -1
  422. package/fesm2020/odx-angular-cdk-a11y.mjs +13 -14
  423. package/fesm2020/odx-angular-cdk-a11y.mjs.map +1 -1
  424. package/fesm2020/odx-angular-cdk-active-indicator.mjs +3 -3
  425. package/fesm2020/odx-angular-cdk-checkbox-control.mjs +16 -12
  426. package/fesm2020/odx-angular-cdk-checkbox-control.mjs.map +1 -1
  427. package/fesm2020/odx-angular-cdk-connected-overlay.mjs +13 -31
  428. package/fesm2020/odx-angular-cdk-connected-overlay.mjs.map +1 -1
  429. package/fesm2020/odx-angular-cdk-custom-form-control.mjs +47 -24
  430. package/fesm2020/odx-angular-cdk-custom-form-control.mjs.map +1 -1
  431. package/fesm2020/odx-angular-cdk-dynamic-view.mjs +25 -12
  432. package/fesm2020/odx-angular-cdk-dynamic-view.mjs.map +1 -1
  433. package/fesm2020/odx-angular-cdk-expandable.mjs +10 -10
  434. package/fesm2020/odx-angular-cdk-radio-group-control.mjs +26 -23
  435. package/fesm2020/odx-angular-cdk-radio-group-control.mjs.map +1 -1
  436. package/fesm2020/odx-angular-components-accordion.mjs +16 -16
  437. package/fesm2020/odx-angular-components-accordion.mjs.map +1 -1
  438. package/fesm2020/odx-angular-components-action-group.mjs +4 -4
  439. package/fesm2020/odx-angular-components-action-group.mjs.map +1 -1
  440. package/fesm2020/odx-angular-components-area-header.mjs +16 -15
  441. package/fesm2020/odx-angular-components-area-header.mjs.map +1 -1
  442. package/fesm2020/odx-angular-components-avatar.mjs +18 -7
  443. package/fesm2020/odx-angular-components-avatar.mjs.map +1 -1
  444. package/fesm2020/odx-angular-components-badge.mjs +60 -90
  445. package/fesm2020/odx-angular-components-badge.mjs.map +1 -1
  446. package/fesm2020/odx-angular-components-bar.mjs +15 -16
  447. package/fesm2020/odx-angular-components-bar.mjs.map +1 -1
  448. package/fesm2020/odx-angular-components-breadcrumbs.mjs +3 -3
  449. package/fesm2020/odx-angular-components-button-group.mjs +3 -3
  450. package/fesm2020/odx-angular-components-button.mjs +31 -11
  451. package/fesm2020/odx-angular-components-button.mjs.map +1 -1
  452. package/fesm2020/odx-angular-components-card.mjs +173 -0
  453. package/fesm2020/odx-angular-components-card.mjs.map +1 -0
  454. package/fesm2020/odx-angular-components-checkbox.mjs +11 -11
  455. package/fesm2020/odx-angular-components-checkbox.mjs.map +1 -1
  456. package/fesm2020/odx-angular-components-chip.mjs +4 -4
  457. package/fesm2020/odx-angular-components-chip.mjs.map +1 -1
  458. package/fesm2020/odx-angular-components-circular-progress.mjs +7 -5
  459. package/fesm2020/odx-angular-components-circular-progress.mjs.map +1 -1
  460. package/fesm2020/odx-angular-components-content-box.mjs +13 -13
  461. package/fesm2020/odx-angular-components-content-box.mjs.map +1 -1
  462. package/fesm2020/odx-angular-components-dropdown.mjs +18 -14
  463. package/fesm2020/odx-angular-components-dropdown.mjs.map +1 -1
  464. package/fesm2020/odx-angular-components-form-field.mjs +79 -64
  465. package/fesm2020/odx-angular-components-form-field.mjs.map +1 -1
  466. package/fesm2020/odx-angular-components-header.mjs +23 -17
  467. package/fesm2020/odx-angular-components-header.mjs.map +1 -1
  468. package/fesm2020/odx-angular-components-icon.mjs +16 -22
  469. package/fesm2020/odx-angular-components-icon.mjs.map +1 -1
  470. package/fesm2020/odx-angular-components-inline-message.mjs +7 -8
  471. package/fesm2020/odx-angular-components-inline-message.mjs.map +1 -1
  472. package/fesm2020/odx-angular-components-link.mjs +3 -3
  473. package/fesm2020/odx-angular-components-list.mjs +69 -20
  474. package/fesm2020/odx-angular-components-list.mjs.map +1 -1
  475. package/fesm2020/odx-angular-components-loading-spinner.mjs +20 -13
  476. package/fesm2020/odx-angular-components-loading-spinner.mjs.map +1 -1
  477. package/fesm2020/odx-angular-components-logo.mjs +7 -5
  478. package/fesm2020/odx-angular-components-logo.mjs.map +1 -1
  479. package/fesm2020/odx-angular-components-main-menu.mjs +56 -49
  480. package/fesm2020/odx-angular-components-main-menu.mjs.map +1 -1
  481. package/fesm2020/odx-angular-components-mainfilter-group.mjs +27 -0
  482. package/fesm2020/odx-angular-components-mainfilter-group.mjs.map +1 -0
  483. package/fesm2020/odx-angular-components-menu.mjs +41 -24
  484. package/fesm2020/odx-angular-components-menu.mjs.map +1 -1
  485. package/fesm2020/odx-angular-components-modal.mjs +90 -116
  486. package/fesm2020/odx-angular-components-modal.mjs.map +1 -1
  487. package/fesm2020/odx-angular-components-navigation-back.mjs +28 -0
  488. package/fesm2020/odx-angular-components-navigation-back.mjs.map +1 -0
  489. package/fesm2020/odx-angular-components-progress.mjs +3 -3
  490. package/fesm2020/odx-angular-components-radio-group.mjs +13 -13
  491. package/fesm2020/odx-angular-components-radio-group.mjs.map +1 -1
  492. package/fesm2020/odx-angular-components-rail-navigation.mjs +11 -11
  493. package/fesm2020/odx-angular-components-rail-navigation.mjs.map +1 -1
  494. package/fesm2020/odx-angular-components-select.mjs +126 -62
  495. package/fesm2020/odx-angular-components-select.mjs.map +1 -1
  496. package/fesm2020/odx-angular-components-slider.mjs +3 -3
  497. package/fesm2020/odx-angular-components-spinbox.mjs +7 -7
  498. package/fesm2020/odx-angular-components-spinbox.mjs.map +1 -1
  499. package/fesm2020/odx-angular-components-switch.mjs +11 -11
  500. package/fesm2020/odx-angular-components-switch.mjs.map +1 -1
  501. package/fesm2020/odx-angular-components-tab-bar.mjs +24 -16
  502. package/fesm2020/odx-angular-components-tab-bar.mjs.map +1 -1
  503. package/fesm2020/odx-angular-components-toast.mjs +23 -29
  504. package/fesm2020/odx-angular-components-toast.mjs.map +1 -1
  505. package/fesm2020/odx-angular-components-toggle-button-group.mjs +37 -20
  506. package/fesm2020/odx-angular-components-toggle-button-group.mjs.map +1 -1
  507. package/fesm2020/odx-angular-components-tooltip.mjs +13 -14
  508. package/fesm2020/odx-angular-components-tooltip.mjs.map +1 -1
  509. package/fesm2020/odx-angular-internal.mjs +67 -51
  510. package/fesm2020/odx-angular-internal.mjs.map +1 -1
  511. package/fesm2020/odx-angular-theming.mjs +96 -0
  512. package/fesm2020/odx-angular-theming.mjs.map +1 -0
  513. package/fesm2020/odx-angular-utils.mjs +115 -27
  514. package/fesm2020/odx-angular-utils.mjs.map +1 -1
  515. package/fesm2020/odx-angular.mjs +142 -103
  516. package/fesm2020/odx-angular.mjs.map +1 -1
  517. package/internal/decorators/css-component.d.ts +1 -2
  518. package/internal/decorators/css-modifier.d.ts +0 -1
  519. package/internal/helpers/decorator-property-name.d.ts +1 -0
  520. package/internal/helpers/deepmerge.d.ts +10 -0
  521. package/internal/helpers/index.d.ts +2 -0
  522. package/internal/helpers/with-mutiple-descriptors.d.ts +1 -1
  523. package/lib/controllers/disabled.controller.d.ts +5 -2
  524. package/lib/controllers/readonly.controller.d.ts +1 -0
  525. package/lib/core.module.d.ts +3 -3
  526. package/lib/directives/click-outside.directive.d.ts +5 -4
  527. package/lib/directives/delegate-focus.directive.d.ts +11 -0
  528. package/lib/directives/index.d.ts +1 -1
  529. package/lib/services/window-ref.d.ts +3 -0
  530. package/lib/tokens/identity-matcher.d.ts +1 -1
  531. package/lib/tokens/string-search-handler.d.ts +1 -1
  532. package/lib/tokens/stringify.d.ts +1 -1
  533. package/package.json +37 -11
  534. package/theming/README.md +3 -0
  535. package/theming/index.d.ts +4 -0
  536. package/theming/lib/helpers/index.d.ts +3 -0
  537. package/theming/lib/helpers/prefers-dark-theme.d.ts +1 -0
  538. package/theming/lib/helpers/resolve-theme.d.ts +2 -0
  539. package/theming/lib/helpers/theme-storage.d.ts +4 -0
  540. package/theming/lib/models/index.d.ts +1 -0
  541. package/theming/lib/models/theme.d.ts +6 -0
  542. package/theming/lib/theming.config.d.ts +10 -0
  543. package/theming/lib/theming.service.d.ts +16 -0
  544. package/utils/lib/decorators/transform.d.ts +2 -2
  545. package/utils/lib/helpers/build-url.d.ts +1 -0
  546. package/utils/lib/helpers/get-axis.d.ts +2 -0
  547. package/utils/lib/helpers/get-opposite-side.d.ts +2 -0
  548. package/utils/lib/helpers/get-side.d.ts +2 -0
  549. package/utils/lib/helpers/index.d.ts +5 -1
  550. package/utils/lib/helpers/ng-changes.d.ts +1 -1
  551. package/utils/lib/helpers/provide-config.d.ts +12 -0
  552. package/utils/lib/helpers/queue.d.ts +13 -2
  553. package/utils/lib/types/axis.d.ts +5 -0
  554. package/utils/lib/types/get-properties.d.ts +2 -2
  555. package/utils/lib/types/index.d.ts +3 -0
  556. package/utils/lib/types/position.d.ts +15 -0
  557. package/utils/lib/types/side.d.ts +7 -0
  558. package/cdk/connected-overlay/lib/helpers/get-opposite-overlay-side.d.ts +0 -2
  559. package/cdk/connected-overlay/lib/helpers/get-overlay-side.d.ts +0 -2
  560. package/components/badge/lib/badge.config.d.ts +0 -3
  561. package/components/badge/lib/facade/badge-host.d.ts +0 -3
  562. package/components/badge/lib/facade/index.d.ts +0 -1
  563. package/components/badge/lib/models/badge-position.d.ts +0 -5
  564. package/components/launch-tile/README.md +0 -3
  565. package/components/launch-tile/index.d.ts +0 -3
  566. package/components/launch-tile/lib/components/index.d.ts +0 -2
  567. package/components/launch-tile/lib/components/launch-tile-footer/launch-tile-footer.component.d.ts +0 -5
  568. package/components/launch-tile/lib/components/launch-tile-subtitle/launch-tile-subtitle.component.d.ts +0 -5
  569. package/components/launch-tile/lib/launch-tile.component.d.ts +0 -13
  570. package/components/launch-tile/lib/launch-tile.module.d.ts +0 -14
  571. package/components/modal/lib/services/index.d.ts +0 -1
  572. package/components/modal/lib/services/open-modal-manager.service.d.ts +0 -15
  573. package/esm2020/cdk/connected-overlay/lib/helpers/get-opposite-overlay-side.mjs +0 -13
  574. package/esm2020/cdk/connected-overlay/lib/helpers/get-overlay-side.mjs +0 -4
  575. package/esm2020/components/badge/lib/badge.config.mjs +0 -3
  576. package/esm2020/components/badge/lib/facade/badge-host.mjs +0 -2
  577. package/esm2020/components/badge/lib/facade/index.mjs +0 -2
  578. package/esm2020/components/badge/lib/models/badge-position.mjs +0 -5
  579. package/esm2020/components/launch-tile/index.mjs +0 -4
  580. package/esm2020/components/launch-tile/lib/components/index.mjs +0 -3
  581. package/esm2020/components/launch-tile/lib/components/launch-tile-footer/launch-tile-footer.component.mjs +0 -13
  582. package/esm2020/components/launch-tile/lib/components/launch-tile-subtitle/launch-tile-subtitle.component.mjs +0 -13
  583. package/esm2020/components/launch-tile/lib/launch-tile.component.mjs +0 -51
  584. package/esm2020/components/launch-tile/lib/launch-tile.module.mjs +0 -23
  585. package/esm2020/components/launch-tile/odx-angular-components-launch-tile.mjs +0 -5
  586. package/esm2020/components/modal/lib/services/index.mjs +0 -2
  587. package/esm2020/components/modal/lib/services/open-modal-manager.service.mjs +0 -42
  588. package/esm2020/lib/directives/let.directive.mjs +0 -36
  589. package/esm2020/utils/lib/helpers/provide-module-config.mjs +0 -21
  590. package/fesm2015/odx-angular-components-launch-tile.mjs +0 -95
  591. package/fesm2015/odx-angular-components-launch-tile.mjs.map +0 -1
  592. package/fesm2020/odx-angular-components-launch-tile.mjs +0 -94
  593. package/fesm2020/odx-angular-components-launch-tile.mjs.map +0 -1
  594. package/lib/directives/let.directive.d.ts +0 -17
  595. package/utils/lib/helpers/provide-module-config.d.ts +0 -12
  596. /package/components/content-box/lib/directives/{content-box-footer-directive.d.ts → content-box-footer.directive.d.ts} +0 -0
  597. /package/components/content-box/lib/directives/{content-box-header-directive.d.ts → content-box-header.directive.d.ts} +0 -0
@@ -1,27 +1,4 @@
1
- const CSS_COMPONENT_NAME = Symbol('__CSSComponentName__');
2
- const CSS_COMPONENT_MODIFIERS = Symbol('__CSSComponentModifiers__');
3
- /** @internal */
4
- /* istanbul ignore next */
5
- function CSSComponent(name, prefix = 'odx') {
6
- return (target) => {
7
- const cssClass = `${prefix}-${name}`;
8
- Object.defineProperty(target.prototype, CSS_COMPONENT_NAME, {
9
- value: cssClass,
10
- });
11
- (function (ngOnInit) {
12
- target.prototype.ngOnInit = function () {
13
- var _a;
14
- this.element.nativeElement.classList.add(cssClass);
15
- ngOnInit === null || ngOnInit === void 0 ? void 0 : ngOnInit.call(this);
16
- if (Array.isArray(this[CSS_COMPONENT_MODIFIERS])) {
17
- for (const property of this[CSS_COMPONENT_MODIFIERS]) {
18
- (_a = this[property]) !== null && _a !== void 0 ? _a : (this[property] = null);
19
- }
20
- }
21
- };
22
- })(target.prototype.ngOnInit);
23
- };
24
- }
1
+ import { deepmergeCustom } from 'deepmerge-ts';
25
2
 
26
3
  /** @internal */
27
4
  /* istanbul ignore next */
@@ -35,6 +12,15 @@ function camelToKebabCase(value) {
35
12
  return value;
36
13
  }
37
14
 
15
+ function decoratorPropertyName(decoratorName, propertyName) {
16
+ return `__ODX_${decoratorName}_${propertyName}__`;
17
+ }
18
+
19
+ const deepmerge = deepmergeCustom({
20
+ mergeArrays: false,
21
+ mergeSets: false,
22
+ });
23
+
38
24
  /* istanbul ignore next */
39
25
  function isSameDomain(styleSheet) {
40
26
  if (!styleSheet.href) {
@@ -73,15 +59,17 @@ function getEnumValues(e) {
73
59
  /* eslint-disable @typescript-eslint/no-explicit-any */
74
60
  /** @internal */
75
61
  /* istanbul ignore next */
76
- function ɵwithMultipleDescriptors(target, key, symbol) {
77
- var _c, _d;
62
+ function ɵwithMultipleDescriptors(target, key, propertySymbol) {
78
63
  var _a, _b;
79
- const setters = ((_c = target[_a = `__propSetters__${target.constructor}__${key.toString()}`]) !== null && _c !== void 0 ? _c : (target[_a] = []));
80
- const getters = ((_d = target[_b = `__propGetters__${target.constructor}__${key.toString()}`]) !== null && _d !== void 0 ? _d : (target[_b] = []));
81
- const propertyValue = `__propValue_${String(key)}__`;
64
+ const keyName = key.toString();
65
+ const settersProperty = decoratorPropertyName('MultipleDescriptors', `setters_${target.constructor.name}_${keyName}`);
66
+ const gettersProperty = decoratorPropertyName('MultipleDescriptors', `getters_${target.constructor.name}_${keyName}`);
67
+ const valueProperty = decoratorPropertyName('MultipleDescriptors', `value_${keyName}`);
68
+ const setters = ((_a = target[settersProperty]) !== null && _a !== void 0 ? _a : (target[settersProperty] = []));
69
+ const getters = ((_b = target[gettersProperty]) !== null && _b !== void 0 ? _b : (target[gettersProperty] = []));
82
70
  return {
83
71
  addSetter(fn) {
84
- setters.push({ fn, propertySymbol: symbol });
72
+ setters.push({ fn, propertySymbol });
85
73
  },
86
74
  addGetter(fn) {
87
75
  getters.push({ fn });
@@ -89,17 +77,23 @@ function ɵwithMultipleDescriptors(target, key, symbol) {
89
77
  init() {
90
78
  Object.defineProperty(target, key, {
91
79
  set(value) {
92
- this[propertyValue] = setters.reduce((result, { fn, propertySymbol }) => {
93
- fn.call(this, result);
94
- return this[propertySymbol];
95
- }, value);
80
+ let currentValue = value;
81
+ for (const { fn, propertySymbol } of setters) {
82
+ fn.call(this, currentValue);
83
+ currentValue = this[propertySymbol];
84
+ }
85
+ this[valueProperty] = currentValue;
96
86
  },
97
87
  get() {
98
88
  if (Array.isArray(getters)) {
99
- return getters.reduce((_, { fn }) => fn.call(this), this[propertyValue]);
89
+ let currentValue = this[valueProperty];
90
+ for (const { fn } of getters) {
91
+ currentValue = fn.call(this);
92
+ }
93
+ return currentValue;
100
94
  }
101
95
  else {
102
- return this[propertyValue];
96
+ return this[valueProperty];
103
97
  }
104
98
  },
105
99
  configurable: true,
@@ -108,42 +102,64 @@ function ɵwithMultipleDescriptors(target, key, symbol) {
108
102
  };
109
103
  }
110
104
 
105
+ const CSS_COMPONENT_NAME = decoratorPropertyName('CSSComponent', 'name');
106
+ /** @internal */
107
+ /* istanbul ignore next */
108
+ function CSSComponent(name, prefix = 'odx') {
109
+ return (target) => {
110
+ const cssClass = `${prefix}-${name}`;
111
+ Object.defineProperty(target.prototype, CSS_COMPONENT_NAME, {
112
+ value: cssClass,
113
+ });
114
+ (function (ngOnInit) {
115
+ target.prototype.ngOnInit = function () {
116
+ this.element.nativeElement.classList.add(cssClass);
117
+ ngOnInit === null || ngOnInit === void 0 ? void 0 : ngOnInit.call(this);
118
+ };
119
+ })(target.prototype.ngOnInit);
120
+ };
121
+ }
122
+
111
123
  /* eslint-disable @typescript-eslint/no-explicit-any */
112
124
  /** @internal */
113
125
  /* istanbul ignore next */
114
126
  function CSSModifier(options) {
115
127
  return (target, propertyKey) => {
116
- const propertySymbol = Symbol(`__CSSModifier{${propertyKey.toString()}}__`);
128
+ const propertyKeyName = propertyKey.toString();
129
+ const propertyKeyKebabCase = camelToKebabCase(propertyKeyName);
130
+ const propertySymbol = decoratorPropertyName('CSSModifier', propertyKeyName);
131
+ const propertyDefaultValue = decoratorPropertyName('CSSModifier', `${propertyKeyName}_default`);
117
132
  const descriptors = ɵwithMultipleDescriptors(target, propertyKey, propertySymbol);
118
- const propertyKeyKebabCase = camelToKebabCase(propertyKey.toString());
119
133
  function createModifierClass(value) {
120
- var _a, _b;
121
- value = (_a = value !== null && value !== void 0 ? value : options === null || options === void 0 ? void 0 : options.default) !== null && _a !== void 0 ? _a : null;
134
+ var _a;
122
135
  if (typeof value === 'boolean' || (typeof value === 'string' && value.length > 0)) {
123
136
  let modifier = typeof value === 'boolean' ? propertyKeyKebabCase : value;
124
137
  if (options === null || options === void 0 ? void 0 : options.withPrefix) {
125
- modifier = [propertyKey, modifier].join('-');
138
+ modifier = `${propertyKeyName}-${modifier}`;
126
139
  }
127
- return [((_b = options === null || options === void 0 ? void 0 : options.withComponentPrefix) !== null && _b !== void 0 ? _b : true) ? this[CSS_COMPONENT_NAME] : null, modifier].filter(Boolean).join('--');
140
+ if ((_a = options === null || options === void 0 ? void 0 : options.withComponentPrefix) !== null && _a !== void 0 ? _a : true) {
141
+ return `${this[CSS_COMPONENT_NAME]}--${modifier}`;
142
+ }
143
+ return modifier;
128
144
  }
129
145
  return null;
130
146
  }
131
- if (options === null || options === void 0 ? void 0 : options.default) {
132
- target[CSS_COMPONENT_MODIFIERS] = (target[CSS_COMPONENT_MODIFIERS] || []).concat(propertyKey);
133
- }
134
147
  function setter(value) {
148
+ var _a, _b, _c, _d, _e, _f;
135
149
  const values = (options === null || options === void 0 ? void 0 : options.isArray) ? value : [value];
136
- this[propertySymbol] = this[propertySymbol] || [];
150
+ (_a = this[propertySymbol]) !== null && _a !== void 0 ? _a : (this[propertySymbol] = []);
151
+ (_b = this[propertyDefaultValue]) !== null && _b !== void 0 ? _b : (this[propertyDefaultValue] = values);
137
152
  for (let i = 0; i < values.length; ++i) {
138
- const currentValue = values[i];
139
- if (this[propertySymbol].length < 1 || currentValue !== this[propertySymbol][i]) {
140
- const currentModifierClass = createModifierClass.apply(this, [this[propertySymbol][i]]);
153
+ const nextValue = (_e = (_c = values[i]) !== null && _c !== void 0 ? _c : (_d = this[propertyDefaultValue]) === null || _d === void 0 ? void 0 : _d[i]) !== null && _e !== void 0 ? _e : null;
154
+ const currentValue = (_f = this[propertySymbol][i]) !== null && _f !== void 0 ? _f : null;
155
+ if (this[propertySymbol].length < 1 || nextValue !== currentValue) {
156
+ const currentModifierClass = createModifierClass.apply(this, [currentValue]);
141
157
  if (currentModifierClass !== null) {
142
158
  this.element.nativeElement.classList.remove(currentModifierClass);
143
159
  }
144
- this[propertySymbol][i] = currentValue;
145
- const newModifierClass = createModifierClass.apply(this, [this[propertySymbol][i]]);
146
- if (newModifierClass !== null && (typeof currentValue === 'boolean' ? currentValue : true)) {
160
+ this[propertySymbol][i] = nextValue;
161
+ const newModifierClass = createModifierClass.apply(this, [nextValue]);
162
+ if (newModifierClass !== null && (typeof nextValue === 'boolean' ? nextValue : true)) {
147
163
  this.element.nativeElement.classList.add(newModifierClass);
148
164
  }
149
165
  }
@@ -163,5 +179,5 @@ function CSSModifier(options) {
163
179
  * Generated bundle index. Do not edit.
164
180
  */
165
181
 
166
- export { CSSComponent, CSSModifier, CSS_COMPONENT_MODIFIERS, CSS_COMPONENT_NAME, camelToKebabCase, getCSSVariables, getEnumValues, ɵwithMultipleDescriptors };
182
+ export { CSSComponent, CSSModifier, CSS_COMPONENT_NAME, camelToKebabCase, decoratorPropertyName, deepmerge, getCSSVariables, getEnumValues, ɵwithMultipleDescriptors };
167
183
  //# sourceMappingURL=odx-angular-internal.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-internal.mjs","sources":["../../../../libs/angular/internal/src/decorators/css-component.ts","../../../../libs/angular/internal/src/helpers/camel-to-kebab-case.ts","../../../../libs/angular/internal/src/helpers/get-css-variables.ts","../../../../libs/angular/internal/src/helpers/get-enum-values.ts","../../../../libs/angular/internal/src/helpers/with-mutiple-descriptors.ts","../../../../libs/angular/internal/src/decorators/css-modifier.ts","../../../../libs/angular/internal/src/odx-angular-internal.ts"],"sourcesContent":["import { ElementRef, Type } from '@angular/core';\n\nexport const CSS_COMPONENT_NAME = Symbol('__CSSComponentName__');\n\nexport const CSS_COMPONENT_MODIFIERS = Symbol('__CSSComponentModifiers__');\n\n/** @internal */\nexport interface CSSComponent {\n readonly element: ElementRef<unknown>;\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 () {\n this.element.nativeElement.classList.add(cssClass);\n ngOnInit?.call(this);\n\n if (Array.isArray(this[CSS_COMPONENT_MODIFIERS])) {\n for (const property of this[CSS_COMPONENT_MODIFIERS]) {\n this[property] ??= null;\n }\n }\n };\n })(target.prototype.ngOnInit);\n };\n}\n","/** @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","/* eslint-disable @typescript-eslint/no-explicit-any */\ninterface ColorDefinition {\n name: string;\n variableName: string;\n value: string;\n}\n\n/* istanbul ignore next */\nfunction isSameDomain(styleSheet: StyleSheet): boolean {\n if (!styleSheet.href) {\n return true;\n }\n\n return styleSheet.href.indexOf(window.location.origin) === 0;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function getCSSVariables(filter: RegExp): ColorDefinition[] {\n const stylesheets = Array.from(document.styleSheets).filter(isSameDomain);\n return stylesheets.reduce<any[]>((variables, { cssRules }) => {\n for (const { style, type } of Array.from(cssRules) as any[]) {\n if (type === 1) {\n for (const prop of Array.from(style ?? []) as string[]) {\n const name = prop.trim();\n if (name.startsWith('--') && filter.test(name)) {\n variables.push({\n name: name,\n value: style.getPropertyValue(prop).trim(),\n });\n }\n }\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","/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/** @internal */\ninterface DescriptiorManager {\n addGetter: (value: any) => void;\n addSetter: (value: any) => void;\n init: () => void;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function ɵwithMultipleDescriptors(target: any, key: PropertyKey, symbol: symbol): DescriptiorManager {\n const setters = (target[`__propSetters__${target.constructor}__${key.toString()}`] ??= []);\n const getters = (target[`__propGetters__${target.constructor}__${key.toString()}`] ??= []);\n const propertyValue = `__propValue_${String(key)}__`;\n return {\n addSetter(fn: (this: any, value: any) => void) {\n setters.push({ fn, propertySymbol: symbol });\n },\n addGetter(fn: (this: any, value: any) => void) {\n getters.push({ fn });\n },\n init() {\n Object.defineProperty(target, key, {\n set(value) {\n this[propertyValue] = setters.reduce((result: any, { fn, propertySymbol }: any) => {\n fn.call(this, result);\n return this[propertySymbol];\n }, value);\n },\n get() {\n if (Array.isArray(getters)) {\n return getters.reduce((_: any, { fn }: any) => fn.call(this), this[propertyValue]);\n } else {\n return this[propertyValue];\n }\n },\n configurable: true,\n });\n },\n };\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { camelToKebabCase, ɵwithMultipleDescriptors } from '../helpers';\nimport { CSS_COMPONENT_MODIFIERS, CSS_COMPONENT_NAME } from './css-component';\n\n/** @internal */\ninterface CSSModifierOptions {\n isArray?: boolean;\n withComponentPrefix?: boolean;\n default?: string;\n withPrefix?: boolean;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function CSSModifier(options?: CSSModifierOptions) {\n return (target: any, propertyKey: PropertyKey) => {\n const propertySymbol = Symbol(`__CSSModifier{${propertyKey.toString()}}__`);\n const descriptors = ɵwithMultipleDescriptors(target, propertyKey, propertySymbol);\n const propertyKeyKebabCase = camelToKebabCase(propertyKey.toString());\n\n function createModifierClass(this: any, value: any) {\n value = value ?? options?.default ?? null;\n\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 = [propertyKey, modifier].join('-');\n }\n return [options?.withComponentPrefix ?? true ? this[CSS_COMPONENT_NAME] : null, modifier].filter(Boolean).join('--');\n }\n return null;\n }\n\n if (options?.default) {\n target[CSS_COMPONENT_MODIFIERS] = (target[CSS_COMPONENT_MODIFIERS] || []).concat(propertyKey);\n }\n\n function setter(this: any, value: any) {\n const values = options?.isArray ? value : [value];\n this[propertySymbol] = this[propertySymbol] || [];\n for (let i = 0; i < values.length; ++i) {\n const currentValue = values[i];\n if (this[propertySymbol].length < 1 || currentValue !== this[propertySymbol][i]) {\n const currentModifierClass = createModifierClass.apply(this, [this[propertySymbol][i]]);\n if (currentModifierClass !== null) {\n this.element.nativeElement.classList.remove(currentModifierClass);\n }\n this[propertySymbol][i] = currentValue;\n const newModifierClass = createModifierClass.apply(this, [this[propertySymbol][i]]);\n if (newModifierClass !== null && (typeof currentValue === 'boolean' ? currentValue : true)) {\n this.element.nativeElement.classList.add(newModifierClass);\n }\n }\n }\n }\n\n function getter(this: any) {\n return options?.isArray ? this[propertySymbol] : this[propertySymbol]?.[0];\n }\n\n descriptors.addSetter(setter);\n descriptors.addGetter(getter);\n descriptors.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GAAG,YAAY,CAAC;AACvC,oBAAA,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,oBAAA,IAAI,gBAAgB,KAAK,IAAI,KAAK,OAAO,YAAY,KAAK,SAAS,GAAG,YAAY,GAAG,IAAI,CAAC,EAAE;wBAC1F,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAC5D,qBAAA;AACF,iBAAA;AACF,aAAA;SACF;AAED,QAAA,SAAS,MAAM,GAAA;;YACb,OAAO,CAAA,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAP,OAAO,CAAE,OAAO,IAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAA,EAAA,GAAA,IAAI,CAAC,cAAc,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,CAAC,CAAC,CAAC;SAC5E;AAED,QAAA,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAC9B,QAAA,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC9B,WAAW,CAAC,IAAI,EAAE,CAAC;AACrB,KAAC,CAAC;AACJ;;AChEA;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-internal.mjs","sources":["../../../../libs/angular/internal/src/helpers/camel-to-kebab-case.ts","../../../../libs/angular/internal/src/helpers/decorator-property-name.ts","../../../../libs/angular/internal/src/helpers/deepmerge.ts","../../../../libs/angular/internal/src/helpers/get-css-variables.ts","../../../../libs/angular/internal/src/helpers/get-enum-values.ts","../../../../libs/angular/internal/src/helpers/with-mutiple-descriptors.ts","../../../../libs/angular/internal/src/decorators/css-component.ts","../../../../libs/angular/internal/src/decorators/css-modifier.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","/* eslint-disable @typescript-eslint/no-explicit-any */\ninterface ColorDefinition {\n name: string;\n variableName: string;\n value: string;\n}\n\n/* istanbul ignore next */\nfunction isSameDomain(styleSheet: StyleSheet): boolean {\n if (!styleSheet.href) {\n return true;\n }\n\n return styleSheet.href.indexOf(window.location.origin) === 0;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function getCSSVariables(filter: RegExp): ColorDefinition[] {\n const stylesheets = Array.from(document.styleSheets).filter(isSameDomain);\n return stylesheets.reduce<any[]>((variables, { cssRules }) => {\n for (const { style, type } of Array.from(cssRules) as any[]) {\n if (type === 1) {\n for (const prop of Array.from(style ?? []) as string[]) {\n const name = prop.trim();\n if (name.startsWith('--') && filter.test(name)) {\n variables.push({\n name: name,\n value: style.getPropertyValue(prop).trim(),\n });\n }\n }\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","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { decoratorPropertyName } from './decorator-property-name';\n\n/** @internal */\ninterface DescriptiorManager {\n addGetter: (value: any) => void;\n addSetter: (value: any) => void;\n init: () => void;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function ɵwithMultipleDescriptors(target: any, key: PropertyKey, propertySymbol: string): DescriptiorManager {\n const keyName = key.toString();\n const settersProperty = decoratorPropertyName('MultipleDescriptors', `setters_${target.constructor.name}_${keyName}`);\n const gettersProperty = decoratorPropertyName('MultipleDescriptors', `getters_${target.constructor.name}_${keyName}`);\n const valueProperty = decoratorPropertyName('MultipleDescriptors', `value_${keyName}`);\n const setters = (target[settersProperty] ??= []);\n const getters = (target[gettersProperty] ??= []);\n return {\n addSetter(fn: (this: any, value: any) => void) {\n setters.push({ fn, propertySymbol });\n },\n addGetter(fn: (this: any, value: any) => void) {\n getters.push({ fn });\n },\n init() {\n Object.defineProperty(target, key, {\n set(value) {\n let currentValue = value;\n for (const { fn, propertySymbol } of setters) {\n fn.call(this, currentValue);\n currentValue = this[propertySymbol];\n }\n this[valueProperty] = currentValue;\n },\n get() {\n if (Array.isArray(getters)) {\n let currentValue = this[valueProperty];\n for (const { fn } of getters) {\n currentValue = fn.call(this);\n }\n return currentValue;\n } else {\n return this[valueProperty];\n }\n },\n configurable: true,\n });\n },\n };\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<unknown>;\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 () {\n this.element.nativeElement.classList.add(cssClass);\n ngOnInit?.call(this);\n };\n })(target.prototype.ngOnInit);\n };\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { camelToKebabCase, decoratorPropertyName, ɵwithMultipleDescriptors } from '../helpers';\nimport { CSS_COMPONENT_NAME } from './css-component';\n\n/** @internal */\ninterface CSSModifierOptions {\n isArray?: boolean;\n withComponentPrefix?: boolean;\n withPrefix?: boolean;\n}\n\n/** @internal */\n/* istanbul ignore next */\nexport function CSSModifier(options?: CSSModifierOptions) {\n return (target: any, 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 const descriptors = ɵwithMultipleDescriptors(target, propertyKey, propertySymbol);\n\n function createModifierClass(this: any, value: any) {\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 setter(this: any, value: any) {\n const values = options?.isArray ? value : [value];\n this[propertySymbol] ??= [];\n this[propertyDefaultValue] ??= values;\n for (let i = 0; i < values.length; ++i) {\n const nextValue = values[i] ?? this[propertyDefaultValue]?.[i] ?? null;\n const currentValue = this[propertySymbol][i] ?? null;\n if (this[propertySymbol].length < 1 || nextValue !== currentValue) {\n const currentModifierClass = createModifierClass.apply(this, [currentValue]);\n if (currentModifierClass !== null) {\n this.element.nativeElement.classList.remove(currentModifierClass);\n }\n this[propertySymbol][i] = nextValue;\n const newModifierClass = createModifierClass.apply(this, [nextValue]);\n if (newModifierClass !== null && (typeof nextValue === 'boolean' ? nextValue : true)) {\n this.element.nativeElement.classList.add(newModifierClass);\n }\n }\n }\n }\n\n function getter(this: any) {\n return options?.isArray ? this[propertySymbol] : this[propertySymbol]?.[0];\n }\n\n descriptors.addSetter(setter);\n descriptors.addGetter(getter);\n descriptors.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MAAM,CAAC,CAAC;QAC9B,WAAW,CAAC,IAAI,EAAE,CAAC;AACrB,KAAC,CAAC;AACJ;;AChEA;;AAEG;;;;"}
@@ -0,0 +1,99 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Injectable, makeEnvironmentProviders, ENVIRONMENT_INITIALIZER } from '@angular/core';
3
+ import { createConfigTokens } from '@odx/angular/utils';
4
+ import { DOCUMENT } from '@angular/common';
5
+ import { WindowRef } from '@odx/angular';
6
+ import { BehaviorSubject, distinctUntilChanged, shareReplay } from 'rxjs';
7
+
8
+ function prefersDarkTheme(view) {
9
+ var _a, _b;
10
+ return !!((_b = (_a = view.matchMedia) === null || _a === void 0 ? void 0 : _a.call(view, '(prefers-color-scheme: dark)')) === null || _b === void 0 ? void 0 : _b.matches);
11
+ }
12
+
13
+ const Theme = {
14
+ DARK: 'dark',
15
+ LIGHT: 'light',
16
+ };
17
+ const availableThemes = Object.values(Theme);
18
+
19
+ function resolveTheme(theme) {
20
+ var _a;
21
+ return (_a = availableThemes.find((t) => t === theme)) !== null && _a !== void 0 ? _a : null;
22
+ }
23
+
24
+ const THEME_STORAGE_NAME = '@odx/angular/theming:SelectedTheme';
25
+ function saveTheme(storage, theme) {
26
+ try {
27
+ storage === null || storage === void 0 ? void 0 : storage.setItem(THEME_STORAGE_NAME, theme);
28
+ }
29
+ catch (_a) {
30
+ //
31
+ }
32
+ }
33
+ function readTheme(storage) {
34
+ var _a;
35
+ try {
36
+ return (_a = resolveTheme(storage === null || storage === void 0 ? void 0 : storage.getItem(THEME_STORAGE_NAME))) !== null && _a !== void 0 ? _a : null;
37
+ }
38
+ catch (_b) {
39
+ return null;
40
+ }
41
+ }
42
+
43
+ const THEME_ATTRIBUTE_NAME = 'odxTheme';
44
+ class ThemingService {
45
+ constructor() {
46
+ this.config = injectThemingConfig();
47
+ this.document = inject(DOCUMENT);
48
+ this.windowRef = inject(WindowRef);
49
+ this.theme$$ = new BehaviorSubject(this.getInitialTheme());
50
+ this.theme$ = this.theme$$.pipe(distinctUntilChanged(), shareReplay({ refCount: true }));
51
+ this.theme$.subscribe((theme) => {
52
+ this.document.body.setAttribute(THEME_ATTRIBUTE_NAME, theme);
53
+ saveTheme(this.config.storage, theme);
54
+ });
55
+ }
56
+ selectTheme(theme) {
57
+ this.theme$$.next(theme);
58
+ }
59
+ getSelectedTheme() {
60
+ return this.theme$$.getValue();
61
+ }
62
+ getInitialTheme() {
63
+ let selectedTheme = readTheme(this.config.storage);
64
+ if (!selectedTheme && this.config.autoDetect && prefersDarkTheme(this.windowRef.nativeWindow)) {
65
+ selectedTheme = Theme.DARK;
66
+ }
67
+ return selectedTheme !== null && selectedTheme !== void 0 ? selectedTheme : this.config.defaultTheme;
68
+ }
69
+ }
70
+ ThemingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ThemingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
71
+ ThemingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ThemingService, providedIn: 'root' });
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ThemingService, decorators: [{
73
+ type: Injectable,
74
+ args: [{ providedIn: 'root' }]
75
+ }], ctorParameters: function () { return []; } });
76
+
77
+ const { ThemingConfig, injectThemingConfig, provideThemingConfig } = createConfigTokens('Theming', '@odx/angular/theme', {
78
+ autoDetect: false,
79
+ defaultTheme: Theme.LIGHT,
80
+ storage: null,
81
+ });
82
+ function provideTheming(config) {
83
+ return makeEnvironmentProviders([
84
+ provideThemingConfig(config),
85
+ {
86
+ provide: ENVIRONMENT_INITIALIZER,
87
+ useFactory: () => () => inject(ThemingService),
88
+ deps: [ThemingConfig],
89
+ multi: true,
90
+ },
91
+ ]);
92
+ }
93
+
94
+ /**
95
+ * Generated bundle index. Do not edit.
96
+ */
97
+
98
+ export { THEME_ATTRIBUTE_NAME, THEME_STORAGE_NAME, Theme, ThemingConfig, ThemingService, availableThemes, injectThemingConfig, prefersDarkTheme, provideTheming, provideThemingConfig, readTheme, resolveTheme, saveTheme };
99
+ //# sourceMappingURL=odx-angular-theming.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"odx-angular-theming.mjs","sources":["../../../../libs/angular/theming/src/lib/helpers/prefers-dark-theme.ts","../../../../libs/angular/theming/src/lib/models/theme.ts","../../../../libs/angular/theming/src/lib/helpers/resolve-theme.ts","../../../../libs/angular/theming/src/lib/helpers/theme-storage.ts","../../../../libs/angular/theming/src/lib/theming.service.ts","../../../../libs/angular/theming/src/lib/theming.config.ts","../../../../libs/angular/theming/src/odx-angular-theming.ts"],"sourcesContent":["export function prefersDarkTheme(view: Window): boolean {\n return !!view.matchMedia?.('(prefers-color-scheme: dark)')?.matches;\n}\n","export type Theme = (typeof Theme)[keyof typeof Theme];\nexport const Theme = {\n DARK: 'dark',\n LIGHT: 'light',\n} as const;\n\nexport const availableThemes = Object.values(Theme);\n","import { availableThemes, Theme } from '../models';\n\nexport function resolveTheme(theme?: string | null): Theme | null {\n return availableThemes.find((t) => t === theme) ?? null;\n}\n","import { Theme } from '../models';\nimport { resolveTheme } from './resolve-theme';\n\nexport const THEME_STORAGE_NAME = '@odx/angular/theming:SelectedTheme';\n\nexport function saveTheme(storage: Storage | null | undefined, theme: Theme): void {\n try {\n storage?.setItem(THEME_STORAGE_NAME, theme);\n } catch {\n //\n }\n}\n\nexport function readTheme(storage?: Storage | null): Theme | null {\n try {\n return resolveTheme(storage?.getItem(THEME_STORAGE_NAME)) ?? null;\n } catch {\n return null;\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { inject, Injectable } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { BehaviorSubject, distinctUntilChanged, shareReplay } from 'rxjs';\nimport { prefersDarkTheme, readTheme, saveTheme } from './helpers';\nimport { Theme } from './models';\nimport { injectThemingConfig } from './theming.config';\n\nexport const THEME_ATTRIBUTE_NAME = 'odxTheme';\n\n@Injectable({ providedIn: 'root' })\nexport class ThemingService {\n private readonly config = injectThemingConfig();\n private readonly document = inject(DOCUMENT);\n private readonly windowRef = inject(WindowRef);\n private readonly theme$$ = new BehaviorSubject<Theme>(this.getInitialTheme());\n\n public readonly theme$ = this.theme$$.pipe(distinctUntilChanged(), shareReplay({ refCount: true }));\n\n constructor() {\n this.theme$.subscribe((theme) => {\n this.document.body.setAttribute(THEME_ATTRIBUTE_NAME, theme);\n saveTheme(this.config.storage, theme);\n });\n }\n\n public selectTheme(theme: Theme): void {\n this.theme$$.next(theme);\n }\n\n public getSelectedTheme(): Theme {\n return this.theme$$.getValue();\n }\n\n private getInitialTheme(): Theme {\n let selectedTheme = readTheme(this.config.storage);\n\n if (!selectedTheme && this.config.autoDetect && prefersDarkTheme(this.windowRef.nativeWindow)) {\n selectedTheme = Theme.DARK;\n }\n\n return selectedTheme ?? this.config.defaultTheme;\n }\n}\n","import { EnvironmentProviders, ENVIRONMENT_INITIALIZER, inject, makeEnvironmentProviders } from '@angular/core';\nimport { ConfigDependencies, ConfigProvider, createConfigTokens } from '@odx/angular/utils';\nimport { Theme } from './models';\nimport { ThemingService } from './theming.service';\n\nexport interface ThemingConfig {\n autoDetect: boolean;\n defaultTheme: Theme;\n storage?: Storage | null;\n}\n\nexport const { ThemingConfig, injectThemingConfig, provideThemingConfig } = createConfigTokens('Theming', '@odx/angular/theme', {\n autoDetect: false,\n defaultTheme: Theme.LIGHT,\n storage: null,\n} as ThemingConfig);\n\nexport function provideTheming<D extends ConfigDependencies = ConfigDependencies<ThemingConfig>>(\n config: ConfigProvider<Partial<ThemingConfig>, D>\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideThemingConfig(config),\n {\n provide: ENVIRONMENT_INITIALIZER,\n useFactory: () => () => inject(ThemingService),\n deps: [ThemingConfig],\n multi: true,\n },\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;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@odx/angular/internal';
1
+ import { decoratorPropertyName, ɵwithMultipleDescriptors, deepmerge } from '@odx/angular/internal';
2
2
  import * as i0 from '@angular/core';
3
3
  import { TemplateRef, inject, ChangeDetectorRef, Injector, ElementRef, Renderer2, Injectable, InjectionToken } from '@angular/core';
4
4
  import { Subject, takeUntil, tap, BehaviorSubject } from 'rxjs';
5
- import { deepmerge } from 'deepmerge-ts';
6
- import { __rest } from 'tslib';
7
5
  import { map, shareReplay } from 'rxjs/operators';
8
6
 
9
7
  function Pure(_target, propertyKey, { get, enumerable, value }) {
@@ -46,7 +44,7 @@ function Pure(_target, propertyKey, { get, enumerable, value }) {
46
44
  /* eslint-disable @typescript-eslint/no-explicit-any */
47
45
  function Transform(transformer) {
48
46
  return (target, propertyKey) => {
49
- const propertySymbol = Symbol(`__${propertyKey.toString()}ClassTmpl__`);
47
+ const propertySymbol = decoratorPropertyName('Transform', propertyKey.toString());
50
48
  const descriptors = ɵwithMultipleDescriptors(target, propertyKey, propertySymbol);
51
49
  function setter(value) {
52
50
  this[propertySymbol] = transformer.apply(this, [value]);
@@ -95,7 +93,7 @@ function booleanToOptionalAttributeString(state) {
95
93
  return state ? 'true' : null;
96
94
  }
97
95
  function px(value) {
98
- return isNumber(value) ? `${Math.round(value)}px` : '0px';
96
+ return isNumber(value) ? `${value}px` : '0px';
99
97
  }
100
98
  function cssTranslate(x, y) {
101
99
  return `translate3d(${x}, ${y}, 0)`;
@@ -180,6 +178,10 @@ function pluckFromArray(arr, key) {
180
178
  return arr.map((value) => value[key]);
181
179
  }
182
180
 
181
+ function buildUrl(...args) {
182
+ return args.join('/').replace(/(^.*)(https?:\/\/)|(\/)+/g, '$2$3');
183
+ }
184
+
183
185
  function deferFn(fn) {
184
186
  setTimeout(fn, 0);
185
187
  }
@@ -206,12 +208,68 @@ class EventManager {
206
208
  this.destroyListeners();
207
209
  }
208
210
  }
209
- EventManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: EventManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
210
- EventManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: EventManager });
211
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: EventManager, decorators: [{
211
+ EventManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EventManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
212
+ EventManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EventManager });
213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EventManager, decorators: [{
212
214
  type: Injectable
213
215
  }] });
214
216
 
217
+ const Axis = {
218
+ X: 'x',
219
+ Y: 'y',
220
+ };
221
+
222
+ const Position = {
223
+ TOP: 'top',
224
+ TOP_START: 'top-start',
225
+ TOP_END: 'top-end',
226
+ RIGHT: 'right',
227
+ RIGHT_START: 'right-start',
228
+ RIGHT_END: 'right-end',
229
+ BOTTOM: 'bottom',
230
+ BOTTOM_START: 'bottom-start',
231
+ BOTTOM_END: 'bottom-end',
232
+ LEFT: 'left',
233
+ LEFT_START: 'left-start',
234
+ LEFT_END: 'left-end',
235
+ };
236
+
237
+ const Side = {
238
+ TOP: 'top',
239
+ RIGHT: 'right',
240
+ BOTTOM: 'bottom',
241
+ LEFT: 'left',
242
+ };
243
+
244
+ function getSide(position) {
245
+ return position.split('-')[0];
246
+ }
247
+
248
+ function getAxis(position) {
249
+ const side = getSide(position);
250
+ switch (side) {
251
+ case Side.TOP:
252
+ case Side.BOTTOM:
253
+ return Axis.Y;
254
+ case Side.LEFT:
255
+ case Side.RIGHT:
256
+ return Axis.X;
257
+ }
258
+ }
259
+
260
+ function getOppositeSide(position) {
261
+ switch (getSide(position)) {
262
+ case Side.TOP:
263
+ return Side.BOTTOM;
264
+ case Side.RIGHT:
265
+ return Side.LEFT;
266
+ case Side.BOTTOM:
267
+ return Side.TOP;
268
+ case Side.LEFT:
269
+ return Side.RIGHT;
270
+ }
271
+ }
272
+
215
273
  const uniqueIdCache = {};
216
274
  function getUniqueId(key = '') {
217
275
  var _a;
@@ -234,41 +292,77 @@ function hasChanged(changes, keyOrKeys, ignoreFirstChange = true) {
234
292
  }
235
293
  }
236
294
 
237
- function provideModuleConfig(token, config) {
295
+ function provideConfig(token, config) {
238
296
  if ('useFactory' in config) {
239
297
  return { provide: token, useFactory: config.useFactory, deps: config.deps };
240
298
  }
241
299
  return { provide: token, useValue: config };
242
300
  }
243
- function createModuleConfigTokens(name, prefix, defaultValue) {
244
- const moduleConfig = `${name}ModuleConfig`;
245
- const defaultModuleConfig = `${name}DefaultModuleConfig`;
246
- const injectModuleConfig = `inject${name}ModuleConfig`;
247
- const tokenName = `${prefix}::${moduleConfig}`;
301
+ function createConfigTokens(name, prefix, defaultValue) {
302
+ const configName = `${name}Config`;
303
+ const defaultConfigName = `${name}DefaultConfig`;
304
+ const injectConfigName = `inject${name}Config`;
305
+ const provideConfigName = `provide${name}Config`;
306
+ const tokenName = `${prefix}::${configName}`;
248
307
  const token = new InjectionToken(tokenName, { providedIn: 'root', factory: () => defaultValue });
249
308
  return {
250
- [moduleConfig]: token,
251
- [defaultModuleConfig]: defaultValue,
252
- [injectModuleConfig]: () => deepmerge(defaultValue, inject(token)),
309
+ [configName]: token,
310
+ [defaultConfigName]: defaultValue,
311
+ [injectConfigName]: () => { var _a; return deepmerge(defaultValue, (_a = inject(token, { skipSelf: true, optional: true })) !== null && _a !== void 0 ? _a : {}, inject(token)); },
312
+ [provideConfigName]: (config) => {
313
+ return provideConfig(token, config);
314
+ },
253
315
  };
254
316
  }
255
317
 
256
318
  class Queue {
257
319
  constructor() {
258
- this.queue = new BehaviorSubject({});
259
- this.value$ = this.queue.pipe(map((values) => Object.values(values)), shareReplay({ bufferSize: 1, refCount: true }));
320
+ this.queue = new Map();
321
+ this.update$$ = new BehaviorSubject(undefined);
322
+ this.values = [];
323
+ this.firstItem = null;
324
+ this.lastItem = null;
325
+ this.value$ = this.update$$.pipe(map(() => this.values), shareReplay({ bufferSize: 1, refCount: true }));
326
+ }
327
+ get size() {
328
+ return this.queue.size;
329
+ }
330
+ isFirst({ id }) {
331
+ var _a;
332
+ return ((_a = this.firstItem) === null || _a === void 0 ? void 0 : _a.id) === id;
333
+ }
334
+ isLast({ id }) {
335
+ var _a;
336
+ return ((_a = this.lastItem) === null || _a === void 0 ? void 0 : _a.id) === id;
337
+ }
338
+ get(id) {
339
+ var _a;
340
+ return (_a = this.queue.get(id.toString())) !== null && _a !== void 0 ? _a : null;
260
341
  }
261
342
  add(item) {
262
- this.queue.next(Object.assign(Object.assign({}, this.queue.getValue()), { [item.id]: item }));
343
+ this.remove(item);
344
+ this.queue.set(item.id.toString(), item);
345
+ this.notify();
263
346
  return item;
264
347
  }
265
348
  remove(item) {
266
- const _a = this.queue.getValue(), _b = item.id, removedItem = _a[_b], queue = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
267
- this.queue.next(queue);
268
- return removedItem;
349
+ this.queue.delete(item.id.toString());
350
+ this.notify();
351
+ return item;
269
352
  }
270
353
  clear() {
271
- this.queue.next({});
354
+ this.queue.clear();
355
+ this.notify();
356
+ }
357
+ toArray() {
358
+ return this.values;
359
+ }
360
+ notify() {
361
+ var _a, _b;
362
+ this.values = Array.from(this.queue, ([_, item]) => item).reverse();
363
+ this.firstItem = (_a = this.values[0]) !== null && _a !== void 0 ? _a : null;
364
+ this.lastItem = (_b = this.values[this.values.length - 1]) !== null && _b !== void 0 ? _b : null;
365
+ this.update$$.next(undefined);
272
366
  }
273
367
  }
274
368
 
@@ -276,5 +370,5 @@ class Queue {
276
370
  * Generated bundle index. Do not edit.
277
371
  */
278
372
 
279
- export { EventManager, Pure, Queue, Transform, applyStyles, booleanToAttributeString, booleanToOptionalAttributeString, containsElement, createModuleConfigTokens, createResizeObserver, cssTranslate, deferFn, disableCSSTransitions, forceLayoutReflow, getInjector, getUniqueId, hasChanged, injectElement, isBoolean, isComponent, isFunction, isNonEmptyString, isNumber, isPresent, isString, isTemplateRef, isViewContainer, pluckFromArray, provideModuleConfig, px, reactiveAttributeBinding, reactiveClassBinding, setAttribute, untilDestroyed };
373
+ export { Axis, EventManager, Position, Pure, Queue, Side, Transform, applyStyles, booleanToAttributeString, booleanToOptionalAttributeString, buildUrl, containsElement, createConfigTokens, createResizeObserver, cssTranslate, deferFn, disableCSSTransitions, forceLayoutReflow, getAxis, getInjector, getOppositeSide, getSide, getUniqueId, hasChanged, injectElement, isBoolean, isComponent, isFunction, isNonEmptyString, isNumber, isPresent, isString, isTemplateRef, isViewContainer, pluckFromArray, provideConfig, px, reactiveAttributeBinding, reactiveClassBinding, setAttribute, untilDestroyed };
280
374
  //# sourceMappingURL=odx-angular-utils.mjs.map