@odx/angular 1.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/README.md +0 -0
  2. package/animations/README.md +3 -0
  3. package/animations/config.d.ts +7 -0
  4. package/animations/fade.d.ts +2 -0
  5. package/animations/index.d.ts +2 -0
  6. package/animations/slide.d.ts +13 -0
  7. package/cdk/dynamic-view/README.md +3 -0
  8. package/cdk/dynamic-view/index.d.ts +7 -0
  9. package/cdk/dynamic-view/lib/dynamic-view.component.d.ts +12 -0
  10. package/cdk/dynamic-view/lib/dynamic-view.directive.d.ts +20 -0
  11. package/cdk/dynamic-view/lib/dynamic-view.service.d.ts +9 -0
  12. package/cdk/dynamic-view/lib/facade/animated-component.d.ts +4 -0
  13. package/cdk/dynamic-view/lib/facade/dynamic-content.d.ts +8 -0
  14. package/cdk/dynamic-view/lib/facade/dynamic-view-ref.d.ts +9 -0
  15. package/cdk/dynamic-view/lib/facade/index.d.ts +3 -0
  16. package/cdk/dynamic-view/lib/helpers/index.d.ts +4 -0
  17. package/cdk/dynamic-view/lib/helpers/is-animated-component.d.ts +3 -0
  18. package/cdk/dynamic-view/lib/helpers/is-dynamic-text-content.d.ts +2 -0
  19. package/cdk/dynamic-view/lib/helpers/is-dynamic-view.d.ts +2 -0
  20. package/cdk/dynamic-view/lib/helpers/wait-for-animations.d.ts +3 -0
  21. package/cdk/dynamic-view/lib/models/dynamic-component-ref.d.ts +16 -0
  22. package/cdk/dynamic-view/lib/models/dynamic-template-ref.d.ts +18 -0
  23. package/cdk/dynamic-view/lib/models/dynamic-view-options.d.ts +7 -0
  24. package/cdk/dynamic-view/lib/models/index.d.ts +3 -0
  25. package/cdk/dynamic-view/lib/tokens/dynamic-view-context.d.ts +5 -0
  26. package/cdk/dynamic-view/lib/tokens/index.d.ts +1 -0
  27. package/components/action-group/README.md +3 -0
  28. package/components/action-group/action-group.component.d.ts +11 -0
  29. package/components/action-group/index.d.ts +1 -0
  30. package/components/area-header/README.md +3 -0
  31. package/components/area-header/area-header.component.d.ts +10 -0
  32. package/components/area-header/area-header.module.d.ts +13 -0
  33. package/components/area-header/directives/area-header-content.directive.d.ts +5 -0
  34. package/components/area-header/directives/area-header-subtitle.directive.d.ts +5 -0
  35. package/components/area-header/directives/index.d.ts +2 -0
  36. package/components/area-header/index.d.ts +4 -0
  37. package/components/area-header/models/area-header-size.d.ts +7 -0
  38. package/components/area-header/models/index.d.ts +1 -0
  39. package/components/avatar/README.md +3 -0
  40. package/components/avatar/index.d.ts +2 -0
  41. package/components/avatar/lib/avatar.component.d.ts +10 -0
  42. package/components/avatar/lib/models/avatar-size.d.ts +6 -0
  43. package/components/avatar/lib/models/index.d.ts +1 -0
  44. package/components/badge/README.md +3 -0
  45. package/components/badge/index.d.ts +3 -0
  46. package/components/badge/lib/badge.component.d.ts +25 -0
  47. package/components/badge/lib/badge.config.d.ts +3 -0
  48. package/components/badge/lib/badge.directive.d.ts +22 -0
  49. package/components/badge/lib/facade/badge-host.d.ts +3 -0
  50. package/components/badge/lib/facade/index.d.ts +1 -0
  51. package/components/badge/lib/models/badge-position.d.ts +5 -0
  52. package/components/badge/lib/models/badge-variant.d.ts +6 -0
  53. package/components/badge/lib/models/index.d.ts +2 -0
  54. package/components/button/README.md +3 -0
  55. package/components/button/index.d.ts +2 -0
  56. package/components/button/lib/button.component.d.ts +20 -0
  57. package/components/button/lib/models/button-variant.d.ts +10 -0
  58. package/components/button/lib/models/index.d.ts +1 -0
  59. package/components/checkbox/README.md +3 -0
  60. package/components/checkbox/index.d.ts +1 -0
  61. package/components/checkbox/lib/checkbox.component.d.ts +23 -0
  62. package/components/content-box/README.md +3 -0
  63. package/components/content-box/index.d.ts +3 -0
  64. package/components/content-box/lib/content-box.component.d.ts +5 -0
  65. package/components/content-box/lib/content-box.module.d.ts +9 -0
  66. package/components/content-box/lib/directives/content-box-footer-directive.d.ts +5 -0
  67. package/components/content-box/lib/directives/content-box-header-directive.d.ts +5 -0
  68. package/components/content-box/lib/directives/index.d.ts +2 -0
  69. package/components/header/README.md +3 -0
  70. package/components/header/index.d.ts +3 -0
  71. package/components/header/lib/directives/header-avatar.directive.d.ts +5 -0
  72. package/components/header/lib/directives/header-title.directive.d.ts +5 -0
  73. package/components/header/lib/directives/index.d.ts +2 -0
  74. package/components/header/lib/header.component.d.ts +8 -0
  75. package/components/header/lib/header.module.d.ts +15 -0
  76. package/components/icon/README.md +3 -0
  77. package/components/icon/index.d.ts +2 -0
  78. package/components/icon/lib/icon.component.d.ts +11 -0
  79. package/components/icon/lib/models/icon-size.d.ts +7 -0
  80. package/components/icon/lib/models/index.d.ts +1 -0
  81. package/components/link/README.md +3 -0
  82. package/components/link/index.d.ts +1 -0
  83. package/components/link/link.directive.d.ts +11 -0
  84. package/components/logo/README.md +3 -0
  85. package/components/logo/index.d.ts +2 -0
  86. package/components/logo/logo.directive.d.ts +11 -0
  87. package/components/logo/models/index.d.ts +2 -0
  88. package/components/logo/models/logo-size.d.ts +6 -0
  89. package/components/logo/models/logo-variant.d.ts +5 -0
  90. package/components/main-menu/README.md +3 -0
  91. package/components/main-menu/index.d.ts +3 -0
  92. package/components/main-menu/lib/directives/index.d.ts +2 -0
  93. package/components/main-menu/lib/directives/main-menu-button.directive.d.ts +11 -0
  94. package/components/main-menu/lib/directives/main-menu-item.directive.d.ts +10 -0
  95. package/components/main-menu/lib/main-menu.component.d.ts +17 -0
  96. package/components/main-menu/lib/main-menu.module.d.ts +11 -0
  97. package/components/main-menu/lib/main-menu.service.d.ts +11 -0
  98. package/components/radio-group/README.md +3 -0
  99. package/components/radio-group/index.d.ts +3 -0
  100. package/components/radio-group/lib/components/index.d.ts +1 -0
  101. package/components/radio-group/lib/components/radio-button/radio-button.component.d.ts +19 -0
  102. package/components/radio-group/lib/radio-group.component.d.ts +10 -0
  103. package/components/radio-group/lib/radio-group.module.d.ts +9 -0
  104. package/esm2020/animations/config.mjs +8 -0
  105. package/esm2020/animations/fade.mjs +12 -0
  106. package/esm2020/animations/index.mjs +3 -0
  107. package/esm2020/animations/odx-angular-animations.mjs +5 -0
  108. package/esm2020/animations/slide.mjs +34 -0
  109. package/esm2020/cdk/dynamic-view/index.mjs +8 -0
  110. package/esm2020/cdk/dynamic-view/lib/dynamic-view.component.mjs +34 -0
  111. package/esm2020/cdk/dynamic-view/lib/dynamic-view.directive.mjs +79 -0
  112. package/esm2020/cdk/dynamic-view/lib/dynamic-view.service.mjs +43 -0
  113. package/esm2020/cdk/dynamic-view/lib/facade/animated-component.mjs +2 -0
  114. package/esm2020/cdk/dynamic-view/lib/facade/dynamic-content.mjs +2 -0
  115. package/esm2020/cdk/dynamic-view/lib/facade/dynamic-view-ref.mjs +2 -0
  116. package/esm2020/cdk/dynamic-view/lib/facade/index.mjs +4 -0
  117. package/esm2020/cdk/dynamic-view/lib/helpers/index.mjs +5 -0
  118. package/esm2020/cdk/dynamic-view/lib/helpers/is-animated-component.mjs +5 -0
  119. package/esm2020/cdk/dynamic-view/lib/helpers/is-dynamic-text-content.mjs +6 -0
  120. package/esm2020/cdk/dynamic-view/lib/helpers/is-dynamic-view.mjs +5 -0
  121. package/esm2020/cdk/dynamic-view/lib/helpers/wait-for-animations.mjs +9 -0
  122. package/esm2020/cdk/dynamic-view/lib/models/dynamic-component-ref.mjs +38 -0
  123. package/esm2020/cdk/dynamic-view/lib/models/dynamic-template-ref.mjs +41 -0
  124. package/esm2020/cdk/dynamic-view/lib/models/dynamic-view-options.mjs +2 -0
  125. package/esm2020/cdk/dynamic-view/lib/models/index.mjs +4 -0
  126. package/esm2020/cdk/dynamic-view/lib/tokens/dynamic-view-context.mjs +3 -0
  127. package/esm2020/cdk/dynamic-view/lib/tokens/index.mjs +2 -0
  128. package/esm2020/cdk/dynamic-view/odx-angular-cdk-dynamic-view.mjs +5 -0
  129. package/esm2020/components/action-group/action-group.component.mjs +33 -0
  130. package/esm2020/components/action-group/index.mjs +2 -0
  131. package/esm2020/components/action-group/odx-angular-components-action-group.mjs +5 -0
  132. package/esm2020/components/area-header/area-header.component.mjs +29 -0
  133. package/esm2020/components/area-header/area-header.module.mjs +46 -0
  134. package/esm2020/components/area-header/directives/area-header-content.directive.mjs +18 -0
  135. package/esm2020/components/area-header/directives/area-header-subtitle.directive.mjs +18 -0
  136. package/esm2020/components/area-header/directives/index.mjs +3 -0
  137. package/esm2020/components/area-header/index.mjs +5 -0
  138. package/esm2020/components/area-header/models/area-header-size.mjs +7 -0
  139. package/esm2020/components/area-header/models/index.mjs +2 -0
  140. package/esm2020/components/area-header/odx-angular-components-area-header.mjs +5 -0
  141. package/esm2020/components/avatar/index.mjs +3 -0
  142. package/esm2020/components/avatar/lib/avatar.component.mjs +30 -0
  143. package/esm2020/components/avatar/lib/models/avatar-size.mjs +6 -0
  144. package/esm2020/components/avatar/lib/models/index.mjs +2 -0
  145. package/esm2020/components/avatar/odx-angular-components-avatar.mjs +5 -0
  146. package/esm2020/components/badge/index.mjs +4 -0
  147. package/esm2020/components/badge/lib/badge.component.mjs +97 -0
  148. package/esm2020/components/badge/lib/badge.config.mjs +3 -0
  149. package/esm2020/components/badge/lib/badge.directive.mjs +56 -0
  150. package/esm2020/components/badge/lib/facade/badge-host.mjs +2 -0
  151. package/esm2020/components/badge/lib/facade/index.mjs +2 -0
  152. package/esm2020/components/badge/lib/models/badge-position.mjs +5 -0
  153. package/esm2020/components/badge/lib/models/badge-variant.mjs +6 -0
  154. package/esm2020/components/badge/lib/models/index.mjs +3 -0
  155. package/esm2020/components/badge/odx-angular-components-badge.mjs +5 -0
  156. package/esm2020/components/button/index.mjs +3 -0
  157. package/esm2020/components/button/lib/button.component.mjs +54 -0
  158. package/esm2020/components/button/lib/models/button-variant.mjs +10 -0
  159. package/esm2020/components/button/lib/models/index.mjs +2 -0
  160. package/esm2020/components/button/odx-angular-components-button.mjs +5 -0
  161. package/esm2020/components/checkbox/index.mjs +2 -0
  162. package/esm2020/components/checkbox/lib/checkbox.component.mjs +75 -0
  163. package/esm2020/components/checkbox/odx-angular-components-checkbox.mjs +5 -0
  164. package/esm2020/components/content-box/index.mjs +4 -0
  165. package/esm2020/components/content-box/lib/content-box.component.mjs +13 -0
  166. package/esm2020/components/content-box/lib/content-box.module.mjs +19 -0
  167. package/esm2020/components/content-box/lib/directives/content-box-footer-directive.mjs +18 -0
  168. package/esm2020/components/content-box/lib/directives/content-box-header-directive.mjs +18 -0
  169. package/esm2020/components/content-box/lib/directives/index.mjs +3 -0
  170. package/esm2020/components/content-box/odx-angular-components-content-box.mjs +5 -0
  171. package/esm2020/components/header/index.mjs +4 -0
  172. package/esm2020/components/header/lib/directives/header-avatar.directive.mjs +17 -0
  173. package/esm2020/components/header/lib/directives/header-title.directive.mjs +18 -0
  174. package/esm2020/components/header/lib/directives/index.mjs +3 -0
  175. package/esm2020/components/header/lib/header.component.mjs +23 -0
  176. package/esm2020/components/header/lib/header.module.mjs +56 -0
  177. package/esm2020/components/header/odx-angular-components-header.mjs +5 -0
  178. package/esm2020/components/icon/index.mjs +3 -0
  179. package/esm2020/components/icon/lib/icon.component.mjs +42 -0
  180. package/esm2020/components/icon/lib/models/icon-size.mjs +7 -0
  181. package/esm2020/components/icon/lib/models/index.mjs +2 -0
  182. package/esm2020/components/icon/odx-angular-components-icon.mjs +5 -0
  183. package/esm2020/components/link/index.mjs +2 -0
  184. package/esm2020/components/link/link.directive.mjs +38 -0
  185. package/esm2020/components/link/odx-angular-components-link.mjs +5 -0
  186. package/esm2020/components/logo/index.mjs +3 -0
  187. package/esm2020/components/logo/logo.directive.mjs +45 -0
  188. package/esm2020/components/logo/models/index.mjs +3 -0
  189. package/esm2020/components/logo/models/logo-size.mjs +6 -0
  190. package/esm2020/components/logo/models/logo-variant.mjs +5 -0
  191. package/esm2020/components/logo/odx-angular-components-logo.mjs +5 -0
  192. package/esm2020/components/main-menu/index.mjs +4 -0
  193. package/esm2020/components/main-menu/lib/directives/index.mjs +3 -0
  194. package/esm2020/components/main-menu/lib/directives/main-menu-button.directive.mjs +33 -0
  195. package/esm2020/components/main-menu/lib/directives/main-menu-item.directive.mjs +36 -0
  196. package/esm2020/components/main-menu/lib/main-menu.component.mjs +71 -0
  197. package/esm2020/components/main-menu/lib/main-menu.module.mjs +20 -0
  198. package/esm2020/components/main-menu/lib/main-menu.service.mjs +37 -0
  199. package/esm2020/components/main-menu/odx-angular-components-main-menu.mjs +5 -0
  200. package/esm2020/components/radio-group/index.mjs +4 -0
  201. package/esm2020/components/radio-group/lib/components/index.mjs +2 -0
  202. package/esm2020/components/radio-group/lib/components/radio-button/radio-button.component.mjs +60 -0
  203. package/esm2020/components/radio-group/lib/radio-group.component.mjs +31 -0
  204. package/esm2020/components/radio-group/lib/radio-group.module.mjs +19 -0
  205. package/esm2020/components/radio-group/odx-angular-components-radio-group.mjs +5 -0
  206. package/esm2020/index.mjs +6 -0
  207. package/esm2020/internal/abstract/controller.mjs +29 -0
  208. package/esm2020/internal/abstract/index.mjs +2 -0
  209. package/esm2020/internal/decorators/css-component.mjs +24 -0
  210. package/esm2020/internal/decorators/css-modifier.mjs +50 -0
  211. package/esm2020/internal/decorators/index.mjs +3 -0
  212. package/esm2020/internal/helpers/dom.mjs +7 -0
  213. package/esm2020/internal/helpers/get-css-variables.mjs +29 -0
  214. package/esm2020/internal/helpers/get-enum-values.mjs +6 -0
  215. package/esm2020/internal/helpers/index.mjs +7 -0
  216. package/esm2020/internal/helpers/type-guards.mjs +27 -0
  217. package/esm2020/internal/helpers/watch.mjs +8 -0
  218. package/esm2020/internal/helpers/with-mutiple-descriptors.mjs +37 -0
  219. package/esm2020/internal/index.mjs +6 -0
  220. package/esm2020/internal/odx-angular-internal.mjs +5 -0
  221. package/esm2020/internal/providers/index.mjs +2 -0
  222. package/esm2020/internal/providers/watched-controller-provider.mjs +9 -0
  223. package/esm2020/internal/types/get-properties.mjs +2 -0
  224. package/esm2020/internal/types/index.mjs +2 -0
  225. package/esm2020/lib/controllers/disabled.controller.mjs +75 -0
  226. package/esm2020/lib/controllers/index.mjs +2 -0
  227. package/esm2020/lib/controls/custom-form-control.mjs +133 -0
  228. package/esm2020/lib/controls/index.mjs +2 -0
  229. package/esm2020/lib/core.module.mjs +19 -0
  230. package/esm2020/lib/directives/control.directive.mjs +18 -0
  231. package/esm2020/lib/directives/index.mjs +3 -0
  232. package/esm2020/lib/directives/monitor-focus.directive.mjs +34 -0
  233. package/esm2020/lib/services/destroy.service.mjs +18 -0
  234. package/esm2020/lib/services/index.mjs +3 -0
  235. package/esm2020/lib/services/window-ref.mjs +32 -0
  236. package/esm2020/odx-angular.mjs +5 -0
  237. package/esm2020/rxjs/index.mjs +2 -0
  238. package/esm2020/rxjs/lib/from-events.mjs +5 -0
  239. package/esm2020/rxjs/odx-angular-rxjs.mjs +5 -0
  240. package/esm2020/utils/index.mjs +3 -0
  241. package/esm2020/utils/lib/decorators/index.mjs +2 -0
  242. package/esm2020/utils/lib/decorators/transform.mjs +14 -0
  243. package/esm2020/utils/lib/helpers/array.mjs +4 -0
  244. package/esm2020/utils/lib/helpers/index.mjs +3 -0
  245. package/esm2020/utils/lib/helpers/ng-changes.mjs +14 -0
  246. package/esm2020/utils/odx-angular-utils.mjs +5 -0
  247. package/fesm2015/odx-angular-animations.mjs +49 -0
  248. package/fesm2015/odx-angular-animations.mjs.map +1 -0
  249. package/fesm2015/odx-angular-cdk-dynamic-view.mjs +266 -0
  250. package/fesm2015/odx-angular-cdk-dynamic-view.mjs.map +1 -0
  251. package/fesm2015/odx-angular-components-action-group.mjs +39 -0
  252. package/fesm2015/odx-angular-components-action-group.mjs.map +1 -0
  253. package/fesm2015/odx-angular-components-area-header.mjs +115 -0
  254. package/fesm2015/odx-angular-components-area-header.mjs.map +1 -0
  255. package/fesm2015/odx-angular-components-avatar.mjs +41 -0
  256. package/fesm2015/odx-angular-components-avatar.mjs.map +1 -0
  257. package/fesm2015/odx-angular-components-badge.mjs +170 -0
  258. package/fesm2015/odx-angular-components-badge.mjs.map +1 -0
  259. package/fesm2015/odx-angular-components-button.mjs +74 -0
  260. package/fesm2015/odx-angular-components-button.mjs.map +1 -0
  261. package/fesm2015/odx-angular-components-checkbox.mjs +80 -0
  262. package/fesm2015/odx-angular-components-checkbox.mjs.map +1 -0
  263. package/fesm2015/odx-angular-components-content-box.mjs +66 -0
  264. package/fesm2015/odx-angular-components-content-box.mjs.map +1 -0
  265. package/fesm2015/odx-angular-components-header.mjs +111 -0
  266. package/fesm2015/odx-angular-components-header.mjs.map +1 -0
  267. package/fesm2015/odx-angular-components-icon.mjs +54 -0
  268. package/fesm2015/odx-angular-components-icon.mjs.map +1 -0
  269. package/fesm2015/odx-angular-components-link.mjs +45 -0
  270. package/fesm2015/odx-angular-components-link.mjs.map +1 -0
  271. package/fesm2015/odx-angular-components-logo.mjs +61 -0
  272. package/fesm2015/odx-angular-components-logo.mjs.map +1 -0
  273. package/fesm2015/odx-angular-components-main-menu.mjs +181 -0
  274. package/fesm2015/odx-angular-components-main-menu.mjs.map +1 -0
  275. package/fesm2015/odx-angular-components-radio-group.mjs +105 -0
  276. package/fesm2015/odx-angular-components-radio-group.mjs.map +1 -0
  277. package/fesm2015/odx-angular-internal.mjs +232 -0
  278. package/fesm2015/odx-angular-internal.mjs.map +1 -0
  279. package/fesm2015/odx-angular-rxjs.mjs +12 -0
  280. package/fesm2015/odx-angular-rxjs.mjs.map +1 -0
  281. package/fesm2015/odx-angular-utils.mjs +39 -0
  282. package/fesm2015/odx-angular-utils.mjs.map +1 -0
  283. package/fesm2015/odx-angular.mjs +320 -0
  284. package/fesm2015/odx-angular.mjs.map +1 -0
  285. package/fesm2020/odx-angular-animations.mjs +58 -0
  286. package/fesm2020/odx-angular-animations.mjs.map +1 -0
  287. package/fesm2020/odx-angular-cdk-dynamic-view.mjs +249 -0
  288. package/fesm2020/odx-angular-cdk-dynamic-view.mjs.map +1 -0
  289. package/fesm2020/odx-angular-components-action-group.mjs +39 -0
  290. package/fesm2020/odx-angular-components-action-group.mjs.map +1 -0
  291. package/fesm2020/odx-angular-components-area-header.mjs +115 -0
  292. package/fesm2020/odx-angular-components-area-header.mjs.map +1 -0
  293. package/fesm2020/odx-angular-components-avatar.mjs +41 -0
  294. package/fesm2020/odx-angular-components-avatar.mjs.map +1 -0
  295. package/fesm2020/odx-angular-components-badge.mjs +163 -0
  296. package/fesm2020/odx-angular-components-badge.mjs.map +1 -0
  297. package/fesm2020/odx-angular-components-button.mjs +69 -0
  298. package/fesm2020/odx-angular-components-button.mjs.map +1 -0
  299. package/fesm2020/odx-angular-components-checkbox.mjs +80 -0
  300. package/fesm2020/odx-angular-components-checkbox.mjs.map +1 -0
  301. package/fesm2020/odx-angular-components-content-box.mjs +66 -0
  302. package/fesm2020/odx-angular-components-content-box.mjs.map +1 -0
  303. package/fesm2020/odx-angular-components-header.mjs +111 -0
  304. package/fesm2020/odx-angular-components-header.mjs.map +1 -0
  305. package/fesm2020/odx-angular-components-icon.mjs +54 -0
  306. package/fesm2020/odx-angular-components-icon.mjs.map +1 -0
  307. package/fesm2020/odx-angular-components-link.mjs +44 -0
  308. package/fesm2020/odx-angular-components-link.mjs.map +1 -0
  309. package/fesm2020/odx-angular-components-logo.mjs +61 -0
  310. package/fesm2020/odx-angular-components-logo.mjs.map +1 -0
  311. package/fesm2020/odx-angular-components-main-menu.mjs +180 -0
  312. package/fesm2020/odx-angular-components-main-menu.mjs.map +1 -0
  313. package/fesm2020/odx-angular-components-radio-group.mjs +103 -0
  314. package/fesm2020/odx-angular-components-radio-group.mjs.map +1 -0
  315. package/fesm2020/odx-angular-internal.mjs +227 -0
  316. package/fesm2020/odx-angular-internal.mjs.map +1 -0
  317. package/fesm2020/odx-angular-rxjs.mjs +12 -0
  318. package/fesm2020/odx-angular-rxjs.mjs.map +1 -0
  319. package/fesm2020/odx-angular-utils.mjs +39 -0
  320. package/fesm2020/odx-angular-utils.mjs.map +1 -0
  321. package/fesm2020/odx-angular.mjs +313 -0
  322. package/fesm2020/odx-angular.mjs.map +1 -0
  323. package/index.d.ts +5 -0
  324. package/internal/README.md +3 -0
  325. package/internal/abstract/controller.d.ts +14 -0
  326. package/internal/abstract/index.d.ts +1 -0
  327. package/internal/decorators/css-component.d.ts +9 -0
  328. package/internal/decorators/css-modifier.d.ts +10 -0
  329. package/internal/decorators/index.d.ts +2 -0
  330. package/internal/helpers/dom.d.ts +2 -0
  331. package/internal/helpers/get-css-variables.d.ts +8 -0
  332. package/internal/helpers/get-enum-values.d.ts +4 -0
  333. package/internal/helpers/index.d.ts +6 -0
  334. package/internal/helpers/type-guards.d.ts +9 -0
  335. package/internal/helpers/watch.d.ts +4 -0
  336. package/internal/helpers/with-mutiple-descriptors.d.ts +9 -0
  337. package/internal/index.d.ts +5 -0
  338. package/internal/providers/index.d.ts +1 -0
  339. package/internal/providers/watched-controller-provider.d.ts +5 -0
  340. package/internal/types/get-properties.d.ts +5 -0
  341. package/internal/types/index.d.ts +1 -0
  342. package/lib/controllers/disabled.controller.d.ts +19 -0
  343. package/lib/controllers/index.d.ts +1 -0
  344. package/lib/controls/custom-form-control.d.ts +40 -0
  345. package/lib/controls/index.d.ts +1 -0
  346. package/lib/core.module.d.ts +10 -0
  347. package/lib/directives/control.directive.d.ts +8 -0
  348. package/lib/directives/index.d.ts +2 -0
  349. package/lib/directives/monitor-focus.directive.d.ts +12 -0
  350. package/lib/services/destroy.service.d.ts +9 -0
  351. package/lib/services/index.d.ts +2 -0
  352. package/lib/services/window-ref.d.ts +11 -0
  353. package/package.json +184 -0
  354. package/rxjs/README.md +3 -0
  355. package/rxjs/index.d.ts +1 -0
  356. package/rxjs/lib/from-events.d.ts +3 -0
  357. package/utils/README.md +3 -0
  358. package/utils/index.d.ts +2 -0
  359. package/utils/lib/decorators/index.d.ts +1 -0
  360. package/utils/lib/decorators/transform.d.ts +3 -0
  361. package/utils/lib/helpers/array.d.ts +1 -0
  362. package/utils/lib/helpers/index.d.ts +2 -0
  363. package/utils/lib/helpers/ng-changes.d.ts +10 -0
@@ -0,0 +1,320 @@
1
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
+ import * as i0 from '@angular/core';
3
+ import { Injectable, inject, InjectionToken, ChangeDetectorRef, forwardRef, Directive, Input, EventEmitter, Output, ViewChild, NgModule } from '@angular/core';
4
+ import { watchedControllerFactory, Controller, watch, detectControllerChanges } from '@odx/angular/internal';
5
+ import { ReplaySubject, startWith, map, shareReplay, filter, EMPTY } from 'rxjs';
6
+ import { DOCUMENT, CommonModule } from '@angular/common';
7
+ import { fromEvents } from '@odx/angular/rxjs';
8
+ import { __decorate, __metadata } from 'tslib';
9
+ import { NgControl, Validators } from '@angular/forms';
10
+ import { Transform } from '@odx/angular/utils';
11
+ import { FocusMonitor } from '@angular/cdk/a11y';
12
+
13
+ class DestroyService extends ReplaySubject {
14
+ constructor() {
15
+ super(1);
16
+ }
17
+ ngOnDestroy() {
18
+ this.next();
19
+ this.complete();
20
+ }
21
+ }
22
+ DestroyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: DestroyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
23
+ DestroyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: DestroyService });
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: DestroyService, decorators: [{
25
+ type: Injectable
26
+ }], ctorParameters: function () { return []; } });
27
+
28
+ class WindowRef {
29
+ constructor() {
30
+ var _a;
31
+ this.nativeWindow = (_a = inject(DOCUMENT).defaultView) !== null && _a !== void 0 ? _a : window;
32
+ this.isOnline$ = fromEvents(this.nativeWindow, 'offline', 'online').pipe(startWith(null), map(() => this.nativeWindow.navigator.onLine), shareReplay({ refCount: true }));
33
+ }
34
+ get location() {
35
+ return this.nativeWindow.location;
36
+ }
37
+ getLanguage() {
38
+ return this.nativeWindow.navigator.language;
39
+ }
40
+ getOrigin() {
41
+ return this.location.origin;
42
+ }
43
+ reloadPage() {
44
+ return this.location.reload();
45
+ }
46
+ }
47
+ WindowRef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: WindowRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
48
+ WindowRef.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: WindowRef, providedIn: 'root' });
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: WindowRef, decorators: [{
50
+ type: Injectable,
51
+ args: [{
52
+ providedIn: 'root',
53
+ }]
54
+ }] });
55
+
56
+ const ELEMENTS_WITH_DISABLED_ATTRIBUTE = {
57
+ button: true,
58
+ fieldset: true,
59
+ input: true,
60
+ optgroup: true,
61
+ option: true,
62
+ select: true,
63
+ textarea: true,
64
+ };
65
+ const DISABLED_INTERNAL_CONTROLLER = new InjectionToken('@odx/angular::DisabledController', {
66
+ factory: () => new DisabledController(null),
67
+ });
68
+ const DISABLED_CONTROLLER = new InjectionToken('@odx/angular::DisabledWatchedController');
69
+ const DISABLED_CONTROLLER_PROVIDER = [
70
+ DestroyService,
71
+ {
72
+ provide: DISABLED_CONTROLLER,
73
+ useFactory: watchedControllerFactory,
74
+ deps: [DISABLED_INTERNAL_CONTROLLER, ChangeDetectorRef, DestroyService],
75
+ },
76
+ ];
77
+ // eslint-disable-next-line @angular-eslint/directive-class-suffix
78
+ class DisabledController extends Controller {
79
+ constructor(element) {
80
+ var _a;
81
+ super();
82
+ this.isDisabled = false;
83
+ this.hasDisabledAttribute = false;
84
+ this.nodeName = (_a = element === null || element === void 0 ? void 0 : element.nativeElement.nodeName.toLowerCase()) !== null && _a !== void 0 ? _a : '';
85
+ }
86
+ set disabled(value) {
87
+ if (this.isDisabled !== value) {
88
+ this.isDisabled = coerceBooleanProperty(value);
89
+ this.hasDisabledAttribute = this.isDisabled && ELEMENTS_WITH_DISABLED_ATTRIBUTE[this.nodeName];
90
+ }
91
+ }
92
+ get disabled() {
93
+ return this.isDisabled;
94
+ }
95
+ setDisabledState(state) {
96
+ this.disabled = state;
97
+ this.ngOnChanges();
98
+ }
99
+ }
100
+ DisabledController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: DisabledController, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
101
+ DisabledController.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.2", type: DisabledController, isStandalone: true, selector: "[disabled]", inputs: { disabled: "disabled" }, host: { properties: { "attr.disabled": "hasDisabledAttribute || null" } }, providers: [
102
+ {
103
+ provide: DISABLED_INTERNAL_CONTROLLER,
104
+ useExisting: forwardRef(() => DisabledController),
105
+ },
106
+ ], usesInheritance: true, ngImport: i0 });
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: DisabledController, decorators: [{
108
+ type: Directive,
109
+ args: [{
110
+ standalone: true,
111
+ // eslint-disable-next-line @angular-eslint/directive-selector
112
+ selector: '[disabled]',
113
+ providers: [
114
+ {
115
+ provide: DISABLED_INTERNAL_CONTROLLER,
116
+ useExisting: forwardRef(() => DisabledController),
117
+ },
118
+ ],
119
+ host: {
120
+ '[attr.disabled]': 'hasDisabledAttribute || null',
121
+ },
122
+ }]
123
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { disabled: [{
124
+ type: Input
125
+ }] } });
126
+
127
+ class ControlDirective {
128
+ constructor(element) {
129
+ this.element = element;
130
+ }
131
+ }
132
+ ControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ControlDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
133
+ ControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.2", type: ControlDirective, isStandalone: true, selector: "[odxControl]", exportAs: ["odxControl"], ngImport: i0 });
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ControlDirective, decorators: [{
135
+ type: Directive,
136
+ args: [{
137
+ standalone: true,
138
+ selector: '[odxControl]',
139
+ exportAs: 'odxControl',
140
+ }]
141
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
142
+
143
+ class MonitorFocusDirective {
144
+ constructor(element) {
145
+ this.element = element;
146
+ this.focusMonitor = inject(FocusMonitor);
147
+ this.focusOrigin = null;
148
+ this.focusMonitor
149
+ .monitor(element)
150
+ .pipe(watch(inject(ChangeDetectorRef)))
151
+ .subscribe((origin) => {
152
+ this.focusOrigin = origin;
153
+ });
154
+ }
155
+ get hasFocus() {
156
+ return this.focusOrigin === 'keyboard' || this.focusOrigin === 'program';
157
+ }
158
+ ngOnDestroy() {
159
+ this.focusMonitor.stopMonitoring(this.element);
160
+ }
161
+ }
162
+ MonitorFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: MonitorFocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
163
+ MonitorFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.2", type: MonitorFocusDirective, isStandalone: true, selector: "[odxMonitorFocus]", exportAs: ["odxMonitorFocus"], ngImport: i0 });
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: MonitorFocusDirective, decorators: [{
165
+ type: Directive,
166
+ args: [{
167
+ standalone: true,
168
+ selector: '[odxMonitorFocus]',
169
+ exportAs: 'odxMonitorFocus',
170
+ }]
171
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
172
+
173
+ class CustomFormControl extends Controller {
174
+ constructor(initialValue) {
175
+ var _a, _b;
176
+ super();
177
+ this.isRequired = false;
178
+ this.changeDetector = inject(ChangeDetectorRef);
179
+ this.disabledController = inject(DISABLED_CONTROLLER, { optional: true });
180
+ this.enabled$ = (_b = (_a = this.disabledController) === null || _a === void 0 ? void 0 : _a.change$.pipe(filter(() => !this.isDisabled))) !== null && _b !== void 0 ? _b : EMPTY;
181
+ this.ngControl = inject(NgControl, { optional: true });
182
+ this.id = null;
183
+ this.name = `odx-form-control-${CustomFormControl.CURRENT_INDEX++}`;
184
+ this.readonly = false;
185
+ this.change = new EventEmitter();
186
+ this.control = null;
187
+ this.internalValue = initialValue;
188
+ if (this.ngControl) {
189
+ this.ngControl.valueAccessor = this;
190
+ }
191
+ this.enabled$.subscribe(() => this.updateRequiredValidator());
192
+ detectControllerChanges(this.changeDetector, this, this.disabledController).subscribe();
193
+ }
194
+ set required(value) {
195
+ this.isRequired = coerceBooleanProperty(value);
196
+ this.updateRequiredValidator();
197
+ }
198
+ get required() {
199
+ return this.isRequired;
200
+ }
201
+ set controlValue(value) {
202
+ if (this.internalValue !== value) {
203
+ this.internalValue = value;
204
+ this.change.emit(value);
205
+ this.triggerControllerChange();
206
+ }
207
+ }
208
+ get controlValue() {
209
+ return this.internalValue;
210
+ }
211
+ get hasError() {
212
+ var _a, _b;
213
+ return !!((_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.touched) && !!((_b = this.ngControl) === null || _b === void 0 ? void 0 : _b.invalid);
214
+ }
215
+ get isDisabled() {
216
+ var _a;
217
+ return !!((_a = this.disabledController) === null || _a === void 0 ? void 0 : _a.disabled);
218
+ }
219
+ ngAfterContentInit() {
220
+ this.updateRequiredValidator();
221
+ }
222
+ onTouched() {
223
+ // empty;
224
+ }
225
+ onChange(_value) {
226
+ // empty
227
+ }
228
+ registerOnChange(fn) {
229
+ this.onChange = fn;
230
+ }
231
+ registerOnTouched(fn) {
232
+ this.onTouched = fn;
233
+ }
234
+ setDisabledState(isDisabled) {
235
+ var _a;
236
+ (_a = this.disabledController) === null || _a === void 0 ? void 0 : _a.setDisabledState(isDisabled);
237
+ }
238
+ writeValue(value) {
239
+ this.controlValue = value;
240
+ }
241
+ updateValue(value) {
242
+ this.writeValue(value);
243
+ this.onChange(value);
244
+ this.onTouched();
245
+ }
246
+ toggleValidator(validator, state) {
247
+ var _a;
248
+ const control = (_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.control;
249
+ if (!control)
250
+ return;
251
+ const hasValidator = control.hasValidator(validator);
252
+ if (state && hasValidator)
253
+ return;
254
+ if (!state && !hasValidator)
255
+ return;
256
+ if (state) {
257
+ control.addValidators(validator);
258
+ }
259
+ else {
260
+ control.removeValidators(validator);
261
+ }
262
+ control.updateValueAndValidity();
263
+ control.markAsUntouched();
264
+ }
265
+ updateRequiredValidator() {
266
+ this.toggleValidator(Validators.required, this.isRequired);
267
+ }
268
+ }
269
+ CustomFormControl.CURRENT_INDEX = 0;
270
+ CustomFormControl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: CustomFormControl, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
271
+ CustomFormControl.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.2", type: CustomFormControl, inputs: { id: "id", name: "name", readonly: "readonly", required: "required" }, outputs: { change: "change" }, host: { properties: { "class.has-error": "hasError", "class.is-disabled": "isDisabled", "class.is-readonly": "readonly", "class.is-required": "required" } }, viewQueries: [{ propertyName: "control", first: true, predicate: ControlDirective, descendants: true }], usesInheritance: true, ngImport: i0 });
272
+ __decorate([
273
+ Transform(coerceBooleanProperty),
274
+ __metadata("design:type", Object)
275
+ ], CustomFormControl.prototype, "readonly", void 0);
276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: CustomFormControl, decorators: [{
277
+ type: Directive,
278
+ args: [{
279
+ host: {
280
+ '[class.has-error]': 'hasError',
281
+ '[class.is-disabled]': 'isDisabled',
282
+ '[class.is-readonly]': 'readonly',
283
+ '[class.is-required]': 'required',
284
+ },
285
+ }]
286
+ }], ctorParameters: function () { return [{ type: undefined }]; }, propDecorators: { id: [{
287
+ type: Input
288
+ }], name: [{
289
+ type: Input
290
+ }], readonly: [{
291
+ type: Input
292
+ }], required: [{
293
+ type: Input
294
+ }], change: [{
295
+ type: Output
296
+ }], control: [{
297
+ type: ViewChild,
298
+ args: [ControlDirective]
299
+ }] } });
300
+
301
+ const modules = [DisabledController, ControlDirective, MonitorFocusDirective];
302
+ class CoreModule {
303
+ }
304
+ CoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: CoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
305
+ CoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: CoreModule, imports: [DisabledController, ControlDirective, MonitorFocusDirective], exports: [DisabledController, ControlDirective, MonitorFocusDirective, CommonModule] });
306
+ CoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: CoreModule, imports: [CommonModule] });
307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: CoreModule, decorators: [{
308
+ type: NgModule,
309
+ args: [{
310
+ imports: modules,
311
+ exports: [...modules, CommonModule],
312
+ }]
313
+ }] });
314
+
315
+ /**
316
+ * Generated bundle index. Do not edit.
317
+ */
318
+
319
+ export { ControlDirective, CoreModule, CustomFormControl, DISABLED_CONTROLLER, DISABLED_CONTROLLER_PROVIDER, DISABLED_INTERNAL_CONTROLLER, DestroyService, DisabledController, MonitorFocusDirective, WindowRef };
320
+ //# sourceMappingURL=odx-angular.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"odx-angular.mjs","sources":["../../../../libs/angular/src/lib/services/destroy.service.ts","../../../../libs/angular/src/lib/services/window-ref.ts","../../../../libs/angular/src/lib/controllers/disabled.controller.ts","../../../../libs/angular/src/lib/directives/control.directive.ts","../../../../libs/angular/src/lib/directives/monitor-focus.directive.ts","../../../../libs/angular/src/lib/controls/custom-form-control.ts","../../../../libs/angular/src/lib/core.module.ts","../../../../libs/angular/src/odx-angular.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { ReplaySubject } from 'rxjs';\n\n@Injectable()\nexport class DestroyService extends ReplaySubject<void> implements OnDestroy {\n constructor() {\n super(1);\n }\n\n public ngOnDestroy(): void {\n this.next();\n this.complete();\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { inject, Injectable } from '@angular/core';\nimport { fromEvents } from '@odx/angular/rxjs';\nimport { map, shareReplay, startWith } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WindowRef {\n public readonly nativeWindow = inject(DOCUMENT).defaultView ?? window;\n public readonly isOnline$ = fromEvents(this.nativeWindow, 'offline', 'online').pipe(\n startWith(null),\n map(() => this.nativeWindow.navigator.onLine),\n shareReplay({ refCount: true })\n );\n\n public get location(): Location {\n return this.nativeWindow.location;\n }\n\n public getLanguage(): string {\n return this.nativeWindow.navigator.language;\n }\n\n public getOrigin(): string {\n return this.location.origin;\n }\n\n public reloadPage(): void {\n return this.location.reload();\n }\n}\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ChangeDetectorRef, Directive, ElementRef, forwardRef, InjectionToken, Input, Provider } from '@angular/core';\nimport { Controller, watchedControllerFactory } from '@odx/angular/internal';\nimport { DestroyService } from '../services';\n\nconst ELEMENTS_WITH_DISABLED_ATTRIBUTE = {\n button: true,\n fieldset: true,\n input: true,\n optgroup: true,\n option: true,\n select: true,\n textarea: true,\n} as Record<string, boolean>;\n\nexport const DISABLED_INTERNAL_CONTROLLER = new InjectionToken<DisabledController>('@odx/angular::DisabledController', {\n factory: () => new DisabledController(null),\n});\n\nexport const DISABLED_CONTROLLER = new InjectionToken<DisabledController>('@odx/angular::DisabledWatchedController');\nexport const DISABLED_CONTROLLER_PROVIDER: Provider = [\n DestroyService,\n {\n provide: DISABLED_CONTROLLER,\n useFactory: watchedControllerFactory,\n deps: [DISABLED_INTERNAL_CONTROLLER, ChangeDetectorRef, DestroyService],\n },\n];\n\n@Directive({\n standalone: true,\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[disabled]',\n providers: [\n {\n provide: DISABLED_INTERNAL_CONTROLLER,\n useExisting: forwardRef(() => DisabledController),\n },\n ],\n host: {\n '[attr.disabled]': 'hasDisabledAttribute || null',\n },\n})\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport class DisabledController extends Controller {\n public static ngAcceptInputType_disabled: BooleanInput;\n\n private readonly nodeName: string;\n private isDisabled = false;\n\n protected hasDisabledAttribute = false;\n\n @Input()\n public set disabled(value: unknown) {\n if (this.isDisabled !== value) {\n this.isDisabled = coerceBooleanProperty(value);\n this.hasDisabledAttribute = this.isDisabled && ELEMENTS_WITH_DISABLED_ATTRIBUTE[this.nodeName];\n }\n }\n public get disabled(): boolean {\n return this.isDisabled;\n }\n\n constructor(element: ElementRef<HTMLElement> | null) {\n super();\n this.nodeName = element?.nativeElement.nodeName.toLowerCase() ?? '';\n }\n\n public setDisabledState(state: boolean): void {\n this.disabled = state;\n this.ngOnChanges();\n }\n}\n","import { Directive, ElementRef } from '@angular/core';\n\n@Directive({\n standalone: true,\n selector: '[odxControl]',\n exportAs: 'odxControl',\n})\nexport class ControlDirective {\n constructor(public readonly element: ElementRef<HTMLElement>) {}\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { ChangeDetectorRef, Directive, ElementRef, inject, OnDestroy } from '@angular/core';\nimport { watch } from '@odx/angular/internal';\n\n@Directive({\n standalone: true,\n selector: '[odxMonitorFocus]',\n exportAs: 'odxMonitorFocus',\n})\nexport class MonitorFocusDirective implements OnDestroy {\n private readonly focusMonitor = inject(FocusMonitor);\n\n private focusOrigin: FocusOrigin = null;\n\n public get hasFocus(): boolean {\n return this.focusOrigin === 'keyboard' || this.focusOrigin === 'program';\n }\n\n constructor(private readonly element: ElementRef<HTMLElement>) {\n this.focusMonitor\n .monitor(element)\n .pipe(watch(inject(ChangeDetectorRef)))\n .subscribe((origin) => {\n this.focusOrigin = origin;\n });\n }\n\n public ngOnDestroy(): void {\n this.focusMonitor.stopMonitoring(this.element);\n }\n}\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { AfterContentInit, ChangeDetectorRef, Directive, EventEmitter, inject, Input, Output, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NgControl, ValidatorFn, Validators } from '@angular/forms';\nimport { Controller, detectControllerChanges } from '@odx/angular/internal';\nimport { Transform } from '@odx/angular/utils';\nimport { EMPTY, filter } from 'rxjs';\nimport { DISABLED_CONTROLLER } from '../controllers';\nimport { ControlDirective } from '../directives';\n\n@Directive({\n host: {\n '[class.has-error]': 'hasError',\n '[class.is-disabled]': 'isDisabled',\n '[class.is-readonly]': 'readonly',\n '[class.is-required]': 'required',\n },\n})\nexport abstract class CustomFormControl<T> extends Controller implements ControlValueAccessor, AfterContentInit {\n private static CURRENT_INDEX = 0;\n public static ngAcceptInputType_required: BooleanInput;\n\n private internalValue: T;\n private isRequired = false;\n\n protected readonly changeDetector = inject(ChangeDetectorRef);\n protected readonly disabledController = inject(DISABLED_CONTROLLER, { optional: true });\n protected readonly enabled$ = this.disabledController?.change$.pipe(filter(() => !this.isDisabled)) ?? EMPTY;\n protected readonly ngControl = inject(NgControl, { optional: true });\n\n @Input()\n public id: string | null = null;\n\n @Input()\n public name = `odx-form-control-${CustomFormControl.CURRENT_INDEX++}`;\n\n @Input()\n @Transform(coerceBooleanProperty)\n public readonly = false;\n\n @Input()\n public set required(value: unknown) {\n this.isRequired = coerceBooleanProperty(value);\n this.updateRequiredValidator();\n }\n public get required(): boolean {\n return this.isRequired;\n }\n\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-native\n public readonly change = new EventEmitter<T>();\n\n public set controlValue(value: T) {\n if (this.internalValue !== value) {\n this.internalValue = value;\n this.change.emit(value);\n this.triggerControllerChange();\n }\n }\n public get controlValue(): T {\n return this.internalValue;\n }\n\n public get hasError(): boolean {\n return !!this.ngControl?.touched && !!this.ngControl?.invalid;\n }\n\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n @ViewChild(ControlDirective)\n public readonly control: ControlDirective | null = null;\n\n constructor(initialValue: T) {\n super();\n this.internalValue = initialValue;\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n this.enabled$.subscribe(() => this.updateRequiredValidator());\n detectControllerChanges(this.changeDetector, this, this.disabledController).subscribe();\n }\n\n public ngAfterContentInit(): void {\n this.updateRequiredValidator();\n }\n\n public onTouched() {\n // empty;\n }\n\n public onChange(_value: T) {\n // empty\n }\n\n public registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n public setDisabledState(isDisabled: boolean): void {\n this.disabledController?.setDisabledState(isDisabled);\n }\n\n public writeValue(value: T): void {\n this.controlValue = value;\n }\n\n public updateValue(value: T): void {\n this.writeValue(value);\n this.onChange(value);\n this.onTouched();\n }\n\n protected toggleValidator(validator: ValidatorFn, state: boolean): void {\n const control = this.ngControl?.control;\n if (!control) return;\n const hasValidator = control.hasValidator(validator);\n if (state && hasValidator) return;\n if (!state && !hasValidator) return;\n if (state) {\n control.addValidators(validator);\n } else {\n control.removeValidators(validator);\n }\n control.updateValueAndValidity();\n control.markAsUntouched();\n }\n\n protected updateRequiredValidator(): void {\n this.toggleValidator(Validators.required, this.isRequired);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { DisabledController } from './controllers';\nimport { ControlDirective, MonitorFocusDirective } from './directives';\n\nconst modules = [DisabledController, ControlDirective, MonitorFocusDirective];\n@NgModule({\n imports: modules,\n exports: [...modules, CommonModule],\n})\nexport class CoreModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAIM,MAAO,cAAe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AAM,EAAA,CAAA;sBAFrB,MAAM;gBAwBS,OAAO,EAAA,CAAA;sBADtB,SAAS;uBAAC,gBAAgB,CAAA;;;AClE7B,MAAM,OAAO,GAAG,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;MAKjE,UAAU,CAAA;;uGAAV,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAV,UAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,EALN,OAAA,EAAA,CAAA,kBAAkB,EAAE,gBAAgB,EAAE,qBAAqB,CAA3D,EAAA,OAAA,EAAA,CAAA,kBAAkB,EAAE,gBAAgB,EAAE,qBAAqB,EAGpD,YAAY,CAAA,EAAA,CAAA,CAAA;AAEvB,UAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,YAFC,YAAY,CAAA,EAAA,CAAA,CAAA;2FAEvB,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,YAAY,CAAC;iBACpC,CAAA;;;ACTD;;AAEG;;;;"}
@@ -0,0 +1,58 @@
1
+ import { animation, style, animate } from '@angular/animations';
2
+
3
+ const DEFAULT_ANIMATION_TIMING_FN = 'ease';
4
+ const DEFAULT_ANIMATION_DURATION = '250ms';
5
+ const DEFAULT_ANIMATION_PARAMS = {
6
+ timingFn: DEFAULT_ANIMATION_TIMING_FN,
7
+ duration: DEFAULT_ANIMATION_DURATION,
8
+ delay: '0ms',
9
+ };
10
+
11
+ const fadeIn = (to = 1) => animation([style({ opacity: 0 }), animate('{{duration}} {{ delay }} {{ timingFn }}', style({ opacity: to }))], {
12
+ params: {
13
+ ...DEFAULT_ANIMATION_PARAMS,
14
+ to: 1,
15
+ },
16
+ });
17
+ const fadeOut = (to = 0) => animation([animate('{{duration}} {{ delay }} {{ timingFn }}', style({ opacity: to }))], {
18
+ params: DEFAULT_ANIMATION_PARAMS,
19
+ });
20
+
21
+ function createSlideInAnimation(from, direction) {
22
+ return animation([
23
+ style({ transform: `translate${direction}({{ from }})` }),
24
+ animate('{{duration}} {{ delay }} {{ timingFn }}', style({ transform: `translate${direction}(0)` })),
25
+ ], {
26
+ params: {
27
+ ...DEFAULT_ANIMATION_PARAMS,
28
+ from,
29
+ },
30
+ });
31
+ }
32
+ function createSlideOutAnimation(to, direction) {
33
+ return animation([animate('{{duration}} {{ delay }} {{ timingFn }}', style({ transform: `translate${direction}({{ to }})` }))], {
34
+ params: {
35
+ ...DEFAULT_ANIMATION_PARAMS,
36
+ to,
37
+ },
38
+ });
39
+ }
40
+ const slideInX = (from) => createSlideInAnimation(from, 'X');
41
+ const slideInY = (from) => createSlideInAnimation(from, 'Y');
42
+ const slideInDown = slideInY('-100%');
43
+ const slideInUp = slideInY('100%');
44
+ const slideInLeft = slideInX('-100%');
45
+ const slideInRight = slideInX('100%');
46
+ const slideOutX = (to) => createSlideOutAnimation(to, 'X');
47
+ const slideOutY = (to) => createSlideOutAnimation(to, 'Y');
48
+ const slideOutDown = slideOutY('100%');
49
+ const slideOutUp = slideOutY('-100%');
50
+ const slideOutLeft = slideOutX('-100%');
51
+ const slideOutRight = slideOutX('100%');
52
+
53
+ /**
54
+ * Generated bundle index. Do not edit.
55
+ */
56
+
57
+ export { fadeIn, fadeOut, slideInDown, slideInLeft, slideInRight, slideInUp, slideInX, slideInY, slideOutDown, slideOutLeft, slideOutRight, slideOutUp, slideOutX, slideOutY };
58
+ //# sourceMappingURL=odx-angular-animations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"odx-angular-animations.mjs","sources":["../../../../libs/angular/animations/src/config.ts","../../../../libs/angular/animations/src/fade.ts","../../../../libs/angular/animations/src/slide.ts","../../../../libs/angular/animations/src/odx-angular-animations.ts"],"sourcesContent":["export const DEFAULT_ANIMATION_TIMING_FN = 'ease';\nexport const DEFAULT_ANIMATION_DURATION = '250ms';\nexport const DEFAULT_ANIMATION_PARAMS = {\n timingFn: DEFAULT_ANIMATION_TIMING_FN,\n duration: DEFAULT_ANIMATION_DURATION,\n delay: '0ms',\n};\n","import { animate, animation, style } from '@angular/animations';\nimport { DEFAULT_ANIMATION_PARAMS } from './config';\n\nexport const fadeIn = (to = 1) =>\n animation([style({ opacity: 0 }), animate('{{duration}} {{ delay }} {{ timingFn }}', style({ opacity: to }))], {\n params: {\n ...DEFAULT_ANIMATION_PARAMS,\n to: 1,\n },\n });\n\nexport const fadeOut = (to = 0) =>\n animation([animate('{{duration}} {{ delay }} {{ timingFn }}', style({ opacity: to }))], {\n params: DEFAULT_ANIMATION_PARAMS,\n });\n","import { animate, animation, AnimationReferenceMetadata, style } from '@angular/animations';\nimport { DEFAULT_ANIMATION_PARAMS } from './config';\n\nfunction createSlideInAnimation(from: string, direction: 'X' | 'Y'): AnimationReferenceMetadata {\n return animation(\n [\n style({ transform: `translate${direction}({{ from }})` }),\n animate('{{duration}} {{ delay }} {{ timingFn }}', style({ transform: `translate${direction}(0)` })),\n ],\n {\n params: {\n ...DEFAULT_ANIMATION_PARAMS,\n from,\n },\n }\n );\n}\n\nfunction createSlideOutAnimation(to: string, direction: 'X' | 'Y'): AnimationReferenceMetadata {\n return animation([animate('{{duration}} {{ delay }} {{ timingFn }}', style({ transform: `translate${direction}({{ to }})` }))], {\n params: {\n ...DEFAULT_ANIMATION_PARAMS,\n to,\n },\n });\n}\n\nexport const slideInX = (from: string) => createSlideInAnimation(from, 'X');\nexport const slideInY = (from: string) => createSlideInAnimation(from, 'Y');\nexport const slideInDown = slideInY('-100%');\nexport const slideInUp = slideInY('100%');\nexport const slideInLeft = slideInX('-100%');\nexport const slideInRight = slideInX('100%');\n\nexport const slideOutX = (to: string) => createSlideOutAnimation(to, 'X');\nexport const slideOutY = (to: string) => createSlideOutAnimation(to, 'Y');\nexport const slideOutDown = slideOutY('100%');\nexport const slideOutUp = slideOutY('-100%');\nexport const slideOutLeft = slideOutX('-100%');\nexport const slideOutRight = slideOutX('100%');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAO,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAC3C,MAAM,0BAA0B,GAAG,OAAO,CAAC;AAC3C,MAAM,wBAAwB,GAAG;AACtC,IAAA,QAAQ,EAAE,2BAA2B;AACrC,IAAA,QAAQ,EAAE,0BAA0B;AACpC,IAAA,KAAK,EAAE,KAAK;CACb;;ACHY,MAAA,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,KAC3B,SAAS,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,yCAAyC,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE;AAC7G,IAAA,MAAM,EAAE;AACN,QAAA,GAAG,wBAAwB;AAC3B,QAAA,EAAE,EAAE,CAAC;AACN,KAAA;AACF,CAAA,EAAE;AAEE,MAAM,OAAO,GAAG,CAAC,EAAE,GAAG,CAAC,KAC5B,SAAS,CAAC,CAAC,OAAO,CAAC,yCAAyC,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE;AACtF,IAAA,MAAM,EAAE,wBAAwB;AACjC,CAAA;;ACXH,SAAS,sBAAsB,CAAC,IAAY,EAAE,SAAoB,EAAA;AAChE,IAAA,OAAO,SAAS,CACd;QACE,KAAK,CAAC,EAAE,SAAS,EAAE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