@coolon/angular-ui-powerups 0.0.126 → 0.0.128

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 (350) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +3753 -3020
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  5. package/coolon-angular-ui-powerups.d.ts +17 -18
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/coolon-angular-ui-powerups.js +16 -17
  8. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  9. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  10. package/esm2015/index.js +1 -1
  11. package/esm2015/index.js.map +1 -1
  12. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  13. package/esm2015/lib/interaction/abstract-interaction-context.js +104 -0
  14. package/esm2015/lib/interaction/abstract-interaction-context.js.map +1 -0
  15. package/esm2015/lib/interaction/abstract-interaction-context.metadata.json +1 -0
  16. package/esm2015/lib/interaction/activity-ref.js +123 -0
  17. package/esm2015/lib/interaction/activity-ref.js.map +1 -0
  18. package/esm2015/lib/interaction/activity-ref.metadata.json +1 -0
  19. package/esm2015/lib/interaction/activity.js +21 -1
  20. package/esm2015/lib/interaction/activity.js.map +1 -1
  21. package/esm2015/lib/interaction/activity.metadata.json +1 -1
  22. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +199 -230
  23. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  24. package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
  25. package/esm2015/lib/interaction/components/{activity-outlet → activity-container/activity-outlet}/activity-outlet.component.js +24 -31
  26. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -0
  27. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.metadata.json +1 -0
  28. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.ngfactory.js.map +1 -0
  29. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.scss.shim.ngstyle.js.map +1 -0
  30. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +2 -3
  31. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
  32. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
  33. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +4 -11
  34. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
  35. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
  36. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +2 -3
  37. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
  38. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
  39. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +113 -0
  40. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -0
  41. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.metadata.json +1 -0
  42. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.ngfactory.js.map +1 -0
  43. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
  44. package/esm2015/lib/interaction/index.js +7 -6
  45. package/esm2015/lib/interaction/index.js.map +1 -1
  46. package/esm2015/lib/interaction/index.metadata.json +1 -1
  47. package/esm2015/lib/interaction/interaction-context.js +12 -67
  48. package/esm2015/lib/interaction/interaction-context.js.map +1 -1
  49. package/esm2015/lib/interaction/interaction-context.metadata.json +1 -1
  50. package/esm2015/lib/interaction/interaction.module.js +4 -4
  51. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  52. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  53. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  54. package/esm2015/lib/interaction/route-synchronisation-adapter.js +17 -0
  55. package/esm2015/lib/interaction/route-synchronisation-adapter.js.map +1 -0
  56. package/esm2015/lib/interaction/route-synchronisation-adapter.metadata.json +1 -0
  57. package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js +72 -0
  58. package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -0
  59. package/esm2015/lib/interaction/services/interaction-service-routing-adapter.metadata.json +1 -0
  60. package/esm2015/lib/interaction/services/interaction.service.js +174 -104
  61. package/esm2015/lib/interaction/services/interaction.service.js.map +1 -1
  62. package/esm2015/lib/interaction/services/interaction.service.metadata.json +1 -1
  63. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +4 -2
  64. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
  65. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.metadata.json +1 -1
  66. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +79 -87
  67. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
  68. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.metadata.json +1 -1
  69. package/esm2015/lib/interaction/services/modal-interaction-context.factory.js +3 -1
  70. package/esm2015/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
  71. package/esm2015/lib/place/components/abstract-place-navigation.component.js +27 -6
  72. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  73. package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
  74. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +9 -3
  75. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  76. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
  77. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +98 -110
  78. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  79. package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
  80. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +9 -3
  81. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  82. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
  83. package/esm2015/lib/place/guards/place.guard.js +14 -13
  84. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  85. package/esm2015/lib/place/guards/place.guard.metadata.json +1 -1
  86. package/esm2015/lib/place/index.js +15 -2
  87. package/esm2015/lib/place/index.js.map +1 -1
  88. package/esm2015/lib/place/index.metadata.json +1 -1
  89. package/esm2015/lib/place/{guards → navigation}/place-component-deactivation-handler.js +28 -22
  90. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -0
  91. package/esm2015/lib/place/navigation/place-component-deactivation-handler.metadata.json +1 -0
  92. package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js +37 -0
  93. package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -0
  94. package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.metadata.json +1 -0
  95. package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +19 -0
  96. package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -0
  97. package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.metadata.json +1 -0
  98. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +95 -0
  99. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -0
  100. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.metadata.json +1 -0
  101. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +132 -0
  102. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -0
  103. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.metadata.json +1 -0
  104. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +123 -0
  105. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -0
  106. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.metadata.json +1 -0
  107. package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js +62 -0
  108. package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -0
  109. package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.metadata.json +1 -0
  110. package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +48 -0
  111. package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -0
  112. package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.metadata.json +1 -0
  113. package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +104 -0
  114. package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -0
  115. package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.metadata.json +1 -0
  116. package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +141 -0
  117. package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -0
  118. package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.metadata.json +1 -0
  119. package/esm2015/lib/place/navigation/session/navigating.js +54 -0
  120. package/esm2015/lib/place/navigation/session/navigating.js.map +1 -0
  121. package/esm2015/lib/place/navigation/session/navigating.metadata.json +1 -0
  122. package/esm2015/lib/place/navigation/session/navigation-context.js +38 -0
  123. package/esm2015/lib/place/navigation/session/navigation-context.js.map +1 -0
  124. package/esm2015/lib/place/navigation/session/navigation-context.metadata.json +1 -0
  125. package/esm2015/lib/place/navigation/session/navigation-session.js +326 -0
  126. package/esm2015/lib/place/navigation/session/navigation-session.js.map +1 -0
  127. package/esm2015/lib/place/navigation/session/navigation-session.metadata.json +1 -0
  128. package/esm2015/lib/place/navigation/session/pop-state-navigation.js +31 -0
  129. package/esm2015/lib/place/navigation/session/pop-state-navigation.js.map +1 -0
  130. package/esm2015/lib/place/navigation/session/pop-state-navigation.metadata.json +1 -0
  131. package/esm2015/lib/place/place-component.js +46 -15
  132. package/esm2015/lib/place/place-component.js.map +1 -1
  133. package/esm2015/lib/place/place-component.metadata.json +1 -1
  134. package/esm2015/lib/place/place-router.js +314 -309
  135. package/esm2015/lib/place/place-router.js.map +1 -1
  136. package/esm2015/lib/place/place-router.metadata.json +1 -1
  137. package/esm2015/lib/place/place.module.js.map +1 -1
  138. package/esm2015/lib/place/place.module.metadata.json +1 -1
  139. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  140. package/esm2015/lib/place/route/parameter-decorators.js +1 -0
  141. package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
  142. package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
  143. package/esm2015/lib/place/url-service.js +126 -0
  144. package/esm2015/lib/place/url-service.js.map +1 -0
  145. package/esm2015/lib/place/url-service.metadata.json +1 -0
  146. package/esm2015/lib/place/url-service.ngfactory.js.map +1 -0
  147. package/esm2015/lib/place/url-snapshot.js +15 -1
  148. package/esm2015/lib/place/url-snapshot.js.map +1 -1
  149. package/esm2015/lib/place/url-snapshot.metadata.json +1 -1
  150. package/esm2015/lib/place/visit.js +10 -0
  151. package/esm2015/lib/place/visit.js.map +1 -1
  152. package/esm2015/lib/place/visit.metadata.json +1 -1
  153. package/esm2015/public_api.js +2 -2
  154. package/esm2015/public_api.js.map +1 -1
  155. package/esm5/coolon-angular-ui-powerups.js +16 -17
  156. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  157. package/esm5/index.js +1 -1
  158. package/esm5/index.js.map +1 -1
  159. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  160. package/esm5/lib/interaction/abstract-interaction-context.js +146 -0
  161. package/esm5/lib/interaction/abstract-interaction-context.js.map +1 -0
  162. package/esm5/lib/interaction/activity-ref.js +153 -0
  163. package/esm5/lib/interaction/activity-ref.js.map +1 -0
  164. package/esm5/lib/interaction/activity.js +29 -1
  165. package/esm5/lib/interaction/activity.js.map +1 -1
  166. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +273 -265
  167. package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  168. package/esm5/lib/interaction/components/{activity-outlet → activity-container/activity-outlet}/activity-outlet.component.js +25 -32
  169. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -0
  170. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.ngfactory.js.map +1 -0
  171. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.scss.shim.ngstyle.js.map +1 -0
  172. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +2 -3
  173. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
  174. package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +4 -10
  175. package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
  176. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +2 -3
  177. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
  178. package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +158 -0
  179. package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -0
  180. package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.ngfactory.js.map +1 -0
  181. package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
  182. package/esm5/lib/interaction/index.js +7 -6
  183. package/esm5/lib/interaction/index.js.map +1 -1
  184. package/esm5/lib/interaction/interaction-context.js +12 -106
  185. package/esm5/lib/interaction/interaction-context.js.map +1 -1
  186. package/esm5/lib/interaction/interaction.module.js +4 -4
  187. package/esm5/lib/interaction/interaction.module.js.map +1 -1
  188. package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  189. package/esm5/lib/interaction/route-synchronisation-adapter.js +17 -0
  190. package/esm5/lib/interaction/route-synchronisation-adapter.js.map +1 -0
  191. package/esm5/lib/interaction/services/interaction-service-routing-adapter.js +98 -0
  192. package/esm5/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -0
  193. package/esm5/lib/interaction/services/interaction.service.js +243 -117
  194. package/esm5/lib/interaction/services/interaction.service.js.map +1 -1
  195. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +6 -2
  196. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
  197. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +96 -107
  198. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
  199. package/esm5/lib/interaction/services/modal-interaction-context.factory.js +3 -1
  200. package/esm5/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
  201. package/esm5/lib/place/components/abstract-place-navigation.component.js +24 -6
  202. package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  203. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +6 -3
  204. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  205. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +130 -129
  206. package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  207. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +6 -3
  208. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  209. package/esm5/lib/place/guards/place.guard.js +17 -13
  210. package/esm5/lib/place/guards/place.guard.js.map +1 -1
  211. package/esm5/lib/place/index.js +15 -2
  212. package/esm5/lib/place/index.js.map +1 -1
  213. package/esm5/lib/place/{guards → navigation}/place-component-deactivation-handler.js +45 -21
  214. package/esm5/lib/place/navigation/place-component-deactivation-handler.js.map +1 -0
  215. package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js +49 -0
  216. package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -0
  217. package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +36 -0
  218. package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -0
  219. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +151 -0
  220. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -0
  221. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +221 -0
  222. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -0
  223. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +186 -0
  224. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -0
  225. package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js +107 -0
  226. package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -0
  227. package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +77 -0
  228. package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -0
  229. package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +167 -0
  230. package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -0
  231. package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +185 -0
  232. package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -0
  233. package/esm5/lib/place/navigation/session/navigating.js +75 -0
  234. package/esm5/lib/place/navigation/session/navigating.js.map +1 -0
  235. package/esm5/lib/place/navigation/session/navigation-context.js +32 -0
  236. package/esm5/lib/place/navigation/session/navigation-context.js.map +1 -0
  237. package/esm5/lib/place/navigation/session/navigation-session.js +450 -0
  238. package/esm5/lib/place/navigation/session/navigation-session.js.map +1 -0
  239. package/esm5/lib/place/navigation/session/pop-state-navigation.js +50 -0
  240. package/esm5/lib/place/navigation/session/pop-state-navigation.js.map +1 -0
  241. package/esm5/lib/place/place-component.js +61 -17
  242. package/esm5/lib/place/place-component.js.map +1 -1
  243. package/esm5/lib/place/place-router.js +414 -401
  244. package/esm5/lib/place/place-router.js.map +1 -1
  245. package/esm5/lib/place/place.module.js.map +1 -1
  246. package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
  247. package/esm5/lib/place/route/parameter-decorators.js +1 -0
  248. package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
  249. package/esm5/lib/place/url-service.js +176 -0
  250. package/esm5/lib/place/url-service.js.map +1 -0
  251. package/esm5/lib/place/url-service.ngfactory.js.map +1 -0
  252. package/esm5/lib/place/url-snapshot.js +22 -1
  253. package/esm5/lib/place/url-snapshot.js.map +1 -1
  254. package/esm5/lib/place/visit.js +14 -0
  255. package/esm5/lib/place/visit.js.map +1 -1
  256. package/esm5/public_api.js +2 -2
  257. package/esm5/public_api.js.map +1 -1
  258. package/fesm2015/coolon-angular-ui-powerups.js +2644 -2266
  259. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  260. package/fesm5/coolon-angular-ui-powerups.js +3703 -2982
  261. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  262. package/lib/interaction/abstract-interaction-context.d.ts +24 -0
  263. package/lib/interaction/activity-ref.d.ts +19 -0
  264. package/lib/interaction/activity.d.ts +5 -1
  265. package/lib/interaction/components/activity-container/activity-container.component.d.ts +42 -43
  266. package/lib/interaction/components/{activity-outlet → activity-container/activity-outlet}/activity-outlet.component.d.ts +7 -10
  267. package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +2 -2
  268. package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +2 -5
  269. package/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.d.ts +2 -2
  270. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +24 -0
  271. package/lib/interaction/index.d.ts +6 -5
  272. package/lib/interaction/interaction-context.d.ts +8 -29
  273. package/lib/interaction/route-synchronisation-adapter.d.ts +5 -0
  274. package/lib/interaction/services/interaction-service-routing-adapter.d.ts +15 -0
  275. package/lib/interaction/services/interaction.service.d.ts +52 -24
  276. package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.d.ts +2 -1
  277. package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +15 -12
  278. package/lib/interaction/services/modal-interaction-context.factory.d.ts +2 -1
  279. package/lib/place/components/abstract-place-navigation.component.d.ts +5 -3
  280. package/lib/place/components/list-place-nav/list-place-nav.component.d.ts +2 -1
  281. package/lib/place/components/place-outlet/place-outlet.component.d.ts +9 -10
  282. package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +2 -1
  283. package/lib/place/guards/place.guard.d.ts +4 -3
  284. package/lib/place/index.d.ts +15 -2
  285. package/lib/place/navigation/place-component-deactivation-handler.d.ts +22 -0
  286. package/lib/place/navigation/session/abstract-pop-state-navigation.d.ts +9 -0
  287. package/lib/place/navigation/session/event-cleanup/event-clean-up-session.d.ts +4 -0
  288. package/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.d.ts +27 -0
  289. package/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.d.ts +43 -0
  290. package/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.d.ts +33 -0
  291. package/lib/place/navigation/session/interactions/navigating-during-interaction.d.ts +15 -0
  292. package/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.d.ts +17 -0
  293. package/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.d.ts +24 -0
  294. package/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.d.ts +15 -0
  295. package/lib/place/navigation/session/navigating.d.ts +11 -0
  296. package/lib/place/navigation/session/navigation-context.d.ts +28 -0
  297. package/lib/place/navigation/session/navigation-session.d.ts +51 -0
  298. package/lib/place/navigation/session/pop-state-navigation.d.ts +7 -0
  299. package/lib/place/place-component.d.ts +6 -3
  300. package/lib/place/place-router.d.ts +39 -35
  301. package/lib/place/url-service.d.ts +30 -0
  302. package/lib/place/url-snapshot.d.ts +3 -1
  303. package/lib/place/visit.d.ts +1 -0
  304. package/package.json +1 -1
  305. package/schematics/place-routes/templates/place-routes.ts.template +4 -3
  306. package/esm2015/lib/interaction/abstract-activity.js +0 -13
  307. package/esm2015/lib/interaction/abstract-activity.js.map +0 -1
  308. package/esm2015/lib/interaction/abstract-activity.metadata.json +0 -1
  309. package/esm2015/lib/interaction/components/activity-outlet/activity-outlet-context.js +0 -21
  310. package/esm2015/lib/interaction/components/activity-outlet/activity-outlet-context.js.map +0 -1
  311. package/esm2015/lib/interaction/components/activity-outlet/activity-outlet-context.metadata.json +0 -1
  312. package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.js.map +0 -1
  313. package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.metadata.json +0 -1
  314. package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.ngfactory.js.map +0 -1
  315. package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.scss.shim.ngstyle.js.map +0 -1
  316. package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +0 -102
  317. package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js.map +0 -1
  318. package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.metadata.json +0 -1
  319. package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.ngfactory.js.map +0 -1
  320. package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.scss.shim.ngstyle.js.map +0 -1
  321. package/esm2015/lib/interaction/interaction-context-base.js +0 -171
  322. package/esm2015/lib/interaction/interaction-context-base.js.map +0 -1
  323. package/esm2015/lib/interaction/interaction-context-base.metadata.json +0 -1
  324. package/esm2015/lib/place/guards/navigation-state.js +0 -1118
  325. package/esm2015/lib/place/guards/navigation-state.js.map +0 -1
  326. package/esm2015/lib/place/guards/navigation-state.metadata.json +0 -1
  327. package/esm2015/lib/place/guards/place-component-deactivation-handler.js.map +0 -1
  328. package/esm2015/lib/place/guards/place-component-deactivation-handler.metadata.json +0 -1
  329. package/esm5/lib/interaction/abstract-activity.js +0 -30
  330. package/esm5/lib/interaction/abstract-activity.js.map +0 -1
  331. package/esm5/lib/interaction/components/activity-outlet/activity-outlet-context.js +0 -21
  332. package/esm5/lib/interaction/components/activity-outlet/activity-outlet-context.js.map +0 -1
  333. package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.js.map +0 -1
  334. package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.ngfactory.js.map +0 -1
  335. package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.scss.shim.ngstyle.js.map +0 -1
  336. package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +0 -119
  337. package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js.map +0 -1
  338. package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.ngfactory.js.map +0 -1
  339. package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.scss.shim.ngstyle.js.map +0 -1
  340. package/esm5/lib/interaction/interaction-context-base.js +0 -228
  341. package/esm5/lib/interaction/interaction-context-base.js.map +0 -1
  342. package/esm5/lib/place/guards/navigation-state.js +0 -1491
  343. package/esm5/lib/place/guards/navigation-state.js.map +0 -1
  344. package/esm5/lib/place/guards/place-component-deactivation-handler.js.map +0 -1
  345. package/lib/interaction/abstract-activity.d.ts +0 -6
  346. package/lib/interaction/components/activity-outlet/activity-outlet-context.d.ts +0 -7
  347. package/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.d.ts +0 -17
  348. package/lib/interaction/interaction-context-base.d.ts +0 -29
  349. package/lib/place/guards/navigation-state.d.ts +0 -228
  350. package/lib/place/guards/place-component-deactivation-handler.d.ts +0 -15
@@ -3,305 +3,267 @@
3
3
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
4
  */
5
5
  import * as tslib_1 from "tslib";
6
- import { Component, EventEmitter, Input, Output, QueryList, ViewChild, ViewChildren } from '@angular/core';
6
+ import { Component, Input, QueryList, ViewChild, ViewChildren } from '@angular/core';
7
7
  import { MatTabGroup } from '@angular/material';
8
- import { assert, Dsl, MutableListModel, MutableStream, MutableValueModel } from '@coolon/pectin';
9
- import { InteractionContextBase } from '../../interaction-context-base';
10
- import { ActivityOutletComponent } from '../activity-outlet/activity-outlet.component';
8
+ import { assert, Dsl, GarbageCollector, Trace } from '@coolon/pectin';
9
+ import { lang } from '@coolon/typescript-utilities';
10
+ import _ from 'lodash';
11
+ import { AbstractInteractionContext } from '../../abstract-interaction-context';
12
+ import { ActivityRef } from '../../activity-ref';
13
+ import { ActivityOutletComponent } from './activity-outlet/activity-outlet.component';
11
14
  /**
12
- * Note: this class is mutable and is stored in a list model. This is normally a big no no but
13
- * we're manually deriving other models from the list after view state changes. I.e. we not
14
- * using pectin chains on any of the mutable fields.
15
15
  * @template D, R, E
16
16
  */
17
- var /**
18
- * Note: this class is mutable and is stored in a list model. This is normally a big no no but
19
- * we're manually deriving other models from the list after view state changes. I.e. we not
20
- * using pectin chains on any of the mutable fields.
21
- * @template D, R, E
22
- */
23
- TabContext = /** @class */ (function () {
24
- function TabContext(activityData, activityClass, interactionContext, activityCallbacks) {
25
- this.activityData = activityData;
26
- this.activityClass = activityClass;
27
- this.interactionContext = interactionContext;
28
- this.activityCallbacks = activityCallbacks;
29
- this._complete = false;
17
+ var ActivityContainerComponent = /** @class */ (function (_super) {
18
+ tslib_1.__extends(ActivityContainerComponent, _super);
19
+ function ActivityContainerComponent() {
20
+ var _this = _super.call(this) || this;
21
+ _this.dynamicHeight = false;
22
+ _this.activityTabs = [];
23
+ _this.garbage = new GarbageCollector();
24
+ return _this;
30
25
  }
31
26
  /**
32
27
  * @return {?}
33
28
  */
34
- TabContext.prototype.isComponentRealised = /**
29
+ ActivityContainerComponent.prototype.ngOnInit = /**
35
30
  * @return {?}
36
31
  */
37
32
  function () {
38
- return !!this._component;
39
33
  };
40
34
  /**
41
35
  * @return {?}
42
36
  */
43
- TabContext.prototype.isComplete = /**
37
+ ActivityContainerComponent.prototype.ngAfterViewInit = /**
44
38
  * @return {?}
45
39
  */
46
40
  function () {
47
- return this._complete;
41
+ var _this = this;
42
+ var _a = Dsl.disposeWith(this), chain = _a.chain, observe = _a.observe;
43
+ observe.valuesFrom(this.tabs.animationDone).subscribe((/**
44
+ * @return {?}
45
+ */
46
+ function () { return _this.onAnimationFinished(); }));
48
47
  };
49
48
  /**
50
- * @param {?} component
49
+ * @param {?} identifier
50
+ * @param {?} api
51
51
  * @return {?}
52
52
  */
53
- TabContext.prototype.componentReady = /**
54
- * @param {?} component
53
+ ActivityContainerComponent.prototype.initialise = /**
54
+ * @param {?} identifier
55
+ * @param {?} api
55
56
  * @return {?}
56
57
  */
57
- function (component) {
58
- assert.isNil(this._component);
59
- this._component = component;
58
+ function (identifier, api) {
59
+ assert.isFalsey(this.isInitialised());
60
+ assert.notNil(identifier);
61
+ assert.notNil(api);
62
+ this._identifier = identifier;
63
+ this.interactionServiceApi = api;
60
64
  };
61
- Object.defineProperty(TabContext.prototype, "component", {
65
+ Object.defineProperty(ActivityContainerComponent.prototype, "identifier", {
62
66
  get: /**
63
67
  * @return {?}
64
68
  */
65
69
  function () {
66
- return this._component;
70
+ return this._identifier;
67
71
  },
68
72
  enumerable: true,
69
73
  configurable: true
70
74
  });
71
- // @Trace()
72
- // @Trace()
73
75
  /**
74
- * @param {?} result
75
76
  * @return {?}
76
77
  */
77
- TabContext.prototype.onDone =
78
- // @Trace()
79
- /**
80
- * @param {?} result
78
+ ActivityContainerComponent.prototype.isInitialised = /**
81
79
  * @return {?}
82
80
  */
83
- function (result) {
84
- this._complete = true;
85
- this.activityCallbacks.onDone(result);
81
+ function () {
82
+ return !!this.identifier;
86
83
  };
87
- // @Trace()
88
- // @Trace()
89
84
  /**
90
- * @param {?} error
91
- * @return {?}
85
+ * Returns true if an activity is currently running.
92
86
  */
93
- TabContext.prototype.onCancel =
94
- // @Trace()
95
87
  /**
96
- * @param {?} error
88
+ * Returns true if an activity is currently running.
89
+ * @return {?}
90
+ */
91
+ ActivityContainerComponent.prototype.isActive = /**
92
+ * Returns true if an activity is currently running.
97
93
  * @return {?}
98
94
  */
99
- function (error) {
100
- this._complete = true;
101
- this.activityCallbacks.onCancel(error);
95
+ function () {
96
+ return this.getActiveActivityCount() > 0;
102
97
  };
103
98
  /**
99
+ * @template T
100
+ * @param {?} disposable
104
101
  * @return {?}
105
102
  */
106
- TabContext.prototype.dispose = /**
103
+ ActivityContainerComponent.prototype.registerDisposable = /**
104
+ * @template T
105
+ * @param {?} disposable
107
106
  * @return {?}
108
107
  */
109
- function () {
110
- this.component.dispose();
108
+ function (disposable) {
109
+ return this.garbage.registerDisposable(disposable);
111
110
  };
112
- return TabContext;
113
- }());
114
- if (false) {
115
111
  /**
116
- * @type {?}
117
- * @private
112
+ * @return {?}
118
113
  */
119
- TabContext.prototype._complete;
120
- /**
121
- * @type {?}
122
- * @private
114
+ ActivityContainerComponent.prototype.dispose = /**
115
+ * @return {?}
123
116
  */
124
- TabContext.prototype._component;
125
- /** @type {?} */
126
- TabContext.prototype.activityData;
127
- /** @type {?} */
128
- TabContext.prototype.activityClass;
129
- /** @type {?} */
130
- TabContext.prototype.interactionContext;
131
- /** @type {?} */
132
- TabContext.prototype.activityCallbacks;
133
- }
134
- /**
135
- * @template D, R, E
136
- */
137
- var ActivityContainerComponent = /** @class */ (function (_super) {
138
- tslib_1.__extends(ActivityContainerComponent, _super);
139
- function ActivityContainerComponent() {
140
- var _this = _super.call(this) || this;
141
- _this.throttledNestedActivityFinishEvents = new MutableStream();
142
- _this._initialActivityOutletContext = new MutableValueModel();
143
- // tslint:disable-next-line:no-output-rename
144
- _this.initialActivityOutletContextEvent = new EventEmitter();
145
- _this.dynamicHeight = false;
146
- _this.activityTabs = new MutableListModel();
147
- _this._activityList = new MutableListModel();
148
- var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
149
- chain(_this.throttledNestedActivityFinishEvents).throttle(50).subscribe((/**
150
- * @return {?}
151
- */
152
- function () { return _this.onNestedActivityFinished(); }));
153
- _this.setActivityList(_this._activityList.readonly);
154
- _this.active = chain(_this._initialActivityOutletContext).isNotNil();
155
- return _this;
156
- }
157
- Object.defineProperty(ActivityContainerComponent.prototype, "initialActivityOutletContext", {
158
- get: /**
159
- * @return {?}
160
- */
161
- function () {
162
- return this._initialActivityOutletContext.value;
163
- },
164
- set: /**
165
- * @param {?} initialContext
166
- * @return {?}
167
- */
168
- function (initialContext) {
169
- assert.isNil(this._initialActivityOutletContext.value);
170
- // we clean up at the start as we leave the initial activity in place after it finishes
171
- // so that the activity remains visible during the inplace-interaction-context animations.
172
- this.activityTabs.value = [];
173
- this._activityList.value = [];
174
- /** @type {?} */
175
- var self = this;
176
- if (initialContext) {
177
- this._initialActivityOutletContext.value = initialContext;
178
- this.activityTabs.push(new TabContext(initialContext.activityData, initialContext.activityClass, this, {
179
- onDone: (/**
180
- * @param {?} result
181
- * @return {?}
182
- */
183
- function (result) {
184
- self.finishInitialActivity();
185
- initialContext.onDone(result);
186
- }),
187
- onCancel: (/**
188
- * @param {?} error
189
- * @return {?}
190
- */
191
- function (error) {
192
- self.finishInitialActivity();
193
- initialContext.onCancel(error);
194
- })
195
- }));
196
- }
197
- },
198
- enumerable: true,
199
- configurable: true
200
- });
117
+ function () {
118
+ // TODO: think about auto cancelling any outstanding activity on dispose.
119
+ // See NavigationState.Navigating for a use-case.
120
+ assert.isFalsey(this.isActive());
121
+ this.garbage.dispose();
122
+ };
201
123
  /**
202
124
  * @return {?}
203
125
  */
204
- ActivityContainerComponent.prototype.ngOnInit = /**
126
+ ActivityContainerComponent.prototype.getActiveActivityRef = /**
205
127
  * @return {?}
206
128
  */
207
129
  function () {
130
+ if (!this.isActive()) {
131
+ lang.illegalState('no activity in progress');
132
+ }
133
+ return _.findLast(this.activityTabs, (/**
134
+ * @param {?} tab
135
+ * @return {?}
136
+ */
137
+ function (tab) { return !tab.isComplete(); }));
208
138
  };
209
139
  /**
140
+ * Cancels the current activity and returns true the context is no longer active, false if
141
+ * there is still another activity running.
142
+ */
143
+ // @Trace()
144
+ /**
145
+ * Cancels the current activity and returns true the context is no longer active, false if
146
+ * there is still another activity running.
210
147
  * @return {?}
211
148
  */
212
- ActivityContainerComponent.prototype.ngAfterViewInit = /**
149
+ // @Trace()
150
+ ActivityContainerComponent.prototype.cancelActiveActivity = /**
151
+ * Cancels the current activity and returns true the context is no longer active, false if
152
+ * there is still another activity running.
213
153
  * @return {?}
214
154
  */
155
+ // @Trace()
215
156
  function () {
216
- var _this = this;
217
- var _a = Dsl.disposeWith(this), chain = _a.chain, observe = _a.observe;
218
- observe.valuesFrom(this.outlets.changes).subscribe((/**
219
- * @return {?}
220
- */
221
- function () { return setTimeout((/**
222
- * @return {?}
223
- */
224
- function () { return _this.updateActivityList(); })); }));
225
- observe.valuesFrom(this.tabs.animationDone).subscribe((/**
226
- * @return {?}
227
- */
228
- function () { return _this.onAnimationFinished(); }));
229
- this.updateActivityList();
157
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
158
+ var activity;
159
+ return tslib_1.__generator(this, function (_a) {
160
+ activity = this.getActiveActivityRef();
161
+ activity.cancel();
162
+ if (this.isCleaningUp()) {
163
+ return [2 /*return*/, this.waitForInteractionContextCleanupToFinish()];
164
+ }
165
+ else {
166
+ return [2 /*return*/, !this.isActive()];
167
+ }
168
+ return [2 /*return*/];
169
+ });
170
+ });
230
171
  };
172
+ // TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.
173
+ // @Trace()
174
+ // TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.
175
+ // @Trace()
231
176
  /**
177
+ * @protected
232
178
  * @template D1, R1, E1
233
179
  * @param {?} activityType
234
- * @param {?=} data
180
+ * @param {?} data
181
+ * @param {?} disableClose
235
182
  * @return {?}
236
183
  */
237
- ActivityContainerComponent.prototype._startActivity = /**
184
+ ActivityContainerComponent.prototype.createAndLaunchActivity =
185
+ // TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.
186
+ // @Trace()
187
+ /**
188
+ * @protected
238
189
  * @template D1, R1, E1
239
190
  * @param {?} activityType
240
- * @param {?=} data
191
+ * @param {?} data
192
+ * @param {?} disableClose
241
193
  * @return {?}
242
194
  */
243
- function (activityType, data) {
195
+ function (activityType, data, disableClose) {
244
196
  var _this = this;
245
- this.cleanupStaleNestedActivities();
197
+ assert.isTruthy(this.isInitialised()); // make sure we've been initialised
198
+ // make sure we've been initialised
246
199
  /** @type {?} */
247
- var self = this;
248
- return new Promise((/**
249
- * @param {?} resolve
250
- * @param {?} reject
200
+ var activityRef = new ActivityRef(activityType, data, (/**
251
201
  * @return {?}
252
202
  */
253
- function (resolve, reject) {
203
+ function () {
254
204
  /** @type {?} */
255
- var context = new TabContext(data, activityType, self, {
256
- onDone: (/**
257
- * @param {?} result
258
- * @return {?}
259
- */
260
- function (result) {
261
- resolve(result);
262
- self.throttledNestedActivityFinishEvents.publish({});
263
- }),
264
- onCancel: (/**
265
- * @param {?} error
266
- * @return {?}
267
- */
268
- function (error) {
269
- reject(error);
270
- self.throttledNestedActivityFinishEvents.publish({});
271
- })
272
- });
273
- self.activityTabs.push(context);
274
- self.tabs.selectedIndex = _this.activityTabs.length;
205
+ var activeActivityCount = _this.getActiveActivityCount() > 0;
206
+ if (activeActivityCount) {
207
+ _this.triggerTabSynchronisation();
208
+ }
209
+ else {
210
+ _this.finishAndStartCleanup();
211
+ }
275
212
  }));
213
+ this.launchActivity(activityRef);
214
+ // if this is the first activity let the interaction service know.
215
+ if (this.activityTabs.length === 1) {
216
+ // console.log('Now active!!!');
217
+ this.interactionServiceApi.notifyActive(this);
218
+ }
219
+ return activityRef.activityResult;
276
220
  };
277
221
  /**
278
222
  * @private
279
223
  * @return {?}
280
224
  */
281
- ActivityContainerComponent.prototype.finishInitialActivity = /**
225
+ ActivityContainerComponent.prototype.getActiveActivityCount = /**
282
226
  * @private
283
227
  * @return {?}
284
228
  */
285
229
  function () {
286
- this.updateActivityList();
287
- this._initialActivityOutletContext.value = null;
288
- this.initialActivityOutletContextEvent.emit(null);
230
+ return this.activityTabs.filter((/**
231
+ * @param {?} ref
232
+ * @return {?}
233
+ */
234
+ function (ref) { return !ref.isComplete(); })).length;
289
235
  };
290
- // @Trace()
291
- // @Trace()
292
236
  /**
293
- * @private
237
+ * Checks if this interaction context has finished an is in the process of waiting
238
+ * for all the infrastructure (including route updates) to be completed.
239
+ */
240
+ /**
241
+ * Checks if this interaction context has finished an is in the process of waiting
242
+ * for all the infrastructure (including route updates) to be completed.
294
243
  * @return {?}
295
244
  */
296
- ActivityContainerComponent.prototype.onNestedActivityFinished =
297
- // @Trace()
245
+ ActivityContainerComponent.prototype.isCleaningUp = /**
246
+ * Checks if this interaction context has finished an is in the process of waiting
247
+ * for all the infrastructure (including route updates) to be completed.
248
+ * @return {?}
249
+ */
250
+ function () {
251
+ return !!this._deferredCleanUp;
252
+ };
298
253
  /**
299
- * @private
254
+ * @return {?}
255
+ */
256
+ ActivityContainerComponent.prototype.waitForInteractionContextCleanupToFinish = /**
300
257
  * @return {?}
301
258
  */
302
259
  function () {
303
- this.synchroniseSelectedTabIndex();
304
- this.updateActivityList();
260
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
261
+ return tslib_1.__generator(this, function (_a) {
262
+ return [2 /*return*/, this._deferredCleanUp ?
263
+ this._deferredCleanUp :
264
+ true];
265
+ });
266
+ });
305
267
  };
306
268
  // @Trace()
307
269
  // @Trace()
@@ -309,62 +271,64 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
309
271
  * @private
310
272
  * @return {?}
311
273
  */
312
- ActivityContainerComponent.prototype.cleanupStaleNestedActivities =
274
+ ActivityContainerComponent.prototype.finishAndStartCleanup =
313
275
  // @Trace()
314
276
  /**
315
277
  * @private
316
278
  * @return {?}
317
279
  */
318
280
  function () {
319
- if (this.tabs.selectedIndex < this.activityTabs.length - 1) {
320
- /** @type {?} */
321
- var tabs = this.activityTabs.value;
322
- /** @type {?} */
323
- var remainingActivities_1 = tabs.slice(0, 1 + this.tabs.selectedIndex);
281
+ var _this = this;
282
+ if (!this._deferredCleanUp) {
324
283
  /** @type {?} */
325
- var finishedActivityTabs = tabs.slice(1 + this.tabs.selectedIndex);
326
- finishedActivityTabs.forEach((/**
327
- * @param {?} a
328
- * @return {?}
329
- */
330
- function (a) { return a.dispose(); }));
331
- this.activityTabs.runInTransaction((/**
332
- * @param {?} draft
284
+ var promise = this.interactionServiceApi.notifyFinished(this);
285
+ this._deferredCleanUp = promise
286
+ .finally((/**
333
287
  * @return {?}
334
288
  */
335
- function (draft) {
336
- draft.value = remainingActivities_1;
289
+ function () {
290
+ _this._deferredCleanUp = null;
337
291
  }));
338
292
  }
339
293
  };
340
- /**
341
- * Synchronises the selected tab index. Returns true if there was no change to the selected index.
342
- */
294
+ // @Trace()
343
295
  // @Trace()
344
296
  /**
345
- * Synchronises the selected tab index. Returns true if there was no change to the selected index.
346
- * @private
297
+ * @template D1, R1, E1
298
+ * @param {?} activityRef
347
299
  * @return {?}
348
300
  */
301
+ ActivityContainerComponent.prototype.launchActivity =
349
302
  // @Trace()
350
- ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = /**
351
- * Synchronises the selected tab index. Returns true if there was no change to the selected index.
352
- * @private
303
+ /**
304
+ * @template D1, R1, E1
305
+ * @param {?} activityRef
353
306
  * @return {?}
354
307
  */
355
- // @Trace()
356
- function () {
357
- /** @type {?} */
358
- var previousIndex = this.tabs.selectedIndex;
308
+ function (activityRef) {
359
309
  /** @type {?} */
360
- var newIndex = this.activityTabs.query().findIndex((/**
361
- * @param {?} t
310
+ var cleanedTabs = this.activityTabs.filter((/**
311
+ * @param {?} tab
362
312
  * @return {?}
363
313
  */
364
- function (t) { return t.isComplete(); })) - 1;
365
- this.tabs.selectedIndex = newIndex;
366
- return previousIndex === newIndex;
314
+ function (tab) { return !tab.isComplete(); }));
315
+ this.activityTabs = cleanedTabs.concat(activityRef);
316
+ this.tabs.selectedIndex = this.activityTabs.length;
317
+ };
318
+ /**
319
+ * @param {?} index
320
+ * @param {?} activityRef
321
+ * @return {?}
322
+ */
323
+ ActivityContainerComponent.prototype.activityIndex = /**
324
+ * @param {?} index
325
+ * @param {?} activityRef
326
+ * @return {?}
327
+ */
328
+ function (index, activityRef) {
329
+ return index;
367
330
  };
331
+ ;
368
332
  // @Trace()
369
333
  // @Trace()
370
334
  /**
@@ -379,27 +343,35 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
379
343
  */
380
344
  function () {
381
345
  this.getSelectedOutlet().component.onActivityReady();
382
- this.cleanupStaleNestedActivities();
383
- this.updateActivityList();
346
+ this.activityTabs = this.activityTabs.filter((/**
347
+ * @param {?} tab
348
+ * @return {?}
349
+ */
350
+ function (tab) { return !tab.isComplete(); }));
384
351
  };
385
352
  /**
353
+ * Synchronises the selected tab index. Returns true if there was no change to the selected index.
354
+ */
355
+ // @Trace()
356
+ /**
357
+ * Synchronises the selected tab index. Returns true if there was no change to the selected index.
386
358
  * @private
387
359
  * @return {?}
388
360
  */
389
- ActivityContainerComponent.prototype.updateActivityList = /**
361
+ // @Trace()
362
+ ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = /**
363
+ * Synchronises the selected tab index. Returns true if there was no change to the selected index.
390
364
  * @private
391
365
  * @return {?}
392
366
  */
367
+ // @Trace()
393
368
  function () {
394
- this._activityList.value = this.activityTabs.value.filter((/**
395
- * @param {?} t
396
- * @return {?}
397
- */
398
- function (t) { return !t.isComplete() && t.isComponentRealised(); })).map((/**
399
- * @param {?} t
400
- * @return {?}
401
- */
402
- function (t) { return t.component; }));
369
+ /** @type {?} */
370
+ var previousIndex = this.tabs.selectedIndex;
371
+ /** @type {?} */
372
+ var newIndex = this.getActiveActivityCount() - 1;
373
+ this.tabs.selectedIndex = newIndex;
374
+ return previousIndex === newIndex;
403
375
  };
404
376
  /**
405
377
  * @private
@@ -410,54 +382,90 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
410
382
  * @return {?}
411
383
  */
412
384
  function () {
413
- return this.outlets.toArray()[this.tabs.selectedIndex];
385
+ return this.activityOutlets.toArray()[this.tabs.selectedIndex];
386
+ };
387
+ // @Trace()
388
+ // @Trace()
389
+ /**
390
+ * @private
391
+ * @return {?}
392
+ */
393
+ ActivityContainerComponent.prototype.triggerTabSynchronisation =
394
+ // @Trace()
395
+ /**
396
+ * @private
397
+ * @return {?}
398
+ */
399
+ function () {
400
+ var _this = this;
401
+ if (this.syncSelectedTabTimeout) {
402
+ clearTimeout(this.syncSelectedTabTimeout);
403
+ }
404
+ this.syncSelectedTabTimeout = setTimeout((/**
405
+ * @return {?}
406
+ */
407
+ function () {
408
+ _this.syncSelectedTabTimeout = null;
409
+ _this.synchroniseSelectedTabIndex();
410
+ }), 75);
414
411
  };
415
412
  ActivityContainerComponent.decorators = [
416
413
  { type: Component, args: [{
417
414
  selector: 'aup-activity-container',
418
- template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"dynamicHeight\" [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs.value\">\n <aup-activity-outlet [interactionContext]=\"this\" [activityContext]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
415
+ template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"dynamicHeight\" [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; trackBy: activityIndex\" >\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
419
416
  styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
420
417
  }] }
421
418
  ];
422
419
  /** @nocollapse */
423
420
  ActivityContainerComponent.ctorParameters = function () { return []; };
424
421
  ActivityContainerComponent.propDecorators = {
425
- initialActivityOutletContext: [{ type: Input }],
426
- initialActivityOutletContextEvent: [{ type: Output, args: ['initialActivityOutletContext',] }],
427
422
  dynamicHeight: [{ type: Input }],
428
423
  tabs: [{ type: ViewChild, args: ['tabs', { static: true },] }],
429
- outlets: [{ type: ViewChildren, args: [ActivityOutletComponent,] }]
424
+ activityOutlets: [{ type: ViewChildren, args: [ActivityOutletComponent,] }]
430
425
  };
426
+ tslib_1.__decorate([
427
+ Trace(),
428
+ tslib_1.__metadata("design:type", Function),
429
+ tslib_1.__metadata("design:paramtypes", []),
430
+ tslib_1.__metadata("design:returntype", void 0)
431
+ ], ActivityContainerComponent.prototype, "dispose", null);
431
432
  return ActivityContainerComponent;
432
- }(InteractionContextBase));
433
+ }(AbstractInteractionContext));
433
434
  export { ActivityContainerComponent };
434
435
  if (false) {
436
+ /** @type {?} */
437
+ ActivityContainerComponent.prototype.dynamicHeight;
438
+ /** @type {?} */
439
+ ActivityContainerComponent.prototype.tabs;
440
+ /** @type {?} */
441
+ ActivityContainerComponent.prototype.activityOutlets;
442
+ /** @type {?} */
443
+ ActivityContainerComponent.prototype.activityTabs;
435
444
  /**
436
445
  * @type {?}
437
446
  * @private
438
447
  */
439
- ActivityContainerComponent.prototype.throttledNestedActivityFinishEvents;
448
+ ActivityContainerComponent.prototype._identifier;
440
449
  /**
441
450
  * @type {?}
442
451
  * @private
443
452
  */
444
- ActivityContainerComponent.prototype._initialActivityOutletContext;
445
- /** @type {?} */
446
- ActivityContainerComponent.prototype.initialActivityOutletContextEvent;
447
- /** @type {?} */
448
- ActivityContainerComponent.prototype.dynamicHeight;
449
- /** @type {?} */
450
- ActivityContainerComponent.prototype.tabs;
451
- /** @type {?} */
452
- ActivityContainerComponent.prototype.outlets;
453
- /** @type {?} */
454
- ActivityContainerComponent.prototype.activityTabs;
455
- /** @type {?} */
456
- ActivityContainerComponent.prototype.active;
453
+ ActivityContainerComponent.prototype._deferredCleanUp;
454
+ /**
455
+ * @type {?}
456
+ * @private
457
+ */
458
+ ActivityContainerComponent.prototype.interactionServiceApi;
459
+ /**
460
+ * @type {?}
461
+ * @private
462
+ */
463
+ ActivityContainerComponent.prototype.garbage;
457
464
  /**
458
465
  * @type {?}
459
466
  * @private
460
467
  */
461
- ActivityContainerComponent.prototype._activityList;
468
+ ActivityContainerComponent.prototype.syncSelectedTabTimeout;
469
+ /* Skipping unhandled member: ;*/
462
470
  }
463
471
  //# sourceMappingURL=activity-container.component.js.map