@coolon/angular-ui-powerups 0.0.134 → 1.0.0-alpha.11

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 (429) hide show
  1. package/CHANGELOG.md +301 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +1178 -6280
  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.d.ts +27 -26
  7. package/coolon-angular-ui-powerups.metadata.json +1 -1
  8. package/esm2015/coolon-angular-ui-powerups.js +26 -29
  9. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  10. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  11. package/esm2015/index.js +1 -5
  12. package/esm2015/index.js.map +1 -1
  13. package/esm2015/lib/angular-ui-powerups.module.js +32 -32
  14. package/esm2015/lib/angular-ui-powerups.module.js.map +1 -1
  15. package/esm2015/lib/angular-ui-powerups.module.metadata.json +1 -1
  16. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  17. package/esm2015/lib/animations/index.js +1 -5
  18. package/esm2015/lib/animations/index.js.map +1 -1
  19. package/esm2015/lib/animations/slide-animations.js +0 -8
  20. package/esm2015/lib/animations/slide-animations.js.map +1 -1
  21. package/esm2015/lib/components/components.module.js +40 -37
  22. package/esm2015/lib/components/components.module.js.map +1 -1
  23. package/esm2015/lib/components/components.module.metadata.json +1 -1
  24. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  25. package/esm2015/lib/components/disposable-component.js +8 -9
  26. package/esm2015/lib/components/disposable-component.js.map +1 -1
  27. package/esm2015/lib/components/disposable-component.metadata.json +1 -1
  28. package/esm2015/lib/components/forms/abstract-input.component.js +82 -114
  29. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  30. package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
  31. package/esm2015/lib/components/forms/number-input/number-input.component.js +12 -18
  32. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  33. package/esm2015/lib/components/forms/password-input/password-input.component.js +12 -18
  34. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  35. package/esm2015/lib/components/forms/select-input/select-input.component.js +38 -57
  36. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  37. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  38. package/esm2015/lib/components/forms/string-input/string-input.component.js +19 -41
  39. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  40. package/esm2015/lib/components/index.js +13 -16
  41. package/esm2015/lib/components/index.js.map +1 -1
  42. package/esm2015/lib/components/index.metadata.json +1 -1
  43. package/esm2015/lib/components/noop/noop.component.js +12 -15
  44. package/esm2015/lib/components/noop/noop.component.js.map +1 -1
  45. package/esm2015/lib/components/resize-aware.component.js +17 -64
  46. package/esm2015/lib/components/resize-aware.component.js.map +1 -1
  47. package/esm2015/lib/components/resize-aware.component.metadata.json +1 -1
  48. package/esm2015/lib/components/scroll-container/scroll-container.component.js +17 -0
  49. package/esm2015/lib/components/scroll-container/scroll-container.component.js.map +1 -0
  50. package/esm2015/lib/components/scroll-container/scroll-container.component.metadata.json +1 -0
  51. package/esm2015/lib/components/scroll-container/scroll-container.component.ngfactory.js.map +1 -0
  52. package/esm2015/lib/components/scroll-container/scroll-container.component.scss.shim.ngstyle.js.map +1 -0
  53. package/esm2015/lib/components/types/bounds.class.js +0 -29
  54. package/esm2015/lib/components/types/bounds.class.js.map +1 -1
  55. package/esm2015/lib/components/types/dimension.class.js +0 -14
  56. package/esm2015/lib/components/types/dimension.class.js.map +1 -1
  57. package/esm2015/lib/components/types/point.class.js +0 -23
  58. package/esm2015/lib/components/types/point.class.js.map +1 -1
  59. package/esm2015/lib/directives/command.directive.js +31 -85
  60. package/esm2015/lib/directives/command.directive.js.map +1 -1
  61. package/esm2015/lib/directives/directives.module.js +28 -28
  62. package/esm2015/lib/directives/directives.module.js.map +1 -1
  63. package/esm2015/lib/directives/directives.module.metadata.json +1 -1
  64. package/esm2015/lib/directives/directives.module.ngfactory.js.map +1 -1
  65. package/esm2015/lib/directives/focus-binding.directive.js +41 -96
  66. package/esm2015/lib/directives/focus-binding.directive.js.map +1 -1
  67. package/esm2015/lib/directives/index.js +3 -7
  68. package/esm2015/lib/directives/index.js.map +1 -1
  69. package/esm2015/lib/interaction/abstract-interaction-context.js +4 -73
  70. package/esm2015/lib/interaction/abstract-interaction-context.js.map +1 -1
  71. package/esm2015/lib/interaction/activity-ref.js +2 -79
  72. package/esm2015/lib/interaction/activity-ref.js.map +1 -1
  73. package/esm2015/lib/interaction/activity.js +0 -72
  74. package/esm2015/lib/interaction/activity.js.map +1 -1
  75. package/esm2015/lib/interaction/alert.js +0 -22
  76. package/esm2015/lib/interaction/alert.js.map +1 -1
  77. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +41 -187
  78. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  79. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +24 -74
  80. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  81. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +13 -24
  82. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
  83. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +15 -62
  84. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
  85. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +13 -27
  86. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
  87. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +16 -71
  88. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  89. package/esm2015/lib/interaction/confirm.js +0 -16
  90. package/esm2015/lib/interaction/confirm.js.map +1 -1
  91. package/esm2015/lib/interaction/index.js +15 -24
  92. package/esm2015/lib/interaction/index.js.map +1 -1
  93. package/esm2015/lib/interaction/interaction-context.js +0 -50
  94. package/esm2015/lib/interaction/interaction-context.js.map +1 -1
  95. package/esm2015/lib/interaction/interaction.module.js +41 -41
  96. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  97. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  98. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  99. package/esm2015/lib/interaction/result.js +2 -23
  100. package/esm2015/lib/interaction/result.js.map +1 -1
  101. package/esm2015/lib/interaction/route-synchronisation-adapter.js +0 -16
  102. package/esm2015/lib/interaction/route-synchronisation-adapter.js.map +1 -1
  103. package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js +0 -43
  104. package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -1
  105. package/esm2015/lib/interaction/services/interaction.service.js +22 -172
  106. package/esm2015/lib/interaction/services/interaction.service.js.map +1 -1
  107. package/esm2015/lib/interaction/services/interaction.service.metadata.json +1 -1
  108. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +17 -40
  109. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
  110. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.metadata.json +1 -1
  111. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +7 -86
  112. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
  113. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.metadata.json +1 -1
  114. package/esm2015/lib/interaction/services/modal-interaction-context.factory.js +0 -16
  115. package/esm2015/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
  116. package/esm2015/lib/place/components/abstract-place-navigation.component.js +36 -105
  117. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  118. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js +17 -34
  119. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
  120. package/esm2015/lib/place/components/empty-state/empty-state.component.js +12 -18
  121. package/esm2015/lib/place/components/empty-state/empty-state.component.js.map +1 -1
  122. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +16 -33
  123. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  124. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +52 -240
  125. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  126. package/esm2015/lib/place/components/place-outlet/route-animations.js +0 -12
  127. package/esm2015/lib/place/components/place-outlet/route-animations.js.map +1 -1
  128. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +12 -17
  129. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  130. package/esm2015/lib/place/guards/consolidated-param-map.js +9 -92
  131. package/esm2015/lib/place/guards/consolidated-param-map.js.map +1 -1
  132. package/esm2015/lib/place/guards/noop-auth-guard.service.js +12 -21
  133. package/esm2015/lib/place/guards/noop-auth-guard.service.js.map +1 -1
  134. package/esm2015/lib/place/guards/noop-auth-guard.service.metadata.json +1 -1
  135. package/esm2015/lib/place/guards/place.guard.js +10 -119
  136. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  137. package/esm2015/lib/place/index.js +38 -46
  138. package/esm2015/lib/place/index.js.map +1 -1
  139. package/esm2015/lib/place/nav-item.js +0 -22
  140. package/esm2015/lib/place/nav-item.js.map +1 -1
  141. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +3 -49
  142. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
  143. package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js +0 -23
  144. package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -1
  145. package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +0 -11
  146. package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -1
  147. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +2 -51
  148. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -1
  149. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +2 -54
  150. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -1
  151. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +2 -60
  152. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -1
  153. package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js +0 -24
  154. package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -1
  155. package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +1 -19
  156. package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -1
  157. package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +0 -55
  158. package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -1
  159. package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +4 -60
  160. package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -1
  161. package/esm2015/lib/place/navigation/session/navigating.js +0 -31
  162. package/esm2015/lib/place/navigation/session/navigating.js.map +1 -1
  163. package/esm2015/lib/place/navigation/session/navigation-context.js +0 -24
  164. package/esm2015/lib/place/navigation/session/navigation-context.js.map +1 -1
  165. package/esm2015/lib/place/navigation/session/navigation-session.js +12 -178
  166. package/esm2015/lib/place/navigation/session/navigation-session.js.map +1 -1
  167. package/esm2015/lib/place/navigation/session/pop-state-navigation.js +0 -16
  168. package/esm2015/lib/place/navigation/session/pop-state-navigation.js.map +1 -1
  169. package/esm2015/lib/place/place-component.js +22 -107
  170. package/esm2015/lib/place/place-component.js.map +1 -1
  171. package/esm2015/lib/place/place-component.metadata.json +1 -1
  172. package/esm2015/lib/place/place-config.js +0 -13
  173. package/esm2015/lib/place/place-config.js.map +1 -1
  174. package/esm2015/lib/place/place-definition.js +26 -163
  175. package/esm2015/lib/place/place-definition.js.map +1 -1
  176. package/esm2015/lib/place/place-history.js +11 -38
  177. package/esm2015/lib/place/place-history.js.map +1 -1
  178. package/esm2015/lib/place/place-history.metadata.json +1 -1
  179. package/esm2015/lib/place/place-router.js +38 -247
  180. package/esm2015/lib/place/place-router.js.map +1 -1
  181. package/esm2015/lib/place/place-router.metadata.json +1 -1
  182. package/esm2015/lib/place/place.decorator.js +3 -38
  183. package/esm2015/lib/place/place.decorator.js.map +1 -1
  184. package/esm2015/lib/place/place.module.js +40 -42
  185. package/esm2015/lib/place/place.module.js.map +1 -1
  186. package/esm2015/lib/place/place.module.metadata.json +1 -1
  187. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  188. package/esm2015/lib/place/route/formatter.js +0 -30
  189. package/esm2015/lib/place/route/formatter.js.map +1 -1
  190. package/esm2015/lib/place/route/json-types.js +0 -12
  191. package/esm2015/lib/place/route/json-types.js.map +1 -1
  192. package/esm2015/lib/place/route/parameter-decorators.js +14 -133
  193. package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
  194. package/esm2015/lib/place/route/parameter-definition.class.js +2 -147
  195. package/esm2015/lib/place/route/parameter-definition.class.js.map +1 -1
  196. package/esm2015/lib/place/route/parameter-sanitiser.js +0 -18
  197. package/esm2015/lib/place/route/parameter-sanitiser.js.map +1 -1
  198. package/esm2015/lib/place/route/parameter-snapshot.js +0 -19
  199. package/esm2015/lib/place/route/parameter-snapshot.js.map +1 -1
  200. package/esm2015/lib/place/route/visit-sanitiser.js +2 -47
  201. package/esm2015/lib/place/route/visit-sanitiser.js.map +1 -1
  202. package/esm2015/lib/place/url-service.js +13 -68
  203. package/esm2015/lib/place/url-service.js.map +1 -1
  204. package/esm2015/lib/place/url-service.metadata.json +1 -1
  205. package/esm2015/lib/place/url-snapshot.js +3 -86
  206. package/esm2015/lib/place/url-snapshot.js.map +1 -1
  207. package/esm2015/lib/place/visit.js +5 -73
  208. package/esm2015/lib/place/visit.js.map +1 -1
  209. package/esm2015/public_api.js +6 -10
  210. package/esm2015/public_api.js.map +1 -1
  211. package/esm5/coolon-angular-ui-powerups.js +26 -29
  212. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  213. package/esm5/index.js +1 -5
  214. package/esm5/index.js.map +1 -1
  215. package/esm5/lib/angular-ui-powerups.module.js +29 -30
  216. package/esm5/lib/angular-ui-powerups.module.js.map +1 -1
  217. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  218. package/esm5/lib/animations/index.js +1 -5
  219. package/esm5/lib/animations/index.js.map +1 -1
  220. package/esm5/lib/animations/slide-animations.js +0 -8
  221. package/esm5/lib/animations/slide-animations.js.map +1 -1
  222. package/esm5/lib/components/components.module.js +37 -35
  223. package/esm5/lib/components/components.module.js.map +1 -1
  224. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  225. package/esm5/lib/components/disposable-component.js +7 -13
  226. package/esm5/lib/components/disposable-component.js.map +1 -1
  227. package/esm5/lib/components/forms/abstract-input.component.js +95 -157
  228. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  229. package/esm5/lib/components/forms/number-input/number-input.component.js +11 -22
  230. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  231. package/esm5/lib/components/forms/password-input/password-input.component.js +11 -22
  232. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  233. package/esm5/lib/components/forms/select-input/select-input.component.js +38 -61
  234. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  235. package/esm5/lib/components/forms/string-input/string-input.component.js +19 -45
  236. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  237. package/esm5/lib/components/index.js +13 -16
  238. package/esm5/lib/components/index.js.map +1 -1
  239. package/esm5/lib/components/noop/noop.component.js +9 -13
  240. package/esm5/lib/components/noop/noop.component.js.map +1 -1
  241. package/esm5/lib/components/resize-aware.component.js +21 -80
  242. package/esm5/lib/components/resize-aware.component.js.map +1 -1
  243. package/esm5/lib/components/scroll-container/scroll-container.component.js +19 -0
  244. package/esm5/lib/components/scroll-container/scroll-container.component.js.map +1 -0
  245. package/esm5/lib/components/scroll-container/scroll-container.component.ngfactory.js.map +1 -0
  246. package/esm5/lib/components/scroll-container/scroll-container.component.scss.shim.ngstyle.js.map +1 -0
  247. package/esm5/lib/components/types/bounds.class.js +3 -30
  248. package/esm5/lib/components/types/bounds.class.js.map +1 -1
  249. package/esm5/lib/components/types/dimension.class.js +0 -10
  250. package/esm5/lib/components/types/dimension.class.js.map +1 -1
  251. package/esm5/lib/components/types/point.class.js +2 -30
  252. package/esm5/lib/components/types/point.class.js.map +1 -1
  253. package/esm5/lib/directives/command.directive.js +37 -103
  254. package/esm5/lib/directives/command.directive.js.map +1 -1
  255. package/esm5/lib/directives/directives.module.js +25 -26
  256. package/esm5/lib/directives/directives.module.js.map +1 -1
  257. package/esm5/lib/directives/directives.module.ngfactory.js.map +1 -1
  258. package/esm5/lib/directives/focus-binding.directive.js +50 -147
  259. package/esm5/lib/directives/focus-binding.directive.js.map +1 -1
  260. package/esm5/lib/directives/index.js +3 -7
  261. package/esm5/lib/directives/index.js.map +1 -1
  262. package/esm5/lib/interaction/abstract-interaction-context.js +7 -114
  263. package/esm5/lib/interaction/abstract-interaction-context.js.map +1 -1
  264. package/esm5/lib/interaction/activity-ref.js +12 -109
  265. package/esm5/lib/interaction/activity-ref.js.map +1 -1
  266. package/esm5/lib/interaction/activity.js +12 -121
  267. package/esm5/lib/interaction/activity.js.map +1 -1
  268. package/esm5/lib/interaction/alert.js +0 -22
  269. package/esm5/lib/interaction/alert.js.map +1 -1
  270. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +64 -330
  271. package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  272. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +26 -79
  273. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  274. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +12 -25
  275. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
  276. package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +17 -72
  277. package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
  278. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +13 -32
  279. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
  280. package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +24 -117
  281. package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  282. package/esm5/lib/interaction/confirm.js +0 -16
  283. package/esm5/lib/interaction/confirm.js.map +1 -1
  284. package/esm5/lib/interaction/index.js +15 -24
  285. package/esm5/lib/interaction/index.js.map +1 -1
  286. package/esm5/lib/interaction/interaction-context.js +0 -50
  287. package/esm5/lib/interaction/interaction-context.js.map +1 -1
  288. package/esm5/lib/interaction/interaction.module.js +38 -39
  289. package/esm5/lib/interaction/interaction.module.js.map +1 -1
  290. package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  291. package/esm5/lib/interaction/result.js +2 -23
  292. package/esm5/lib/interaction/result.js.map +1 -1
  293. package/esm5/lib/interaction/route-synchronisation-adapter.js +0 -16
  294. package/esm5/lib/interaction/route-synchronisation-adapter.js.map +1 -1
  295. package/esm5/lib/interaction/services/interaction-service-routing-adapter.js +6 -73
  296. package/esm5/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -1
  297. package/esm5/lib/interaction/services/interaction.service.js +33 -290
  298. package/esm5/lib/interaction/services/interaction.service.js.map +1 -1
  299. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +16 -41
  300. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
  301. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +14 -109
  302. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
  303. package/esm5/lib/interaction/services/modal-interaction-context.factory.js +1 -23
  304. package/esm5/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
  305. package/esm5/lib/place/components/abstract-place-navigation.component.js +37 -115
  306. package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  307. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js +16 -37
  308. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
  309. package/esm5/lib/place/components/empty-state/empty-state.component.js +10 -20
  310. package/esm5/lib/place/components/empty-state/empty-state.component.js.map +1 -1
  311. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +17 -42
  312. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  313. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +64 -314
  314. package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  315. package/esm5/lib/place/components/place-outlet/route-animations.js +0 -12
  316. package/esm5/lib/place/components/place-outlet/route-animations.js.map +1 -1
  317. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +10 -14
  318. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  319. package/esm5/lib/place/guards/consolidated-param-map.js +17 -117
  320. package/esm5/lib/place/guards/consolidated-param-map.js.map +1 -1
  321. package/esm5/lib/place/guards/noop-auth-guard.service.js +11 -26
  322. package/esm5/lib/place/guards/noop-auth-guard.service.js.map +1 -1
  323. package/esm5/lib/place/guards/place.guard.js +24 -172
  324. package/esm5/lib/place/guards/place.guard.js.map +1 -1
  325. package/esm5/lib/place/index.js +38 -46
  326. package/esm5/lib/place/index.js.map +1 -1
  327. package/esm5/lib/place/nav-item.js +0 -22
  328. package/esm5/lib/place/nav-item.js.map +1 -1
  329. package/esm5/lib/place/navigation/place-component-deactivation-handler.js +11 -86
  330. package/esm5/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
  331. package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js +4 -34
  332. package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -1
  333. package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +4 -25
  334. package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -1
  335. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +11 -110
  336. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -1
  337. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +12 -147
  338. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -1
  339. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +11 -126
  340. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -1
  341. package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js +7 -71
  342. package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -1
  343. package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +6 -49
  344. package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -1
  345. package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +11 -120
  346. package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -1
  347. package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +13 -106
  348. package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -1
  349. package/esm5/lib/place/navigation/session/navigating.js +6 -53
  350. package/esm5/lib/place/navigation/session/navigating.js.map +1 -1
  351. package/esm5/lib/place/navigation/session/navigation-context.js +0 -17
  352. package/esm5/lib/place/navigation/session/navigation-context.js.map +1 -1
  353. package/esm5/lib/place/navigation/session/navigation-session.js +39 -306
  354. package/esm5/lib/place/navigation/session/navigation-session.js.map +1 -1
  355. package/esm5/lib/place/navigation/session/pop-state-navigation.js +5 -33
  356. package/esm5/lib/place/navigation/session/pop-state-navigation.js.map +1 -1
  357. package/esm5/lib/place/place-component.js +30 -142
  358. package/esm5/lib/place/place-component.js.map +1 -1
  359. package/esm5/lib/place/place-config.js +0 -13
  360. package/esm5/lib/place/place-config.js.map +1 -1
  361. package/esm5/lib/place/place-definition.js +37 -219
  362. package/esm5/lib/place/place-definition.js.map +1 -1
  363. package/esm5/lib/place/place-history.js +11 -56
  364. package/esm5/lib/place/place-history.js.map +1 -1
  365. package/esm5/lib/place/place-router.js +59 -372
  366. package/esm5/lib/place/place-router.js.map +1 -1
  367. package/esm5/lib/place/place.decorator.js +3 -38
  368. package/esm5/lib/place/place.decorator.js.map +1 -1
  369. package/esm5/lib/place/place.module.js +37 -40
  370. package/esm5/lib/place/place.module.js.map +1 -1
  371. package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
  372. package/esm5/lib/place/route/formatter.js +6 -60
  373. package/esm5/lib/place/route/formatter.js.map +1 -1
  374. package/esm5/lib/place/route/json-types.js +0 -12
  375. package/esm5/lib/place/route/json-types.js.map +1 -1
  376. package/esm5/lib/place/route/parameter-decorators.js +14 -133
  377. package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
  378. package/esm5/lib/place/route/parameter-definition.class.js +21 -222
  379. package/esm5/lib/place/route/parameter-definition.class.js.map +1 -1
  380. package/esm5/lib/place/route/parameter-sanitiser.js +0 -18
  381. package/esm5/lib/place/route/parameter-sanitiser.js.map +1 -1
  382. package/esm5/lib/place/route/parameter-snapshot.js +0 -19
  383. package/esm5/lib/place/route/parameter-snapshot.js.map +1 -1
  384. package/esm5/lib/place/route/visit-sanitiser.js +4 -42
  385. package/esm5/lib/place/route/visit-sanitiser.js.map +1 -1
  386. package/esm5/lib/place/url-service.js +20 -119
  387. package/esm5/lib/place/url-service.js.map +1 -1
  388. package/esm5/lib/place/url-snapshot.js +15 -143
  389. package/esm5/lib/place/url-snapshot.js.map +1 -1
  390. package/esm5/lib/place/visit.js +14 -132
  391. package/esm5/lib/place/visit.js.map +1 -1
  392. package/esm5/public_api.js +6 -10
  393. package/esm5/public_api.js.map +1 -1
  394. package/fesm2015/coolon-angular-ui-powerups.js +866 -4507
  395. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  396. package/fesm5/coolon-angular-ui-powerups.js +1136 -6252
  397. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  398. package/lib/components/forms/abstract-input.component.d.ts +9 -9
  399. package/lib/components/index.d.ts +1 -0
  400. package/lib/components/resize-aware.component.d.ts +3 -3
  401. package/lib/components/scroll-container/scroll-container.component.d.ts +5 -0
  402. package/lib/directives/command.directive.d.ts +4 -2
  403. package/lib/directives/focus-binding.directive.d.ts +1 -1
  404. package/lib/interaction/activity-ref.d.ts +2 -2
  405. package/lib/interaction/activity.d.ts +2 -2
  406. package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -2
  407. package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +3 -2
  408. package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +1 -1
  409. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +1 -1
  410. package/lib/interaction/services/interaction.service.d.ts +1 -1
  411. package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.d.ts +1 -1
  412. package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +1 -1
  413. package/lib/place/components/place-outlet/place-outlet.component.d.ts +4 -4
  414. package/lib/place/guards/consolidated-param-map.d.ts +1 -1
  415. package/lib/place/navigation/place-component-deactivation-handler.d.ts +2 -2
  416. package/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.d.ts +1 -1
  417. package/lib/place/navigation/session/navigation-session.d.ts +4 -4
  418. package/lib/place/place-component.d.ts +2 -2
  419. package/lib/place/place-router.d.ts +3 -3
  420. package/lib/place/route/formatter.d.ts +4 -3
  421. package/lib/place/route/parameter-definition.class.d.ts +2 -2
  422. package/package.json +10 -10
  423. package/schematics/place-routes/place-builder.js +4 -2
  424. package/schematics/place-routes/place-builder.js.map +1 -1
  425. package/schematics/place-routes/place-class-scanner.d.ts +3 -3
  426. package/schematics/place-routes/place-class-scanner.js +1 -1
  427. package/schematics/place-routes/place-class-scanner.js.map +1 -1
  428. package/schematics/place-routes/place-def.d.ts +9 -9
  429. /package/{styles → assets}/styles.scss +0 -0
@@ -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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E,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,EAAE;YACrB,IAAI,CAAC,kBAAkB,CAAC,YA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BU,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"]}
@@ -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"]}
@@ -1,75 +1,23 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
5
1
  import { AlertDialogComponent } from './components/alert-dialog/alert-dialog.component';
6
2
  import { ConfirmThenDialogComponent } from './components/confirm-then-dialog/confirm-then-dialog.component';
7
3
  import { ConfirmationDialogComponent } from './components/confirmation-dialog/confirmation-dialog.component';
8
- /**
9
- * @abstract
10
- */
11
- var /**
12
- * @abstract
13
- */
14
- AbstractInteractionContext = /** @class */ (function () {
4
+ var AbstractInteractionContext = /** @class */ (function () {
15
5
  function AbstractInteractionContext() {
16
6
  }
17
- /**
18
- * @template D, R, E
19
- * @param {?} activityType
20
- * @param {?=} data
21
- * @return {?}
22
- */
23
- AbstractInteractionContext.prototype.startActivity = /**
24
- * @template D, R, E
25
- * @param {?} activityType
26
- * @param {?=} data
27
- * @return {?}
28
- */
29
- function (activityType, data) {
7
+ AbstractInteractionContext.prototype.startActivity = function (activityType, data) {
30
8
  return this.createAndLaunchActivity(activityType, data, false);
31
9
  };
32
- /**
33
- * @param {?} confirm
34
- * @return {?}
35
- */
36
- AbstractInteractionContext.prototype.confirm = /**
37
- * @param {?} confirm
38
- * @return {?}
39
- */
40
- function (confirm) {
10
+ AbstractInteractionContext.prototype.confirm = function (confirm) {
41
11
  // Important: we have to implement confirmOrReject as the main entry point
42
12
  // as the canDeactivation guards need to be able to cancel an interaction
43
13
  // without caring about returning a value.
44
- return this.confirmOrReject(confirm).then((/**
45
- * @return {?}
46
- */
47
- function () { return true; })).catch((/**
48
- * @return {?}
49
- */
50
- function () { return false; }));
14
+ return this.confirmOrReject(confirm).then(function () { return true; }).catch(function () { return false; });
51
15
  };
52
- /**
53
- * @param {?} alert
54
- * @return {?}
55
- */
56
- AbstractInteractionContext.prototype.alert = /**
57
- * @param {?} alert
58
- * @return {?}
59
- */
60
- function (alert) {
16
+ AbstractInteractionContext.prototype.alert = function (alert) {
61
17
  // TODO: Test disableClose === false
62
18
  return this.createAndLaunchActivity(AlertDialogComponent, alert, false);
63
19
  };
64
- /**
65
- * @param {?} confirm
66
- * @return {?}
67
- */
68
- AbstractInteractionContext.prototype.confirmOrReject = /**
69
- * @param {?} confirm
70
- * @return {?}
71
- */
72
- function (confirm) {
20
+ AbstractInteractionContext.prototype.confirmOrReject = function (confirm) {
73
21
  return this.createAndLaunchActivity(ConfirmationDialogComponent, confirm, true);
74
22
  };
75
23
  /**
@@ -78,23 +26,7 @@ AbstractInteractionContext = /** @class */ (function () {
78
26
  * @param activityType the activity to run if confirmed.
79
27
  * @param data the activity data.
80
28
  */
81
- /**
82
- * Presents the confirmation to the user and runs the activity only if the user confirms.
83
- * @template D, R, E
84
- * @param {?} confirm
85
- * @param {?} activityType the activity to run if confirmed.
86
- * @param {?=} data the activity data.
87
- * @return {?}
88
- */
89
- AbstractInteractionContext.prototype.confirmThen = /**
90
- * Presents the confirmation to the user and runs the activity only if the user confirms.
91
- * @template D, R, E
92
- * @param {?} confirm
93
- * @param {?} activityType the activity to run if confirmed.
94
- * @param {?=} data the activity data.
95
- * @return {?}
96
- */
97
- function (confirm, activityType, data) {
29
+ AbstractInteractionContext.prototype.confirmThen = function (confirm, activityType, data) {
98
30
  return this.createAndLaunchActivity(ConfirmThenDialogComponent, {
99
31
  confirm: confirm,
100
32
  activityType: activityType,
@@ -103,44 +35,5 @@ AbstractInteractionContext = /** @class */ (function () {
103
35
  };
104
36
  return AbstractInteractionContext;
105
37
  }());
106
- /**
107
- * @abstract
108
- */
109
38
  export { AbstractInteractionContext };
110
- if (false) {
111
- /** @type {?} */
112
- AbstractInteractionContext.prototype.identifier;
113
- /**
114
- * @abstract
115
- * @return {?}
116
- */
117
- AbstractInteractionContext.prototype.cancelActiveActivity = function () { };
118
- /**
119
- * @abstract
120
- * @return {?}
121
- */
122
- AbstractInteractionContext.prototype.dispose = function () { };
123
- /**
124
- * @abstract
125
- * @template T
126
- * @param {?} disposable
127
- * @return {?}
128
- */
129
- AbstractInteractionContext.prototype.registerDisposable = function (disposable) { };
130
- /**
131
- * @abstract
132
- * @return {?}
133
- */
134
- AbstractInteractionContext.prototype.isActive = function () { };
135
- /**
136
- * @abstract
137
- * @protected
138
- * @template D, R, E
139
- * @param {?} activityType
140
- * @param {?} data
141
- * @param {?} disableClose
142
- * @return {?}
143
- */
144
- AbstractInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) { };
145
- }
146
39
  //# sourceMappingURL=abstract-interaction-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-interaction-context.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/abstract-interaction-context.ts"],"names":[],"mappings":";;;;AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,gEAAgE,CAAC;AAC5G,OAAO,EAAE,2BAA2B,EAAE,MAAM,gEAAgE,CAAC;;;;AAI7G;;;;IAAA;IA6CA,CAAC;;;;;;;IAjCC,kDAAa;;;;;;IAAb,UAAuB,YAA8C,EAAE,IAAQ;QAC7E,OAAO,IAAI,CAAC,uBAAuB,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACjE,CAAC;;;;;IAED,4CAAO;;;;IAAP,UAAQ,OAAgB;QACtB,0EAA0E;QAC1E,yEAAyE;QACzE,0CAA0C;QAC1C,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI;;;QAAC,cAAM,OAAA,IAAI,EAAJ,CAAI,EAAC,CAAC,KAAK;;;QAAC,cAAM,OAAA,KAAK,EAAL,CAAK,EAAC,CAAC;IAC3E,CAAC;;;;;IAED,0CAAK;;;;IAAL,UAAM,KAAY;QAChB,oCAAoC;QACpC,OAAO,IAAI,CAAC,uBAAuB,CAAC,oBAAoB,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1E,CAAC;;;;;IAED,oDAAe;;;;IAAf,UAAgB,OAAgB;QAC9B,OAAO,IAAI,CAAC,uBAAuB,CAAC,2BAA2B,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAClF,CAAC;IACD;;;;;OAKG;;;;;;;;;IACH,gDAAW;;;;;;;;IAAX,UAAqB,OAAgB,EAAE,YAA8C,EAAE,IAAQ;QAC7F,OAAO,IAAI,CAAC,uBAAuB,CAAiD,0BAA0B,EAAE;YAC9G,OAAO,SAAA;YACP,YAAY,EAAE,YAAY;YAC1B,IAAI,EAAE,IAAI;SACX,EAAE,IAAI,CAAC,CAAC;IACX,CAAC;IAEH,iCAAC;AAAD,CAAC,AA7CD,IA6CC;;;;;;;IA5CC,gDAAqC;;;;;IAErC,4EAAkD;;;;;IAElD,+DAAyB;;;;;;;IAEzB,oFAAoE;;;;;IACpE,gEAA6B;;;;;;;;;;IAE7B,+GAAgJ","sourcesContent":["import { Constructable, Disposable, ValueModel } from '@coolon/pectin';\nimport { Activity } from './activity';\nimport { Alert } from './alert';\nimport { AlertDialogComponent } from './components/alert-dialog/alert-dialog.component';\nimport { ConfirmThenDialogComponent } from './components/confirm-then-dialog/confirm-then-dialog.component';\nimport { ConfirmationDialogComponent } from './components/confirmation-dialog/confirmation-dialog.component';\nimport { Confirm } from './confirm';\nimport { InteractionContext } from './interaction-context';\n\nexport abstract class AbstractInteractionContext implements InteractionContext {\n abstract readonly identifier: string;\n\n abstract cancelActiveActivity(): Promise<boolean>;\n\n abstract dispose(): void;\n\n abstract registerDisposable<T extends Disposable>(disposable: T): T;\n abstract isActive(): boolean;\n\n protected abstract createAndLaunchActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data: D, disableClose: boolean): Promise<R>;\n\n startActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data?: D): Promise<R> {\n return this.createAndLaunchActivity(activityType, data, false);\n }\n\n confirm(confirm: Confirm): Promise<boolean> {\n // Important: we have to implement confirmOrReject as the main entry point\n // as the canDeactivation guards need to be able to cancel an interaction\n // without caring about returning a value.\n return this.confirmOrReject(confirm).then(() => true).catch(() => false);\n }\n\n alert(alert: Alert): Promise<void> {\n // TODO: Test disableClose === false\n return this.createAndLaunchActivity(AlertDialogComponent, alert, false);\n }\n\n confirmOrReject(confirm: Confirm): Promise<void> {\n return this.createAndLaunchActivity(ConfirmationDialogComponent, confirm, true);\n }\n /**\n * Presents the confirmation to the user and runs the activity only if the user confirms.\n * @param confirm:Confirm the confirmation to display.\n * @param activityType the activity to run if confirmed.\n * @param data the activity data.\n */\n confirmThen<D, R, E>(confirm: Confirm, activityType: Constructable<Activity<D, R, E>>, data?: D): Promise<R> {\n return this.createAndLaunchActivity<ConfirmThenDialogComponent.Data<D, R, E>, R, E>(ConfirmThenDialogComponent, {\n confirm,\n activityType: activityType,\n data: data\n }, true);\n }\n\n}\n"]}
1
+ {"version":3,"file":"abstract-interaction-context.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/abstract-interaction-context.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,gEAAgE,CAAC;AAC5G,OAAO,EAAE,2BAA2B,EAAE,MAAM,gEAAgE,CAAC;AAI7G;IAAA;IA6CA,CAAC;IAjCC,kDAAa,GAAb,UAAuB,YAA8C,EAAE,IAAQ;QAC7E,OAAO,IAAI,CAAC,uBAAuB,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACjE,CAAC;IAED,4CAAO,GAAP,UAAQ,OAAgB;QACtB,0EAA0E;QAC1E,yEAAyE;QACzE,0CAA0C;QAC1C,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,cAAM,OAAA,IAAI,EAAJ,CAAI,CAAC,CAAC,KAAK,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;IAC3E,CAAC;IAED,0CAAK,GAAL,UAAM,KAAY;QAChB,oCAAoC;QACpC,OAAO,IAAI,CAAC,uBAAuB,CAAC,oBAAoB,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1E,CAAC;IAED,oDAAe,GAAf,UAAgB,OAAgB;QAC9B,OAAO,IAAI,CAAC,uBAAuB,CAAC,2BAA2B,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAClF,CAAC;IACD;;;;;OAKG;IACH,gDAAW,GAAX,UAAqB,OAAgB,EAAE,YAA8C,EAAE,IAAQ;QAC7F,OAAO,IAAI,CAAC,uBAAuB,CAAiD,0BAA0B,EAAE;YAC9G,OAAO,SAAA;YACP,YAAY,EAAE,YAAY;YAC1B,IAAI,EAAE,IAAI;SACX,EAAE,IAAI,CAAC,CAAC;IACX,CAAC;IAEH,iCAAC;AAAD,CAAC,AA7CD,IA6CC","sourcesContent":["import { Constructable, Disposable, ValueModel } from '@coolon/pectin';\nimport { Activity } from './activity';\nimport { Alert } from './alert';\nimport { AlertDialogComponent } from './components/alert-dialog/alert-dialog.component';\nimport { ConfirmThenDialogComponent } from './components/confirm-then-dialog/confirm-then-dialog.component';\nimport { ConfirmationDialogComponent } from './components/confirmation-dialog/confirmation-dialog.component';\nimport { Confirm } from './confirm';\nimport { InteractionContext } from './interaction-context';\n\nexport abstract class AbstractInteractionContext implements InteractionContext {\n abstract readonly identifier: string;\n\n abstract cancelActiveActivity(): Promise<boolean>;\n\n abstract dispose(): void;\n\n abstract registerDisposable<T extends Disposable>(disposable: T): T;\n abstract isActive(): boolean;\n\n protected abstract createAndLaunchActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data: D, disableClose: boolean): Promise<R>;\n\n startActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data?: D): Promise<R> {\n return this.createAndLaunchActivity(activityType, data, false);\n }\n\n confirm(confirm: Confirm): Promise<boolean> {\n // Important: we have to implement confirmOrReject as the main entry point\n // as the canDeactivation guards need to be able to cancel an interaction\n // without caring about returning a value.\n return this.confirmOrReject(confirm).then(() => true).catch(() => false);\n }\n\n alert(alert: Alert): Promise<void> {\n // TODO: Test disableClose === false\n return this.createAndLaunchActivity(AlertDialogComponent, alert, false);\n }\n\n confirmOrReject(confirm: Confirm): Promise<void> {\n return this.createAndLaunchActivity(ConfirmationDialogComponent, confirm, true);\n }\n /**\n * Presents the confirmation to the user and runs the activity only if the user confirms.\n * @param confirm:Confirm the confirmation to display.\n * @param activityType the activity to run if confirmed.\n * @param data the activity data.\n */\n confirmThen<D, R, E>(confirm: Confirm, activityType: Constructable<Activity<D, R, E>>, data?: D): Promise<R> {\n return this.createAndLaunchActivity<ConfirmThenDialogComponent.Data<D, R, E>, R, E>(ConfirmThenDialogComponent, {\n confirm,\n activityType: activityType,\n data: data\n }, true);\n }\n\n}\n"]}
@@ -1,15 +1,5 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
5
1
  import { assert, Deferred } from '@coolon/pectin';
6
- /**
7
- * @template D, R, E
8
- */
9
- var /**
10
- * @template D, R, E
11
- */
12
- ActivityRef = /** @class */ (function () {
2
+ var ActivityRef = /** @class */ (function () {
13
3
  function ActivityRef(activityClass, activityData, onComplete) {
14
4
  this.activityClass = activityClass;
15
5
  this.activityData = activityData;
@@ -17,105 +7,44 @@ ActivityRef = /** @class */ (function () {
17
7
  this._complete = false;
18
8
  this.deferredResult = Deferred.defer();
19
9
  }
20
- /**
21
- * @return {?}
22
- */
23
- ActivityRef.prototype.isActivityRealised = /**
24
- * @return {?}
25
- */
26
- function () {
10
+ ActivityRef.prototype.isActivityRealised = function () {
27
11
  return !!this._activity;
28
12
  };
29
- /**
30
- * @return {?}
31
- */
32
- ActivityRef.prototype.isComplete = /**
33
- * @return {?}
34
- */
35
- function () {
13
+ ActivityRef.prototype.isComplete = function () {
36
14
  return this._complete;
37
15
  };
38
16
  Object.defineProperty(ActivityRef.prototype, "activity", {
39
- get: /**
40
- * @return {?}
41
- */
42
- function () {
17
+ get: function () {
43
18
  assert.isTruthy(this.isActivityRealised());
44
19
  return this._activity;
45
20
  },
46
21
  enumerable: true,
47
22
  configurable: true
48
23
  });
49
- /**
50
- * @param {?} activity
51
- * @param {?} nestedInteractionContext
52
- * @return {?}
53
- */
54
- ActivityRef.prototype.notifyActivityCreated = /**
55
- * @param {?} activity
56
- * @param {?} nestedInteractionContext
57
- * @return {?}
58
- */
59
- function (activity, nestedInteractionContext) {
24
+ ActivityRef.prototype.notifyActivityCreated = function (activity, nestedInteractionContext) {
60
25
  assert.isNil(this._activity);
61
26
  this._activity = activity;
62
- /** @type {?} */
63
27
  var self = this;
64
28
  this._activity.initialise(nestedInteractionContext, {
65
- onDone: /**
66
- * @param {?} result
67
- * @return {?}
68
- */
69
- function (result) {
70
- self.finishActivity((/**
71
- * @param {?} deferred
72
- * @return {?}
73
- */
74
- function (deferred) { return deferred.resolve(result); }));
29
+ onDone: function (result) {
30
+ self.finishActivity(function (deferred) { return deferred.resolve(result); });
75
31
  },
76
- onCancel: /**
77
- * @param {?} error
78
- * @return {?}
79
- */
80
- function (error) {
81
- self.finishActivity((/**
82
- * @param {?} deferred
83
- * @return {?}
84
- */
85
- function (deferred) { return deferred.reject(error); }));
32
+ onCancel: function (error) {
33
+ self.finishActivity(function (deferred) { return deferred.reject(error); });
86
34
  }
87
35
  });
88
36
  };
89
- /**
90
- * @protected
91
- * @param {?} resolveOrReject
92
- * @return {?}
93
- */
94
- ActivityRef.prototype.finishActivity = /**
95
- * @protected
96
- * @param {?} resolveOrReject
97
- * @return {?}
98
- */
99
- function (resolveOrReject) {
37
+ ActivityRef.prototype.finishActivity = function (resolveOrReject) {
100
38
  assert.isFalsey(this.isComplete());
101
39
  resolveOrReject(this.deferredResult);
102
40
  this._complete = true;
103
41
  this.onComplete(this);
104
42
  };
105
- /**
106
- * @return {?}
107
- */
108
- ActivityRef.prototype.cancel = /**
109
- * @return {?}
110
- */
111
- function () {
43
+ ActivityRef.prototype.cancel = function () {
112
44
  this.activity.cancel();
113
45
  };
114
46
  Object.defineProperty(ActivityRef.prototype, "activityResult", {
115
- get: /**
116
- * @return {?}
117
- */
118
- function () {
47
+ get: function () {
119
48
  return this.deferredResult.promise;
120
49
  },
121
50
  enumerable: true,
@@ -123,31 +52,5 @@ ActivityRef = /** @class */ (function () {
123
52
  });
124
53
  return ActivityRef;
125
54
  }());
126
- /**
127
- * @template D, R, E
128
- */
129
55
  export { ActivityRef };
130
- if (false) {
131
- /**
132
- * @type {?}
133
- * @private
134
- */
135
- ActivityRef.prototype._complete;
136
- /**
137
- * @type {?}
138
- * @private
139
- */
140
- ActivityRef.prototype._activity;
141
- /**
142
- * @type {?}
143
- * @private
144
- */
145
- ActivityRef.prototype.deferredResult;
146
- /** @type {?} */
147
- ActivityRef.prototype.activityClass;
148
- /** @type {?} */
149
- ActivityRef.prototype.activityData;
150
- /** @type {?} */
151
- ActivityRef.prototype.onComplete;
152
- }
153
56
  //# sourceMappingURL=activity-ref.js.map