@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,21 +1,14 @@
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, __decorate, __extends, __generator, __metadata } from "tslib";
6
2
  import { Component, Input, QueryList, ViewChild, ViewChildren } from '@angular/core';
7
- import { MatTabGroup } from '@angular/material';
3
+ import { MatTabGroup } from '@angular/material/tabs';
8
4
  import { assert, Dsl, GarbageCollector, Trace } from '@coolon/pectin';
9
5
  import { lang } from '@coolon/typescript-utilities';
10
6
  import _ from 'lodash';
11
7
  import { AbstractInteractionContext } from '../../abstract-interaction-context';
12
8
  import { ActivityRef } from '../../activity-ref';
13
9
  import { ActivityOutletComponent } from './activity-outlet/activity-outlet.component';
14
- /**
15
- * @template D, R, E
16
- */
17
10
  var ActivityContainerComponent = /** @class */ (function (_super) {
18
- tslib_1.__extends(ActivityContainerComponent, _super);
11
+ __extends(ActivityContainerComponent, _super);
19
12
  function ActivityContainerComponent() {
20
13
  var _this = _super.call(this) || this;
21
14
  _this.dynamicHeight = false;
@@ -23,39 +16,14 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
23
16
  _this.garbage = new GarbageCollector();
24
17
  return _this;
25
18
  }
26
- /**
27
- * @return {?}
28
- */
29
- ActivityContainerComponent.prototype.ngOnInit = /**
30
- * @return {?}
31
- */
32
- function () {
19
+ ActivityContainerComponent.prototype.ngOnInit = function () {
33
20
  };
34
- /**
35
- * @return {?}
36
- */
37
- ActivityContainerComponent.prototype.ngAfterViewInit = /**
38
- * @return {?}
39
- */
40
- function () {
21
+ ActivityContainerComponent.prototype.ngAfterViewInit = function () {
41
22
  var _this = this;
42
23
  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(); }));
24
+ observe.valuesFrom(this.tabs.animationDone).subscribe(function () { return _this.onAnimationFinished(); });
47
25
  };
48
- /**
49
- * @param {?} identifier
50
- * @param {?} api
51
- * @return {?}
52
- */
53
- ActivityContainerComponent.prototype.initialise = /**
54
- * @param {?} identifier
55
- * @param {?} api
56
- * @return {?}
57
- */
58
- function (identifier, api) {
26
+ ActivityContainerComponent.prototype.initialise = function (identifier, api) {
59
27
  assert.isFalsey(this.isInitialised());
60
28
  assert.notNil(identifier);
61
29
  assert.notNil(api);
@@ -63,100 +31,45 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
63
31
  this.interactionServiceApi = api;
64
32
  };
65
33
  Object.defineProperty(ActivityContainerComponent.prototype, "identifier", {
66
- get: /**
67
- * @return {?}
68
- */
69
- function () {
34
+ get: function () {
70
35
  return this._identifier;
71
36
  },
72
37
  enumerable: true,
73
38
  configurable: true
74
39
  });
75
- /**
76
- * @return {?}
77
- */
78
- ActivityContainerComponent.prototype.isInitialised = /**
79
- * @return {?}
80
- */
81
- function () {
40
+ ActivityContainerComponent.prototype.isInitialised = function () {
82
41
  return !!this.identifier;
83
42
  };
84
43
  /**
85
44
  * Returns true if an activity is currently running.
86
45
  */
87
- /**
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.
93
- * @return {?}
94
- */
95
- function () {
46
+ ActivityContainerComponent.prototype.isActive = function () {
96
47
  return this.getActiveActivityCount() > 0;
97
48
  };
98
- /**
99
- * @template T
100
- * @param {?} disposable
101
- * @return {?}
102
- */
103
- ActivityContainerComponent.prototype.registerDisposable = /**
104
- * @template T
105
- * @param {?} disposable
106
- * @return {?}
107
- */
108
- function (disposable) {
49
+ ActivityContainerComponent.prototype.registerDisposable = function (disposable) {
109
50
  return this.garbage.registerDisposable(disposable);
110
51
  };
111
- /**
112
- * @return {?}
113
- */
114
- ActivityContainerComponent.prototype.dispose = /**
115
- * @return {?}
116
- */
117
- function () {
52
+ ActivityContainerComponent.prototype.dispose = function () {
118
53
  // TODO: think about auto cancelling any outstanding activity on dispose.
119
54
  // See NavigationState.Navigating for a use-case.
120
55
  assert.isFalsey(this.isActive());
121
56
  this.garbage.dispose();
122
57
  };
123
- /**
124
- * @return {?}
125
- */
126
- ActivityContainerComponent.prototype.getActiveActivityRef = /**
127
- * @return {?}
128
- */
129
- function () {
58
+ ActivityContainerComponent.prototype.getActiveActivityRef = function () {
130
59
  if (!this.isActive()) {
131
60
  lang.illegalState('no activity in progress');
132
61
  }
133
- return _.findLast(this.activityTabs, (/**
134
- * @param {?} tab
135
- * @return {?}
136
- */
137
- function (tab) { return !tab.isComplete(); }));
62
+ return _.findLast(this.activityTabs, function (tab) { return !tab.isComplete(); });
138
63
  };
139
64
  /**
140
65
  * Cancels the current activity and returns true the context is no longer active, false if
141
66
  * there is still another activity running.
142
67
  */
143
68
  // @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.
147
- * @return {?}
148
- */
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.
153
- * @return {?}
154
- */
155
- // @Trace()
156
- function () {
157
- return tslib_1.__awaiter(this, void 0, void 0, function () {
69
+ ActivityContainerComponent.prototype.cancelActiveActivity = function () {
70
+ return __awaiter(this, void 0, void 0, function () {
158
71
  var activity;
159
- return tslib_1.__generator(this, function (_a) {
72
+ return __generator(this, function (_a) {
160
73
  activity = this.getActiveActivityRef();
161
74
  activity.cancel();
162
75
  if (this.isCleaningUp()) {
@@ -171,37 +84,10 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
171
84
  };
172
85
  // TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.
173
86
  // @Trace()
174
- // TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.
175
- // @Trace()
176
- /**
177
- * @protected
178
- * @template D1, R1, E1
179
- * @param {?} activityType
180
- * @param {?} data
181
- * @param {?} disableClose
182
- * @return {?}
183
- */
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
189
- * @template D1, R1, E1
190
- * @param {?} activityType
191
- * @param {?} data
192
- * @param {?} disableClose
193
- * @return {?}
194
- */
195
- function (activityType, data, disableClose) {
87
+ ActivityContainerComponent.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
196
88
  var _this = this;
197
89
  assert.isTruthy(this.isInitialised()); // make sure we've been initialised
198
- // make sure we've been initialised
199
- /** @type {?} */
200
- var activityRef = new ActivityRef(activityType, data, (/**
201
- * @return {?}
202
- */
203
- function () {
204
- /** @type {?} */
90
+ var activityRef = new ActivityRef(activityType, data, function () {
205
91
  var activeActivityCount = _this.getActiveActivityCount() > 0;
206
92
  if (activeActivityCount) {
207
93
  _this.triggerTabSynchronisation();
@@ -209,7 +95,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
209
95
  else {
210
96
  _this.finishAndStartCleanup();
211
97
  }
212
- }));
98
+ });
213
99
  this.launchActivity(activityRef);
214
100
  // if this is the first activity let the interaction service know.
215
101
  if (this.activityTabs.length === 1) {
@@ -218,47 +104,19 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
218
104
  }
219
105
  return activityRef.activityResult;
220
106
  };
221
- /**
222
- * @private
223
- * @return {?}
224
- */
225
- ActivityContainerComponent.prototype.getActiveActivityCount = /**
226
- * @private
227
- * @return {?}
228
- */
229
- function () {
230
- return this.activityTabs.filter((/**
231
- * @param {?} ref
232
- * @return {?}
233
- */
234
- function (ref) { return !ref.isComplete(); })).length;
107
+ ActivityContainerComponent.prototype.getActiveActivityCount = function () {
108
+ return this.activityTabs.filter(function (ref) { return !ref.isComplete(); }).length;
235
109
  };
236
110
  /**
237
111
  * Checks if this interaction context has finished an is in the process of waiting
238
112
  * for all the infrastructure (including route updates) to be completed.
239
113
  */
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.
243
- * @return {?}
244
- */
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 () {
114
+ ActivityContainerComponent.prototype.isCleaningUp = function () {
251
115
  return !!this._deferredCleanUp;
252
116
  };
253
- /**
254
- * @return {?}
255
- */
256
- ActivityContainerComponent.prototype.waitForInteractionContextCleanupToFinish = /**
257
- * @return {?}
258
- */
259
- function () {
260
- return tslib_1.__awaiter(this, void 0, void 0, function () {
261
- return tslib_1.__generator(this, function (_a) {
117
+ ActivityContainerComponent.prototype.waitForInteractionContextCleanupToFinish = function () {
118
+ return __awaiter(this, void 0, void 0, function () {
119
+ return __generator(this, function (_a) {
262
120
  return [2 /*return*/, this._deferredCleanUp ?
263
121
  this._deferredCleanUp :
264
122
  true];
@@ -266,206 +124,82 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
266
124
  });
267
125
  };
268
126
  // @Trace()
269
- // @Trace()
270
- /**
271
- * @private
272
- * @return {?}
273
- */
274
- ActivityContainerComponent.prototype.finishAndStartCleanup =
275
- // @Trace()
276
- /**
277
- * @private
278
- * @return {?}
279
- */
280
- function () {
127
+ ActivityContainerComponent.prototype.finishAndStartCleanup = function () {
281
128
  var _this = this;
282
129
  if (!this._deferredCleanUp) {
283
- /** @type {?} */
284
130
  var promise = this.interactionServiceApi.notifyFinished(this);
285
131
  this._deferredCleanUp = promise
286
- .finally((/**
287
- * @return {?}
288
- */
289
- function () {
132
+ .finally(function () {
290
133
  _this._deferredCleanUp = null;
291
- }));
134
+ });
292
135
  }
293
136
  };
294
137
  // @Trace()
295
- // @Trace()
296
- /**
297
- * @template D1, R1, E1
298
- * @param {?} activityRef
299
- * @return {?}
300
- */
301
- ActivityContainerComponent.prototype.launchActivity =
302
- // @Trace()
303
- /**
304
- * @template D1, R1, E1
305
- * @param {?} activityRef
306
- * @return {?}
307
- */
308
- function (activityRef) {
309
- /** @type {?} */
310
- var cleanedTabs = this.activityTabs.filter((/**
311
- * @param {?} tab
312
- * @return {?}
313
- */
314
- function (tab) { return !tab.isComplete(); }));
138
+ ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
139
+ var cleanedTabs = this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
315
140
  this.activityTabs = cleanedTabs.concat(activityRef);
316
141
  this.tabs.selectedIndex = this.activityTabs.length;
317
142
  };
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) {
143
+ ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
329
144
  return index;
330
145
  };
331
146
  ;
332
147
  // @Trace()
333
- // @Trace()
334
- /**
335
- * @private
336
- * @return {?}
337
- */
338
- ActivityContainerComponent.prototype.onAnimationFinished =
339
- // @Trace()
340
- /**
341
- * @private
342
- * @return {?}
343
- */
344
- function () {
148
+ ActivityContainerComponent.prototype.onAnimationFinished = function () {
345
149
  this.getSelectedOutlet().component.onActivityReady();
346
- this.activityTabs = this.activityTabs.filter((/**
347
- * @param {?} tab
348
- * @return {?}
349
- */
350
- function (tab) { return !tab.isComplete(); }));
150
+ this.activityTabs = this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
351
151
  };
352
152
  /**
353
153
  * Synchronises the selected tab index. Returns true if there was no change to the selected index.
354
154
  */
355
155
  // @Trace()
356
- /**
357
- * Synchronises the selected tab index. Returns true if there was no change to the selected index.
358
- * @private
359
- * @return {?}
360
- */
361
- // @Trace()
362
- ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = /**
363
- * Synchronises the selected tab index. Returns true if there was no change to the selected index.
364
- * @private
365
- * @return {?}
366
- */
367
- // @Trace()
368
- function () {
369
- /** @type {?} */
156
+ ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = function () {
370
157
  var previousIndex = this.tabs.selectedIndex;
371
- /** @type {?} */
372
158
  var newIndex = this.getActiveActivityCount() - 1;
373
159
  this.tabs.selectedIndex = newIndex;
374
160
  return previousIndex === newIndex;
375
161
  };
376
- /**
377
- * @private
378
- * @return {?}
379
- */
380
- ActivityContainerComponent.prototype.getSelectedOutlet = /**
381
- * @private
382
- * @return {?}
383
- */
384
- function () {
162
+ ActivityContainerComponent.prototype.getSelectedOutlet = function () {
385
163
  return this.activityOutlets.toArray()[this.tabs.selectedIndex];
386
164
  };
387
165
  // @Trace()
388
- // @Trace()
389
- /**
390
- * @private
391
- * @return {?}
392
- */
393
- ActivityContainerComponent.prototype.triggerTabSynchronisation =
394
- // @Trace()
395
- /**
396
- * @private
397
- * @return {?}
398
- */
399
- function () {
166
+ ActivityContainerComponent.prototype.triggerTabSynchronisation = function () {
400
167
  var _this = this;
401
168
  if (this.syncSelectedTabTimeout) {
402
169
  clearTimeout(this.syncSelectedTabTimeout);
403
170
  }
404
- this.syncSelectedTabTimeout = setTimeout((/**
405
- * @return {?}
406
- */
407
- function () {
171
+ this.syncSelectedTabTimeout = setTimeout(function () {
408
172
  _this.syncSelectedTabTimeout = null;
409
173
  _this.synchroniseSelectedTabIndex();
410
- }), 75);
411
- };
412
- ActivityContainerComponent.decorators = [
413
- { type: Component, args: [{
414
- selector: 'aup-activity-container',
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",
416
- styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
417
- }] }
418
- ];
419
- /** @nocollapse */
420
- ActivityContainerComponent.ctorParameters = function () { return []; };
421
- ActivityContainerComponent.propDecorators = {
422
- dynamicHeight: [{ type: Input }],
423
- tabs: [{ type: ViewChild, args: ['tabs', { static: true },] }],
424
- activityOutlets: [{ type: ViewChildren, args: [ActivityOutletComponent,] }]
425
- };
426
- tslib_1.__decorate([
174
+ }, 75);
175
+ };
176
+ __decorate([
177
+ Input(),
178
+ __metadata("design:type", Object)
179
+ ], ActivityContainerComponent.prototype, "dynamicHeight", void 0);
180
+ __decorate([
181
+ ViewChild('tabs', { static: true }),
182
+ __metadata("design:type", MatTabGroup)
183
+ ], ActivityContainerComponent.prototype, "tabs", void 0);
184
+ __decorate([
185
+ ViewChildren(ActivityOutletComponent),
186
+ __metadata("design:type", QueryList)
187
+ ], ActivityContainerComponent.prototype, "activityOutlets", void 0);
188
+ __decorate([
427
189
  Trace(),
428
- tslib_1.__metadata("design:type", Function),
429
- tslib_1.__metadata("design:paramtypes", []),
430
- tslib_1.__metadata("design:returntype", void 0)
190
+ __metadata("design:type", Function),
191
+ __metadata("design:paramtypes", []),
192
+ __metadata("design:returntype", void 0)
431
193
  ], ActivityContainerComponent.prototype, "dispose", null);
194
+ ActivityContainerComponent = __decorate([
195
+ Component({
196
+ selector: 'aup-activity-container',
197
+ 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",
198
+ styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
199
+ }),
200
+ __metadata("design:paramtypes", [])
201
+ ], ActivityContainerComponent);
432
202
  return ActivityContainerComponent;
433
203
  }(AbstractInteractionContext));
434
204
  export { ActivityContainerComponent };
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;
444
- /**
445
- * @type {?}
446
- * @private
447
- */
448
- ActivityContainerComponent.prototype._identifier;
449
- /**
450
- * @type {?}
451
- * @private
452
- */
453
- ActivityContainerComponent.prototype._deferredCleanUp;
454
- /**
455
- * @type {?}
456
- * @private
457
- */
458
- ActivityContainerComponent.prototype.interactionServiceApi;
459
- /**
460
- * @type {?}
461
- * @private
462
- */
463
- ActivityContainerComponent.prototype.garbage;
464
- /**
465
- * @type {?}
466
- * @private
467
- */
468
- ActivityContainerComponent.prototype.syncSelectedTabTimeout;
469
- /* Skipping unhandled member: ;*/
470
- }
471
205
  //# sourceMappingURL=activity-container.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"activity-container.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/activity-container/activity-container.component.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAiB,SAAS,EAAE,KAAK,EAAU,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,MAAM,EAA6B,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAc,MAAM,gBAAgB,CAAC;AAC7G,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;;;;AAEtF;IAKyD,sDAA0B;IAqBjF;QAAA,YACE,iBAAO,SACR;QApBD,mBAAa,GAAG,KAAK,CAAC;QAQtB,kBAAY,GAAiC,EAAE,CAAC;QAOxC,aAAO,GAAG,IAAI,gBAAgB,EAAE,CAAC;;IAKzC,CAAC;;;;IAED,6CAAQ;;;IAAR;IACA,CAAC;;;;IAED,oDAAe;;;IAAf;QAAA,iBAGC;QAFO,IAAA,0BAA0C,EAAxC,gBAAK,EAAE,oBAAiC;QAChD,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,SAAS;;;QAAC,cAAM,OAAA,KAAI,CAAC,mBAAmB,EAAE,EAA1B,CAA0B,EAAC,CAAC;IAC1F,CAAC;;;;;;IAED,+CAAU;;;;;IAAV,UAAW,UAAkB,EAAE,GAA2B;QACxD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QACtC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC1B,MAAM,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GAAG,CAAC;QAClD,IAAI,CAAC,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC;QACnC,OAAO,aAAa,KAAK,QAAQ,CAAC;IACpC,CAAC;;;;;IAEO,sDAAiB;;;;IAAzB;QACE,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACjE,CAAC;IAED,WAAW;;;;;;IACH,8DAAyB;;;;;;IAAjC;QAAA,iBAQC;QAPC,IAAI,IAAI,CAAC,sBAAsB,EAAE;YAC/B,YAAY,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;SAC3C;QACD,IAAI,CAAC,sBAAsB,GAAG,UAAU;;;QAAC;YACvC,KAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;YACnC,KAAI,CAAC,2BAA2B,EAAE,CAAC;QACrC,CAAC,GAAE,EAAE,CAAC,CAAC;IACT,CAAC;;gBA3LF,SAAS,SAAC;oBACT,QAAQ,EAAE,wBAAwB;oBAClC,mVAAkD;;iBAEnD;;;;;gCAGE,KAAK;uBAGL,SAAS,SAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;kCAGlC,YAAY,SAAC,uBAAuB;;IAqDrC;QADC,KAAK,EAAE;;;;6DAMP;IAqHH,iCAAC;CAAA,AA5LD,CAKyD,0BAA0B,GAuLlF;SAvLY,0BAA0B;;;IAErC,mDACsB;;IAEtB,0CACkB;;IAElB,qDACmE;;IAEnE,kDAAgD;;;;;IAEhD,iDAA4B;;;;;IAC5B,sDAAuC;;;;;IAEvC,2DAAsD;;;;;IAEtD,6CAAyC;;;;;IACzC,4DAAoC","sourcesContent":["import { AfterViewInit, Component, Input, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { MatTabGroup } from '@angular/material';\nimport { assert, Constructable, Disposable, Dsl, GarbageCollector, Trace, ValueModel } from '@coolon/pectin';\nimport { lang } from '@coolon/typescript-utilities';\nimport _ from 'lodash';\nimport { AbstractInteractionContext } from '../../abstract-interaction-context';\nimport { Activity } from '../../activity';\nimport { ActivityRef } from '../../activity-ref';\nimport { InteractionService } from '../../services/interaction.service';\nimport { ActivityOutletComponent } from './activity-outlet/activity-outlet.component';\n\n@Component({\n selector: 'aup-activity-container',\n templateUrl: './activity-container.component.html',\n styleUrls: ['./activity-container.component.scss']\n})\nexport class ActivityContainerComponent<D, R, E> extends AbstractInteractionContext implements OnInit, AfterViewInit {\n\n @Input()\n dynamicHeight = false;\n\n @ViewChild('tabs', { static: true })\n tabs: MatTabGroup;\n\n @ViewChildren(ActivityOutletComponent)\n activityOutlets: QueryList<ActivityOutletComponent<any, any, any>>;\n\n activityTabs: ActivityRef<any, any, any>[] = [];\n\n private _identifier: string;\n private _deferredCleanUp: Promise<any>;\n\n private interactionServiceApi: InteractionService.Api;\n\n private garbage = new GarbageCollector();\n private syncSelectedTabTimeout: any;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n ngAfterViewInit(): void {\n const { chain, observe } = Dsl.disposeWith(this);\n observe.valuesFrom(this.tabs.animationDone).subscribe(() => this.onAnimationFinished());\n }\n\n initialise(identifier: string, api: InteractionService.Api) {\n assert.isFalsey(this.isInitialised());\n assert.notNil(identifier);\n assert.notNil(api);\n this._identifier = identifier;\n this.interactionServiceApi = api;\n }\n\n get identifier() {\n return this._identifier;\n }\n\n isInitialised() {\n return !!this.identifier;\n }\n\n /**\n * Returns true if an activity is currently running.\n */\n isActive(): boolean {\n return this.getActiveActivityCount() > 0;\n }\n\n registerDisposable<T extends Disposable>(disposable: T): T {\n return this.garbage.registerDisposable(disposable);\n }\n\n @Trace()\n dispose(): void {\n // TODO: think about auto cancelling any outstanding activity on dispose.\n // See NavigationState.Navigating for a use-case.\n assert.isFalsey(this.isActive());\n this.garbage.dispose();\n }\n\n getActiveActivityRef(): ActivityRef<any, any, any> {\n if (!this.isActive()) {\n lang.illegalState('no activity in progress');\n }\n return _.findLast(this.activityTabs, tab => !tab.isComplete());\n }\n\n /**\n * Cancels the current activity and returns true the context is no longer active, false if\n * there is still another activity running.\n */\n // @Trace()\n async cancelActiveActivity(): Promise<boolean> {\n const activity = this.getActiveActivityRef();\n activity.cancel();\n if (this.isCleaningUp()) {\n return this.waitForInteractionContextCleanupToFinish();\n } else {\n return !this.isActive();\n }\n }\n\n // TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.\n // @Trace()\n protected createAndLaunchActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data: D1, disableClose: boolean): Promise<R1> {\n assert.isTruthy(this.isInitialised()); // make sure we've been initialised\n const activityRef = new ActivityRef<D1, R1, E1>(activityType, data, () => {\n const activeActivityCount = this.getActiveActivityCount() > 0;\n if (activeActivityCount) {\n this.triggerTabSynchronisation();\n } else {\n this.finishAndStartCleanup();\n }\n });\n this.launchActivity(activityRef);\n // if this is the first activity let the interaction service know.\n if (this.activityTabs.length === 1) {\n // console.log('Now active!!!');\n this.interactionServiceApi.notifyActive(this);\n }\n return activityRef.activityResult;\n }\n\n private getActiveActivityCount(): number {\n return this.activityTabs.filter(ref => !ref.isComplete()).length;\n }\n\n /**\n * Checks if this interaction context has finished an is in the process of waiting\n * for all the infrastructure (including route updates) to be completed.\n */\n isCleaningUp(): boolean {\n return !!this._deferredCleanUp;\n }\n\n async waitForInteractionContextCleanupToFinish(): Promise<any> {\n return this._deferredCleanUp ?\n this._deferredCleanUp :\n true;\n }\n\n // @Trace()\n private finishAndStartCleanup(): void {\n if (!this._deferredCleanUp) {\n const promise = this.interactionServiceApi.notifyFinished(this);\n this._deferredCleanUp = promise\n .finally(() => {\n this._deferredCleanUp = null;\n });\n }\n }\n\n// @Trace()\n launchActivity<D1, R1, E1>(activityRef: ActivityRef<D1, R1, E1>) {\n const cleanedTabs = this.activityTabs.filter(tab => !tab.isComplete());\n this.activityTabs = cleanedTabs.concat(activityRef);\n this.tabs.selectedIndex = this.activityTabs.length;\n }\n\n activityIndex(index: number, activityRef: ActivityRef<any, any, any>) {\n return index;\n };\n\n\n // @Trace()\n private onAnimationFinished() {\n this.getSelectedOutlet().component.onActivityReady();\n this.activityTabs = this.activityTabs.filter(tab => !tab.isComplete());\n }\n\n /**\n * Synchronises the selected tab index. Returns true if there was no change to the selected index.\n */\n // @Trace()\n private synchroniseSelectedTabIndex(): boolean {\n const previousIndex = this.tabs.selectedIndex;\n const newIndex = this.getActiveActivityCount() - 1;\n this.tabs.selectedIndex = newIndex;\n return previousIndex === newIndex;\n }\n\n private getSelectedOutlet() {\n return this.activityOutlets.toArray()[this.tabs.selectedIndex];\n }\n\n // @Trace()\n private triggerTabSynchronisation() {\n if (this.syncSelectedTabTimeout) {\n clearTimeout(this.syncSelectedTabTimeout);\n }\n this.syncSelectedTabTimeout = setTimeout(() => {\n this.syncSelectedTabTimeout = null;\n this.synchroniseSelectedTabIndex();\n }, 75);\n }\n}\n"]}
1
+ {"version":3,"file":"activity-container.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/activity-container/activity-container.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAiB,SAAS,EAAE,KAAK,EAAU,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,MAAM,EAA6B,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAc,MAAM,gBAAgB,CAAC;AAC7G,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAOtF;IAAyD,8CAA0B;IAqBjF;QAAA,YACE,iBAAO,SACR;QApBD,mBAAa,GAAG,KAAK,CAAC;Q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SAAS,CAAC;YACT,QAAQ,EAAE,wBAAwB;YAClC,mVAAkD;;SAEnD,CAAC;;OACW,0BAA0B,CAuLtC;IAAD,iCAAC;CAAA,AAvLD,CAAyD,0BAA0B,GAuLlF;SAvLY,0BAA0B","sourcesContent":["import { AfterViewInit, Component, Input, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { MatTabGroup } from '@angular/material/tabs';\nimport { assert, Constructable, Disposable, Dsl, GarbageCollector, Trace, ValueModel } from '@coolon/pectin';\nimport { lang } from '@coolon/typescript-utilities';\nimport _ from 'lodash';\nimport { AbstractInteractionContext } from '../../abstract-interaction-context';\nimport { Activity } from '../../activity';\nimport { ActivityRef } from '../../activity-ref';\nimport { InteractionService } from '../../services/interaction.service';\nimport { ActivityOutletComponent } from './activity-outlet/activity-outlet.component';\n\n@Component({\n selector: 'aup-activity-container',\n templateUrl: './activity-container.component.html',\n styleUrls: ['./activity-container.component.scss']\n})\nexport class ActivityContainerComponent<D, R, E> extends AbstractInteractionContext implements OnInit, AfterViewInit {\n\n @Input()\n dynamicHeight = false;\n\n @ViewChild('tabs', { static: true })\n tabs: MatTabGroup;\n\n @ViewChildren(ActivityOutletComponent)\n activityOutlets: QueryList<ActivityOutletComponent<any, any, any>>;\n\n activityTabs: ActivityRef<any, any, any>[] = [];\n\n private _identifier: string;\n private _deferredCleanUp: Promise<any>;\n\n private interactionServiceApi: InteractionService.Api;\n\n private garbage = new GarbageCollector();\n private syncSelectedTabTimeout: any;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n ngAfterViewInit(): void {\n const { chain, observe } = Dsl.disposeWith(this);\n observe.valuesFrom(this.tabs.animationDone).subscribe(() => this.onAnimationFinished());\n }\n\n initialise(identifier: string, api: InteractionService.Api) {\n assert.isFalsey(this.isInitialised());\n assert.notNil(identifier);\n assert.notNil(api);\n this._identifier = identifier;\n this.interactionServiceApi = api;\n }\n\n get identifier() {\n return this._identifier;\n }\n\n isInitialised() {\n return !!this.identifier;\n }\n\n /**\n * Returns true if an activity is currently running.\n */\n isActive(): boolean {\n return this.getActiveActivityCount() > 0;\n }\n\n registerDisposable<T extends Disposable>(disposable: T): T {\n return this.garbage.registerDisposable(disposable);\n }\n\n @Trace()\n dispose(): void {\n // TODO: think about auto cancelling any outstanding activity on dispose.\n // See NavigationState.Navigating for a use-case.\n assert.isFalsey(this.isActive());\n this.garbage.dispose();\n }\n\n getActiveActivityRef(): ActivityRef<any, any, any> {\n if (!this.isActive()) {\n lang.illegalState('no activity in progress');\n }\n return _.findLast(this.activityTabs, tab => !tab.isComplete());\n }\n\n /**\n * Cancels the current activity and returns true the context is no longer active, false if\n * there is still another activity running.\n */\n // @Trace()\n async cancelActiveActivity(): Promise<boolean> {\n const activity = this.getActiveActivityRef();\n activity.cancel();\n if (this.isCleaningUp()) {\n return this.waitForInteractionContextCleanupToFinish();\n } else {\n return !this.isActive();\n }\n }\n\n // TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.\n // @Trace()\n protected createAndLaunchActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data: D1, disableClose: boolean): Promise<R1> {\n assert.isTruthy(this.isInitialised()); // make sure we've been initialised\n const activityRef = new ActivityRef<D1, R1, E1>(activityType, data, () => {\n const activeActivityCount = this.getActiveActivityCount() > 0;\n if (activeActivityCount) {\n this.triggerTabSynchronisation();\n } else {\n this.finishAndStartCleanup();\n }\n });\n this.launchActivity(activityRef);\n // if this is the first activity let the interaction service know.\n if (this.activityTabs.length === 1) {\n // console.log('Now active!!!');\n this.interactionServiceApi.notifyActive(this);\n }\n return activityRef.activityResult;\n }\n\n private getActiveActivityCount(): number {\n return this.activityTabs.filter(ref => !ref.isComplete()).length;\n }\n\n /**\n * Checks if this interaction context has finished an is in the process of waiting\n * for all the infrastructure (including route updates) to be completed.\n */\n isCleaningUp(): boolean {\n return !!this._deferredCleanUp;\n }\n\n async waitForInteractionContextCleanupToFinish(): Promise<any> {\n return this._deferredCleanUp ?\n this._deferredCleanUp :\n true;\n }\n\n // @Trace()\n private finishAndStartCleanup(): void {\n if (!this._deferredCleanUp) {\n const promise = this.interactionServiceApi.notifyFinished(this);\n this._deferredCleanUp = promise\n .finally(() => {\n this._deferredCleanUp = null;\n });\n }\n }\n\n// @Trace()\n launchActivity<D1, R1, E1>(activityRef: ActivityRef<D1, R1, E1>) {\n const cleanedTabs = this.activityTabs.filter(tab => !tab.isComplete());\n this.activityTabs = cleanedTabs.concat(activityRef);\n this.tabs.selectedIndex = this.activityTabs.length;\n }\n\n activityIndex(index: number, activityRef: ActivityRef<any, any, any>) {\n return index;\n };\n\n\n // @Trace()\n private onAnimationFinished() {\n this.getSelectedOutlet().component.onActivityReady();\n this.activityTabs = this.activityTabs.filter(tab => !tab.isComplete());\n }\n\n /**\n * Synchronises the selected tab index. Returns true if there was no change to the selected index.\n */\n // @Trace()\n private synchroniseSelectedTabIndex(): boolean {\n const previousIndex = this.tabs.selectedIndex;\n const newIndex = this.getActiveActivityCount() - 1;\n this.tabs.selectedIndex = newIndex;\n return previousIndex === newIndex;\n }\n\n private getSelectedOutlet() {\n return this.activityOutlets.toArray()[this.tabs.selectedIndex];\n }\n\n // @Trace()\n private triggerTabSynchronisation() {\n if (this.syncSelectedTabTimeout) {\n clearTimeout(this.syncSelectedTabTimeout);\n }\n this.syncSelectedTabTimeout = setTimeout(() => {\n this.syncSelectedTabTimeout = null;\n this.synchroniseSelectedTabIndex();\n }, 75);\n }\n}\n"]}