@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,20 +1,11 @@
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 { __awaiter, __extends, __generator } from "tslib";
6
2
  import { GarbageCollector, lang, Logger } from '@coolon/pectin';
7
3
  import { PlaceComponentDeactivationHandler } from '../place-component-deactivation-handler';
8
4
  /**
9
5
  * Transient states
10
- * @abstract
11
- */
12
- var /**
13
- * Transient states
14
- * @abstract
15
6
  */
16
- NavigationSession = /** @class */ (function (_super) {
17
- tslib_1.__extends(NavigationSession, _super);
7
+ var NavigationSession = /** @class */ (function (_super) {
8
+ __extends(NavigationSession, _super);
18
9
  function NavigationSession(context, startingUrl) {
19
10
  var _this = _super.call(this) || this;
20
11
  _this.context = context;
@@ -24,10 +15,7 @@ NavigationSession = /** @class */ (function (_super) {
24
15
  _this.componentDeactivationHandlers = new Map();
25
16
  // TODO: can I get away without creating one every time?
26
17
  _this._interactionContext = _this.context.routerInteractionAdapter.createExclusiveInteractionContext();
27
- _this.onDispose((/**
28
- * @return {?}
29
- */
30
- function () {
18
+ _this.onDispose(function () {
31
19
  // the interaction context can be detached during the back button cancellation state transition
32
20
  // as the transition is synchronous and activityCancellation isn't. Otherwise dispose will be
33
21
  // called before the context has been cancelled. It might be work having the interaction context
@@ -35,109 +23,55 @@ NavigationSession = /** @class */ (function (_super) {
35
23
  if (_this._interactionContext) {
36
24
  _this._interactionContext.dispose(); // or do something like cancelAndDispose?
37
25
  }
38
- }));
26
+ });
39
27
  return _this;
40
28
  }
41
29
  Object.defineProperty(NavigationSession.prototype, "name", {
42
- get: /**
43
- * @return {?}
44
- */
45
- function () {
30
+ get: function () {
46
31
  return this.constructor.name;
47
32
  },
48
33
  enumerable: true,
49
34
  configurable: true
50
35
  });
51
36
  Object.defineProperty(NavigationSession.prototype, "urlService", {
52
- get: /**
53
- * @return {?}
54
- */
55
- function () {
37
+ get: function () {
56
38
  return this.context.urlService;
57
39
  },
58
40
  enumerable: true,
59
41
  configurable: true
60
42
  });
61
43
  Object.defineProperty(NavigationSession.prototype, "interactionServiceAdapter", {
62
- get: /**
63
- * @return {?}
64
- */
65
- function () {
44
+ get: function () {
66
45
  return this.context.routerInteractionAdapter;
67
46
  },
68
47
  enumerable: true,
69
48
  configurable: true
70
49
  });
71
- /**
72
- * @param {?} visit
73
- * @return {?}
74
- */
75
- NavigationSession.prototype.storeVisit = /**
76
- * @param {?} visit
77
- * @return {?}
78
- */
79
- function (visit) {
50
+ NavigationSession.prototype.storeVisit = function (visit) {
80
51
  // console.log(`Storing visit for ${visit.placeDefinition.component.name}`, {visit});
81
52
  this._visits.set(visit.placeDefinition, visit);
82
53
  };
83
- /**
84
- * @param {?} placeDef
85
- * @return {?}
86
- */
87
- NavigationSession.prototype.getVisitFor = /**
88
- * @param {?} placeDef
89
- * @return {?}
90
- */
91
- function (placeDef) {
92
- /** @type {?} */
54
+ NavigationSession.prototype.getVisitFor = function (placeDef) {
93
55
  var visit = this._visits.get(placeDef);
94
56
  // console.log(`Getting visit for ${placeDef.component.name}`, {visit});
95
57
  return visit;
96
58
  };
97
59
  Object.defineProperty(NavigationSession.prototype, "canDeactivateInteractionContext", {
98
- get: /**
99
- * @return {?}
100
- */
101
- function () {
60
+ get: function () {
102
61
  return this._interactionContext;
103
62
  },
104
63
  enumerable: true,
105
64
  configurable: true
106
65
  });
107
- /**
108
- * @return {?}
109
- */
110
- NavigationSession.prototype.notifyActive = /**
111
- * @return {?}
112
- */
113
- function () {
66
+ NavigationSession.prototype.notifyActive = function () {
114
67
  // noop.
115
68
  };
116
- /**
117
- * @param {?} event
118
- * @return {?}
119
- */
120
- NavigationSession.prototype.onRouterStarted = /**
121
- * @param {?} event
122
- * @return {?}
123
- */
124
- function (event) {
69
+ NavigationSession.prototype.onRouterStarted = function (event) {
125
70
  // navigation sessions can have many cancel start cycles due to place guard redirects
126
71
  this.ignore(event);
127
72
  };
128
73
  // @Trace()
129
- // @Trace()
130
- /**
131
- * @param {?} url
132
- * @return {?}
133
- */
134
- NavigationSession.prototype.onUrlChange =
135
- // @Trace()
136
- /**
137
- * @param {?} url
138
- * @return {?}
139
- */
140
- function (url) {
74
+ NavigationSession.prototype.onUrlChange = function (url) {
141
75
  // Normally we just ignore these but they are the only way of detecting if the back button
142
76
  // was clicked during a canDeactivate promise.
143
77
  // 1. a route is in progress and awaiting a canDeactivateGuard
@@ -148,117 +82,34 @@ NavigationSession = /** @class */ (function (_super) {
148
82
  this.cancelCanDeactivateInteraction(url);
149
83
  }
150
84
  };
151
- /**
152
- * @param {?} event
153
- * @return {?}
154
- */
155
- NavigationSession.prototype.onPopState = /**
156
- * @param {?} event
157
- * @return {?}
158
- */
159
- function (event) {
85
+ NavigationSession.prototype.onPopState = function (event) {
160
86
  return this.illegalTransition(event);
161
87
  };
162
- /**
163
- * @param {?} event
164
- * @return {?}
165
- */
166
- NavigationSession.prototype.onRouterCancelled = /**
167
- * @param {?} event
168
- * @return {?}
169
- */
170
- function (event) {
88
+ NavigationSession.prototype.onRouterCancelled = function (event) {
171
89
  return this.illegalTransition(event);
172
90
  };
173
- /**
174
- * @param {?} event
175
- * @return {?}
176
- */
177
- NavigationSession.prototype.onRouterError = /**
178
- * @param {?} event
179
- * @return {?}
180
- */
181
- function (event) {
91
+ NavigationSession.prototype.onRouterError = function (event) {
182
92
  return this.illegalTransition(event);
183
93
  };
184
- /**
185
- * @param {?} event
186
- * @return {?}
187
- */
188
- NavigationSession.prototype.onRouterEnd = /**
189
- * @param {?} event
190
- * @return {?}
191
- */
192
- function (event) {
94
+ NavigationSession.prototype.onRouterEnd = function (event) {
193
95
  return this.illegalTransition(event);
194
96
  };
195
- /**
196
- * @return {?}
197
- */
198
- NavigationSession.prototype.getVisits = /**
199
- * @return {?}
200
- */
201
- function () {
97
+ NavigationSession.prototype.getVisits = function () {
202
98
  return Array.from(this._visits.values());
203
99
  };
204
- /**
205
- * @protected
206
- * @template R
207
- * @param {?} message
208
- * @return {?}
209
- */
210
- NavigationSession.prototype.illegalTransition = /**
211
- * @protected
212
- * @template R
213
- * @param {?} message
214
- * @return {?}
215
- */
216
- function (message) {
100
+ NavigationSession.prototype.illegalTransition = function (message) {
217
101
  return lang.illegalState(message.toString() + " not supported by " + this.toString());
218
102
  };
219
- /**
220
- * @protected
221
- * @return {?}
222
- */
223
- NavigationSession.prototype.currentRouterUrl = /**
224
- * @protected
225
- * @return {?}
226
- */
227
- function () {
103
+ NavigationSession.prototype.currentRouterUrl = function () {
228
104
  return this.urlService.getCurrentRouterUrl();
229
105
  };
230
- /**
231
- * @param {?} url
232
- * @param {?=} options
233
- * @return {?}
234
- */
235
- NavigationSession.prototype.resetBrowserLocation = /**
236
- * @param {?} url
237
- * @param {?=} options
238
- * @return {?}
239
- */
240
- function (url, options) {
106
+ NavigationSession.prototype.resetBrowserLocation = function (url, options) {
241
107
  if (options === void 0) { options = { replaceCurrent: false }; }
242
108
  // console.log(`---> resetting browser location to: ${url}`);
243
109
  this.urlService.resetBrowserLocation(url, options);
244
110
  };
245
111
  // @Trace()
246
- // @Trace()
247
- /**
248
- * @protected
249
- * @param {?} poppedHistoryToReplace
250
- * @param {?} activeUrl
251
- * @return {?}
252
- */
253
- NavigationSession.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation =
254
- // @Trace()
255
- /**
256
- * @protected
257
- * @param {?} poppedHistoryToReplace
258
- * @param {?} activeUrl
259
- * @return {?}
260
- */
261
- function (poppedHistoryToReplace, activeUrl) {
112
+ NavigationSession.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation = function (poppedHistoryToReplace, activeUrl) {
262
113
  // Important: I tried to perform this fix at a later point int he routing cycle but it created all kinds of
263
114
  // strangeness.
264
115
  Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');
@@ -267,126 +118,52 @@ NavigationSession = /** @class */ (function (_super) {
267
118
  console.log("pushing " + activeUrl + " back onto the history.");
268
119
  this.urlService.resetBrowserLocation(activeUrl, { replaceCurrent: false });
269
120
  };
270
- /**
271
- * @param {?} event
272
- * @param {?=} reason
273
- * @return {?}
274
- */
275
- NavigationSession.prototype.ignore = /**
276
- * @param {?} event
277
- * @param {?=} reason
278
- * @return {?}
279
- */
280
- function (event, reason) {
121
+ NavigationSession.prototype.ignore = function (event, reason) {
281
122
  reason = reason ? " -> " + reason : '';
282
123
  Logger.get(this).info("Ignoring router event" + reason + ": " + event.constructor.name + " -> " + event.url + " :: " + this.toString());
283
124
  };
284
- /**
285
- * @return {?}
286
- */
287
- NavigationSession.prototype.toString = /**
288
- * @return {?}
289
- */
290
- function () {
125
+ NavigationSession.prototype.toString = function () {
291
126
  return this.constructor.name + "(" + this.debugState() + ")";
292
127
  };
293
- /**
294
- * @protected
295
- * @param {?=} properties
296
- * @return {?}
297
- */
298
- NavigationSession.prototype.debugState = /**
299
- * @protected
300
- * @param {?=} properties
301
- * @return {?}
302
- */
303
- function (properties) {
128
+ NavigationSession.prototype.debugState = function (properties) {
304
129
  var _this = this;
305
- return (properties || this.debugPropertyKeys).map((/**
306
- * @param {?} p
307
- * @return {?}
308
- */
309
- function (p) {
130
+ return (properties || this.debugPropertyKeys).map(function (p) {
310
131
  return p + ": " + _this[p];
311
- })).join(', ');
132
+ }).join(', ');
312
133
  };
313
- /**
314
- * @param {?} component
315
- * @param {?} currentUrl
316
- * @param {?} nextUrl
317
- * @return {?}
318
- */
319
- NavigationSession.prototype.canDeactivatePlace = /**
320
- * @param {?} component
321
- * @param {?} currentUrl
322
- * @param {?} nextUrl
323
- * @return {?}
324
- */
325
- function (component, currentUrl, nextUrl) {
326
- return tslib_1.__awaiter(this, void 0, void 0, function () {
134
+ NavigationSession.prototype.canDeactivatePlace = function (component, currentUrl, nextUrl) {
135
+ return __awaiter(this, void 0, void 0, function () {
327
136
  var handler, isPrimaryHandler;
328
- return tslib_1.__generator(this, function (_a) {
329
- // console.log(`---> canDeactivatePlace(${component.placeDefinition.path}, ${currentUrl.url} -> ${nextUrl.url})`);
330
- // lookup the handler and create it if we've not seen it yet
137
+ return __generator(this, function (_a) {
331
138
  handler = this.componentDeactivationHandlers.get(component);
332
139
  if (!handler) {
333
140
  isPrimaryHandler = this.componentDeactivationHandlers.size === 0;
334
141
  handler = new PlaceComponentDeactivationHandler(component, this, isPrimaryHandler);
335
142
  this.componentDeactivationHandlers.set(component, handler);
336
143
  }
337
- return [2 /*return*/, handler.canDeactivate(currentUrl, nextUrl).then((/**
338
- * @param {?} result
339
- * @return {?}
340
- */
341
- function (result) {
144
+ return [2 /*return*/, handler.canDeactivate(currentUrl, nextUrl).then(function (result) {
342
145
  // console.log(`<--- canDeactivatePlace(${component.placeDefinition.path}): ${result}`);
343
146
  return result;
344
- })).catch((/**
345
- * @param {?} error
346
- * @return {?}
347
- */
348
- function (error) {
147
+ }).catch(function (error) {
349
148
  throw error;
350
- }))];
149
+ })];
351
150
  });
352
151
  });
353
152
  };
354
- /**
355
- * @param {?} newUrl
356
- * @return {?}
357
- */
358
- NavigationSession.prototype.cancelCanDeactivateInteraction = /**
359
- * @param {?} newUrl
360
- * @return {?}
361
- */
362
- function (newUrl) {
153
+ NavigationSession.prototype.cancelCanDeactivateInteraction = function (newUrl) {
363
154
  Logger.get(this).info("back button pressed during navigation session interaction promise");
364
155
  // detach the interaction from the session so it doesn't get disposed until the activity has finished
365
156
  // all it's things.
366
- /** @type {?} */
367
157
  var canDeactivateInteractionContext = this.detachCanDeactivateInteractionContext();
368
158
  // TODO: I need to make the exclusive interaction context disallow nested activities or
369
159
  // that would mess things up entirely. Or, can I do a context.abortAll().then(..)
370
160
  Logger.get(this).info('cancelling current navigation activity..');
371
- canDeactivateInteractionContext.cancelActiveActivity().then((/**
372
- * @return {?}
373
- */
374
- function () {
161
+ canDeactivateInteractionContext.cancelActiveActivity().then(function () {
375
162
  canDeactivateInteractionContext.dispose();
376
- }));
163
+ });
377
164
  this.handleCanDeactivateCancelledEventScenario(newUrl);
378
165
  };
379
- /**
380
- * @protected
381
- * @param {?} url
382
- * @return {?}
383
- */
384
- NavigationSession.prototype.reinstateUrlAfterAngularChangedItOnCancellation = /**
385
- * @protected
386
- * @param {?} url
387
- * @return {?}
388
- */
389
- function (url) {
166
+ NavigationSession.prototype.reinstateUrlAfterAngularChangedItOnCancellation = function (url) {
390
167
  // Angular calls _this.resetUrlToCurrentUrlTree() on cancelling and fucks our history.
391
168
  // So this means that the top of the stack is the url we want to go back to, and not the one that was on
392
169
  // it before the cancel event fired.
@@ -395,56 +172,12 @@ NavigationSession = /** @class */ (function (_super) {
395
172
  // - push our actual url back onto the top of the stack.
396
173
  this.resetBrowserLocation(url, { replaceCurrent: true });
397
174
  };
398
- /**
399
- * @protected
400
- * @return {?}
401
- */
402
- NavigationSession.prototype.detachCanDeactivateInteractionContext = /**
403
- * @protected
404
- * @return {?}
405
- */
406
- function () {
407
- /** @type {?} */
175
+ NavigationSession.prototype.detachCanDeactivateInteractionContext = function () {
408
176
  var context = this._interactionContext;
409
177
  this._interactionContext = null;
410
178
  return context;
411
179
  };
412
180
  return NavigationSession;
413
181
  }(GarbageCollector));
414
- /**
415
- * Transient states
416
- * @abstract
417
- */
418
182
  export { NavigationSession };
419
- if (false) {
420
- /** @type {?} */
421
- NavigationSession.prototype.debugPropertyKeys;
422
- /**
423
- * @type {?}
424
- * @private
425
- */
426
- NavigationSession.prototype._visits;
427
- /**
428
- * @type {?}
429
- * @private
430
- */
431
- NavigationSession.prototype.componentDeactivationHandlers;
432
- /** @type {?} */
433
- NavigationSession.prototype.isPopState;
434
- /**
435
- * @type {?}
436
- * @private
437
- */
438
- NavigationSession.prototype._interactionContext;
439
- /** @type {?} */
440
- NavigationSession.prototype.context;
441
- /** @type {?} */
442
- NavigationSession.prototype.startingUrl;
443
- /**
444
- * @abstract
445
- * @param {?} newUrl
446
- * @return {?}
447
- */
448
- NavigationSession.prototype.handleCanDeactivateCancelledEventScenario = function (newUrl) { };
449
- }
450
183
  //# sourceMappingURL=navigation-session.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-session.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/navigation-session.ts"],"names":[],"mappings":";;;;;AACA,OAAO,EAAO,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAS,MAAM,gBAAgB,CAAC;AAQ5E,OAAO,EAAE,iCAAiC,EAAE,MAAM,yCAAyC,CAAC;;;;;AAM5F;;;;;IAAgD,6CAAgB;IAU9D,2BAAqB,OAA0B,EAAW,WAAmB;QAA7E,YACE,iBAAO,SAYR;QAboB,aAAO,GAAP,OAAO,CAAmB;QAAW,iBAAW,GAAX,WAAW,CAAQ;QAR7E,uBAAiB,GAAa,EAAE,CAAC;QACzB,aAAO,GAAG,IAAI,GAAG,EAA0B,CAAC;QAE5C,m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QAC5C,CAAC,EAAC,CAAC;QAEH,IAAI,CAAC,yCAAyC,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;;;;;;IAIS,2EAA+C;;;;;IAAzD,UAA0D,GAAW;QACnE,sFAAsF;QACtF,wGAAwG;QACxG,oCAAoC;QACpC,iBAAiB;QACjB,sEAAsE;QACtE,wDAAwD;QACxD,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;;;;;IAES,iEAAqC;;;;IAA/C;;YACQ,OAAO,GAAG,IAAI,CAAC,mBAAmB;QACxC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;IACH,wBAAC;AAAD,CAAC,AAxLD,CAAgD,gBAAgB,GAwL/D;;;;;;;;IAtLC,8CAAiC;;;;;IACjC,oCAAoD;;;;;IAEpD,0DAAqG;;IACrG,uCAAsC;;;;;IAEtC,gDAAgD;;IAEpC,oCAAmC;;IAAE,wCAA4B;;;;;;IA6J7E,8FAAwE","sourcesContent":["import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart, RouterEvent } from '@angular/router';\nimport { Dsl, GarbageCollector, lang, Logger, Trace } from '@coolon/pectin';\nimport { InteractionContext } from '../../../interaction/interaction-context';\nimport { InteractionServiceRoutingAdapter } from '../../../interaction/services/interaction-service-routing-adapter';\nimport { PlaceComponent } from '../../place-component';\nimport { PlaceDefinition } from '../../place-definition';\nimport { UrlService } from '../../url-service';\nimport { UrlSnapshot } from '../../url-snapshot';\nimport { Visit } from '../../visit';\nimport { PlaceComponentDeactivationHandler } from '../place-component-deactivation-handler';\nimport { NavigationContext } from './navigation-context';\n\n/**\n * Transient states\n */\nexport abstract class NavigationSession extends GarbageCollector {\n\n debugPropertyKeys: string[] = [];\n private _visits = new Map<PlaceDefinition, Visit>();\n\n private componentDeactivationHandlers = new Map<PlaceComponent, PlaceComponentDeactivationHandler>();\n abstract readonly isPopState: boolean;\n\n private _interactionContext: InteractionContext;\n\n constructor(readonly context: NavigationContext, readonly startingUrl: string) {\n super();\n // TODO: can I get away without creating one every time?\n this._interactionContext = this.context.routerInteractionAdapter.createExclusiveInteractionContext();\n this.onDispose(() => {\n // the interaction context can be detached during the back button cancellation state transition\n // as the transition is synchronous and activityCancellation isn't. Otherwise dispose will be\n // called before the context has been cancelled. It might be work having the interaction context\n // automatically cancel if the context is disposed so we don't have worry about detaching etc.\n if (this._interactionContext) {\n this._interactionContext.dispose(); // or do something like cancelAndDispose?\n }\n });\n }\n\n get name(): string {\n return this.constructor.name;\n }\n\n get urlService(): UrlService {\n return this.context.urlService;\n }\n\n get interactionServiceAdapter(): InteractionServiceRoutingAdapter {\n return this.context.routerInteractionAdapter;\n }\n\n storeVisit(visit: Visit) {\n // console.log(`Storing visit for ${visit.placeDefinition.component.name}`, {visit});\n this._visits.set(visit.placeDefinition, visit);\n }\n\n\n getVisitFor(placeDef: PlaceDefinition) {\n const visit = this._visits.get(placeDef);\n // console.log(`Getting visit for ${placeDef.component.name}`, {visit});\n return visit;\n }\n\n get canDeactivateInteractionContext(): InteractionContext {\n return this._interactionContext;\n }\n\n notifyActive() {\n // noop.\n }\n\n onRouterStarted(event: NavigationStart): void {\n // navigation sessions can have many cancel start cycles due to place guard redirects\n this.ignore(event);\n }\n\n // @Trace()\n onUrlChange(url: string) {\n // Normally we just ignore these but they are the only way of detecting if the back button\n // was clicked during a canDeactivate promise.\n // 1. a route is in progress and awaiting a canDeactivateGuard\n // 2. the user the clicks the back button.\n // So to handle that scenario we need to check if we've got a can deactivate interaction in\n // progress and the do the appropriate clean up.\n if (this.canDeactivateInteractionContext && this.canDeactivateInteractionContext.isActive()) {\n this.cancelCanDeactivateInteraction(url);\n }\n }\n\n onPopState(event: NavigationStart): void {\n return this.illegalTransition(event);\n }\n\n onRouterCancelled(event: NavigationCancel): void {\n return this.illegalTransition(event);\n }\n\n onRouterError(event: NavigationError): void {\n return this.illegalTransition(event);\n }\n\n onRouterEnd(event: NavigationEnd): void {\n return this.illegalTransition(event);\n }\n\n getVisits(): Visit[] {\n return Array.from(this._visits.values());\n }\n\n protected illegalTransition<R>(message: string | RouterEvent): R {\n return lang.illegalState(`${message.toString()} not supported by ${this.toString()}`);\n }\n\n protected currentRouterUrl(): string {\n return this.urlService.getCurrentRouterUrl();\n }\n\n resetBrowserLocation(url, options: { replaceCurrent: boolean } = { replaceCurrent: false }) {\n // console.log(`---> resetting browser location to: ${url}`);\n this.urlService.resetBrowserLocation(url, options);\n }\n\n // @Trace()\n protected repairBrowserHistoryAndUrlAfterGuardCancellation(poppedHistoryToReplace: string, activeUrl:string): void {\n // Important: I tried to perform this fix at a later point int he routing cycle but it created all kinds of\n // strangeness.\n Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');\n console.log(`replacing ${this.urlService.getCurrentLocationUrlSnapshot().url} with ${poppedHistoryToReplace}`);\n this.urlService.resetBrowserLocation(poppedHistoryToReplace, { replaceCurrent: true });\n console.log(`pushing ${activeUrl} back onto the history.`);\n this.urlService.resetBrowserLocation(activeUrl, { replaceCurrent: false });\n }\n\n\n ignore(event: RouterEvent, reason?: string): void {\n reason = reason ? ` -> ${reason}` : '';\n Logger.get(this).info(`Ignoring router event${reason}: ${event.constructor.name} -> ${event.url} :: ${this.toString()}`);\n }\n\n toString(): string {\n return `${this.constructor.name}(${this.debugState()})`;\n }\n\n protected debugState(properties?: string[]) {\n return (properties || this.debugPropertyKeys).map(p => {\n return `${p}: ${this[p]}`;\n }).join(', ');\n }\n\n async canDeactivatePlace(component: PlaceComponent, currentUrl: UrlSnapshot, nextUrl: UrlSnapshot): Promise<boolean | UrlSnapshot> {\n // console.log(`---> canDeactivatePlace(${component.placeDefinition.path}, ${currentUrl.url} -> ${nextUrl.url})`);\n // lookup the handler and create it if we've not seen it yet\n let handler = this.componentDeactivationHandlers.get(component);\n if (!handler) {\n const isPrimaryHandler = this.componentDeactivationHandlers.size === 0; // only primary handler cancels the app model interations\n handler = new PlaceComponentDeactivationHandler(component, this, isPrimaryHandler);\n this.componentDeactivationHandlers.set(component, handler);\n }\n return handler.canDeactivate(currentUrl, nextUrl).then(result => {\n // console.log(`<--- canDeactivatePlace(${component.placeDefinition.path}): ${result}`);\n return result;\n }).catch(error => {\n throw error;\n });\n }\n\n cancelCanDeactivateInteraction(newUrl: string): void {\n Logger.get(this).info(`back button pressed during navigation session interaction promise`);\n // detach the interaction from the session so it doesn't get disposed until the activity has finished\n // all it's things.\n const canDeactivateInteractionContext = this.detachCanDeactivateInteractionContext();\n // TODO: I need to make the exclusive interaction context disallow nested activities or\n // that would mess things up entirely. Or, can I do a context.abortAll().then(..)\n Logger.get(this).info('cancelling current navigation activity..');\n canDeactivateInteractionContext.cancelActiveActivity().then(() => {\n canDeactivateInteractionContext.dispose();\n });\n\n this.handleCanDeactivateCancelledEventScenario(newUrl);\n }\n\n abstract handleCanDeactivateCancelledEventScenario(newUrl: string): void\n\n protected reinstateUrlAfterAngularChangedItOnCancellation(url: string) {\n // Angular calls _this.resetUrlToCurrentUrlTree() on cancelling and fucks our history.\n // So this means that the top of the stack is the url we want to go back to, and not the one that was on\n // it before the cancel event fired.\n // So we need to:\n // - replace the just inserted url with the one that used to be there.\n // - push our actual url back onto the top of the stack.\n this.resetBrowserLocation(url, { replaceCurrent: true });\n }\n\n protected detachCanDeactivateInteractionContext(): InteractionContext {\n const context = this._interactionContext;\n this._interactionContext = null;\n return context;\n }\n}\n"]}
1
+ {"version":3,"file":"navigation-session.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/navigation-session.ts"],"names":[],"mappings":";AACA,OAAO,EAAO,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAS,MAAM,gBAAgB,CAAC;AAQ5E,OAAO,EAAE,iCAAiC,EAAE,MAAM,yCAAyC,CAAC;AAG5F;;GAEG;AACH;IAAgD,qCAAgB;IAU9D,2BAAqB,OAA0B,EAAW,WAAmB;Q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O,EAAE,CAAC;QAC5C,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,yCAAyC,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;IAIS,2EAA+C,GAAzD,UAA0D,GAAW;QACnE,sFAAsF;QACtF,wGAAwG;QACxG,oCAAoC;QACpC,iBAAiB;QACjB,sEAAsE;QACtE,wDAAwD;QACxD,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;IAES,iEAAqC,GAA/C;QACE,IAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC;QACzC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;IACH,wBAAC;AAAD,CAAC,AAxLD,CAAgD,gBAAgB,GAwL/D","sourcesContent":["import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart, RouterEvent } from '@angular/router';\nimport { Dsl, GarbageCollector, lang, Logger, Trace } from '@coolon/pectin';\nimport { InteractionContext } from '../../../interaction/interaction-context';\nimport { InteractionServiceRoutingAdapter } from '../../../interaction/services/interaction-service-routing-adapter';\nimport { PlaceComponent } from '../../place-component';\nimport { PlaceDefinition } from '../../place-definition';\nimport { UrlService } from '../../url-service';\nimport { UrlSnapshot } from '../../url-snapshot';\nimport { Visit } from '../../visit';\nimport { PlaceComponentDeactivationHandler } from '../place-component-deactivation-handler';\nimport { NavigationContext } from './navigation-context';\n\n/**\n * Transient states\n */\nexport abstract class NavigationSession extends GarbageCollector {\n\n debugPropertyKeys: string[] = [];\n private _visits = new Map<PlaceDefinition, Visit>();\n\n private componentDeactivationHandlers = new Map<PlaceComponent, PlaceComponentDeactivationHandler>();\n abstract readonly isPopState: boolean;\n\n private _interactionContext: InteractionContext;\n\n constructor(readonly context: NavigationContext, readonly startingUrl: string) {\n super();\n // TODO: can I get away without creating one every time?\n this._interactionContext = this.context.routerInteractionAdapter.createExclusiveInteractionContext();\n this.onDispose(() => {\n // the interaction context can be detached during the back button cancellation state transition\n // as the transition is synchronous and activityCancellation isn't. Otherwise dispose will be\n // called before the context has been cancelled. It might be work having the interaction context\n // automatically cancel if the context is disposed so we don't have worry about detaching etc.\n if (this._interactionContext) {\n this._interactionContext.dispose(); // or do something like cancelAndDispose?\n }\n });\n }\n\n get name(): string {\n return this.constructor.name;\n }\n\n get urlService(): UrlService {\n return this.context.urlService;\n }\n\n get interactionServiceAdapter(): InteractionServiceRoutingAdapter {\n return this.context.routerInteractionAdapter;\n }\n\n storeVisit(visit: Visit) {\n // console.log(`Storing visit for ${visit.placeDefinition.component.name}`, {visit});\n this._visits.set(visit.placeDefinition, visit);\n }\n\n\n getVisitFor(placeDef: PlaceDefinition) {\n const visit = this._visits.get(placeDef);\n // console.log(`Getting visit for ${placeDef.component.name}`, {visit});\n return visit;\n }\n\n get canDeactivateInteractionContext(): InteractionContext {\n return this._interactionContext;\n }\n\n notifyActive() {\n // noop.\n }\n\n onRouterStarted(event: NavigationStart): void {\n // navigation sessions can have many cancel start cycles due to place guard redirects\n this.ignore(event);\n }\n\n // @Trace()\n onUrlChange(url: string) {\n // Normally we just ignore these but they are the only way of detecting if the back button\n // was clicked during a canDeactivate promise.\n // 1. a route is in progress and awaiting a canDeactivateGuard\n // 2. the user the clicks the back button.\n // So to handle that scenario we need to check if we've got a can deactivate interaction in\n // progress and the do the appropriate clean up.\n if (this.canDeactivateInteractionContext && this.canDeactivateInteractionContext.isActive()) {\n this.cancelCanDeactivateInteraction(url);\n }\n }\n\n onPopState(event: NavigationStart): void {\n return this.illegalTransition(event);\n }\n\n onRouterCancelled(event: NavigationCancel): void {\n return this.illegalTransition(event);\n }\n\n onRouterError(event: NavigationError): void {\n return this.illegalTransition(event);\n }\n\n onRouterEnd(event: NavigationEnd): void {\n return this.illegalTransition(event);\n }\n\n getVisits(): Visit[] {\n return Array.from(this._visits.values());\n }\n\n protected illegalTransition<R>(message: string | RouterEvent): R {\n return lang.illegalState(`${message.toString()} not supported by ${this.toString()}`);\n }\n\n protected currentRouterUrl(): string {\n return this.urlService.getCurrentRouterUrl();\n }\n\n resetBrowserLocation(url, options: { replaceCurrent: boolean } = { replaceCurrent: false }) {\n // console.log(`---> resetting browser location to: ${url}`);\n this.urlService.resetBrowserLocation(url, options);\n }\n\n // @Trace()\n protected repairBrowserHistoryAndUrlAfterGuardCancellation(poppedHistoryToReplace: string, activeUrl:string): void {\n // Important: I tried to perform this fix at a later point int he routing cycle but it created all kinds of\n // strangeness.\n Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');\n console.log(`replacing ${this.urlService.getCurrentLocationUrlSnapshot().url} with ${poppedHistoryToReplace}`);\n this.urlService.resetBrowserLocation(poppedHistoryToReplace, { replaceCurrent: true });\n console.log(`pushing ${activeUrl} back onto the history.`);\n this.urlService.resetBrowserLocation(activeUrl, { replaceCurrent: false });\n }\n\n\n ignore(event: RouterEvent, reason?: string): void {\n reason = reason ? ` -> ${reason}` : '';\n Logger.get(this).info(`Ignoring router event${reason}: ${event.constructor.name} -> ${event.url} :: ${this.toString()}`);\n }\n\n toString(): string {\n return `${this.constructor.name}(${this.debugState()})`;\n }\n\n protected debugState(properties?: string[]) {\n return (properties || this.debugPropertyKeys).map(p => {\n return `${p}: ${this[p]}`;\n }).join(', ');\n }\n\n async canDeactivatePlace(component: PlaceComponent, currentUrl: UrlSnapshot, nextUrl: UrlSnapshot): Promise<boolean | UrlSnapshot> {\n // console.log(`---> canDeactivatePlace(${component.placeDefinition.path}, ${currentUrl.url} -> ${nextUrl.url})`);\n // lookup the handler and create it if we've not seen it yet\n let handler = this.componentDeactivationHandlers.get(component);\n if (!handler) {\n const isPrimaryHandler = this.componentDeactivationHandlers.size === 0; // only primary handler cancels the app model interations\n handler = new PlaceComponentDeactivationHandler(component, this, isPrimaryHandler);\n this.componentDeactivationHandlers.set(component, handler);\n }\n return handler.canDeactivate(currentUrl, nextUrl).then(result => {\n // console.log(`<--- canDeactivatePlace(${component.placeDefinition.path}): ${result}`);\n return result;\n }).catch(error => {\n throw error;\n });\n }\n\n cancelCanDeactivateInteraction(newUrl: string): void {\n Logger.get(this).info(`back button pressed during navigation session interaction promise`);\n // detach the interaction from the session so it doesn't get disposed until the activity has finished\n // all it's things.\n const canDeactivateInteractionContext = this.detachCanDeactivateInteractionContext();\n // TODO: I need to make the exclusive interaction context disallow nested activities or\n // that would mess things up entirely. Or, can I do a context.abortAll().then(..)\n Logger.get(this).info('cancelling current navigation activity..');\n canDeactivateInteractionContext.cancelActiveActivity().then(() => {\n canDeactivateInteractionContext.dispose();\n });\n\n this.handleCanDeactivateCancelledEventScenario(newUrl);\n }\n\n abstract handleCanDeactivateCancelledEventScenario(newUrl: string): void\n\n protected reinstateUrlAfterAngularChangedItOnCancellation(url: string) {\n // Angular calls _this.resetUrlToCurrentUrlTree() on cancelling and fucks our history.\n // So this means that the top of the stack is the url we want to go back to, and not the one that was on\n // it before the cancel event fired.\n // So we need to:\n // - replace the just inserted url with the one that used to be there.\n // - push our actual url back onto the top of the stack.\n this.resetBrowserLocation(url, { replaceCurrent: true });\n }\n\n protected detachCanDeactivateInteractionContext(): InteractionContext {\n const context = this._interactionContext;\n this._interactionContext = null;\n return context;\n }\n}\n"]}
@@ -1,47 +1,19 @@
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 { __extends } from "tslib";
6
2
  import { AbstractPopStateNavigation } from './abstract-pop-state-navigation';
7
3
  import { WaitUntilPopStateDuringCanDeactivateInteractionFinishes } from './event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes';
8
4
  var PopStateNavigation = /** @class */ (function (_super) {
9
- tslib_1.__extends(PopStateNavigation, _super);
5
+ __extends(PopStateNavigation, _super);
10
6
  function PopStateNavigation() {
11
7
  return _super !== null && _super.apply(this, arguments) || this;
12
8
  }
13
- /**
14
- * @param {?} event
15
- * @return {?}
16
- */
17
- PopStateNavigation.prototype.onRouterCancelled = /**
18
- * @param {?} event
19
- * @return {?}
20
- */
21
- function (event) {
9
+ PopStateNavigation.prototype.onRouterCancelled = function (event) {
22
10
  this.repairBrowserHistoryAndUrlAfterGuardCancellation();
23
11
  this.context.finishRoutingSession();
24
12
  };
25
- /**
26
- * @param {?} event
27
- * @return {?}
28
- */
29
- PopStateNavigation.prototype.onRouterEnd = /**
30
- * @param {?} event
31
- * @return {?}
32
- */
33
- function (event) {
13
+ PopStateNavigation.prototype.onRouterEnd = function (event) {
34
14
  this.context.finishRoutingSession(this.getVisits());
35
15
  };
36
- /**
37
- * @param {?} locationTriggerUrl
38
- * @return {?}
39
- */
40
- PopStateNavigation.prototype.handleCanDeactivateCancelledEventScenario = /**
41
- * @param {?} locationTriggerUrl
42
- * @return {?}
43
- */
44
- function (locationTriggerUrl) {
16
+ PopStateNavigation.prototype.handleCanDeactivateCancelledEventScenario = function (locationTriggerUrl) {
45
17
  this.context.transitionTo(new WaitUntilPopStateDuringCanDeactivateInteractionFinishes(this.context, this.startingUrl, locationTriggerUrl, this.poppedHistoryUrl));
46
18
  };
47
19
  return PopStateNavigation;
@@ -1 +1 @@
1
- {"version":3,"file":"pop-state-navigation.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/pop-state-navigation.ts"],"names":[],"mappings":";;;;;AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAG7E,OAAO,EAAE,uDAAuD,EAAE,MAAM,+EAA+E,CAAC;AAExJ;IAAwC,8CAA0B;IAAlE;;IAkBA,CAAC;;;;;IAhBC,8CAAiB;;;;IAAjB,UAAkB,KAAuB;QACvC,IAAI,CAAC,gDAAgD,EAAE,CAAC;QACxD,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;IACtC,CAAC;;;;;IAED,wCAAW;;;;IAAX,UAAY,KAAoB;QAC9B,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACtD,CAAC;;;;;IAED,sEAAyC;;;;IAAzC,UAA0C,kBAA0B;QAClE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,uDAAuD,CAAC,IAAI,CAAC,OAAO,EAChG,IAAI,CAAC,WAAW,EAChB,kBAAkB,EAClB,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC5B,CAAC;IAEH,yBAAC;AAAD,CAAC,AAlBD,CAAwC,0BAA0B,GAkBjE","sourcesContent":["import { NavigationCancel, NavigationEnd, NavigationError } from '@angular/router';\nimport { Logger, Trace } from '@coolon/pectin';\nimport { AbstractPopStateNavigation } from './abstract-pop-state-navigation';\nimport { NavigationContext } from './navigation-context';\nimport { NavigationSession } from './navigation-session';\nimport { WaitUntilPopStateDuringCanDeactivateInteractionFinishes } from './event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes';\n\nexport class PopStateNavigation extends AbstractPopStateNavigation {\n\n onRouterCancelled(event: NavigationCancel): void {\n this.repairBrowserHistoryAndUrlAfterGuardCancellation();\n this.context.finishRoutingSession();\n }\n\n onRouterEnd(event: NavigationEnd): void {\n this.context.finishRoutingSession(this.getVisits());\n }\n\n handleCanDeactivateCancelledEventScenario(locationTriggerUrl: string): void {\n this.context.transitionTo(new WaitUntilPopStateDuringCanDeactivateInteractionFinishes(this.context,\n this.startingUrl,\n locationTriggerUrl,\n this.poppedHistoryUrl));\n }\n\n}\n"]}
1
+ {"version":3,"file":"pop-state-navigation.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/pop-state-navigation.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAG7E,OAAO,EAAE,uDAAuD,EAAE,MAAM,+EAA+E,CAAC;AAExJ;IAAwC,sCAA0B;IAAlE;;IAkBA,CAAC;IAhBC,8CAAiB,GAAjB,UAAkB,KAAuB;QACvC,IAAI,CAAC,gDAAgD,EAAE,CAAC;QACxD,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;IACtC,CAAC;IAED,wCAAW,GAAX,UAAY,KAAoB;QAC9B,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,sEAAyC,GAAzC,UAA0C,kBAA0B;QAClE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,uDAAuD,CAAC,IAAI,CAAC,OAAO,EAChG,IAAI,CAAC,WAAW,EAChB,kBAAkB,EAClB,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC5B,CAAC;IAEH,yBAAC;AAAD,CAAC,AAlBD,CAAwC,0BAA0B,GAkBjE","sourcesContent":["import { NavigationCancel, NavigationEnd, NavigationError } from '@angular/router';\nimport { Logger, Trace } from '@coolon/pectin';\nimport { AbstractPopStateNavigation } from './abstract-pop-state-navigation';\nimport { NavigationContext } from './navigation-context';\nimport { NavigationSession } from './navigation-session';\nimport { WaitUntilPopStateDuringCanDeactivateInteractionFinishes } from './event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes';\n\nexport class PopStateNavigation extends AbstractPopStateNavigation {\n\n onRouterCancelled(event: NavigationCancel): void {\n this.repairBrowserHistoryAndUrlAfterGuardCancellation();\n this.context.finishRoutingSession();\n }\n\n onRouterEnd(event: NavigationEnd): void {\n this.context.finishRoutingSession(this.getVisits());\n }\n\n handleCanDeactivateCancelledEventScenario(locationTriggerUrl: string): void {\n this.context.transitionTo(new WaitUntilPopStateDuringCanDeactivateInteractionFinishes(this.context,\n this.startingUrl,\n locationTriggerUrl,\n this.poppedHistoryUrl));\n }\n\n}\n"]}