@odx/angular 1.0.0-rc.1 → 1.0.0-rc.3

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 (450) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +43 -0
  3. package/animations/index.d.ts +3 -2
  4. package/animations/{config.d.ts → lib/config.d.ts} +0 -0
  5. package/animations/lib/expand.d.ts +2 -0
  6. package/animations/{fade.d.ts → lib/fade.d.ts} +0 -0
  7. package/animations/{slide.d.ts → lib/slide.d.ts} +0 -0
  8. package/cdk/checkbox-control/README.md +3 -0
  9. package/cdk/checkbox-control/index.d.ts +1 -0
  10. package/cdk/checkbox-control/lib/checkbox-control.directive.d.ts +16 -0
  11. package/cdk/custom-form-control/README.md +3 -0
  12. package/cdk/custom-form-control/index.d.ts +2 -0
  13. package/{lib/directives → cdk/custom-form-control/lib}/control.directive.d.ts +1 -3
  14. package/{lib/controls → cdk/custom-form-control/lib}/custom-form-control.d.ts +7 -8
  15. package/cdk/dynamic-view/lib/dynamic-view.directive.d.ts +1 -1
  16. package/cdk/dynamic-view/lib/facade/dynamic-content.d.ts +1 -1
  17. package/cdk/dynamic-view/lib/facade/dynamic-view-ref.d.ts +1 -1
  18. package/cdk/dynamic-view/lib/facade/index.d.ts +0 -1
  19. package/cdk/dynamic-view/lib/helpers/index.d.ts +0 -2
  20. package/cdk/dynamic-view/lib/models/dynamic-component-ref.d.ts +5 -3
  21. package/cdk/dynamic-view/lib/models/dynamic-template-ref.d.ts +1 -1
  22. package/cdk/expandable/README.md +3 -0
  23. package/cdk/expandable/index.d.ts +3 -0
  24. package/cdk/expandable/lib/directives/expandable-item.directive.d.ts +18 -0
  25. package/cdk/expandable/lib/directives/extandable-container.directive.d.ts +13 -0
  26. package/cdk/expandable/lib/directives/index.d.ts +2 -0
  27. package/cdk/expandable/lib/expandable.module.d.ts +8 -0
  28. package/cdk/expandable/lib/facade/expandable-container.d.ts +6 -0
  29. package/cdk/expandable/lib/facade/expandable-item.d.ts +7 -0
  30. package/cdk/expandable/lib/facade/index.d.ts +2 -0
  31. package/cdk/radio-group-control/README.md +3 -0
  32. package/cdk/radio-group-control/index.d.ts +3 -0
  33. package/cdk/radio-group-control/lib/radio-control.directive.d.ts +13 -0
  34. package/cdk/radio-group-control/lib/radio-group-control.directive.d.ts +10 -0
  35. package/cdk/radio-group-control/lib/radio-group-control.module.d.ts +9 -0
  36. package/components/accordion/README.md +3 -0
  37. package/components/accordion/index.d.ts +4 -0
  38. package/components/accordion/lib/accordion.component.d.ts +7 -0
  39. package/components/accordion/lib/accordion.module.d.ts +10 -0
  40. package/components/accordion/lib/components/accordion-item/accordion-item.component.d.ts +16 -0
  41. package/components/accordion/lib/components/index.d.ts +1 -0
  42. package/components/accordion/lib/directives/accordion-item-title.d.ts +5 -0
  43. package/components/accordion/lib/directives/index.d.ts +1 -0
  44. package/components/action-group/action-group.component.d.ts +1 -3
  45. package/components/area-header/area-header.component.d.ts +1 -3
  46. package/components/area-header/area-header.module.d.ts +2 -1
  47. package/components/avatar/lib/avatar.component.d.ts +1 -3
  48. package/components/badge/lib/badge.component.d.ts +3 -5
  49. package/components/badge/lib/badge.directive.d.ts +4 -5
  50. package/components/button/lib/button.component.d.ts +8 -16
  51. package/components/button/lib/models/button-size.d.ts +5 -0
  52. package/components/button/lib/models/index.d.ts +1 -0
  53. package/components/button-group/README.md +3 -0
  54. package/components/button-group/index.d.ts +1 -0
  55. package/components/button-group/lib/button-group.component.d.ts +15 -0
  56. package/components/checkbox/lib/checkbox.component.d.ts +5 -12
  57. package/components/form-field/README.md +3 -0
  58. package/components/form-field/index.d.ts +6 -0
  59. package/components/form-field/lib/components/form-field-info/form-field-info.component.d.ts +9 -0
  60. package/components/form-field/lib/components/form-group/form-group.component.d.ts +14 -0
  61. package/components/form-field/lib/components/index.d.ts +2 -0
  62. package/components/form-field/lib/directives/form-field-control.directive.d.ts +22 -0
  63. package/components/form-field/lib/directives/form-field-error.directive.d.ts +10 -0
  64. package/components/form-field/lib/directives/form-field-hint.directive.d.ts +8 -0
  65. package/components/form-field/lib/directives/form-field-label.directive.d.ts +6 -0
  66. package/components/form-field/lib/directives/form.directive.d.ts +9 -0
  67. package/components/form-field/lib/directives/index.d.ts +5 -0
  68. package/components/form-field/lib/form-field.component.d.ts +18 -0
  69. package/components/form-field/lib/form-field.config.d.ts +19 -0
  70. package/components/form-field/lib/form-field.module.d.ts +18 -0
  71. package/components/form-field/lib/form-field.service.d.ts +30 -0
  72. package/components/form-field/lib/models/form-field-error-resolver.d.ts +27 -0
  73. package/components/form-field/lib/models/form-field-error.d.ts +7 -0
  74. package/components/form-field/lib/models/index.d.ts +2 -0
  75. package/components/form-field/lib/services/form-field-error.service.d.ts +18 -0
  76. package/components/form-field/lib/services/index.d.ts +1 -0
  77. package/components/header/lib/header.component.d.ts +1 -3
  78. package/components/header/lib/header.module.d.ts +2 -1
  79. package/components/icon/lib/icon.component.d.ts +9 -5
  80. package/components/link/link.directive.d.ts +4 -6
  81. package/components/logo/logo.directive.d.ts +1 -3
  82. package/components/main-menu/lib/directives/main-menu-button.directive.d.ts +1 -4
  83. package/components/main-menu/lib/directives/main-menu-item.directive.d.ts +3 -4
  84. package/components/main-menu/lib/main-menu.component.d.ts +2 -4
  85. package/components/main-menu/lib/main-menu.module.d.ts +6 -6
  86. package/components/modal/README.md +3 -0
  87. package/components/modal/index.d.ts +9 -0
  88. package/components/modal/lib/components/index.d.ts +2 -0
  89. package/components/modal/lib/components/modal-footer/modal-footer.component.d.ts +6 -0
  90. package/components/modal/lib/components/modal-header/modal-header.component.d.ts +11 -0
  91. package/components/modal/lib/directives/index.d.ts +3 -0
  92. package/components/modal/lib/directives/modal-close.directive.d.ts +8 -0
  93. package/components/modal/lib/directives/modal-content.directive.d.ts +6 -0
  94. package/components/modal/lib/directives/modal-dismiss.directive.d.ts +7 -0
  95. package/components/modal/lib/helpers/index.d.ts +2 -0
  96. package/components/modal/lib/helpers/inject-modal-ref.d.ts +2 -0
  97. package/components/modal/lib/helpers/provide-modal-ref.d.ts +3 -0
  98. package/components/modal/lib/modal.component.d.ts +16 -0
  99. package/components/modal/lib/modal.config.d.ts +3 -0
  100. package/components/modal/lib/modal.directive.d.ts +14 -0
  101. package/components/modal/lib/modal.module.d.ts +21 -0
  102. package/components/modal/lib/modal.service.d.ts +20 -0
  103. package/components/modal/lib/models/index.d.ts +4 -0
  104. package/components/modal/lib/models/modal-options.d.ts +13 -0
  105. package/components/modal/lib/models/modal-ref.d.ts +16 -0
  106. package/components/modal/lib/models/modal-size.d.ts +6 -0
  107. package/components/modal/lib/models/modal-type.d.ts +8 -0
  108. package/components/modal/lib/services/index.d.ts +1 -0
  109. package/components/modal/lib/services/open-modal-manager.service.d.ts +15 -0
  110. package/components/radio-group/lib/components/radio-button/radio-button.component.d.ts +4 -11
  111. package/components/radio-group/lib/radio-group.component.d.ts +3 -5
  112. package/components/radio-group/lib/radio-group.module.d.ts +4 -4
  113. package/components/switch/README.md +3 -0
  114. package/components/switch/index.d.ts +1 -0
  115. package/components/switch/lib/switch.component.d.ts +6 -0
  116. package/components/toggle-button-group/README.md +3 -0
  117. package/components/toggle-button-group/index.d.ts +3 -0
  118. package/components/toggle-button-group/lib/components/index.d.ts +1 -0
  119. package/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.d.ts +7 -0
  120. package/components/toggle-button-group/lib/toggle-button-group.component.d.ts +7 -0
  121. package/components/toggle-button-group/lib/toggle-button-group.module.d.ts +9 -0
  122. package/esm2020/animations/index.mjs +4 -3
  123. package/esm2020/animations/lib/config.mjs +8 -0
  124. package/esm2020/animations/lib/expand.mjs +12 -0
  125. package/esm2020/animations/lib/fade.mjs +12 -0
  126. package/esm2020/animations/lib/slide.mjs +34 -0
  127. package/esm2020/cdk/checkbox-control/index.mjs +2 -0
  128. package/esm2020/cdk/checkbox-control/lib/checkbox-control.directive.mjs +43 -0
  129. package/esm2020/cdk/checkbox-control/odx-angular-cdk-checkbox-control.mjs +5 -0
  130. package/esm2020/cdk/custom-form-control/index.mjs +3 -0
  131. package/esm2020/cdk/custom-form-control/lib/control.directive.mjs +19 -0
  132. package/esm2020/cdk/custom-form-control/lib/custom-form-control.mjs +121 -0
  133. package/esm2020/cdk/custom-form-control/odx-angular-cdk-custom-form-control.mjs +5 -0
  134. package/esm2020/cdk/dynamic-view/lib/dynamic-view.component.mjs +3 -3
  135. package/esm2020/cdk/dynamic-view/lib/dynamic-view.directive.mjs +11 -10
  136. package/esm2020/cdk/dynamic-view/lib/dynamic-view.service.mjs +5 -5
  137. package/esm2020/cdk/dynamic-view/lib/facade/dynamic-content.mjs +1 -1
  138. package/esm2020/cdk/dynamic-view/lib/facade/dynamic-view-ref.mjs +1 -1
  139. package/esm2020/cdk/dynamic-view/lib/facade/index.mjs +1 -2
  140. package/esm2020/cdk/dynamic-view/lib/helpers/index.mjs +1 -3
  141. package/esm2020/cdk/dynamic-view/lib/helpers/is-dynamic-text-content.mjs +2 -2
  142. package/esm2020/cdk/dynamic-view/lib/models/dynamic-component-ref.mjs +18 -8
  143. package/esm2020/cdk/dynamic-view/lib/models/dynamic-template-ref.mjs +6 -2
  144. package/esm2020/cdk/expandable/index.mjs +4 -0
  145. package/esm2020/cdk/expandable/lib/directives/expandable-item.directive.mjs +48 -0
  146. package/esm2020/cdk/expandable/lib/directives/extandable-container.directive.mjs +43 -0
  147. package/esm2020/cdk/expandable/lib/directives/index.mjs +3 -0
  148. package/esm2020/cdk/expandable/lib/expandable.module.mjs +17 -0
  149. package/esm2020/cdk/expandable/lib/facade/expandable-container.mjs +3 -0
  150. package/esm2020/cdk/expandable/lib/facade/expandable-item.mjs +3 -0
  151. package/esm2020/cdk/expandable/lib/facade/index.mjs +3 -0
  152. package/esm2020/cdk/expandable/odx-angular-cdk-expandable.mjs +5 -0
  153. package/esm2020/cdk/radio-group-control/index.mjs +4 -0
  154. package/esm2020/cdk/radio-group-control/lib/radio-control.directive.mjs +39 -0
  155. package/esm2020/cdk/radio-group-control/lib/radio-group-control.directive.mjs +43 -0
  156. package/esm2020/cdk/radio-group-control/lib/radio-group-control.module.mjs +19 -0
  157. package/esm2020/cdk/radio-group-control/odx-angular-cdk-radio-group-control.mjs +5 -0
  158. package/esm2020/components/accordion/index.mjs +5 -0
  159. package/esm2020/components/accordion/lib/accordion.component.mjs +24 -0
  160. package/esm2020/components/accordion/lib/accordion.module.mjs +20 -0
  161. package/esm2020/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +54 -0
  162. package/esm2020/components/accordion/lib/components/index.mjs +2 -0
  163. package/esm2020/components/accordion/lib/directives/accordion-item-title.mjs +14 -0
  164. package/esm2020/components/accordion/lib/directives/index.mjs +2 -0
  165. package/esm2020/components/accordion/odx-angular-components-accordion.mjs +5 -0
  166. package/esm2020/components/action-group/action-group.component.mjs +15 -18
  167. package/esm2020/components/area-header/area-header.component.mjs +10 -10
  168. package/esm2020/components/area-header/area-header.module.mjs +9 -8
  169. package/esm2020/components/area-header/directives/area-header-content.directive.mjs +4 -5
  170. package/esm2020/components/area-header/directives/area-header-subtitle.directive.mjs +4 -5
  171. package/esm2020/components/avatar/lib/avatar.component.mjs +10 -10
  172. package/esm2020/components/badge/lib/badge.component.mjs +20 -22
  173. package/esm2020/components/badge/lib/badge.directive.mjs +11 -11
  174. package/esm2020/components/button/lib/button.component.mjs +26 -33
  175. package/esm2020/components/button/lib/models/button-size.mjs +5 -0
  176. package/esm2020/components/button/lib/models/index.mjs +2 -1
  177. package/esm2020/components/button-group/index.mjs +2 -0
  178. package/esm2020/components/button-group/lib/button-group.component.mjs +54 -0
  179. package/esm2020/components/button-group/odx-angular-components-button-group.mjs +5 -0
  180. package/esm2020/components/checkbox/lib/checkbox.component.mjs +16 -33
  181. package/esm2020/components/content-box/lib/content-box.component.mjs +3 -3
  182. package/esm2020/components/content-box/lib/content-box.module.mjs +4 -4
  183. package/esm2020/components/content-box/lib/directives/content-box-footer-directive.mjs +4 -5
  184. package/esm2020/components/content-box/lib/directives/content-box-header-directive.mjs +4 -5
  185. package/esm2020/components/form-field/index.mjs +7 -0
  186. package/esm2020/components/form-field/lib/components/form-field-info/form-field-info.component.mjs +24 -0
  187. package/esm2020/components/form-field/lib/components/form-group/form-group.component.mjs +36 -0
  188. package/esm2020/components/form-field/lib/components/index.mjs +3 -0
  189. package/esm2020/components/form-field/lib/directives/form-field-control.directive.mjs +68 -0
  190. package/esm2020/components/form-field/lib/directives/form-field-error.directive.mjs +25 -0
  191. package/esm2020/components/form-field/lib/directives/form-field-hint.directive.mjs +23 -0
  192. package/esm2020/components/form-field/lib/directives/form-field-label.directive.mjs +24 -0
  193. package/esm2020/components/form-field/lib/directives/form.directive.mjs +28 -0
  194. package/esm2020/components/form-field/lib/directives/index.mjs +6 -0
  195. package/esm2020/components/form-field/lib/form-field.component.mjs +47 -0
  196. package/esm2020/components/form-field/lib/form-field.config.mjs +7 -0
  197. package/esm2020/components/form-field/lib/form-field.module.mjs +49 -0
  198. package/esm2020/components/form-field/lib/form-field.service.mjs +53 -0
  199. package/esm2020/components/form-field/lib/models/form-field-error-resolver.mjs +2 -0
  200. package/esm2020/components/form-field/lib/models/form-field-error.mjs +2 -0
  201. package/esm2020/components/form-field/lib/models/index.mjs +3 -0
  202. package/esm2020/components/form-field/lib/services/form-field-error.service.mjs +56 -0
  203. package/esm2020/components/form-field/lib/services/index.mjs +2 -0
  204. package/esm2020/components/form-field/odx-angular-components-form-field.mjs +5 -0
  205. package/esm2020/components/header/lib/directives/header-avatar.directive.mjs +3 -3
  206. package/esm2020/components/header/lib/directives/header-title.directive.mjs +4 -5
  207. package/esm2020/components/header/lib/header.component.mjs +11 -11
  208. package/esm2020/components/header/lib/header.module.mjs +9 -9
  209. package/esm2020/components/icon/lib/icon.component.mjs +36 -12
  210. package/esm2020/components/link/link.directive.mjs +14 -18
  211. package/esm2020/components/logo/logo.directive.mjs +10 -11
  212. package/esm2020/components/main-menu/lib/directives/main-menu-button.directive.mjs +12 -13
  213. package/esm2020/components/main-menu/lib/directives/main-menu-item.directive.mjs +14 -14
  214. package/esm2020/components/main-menu/lib/main-menu.component.mjs +21 -22
  215. package/esm2020/components/main-menu/lib/main-menu.module.mjs +7 -7
  216. package/esm2020/components/main-menu/lib/main-menu.service.mjs +5 -5
  217. package/esm2020/components/modal/index.mjs +10 -0
  218. package/esm2020/components/modal/lib/components/index.mjs +3 -0
  219. package/esm2020/components/modal/lib/components/modal-footer/modal-footer.component.mjs +21 -0
  220. package/esm2020/components/modal/lib/components/modal-header/modal-header.component.mjs +38 -0
  221. package/esm2020/components/modal/lib/directives/index.mjs +4 -0
  222. package/esm2020/components/modal/lib/directives/modal-close.directive.mjs +29 -0
  223. package/esm2020/components/modal/lib/directives/modal-content.directive.mjs +24 -0
  224. package/esm2020/components/modal/lib/directives/modal-dismiss.directive.mjs +24 -0
  225. package/esm2020/components/modal/lib/helpers/index.mjs +3 -0
  226. package/esm2020/components/modal/lib/helpers/inject-modal-ref.mjs +6 -0
  227. package/esm2020/components/modal/lib/helpers/provide-modal-ref.mjs +5 -0
  228. package/esm2020/components/modal/lib/modal.component.mjs +63 -0
  229. package/esm2020/components/modal/lib/modal.config.mjs +8 -0
  230. package/esm2020/components/modal/lib/modal.directive.mjs +33 -0
  231. package/esm2020/components/modal/lib/modal.module.mjs +32 -0
  232. package/esm2020/components/modal/lib/modal.service.mjs +70 -0
  233. package/esm2020/components/modal/lib/models/index.mjs +5 -0
  234. package/esm2020/components/modal/lib/models/modal-options.mjs +2 -0
  235. package/esm2020/components/modal/lib/models/modal-ref.mjs +33 -0
  236. package/esm2020/components/modal/lib/models/modal-size.mjs +6 -0
  237. package/esm2020/components/modal/lib/models/modal-type.mjs +2 -0
  238. package/esm2020/components/modal/lib/services/index.mjs +2 -0
  239. package/esm2020/components/modal/lib/services/open-modal-manager.service.mjs +42 -0
  240. package/esm2020/components/modal/odx-angular-components-modal.mjs +5 -0
  241. package/esm2020/components/radio-group/lib/components/radio-button/radio-button.component.mjs +19 -38
  242. package/esm2020/components/radio-group/lib/radio-group.component.mjs +33 -16
  243. package/esm2020/components/radio-group/lib/radio-group.module.mjs +7 -7
  244. package/esm2020/components/switch/index.mjs +2 -0
  245. package/esm2020/components/switch/lib/switch.component.mjs +22 -0
  246. package/esm2020/components/switch/odx-angular-components-switch.mjs +5 -0
  247. package/esm2020/components/toggle-button-group/index.mjs +4 -0
  248. package/esm2020/components/toggle-button-group/lib/components/index.mjs +2 -0
  249. package/esm2020/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.mjs +30 -0
  250. package/esm2020/components/toggle-button-group/lib/toggle-button-group.component.mjs +33 -0
  251. package/esm2020/components/toggle-button-group/lib/toggle-button-group.module.mjs +19 -0
  252. package/esm2020/components/toggle-button-group/odx-angular-components-toggle-button-group.mjs +5 -0
  253. package/esm2020/index.mjs +1 -2
  254. package/esm2020/internal/decorators/css-modifier.mjs +6 -5
  255. package/esm2020/internal/helpers/camel-to-kebab-case.mjs +12 -0
  256. package/esm2020/internal/helpers/index.mjs +2 -4
  257. package/esm2020/internal/index.mjs +1 -4
  258. package/esm2020/lib/controllers/controller.mjs +37 -0
  259. package/esm2020/lib/controllers/disabled.controller.mjs +25 -19
  260. package/esm2020/lib/controllers/index.mjs +3 -1
  261. package/esm2020/lib/controllers/readonly.controller.mjs +68 -0
  262. package/esm2020/lib/core.module.mjs +11 -10
  263. package/esm2020/lib/directives/click-outside.directive.mjs +58 -0
  264. package/esm2020/lib/directives/index.mjs +2 -3
  265. package/esm2020/lib/services/index.mjs +1 -2
  266. package/esm2020/lib/services/window-ref.mjs +6 -6
  267. package/esm2020/rxjs/index.mjs +2 -1
  268. package/esm2020/rxjs/lib/mark-for-check.mjs +5 -0
  269. package/esm2020/utils/index.mjs +2 -1
  270. package/esm2020/utils/lib/helpers/angular.mjs +30 -0
  271. package/esm2020/utils/lib/helpers/dom.mjs +22 -0
  272. package/esm2020/utils/lib/helpers/index.mjs +6 -1
  273. package/esm2020/utils/lib/helpers/ng-changes.mjs +1 -1
  274. package/esm2020/utils/lib/helpers/provide-module-config.mjs +21 -0
  275. package/esm2020/utils/lib/helpers/type-guards.mjs +29 -0
  276. package/esm2020/utils/lib/helpers/until-destroyed.mjs +13 -0
  277. package/esm2020/utils/lib/types/get-properties.mjs +2 -0
  278. package/esm2020/utils/lib/types/index.mjs +2 -0
  279. package/fesm2015/odx-angular-animations.mjs +11 -1
  280. package/fesm2015/odx-angular-animations.mjs.map +1 -1
  281. package/fesm2015/odx-angular-cdk-checkbox-control.mjs +50 -0
  282. package/fesm2015/odx-angular-cdk-checkbox-control.mjs.map +1 -0
  283. package/fesm2015/odx-angular-cdk-custom-form-control.mjs +150 -0
  284. package/fesm2015/odx-angular-cdk-custom-form-control.mjs.map +1 -0
  285. package/fesm2015/odx-angular-cdk-dynamic-view.mjs +48 -55
  286. package/fesm2015/odx-angular-cdk-dynamic-view.mjs.map +1 -1
  287. package/fesm2015/odx-angular-cdk-expandable.mjs +114 -0
  288. package/fesm2015/odx-angular-cdk-expandable.mjs.map +1 -0
  289. package/fesm2015/odx-angular-cdk-radio-group-control.mjs +99 -0
  290. package/fesm2015/odx-angular-cdk-radio-group-control.mjs.map +1 -0
  291. package/fesm2015/odx-angular-components-accordion.mjs +104 -0
  292. package/fesm2015/odx-angular-components-accordion.mjs.map +1 -0
  293. package/fesm2015/odx-angular-components-action-group.mjs +14 -17
  294. package/fesm2015/odx-angular-components-action-group.mjs.map +1 -1
  295. package/fesm2015/odx-angular-components-area-header.mjs +23 -24
  296. package/fesm2015/odx-angular-components-area-header.mjs.map +1 -1
  297. package/fesm2015/odx-angular-components-avatar.mjs +9 -9
  298. package/fesm2015/odx-angular-components-avatar.mjs.map +1 -1
  299. package/fesm2015/odx-angular-components-badge.mjs +27 -29
  300. package/fesm2015/odx-angular-components-badge.mjs.map +1 -1
  301. package/fesm2015/odx-angular-components-button-group.mjs +60 -0
  302. package/fesm2015/odx-angular-components-button-group.mjs.map +1 -0
  303. package/fesm2015/odx-angular-components-button.mjs +30 -36
  304. package/fesm2015/odx-angular-components-button.mjs.map +1 -1
  305. package/fesm2015/odx-angular-components-checkbox.mjs +15 -31
  306. package/fesm2015/odx-angular-components-checkbox.mjs.map +1 -1
  307. package/fesm2015/odx-angular-components-content-box.mjs +13 -15
  308. package/fesm2015/odx-angular-components-content-box.mjs.map +1 -1
  309. package/fesm2015/odx-angular-components-form-field.mjs +381 -0
  310. package/fesm2015/odx-angular-components-form-field.mjs.map +1 -0
  311. package/fesm2015/odx-angular-components-header.mjs +24 -25
  312. package/fesm2015/odx-angular-components-header.mjs.map +1 -1
  313. package/fesm2015/odx-angular-components-icon.mjs +35 -11
  314. package/fesm2015/odx-angular-components-icon.mjs.map +1 -1
  315. package/fesm2015/odx-angular-components-link.mjs +13 -17
  316. package/fesm2015/odx-angular-components-link.mjs.map +1 -1
  317. package/fesm2015/odx-angular-components-logo.mjs +9 -10
  318. package/fesm2015/odx-angular-components-logo.mjs.map +1 -1
  319. package/fesm2015/odx-angular-components-main-menu.mjs +48 -50
  320. package/fesm2015/odx-angular-components-main-menu.mjs.map +1 -1
  321. package/fesm2015/odx-angular-components-modal.mjs +380 -0
  322. package/fesm2015/odx-angular-components-modal.mjs.map +1 -0
  323. package/fesm2015/odx-angular-components-radio-group.mjs +64 -67
  324. package/fesm2015/odx-angular-components-radio-group.mjs.map +1 -1
  325. package/fesm2015/odx-angular-components-switch.mjs +28 -0
  326. package/fesm2015/odx-angular-components-switch.mjs.map +1 -0
  327. package/fesm2015/odx-angular-components-toggle-button-group.mjs +75 -0
  328. package/fesm2015/odx-angular-components-toggle-button-group.mjs.map +1 -0
  329. package/fesm2015/odx-angular-internal.mjs +39 -104
  330. package/fesm2015/odx-angular-internal.mjs.map +1 -1
  331. package/fesm2015/odx-angular-rxjs.mjs +6 -2
  332. package/fesm2015/odx-angular-rxjs.mjs.map +1 -1
  333. package/fesm2015/odx-angular-utils.mjs +110 -1
  334. package/fesm2015/odx-angular-utils.mjs.map +1 -1
  335. package/fesm2015/odx-angular.mjs +179 -212
  336. package/fesm2015/odx-angular.mjs.map +1 -1
  337. package/fesm2020/odx-angular-animations.mjs +11 -1
  338. package/fesm2020/odx-angular-animations.mjs.map +1 -1
  339. package/fesm2020/odx-angular-cdk-checkbox-control.mjs +50 -0
  340. package/fesm2020/odx-angular-cdk-checkbox-control.mjs.map +1 -0
  341. package/fesm2020/odx-angular-cdk-custom-form-control.mjs +144 -0
  342. package/fesm2020/odx-angular-cdk-custom-form-control.mjs.map +1 -0
  343. package/fesm2020/odx-angular-cdk-dynamic-view.mjs +41 -37
  344. package/fesm2020/odx-angular-cdk-dynamic-view.mjs.map +1 -1
  345. package/fesm2020/odx-angular-cdk-expandable.mjs +113 -0
  346. package/fesm2020/odx-angular-cdk-expandable.mjs.map +1 -0
  347. package/fesm2020/odx-angular-cdk-radio-group-control.mjs +99 -0
  348. package/fesm2020/odx-angular-cdk-radio-group-control.mjs.map +1 -0
  349. package/fesm2020/odx-angular-components-accordion.mjs +103 -0
  350. package/fesm2020/odx-angular-components-accordion.mjs.map +1 -0
  351. package/fesm2020/odx-angular-components-action-group.mjs +14 -17
  352. package/fesm2020/odx-angular-components-action-group.mjs.map +1 -1
  353. package/fesm2020/odx-angular-components-area-header.mjs +23 -24
  354. package/fesm2020/odx-angular-components-area-header.mjs.map +1 -1
  355. package/fesm2020/odx-angular-components-avatar.mjs +9 -9
  356. package/fesm2020/odx-angular-components-avatar.mjs.map +1 -1
  357. package/fesm2020/odx-angular-components-badge.mjs +27 -29
  358. package/fesm2020/odx-angular-components-badge.mjs.map +1 -1
  359. package/fesm2020/odx-angular-components-button-group.mjs +60 -0
  360. package/fesm2020/odx-angular-components-button-group.mjs.map +1 -0
  361. package/fesm2020/odx-angular-components-button.mjs +30 -32
  362. package/fesm2020/odx-angular-components-button.mjs.map +1 -1
  363. package/fesm2020/odx-angular-components-checkbox.mjs +15 -31
  364. package/fesm2020/odx-angular-components-checkbox.mjs.map +1 -1
  365. package/fesm2020/odx-angular-components-content-box.mjs +13 -15
  366. package/fesm2020/odx-angular-components-content-box.mjs.map +1 -1
  367. package/fesm2020/odx-angular-components-form-field.mjs +378 -0
  368. package/fesm2020/odx-angular-components-form-field.mjs.map +1 -0
  369. package/fesm2020/odx-angular-components-header.mjs +24 -25
  370. package/fesm2020/odx-angular-components-header.mjs.map +1 -1
  371. package/fesm2020/odx-angular-components-icon.mjs +35 -11
  372. package/fesm2020/odx-angular-components-icon.mjs.map +1 -1
  373. package/fesm2020/odx-angular-components-link.mjs +13 -17
  374. package/fesm2020/odx-angular-components-link.mjs.map +1 -1
  375. package/fesm2020/odx-angular-components-logo.mjs +9 -10
  376. package/fesm2020/odx-angular-components-logo.mjs.map +1 -1
  377. package/fesm2020/odx-angular-components-main-menu.mjs +48 -50
  378. package/fesm2020/odx-angular-components-main-menu.mjs.map +1 -1
  379. package/fesm2020/odx-angular-components-modal.mjs +376 -0
  380. package/fesm2020/odx-angular-components-modal.mjs.map +1 -0
  381. package/fesm2020/odx-angular-components-radio-group.mjs +64 -66
  382. package/fesm2020/odx-angular-components-radio-group.mjs.map +1 -1
  383. package/fesm2020/odx-angular-components-switch.mjs +28 -0
  384. package/fesm2020/odx-angular-components-switch.mjs.map +1 -0
  385. package/fesm2020/odx-angular-components-toggle-button-group.mjs +75 -0
  386. package/fesm2020/odx-angular-components-toggle-button-group.mjs.map +1 -0
  387. package/fesm2020/odx-angular-internal.mjs +38 -102
  388. package/fesm2020/odx-angular-internal.mjs.map +1 -1
  389. package/fesm2020/odx-angular-rxjs.mjs +6 -2
  390. package/fesm2020/odx-angular-rxjs.mjs.map +1 -1
  391. package/fesm2020/odx-angular-utils.mjs +109 -1
  392. package/fesm2020/odx-angular-utils.mjs.map +1 -1
  393. package/fesm2020/odx-angular.mjs +175 -206
  394. package/fesm2020/odx-angular.mjs.map +1 -1
  395. package/index.d.ts +0 -1
  396. package/internal/helpers/camel-to-kebab-case.d.ts +2 -0
  397. package/internal/helpers/index.d.ts +1 -3
  398. package/internal/index.d.ts +0 -3
  399. package/{internal/abstract → lib/controllers}/controller.d.ts +3 -2
  400. package/lib/controllers/disabled.controller.d.ts +5 -3
  401. package/lib/controllers/index.d.ts +2 -0
  402. package/lib/controllers/readonly.controller.d.ts +18 -0
  403. package/lib/core.module.d.ts +3 -3
  404. package/lib/directives/click-outside.directive.d.ts +18 -0
  405. package/lib/directives/index.d.ts +1 -2
  406. package/lib/services/index.d.ts +0 -1
  407. package/package.json +93 -10
  408. package/rxjs/index.d.ts +1 -0
  409. package/rxjs/lib/mark-for-check.d.ts +3 -0
  410. package/utils/index.d.ts +1 -0
  411. package/utils/lib/helpers/angular.d.ts +5 -0
  412. package/utils/lib/helpers/dom.d.ts +5 -0
  413. package/utils/lib/helpers/index.d.ts +5 -0
  414. package/utils/lib/helpers/ng-changes.d.ts +1 -1
  415. package/utils/lib/helpers/provide-module-config.d.ts +12 -0
  416. package/{internal → utils/lib}/helpers/type-guards.d.ts +2 -1
  417. package/utils/lib/helpers/until-destroyed.d.ts +2 -0
  418. package/{internal → utils/lib}/types/get-properties.d.ts +1 -1
  419. package/{internal → utils/lib}/types/index.d.ts +0 -0
  420. package/cdk/dynamic-view/lib/facade/animated-component.d.ts +0 -4
  421. package/cdk/dynamic-view/lib/helpers/is-animated-component.d.ts +0 -3
  422. package/cdk/dynamic-view/lib/helpers/wait-for-animations.d.ts +0 -3
  423. package/esm2020/animations/config.mjs +0 -8
  424. package/esm2020/animations/fade.mjs +0 -12
  425. package/esm2020/animations/slide.mjs +0 -34
  426. package/esm2020/cdk/dynamic-view/lib/facade/animated-component.mjs +0 -2
  427. package/esm2020/cdk/dynamic-view/lib/helpers/is-animated-component.mjs +0 -5
  428. package/esm2020/cdk/dynamic-view/lib/helpers/wait-for-animations.mjs +0 -9
  429. package/esm2020/internal/abstract/controller.mjs +0 -29
  430. package/esm2020/internal/abstract/index.mjs +0 -2
  431. package/esm2020/internal/helpers/dom.mjs +0 -7
  432. package/esm2020/internal/helpers/type-guards.mjs +0 -27
  433. package/esm2020/internal/helpers/watch.mjs +0 -8
  434. package/esm2020/internal/providers/index.mjs +0 -2
  435. package/esm2020/internal/providers/watched-controller-provider.mjs +0 -9
  436. package/esm2020/internal/types/get-properties.mjs +0 -2
  437. package/esm2020/internal/types/index.mjs +0 -2
  438. package/esm2020/lib/controls/custom-form-control.mjs +0 -133
  439. package/esm2020/lib/controls/index.mjs +0 -2
  440. package/esm2020/lib/directives/control.directive.mjs +0 -18
  441. package/esm2020/lib/directives/monitor-focus.directive.mjs +0 -34
  442. package/esm2020/lib/services/destroy.service.mjs +0 -18
  443. package/internal/abstract/index.d.ts +0 -1
  444. package/internal/helpers/dom.d.ts +0 -2
  445. package/internal/helpers/watch.d.ts +0 -4
  446. package/internal/providers/index.d.ts +0 -1
  447. package/internal/providers/watched-controller-provider.d.ts +0 -5
  448. package/lib/controls/index.d.ts +0 -1
  449. package/lib/directives/monitor-focus.directive.d.ts +0 -12
  450. package/lib/services/destroy.service.d.ts +0 -9
@@ -0,0 +1,376 @@
1
+ import { __decorate, __metadata } from 'tslib';
2
+ import * as i0 from '@angular/core';
3
+ import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, Directive, Input, HostListener, ContentChild, Injector, Injectable, TemplateRef, NgModule } from '@angular/core';
4
+ import { CSSComponent, CSSModifier } from '@odx/angular/internal';
5
+ import { injectElement, createModuleConfigTokens, isViewContainer, provideModuleConfig } from '@odx/angular/utils';
6
+ import * as i2 from '@odx/angular';
7
+ import { CoreModule } from '@odx/angular';
8
+ import { ActionGroupComponent } from '@odx/angular/components/action-group';
9
+ import { AreaHeaderSize, AreaHeaderComponent, AreaHeaderModule } from '@odx/angular/components/area-header';
10
+ import { ButtonComponent } from '@odx/angular/components/button';
11
+ import { IconComponent } from '@odx/angular/components/icon';
12
+ import { Subject, share, merge, BehaviorSubject, shareReplay, finalize } from 'rxjs';
13
+ import * as i1 from '@angular/common';
14
+ import { Location, DOCUMENT } from '@angular/common';
15
+ import { trigger, transition, group, useAnimation, query } from '@angular/animations';
16
+ import * as i1$1 from '@angular/cdk/a11y';
17
+ import { A11yModule } from '@angular/cdk/a11y';
18
+ import { fadeIn, slideInY, fadeOut, slideOutY } from '@odx/angular/animations';
19
+ import { DynamicViewDirective, DynamicViewService } from '@odx/angular/cdk/dynamic-view';
20
+ import { deepmerge } from 'deepmerge-ts';
21
+ import { ButtonGroupComponent } from '@odx/angular/components/button-group';
22
+
23
+ let ModalFooterComponent = class ModalFooterComponent {
24
+ constructor() {
25
+ this.element = injectElement();
26
+ }
27
+ };
28
+ ModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
29
+ ModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: ModalFooterComponent, isStandalone: true, selector: "odx-modal-footer", ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
30
+ ModalFooterComponent = __decorate([
31
+ CSSComponent('modal__footer')
32
+ ], ModalFooterComponent);
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalFooterComponent, decorators: [{
34
+ type: Component,
35
+ args: [{ standalone: true, selector: 'odx-modal-footer', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
36
+ }] });
37
+
38
+ class ModalRef {
39
+ constructor(internalOptions) {
40
+ this.internalOptions = internalOptions;
41
+ this.onClose$$ = new Subject();
42
+ this.onDismiss$$ = new Subject();
43
+ this.onClose$ = this.onClose$$.pipe(share({ resetOnRefCountZero: true }));
44
+ this.onDismiss$ = this.onDismiss$$.pipe(share({ resetOnRefCountZero: true }));
45
+ this.onDestroy$ = merge(this.onClose$, this.onDismiss$);
46
+ }
47
+ get modalTitleId() {
48
+ return `${this.options.id}-title`;
49
+ }
50
+ get data() {
51
+ return this.internalOptions.data;
52
+ }
53
+ get options() {
54
+ return this.internalOptions;
55
+ }
56
+ dismiss() {
57
+ this.onDismiss$$.next();
58
+ this.destroy();
59
+ }
60
+ close(result) {
61
+ this.onClose$$.next(result);
62
+ this.destroy();
63
+ }
64
+ destroy() {
65
+ this.onClose$$.complete();
66
+ this.onDismiss$$.complete();
67
+ }
68
+ }
69
+
70
+ const ModalSize = {
71
+ SMALL: 'small',
72
+ MEDIUM: 'medium',
73
+ LARGE: 'large',
74
+ };
75
+
76
+ function injectModalRef() {
77
+ return inject((ModalRef));
78
+ }
79
+
80
+ function provideModalRef(modalRef) {
81
+ return { provide: ModalRef, useValue: modalRef };
82
+ }
83
+
84
+ class ModalCloseDirective {
85
+ constructor() {
86
+ this.modalRef = injectModalRef();
87
+ this.result = null;
88
+ }
89
+ onClick() {
90
+ const result = this.result === '' ? null : this.result;
91
+ this.modalRef.close(result ?? null);
92
+ }
93
+ }
94
+ ModalCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
95
+ ModalCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: ModalCloseDirective, isStandalone: true, selector: "[odxModalClose]", inputs: { result: ["odxModalClose", "result"] }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalCloseDirective, decorators: [{
97
+ type: Directive,
98
+ args: [{
99
+ standalone: true,
100
+ selector: '[odxModalClose]',
101
+ }]
102
+ }], propDecorators: { result: [{
103
+ type: Input,
104
+ args: ['odxModalClose']
105
+ }], onClick: [{
106
+ type: HostListener,
107
+ args: ['click']
108
+ }] } });
109
+
110
+ let ModalContentDirective = class ModalContentDirective {
111
+ constructor() {
112
+ this.element = injectElement();
113
+ }
114
+ };
115
+ ModalContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
116
+ ModalContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: ModalContentDirective, isStandalone: true, selector: "odx-modal-content", ngImport: i0 });
117
+ ModalContentDirective = __decorate([
118
+ CSSComponent('modal__content')
119
+ ], ModalContentDirective);
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalContentDirective, decorators: [{
121
+ type: Directive,
122
+ args: [{
123
+ standalone: true,
124
+ selector: 'odx-modal-content',
125
+ }]
126
+ }] });
127
+
128
+ class ModalDismissDirective {
129
+ constructor() {
130
+ this.modalRef = injectModalRef();
131
+ }
132
+ onClick() {
133
+ this.modalRef.dismiss();
134
+ }
135
+ }
136
+ ModalDismissDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalDismissDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
137
+ ModalDismissDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: ModalDismissDirective, isStandalone: true, selector: "[odxModalDismiss]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalDismissDirective, decorators: [{
139
+ type: Directive,
140
+ args: [{
141
+ standalone: true,
142
+ selector: '[odxModalDismiss]',
143
+ }]
144
+ }], propDecorators: { onClick: [{
145
+ type: HostListener,
146
+ args: ['click']
147
+ }] } });
148
+
149
+ let ModalHeaderComponent = class ModalHeaderComponent {
150
+ constructor() {
151
+ this.modalRef = injectModalRef();
152
+ this.element = injectElement();
153
+ }
154
+ ngAfterContentInit() {
155
+ if (this.areaHeaderComponent) {
156
+ this.areaHeaderComponent.size = AreaHeaderSize.MEDIUM;
157
+ }
158
+ }
159
+ };
160
+ ModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
161
+ ModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: ModalHeaderComponent, isStandalone: true, selector: "odx-modal-header", queries: [{ propertyName: "areaHeaderComponent", first: true, predicate: AreaHeaderComponent, descendants: true }], ngImport: i0, template: "<ng-content select=\"odx-area-header\"></ng-content>\n<odx-action-group class=\"odx-modal__dismiss\" *ngIf=\"modalRef.options.dismissable\">\n <button odxButton odxModalDismiss>\n <odx-icon name=\"close\"></odx-icon>\n </button>\n</odx-action-group>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name"] }, { kind: "directive", type: ModalDismissDirective, selector: "[odxModalDismiss]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
162
+ ModalHeaderComponent = __decorate([
163
+ CSSComponent('modal__header')
164
+ ], ModalHeaderComponent);
165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalHeaderComponent, decorators: [{
166
+ type: Component,
167
+ args: [{ standalone: true, selector: 'odx-modal-header', imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent, ModalDismissDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"odx-area-header\"></ng-content>\n<odx-action-group class=\"odx-modal__dismiss\" *ngIf=\"modalRef.options.dismissable\">\n <button odxButton odxModalDismiss>\n <odx-icon name=\"close\"></odx-icon>\n </button>\n</odx-action-group>\n" }]
168
+ }], propDecorators: { areaHeaderComponent: [{
169
+ type: ContentChild,
170
+ args: [AreaHeaderComponent]
171
+ }] } });
172
+
173
+ let ModalComponent = class ModalComponent {
174
+ constructor() {
175
+ this.modalRef = injectModalRef();
176
+ this.injector = inject(Injector);
177
+ this.context = { $implicit: this.modalRef };
178
+ this.element = injectElement();
179
+ this.size = this.modalRef.options.size;
180
+ }
181
+ onClose() {
182
+ if (this.modalRef.options.dismissable) {
183
+ this.modalRef.dismiss();
184
+ }
185
+ }
186
+ };
187
+ ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
188
+ ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: ModalComponent, isStandalone: true, selector: "odx-modal", inputs: { content: "content" }, host: { listeners: { "keyup.esc": "onClose()" }, properties: { "@hostAnimation": "true", "attr.id": "modalRef.options.id" } }, ngImport: i0, template: "<div\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n [odxClickOutsideActive]=\"modalRef.options.dismissable\"\n [attr.aria-labelledby]=\"modalRef.modalTitleId\"\n class=\"odx-modal__container\"\n role=\"dialog\"\n (odxClickOutside)=\"modalRef.dismiss()\"\n>\n <ng-template [odxDynamicView]=\"content\" [odxDynamicViewContext]=\"context\" [odxDynamicViewInjector]=\"injector\"></ng-template>\n</div>\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.ClickOutsideDirective, selector: "[odxClickOutside]", inputs: ["odxClickOutsideActive"], outputs: ["odxClickOutside"] }, { kind: "directive", type: DynamicViewDirective, selector: "[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }], animations: [
189
+ trigger('hostAnimation', [
190
+ transition(':enter', group([useAnimation(fadeIn()), query('.odx-modal__container', useAnimation(slideInY('8px')))])),
191
+ transition(':leave', group([useAnimation(fadeOut()), query('.odx-modal__container', useAnimation(slideOutY('8px')))])),
192
+ ]),
193
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
194
+ __decorate([
195
+ CSSModifier(),
196
+ __metadata("design:type", Object)
197
+ ], ModalComponent.prototype, "size", void 0);
198
+ ModalComponent = __decorate([
199
+ CSSComponent('modal')
200
+ ], ModalComponent);
201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalComponent, decorators: [{
202
+ type: Component,
203
+ args: [{ standalone: true, selector: 'odx-modal', imports: [A11yModule, ActionGroupComponent, ButtonComponent, IconComponent, CoreModule, DynamicViewDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
204
+ '[@hostAnimation]': 'true',
205
+ '[attr.id]': 'modalRef.options.id',
206
+ }, animations: [
207
+ trigger('hostAnimation', [
208
+ transition(':enter', group([useAnimation(fadeIn()), query('.odx-modal__container', useAnimation(slideInY('8px')))])),
209
+ transition(':leave', group([useAnimation(fadeOut()), query('.odx-modal__container', useAnimation(slideOutY('8px')))])),
210
+ ]),
211
+ ], template: "<div\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n [odxClickOutsideActive]=\"modalRef.options.dismissable\"\n [attr.aria-labelledby]=\"modalRef.modalTitleId\"\n class=\"odx-modal__container\"\n role=\"dialog\"\n (odxClickOutside)=\"modalRef.dismiss()\"\n>\n <ng-template [odxDynamicView]=\"content\" [odxDynamicViewContext]=\"context\" [odxDynamicViewInjector]=\"injector\"></ng-template>\n</div>\n" }]
212
+ }], propDecorators: { size: [], content: [{
213
+ type: Input
214
+ }], onClose: [{
215
+ type: HostListener,
216
+ args: ['keyup.esc']
217
+ }] } });
218
+
219
+ const { ModalDefaultModuleConfig, ModalModuleConfig, injectModalModuleConfig } = createModuleConfigTokens('Modal', '@odx/angular/components/modal', {
220
+ dismissable: true,
221
+ size: ModalSize.MEDIUM,
222
+ dismissOnNavigation: true,
223
+ });
224
+
225
+ class OpenModalManagerService {
226
+ constructor() {
227
+ this.location = inject(Location);
228
+ this.modals$$ = new BehaviorSubject([]);
229
+ this.modals$ = this.modals$$.pipe(shareReplay({ refCount: true }));
230
+ }
231
+ getById(id) {
232
+ return this.modals$$.getValue().find((modalRef) => modalRef.options.id === id) ?? null;
233
+ }
234
+ add(modalRef) {
235
+ if (this.getById(modalRef.options.id)) {
236
+ throw Error(`Modal with ID ${modalRef.options.id} already open`);
237
+ }
238
+ const openModals = [...this.modals$$.getValue(), modalRef];
239
+ this.modals$$.next(openModals);
240
+ if (modalRef.options.dismissOnNavigation) {
241
+ this.urlChangeListener = this.location.onUrlChange(() => modalRef.dismiss());
242
+ }
243
+ }
244
+ remove(modalRef) {
245
+ const openModals = this.modals$$.getValue().filter(({ options: { id } }) => id !== modalRef.options.id);
246
+ this.modals$$.next(openModals);
247
+ this.urlChangeListener?.();
248
+ this.urlChangeListener = undefined;
249
+ }
250
+ dismissAll() {
251
+ for (const modalRef of this.modals$$.getValue()) {
252
+ modalRef.dismiss();
253
+ }
254
+ }
255
+ }
256
+ OpenModalManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: OpenModalManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
257
+ OpenModalManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: OpenModalManagerService, providedIn: 'root' });
258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: OpenModalManagerService, decorators: [{
259
+ type: Injectable,
260
+ args: [{ providedIn: 'root' }]
261
+ }] });
262
+
263
+ class ModalService {
264
+ constructor() {
265
+ this.injector = inject(Injector);
266
+ this.moduleConfig = injectModalModuleConfig();
267
+ this.document = inject(DOCUMENT);
268
+ this.openModalManager = inject(OpenModalManagerService);
269
+ this.dynamicViewService = inject(DynamicViewService);
270
+ this.openModals$ = this.openModalManager.modals$;
271
+ }
272
+ dismissAll() {
273
+ this.openModalManager.dismissAll();
274
+ }
275
+ getModalById(id) {
276
+ return this.openModalManager.getById(id);
277
+ }
278
+ open(content, options) {
279
+ const mergedOptions = this.mergeOptions(options);
280
+ const modalRef = new ModalRef(mergedOptions);
281
+ this.openModalManager.add(modalRef);
282
+ this.attachModal(modalRef, content);
283
+ return modalRef;
284
+ }
285
+ attachModal(modalRef, content) {
286
+ const hostElement = modalRef.options.host;
287
+ const isViewContainerHost = isViewContainer(hostElement);
288
+ const injector = Injector.create({
289
+ providers: [provideModalRef(modalRef)],
290
+ parent: this.injector,
291
+ });
292
+ const viewRef = this.dynamicViewService.createView(ModalComponent, {
293
+ context: { content },
294
+ injector,
295
+ vcr: isViewContainerHost ? hostElement : undefined,
296
+ });
297
+ const onDestroy = () => {
298
+ viewRef.destroy();
299
+ this.openModalManager.remove(modalRef);
300
+ };
301
+ if (!isViewContainerHost) {
302
+ hostElement.appendChild(viewRef.getElement());
303
+ }
304
+ modalRef.onDestroy$.pipe(finalize(() => onDestroy())).subscribe();
305
+ }
306
+ mergeOptions(options) {
307
+ return deepmerge(this.moduleConfig, {
308
+ id: `odx-modal-${ModalService.ID++}`,
309
+ host: this.document.body,
310
+ }, options ?? {});
311
+ }
312
+ }
313
+ ModalService.ID = 0;
314
+ ModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
315
+ ModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalService, providedIn: 'root' });
316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalService, decorators: [{
317
+ type: Injectable,
318
+ args: [{ providedIn: 'root' }]
319
+ }] });
320
+
321
+ class ModalDirective {
322
+ constructor() {
323
+ this.modalService = inject(ModalService);
324
+ this.modalRef = null;
325
+ this.template = inject(TemplateRef);
326
+ }
327
+ ngOnDestroy() {
328
+ this.modalRef?.dismiss();
329
+ }
330
+ open() {
331
+ this.modalRef = this.modalService.open(this.template, this.modalOptions || {});
332
+ }
333
+ dismiss() {
334
+ this.modalRef?.dismiss();
335
+ }
336
+ }
337
+ ModalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
338
+ ModalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: ModalDirective, isStandalone: true, selector: "ng-template[odxModal]", inputs: { modalOptions: ["odxModal", "modalOptions"] }, exportAs: ["odxModal"], ngImport: i0 });
339
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalDirective, decorators: [{
340
+ type: Directive,
341
+ args: [{
342
+ standalone: true,
343
+ selector: 'ng-template[odxModal]',
344
+ exportAs: 'odxModal',
345
+ }]
346
+ }], propDecorators: { modalOptions: [{
347
+ type: Input,
348
+ args: ['odxModal']
349
+ }] } });
350
+
351
+ const modules = [ModalComponent, ModalHeaderComponent, ModalFooterComponent, ModalDirective, ModalCloseDirective, ModalContentDirective, ModalDismissDirective];
352
+ class ModalModule {
353
+ static forRoot(config) {
354
+ return {
355
+ ngModule: ModalModule,
356
+ providers: [provideModuleConfig(ModalModuleConfig, config)],
357
+ };
358
+ }
359
+ }
360
+ ModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
361
+ ModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: ModalModule, imports: [ButtonComponent, ButtonGroupComponent, ModalComponent, ModalHeaderComponent, ModalFooterComponent, ModalDirective, ModalCloseDirective, ModalContentDirective, ModalDismissDirective], exports: [CoreModule, AreaHeaderModule, ButtonComponent, ButtonGroupComponent, ModalComponent, ModalHeaderComponent, ModalFooterComponent, ModalDirective, ModalCloseDirective, ModalContentDirective, ModalDismissDirective] });
362
+ ModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalModule, imports: [ButtonComponent, ButtonGroupComponent, ModalComponent, ModalHeaderComponent, ModalFooterComponent, CoreModule, AreaHeaderModule] });
363
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: ModalModule, decorators: [{
364
+ type: NgModule,
365
+ args: [{
366
+ imports: [ButtonComponent, ButtonGroupComponent, ...modules],
367
+ exports: [CoreModule, AreaHeaderModule, ButtonComponent, ButtonGroupComponent, ...modules],
368
+ }]
369
+ }] });
370
+
371
+ /**
372
+ * Generated bundle index. Do not edit.
373
+ */
374
+
375
+ export { ModalCloseDirective, ModalComponent, ModalContentDirective, ModalDefaultModuleConfig, ModalDirective, ModalDismissDirective, ModalFooterComponent, ModalHeaderComponent, ModalModule, ModalModuleConfig, ModalRef, ModalService, ModalSize, OpenModalManagerService, injectModalModuleConfig };
376
+ //# sourceMappingURL=odx-angular-components-modal.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"odx-angular-components-modal.mjs","sources":["../../../../libs/angular/components/modal/src/lib/components/modal-footer/modal-footer.component.ts","../../../../libs/angular/components/modal/src/lib/components/modal-footer/modal-footer.component.html","../../../../libs/angular/components/modal/src/lib/models/modal-ref.ts","../../../../libs/angular/components/modal/src/lib/models/modal-size.ts","../../../../libs/angular/components/modal/src/lib/helpers/inject-modal-ref.ts","../../../../libs/angular/components/modal/src/lib/helpers/provide-modal-ref.ts","../../../../libs/angular/components/modal/src/lib/directives/modal-close.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/modal-content.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/modal-dismiss.directive.ts","../../../../libs/angular/components/modal/src/lib/components/modal-header/modal-header.component.ts","../../../../libs/angular/components/modal/src/lib/components/modal-header/modal-header.component.html","../../../../libs/angular/components/modal/src/lib/modal.component.ts","../../../../libs/angular/components/modal/src/lib/modal.component.html","../../../../libs/angular/components/modal/src/lib/modal.config.ts","../../../../libs/angular/components/modal/src/lib/services/open-modal-manager.service.ts","../../../../libs/angular/components/modal/src/lib/modal.service.ts","../../../../libs/angular/components/modal/src/lib/modal.directive.ts","../../../../libs/angular/components/modal/src/lib/modal.module.ts","../../../../libs/angular/components/modal/src/odx-angular-components-modal.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('modal__footer')\n@Component({\n standalone: true,\n selector: 'odx-modal-footer',\n templateUrl: './modal-footer.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalFooterComponent {\n public readonly element = injectElement();\n}\n","<ng-content></ng-content>\n","import { merge, share, Subject } from 'rxjs';\nimport { ModalOptions } from './modal-options';\n\nexport class ModalRef<Data = unknown, Result = unknown> {\n private readonly onClose$$ = new Subject<Result>();\n private readonly onDismiss$$ = new Subject<void>();\n\n public readonly onClose$ = this.onClose$$.pipe(share({ resetOnRefCountZero: true }));\n public readonly onDismiss$ = this.onDismiss$$.pipe(share({ resetOnRefCountZero: true }));\n public readonly onDestroy$ = merge(this.onClose$, this.onDismiss$);\n\n public get modalTitleId(): string {\n return `${this.options.id}-title`;\n }\n\n public get data(): Data {\n return this.internalOptions.data;\n }\n\n public get options(): ModalOptions<Data> {\n return this.internalOptions;\n }\n\n constructor(private readonly internalOptions: ModalOptions<Data>) {}\n\n public dismiss(): void {\n this.onDismiss$$.next();\n this.destroy();\n }\n\n public close(result: Result): void {\n this.onClose$$.next(result);\n this.destroy();\n }\n\n private destroy(): void {\n this.onClose$$.complete();\n this.onDismiss$$.complete();\n }\n}\n","export type ModalSize = typeof ModalSize[keyof typeof ModalSize];\n\nexport const ModalSize = {\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n} as const;\n","import { inject } from '@angular/core';\nimport { ModalRef } from '../models';\n\nexport function injectModalRef<T>(): ModalRef<T> {\n return inject(ModalRef<T>);\n}\n","import { ValueProvider } from '@angular/core';\nimport { ModalRef } from '../models';\n\nexport function provideModalRef<D = unknown, R = unknown>(modalRef: ModalRef<D, R>): ValueProvider {\n return { provide: ModalRef, useValue: modalRef };\n}\n","import { Directive, HostListener, Input } from '@angular/core';\nimport { injectModalRef } from '../helpers';\n\n@Directive({\n standalone: true,\n selector: '[odxModalClose]',\n})\nexport class ModalCloseDirective<T = unknown> {\n private readonly modalRef = injectModalRef();\n\n @Input('odxModalClose')\n public result: T | null = null;\n\n @HostListener('click')\n public onClick(): void {\n const result = this.result === '' ? null : this.result;\n\n this.modalRef.close(result ?? null);\n }\n}\n","import { Directive } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('modal__content')\n@Directive({\n standalone: true,\n selector: 'odx-modal-content',\n})\nexport class ModalContentDirective {\n public readonly element = injectElement();\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectModalRef } from '../helpers';\n\n@Directive({\n standalone: true,\n selector: '[odxModalDismiss]',\n})\nexport class ModalDismissDirective {\n private readonly modalRef = injectModalRef();\n\n @HostListener('click')\n public onClick(): void {\n this.modalRef.dismiss();\n }\n}\n","import { AfterContentInit, ChangeDetectionStrategy, Component, ContentChild, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { AreaHeaderComponent, AreaHeaderSize } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { ModalDismissDirective } from '../../directives';\nimport { injectModalRef } from '../../helpers';\n\n@CSSComponent('modal__header')\n@Component({\n standalone: true,\n selector: 'odx-modal-header',\n templateUrl: './modal-header.component.html',\n imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent, ModalDismissDirective],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalHeaderComponent implements AfterContentInit {\n protected readonly modalRef = injectModalRef();\n\n public readonly element = injectElement();\n\n @ContentChild(AreaHeaderComponent)\n public areaHeaderComponent?: AreaHeaderComponent;\n\n public ngAfterContentInit(): void {\n if (this.areaHeaderComponent) {\n this.areaHeaderComponent.size = AreaHeaderSize.MEDIUM;\n }\n }\n}\n","<ng-content select=\"odx-area-header\"></ng-content>\n<odx-action-group class=\"odx-modal__dismiss\" *ngIf=\"modalRef.options.dismissable\">\n <button odxButton odxModalDismiss>\n <odx-icon name=\"close\"></odx-icon>\n </button>\n</odx-action-group>\n","import { group, query, transition, trigger, useAnimation } from '@angular/animations';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { ChangeDetectionStrategy, Component, HostListener, inject, Injector, Input, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { fadeIn, fadeOut, slideInY, slideOutY } from '@odx/angular/animations';\nimport { DynamicContent, DynamicTextContent, DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { injectModalRef } from './helpers';\n\n@CSSComponent('modal')\n@Component({\n standalone: true,\n selector: 'odx-modal',\n templateUrl: './modal.component.html',\n imports: [A11yModule, ActionGroupComponent, ButtonComponent, IconComponent, CoreModule, DynamicViewDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[@hostAnimation]': 'true',\n '[attr.id]': 'modalRef.options.id',\n },\n animations: [\n trigger('hostAnimation', [\n transition(':enter', group([useAnimation(fadeIn()), query('.odx-modal__container', useAnimation(slideInY('8px')))])),\n transition(':leave', group([useAnimation(fadeOut()), query('.odx-modal__container', useAnimation(slideOutY('8px')))])),\n ]),\n ],\n})\nexport class ModalComponent {\n protected readonly modalRef = injectModalRef();\n protected readonly injector = inject(Injector);\n protected readonly context = { $implicit: this.modalRef };\n\n public readonly element = injectElement();\n\n @CSSModifier()\n public readonly size = this.modalRef.options.size;\n\n @Input()\n public content!: Exclude<DynamicContent, DynamicTextContent>;\n\n @HostListener('keyup.esc')\n public onClose(): void {\n if (this.modalRef.options.dismissable) {\n this.modalRef.dismiss();\n }\n }\n}\n","<div\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n [odxClickOutsideActive]=\"modalRef.options.dismissable\"\n [attr.aria-labelledby]=\"modalRef.modalTitleId\"\n class=\"odx-modal__container\"\n role=\"dialog\"\n (odxClickOutside)=\"modalRef.dismiss()\"\n>\n <ng-template [odxDynamicView]=\"content\" [odxDynamicViewContext]=\"context\" [odxDynamicViewInjector]=\"injector\"></ng-template>\n</div>\n","import { createModuleConfigTokens } from '@odx/angular/utils';\nimport { ModalInstanceOptions, ModalSize } from './models';\n\nexport type ModalModuleConfig = Omit<ModalInstanceOptions, 'id' | 'host' | 'data'>;\n\nexport const { ModalDefaultModuleConfig, ModalModuleConfig, injectModalModuleConfig } = createModuleConfigTokens('Modal', '@odx/angular/components/modal', {\n dismissable: true,\n size: ModalSize.MEDIUM,\n dismissOnNavigation: true,\n} as ModalModuleConfig);\n","import { Location } from '@angular/common';\nimport { inject, Injectable } from '@angular/core';\nimport { BehaviorSubject, shareReplay } from 'rxjs';\nimport { ModalOptions } from '../models/modal-options';\nimport { ModalRef } from '../models/modal-ref';\n\n@Injectable({ providedIn: 'root' })\nexport class OpenModalManagerService {\n private readonly location = inject(Location);\n private readonly modals$$ = new BehaviorSubject<ModalRef[]>([]);\n private urlChangeListener?: VoidFunction;\n\n public readonly modals$ = this.modals$$.pipe(shareReplay({ refCount: true }));\n\n public getById<Data = unknown, Result = unknown>(id: ModalOptions['id']): ModalRef<Data, Result> | null {\n return (this.modals$$.getValue().find((modalRef) => modalRef.options.id === id) as ModalRef<Data, Result>) ?? null;\n }\n\n public add(modalRef: ModalRef) {\n if (this.getById(modalRef.options.id)) {\n throw Error(`Modal with ID ${modalRef.options.id} already open`);\n }\n const openModals = [...this.modals$$.getValue(), modalRef];\n this.modals$$.next(openModals);\n if (modalRef.options.dismissOnNavigation) {\n this.urlChangeListener = this.location.onUrlChange(() => modalRef.dismiss());\n }\n }\n\n public remove(modalRef: ModalRef): void {\n const openModals = this.modals$$.getValue().filter(({ options: { id } }) => id !== modalRef.options.id);\n this.modals$$.next(openModals);\n this.urlChangeListener?.();\n this.urlChangeListener = undefined;\n }\n\n public dismissAll(): void {\n for (const modalRef of this.modals$$.getValue()) {\n modalRef.dismiss();\n }\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { inject, Injectable, Injector, TemplateRef } from '@angular/core';\nimport { DynamicContent, DynamicTextContent, DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { isViewContainer } from '@odx/angular/utils';\nimport { deepmerge } from 'deepmerge-ts';\nimport { finalize } from 'rxjs';\nimport { provideModalRef } from './helpers';\nimport { ModalComponent } from './modal.component';\nimport { injectModalModuleConfig } from './modal.config';\nimport { ModalOptions, ModalRef, ModalType } from './models';\nimport { OpenModalManagerService } from './services';\n\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n private static ID = 0;\n private readonly injector = inject(Injector);\n private readonly moduleConfig = injectModalModuleConfig();\n private readonly document = inject(DOCUMENT);\n private readonly openModalManager = inject(OpenModalManagerService);\n private readonly dynamicViewService = inject(DynamicViewService);\n\n public readonly openModals$ = this.openModalManager.modals$;\n\n public dismissAll(): void {\n this.openModalManager.dismissAll();\n }\n\n public getModalById<Data = unknown, Result = unknown>(id: ModalOptions['id']): ModalRef<Data, Result> | null {\n return this.openModalManager.getById(id);\n }\n\n public open<Data, Result, T>(content: TemplateRef<T>, options?: Partial<ModalOptions<Data>>): ModalRef<Data, Result>;\n public open<Data, Result, T = unknown>(content: ModalType<T, Data, Result>, options?: Partial<ModalOptions<Data>>): ModalRef<Data, Result>;\n public open(content: ModalType<unknown> | TemplateRef<unknown>, options?: Partial<ModalOptions>): ModalRef {\n const mergedOptions = this.mergeOptions(options);\n const modalRef = new ModalRef(mergedOptions);\n this.openModalManager.add(modalRef);\n this.attachModal(modalRef, content);\n\n return modalRef;\n }\n\n private attachModal(modalRef: ModalRef, content: Exclude<DynamicContent, DynamicTextContent>): void {\n const hostElement = modalRef.options.host;\n const isViewContainerHost = isViewContainer(hostElement);\n const injector = Injector.create({\n providers: [provideModalRef(modalRef)],\n parent: this.injector,\n });\n const viewRef = this.dynamicViewService.createView(ModalComponent, {\n context: { content },\n injector,\n vcr: isViewContainerHost ? hostElement : undefined,\n });\n const onDestroy = () => {\n viewRef.destroy();\n this.openModalManager.remove(modalRef);\n };\n\n if (!isViewContainerHost) {\n hostElement.appendChild(viewRef.getElement());\n }\n modalRef.onDestroy$.pipe(finalize(() => onDestroy())).subscribe();\n }\n\n private mergeOptions(options?: Partial<ModalOptions>): ModalOptions {\n return deepmerge(\n this.moduleConfig,\n {\n id: `odx-modal-${ModalService.ID++}`,\n host: this.document.body,\n },\n options ?? {}\n ) as ModalOptions;\n }\n}\n","import { Directive, inject, Input, OnDestroy, TemplateRef } from '@angular/core';\nimport { ModalService } from './modal.service';\nimport { ModalOptions, ModalRef } from './models';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[odxModal]',\n exportAs: 'odxModal',\n})\nexport class ModalDirective implements OnDestroy {\n private readonly modalService = inject(ModalService);\n private modalRef: ModalRef | null = null;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxModal')\n public modalOptions?: Partial<ModalOptions> | '' | null;\n\n protected readonly template = inject(TemplateRef);\n\n public ngOnDestroy() {\n this.modalRef?.dismiss();\n }\n\n public open(): void {\n this.modalRef = this.modalService.open(this.template, this.modalOptions || {});\n }\n\n public dismiss(): void {\n this.modalRef?.dismiss();\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AreaHeaderModule } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { ButtonGroupComponent } from '@odx/angular/components/button-group';\nimport { ModuleConfigDependencies, ModuleConfigProvider, provideModuleConfig } from '@odx/angular/utils';\nimport { ModalFooterComponent, ModalHeaderComponent } from './components';\nimport { ModalCloseDirective, ModalContentDirective, ModalDismissDirective } from './directives';\nimport { ModalComponent } from './modal.component';\nimport { ModalModuleConfig } from './modal.config';\nimport { ModalDirective } from './modal.directive';\n\nconst modules = [ModalComponent, ModalHeaderComponent, ModalFooterComponent, ModalDirective, ModalCloseDirective, ModalContentDirective, ModalDismissDirective];\n\n@NgModule({\n imports: [ButtonComponent, ButtonGroupComponent, ...modules],\n exports: [CoreModule, AreaHeaderModule, ButtonComponent, ButtonGroupComponent, ...modules],\n})\nexport class ModalModule {\n public static forRoot<D extends ModuleConfigDependencies>(config: ModuleConfigProvider<Partial<ModalModuleConfig>, D>): ModuleWithProviders<ModalModule> {\n return {\n ngModule: ModalModule,\n providers: [provideModuleConfig(ModalModuleConfig, config)],\n };\n }\n}\n","/**\n * Generated bundle index. Do not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AE3B,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC;AAC5D,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC;AAC3F,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
@@ -2,96 +2,94 @@ import { __decorate, __metadata } from 'tslib';
2
2
  import * as i2 from '@angular/cdk/observers';
3
3
  import { ObserversModule } from '@angular/cdk/observers';
4
4
  import * as i0 from '@angular/core';
5
- import { ElementRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, inject, ChangeDetectorRef, ViewChild, NgModule } from '@angular/core';
5
+ import { Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, Input, NgModule } from '@angular/core';
6
6
  import * as i1 from '@odx/angular';
7
- import { CustomFormControl, DISABLED_CONTROLLER_PROVIDER, DisabledController, CoreModule } from '@odx/angular';
8
- import { CSSModifier, CSSComponent, detectControllerChanges } from '@odx/angular/internal';
7
+ import { DisabledController, ReadonlyController, CoreModule } from '@odx/angular';
8
+ import { RadioControlDirective, RadioGroupControlDirective, RADIO_GROUP_CONTROL } from '@odx/angular/cdk/radio-group-control';
9
+ import { CSSModifier, CSSComponent } from '@odx/angular/internal';
10
+ import { injectElement } from '@odx/angular/utils';
9
11
 
10
- let RadioGroupComponent = class RadioGroupComponent extends CustomFormControl {
11
- constructor(element) {
12
- super(null);
13
- this.element = element;
14
- this.horizontal = false;
15
- }
16
- };
17
- RadioGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RadioGroupComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
18
- RadioGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.2", type: RadioGroupComponent, isStandalone: true, selector: "odx-radio-group", inputs: { horizontal: "horizontal" }, providers: [DISABLED_CONTROLLER_PROVIDER], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"odx-radio-button, [odxRadioControl]\"></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
19
- __decorate([
20
- CSSModifier(),
21
- __metadata("design:type", Object)
22
- ], RadioGroupComponent.prototype, "horizontal", void 0);
23
- RadioGroupComponent = __decorate([
24
- CSSComponent('radio-group'),
25
- __metadata("design:paramtypes", [ElementRef])
26
- ], RadioGroupComponent);
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RadioGroupComponent, decorators: [{
28
- type: Component,
29
- args: [{ standalone: true, selector: 'odx-radio-group', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [DISABLED_CONTROLLER_PROVIDER], template: "<ng-content select=\"odx-radio-button, [odxRadioControl]\"></ng-content>\n" }]
30
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { horizontal: [{
31
- type: Input
32
- }] } });
33
-
34
- let RadioButtonComponent = class RadioButtonComponent {
35
- constructor(element) {
36
- this.element = element;
37
- this.disabledController = inject(DisabledController, { optional: true });
38
- this.radioGroup = inject(RadioGroupComponent);
39
- this['no-label'] = false;
40
- this.value = null;
41
- detectControllerChanges(inject(ChangeDetectorRef), this.radioGroup, this.disabledController).subscribe();
42
- }
43
- get isActive() {
44
- return this.radioGroup.controlValue === this.value;
45
- }
46
- get isDisabled() {
47
- return this.disabledController?.disabled ?? this.radioGroup.isDisabled;
48
- }
49
- get ariaChecked() {
50
- return this.isActive ? 'true' : 'false';
12
+ let RadioButtonComponent = class RadioButtonComponent extends RadioControlDirective {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.element = injectElement();
16
+ this.withLabel = false;
51
17
  }
52
18
  ngAfterViewInit() {
53
19
  this.onContentChange();
54
20
  }
55
21
  onContentChange() {
56
- this['no-label'] = !this.contentElement.nativeElement.textContent?.trim();
22
+ this.withLabel = !!this.contentElement.nativeElement.textContent?.trim();
57
23
  }
58
24
  };
59
- RadioButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RadioButtonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
60
- RadioButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.2", type: RadioButtonComponent, isStandalone: true, selector: "odx-radio-button", inputs: { value: "value" }, host: { properties: { "class.is-active": "isActive", "class.is-disabled": "isDisabled", "class.is-readonly": "radioGroup.readonly", "class.has-error": "radioGroup.hasError" } }, viewQueries: [{ propertyName: "contentElement", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<label class=\"odx-radio-button__label\" [class.has-focus]=\"focusMonitor.hasFocus\">\n <input\n odxMonitorFocus\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [checked]=\"isActive\"\n [disabled]=\"isDisabled || radioGroup.readonly\"\n [name]=\"radioGroup.name\"\n [readonly]=\"radioGroup.readonly\"\n [required]=\"radioGroup.required\"\n [value]=\"value\"\n (change)=\"radioGroup.updateValue(value)\"\n #focusMonitor=\"odxMonitorFocus\"\n />\n <div class=\"odx-radio-button__indicator\"></div>\n <div class=\"odx-radio-button__content\" [cdkObserveContentDisabled]=\"isDisabled\" (cdkObserveContent)=\"onContentChange()\" #content>\n <ng-content></ng-content>\n </div>\n</label>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "directive", type: i1.MonitorFocusDirective, selector: "[odxMonitorFocus]", exportAs: ["odxMonitorFocus"] }, { kind: "ngmodule", type: ObserversModule }, { kind: "directive", type: i2.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
25
+ RadioButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
26
+ RadioButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: RadioButtonComponent, isStandalone: true, selector: "odx-radio-button", providers: [DisabledController.connect(), ReadonlyController.connect()], viewQueries: [{ propertyName: "contentElement", first: true, predicate: ["content"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<label class=\"odx-radio-button__label\">\n <input\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"radioGroupControl.hasError || null\"\n [attr.aria-readonly]=\"readonlyController?.readonly || null\"\n [attr.aria-required]=\"radioGroupControl.required || null\"\n [checked]=\"isActive\"\n [disabled]=\"disabledController?.disabled || readonlyController?.readonly\"\n [name]=\"radioGroupControl.name\"\n [readonly]=\"readonlyController?.readonly\"\n [required]=\"radioGroupControl.required\"\n [value]=\"value\"\n (change)=\"radioGroupControl.updateValue(value)\"\n />\n <div class=\"odx-radio-button__indicator\"></div>\n <div class=\"odx-radio-button__content\" [cdkObserveContentDisabled]=\"disabledController?.disabled\" (cdkObserveContent)=\"onContentChange()\" #content>\n <ng-content></ng-content>\n </div>\n</label>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "directive", type: i1.ReadonlyController, selector: "[readonly]", inputs: ["readonly"] }, { kind: "ngmodule", type: ObserversModule }, { kind: "directive", type: i2.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
61
27
  __decorate([
62
28
  CSSModifier(),
63
29
  __metadata("design:type", Object)
64
- ], RadioButtonComponent.prototype, "no-label", void 0);
30
+ ], RadioButtonComponent.prototype, "withLabel", void 0);
65
31
  RadioButtonComponent = __decorate([
66
- CSSComponent('radio-button'),
67
- __metadata("design:paramtypes", [ElementRef])
32
+ CSSComponent('radio-button')
68
33
  ], RadioButtonComponent);
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RadioButtonComponent, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioButtonComponent, decorators: [{
70
35
  type: Component,
71
- args: [{ standalone: true, selector: 'odx-radio-button', imports: [CoreModule, ObserversModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
72
- '[class.is-active]': 'isActive',
73
- '[class.is-disabled]': 'isDisabled',
74
- '[class.is-readonly]': 'radioGroup.readonly',
75
- '[class.has-error]': 'radioGroup.hasError',
76
- }, template: "<label class=\"odx-radio-button__label\" [class.has-focus]=\"focusMonitor.hasFocus\">\n <input\n odxMonitorFocus\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [checked]=\"isActive\"\n [disabled]=\"isDisabled || radioGroup.readonly\"\n [name]=\"radioGroup.name\"\n [readonly]=\"radioGroup.readonly\"\n [required]=\"radioGroup.required\"\n [value]=\"value\"\n (change)=\"radioGroup.updateValue(value)\"\n #focusMonitor=\"odxMonitorFocus\"\n />\n <div class=\"odx-radio-button__indicator\"></div>\n <div class=\"odx-radio-button__content\" [cdkObserveContentDisabled]=\"isDisabled\" (cdkObserveContent)=\"onContentChange()\" #content>\n <ng-content></ng-content>\n </div>\n</label>\n" }]
77
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { 'no-label': [], value: [{
78
- type: Input
79
- }], contentElement: [{
36
+ args: [{ standalone: true, selector: 'odx-radio-button', imports: [CoreModule, ObserversModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [DisabledController.connect(), ReadonlyController.connect()], template: "<label class=\"odx-radio-button__label\">\n <input\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"radioGroupControl.hasError || null\"\n [attr.aria-readonly]=\"readonlyController?.readonly || null\"\n [attr.aria-required]=\"radioGroupControl.required || null\"\n [checked]=\"isActive\"\n [disabled]=\"disabledController?.disabled || readonlyController?.readonly\"\n [name]=\"radioGroupControl.name\"\n [readonly]=\"readonlyController?.readonly\"\n [required]=\"radioGroupControl.required\"\n [value]=\"value\"\n (change)=\"radioGroupControl.updateValue(value)\"\n />\n <div class=\"odx-radio-button__indicator\"></div>\n <div class=\"odx-radio-button__content\" [cdkObserveContentDisabled]=\"disabledController?.disabled\" (cdkObserveContent)=\"onContentChange()\" #content>\n <ng-content></ng-content>\n </div>\n</label>\n" }]
37
+ }], propDecorators: { withLabel: [], contentElement: [{
80
38
  type: ViewChild,
81
39
  args: ['content']
82
40
  }] } });
83
41
 
84
- const modules = [CoreModule, RadioGroupComponent, RadioButtonComponent];
42
+ var RadioGroupComponent_1;
43
+ let RadioGroupComponent = RadioGroupComponent_1 = class RadioGroupComponent extends RadioGroupControlDirective {
44
+ constructor() {
45
+ super(...arguments);
46
+ this.element = injectElement();
47
+ this.horizontal = false;
48
+ }
49
+ };
50
+ RadioGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
51
+ RadioGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: RadioGroupComponent, isStandalone: true, selector: "odx-radio-group", inputs: { horizontal: "horizontal" }, providers: [
52
+ {
53
+ provide: RADIO_GROUP_CONTROL,
54
+ useExisting: RadioGroupComponent_1,
55
+ multi: false,
56
+ },
57
+ DisabledController.connect(),
58
+ ReadonlyController.connect(),
59
+ ], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"odx-radio-button, [odxRadioControl]\"></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
60
+ __decorate([
61
+ CSSModifier(),
62
+ __metadata("design:type", Object)
63
+ ], RadioGroupComponent.prototype, "horizontal", void 0);
64
+ RadioGroupComponent = RadioGroupComponent_1 = __decorate([
65
+ CSSComponent('radio-group')
66
+ ], RadioGroupComponent);
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioGroupComponent, decorators: [{
68
+ type: Component,
69
+ args: [{ standalone: true, selector: 'odx-radio-group', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
70
+ {
71
+ provide: RADIO_GROUP_CONTROL,
72
+ useExisting: RadioGroupComponent,
73
+ multi: false,
74
+ },
75
+ DisabledController.connect(),
76
+ ReadonlyController.connect(),
77
+ ], template: "<ng-content select=\"odx-radio-button, [odxRadioControl]\"></ng-content>\n" }]
78
+ }], propDecorators: { horizontal: [{
79
+ type: Input
80
+ }] } });
81
+
82
+ const modules = [RadioGroupComponent, RadioButtonComponent];
85
83
  class RadioGroupModule {
86
84
  }
87
- RadioGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RadioGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
88
- RadioGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: RadioGroupModule, imports: [CoreModule, RadioGroupComponent, RadioButtonComponent], exports: [CoreModule, RadioGroupComponent, RadioButtonComponent] });
89
- RadioGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RadioGroupModule, imports: [modules, CoreModule] });
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RadioGroupModule, decorators: [{
85
+ RadioGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
86
+ RadioGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: RadioGroupModule, imports: [RadioGroupComponent, RadioButtonComponent], exports: [CoreModule, RadioGroupComponent, RadioButtonComponent] });
87
+ RadioGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioGroupModule, imports: [modules, CoreModule] });
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioGroupModule, decorators: [{
91
89
  type: NgModule,
92
90
  args: [{
93
91
  imports: modules,
94
- exports: modules,
92
+ exports: [CoreModule, ...modules],
95
93
  }]
96
94
  }] });
97
95