@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,53 +1,27 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
5
- import { Directive, ElementRef, HostListener, Inject, Input } from '@angular/core';
1
+ import { __decorate, __metadata, __param } from "tslib";
2
+ import { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, OnDestroy, OnInit } from '@angular/core';
6
3
  import { assert, DelegatingValueModel, Dsl, GarbageCollector, lang, UnaryCommand } from '@coolon/pectin';
7
- /**
8
- * @template P
9
- */
10
- export class CommandDirective extends GarbageCollector {
11
- /**
12
- * @param {?} elementRef
13
- */
4
+ let CommandDirective = class CommandDirective extends GarbageCollector {
14
5
  constructor(elementRef) {
15
6
  super();
16
7
  this.elementRef = elementRef;
17
8
  this._commandEnabled = new DelegatingValueModel().withDefault(false);
18
9
  this._commandParameterProvided = false;
19
10
  }
20
- /**
21
- * @param {?} command
22
- * @return {?}
23
- */
24
11
  set pectinCommand(command) {
25
12
  this._command = command;
26
13
  this._commandEnabled.setDelegate(command ? command.enabled : null);
27
14
  }
28
- /**
29
- * @return {?}
30
- */
31
15
  get pectinCommand() {
32
16
  return this._command;
33
17
  }
34
- /**
35
- * @param {?} value
36
- * @return {?}
37
- */
38
18
  set commandParameter(value) {
39
19
  this._commandParameterProvided = true;
40
20
  this._commandParameter = value;
41
21
  }
42
- /**
43
- * @return {?}
44
- */
45
22
  get commandParameter() {
46
23
  return this._commandParameter;
47
24
  }
48
- /**
49
- * @return {?}
50
- */
51
25
  ngOnInit() {
52
26
  assert.notNil(this.pectinCommand);
53
27
  if (this.pectinCommand instanceof UnaryCommand) {
@@ -61,18 +35,11 @@ export class CommandDirective extends GarbageCollector {
61
35
  }
62
36
  }
63
37
  }
64
- /**
65
- * @return {?}
66
- */
67
38
  ngAfterViewInit() {
68
39
  // for some reason mat-buttons kills the disabled host binding. It works on a regular button but for now
69
40
  // we need to do this.
70
41
  const { chain } = Dsl.disposeWith(this);
71
- chain(this._commandEnabled).subscribe((/**
72
- * @param {?} enabled
73
- * @return {?}
74
- */
75
- enabled => {
42
+ chain(this._commandEnabled).subscribe(enabled => {
76
43
  if (enabled) {
77
44
  this.elementRef.nativeElement.removeAttribute('disabled');
78
45
  if (this.elementRef.nativeElement.tagName === 'A') {
@@ -85,18 +52,11 @@ export class CommandDirective extends GarbageCollector {
85
52
  this.elementRef.nativeElement.removeAttribute('href');
86
53
  }
87
54
  }
88
- }));
55
+ });
89
56
  }
90
- /**
91
- * @return {?}
92
- */
93
57
  ngOnDestroy() {
94
58
  this.dispose();
95
59
  }
96
- /**
97
- * @param {?} $event
98
- * @return {?}
99
- */
100
60
  notifyClick($event) {
101
61
  $event.preventDefault();
102
62
  $event.stopPropagation();
@@ -112,47 +72,33 @@ export class CommandDirective extends GarbageCollector {
112
72
  console.warn('disabled command clicked, ignoring.');
113
73
  }
114
74
  }
115
- }
116
- CommandDirective.decorators = [
117
- { type: Directive, args: [{
118
- // tslint:disable-next-line:directive-selector
119
- selector: '[pectinCommand]'
120
- },] }
121
- ];
122
- /** @nocollapse */
75
+ };
123
76
  CommandDirective.ctorParameters = () => [
124
77
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
125
78
  ];
126
- CommandDirective.propDecorators = {
127
- pectinCommand: [{ type: Input }],
128
- commandParameter: [{ type: Input }],
129
- notifyClick: [{ type: HostListener, args: ['click', ['$event'],] }]
130
- };
131
- if (false) {
132
- /**
133
- * @type {?}
134
- * @private
135
- */
136
- CommandDirective.prototype._command;
137
- /**
138
- * @type {?}
139
- * @private
140
- */
141
- CommandDirective.prototype._commandEnabled;
142
- /**
143
- * @type {?}
144
- * @private
145
- */
146
- CommandDirective.prototype._commandParameter;
147
- /**
148
- * @type {?}
149
- * @private
150
- */
151
- CommandDirective.prototype._commandParameterProvided;
152
- /**
153
- * @type {?}
154
- * @private
155
- */
156
- CommandDirective.prototype.elementRef;
157
- }
79
+ __decorate([
80
+ Input(),
81
+ __metadata("design:type", Object),
82
+ __metadata("design:paramtypes", [Object])
83
+ ], CommandDirective.prototype, "pectinCommand", null);
84
+ __decorate([
85
+ Input(),
86
+ __metadata("design:type", Object),
87
+ __metadata("design:paramtypes", [Object])
88
+ ], CommandDirective.prototype, "commandParameter", null);
89
+ __decorate([
90
+ HostListener('click', ['$event']),
91
+ __metadata("design:type", Function),
92
+ __metadata("design:paramtypes", [Event]),
93
+ __metadata("design:returntype", void 0)
94
+ ], CommandDirective.prototype, "notifyClick", null);
95
+ CommandDirective = __decorate([
96
+ Directive({
97
+ // tslint:disable-next-line:directive-selector
98
+ selector: '[pectinCommand]'
99
+ }),
100
+ __param(0, Inject(ElementRef)),
101
+ __metadata("design:paramtypes", [ElementRef])
102
+ ], CommandDirective);
103
+ export { CommandDirective };
158
104
  //# 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;;;;AAMlH,MAAM,OAAO,gBAA0B,SAAQ,gBAAgB;;;;IA2B7D,YAAwC,UAAsB;QAC5D,KAA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K;0BAmDL,YAAY,SAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;;;;;IAlEjC,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,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,MAAM,EAAW,oBAAoB,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAMlH,IAAa,gBAAgB,GAA7B,MAAa,gBAA0B,SAAQ,gBAAgB;IA2B7D,YAAwC,UAAsB;QAC5D,KAAK,EAAE,CAAC;QAD8B,eAAU,GAAV,UAAU,CAAY;QAxBtD,oBAAe,GAAG,IAAI,oBAAoB,EAAW,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAYzE,8BAAyB,GAAG,KAAK,CAAC;IAc1C,CAAC;IAvBD,IAAI,aAAa,CAAC,OAAuC;QACvD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC;IACD,IAAI,aAAa;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oBACjD,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;iBACvD;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,WAAW;QACT,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAID,WAAW,CAAC,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;CACF,CAAA;;YAvDqD,UAAU,uBAAjD,MAAM,SAAC,UAAU;;AArB9B;IADC,KAAK,EAAE;;;qDAIP;AASD;IADC,KAAK,EAAE;;;wDAIP;AAgDD;IADC,YAAY,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;;qCACd,KAAK;;mDAYxB;AAjFU,gBAAgB;IAJ5B,SAAS,CAAC;QACT,8CAA8C;QAC9C,QAAQ,EAAE,iBAAiB;KAC5B,CAAC;IA4Ba,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;qCAAqB,UAAU;GA3BnD,gBAAgB,CAkF5B;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,36 +1,36 @@
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';
12
11
  import { FocusBindingDirective } from './focus-binding.directive';
13
- export class DirectivesModule {
14
- }
15
- DirectivesModule.decorators = [
16
- { type: NgModule, args: [{
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
- ];
12
+ let DirectivesModule = class DirectivesModule {
13
+ };
14
+ DirectivesModule = __decorate([
15
+ NgModule({
16
+ declarations: [
17
+ CommandDirective,
18
+ FocusBindingDirective
19
+ ],
20
+ imports: [
21
+ CommonModule,
22
+ BrowserAnimationsModule,
23
+ FormsModule,
24
+ MatInputModule,
25
+ MatFormFieldModule,
26
+ MatSelectModule,
27
+ MatTabsModule
28
+ ],
29
+ exports: [
30
+ CommandDirective,
31
+ FocusBindingDirective
32
+ ]
33
+ })
34
+ ], DirectivesModule);
35
+ export { DirectivesModule };
36
36
  //# sourceMappingURL=directives.module.js.map
@@ -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;AAsBlE,MAAM,OAAO,gBAAgB;;;YApB5B,QAAQ,SAAC;gBACR,YAAY,EAAE;oBACZ,gBAAgB;oBAChB,qBAAqB;iBACtB;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,uBAAuB;oBACvB,WAAW;oBACX,cAAc;oBACd,kBAAkB;oBAClB,eAAe;oBACf,aAAa;iBACd;gBACD,OAAO,EAAE;oBACP,gBAAgB;oBAChB,qBAAqB;iBACtB;aAEF","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,gBAAgB,GAA7B,MAAa,gBAAgB;CAC5B,CAAA;AADY,gBAAgB;IApB5B,QAAQ,CAAC;QACR,YAAY,EAAE;YACZ,gBAAgB;YAChB,qBAAqB;SACtB;QACD,OAAO,EAAE;YACP,YAAY;YACZ,uBAAuB;YACvB,WAAW;YACX,cAAc;YACd,kBAAkB;YAClB,eAAe;YACf,aAAa;SACd;QACD,OAAO,EAAE;YACP,gBAAgB;YAChB,qBAAqB;SACtB;KAEF,CAAC;GACW,gBAAgB,CAC5B;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
- [{"__symbolic":"module","version":4,"metadata":{"DirectivesModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":9,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./command.directive","name":"CommandDirective","line":11,"character":4},{"__symbolic":"reference","module":"./focus-binding.directive","name":"FocusBindingDirective","line":12,"character":4}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":15,"character":4},{"__symbolic":"reference","module":"@angular/platform-browser/animations","name":"BrowserAnimationsModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/material","name":"MatInputModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material","name":"MatFormFieldModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material","name":"MatSelectModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/tabs","name":"MatTabsModule","line":21,"character":4}],"exports":[{"__symbolic":"reference","module":"./command.directive","name":"CommandDirective","line":24,"character":4},{"__symbolic":"reference","module":"./focus-binding.directive","name":"FocusBindingDirective","line":25,"character":4}]}]}]}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"DirectivesModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":11,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./command.directive","name":"CommandDirective","line":13,"character":4},{"__symbolic":"reference","module":"./focus-binding.directive","name":"FocusBindingDirective","line":14,"character":4}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/platform-browser/animations","name":"BrowserAnimationsModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/select","name":"MatSelectModule","line":22,"character":4},{"__symbolic":"reference","module":"@angular/material/tabs","name":"MatTabsModule","line":23,"character":4}],"exports":[{"__symbolic":"reference","module":"./command.directive","name":"CommandDirective","line":26,"character":4},{"__symbolic":"reference","module":"./focus-binding.directive","name":"FocusBindingDirective","line":27,"character":4}]}]}]}}}]
@@ -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,92 +1,53 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
1
+ import { __decorate, __metadata, __param } from "tslib";
5
2
  import { DOCUMENT } from '@angular/common';
6
- import { Directive, ElementRef, HostListener, Inject, Input, NgZone } from '@angular/core';
3
+ import { AfterViewInit, Directive, ElementRef, HostListener, Inject, Input, NgZone, OnInit } from '@angular/core';
7
4
  import { Dsl, HasFocusTracking, Logger } from '@coolon/pectin';
8
5
  import { DisposableComponent } from '../components/disposable-component';
9
- export class FocusBindingDirective extends DisposableComponent {
10
- /**
11
- * @param {?} el
12
- * @param {?} ngZone
13
- * @param {?} document
14
- */
6
+ let FocusBindingDirective = class FocusBindingDirective extends DisposableComponent {
15
7
  constructor(el, ngZone, document) {
16
8
  super();
17
9
  this.el = el;
18
10
  this.ngZone = ngZone;
19
11
  // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
20
- this.document = (/** @type {?} */ (document));
12
+ this.document = document;
21
13
  }
22
- /**
23
- * @return {?}
24
- */
25
14
  onFocusIn() {
26
15
  if (this.hasBinding()) {
27
16
  this.pectinFocusBinding.focusContext.notifyFocusIn();
28
17
  }
29
18
  }
30
- /**
31
- * @return {?}
32
- */
33
19
  onFocusOut() {
34
20
  if (this.hasBinding()) {
35
21
  this.pectinFocusBinding.focusContext.notifyFocusOut();
36
22
  }
37
23
  }
38
- /**
39
- * @return {?}
40
- */
41
24
  ngOnInit() {
42
25
  }
43
- /**
44
- * @return {?}
45
- */
46
26
  ngAfterViewInit() {
47
27
  // TODO: Make this also track the current enabled/disabled state.
48
28
  if (this.hasBinding()) {
49
29
  const { chain } = Dsl.disposeWith(this);
50
- chain(this.pectinFocusBinding.focusContext.focused).subscribe((/**
51
- * @param {?} focused
52
- * @return {?}
53
- */
54
- (focused) => {
30
+ chain(this.pectinFocusBinding.focusContext.focused).subscribe((focused) => {
55
31
  if (focused && !this.alreadyHasFocus()) {
56
32
  this.tryAndFocus();
57
33
  }
58
- }));
34
+ });
59
35
  }
60
36
  else {
61
37
  Logger.get(this).warn('pectinFocusBinding was nil');
62
38
  }
63
39
  }
64
- /**
65
- * @private
66
- * @return {?}
67
- */
68
40
  hasBinding() {
69
41
  return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;
70
42
  }
71
43
  // Hook method for debugging via tracing.
72
- /**
73
- * @return {?}
74
- */
75
44
  alreadyHasFocus() {
76
45
  return this.isFocused(this.focusTarget);
77
46
  }
78
47
  // Hook method for debugging via tracing.
79
- /**
80
- * @param {?} element
81
- * @return {?}
82
- */
83
48
  isFocused(element) {
84
49
  return this.document.activeElement === element;
85
50
  }
86
- /**
87
- * @param {?=} retries
88
- * @return {?}
89
- */
90
51
  tryAndFocus(retries = 5) {
91
52
  if (this.modelShouldStillHaveFocus() && this.canFocus()) {
92
53
  if (!this.alreadyHasFocus()) {
@@ -98,12 +59,9 @@ export class FocusBindingDirective extends DisposableComponent {
98
59
  if (retries > 0) {
99
60
  // try again on the next paint
100
61
  // TODO: is there an angular way of doing this without calling a window function.
101
- requestAnimationFrame((/**
102
- * @return {?}
103
- */
104
- () => {
62
+ requestAnimationFrame(() => {
105
63
  this.tryAndFocus(retries - 1);
106
- }));
64
+ });
107
65
  }
108
66
  else {
109
67
  Logger.get(this).warn(`Tried to focus but gave up as the component wasn't enabled or visible.`);
@@ -111,69 +69,56 @@ export class FocusBindingDirective extends DisposableComponent {
111
69
  }
112
70
  }
113
71
  }
114
- /**
115
- * @return {?}
116
- */
117
72
  get focusTarget() {
118
73
  return this.focusBindingTarget || this.el.nativeElement;
119
74
  }
120
75
  // Hook method for debugging via tracing.
121
- /**
122
- * @return {?}
123
- */
124
76
  modelShouldStillHaveFocus() {
125
77
  return this.hasBinding() && this.pectinFocusBinding.focusContext.focused.value;
126
78
  }
127
79
  // Hook method for debugging via tracing.
128
- /**
129
- * @return {?}
130
- */
131
80
  canFocus() {
132
- /** @type {?} */
133
81
  const dimension = this.focusTarget.getBoundingClientRect();
134
- /** @type {?} */
135
82
  const hasSize = dimension.height >= 0 && dimension.height >= 0;
136
83
  // tslint:disable-next-line:no-string-literal
137
84
  return hasSize && !this.focusTarget['disabled'];
138
85
  }
139
- }
140
- FocusBindingDirective.decorators = [
141
- { type: Directive, args: [{
142
- // tslint:disable-next-line:directive-selector
143
- selector: '[pectinFocusBinding]'
144
- },] }
145
- ];
146
- /** @nocollapse */
86
+ };
147
87
  FocusBindingDirective.ctorParameters = () => [
148
88
  { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
149
89
  { type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
150
90
  { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
151
91
  ];
152
- FocusBindingDirective.propDecorators = {
153
- pectinFocusBinding: [{ type: Input }],
154
- focusBindingTarget: [{ type: Input }],
155
- onFocusIn: [{ type: HostListener, args: ['focusin',] }],
156
- onFocusOut: [{ type: HostListener, args: ['focusout',] }]
157
- };
158
- if (false) {
159
- /**
160
- * @type {?}
161
- * @private
162
- */
163
- FocusBindingDirective.prototype.document;
164
- /** @type {?} */
165
- FocusBindingDirective.prototype.pectinFocusBinding;
166
- /** @type {?} */
167
- FocusBindingDirective.prototype.focusBindingTarget;
168
- /**
169
- * @type {?}
170
- * @private
171
- */
172
- FocusBindingDirective.prototype.el;
173
- /**
174
- * @type {?}
175
- * @private
176
- */
177
- FocusBindingDirective.prototype.ngZone;
178
- }
92
+ __decorate([
93
+ Input(),
94
+ __metadata("design:type", Object)
95
+ ], FocusBindingDirective.prototype, "pectinFocusBinding", void 0);
96
+ __decorate([
97
+ Input(),
98
+ __metadata("design:type", HTMLElement)
99
+ ], FocusBindingDirective.prototype, "focusBindingTarget", void 0);
100
+ __decorate([
101
+ HostListener('focusin'),
102
+ __metadata("design:type", Function),
103
+ __metadata("design:paramtypes", []),
104
+ __metadata("design:returntype", void 0)
105
+ ], FocusBindingDirective.prototype, "onFocusIn", null);
106
+ __decorate([
107
+ HostListener('focusout'),
108
+ __metadata("design:type", Function),
109
+ __metadata("design:paramtypes", []),
110
+ __metadata("design:returntype", void 0)
111
+ ], FocusBindingDirective.prototype, "onFocusOut", null);
112
+ FocusBindingDirective = __decorate([
113
+ Directive({
114
+ // tslint:disable-next-line:directive-selector
115
+ selector: '[pectinFocusBinding]'
116
+ }),
117
+ __param(0, Inject(ElementRef)),
118
+ __param(1, Inject(NgZone)),
119
+ __param(2, Inject(DOCUMENT)),
120
+ __metadata("design:paramtypes", [ElementRef,
121
+ NgZone, Object])
122
+ ], FocusBindingDirective);
123
+ export { FocusBindingDirective };
179
124
  //# 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;AAOzE,MAAM,OAAO,qBAAsB,SAAQ,mBAAmB;;;;;;IAqB5D,YAAiD,EAAc,EAClB,MAAc,EAC7B,Q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,CAAC,CAAC;IAClD,CAAC;;;YApGF,SAAS,SAAC;;gBAET,QAAQ,EAAE,sBAAsB;aACjC;;;;YARkC,UAAU,uBA8B9B,MAAM,SAAC,UAAU;YA9B4C,MAAM,uBA+BnE,MAAM,SAAC,MAAM;4CACb,MAAM,SAAC,QAAQ;;;iCAnB3B,KAAK;iCACL,KAAK;wBAEL,YAAY,SAAC,SAAS;yBAOtB,YAAY,SAAC,UAAU;;;;;;;IAZxB,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,EA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S,GAAG,IAAI,CAAC,WAAW,CAAC,qBAAqB,EAAE,CAAC;QAC3D,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;QAC/D,6CAA6C;QAC7C,OAAO,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;CACF,CAAA;;YA5EsD,UAAU,uBAAlD,MAAM,SAAC,UAAU;YACuB,MAAM,uBAA9C,MAAM,SAAC,MAAM;4CACb,MAAM,SAAC,QAAQ;;AAnBnB;IAAR,KAAK,EAAE;;iEAAsC;AACrC;IAAR,KAAK,EAAE;8BAAqB,WAAW;iEAAC;AAGzC;IADC,YAAY,CAAC,SAAS,CAAC;;;;sDAKvB;AAGD;IADC,YAAY,CAAC,UAAU,CAAC;;;;uDAKxB;AAnBU,qBAAqB;IAJjC,SAAS,CAAC;QACT,8CAA8C;QAC9C,QAAQ,EAAE,sBAAsB;KACjC,CAAC;IAsBa,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;qCAFwB,UAAU;QACV,MAAM;GAtBhD,qBAAqB,CAiGjC;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"]}
@@ -1,11 +1,7 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
5
1
  /**
6
2
  * @file Automatically generated by barrelsby.
7
3
  */
8
- export { CommandDirective } from "./command.directive";
9
- export { DirectivesModule } from "./directives.module";
10
- export { FocusBindingDirective } from "./focus-binding.directive";
4
+ export * from "./command.directive";
5
+ export * from "./directives.module";
6
+ export * from "./focus-binding.directive";
11
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/index.ts"],"names":[],"mappings":";;;;;;;AAIA,iCAAc,qBAAqB,CAAC;AACpC,iCAAc,qBAAqB,CAAC;AACpC,sCAAc,2BAA2B,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./command.directive\";\nexport * from \"./directives.module\";\nexport * from \"./focus-binding.directive\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/directives/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./command.directive\";\nexport * from \"./directives.module\";\nexport * from \"./focus-binding.directive\";\n"]}