@coolon/angular-ui-powerups 0.0.135 → 1.0.0-alpha.12

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 (419) hide show
  1. package/CHANGELOG.md +303 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +1142 -6275
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +16 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/coolon-angular-ui-powerups.js +1 -5
  8. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  9. package/esm2015/index.js +1 -5
  10. package/esm2015/index.js.map +1 -1
  11. package/esm2015/lib/angular-ui-powerups.module.js +32 -32
  12. package/esm2015/lib/angular-ui-powerups.module.js.map +1 -1
  13. package/esm2015/lib/angular-ui-powerups.module.metadata.json +1 -1
  14. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  15. package/esm2015/lib/animations/index.js +1 -5
  16. package/esm2015/lib/animations/index.js.map +1 -1
  17. package/esm2015/lib/animations/slide-animations.js +0 -8
  18. package/esm2015/lib/animations/slide-animations.js.map +1 -1
  19. package/esm2015/lib/components/components.module.js +39 -39
  20. package/esm2015/lib/components/components.module.js.map +1 -1
  21. package/esm2015/lib/components/components.module.metadata.json +1 -1
  22. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  23. package/esm2015/lib/components/disposable-component.js +8 -9
  24. package/esm2015/lib/components/disposable-component.js.map +1 -1
  25. package/esm2015/lib/components/disposable-component.metadata.json +1 -1
  26. package/esm2015/lib/components/forms/abstract-input.component.js +82 -114
  27. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  28. package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
  29. package/esm2015/lib/components/forms/number-input/number-input.component.js +12 -18
  30. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  31. package/esm2015/lib/components/forms/password-input/password-input.component.js +12 -18
  32. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  33. package/esm2015/lib/components/forms/select-input/select-input.component.js +38 -57
  34. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  35. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  36. package/esm2015/lib/components/forms/string-input/string-input.component.js +19 -41
  37. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  38. package/esm2015/lib/components/index.js +13 -17
  39. package/esm2015/lib/components/index.js.map +1 -1
  40. package/esm2015/lib/components/noop/noop.component.js +12 -15
  41. package/esm2015/lib/components/noop/noop.component.js.map +1 -1
  42. package/esm2015/lib/components/resize-aware.component.js +17 -64
  43. package/esm2015/lib/components/resize-aware.component.js.map +1 -1
  44. package/esm2015/lib/components/resize-aware.component.metadata.json +1 -1
  45. package/esm2015/lib/components/scroll-container/scroll-container.component.js +12 -18
  46. package/esm2015/lib/components/scroll-container/scroll-container.component.js.map +1 -1
  47. package/esm2015/lib/components/types/bounds.class.js +0 -29
  48. package/esm2015/lib/components/types/bounds.class.js.map +1 -1
  49. package/esm2015/lib/components/types/dimension.class.js +0 -14
  50. package/esm2015/lib/components/types/dimension.class.js.map +1 -1
  51. package/esm2015/lib/components/types/point.class.js +0 -23
  52. package/esm2015/lib/components/types/point.class.js.map +1 -1
  53. package/esm2015/lib/directives/command.directive.js +31 -85
  54. package/esm2015/lib/directives/command.directive.js.map +1 -1
  55. package/esm2015/lib/directives/directives.module.js +28 -28
  56. package/esm2015/lib/directives/directives.module.js.map +1 -1
  57. package/esm2015/lib/directives/directives.module.metadata.json +1 -1
  58. package/esm2015/lib/directives/directives.module.ngfactory.js.map +1 -1
  59. package/esm2015/lib/directives/focus-binding.directive.js +41 -96
  60. package/esm2015/lib/directives/focus-binding.directive.js.map +1 -1
  61. package/esm2015/lib/directives/index.js +3 -7
  62. package/esm2015/lib/directives/index.js.map +1 -1
  63. package/esm2015/lib/interaction/abstract-interaction-context.js +4 -73
  64. package/esm2015/lib/interaction/abstract-interaction-context.js.map +1 -1
  65. package/esm2015/lib/interaction/activity-ref.js +2 -79
  66. package/esm2015/lib/interaction/activity-ref.js.map +1 -1
  67. package/esm2015/lib/interaction/activity.js +0 -72
  68. package/esm2015/lib/interaction/activity.js.map +1 -1
  69. package/esm2015/lib/interaction/alert.js +0 -22
  70. package/esm2015/lib/interaction/alert.js.map +1 -1
  71. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +41 -187
  72. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  73. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +24 -74
  74. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  75. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +13 -24
  76. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
  77. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +15 -62
  78. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
  79. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +13 -27
  80. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
  81. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +16 -71
  82. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  83. package/esm2015/lib/interaction/confirm.js +0 -16
  84. package/esm2015/lib/interaction/confirm.js.map +1 -1
  85. package/esm2015/lib/interaction/index.js +15 -24
  86. package/esm2015/lib/interaction/index.js.map +1 -1
  87. package/esm2015/lib/interaction/interaction-context.js +0 -50
  88. package/esm2015/lib/interaction/interaction-context.js.map +1 -1
  89. package/esm2015/lib/interaction/interaction.module.js +41 -41
  90. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  91. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  92. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  93. package/esm2015/lib/interaction/result.js +2 -23
  94. package/esm2015/lib/interaction/result.js.map +1 -1
  95. package/esm2015/lib/interaction/route-synchronisation-adapter.js +0 -16
  96. package/esm2015/lib/interaction/route-synchronisation-adapter.js.map +1 -1
  97. package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js +0 -43
  98. package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -1
  99. package/esm2015/lib/interaction/services/interaction.service.js +22 -172
  100. package/esm2015/lib/interaction/services/interaction.service.js.map +1 -1
  101. package/esm2015/lib/interaction/services/interaction.service.metadata.json +1 -1
  102. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +17 -40
  103. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
  104. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.metadata.json +1 -1
  105. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +7 -86
  106. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
  107. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.metadata.json +1 -1
  108. package/esm2015/lib/interaction/services/modal-interaction-context.factory.js +0 -16
  109. package/esm2015/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
  110. package/esm2015/lib/place/components/abstract-place-navigation.component.js +36 -105
  111. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  112. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js +17 -34
  113. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
  114. package/esm2015/lib/place/components/empty-state/empty-state.component.js +12 -18
  115. package/esm2015/lib/place/components/empty-state/empty-state.component.js.map +1 -1
  116. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +16 -33
  117. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  118. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +52 -240
  119. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  120. package/esm2015/lib/place/components/place-outlet/route-animations.js +0 -12
  121. package/esm2015/lib/place/components/place-outlet/route-animations.js.map +1 -1
  122. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +12 -17
  123. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  124. package/esm2015/lib/place/guards/consolidated-param-map.js +9 -92
  125. package/esm2015/lib/place/guards/consolidated-param-map.js.map +1 -1
  126. package/esm2015/lib/place/guards/noop-auth-guard.service.js +12 -21
  127. package/esm2015/lib/place/guards/noop-auth-guard.service.js.map +1 -1
  128. package/esm2015/lib/place/guards/noop-auth-guard.service.metadata.json +1 -1
  129. package/esm2015/lib/place/guards/place.guard.js +10 -119
  130. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  131. package/esm2015/lib/place/index.js +38 -46
  132. package/esm2015/lib/place/index.js.map +1 -1
  133. package/esm2015/lib/place/nav-item.js +0 -22
  134. package/esm2015/lib/place/nav-item.js.map +1 -1
  135. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +3 -49
  136. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
  137. package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js +0 -23
  138. package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -1
  139. package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +0 -11
  140. package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -1
  141. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +2 -51
  142. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -1
  143. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +2 -54
  144. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -1
  145. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +2 -60
  146. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -1
  147. package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js +0 -24
  148. package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -1
  149. package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +1 -19
  150. package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -1
  151. package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +0 -55
  152. package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -1
  153. package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +4 -60
  154. package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -1
  155. package/esm2015/lib/place/navigation/session/navigating.js +0 -31
  156. package/esm2015/lib/place/navigation/session/navigating.js.map +1 -1
  157. package/esm2015/lib/place/navigation/session/navigation-context.js +0 -24
  158. package/esm2015/lib/place/navigation/session/navigation-context.js.map +1 -1
  159. package/esm2015/lib/place/navigation/session/navigation-session.js +12 -178
  160. package/esm2015/lib/place/navigation/session/navigation-session.js.map +1 -1
  161. package/esm2015/lib/place/navigation/session/pop-state-navigation.js +0 -16
  162. package/esm2015/lib/place/navigation/session/pop-state-navigation.js.map +1 -1
  163. package/esm2015/lib/place/place-component.js +22 -107
  164. package/esm2015/lib/place/place-component.js.map +1 -1
  165. package/esm2015/lib/place/place-component.metadata.json +1 -1
  166. package/esm2015/lib/place/place-config.js +0 -13
  167. package/esm2015/lib/place/place-config.js.map +1 -1
  168. package/esm2015/lib/place/place-definition.js +26 -163
  169. package/esm2015/lib/place/place-definition.js.map +1 -1
  170. package/esm2015/lib/place/place-history.js +11 -38
  171. package/esm2015/lib/place/place-history.js.map +1 -1
  172. package/esm2015/lib/place/place-history.metadata.json +1 -1
  173. package/esm2015/lib/place/place-router.js +38 -247
  174. package/esm2015/lib/place/place-router.js.map +1 -1
  175. package/esm2015/lib/place/place-router.metadata.json +1 -1
  176. package/esm2015/lib/place/place.decorator.js +3 -38
  177. package/esm2015/lib/place/place.decorator.js.map +1 -1
  178. package/esm2015/lib/place/place.module.js +40 -42
  179. package/esm2015/lib/place/place.module.js.map +1 -1
  180. package/esm2015/lib/place/place.module.metadata.json +1 -1
  181. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  182. package/esm2015/lib/place/route/formatter.js +0 -30
  183. package/esm2015/lib/place/route/formatter.js.map +1 -1
  184. package/esm2015/lib/place/route/json-types.js +0 -12
  185. package/esm2015/lib/place/route/json-types.js.map +1 -1
  186. package/esm2015/lib/place/route/parameter-decorators.js +14 -133
  187. package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
  188. package/esm2015/lib/place/route/parameter-definition.class.js +2 -147
  189. package/esm2015/lib/place/route/parameter-definition.class.js.map +1 -1
  190. package/esm2015/lib/place/route/parameter-sanitiser.js +0 -18
  191. package/esm2015/lib/place/route/parameter-sanitiser.js.map +1 -1
  192. package/esm2015/lib/place/route/parameter-snapshot.js +0 -19
  193. package/esm2015/lib/place/route/parameter-snapshot.js.map +1 -1
  194. package/esm2015/lib/place/route/visit-sanitiser.js +2 -47
  195. package/esm2015/lib/place/route/visit-sanitiser.js.map +1 -1
  196. package/esm2015/lib/place/url-service.js +13 -68
  197. package/esm2015/lib/place/url-service.js.map +1 -1
  198. package/esm2015/lib/place/url-service.metadata.json +1 -1
  199. package/esm2015/lib/place/url-snapshot.js +3 -86
  200. package/esm2015/lib/place/url-snapshot.js.map +1 -1
  201. package/esm2015/lib/place/visit.js +5 -73
  202. package/esm2015/lib/place/visit.js.map +1 -1
  203. package/esm2015/public_api.js +6 -10
  204. package/esm2015/public_api.js.map +1 -1
  205. package/esm5/coolon-angular-ui-powerups.js +1 -5
  206. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  207. package/esm5/index.js +1 -5
  208. package/esm5/index.js.map +1 -1
  209. package/esm5/lib/angular-ui-powerups.module.js +29 -30
  210. package/esm5/lib/angular-ui-powerups.module.js.map +1 -1
  211. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  212. package/esm5/lib/animations/index.js +1 -5
  213. package/esm5/lib/animations/index.js.map +1 -1
  214. package/esm5/lib/animations/slide-animations.js +0 -8
  215. package/esm5/lib/animations/slide-animations.js.map +1 -1
  216. package/esm5/lib/components/components.module.js +36 -37
  217. package/esm5/lib/components/components.module.js.map +1 -1
  218. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  219. package/esm5/lib/components/disposable-component.js +7 -13
  220. package/esm5/lib/components/disposable-component.js.map +1 -1
  221. package/esm5/lib/components/forms/abstract-input.component.js +95 -157
  222. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  223. package/esm5/lib/components/forms/number-input/number-input.component.js +11 -22
  224. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  225. package/esm5/lib/components/forms/password-input/password-input.component.js +11 -22
  226. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  227. package/esm5/lib/components/forms/select-input/select-input.component.js +38 -61
  228. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  229. package/esm5/lib/components/forms/string-input/string-input.component.js +19 -45
  230. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  231. package/esm5/lib/components/index.js +13 -17
  232. package/esm5/lib/components/index.js.map +1 -1
  233. package/esm5/lib/components/noop/noop.component.js +9 -13
  234. package/esm5/lib/components/noop/noop.component.js.map +1 -1
  235. package/esm5/lib/components/resize-aware.component.js +21 -80
  236. package/esm5/lib/components/resize-aware.component.js.map +1 -1
  237. package/esm5/lib/components/scroll-container/scroll-container.component.js +10 -20
  238. package/esm5/lib/components/scroll-container/scroll-container.component.js.map +1 -1
  239. package/esm5/lib/components/types/bounds.class.js +3 -30
  240. package/esm5/lib/components/types/bounds.class.js.map +1 -1
  241. package/esm5/lib/components/types/dimension.class.js +0 -10
  242. package/esm5/lib/components/types/dimension.class.js.map +1 -1
  243. package/esm5/lib/components/types/point.class.js +2 -30
  244. package/esm5/lib/components/types/point.class.js.map +1 -1
  245. package/esm5/lib/directives/command.directive.js +37 -103
  246. package/esm5/lib/directives/command.directive.js.map +1 -1
  247. package/esm5/lib/directives/directives.module.js +25 -26
  248. package/esm5/lib/directives/directives.module.js.map +1 -1
  249. package/esm5/lib/directives/directives.module.ngfactory.js.map +1 -1
  250. package/esm5/lib/directives/focus-binding.directive.js +50 -147
  251. package/esm5/lib/directives/focus-binding.directive.js.map +1 -1
  252. package/esm5/lib/directives/index.js +3 -7
  253. package/esm5/lib/directives/index.js.map +1 -1
  254. package/esm5/lib/interaction/abstract-interaction-context.js +7 -114
  255. package/esm5/lib/interaction/abstract-interaction-context.js.map +1 -1
  256. package/esm5/lib/interaction/activity-ref.js +12 -109
  257. package/esm5/lib/interaction/activity-ref.js.map +1 -1
  258. package/esm5/lib/interaction/activity.js +12 -121
  259. package/esm5/lib/interaction/activity.js.map +1 -1
  260. package/esm5/lib/interaction/alert.js +0 -22
  261. package/esm5/lib/interaction/alert.js.map +1 -1
  262. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +64 -330
  263. package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  264. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +26 -79
  265. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  266. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +12 -25
  267. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
  268. package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +17 -72
  269. package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
  270. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +13 -32
  271. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
  272. package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +24 -117
  273. package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  274. package/esm5/lib/interaction/confirm.js +0 -16
  275. package/esm5/lib/interaction/confirm.js.map +1 -1
  276. package/esm5/lib/interaction/index.js +15 -24
  277. package/esm5/lib/interaction/index.js.map +1 -1
  278. package/esm5/lib/interaction/interaction-context.js +0 -50
  279. package/esm5/lib/interaction/interaction-context.js.map +1 -1
  280. package/esm5/lib/interaction/interaction.module.js +38 -39
  281. package/esm5/lib/interaction/interaction.module.js.map +1 -1
  282. package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  283. package/esm5/lib/interaction/result.js +2 -23
  284. package/esm5/lib/interaction/result.js.map +1 -1
  285. package/esm5/lib/interaction/route-synchronisation-adapter.js +0 -16
  286. package/esm5/lib/interaction/route-synchronisation-adapter.js.map +1 -1
  287. package/esm5/lib/interaction/services/interaction-service-routing-adapter.js +6 -73
  288. package/esm5/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -1
  289. package/esm5/lib/interaction/services/interaction.service.js +33 -290
  290. package/esm5/lib/interaction/services/interaction.service.js.map +1 -1
  291. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +16 -41
  292. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
  293. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +14 -109
  294. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
  295. package/esm5/lib/interaction/services/modal-interaction-context.factory.js +1 -23
  296. package/esm5/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
  297. package/esm5/lib/place/components/abstract-place-navigation.component.js +37 -115
  298. package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  299. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js +16 -37
  300. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
  301. package/esm5/lib/place/components/empty-state/empty-state.component.js +10 -20
  302. package/esm5/lib/place/components/empty-state/empty-state.component.js.map +1 -1
  303. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +17 -42
  304. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  305. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +64 -314
  306. package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  307. package/esm5/lib/place/components/place-outlet/route-animations.js +0 -12
  308. package/esm5/lib/place/components/place-outlet/route-animations.js.map +1 -1
  309. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +10 -14
  310. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  311. package/esm5/lib/place/guards/consolidated-param-map.js +17 -117
  312. package/esm5/lib/place/guards/consolidated-param-map.js.map +1 -1
  313. package/esm5/lib/place/guards/noop-auth-guard.service.js +11 -26
  314. package/esm5/lib/place/guards/noop-auth-guard.service.js.map +1 -1
  315. package/esm5/lib/place/guards/place.guard.js +24 -172
  316. package/esm5/lib/place/guards/place.guard.js.map +1 -1
  317. package/esm5/lib/place/index.js +38 -46
  318. package/esm5/lib/place/index.js.map +1 -1
  319. package/esm5/lib/place/nav-item.js +0 -22
  320. package/esm5/lib/place/nav-item.js.map +1 -1
  321. package/esm5/lib/place/navigation/place-component-deactivation-handler.js +11 -86
  322. package/esm5/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
  323. package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js +4 -34
  324. package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -1
  325. package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +4 -25
  326. package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -1
  327. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +11 -110
  328. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -1
  329. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +12 -147
  330. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -1
  331. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +11 -126
  332. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -1
  333. package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js +7 -71
  334. package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -1
  335. package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +6 -49
  336. package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -1
  337. package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +11 -120
  338. package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -1
  339. package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +13 -106
  340. package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -1
  341. package/esm5/lib/place/navigation/session/navigating.js +6 -53
  342. package/esm5/lib/place/navigation/session/navigating.js.map +1 -1
  343. package/esm5/lib/place/navigation/session/navigation-context.js +0 -17
  344. package/esm5/lib/place/navigation/session/navigation-context.js.map +1 -1
  345. package/esm5/lib/place/navigation/session/navigation-session.js +39 -306
  346. package/esm5/lib/place/navigation/session/navigation-session.js.map +1 -1
  347. package/esm5/lib/place/navigation/session/pop-state-navigation.js +5 -33
  348. package/esm5/lib/place/navigation/session/pop-state-navigation.js.map +1 -1
  349. package/esm5/lib/place/place-component.js +30 -142
  350. package/esm5/lib/place/place-component.js.map +1 -1
  351. package/esm5/lib/place/place-config.js +0 -13
  352. package/esm5/lib/place/place-config.js.map +1 -1
  353. package/esm5/lib/place/place-definition.js +37 -219
  354. package/esm5/lib/place/place-definition.js.map +1 -1
  355. package/esm5/lib/place/place-history.js +11 -56
  356. package/esm5/lib/place/place-history.js.map +1 -1
  357. package/esm5/lib/place/place-router.js +59 -372
  358. package/esm5/lib/place/place-router.js.map +1 -1
  359. package/esm5/lib/place/place.decorator.js +3 -38
  360. package/esm5/lib/place/place.decorator.js.map +1 -1
  361. package/esm5/lib/place/place.module.js +37 -40
  362. package/esm5/lib/place/place.module.js.map +1 -1
  363. package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
  364. package/esm5/lib/place/route/formatter.js +6 -60
  365. package/esm5/lib/place/route/formatter.js.map +1 -1
  366. package/esm5/lib/place/route/json-types.js +0 -12
  367. package/esm5/lib/place/route/json-types.js.map +1 -1
  368. package/esm5/lib/place/route/parameter-decorators.js +14 -133
  369. package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
  370. package/esm5/lib/place/route/parameter-definition.class.js +21 -222
  371. package/esm5/lib/place/route/parameter-definition.class.js.map +1 -1
  372. package/esm5/lib/place/route/parameter-sanitiser.js +0 -18
  373. package/esm5/lib/place/route/parameter-sanitiser.js.map +1 -1
  374. package/esm5/lib/place/route/parameter-snapshot.js +0 -19
  375. package/esm5/lib/place/route/parameter-snapshot.js.map +1 -1
  376. package/esm5/lib/place/route/visit-sanitiser.js +4 -42
  377. package/esm5/lib/place/route/visit-sanitiser.js.map +1 -1
  378. package/esm5/lib/place/url-service.js +20 -119
  379. package/esm5/lib/place/url-service.js.map +1 -1
  380. package/esm5/lib/place/url-snapshot.js +15 -143
  381. package/esm5/lib/place/url-snapshot.js.map +1 -1
  382. package/esm5/lib/place/visit.js +14 -132
  383. package/esm5/lib/place/visit.js.map +1 -1
  384. package/esm5/public_api.js +6 -10
  385. package/esm5/public_api.js.map +1 -1
  386. package/fesm2015/coolon-angular-ui-powerups.js +861 -4526
  387. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  388. package/fesm5/coolon-angular-ui-powerups.js +1129 -6274
  389. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  390. package/lib/components/forms/abstract-input.component.d.ts +9 -9
  391. package/lib/components/resize-aware.component.d.ts +3 -3
  392. package/lib/directives/command.directive.d.ts +4 -2
  393. package/lib/directives/focus-binding.directive.d.ts +1 -1
  394. package/lib/interaction/activity-ref.d.ts +2 -2
  395. package/lib/interaction/activity.d.ts +2 -2
  396. package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -2
  397. package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +3 -2
  398. package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +1 -1
  399. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +1 -1
  400. package/lib/interaction/services/interaction.service.d.ts +1 -1
  401. package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.d.ts +1 -1
  402. package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +1 -1
  403. package/lib/place/components/place-outlet/place-outlet.component.d.ts +4 -4
  404. package/lib/place/guards/consolidated-param-map.d.ts +1 -1
  405. package/lib/place/navigation/place-component-deactivation-handler.d.ts +2 -2
  406. package/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.d.ts +1 -1
  407. package/lib/place/navigation/session/navigation-session.d.ts +4 -4
  408. package/lib/place/place-component.d.ts +2 -2
  409. package/lib/place/place-router.d.ts +3 -3
  410. package/lib/place/route/formatter.d.ts +4 -3
  411. package/lib/place/route/parameter-definition.class.d.ts +2 -2
  412. package/package.json +10 -10
  413. package/schematics/place-routes/place-builder.js +4 -2
  414. package/schematics/place-routes/place-builder.js.map +1 -1
  415. package/schematics/place-routes/place-class-scanner.d.ts +3 -3
  416. package/schematics/place-routes/place-class-scanner.js +1 -1
  417. package/schematics/place-routes/place-class-scanner.js.map +1 -1
  418. package/schematics/place-routes/place-def.d.ts +9 -9
  419. /package/{styles → assets}/styles.scss +0 -0
@@ -1,15 +1,8 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
5
- import * as tslib_1 from "tslib";
6
- import { Directive, ElementRef, HostListener, Inject, Input } from '@angular/core';
1
+ import { __decorate, __extends, __metadata, __param } from "tslib";
2
+ import { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, OnDestroy, OnInit } from '@angular/core';
7
3
  import { assert, DelegatingValueModel, Dsl, GarbageCollector, lang, UnaryCommand } from '@coolon/pectin';
8
- /**
9
- * @template P
10
- */
11
4
  var CommandDirective = /** @class */ (function (_super) {
12
- tslib_1.__extends(CommandDirective, _super);
5
+ __extends(CommandDirective, _super);
13
6
  function CommandDirective(elementRef) {
14
7
  var _this = _super.call(this) || this;
15
8
  _this.elementRef = elementRef;
@@ -18,17 +11,10 @@ var CommandDirective = /** @class */ (function (_super) {
18
11
  return _this;
19
12
  }
20
13
  Object.defineProperty(CommandDirective.prototype, "pectinCommand", {
21
- get: /**
22
- * @return {?}
23
- */
24
- function () {
14
+ get: function () {
25
15
  return this._command;
26
16
  },
27
- set: /**
28
- * @param {?} command
29
- * @return {?}
30
- */
31
- function (command) {
17
+ set: function (command) {
32
18
  this._command = command;
33
19
  this._commandEnabled.setDelegate(command ? command.enabled : null);
34
20
  },
@@ -36,30 +22,17 @@ var CommandDirective = /** @class */ (function (_super) {
36
22
  configurable: true
37
23
  });
38
24
  Object.defineProperty(CommandDirective.prototype, "commandParameter", {
39
- get: /**
40
- * @return {?}
41
- */
42
- function () {
25
+ get: function () {
43
26
  return this._commandParameter;
44
27
  },
45
- set: /**
46
- * @param {?} value
47
- * @return {?}
48
- */
49
- function (value) {
28
+ set: function (value) {
50
29
  this._commandParameterProvided = true;
51
30
  this._commandParameter = value;
52
31
  },
53
32
  enumerable: true,
54
33
  configurable: true
55
34
  });
56
- /**
57
- * @return {?}
58
- */
59
- CommandDirective.prototype.ngOnInit = /**
60
- * @return {?}
61
- */
62
- function () {
35
+ CommandDirective.prototype.ngOnInit = function () {
63
36
  assert.notNil(this.pectinCommand);
64
37
  if (this.pectinCommand instanceof UnaryCommand) {
65
38
  if (!this._commandParameterProvided) {
@@ -72,22 +45,12 @@ var CommandDirective = /** @class */ (function (_super) {
72
45
  }
73
46
  }
74
47
  };
75
- /**
76
- * @return {?}
77
- */
78
- CommandDirective.prototype.ngAfterViewInit = /**
79
- * @return {?}
80
- */
81
- function () {
48
+ CommandDirective.prototype.ngAfterViewInit = function () {
82
49
  var _this = this;
83
50
  // for some reason mat-buttons kills the disabled host binding. It works on a regular button but for now
84
51
  // we need to do this.
85
52
  var chain = Dsl.disposeWith(this).chain;
86
- chain(this._commandEnabled).subscribe((/**
87
- * @param {?} enabled
88
- * @return {?}
89
- */
90
- function (enabled) {
53
+ chain(this._commandEnabled).subscribe(function (enabled) {
91
54
  if (enabled) {
92
55
  _this.elementRef.nativeElement.removeAttribute('disabled');
93
56
  if (_this.elementRef.nativeElement.tagName === 'A') {
@@ -100,26 +63,12 @@ var CommandDirective = /** @class */ (function (_super) {
100
63
  _this.elementRef.nativeElement.removeAttribute('href');
101
64
  }
102
65
  }
103
- }));
66
+ });
104
67
  };
105
- /**
106
- * @return {?}
107
- */
108
- CommandDirective.prototype.ngOnDestroy = /**
109
- * @return {?}
110
- */
111
- function () {
68
+ CommandDirective.prototype.ngOnDestroy = function () {
112
69
  this.dispose();
113
70
  };
114
- /**
115
- * @param {?} $event
116
- * @return {?}
117
- */
118
- CommandDirective.prototype.notifyClick = /**
119
- * @param {?} $event
120
- * @return {?}
121
- */
122
- function ($event) {
71
+ CommandDirective.prototype.notifyClick = function ($event) {
123
72
  $event.preventDefault();
124
73
  $event.stopPropagation();
125
74
  if (this.pectinCommand.enabled.value) {
@@ -134,49 +83,34 @@ var CommandDirective = /** @class */ (function (_super) {
134
83
  console.warn('disabled command clicked, ignoring.');
135
84
  }
136
85
  };
137
- CommandDirective.decorators = [
138
- { type: Directive, args: [{
139
- // tslint:disable-next-line:directive-selector
140
- selector: '[pectinCommand]'
141
- },] }
142
- ];
143
- /** @nocollapse */
144
86
  CommandDirective.ctorParameters = function () { return [
145
87
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
146
88
  ]; };
147
- CommandDirective.propDecorators = {
148
- pectinCommand: [{ type: Input }],
149
- commandParameter: [{ type: Input }],
150
- notifyClick: [{ type: HostListener, args: ['click', ['$event'],] }]
151
- };
89
+ __decorate([
90
+ Input(),
91
+ __metadata("design:type", Object),
92
+ __metadata("design:paramtypes", [Object])
93
+ ], CommandDirective.prototype, "pectinCommand", null);
94
+ __decorate([
95
+ Input(),
96
+ __metadata("design:type", Object),
97
+ __metadata("design:paramtypes", [Object])
98
+ ], CommandDirective.prototype, "commandParameter", null);
99
+ __decorate([
100
+ HostListener('click', ['$event']),
101
+ __metadata("design:type", Function),
102
+ __metadata("design:paramtypes", [Event]),
103
+ __metadata("design:returntype", void 0)
104
+ ], CommandDirective.prototype, "notifyClick", null);
105
+ CommandDirective = __decorate([
106
+ Directive({
107
+ // tslint:disable-next-line:directive-selector
108
+ selector: '[pectinCommand]'
109
+ }),
110
+ __param(0, Inject(ElementRef)),
111
+ __metadata("design:paramtypes", [ElementRef])
112
+ ], CommandDirective);
152
113
  return CommandDirective;
153
114
  }(GarbageCollector));
154
115
  export { CommandDirective };
155
- if (false) {
156
- /**
157
- * @type {?}
158
- * @private
159
- */
160
- CommandDirective.prototype._command;
161
- /**
162
- * @type {?}
163
- * @private
164
- */
165
- CommandDirective.prototype._commandEnabled;
166
- /**
167
- * @type {?}
168
- * @private
169
- */
170
- CommandDirective.prototype._commandParameter;
171
- /**
172
- * @type {?}
173
- * @private
174
- */
175
- CommandDirective.prototype._commandParameterProvided;
176
- /**
177
- * @type {?}
178
- * @private
179
- */
180
- CommandDirective.prototype.elementRef;
181
- }
182
116
  //# sourceMappingURL=command.directive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/command.directive.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAiB,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAqB,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,MAAM,EAAW,oBAAoB,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;;;;AAElH;IAI+C,4CAAgB;IA2B7D,0BAAwC,UAAsB;QAA9D,YACE,iBAAO,SACR;QAFuC,gBAAU,GAAV,UAAU,CAAY;QAxBtD,qBAAe,GAAG,IAAI,oBAAoB,EAAW,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAYzE,+BAAyB,GAAG,KAAK,CAAC;;IAc1C,CAAC;IAxBD,sBACI,2CAAa;;;;QAIjB;YACE,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;;;;;QAPD,UACkB,OAAuC;YACvD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YACxB,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACrE,CAAC;;;OAAA;IAQD,sBACI,8CAAgB;;;;QAKpB;YACE,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAChC,CAAC;;;;;QARD,UACqB,KAAQ;YAC3B,IAAI,CAAC,yB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ADX,UACY,MAAa;QACvB,MAAM,CAAC,cAAc,EAAE,CAAC;QACxB,MAAM,CAAC,eAAe,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE;YACpC,IAAI,IAAI,CAAC,aAAa,YAAY,YAAY,EAAE;gBAC9C,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;aAClF;iBAAM;gBACL,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;aAC7D;SACF;aAAM;YACL,OAAO,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;SACrD;IACH,CAAC;;gBArFF,SAAS,SAAC;;oBAET,QAAQ,EAAE,iBAAiB;iBAC5B;;;;gBANkC,UAAU,uBAkC9B,MAAM,SAAC,UAAU;;;gCAtB7B,KAAK;mCAYL,KAAK;8BAmDL,YAAY,SAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;IAcnC,uBAAC;CAAA,AAtFD,CAI+C,gBAAgB,GAkF9D;SAlFY,gBAAgB;;;;;;IAE3B,oCAAiD;;;;;IACjD,2CAAiF;;;;;IAWjF,6CAA6B;;;;;IAC7B,qDAA0C;;;;;IAY9B,sCAAkD","sourcesContent":["import { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { assert, Command, DelegatingValueModel, Dsl, GarbageCollector, lang, UnaryCommand } from '@coolon/pectin';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[pectinCommand]'\n})\nexport class CommandDirective<P = any> extends GarbageCollector implements OnInit, OnDestroy, AfterViewInit {\n\n private _command: Command<any> | UnaryCommand<P>;\n private _commandEnabled = new DelegatingValueModel<boolean>().withDefault(false);\n\n @Input()\n set pectinCommand(command: Command<any> | UnaryCommand<P>) {\n this._command = command;\n this._commandEnabled.setDelegate(command ? command.enabled : null);\n }\n get pectinCommand():Command<any> | UnaryCommand<P> {\n return this._command;\n }\n\n private _commandParameter: P;\n private _commandParameterProvided = false;\n\n @Input()\n set commandParameter(value: P) {\n this._commandParameterProvided = true;\n this._commandParameter = value;\n }\n\n get commandParameter(): P {\n return this._commandParameter;\n }\n\n constructor(@Inject(ElementRef) private elementRef: ElementRef) {\n super();\n }\n\n ngOnInit(): void {\n assert.notNil(this.pectinCommand);\n if (this.pectinCommand instanceof UnaryCommand) {\n if (!this._commandParameterProvided) {\n lang.illegalState('UnaryCommands required the command parameter to be specified.');\n }\n } else {\n if (this._commandParameterProvided) {\n lang.illegalState('command parameters are only supported by UnaryCommands');\n }\n }\n }\n\n ngAfterViewInit(): void {\n // for some reason mat-buttons kills the disabled host binding. It works on a regular button but for now\n // we need to do this.\n const { chain } = Dsl.disposeWith(this);\n chain(this._commandEnabled).subscribe(enabled => {\n if (enabled) {\n this.elementRef.nativeElement.removeAttribute('disabled');\n if (this.elementRef.nativeElement.tagName === 'A') {\n this.elementRef.nativeElement.setAttribute('href', 'javascript:void');\n }\n } else {\n this.elementRef.nativeElement.setAttribute('disabled', 'disabled');\n if (this.elementRef.nativeElement.tagName === 'A') {\n this.elementRef.nativeElement.removeAttribute('href');\n }\n }\n });\n }\n\n ngOnDestroy(): void {\n this.dispose();\n }\n\n\n @HostListener('click', ['$event'])\n notifyClick($event: Event) {\n $event.preventDefault();\n $event.stopPropagation();\n if (this.pectinCommand.enabled.value) {\n if (this.pectinCommand instanceof UnaryCommand) {\n this.pectinCommand.withContext({ event: $event }).execute(this.commandParameter);\n } else {\n this.pectinCommand.withContext({ event: $event }).execute();\n }\n } else {\n console.warn('disabled command clicked, ignoring.');\n }\n }\n}\n"]}
1
+ {"version":3,"file":"command.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/command.directive.ts"],"names":[],"mappings":";AAAA,OAAO,E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a,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;aAC7D;SACF;aAAM;YACL,OAAO,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;SACrD;IACH,CAAC;;gBAtDmD,UAAU,uBAAjD,MAAM,SAAC,UAAU;;IArB9B;QADC,KAAK,EAAE;;;yDAIP;IASD;QADC,KAAK,EAAE;;;4DAIP;IAgDD;QADC,YAAY,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;;yCACd,KAAK;;uDAYxB;IAjFU,gBAAgB;QAJ5B,SAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,iBAAiB;SAC5B,CAAC;QA4Ba,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;yCAAqB,UAAU;OA3BnD,gBAAgB,CAkF5B;IAAD,uBAAC;CAAA,AAlFD,CAA+C,gBAAgB,GAkF9D;SAlFY,gBAAgB","sourcesContent":["import { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { assert, Command, DelegatingValueModel, Dsl, GarbageCollector, lang, UnaryCommand } from '@coolon/pectin';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[pectinCommand]'\n})\nexport class CommandDirective<P = any> extends GarbageCollector implements OnInit, OnDestroy, AfterViewInit {\n\n private _command: Command<any> | UnaryCommand<P>;\n private _commandEnabled = new DelegatingValueModel<boolean>().withDefault(false);\n\n @Input()\n set pectinCommand(command: Command<any> | UnaryCommand<P>) {\n this._command = command;\n this._commandEnabled.setDelegate(command ? command.enabled : null);\n }\n get pectinCommand():Command<any> | UnaryCommand<P> {\n return this._command;\n }\n\n private _commandParameter: P;\n private _commandParameterProvided = false;\n\n @Input()\n set commandParameter(value: P) {\n this._commandParameterProvided = true;\n this._commandParameter = value;\n }\n\n get commandParameter(): P {\n return this._commandParameter;\n }\n\n constructor(@Inject(ElementRef) private elementRef: ElementRef) {\n super();\n }\n\n ngOnInit(): void {\n assert.notNil(this.pectinCommand);\n if (this.pectinCommand instanceof UnaryCommand) {\n if (!this._commandParameterProvided) {\n lang.illegalState('UnaryCommands required the command parameter to be specified.');\n }\n } else {\n if (this._commandParameterProvided) {\n lang.illegalState('command parameters are only supported by UnaryCommands');\n }\n }\n }\n\n ngAfterViewInit(): void {\n // for some reason mat-buttons kills the disabled host binding. It works on a regular button but for now\n // we need to do this.\n const { chain } = Dsl.disposeWith(this);\n chain(this._commandEnabled).subscribe(enabled => {\n if (enabled) {\n this.elementRef.nativeElement.removeAttribute('disabled');\n if (this.elementRef.nativeElement.tagName === 'A') {\n this.elementRef.nativeElement.setAttribute('href', 'javascript:void');\n }\n } else {\n this.elementRef.nativeElement.setAttribute('disabled', 'disabled');\n if (this.elementRef.nativeElement.tagName === 'A') {\n this.elementRef.nativeElement.removeAttribute('href');\n }\n }\n });\n }\n\n ngOnDestroy(): void {\n this.dispose();\n }\n\n\n @HostListener('click', ['$event'])\n notifyClick($event: Event) {\n $event.preventDefault();\n $event.stopPropagation();\n if (this.pectinCommand.enabled.value) {\n if (this.pectinCommand instanceof UnaryCommand) {\n this.pectinCommand.withContext({ event: $event }).execute(this.commandParameter);\n } else {\n this.pectinCommand.withContext({ event: $event }).execute();\n }\n } else {\n console.warn('disabled command clicked, ignoring.');\n }\n }\n}\n"]}
@@ -1,11 +1,10 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
1
+ import { __decorate } from "tslib";
5
2
  import { CommonModule } from '@angular/common';
6
3
  import { NgModule } from '@angular/core';
7
4
  import { FormsModule } from '@angular/forms';
8
- import { MatFormFieldModule, MatInputModule, MatSelectModule } from '@angular/material';
5
+ import { MatFormFieldModule } from '@angular/material/form-field';
6
+ import { MatInputModule } from '@angular/material/input';
7
+ import { MatSelectModule } from '@angular/material/select';
9
8
  import { MatTabsModule } from '@angular/material/tabs';
10
9
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
11
10
  import { CommandDirective } from './command.directive';
@@ -13,27 +12,27 @@ import { FocusBindingDirective } from './focus-binding.directive';
13
12
  var DirectivesModule = /** @class */ (function () {
14
13
  function DirectivesModule() {
15
14
  }
16
- DirectivesModule.decorators = [
17
- { type: NgModule, args: [{
18
- declarations: [
19
- CommandDirective,
20
- FocusBindingDirective
21
- ],
22
- imports: [
23
- CommonModule,
24
- BrowserAnimationsModule,
25
- FormsModule,
26
- MatInputModule,
27
- MatFormFieldModule,
28
- MatSelectModule,
29
- MatTabsModule
30
- ],
31
- exports: [
32
- CommandDirective,
33
- FocusBindingDirective
34
- ]
35
- },] }
36
- ];
15
+ DirectivesModule = __decorate([
16
+ NgModule({
17
+ declarations: [
18
+ CommandDirective,
19
+ FocusBindingDirective
20
+ ],
21
+ imports: [
22
+ CommonModule,
23
+ BrowserAnimationsModule,
24
+ FormsModule,
25
+ MatInputModule,
26
+ MatFormFieldModule,
27
+ MatSelectModule,
28
+ MatTabsModule
29
+ ],
30
+ exports: [
31
+ CommandDirective,
32
+ FocusBindingDirective
33
+ ]
34
+ })
35
+ ], DirectivesModule);
37
36
  return DirectivesModule;
38
37
  }());
39
38
  export { DirectivesModule };
@@ -1 +1 @@
1
- {"version":3,"file":"directives.module.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/directives.module.ts"],"names":[],"mappings":";;;;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE;IAAA;IAqBA,CAAC;;gBArBA,QAAQ,SAAC;oBACR,YAAY,EAAE;wBACZ,gBAAgB;wBAChB,qBAAqB;qBACtB;oBACD,OAAO,EAAE;wBACP,YAAY;wBACZ,uBAAuB;wBACvB,WAAW;wBACX,cAAc;wBACd,kBAAkB;wBAClB,eAAe;wBACf,aAAa;qBACd;oBACD,OAAO,EAAE;wBACP,gBAAgB;wBAChB,qBAAqB;qBACtB;iBAEF;;IAED,uBAAC;CAAA,AArBD,IAqBC;SADY,gBAAgB","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule, MatInputModule, MatSelectModule } from '@angular/material';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { CommandDirective } from './command.directive';\nimport { FocusBindingDirective } from './focus-binding.directive';\n\n@NgModule({\n declarations: [\n CommandDirective,\n FocusBindingDirective\n ],\n imports: [\n CommonModule,\n BrowserAnimationsModule,\n FormsModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n MatTabsModule\n ],\n exports: [\n CommandDirective,\n FocusBindingDirective\n ]\n\n})\nexport class DirectivesModule {\n}\n"]}
1
+ {"version":3,"file":"directives.module.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/directives.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAsBlE;IAAA;IACA,CAAC;IADY,gBAAgB;QApB5B,QAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,gBAAgB;gBAChB,qBAAqB;aACtB;YACD,OAAO,EAAE;gBACP,YAAY;gBACZ,uBAAuB;gBACvB,WAAW;gBACX,cAAc;gBACd,kBAAkB;gBAClB,eAAe;gBACf,aAAa;aACd;YACD,OAAO,EAAE;gBACP,gBAAgB;gBAChB,qBAAqB;aACtB;SAEF,CAAC;OACW,gBAAgB,CAC5B;IAAD,uBAAC;CAAA,AADD,IACC;SADY,gBAAgB","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { CommandDirective } from './command.directive';\nimport { FocusBindingDirective } from './focus-binding.directive';\n\n@NgModule({\n declarations: [\n CommandDirective,\n FocusBindingDirective\n ],\n imports: [\n CommonModule,\n BrowserAnimationsModule,\n FormsModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n MatTabsModule\n ],\n exports: [\n CommandDirective,\n FocusBindingDirective\n ]\n\n})\nexport class DirectivesModule {\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"directives.module.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/directives.module.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\nimport * as i1 from './directives.module';\nimport * as i2 from '@angular/common';\nimport * as i3 from '@angular/forms';\nimport * as i4 from '@angular/cdk/text-field';\nimport * as i5 from '@angular/material/form-field';\nimport * as i6 from '@angular/material/input';\nimport * as i7 from '@angular/material/core';\nimport * as i8 from '@angular/cdk/bidi';\nimport * as i9 from '@angular/material/select';\nimport * as i10 from '@angular/material/tabs';\nimport * as i11 from './command.directive';\nimport * as i12 from './focus-binding.directive';\nimport * as i13 from '@angular/platform-browser/animations';\nexport const DirectivesModuleNgFactory:i0.NgModuleFactory<i1.DirectivesModule> = (null as any);\nvar _decl0_0:i2.NgClass = (<any>(null as any));\nvar _decl0_1:i2.NgComponentOutlet = (<any>(null as any));\nvar _decl0_2:i2.NgForOf<any> = (<any>(null as any));\nvar _decl0_3:i2.NgIf = (<any>(null as any));\nvar _decl0_4:i2.NgTemplateOutlet = (<any>(null as any));\nvar _decl0_5:i2.NgStyle = (<any>(null as any));\nvar _decl0_6:i2.NgSwitch = (<any>(null as any));\nvar _decl0_7:i2.NgSwitchCase = (<any>(null as any));\nvar _decl0_8:i2.NgSwitchDefault = (<any>(null as any));\nvar _decl0_9:i2.NgPlural = (<any>(null as any));\nvar _decl0_10:i2.NgPluralCase = (<any>(null as any));\nvar _decl0_11:i3.ɵangular_packages_forms_forms_z = (<any>(null as any));\nvar _decl0_12:i3.NgSelectOption = (<any>(null as any));\nvar _decl0_13:i3.ɵangular_packages_forms_forms_y = (<any>(null as any));\nvar _decl0_14:i3.DefaultValueAccessor = (<any>(null as any));\nvar _decl0_15:i3.NumberValueAccessor = (<any>(null as any));\nvar _decl0_16:i3.RangeValueAccessor = (<any>(null as any));\nvar _decl0_17:i3.CheckboxControlValueAccessor = (<any>(null as any));\nvar _decl0_18:i3.SelectControlValueAccessor = (<any>(null as any));\nvar _decl0_19:i3.SelectMultipleControlValueAccessor = (<any>(null as any));\nvar _decl0_20:i3.RadioControlValueAccessor = (<any>(null as any));\nvar _decl0_21:i3.NgControlStatus = (<any>(null as any));\nvar _decl0_22:i3.NgControlStatusGroup = (<any>(null as any));\nvar _decl0_23:i3.RequiredValidator = (<any>(null as any));\nvar _decl0_24:i3.MinLengthValidator = (<any>(null as any));\nvar _decl0_25:i3.MaxLengthValidator = (<any>(null as any));\nvar _decl0_26:i3.PatternValidator = (<any>(null as any));\nvar _decl0_27:i3.CheckboxRequiredValidator = (<any>(null as any));\nvar _decl0_28:i3.EmailValidator = (<any>(null as any));\nvar _decl0_29:i3.NgModel = (<any>(null as any));\nvar _decl0_30:i3.NgModelGroup = (<any>(null as any));\nvar _decl0_31:i3.NgForm = (<any>(null as any));\nvar _decl0_32:i3.NgFormSelectorWarning = (<any>(null as any));\nvar _decl0_33:i4.CdkAutofill = (<any>(null as any));\nvar _decl0_34:i4.CdkTextareaAutosize = (<any>(null as any));\nvar _decl0_35:i5.MatError = (<any>(null as any));\nvar _decl0_36:i5.MatFormField = (<any>(null as any));\nvar _decl0_37:i5.MatHint = (<any>(null as any));\nvar _decl0_38:i5.MatLabel = (<any>(null as any));\nvar _decl0_39:i5.MatPlaceholder = (<any>(null as any));\nvar _decl0_40:i5.MatPrefix = (<any>(null as any));\nvar _decl0_41:i5.MatSuffix = (<any>(null as any));\nvar _decl0_42:i6.MatInput = (<any>(null as any));\nvar _decl0_43:i6.MatTextareaAutosize = (<any>(null as any));\nvar _decl0_44:i7.MatOption = (<any>(null as any));\nvar _decl0_45:i7.MatOptgroup = (<any>(null as any));\nvar _decl0_46:i8.Dir = (<any>(null as any));\nvar _decl0_47:i9.MatSelect = (<any>(null as any));\nvar _decl0_48:i9.MatSelectTrigger = (<any>(null as any));\nvar _decl0_49:i10.MatTabGroup = (<any>(null as any));\nvar _decl0_50:i10.MatTabLabel = (<any>(null as any));\nvar _decl0_51:i10.MatTab = (<any>(null as any));\nvar _decl0_52:i10.MatTabNav = (<any>(null as any));\nvar _decl0_53:i10.MatTabLink = (<any>(null as any));\nvar _decl0_54:i10.MatTabContent = (<any>(null as any));\nvar _decl0_55:i11.CommandDirective<any> = (<any>(null as any));\nvar _decl0_56:i12.FocusBindingDirective = (<any>(null as any));\nvar _decl0_57:i2.AsyncPipe = (<any>(null as any));\nvar _decl0_58:i2.UpperCasePipe = (<any>(null as any));\nvar _decl0_59:i2.LowerCasePipe = (<any>(null as any));\nvar _decl0_60:i2.JsonPipe = (<any>(null as any));\nvar _decl0_61:i2.SlicePipe = (<any>(null as any));\nvar _decl0_62:i2.DecimalPipe = (<any>(null as any));\nvar _decl0_63:i2.PercentPipe = (<any>(null as any));\nvar _decl0_64:i2.TitleCasePipe = (<any>(null as any));\nvar _decl0_65:i2.CurrencyPipe = (<any>(null as any));\nvar _decl0_66:i2.DatePipe = (<any>(null as any));\nvar _decl0_67:i2.I18nPluralPipe = (<any>(null as any));\nvar _decl0_68:i2.I18nSelectPipe = (<any>(null as any));\nvar _decl0_69:i2.KeyValuePipe = (<any>(null as any));\nvar _decl0_70:i2.CommonModule = (<any>(null as any));\nvar _decl0_71:i13.BrowserAnimationsModule = (<any>(null as any));\nvar _decl0_72:i3.FormsModule = (<any>(null as any));\nvar _decl0_73:i6.MatInputModule = (<any>(null as any));\nvar _decl0_74:i5.MatFormFieldModule = (<any>(null as any));\nvar _decl0_75:i9.MatSelectModule = (<any>(null as any));\nvar _decl0_76:i10.MatTabsModule = (<any>(null as any));\nvar _decl0_77:i0.TemplateRef<any> = (<any>(null as any));\nvar _decl0_78:i0.ElementRef<any> = (<any>(null as any));\n"]}
1
+ {"version":3,"file":"directives.module.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/directives.module.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\nimport * as i1 from './directives.module';\nimport * as i2 from '@angular/common';\nimport * as i3 from '@angular/forms';\nimport * as i4 from '@angular/cdk/text-field';\nimport * as i5 from '@angular/material/form-field';\nimport * as i6 from '@angular/material/input';\nimport * as i7 from '@angular/cdk/scrolling';\nimport * as i8 from '@angular/material/core';\nimport * as i9 from '@angular/cdk/bidi';\nimport * as i10 from '@angular/material/select';\nimport * as i11 from '@angular/material/tabs';\nimport * as i12 from './command.directive';\nimport * as i13 from './focus-binding.directive';\nimport * as i14 from '@angular/platform-browser/animations';\nexport const DirectivesModuleNgFactory:i0.NgModuleFactory<i1.DirectivesModule> = (null as any);\nvar _decl0_0:i2.NgClass = (<any>(null as any));\nvar _decl0_1:i2.NgComponentOutlet = (<any>(null as any));\nvar _decl0_2:i2.NgForOf<any,any> = (<any>(null as any));\nvar _decl0_3:i2.NgIf<any> = (<any>(null as any));\nvar _decl0_4:i2.NgTemplateOutlet = (<any>(null as any));\nvar _decl0_5:i2.NgStyle = (<any>(null as any));\nvar _decl0_6:i2.NgSwitch = (<any>(null as any));\nvar _decl0_7:i2.NgSwitchCase = (<any>(null as any));\nvar _decl0_8:i2.NgSwitchDefault = (<any>(null as any));\nvar _decl0_9:i2.NgPlural = (<any>(null as any));\nvar _decl0_10:i2.NgPluralCase = (<any>(null as any));\nvar _decl0_11:i3.ɵangular_packages_forms_forms_y = (<any>(null as any));\nvar _decl0_12:i3.NgSelectOption = (<any>(null as any));\nvar _decl0_13:i3.ɵangular_packages_forms_forms_x = (<any>(null as any));\nvar _decl0_14:i3.DefaultValueAccessor = (<any>(null as any));\nvar _decl0_15:i3.NumberValueAccessor = (<any>(null as any));\nvar _decl0_16:i3.RangeValueAccessor = (<any>(null as any));\nvar _decl0_17:i3.CheckboxControlValueAccessor = (<any>(null as any));\nvar _decl0_18:i3.SelectControlValueAccessor = (<any>(null as any));\nvar _decl0_19:i3.SelectMultipleControlValueAccessor = (<any>(null as any));\nvar _decl0_20:i3.RadioControlValueAccessor = (<any>(null as any));\nvar _decl0_21:i3.NgControlStatus = (<any>(null as any));\nvar _decl0_22:i3.NgControlStatusGroup = (<any>(null as any));\nvar _decl0_23:i3.RequiredValidator = (<any>(null as any));\nvar _decl0_24:i3.MinLengthValidator = (<any>(null as any));\nvar _decl0_25:i3.MaxLengthValidator = (<any>(null as any));\nvar _decl0_26:i3.PatternValidator = (<any>(null as any));\nvar _decl0_27:i3.CheckboxRequiredValidator = (<any>(null as any));\nvar _decl0_28:i3.EmailValidator = (<any>(null as any));\nvar _decl0_29:i3.NgModel = (<any>(null as any));\nvar _decl0_30:i3.NgModelGroup = (<any>(null as any));\nvar _decl0_31:i3.NgForm = (<any>(null as any));\nvar _decl0_32:i4.CdkAutofill = (<any>(null as any));\nvar _decl0_33:i4.CdkTextareaAutosize = (<any>(null as any));\nvar _decl0_34:i5.MatError = (<any>(null as any));\nvar _decl0_35:i5.MatFormField = (<any>(null as any));\nvar _decl0_36:i5.MatHint = (<any>(null as any));\nvar _decl0_37:i5.MatLabel = (<any>(null as any));\nvar _decl0_38:i5.MatPlaceholder = (<any>(null as any));\nvar _decl0_39:i5.MatPrefix = (<any>(null as any));\nvar _decl0_40:i5.MatSuffix = (<any>(null as any));\nvar _decl0_41:i6.MatInput = (<any>(null as any));\nvar _decl0_42:i6.MatTextareaAutosize = (<any>(null as any));\nvar _decl0_43:i7.CdkScrollable = (<any>(null as any));\nvar _decl0_44:i8.MatOption = (<any>(null as any));\nvar _decl0_45:i8.MatOptgroup = (<any>(null as any));\nvar _decl0_46:i9.Dir = (<any>(null as any));\nvar _decl0_47:i10.MatSelect = (<any>(null as any));\nvar _decl0_48:i10.MatSelectTrigger = (<any>(null as any));\nvar _decl0_49:i11.MatTabGroup = (<any>(null as any));\nvar _decl0_50:i11.MatTabLabel = (<any>(null as any));\nvar _decl0_51:i11.MatTab = (<any>(null as any));\nvar _decl0_52:i11.MatTabNav = (<any>(null as any));\nvar _decl0_53:i11.MatTabLink = (<any>(null as any));\nvar _decl0_54:i11.MatTabContent = (<any>(null as any));\nvar _decl0_55:i12.CommandDirective<any> = (<any>(null as any));\nvar _decl0_56:i13.FocusBindingDirective = (<any>(null as any));\nvar _decl0_57:i2.AsyncPipe = (<any>(null as any));\nvar _decl0_58:i2.UpperCasePipe = (<any>(null as any));\nvar _decl0_59:i2.LowerCasePipe = (<any>(null as any));\nvar _decl0_60:i2.JsonPipe = (<any>(null as any));\nvar _decl0_61:i2.SlicePipe = (<any>(null as any));\nvar _decl0_62:i2.DecimalPipe = (<any>(null as any));\nvar _decl0_63:i2.PercentPipe = (<any>(null as any));\nvar _decl0_64:i2.TitleCasePipe = (<any>(null as any));\nvar _decl0_65:i2.CurrencyPipe = (<any>(null as any));\nvar _decl0_66:i2.DatePipe = (<any>(null as any));\nvar _decl0_67:i2.I18nPluralPipe = (<any>(null as any));\nvar _decl0_68:i2.I18nSelectPipe = (<any>(null as any));\nvar _decl0_69:i2.KeyValuePipe = (<any>(null as any));\nvar _decl0_70:i2.CommonModule = (<any>(null as any));\nvar _decl0_71:i14.BrowserAnimationsModule = (<any>(null as any));\nvar _decl0_72:i3.FormsModule = (<any>(null as any));\nvar _decl0_73:i6.MatInputModule = (<any>(null as any));\nvar _decl0_74:i5.MatFormFieldModule = (<any>(null as any));\nvar _decl0_75:i10.MatSelectModule = (<any>(null as any));\nvar _decl0_76:i11.MatTabsModule = (<any>(null as any));\nvar _decl0_77:i0.TemplateRef<any> = (<any>(null as any));\nvar _decl0_78:i0.ElementRef<any> = (<any>(null as any));\n"]}
@@ -1,125 +1,57 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
5
- import * as tslib_1 from "tslib";
1
+ import { __decorate, __extends, __metadata, __param } from "tslib";
6
2
  import { DOCUMENT } from '@angular/common';
7
- import { Directive, ElementRef, HostListener, Inject, Input, NgZone } from '@angular/core';
3
+ import { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, NgZone, OnInit } from '@angular/core';
8
4
  import { Dsl, HasFocusTracking, Logger } from '@coolon/pectin';
9
5
  import { DisposableComponent } from '../components/disposable-component';
10
6
  var FocusBindingDirective = /** @class */ (function (_super) {
11
- tslib_1.__extends(FocusBindingDirective, _super);
7
+ __extends(FocusBindingDirective, _super);
12
8
  function FocusBindingDirective(el, ngZone, document) {
13
9
  var _this = _super.call(this) || this;
14
10
  _this.el = el;
15
11
  _this.ngZone = ngZone;
16
12
  // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
17
- _this.document = (/** @type {?} */ (document));
13
+ _this.document = document;
18
14
  return _this;
19
15
  }
20
- /**
21
- * @return {?}
22
- */
23
- FocusBindingDirective.prototype.onFocusIn = /**
24
- * @return {?}
25
- */
26
- function () {
16
+ FocusBindingDirective.prototype.onFocusIn = function () {
27
17
  if (this.hasBinding()) {
28
18
  this.pectinFocusBinding.focusContext.notifyFocusIn();
29
19
  }
30
20
  };
31
- /**
32
- * @return {?}
33
- */
34
- FocusBindingDirective.prototype.onFocusOut = /**
35
- * @return {?}
36
- */
37
- function () {
21
+ FocusBindingDirective.prototype.onFocusOut = function () {
38
22
  if (this.hasBinding()) {
39
23
  this.pectinFocusBinding.focusContext.notifyFocusOut();
40
24
  }
41
25
  };
42
- /**
43
- * @return {?}
44
- */
45
- FocusBindingDirective.prototype.ngOnInit = /**
46
- * @return {?}
47
- */
48
- function () {
26
+ FocusBindingDirective.prototype.ngOnInit = function () {
49
27
  };
50
- /**
51
- * @return {?}
52
- */
53
- FocusBindingDirective.prototype.ngAfterViewInit = /**
54
- * @return {?}
55
- */
56
- function () {
28
+ FocusBindingDirective.prototype.ngAfterViewInit = function () {
57
29
  var _this = this;
58
30
  // TODO: Make this also track the current enabled/disabled state.
59
31
  if (this.hasBinding()) {
60
32
  var chain = Dsl.disposeWith(this).chain;
61
- chain(this.pectinFocusBinding.focusContext.focused).subscribe((/**
62
- * @param {?} focused
63
- * @return {?}
64
- */
65
- function (focused) {
33
+ chain(this.pectinFocusBinding.focusContext.focused).subscribe(function (focused) {
66
34
  if (focused && !_this.alreadyHasFocus()) {
67
35
  _this.tryAndFocus();
68
36
  }
69
- }));
37
+ });
70
38
  }
71
39
  else {
72
40
  Logger.get(this).warn('pectinFocusBinding was nil');
73
41
  }
74
42
  };
75
- /**
76
- * @private
77
- * @return {?}
78
- */
79
- FocusBindingDirective.prototype.hasBinding = /**
80
- * @private
81
- * @return {?}
82
- */
83
- function () {
43
+ FocusBindingDirective.prototype.hasBinding = function () {
84
44
  return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;
85
45
  };
86
46
  // Hook method for debugging via tracing.
87
- // Hook method for debugging via tracing.
88
- /**
89
- * @return {?}
90
- */
91
- FocusBindingDirective.prototype.alreadyHasFocus =
92
- // Hook method for debugging via tracing.
93
- /**
94
- * @return {?}
95
- */
96
- function () {
47
+ FocusBindingDirective.prototype.alreadyHasFocus = function () {
97
48
  return this.isFocused(this.focusTarget);
98
49
  };
99
50
  // Hook method for debugging via tracing.
100
- // Hook method for debugging via tracing.
101
- /**
102
- * @param {?} element
103
- * @return {?}
104
- */
105
- FocusBindingDirective.prototype.isFocused =
106
- // Hook method for debugging via tracing.
107
- /**
108
- * @param {?} element
109
- * @return {?}
110
- */
111
- function (element) {
51
+ FocusBindingDirective.prototype.isFocused = function (element) {
112
52
  return this.document.activeElement === element;
113
53
  };
114
- /**
115
- * @param {?=} retries
116
- * @return {?}
117
- */
118
- FocusBindingDirective.prototype.tryAndFocus = /**
119
- * @param {?=} retries
120
- * @return {?}
121
- */
122
- function (retries) {
54
+ FocusBindingDirective.prototype.tryAndFocus = function (retries) {
123
55
  var _this = this;
124
56
  if (retries === void 0) { retries = 5; }
125
57
  if (this.modelShouldStillHaveFocus() && this.canFocus()) {
@@ -132,12 +64,9 @@ var FocusBindingDirective = /** @class */ (function (_super) {
132
64
  if (retries > 0) {
133
65
  // try again on the next paint
134
66
  // TODO: is there an angular way of doing this without calling a window function.
135
- requestAnimationFrame((/**
136
- * @return {?}
137
- */
138
- function () {
67
+ requestAnimationFrame(function () {
139
68
  _this.tryAndFocus(retries - 1);
140
- }));
69
+ });
141
70
  }
142
71
  else {
143
72
  Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.");
@@ -146,86 +75,60 @@ var FocusBindingDirective = /** @class */ (function (_super) {
146
75
  }
147
76
  };
148
77
  Object.defineProperty(FocusBindingDirective.prototype, "focusTarget", {
149
- get: /**
150
- * @return {?}
151
- */
152
- function () {
78
+ get: function () {
153
79
  return this.focusBindingTarget || this.el.nativeElement;
154
80
  },
155
81
  enumerable: true,
156
82
  configurable: true
157
83
  });
158
84
  // Hook method for debugging via tracing.
159
- // Hook method for debugging via tracing.
160
- /**
161
- * @return {?}
162
- */
163
- FocusBindingDirective.prototype.modelShouldStillHaveFocus =
164
- // Hook method for debugging via tracing.
165
- /**
166
- * @return {?}
167
- */
168
- function () {
85
+ FocusBindingDirective.prototype.modelShouldStillHaveFocus = function () {
169
86
  return this.hasBinding() && this.pectinFocusBinding.focusContext.focused.value;
170
87
  };
171
88
  // Hook method for debugging via tracing.
172
- // Hook method for debugging via tracing.
173
- /**
174
- * @return {?}
175
- */
176
- FocusBindingDirective.prototype.canFocus =
177
- // Hook method for debugging via tracing.
178
- /**
179
- * @return {?}
180
- */
181
- function () {
182
- /** @type {?} */
89
+ FocusBindingDirective.prototype.canFocus = function () {
183
90
  var dimension = this.focusTarget.getBoundingClientRect();
184
- /** @type {?} */
185
91
  var hasSize = dimension.height >= 0 && dimension.height >= 0;
186
92
  // tslint:disable-next-line:no-string-literal
187
93
  return hasSize && !this.focusTarget['disabled'];
188
94
  };
189
- FocusBindingDirective.decorators = [
190
- { type: Directive, args: [{
191
- // tslint:disable-next-line:directive-selector
192
- selector: '[pectinFocusBinding]'
193
- },] }
194
- ];
195
- /** @nocollapse */
196
95
  FocusBindingDirective.ctorParameters = function () { return [
197
96
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
198
97
  { type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
199
98
  { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
200
99
  ]; };
201
- FocusBindingDirective.propDecorators = {
202
- pectinFocusBinding: [{ type: Input }],
203
- focusBindingTarget: [{ type: Input }],
204
- onFocusIn: [{ type: HostListener, args: ['focusin',] }],
205
- onFocusOut: [{ type: HostListener, args: ['focusout',] }]
206
- };
100
+ __decorate([
101
+ Input(),
102
+ __metadata("design:type", Object)
103
+ ], FocusBindingDirective.prototype, "pectinFocusBinding", void 0);
104
+ __decorate([
105
+ Input(),
106
+ __metadata("design:type", HTMLElement)
107
+ ], FocusBindingDirective.prototype, "focusBindingTarget", void 0);
108
+ __decorate([
109
+ HostListener('focusin'),
110
+ __metadata("design:type", Function),
111
+ __metadata("design:paramtypes", []),
112
+ __metadata("design:returntype", void 0)
113
+ ], FocusBindingDirective.prototype, "onFocusIn", null);
114
+ __decorate([
115
+ HostListener('focusout'),
116
+ __metadata("design:type", Function),
117
+ __metadata("design:paramtypes", []),
118
+ __metadata("design:returntype", void 0)
119
+ ], FocusBindingDirective.prototype, "onFocusOut", null);
120
+ FocusBindingDirective = __decorate([
121
+ Directive({
122
+ // tslint:disable-next-line:directive-selector
123
+ selector: '[pectinFocusBinding]'
124
+ }),
125
+ __param(0, Inject(ElementRef)),
126
+ __param(1, Inject(NgZone)),
127
+ __param(2, Inject(DOCUMENT)),
128
+ __metadata("design:paramtypes", [ElementRef,
129
+ NgZone, Object])
130
+ ], FocusBindingDirective);
207
131
  return FocusBindingDirective;
208
132
  }(DisposableComponent));
209
133
  export { FocusBindingDirective };
210
- if (false) {
211
- /**
212
- * @type {?}
213
- * @private
214
- */
215
- FocusBindingDirective.prototype.document;
216
- /** @type {?} */
217
- FocusBindingDirective.prototype.pectinFocusBinding;
218
- /** @type {?} */
219
- FocusBindingDirective.prototype.focusBindingTarget;
220
- /**
221
- * @type {?}
222
- * @private
223
- */
224
- FocusBindingDirective.prototype.el;
225
- /**
226
- * @type {?}
227
- * @private
228
- */
229
- FocusBindingDirective.prototype.ngZone;
230
- }
231
134
  //# sourceMappingURL=focus-binding.directive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"focus-binding.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/focus-binding.directive.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAiB,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAU,MAAM,eAAe,CAAC;AAClH,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAGzE;IAI2C,iDAAmB;IAqB5D,+BAAiD,EAAc,EAClB,MAAc,EAC7B,QAAa;QAF3C,YAGE,iBAAO,SAGR;QANgD,QAAE,GAAF,EAAE,CAAY;QAClB,YAAM,GAAN,MAAM,CAAQ;QAGzD,kHAAkH;QAClH,KAAI,CAAC,QAAQ,GAAG,mBAAA,QAAQ,EAAY,CAAC;;IACvC,CAAC;;;;IAnBD,yCAAS;;;IADT;QAEE,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;YACrB,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC;SACtD;IACH,CAAC;;;;IAGD,0CAAU;;;IADV;QAEE,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;YACrB,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;SACvD;IACH,CAAC;;;;IAUD,wCAAQ;;;IAAR;IACA,CAAC;;;;IAED,+CAAe;;;IAAf;QAAA,iBAYC;QAXC,iEAAiE;QACjE,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;YACb,IAAA,mCAAK;YACb,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,SAAS;;;;YAAC,UAAC,OAAO;gBACpE,IAAI,OAAO,IAAI,CAAC,KAAI,CAAC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CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,wEAAwE,CAAC,CAAC;iBACjG;aACF;SACF;IACH,CAAC;IAED,sBAAI,8CAAW;;;;QAAf;YACE,OAAO,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;QAC1D,CAAC;;;OAAA;IAED,yCAAyC;;;;;IACzC,yDAAyB;;;;;IAAzB;QACE,OAAO,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC;IACjF,CAAC;IAED,yCAAyC;;;;;IACzC,wCAAQ;;;;;IAAR;;YACQ,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,qBAAqB,EAAE;;YACpD,OAAO,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC;QAC9D,6CAA6C;QAC7C,OAAO,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;;gBApGF,SAAS,SAAC;;oBAET,QAAQ,EAAE,sBAAsB;iBACjC;;;;gBARkC,UAAU,uBA8B9B,MAAM,SAAC,UAAU;gBA9B4C,MAAM,uBA+BnE,MAAM,SAAC,MAAM;gDACb,MAAM,SAAC,QAAQ;;;qCAnB3B,KAAK;qCACL,KAAK;4BAEL,YAAY,SAAC,SAAS;6BAOtB,YAAY,SAAC,UAAU;;IAmF1B,4BAAC;CAAA,AArGD,CAI2C,mBAAmB,GAiG7D;SAjGY,qBAAqB;;;;;;IAEhC,yCAAoC;;IAEpC,mDAA8C;;IAC9C,mDAAyC;;;;;IAgB7B,mCAAmD;;;;;IACnD,uCAA+C","sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, NgZone, OnInit } from '@angular/core';\nimport { Dsl, HasFocusTracking, Logger } from '@coolon/pectin';\nimport { DisposableComponent } from '../components/disposable-component';\n\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[pectinFocusBinding]'\n})\nexport class FocusBindingDirective extends DisposableComponent implements OnInit, AfterViewInit {\n\n private readonly document: Document;\n\n @Input() pectinFocusBinding: HasFocusTracking;\n @Input() focusBindingTarget: HTMLElement;\n\n @HostListener('focusin')\n onFocusIn() {\n if (this.hasBinding()) {\n this.pectinFocusBinding.focusContext.notifyFocusIn();\n }\n }\n\n @HostListener('focusout')\n onFocusOut() {\n if (this.hasBinding()) {\n this.pectinFocusBinding.focusContext.notifyFocusOut();\n }\n }\n\n constructor(@Inject(ElementRef) private readonly el: ElementRef,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(DOCUMENT) document: any) {\n super();\n // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642\n this.document = document as Document;\n }\n\n ngOnInit(): void {\n }\n\n ngAfterViewInit(): void {\n // TODO: Make this also track the current enabled/disabled state.\n if (this.hasBinding()) {\n const { chain } = Dsl.disposeWith(this);\n chain(this.pectinFocusBinding.focusContext.focused).subscribe((focused) => {\n if (focused && !this.alreadyHasFocus()) {\n this.tryAndFocus();\n }\n });\n } else {\n Logger.get(this).warn('pectinFocusBinding was nil');\n }\n }\n\n private hasBinding() {\n return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;\n }\n\n// Hook method for debugging via tracing.\n alreadyHasFocus() {\n return this.isFocused(this.focusTarget);\n }\n\n // Hook method for debugging via tracing.\n isFocused(element: Element): boolean {\n return this.document.activeElement === element;\n }\n\n tryAndFocus(retries: number = 5) {\n if (this.modelShouldStillHaveFocus() && this.canFocus()) {\n if (!this.alreadyHasFocus()) {\n this.focusTarget.focus();\n }\n // if we didn't get the focus we try again later.\n if (!this.alreadyHasFocus()) {\n Logger.get(this).log(`focus failed, trying ${retries} more times`);\n if (retries > 0) {\n // try again on the next paint\n // TODO: is there an angular way of doing this without calling a window function.\n requestAnimationFrame(() => {\n this.tryAndFocus(retries - 1);\n });\n } else {\n Logger.get(this).warn(`Tried to focus but gave up as the component wasn't enabled or visible.`);\n }\n }\n }\n }\n\n get focusTarget(): HTMLElement {\n return this.focusBindingTarget || this.el.nativeElement;\n }\n\n // Hook method for debugging via tracing.\n modelShouldStillHaveFocus() {\n return this.hasBinding() && this.pectinFocusBinding.focusContext.focused.value;\n }\n\n // Hook method for debugging via tracing.\n canFocus(): boolean {\n const dimension = this.focusTarget.getBoundingClientRect();\n const hasSize = dimension.height >= 0 && dimension.height >= 0;\n // tslint:disable-next-line:no-string-literal\n return hasSize && !this.focusTarget['disabled'];\n }\n}\n"]}
1
+ {"version":3,"file":"focus-binding.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/focus-binding.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAClH,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAOzE;IAA2C,yCAAmB;IAqB5D,+BAAiD,EAAc,EAClB,MAAc,EAC7B,QAAa;QAF3C,YAGE,iBAAO,SAGR;QANgD,QAAE,GAAF,EAAE,CAAY;QAClB,YAAM,GAAN,MAAM,CAAQ;QAGzD,kHAAkH;QAClH,KAAI,CAAC,QAAQ,GAAG,QAAoB,CAAC;;IACvC,CAAC;IAnBD,yCAAS,GAAT;QACE,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;YACrB,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC;SACtD;IACH,CAAC;IAGD,0CAAU,GAAV;QACE,IAAI,IAAI,CAAC,UAAU,EAAE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C,YAAY,CAAC,UAAU,CAAC;;;;2DAKxB;IAnBU,qBAAqB;QAJjC,SAAS,CAAC;YACT,8CAA8C;YAC9C,QAAQ,EAAE,sBAAsB;SACjC,CAAC;QAsBa,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;QACd,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;yCAFwB,UAAU;YACV,MAAM;OAtBhD,qBAAqB,CAiGjC;IAAD,4BAAC;CAAA,AAjGD,CAA2C,mBAAmB,GAiG7D;SAjGY,qBAAqB","sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, NgZone, OnInit } from '@angular/core';\nimport { Dsl, HasFocusTracking, Logger } from '@coolon/pectin';\nimport { DisposableComponent } from '../components/disposable-component';\n\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[pectinFocusBinding]'\n})\nexport class FocusBindingDirective extends DisposableComponent implements OnInit, AfterViewInit {\n\n private readonly document: Document;\n\n @Input() pectinFocusBinding: HasFocusTracking;\n @Input() focusBindingTarget: HTMLElement;\n\n @HostListener('focusin')\n onFocusIn() {\n if (this.hasBinding()) {\n this.pectinFocusBinding.focusContext.notifyFocusIn();\n }\n }\n\n @HostListener('focusout')\n onFocusOut() {\n if (this.hasBinding()) {\n this.pectinFocusBinding.focusContext.notifyFocusOut();\n }\n }\n\n constructor(@Inject(ElementRef) private readonly el: ElementRef,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(DOCUMENT) document: any) {\n super();\n // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642\n this.document = document as Document;\n }\n\n ngOnInit(): void {\n }\n\n ngAfterViewInit(): void {\n // TODO: Make this also track the current enabled/disabled state.\n if (this.hasBinding()) {\n const { chain } = Dsl.disposeWith(this);\n chain(this.pectinFocusBinding.focusContext.focused).subscribe((focused) => {\n if (focused && !this.alreadyHasFocus()) {\n this.tryAndFocus();\n }\n });\n } else {\n Logger.get(this).warn('pectinFocusBinding was nil');\n }\n }\n\n private hasBinding() {\n return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;\n }\n\n// Hook method for debugging via tracing.\n alreadyHasFocus() {\n return this.isFocused(this.focusTarget);\n }\n\n // Hook method for debugging via tracing.\n isFocused(element: Element): boolean {\n return this.document.activeElement === element;\n }\n\n tryAndFocus(retries: number = 5) {\n if (this.modelShouldStillHaveFocus() && this.canFocus()) {\n if (!this.alreadyHasFocus()) {\n this.focusTarget.focus();\n }\n // if we didn't get the focus we try again later.\n if (!this.alreadyHasFocus()) {\n Logger.get(this).log(`focus failed, trying ${retries} more times`);\n if (retries > 0) {\n // try again on the next paint\n // TODO: is there an angular way of doing this without calling a window function.\n requestAnimationFrame(() => {\n this.tryAndFocus(retries - 1);\n });\n } else {\n Logger.get(this).warn(`Tried to focus but gave up as the component wasn't enabled or visible.`);\n }\n }\n }\n }\n\n get focusTarget(): HTMLElement {\n return this.focusBindingTarget || this.el.nativeElement;\n }\n\n // Hook method for debugging via tracing.\n modelShouldStillHaveFocus() {\n return this.hasBinding() && this.pectinFocusBinding.focusContext.focused.value;\n }\n\n // Hook method for debugging via tracing.\n canFocus(): boolean {\n const dimension = this.focusTarget.getBoundingClientRect();\n const hasSize = dimension.height >= 0 && dimension.height >= 0;\n // tslint:disable-next-line:no-string-literal\n return hasSize && !this.focusTarget['disabled'];\n }\n}\n"]}