@coolon/angular-ui-powerups 0.0.126 → 0.0.129

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 +3745 -3019
  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 +307 -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 +407 -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 +2637 -2266
  259. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  260. package/fesm5/coolon-angular-ui-powerups.js +3694 -2980
  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,68 +3,86 @@
3
3
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
4
  */
5
5
  import * as tslib_1 from "tslib";
6
- import { lang, MutableValueModel } from '@coolon/pectin';
6
+ import { GarbageCollector, lang } from '@coolon/pectin';
7
7
  import { assert } from '@coolon/typescript-utilities';
8
+ import { AbstractInteractionContext } from '../../abstract-interaction-context';
8
9
  import { ActivityContainerComponent } from '../../components/activity-container/activity-container.component';
9
- import { InteractionContextBase } from '../../interaction-context-base';
10
10
  var DialogInteractionContext = /** @class */ (function (_super) {
11
11
  tslib_1.__extends(DialogInteractionContext, _super);
12
- function DialogInteractionContext(dialogService, config) {
12
+ function DialogInteractionContext(identifier, api, dialogService, config) {
13
13
  var _this = _super.call(this) || this;
14
+ _this.identifier = identifier;
15
+ _this.api = api;
14
16
  _this.dialogService = dialogService;
15
17
  _this.config = config;
16
- _this._activeModel = new MutableValueModel(false);
18
+ _this.garbage = new GarbageCollector();
17
19
  assert.notNil(dialogService);
18
- _this.onDispose((/**
19
- * @return {?}
20
- */
21
- function () {
22
- if (_this.isActive()) {
23
- lang.illegalState('Dispose called while active.');
24
- }
25
- }));
26
20
  return _this;
27
21
  }
28
- Object.defineProperty(DialogInteractionContext.prototype, "active", {
29
- get: /**
30
- * @return {?}
31
- */
32
- function () {
33
- return this._activeModel.readonly;
34
- },
35
- enumerable: true,
36
- configurable: true
37
- });
22
+ /**
23
+ * @return {?}
24
+ */
25
+ DialogInteractionContext.prototype.cancelActiveActivity = /**
26
+ * @return {?}
27
+ */
28
+ function () {
29
+ return this.activityContainer.cancelActiveActivity();
30
+ };
31
+ /**
32
+ * @return {?}
33
+ */
34
+ DialogInteractionContext.prototype.dispose = /**
35
+ * @return {?}
36
+ */
37
+ function () {
38
+ if (this.isActive()) {
39
+ lang.illegalState('Dispose called while active.');
40
+ }
41
+ this.garbage.dispose();
42
+ };
43
+ /**
44
+ * @template T
45
+ * @param {?} disposable
46
+ * @return {?}
47
+ */
48
+ DialogInteractionContext.prototype.registerDisposable = /**
49
+ * @template T
50
+ * @param {?} disposable
51
+ * @return {?}
52
+ */
53
+ function (disposable) {
54
+ return this.garbage.registerDisposable(disposable);
55
+ };
56
+ /**
57
+ * @return {?}
58
+ */
59
+ DialogInteractionContext.prototype.isActive = /**
60
+ * @return {?}
61
+ */
62
+ function () {
63
+ return !!this.activityContainer && this.activityContainer.isActive();
64
+ };
38
65
  /**
39
66
  * @protected
40
67
  * @template D, R, E
41
68
  * @param {?} activityType
42
69
  * @param {?} data
43
- * @param {?=} disableClose
70
+ * @param {?} disableClose
44
71
  * @return {?}
45
72
  */
46
- DialogInteractionContext.prototype._startActivity = /**
73
+ DialogInteractionContext.prototype.createAndLaunchActivity = /**
47
74
  * @protected
48
75
  * @template D, R, E
49
76
  * @param {?} activityType
50
77
  * @param {?} data
51
- * @param {?=} disableClose
78
+ * @param {?} disableClose
52
79
  * @return {?}
53
80
  */
54
81
  function (activityType, data, disableClose) {
55
82
  var _this = this;
56
- if (disableClose === void 0) { disableClose = true; }
57
- if (this.isActive()) {
58
- lang.illegalState("Activity already in progress: " + this.activityList.value.map((/**
59
- * @param {?} a
60
- * @return {?}
61
- */
62
- function (a) { return a.constructor.name; })).join(', '));
63
- }
64
- this._activeModel.value = true;
83
+ assert.isNil(this._currentActivityRef);
65
84
  /** @type {?} */
66
85
  var config = tslib_1.__assign({}, this.config, {
67
- data: data,
68
86
  disableClose: disableClose,
69
87
  panelClass: 'dialog-interaction-context'
70
88
  });
@@ -72,93 +90,64 @@ var DialogInteractionContext = /** @class */ (function (_super) {
72
90
  var self = this;
73
91
  /** @type {?} */
74
92
  var matDialogRef = (/** @type {?} */ (this.dialogService.open(ActivityContainerComponent, config)));
75
- return new Promise((/**
76
- * @param {?} resolve
77
- * @param {?} reject
93
+ /** @type {?} */
94
+ var activityContainer = this.activityContainer = matDialogRef.componentInstance;
95
+ this.activityContainer.initialise(this.identifier, this.api);
96
+ /** @type {?} */
97
+ var activityResult = this.activityContainer.startActivity(activityType, data);
98
+ activityResult.finally((/**
78
99
  * @return {?}
79
100
  */
80
- function (resolve, reject) {
81
- /** @type {?} */
82
- var activityContainer = matDialogRef.componentInstance;
83
- self.safelyUpdateActivityListDelegate(activityContainer.activityList);
84
- activityContainer.initialActivityOutletContext = {
85
- activityClass: activityType,
86
- activityData: data,
87
- onDone: /**
88
- * @param {?} result
89
- * @return {?}
90
- */
91
- function (result) {
92
- resolve(result);
93
- matDialogRef.close(true); // return true to let the after close listener know we've already handled it.
94
- },
95
- onCancel: /**
96
- * @param {?} error
97
- * @return {?}
98
- */
99
- function (error) {
100
- reject(error);
101
- matDialogRef.close(true); // return true to let the after close listener know we've already handled it.
102
- }
103
- };
104
- // we need to check if our onDone/onCancel methods above we called or if we were
105
- // closed by the user clicking the backdrop. If the later then we need to reject
106
- // our promise.
107
- matDialogRef.afterClosed().subscribe((/**
108
- * @param {?} promiseAlreadyFinished
109
- * @return {?}
110
- */
111
- function (promiseAlreadyFinished) {
112
- if (!promiseAlreadyFinished) {
113
- reject('auto-closed');
114
- }
115
- }));
116
- matDialogRef.updateSize();
117
- matDialogRef.afterOpened().subscribe((/**
118
- * @param {?} promiseAlreadyFinished
119
- * @return {?}
120
- */
121
- function (promiseAlreadyFinished) {
122
- matDialogRef.updateSize();
123
- }));
124
- })).finally((/**
101
+ function () { return matDialogRef.close(); }));
102
+ // we need to check if our onDone/onCancel methods above we called or if we were
103
+ // closed by the user clicking the backdrop. If the later then we need to cancel our
104
+ // activity.
105
+ matDialogRef.afterClosed().subscribe((/**
106
+ * @param {?} promiseAlreadyFinished
125
107
  * @return {?}
126
108
  */
127
- function () {
128
- self.safelyUpdateActivityListDelegate(null);
129
- _this._activeModel.value = false;
109
+ function (promiseAlreadyFinished) {
110
+ if (activityContainer.isActive()) {
111
+ activityContainer.cancelActiveActivity();
112
+ }
113
+ _this.activityContainer = null;
130
114
  }));
131
- };
132
- /**
133
- * Updates teh delegate on the next tick to avoid modifying state during the current change detection cycle.
134
- * @param delegate
135
- */
136
- /**
137
- * Updates teh delegate on the next tick to avoid modifying state during the current change detection cycle.
138
- * @param {?} delegate
139
- * @return {?}
140
- */
141
- DialogInteractionContext.prototype.safelyUpdateActivityListDelegate = /**
142
- * Updates teh delegate on the next tick to avoid modifying state during the current change detection cycle.
143
- * @param {?} delegate
144
- * @return {?}
145
- */
146
- function (delegate) {
147
- var _this = this;
148
- setTimeout((/**
115
+ matDialogRef.updateSize();
116
+ matDialogRef.afterOpened().subscribe((/**
117
+ * @param {?} promiseAlreadyFinished
149
118
  * @return {?}
150
119
  */
151
- function () { return _this.setActivityList(delegate); }));
120
+ function (promiseAlreadyFinished) {
121
+ matDialogRef.updateSize();
122
+ }));
123
+ return activityResult;
152
124
  };
153
125
  return DialogInteractionContext;
154
- }(InteractionContextBase));
126
+ }(AbstractInteractionContext));
155
127
  export { DialogInteractionContext };
156
128
  if (false) {
157
129
  /**
158
130
  * @type {?}
159
131
  * @private
160
132
  */
161
- DialogInteractionContext.prototype._activeModel;
133
+ DialogInteractionContext.prototype.garbage;
134
+ /**
135
+ * @type {?}
136
+ * @private
137
+ */
138
+ DialogInteractionContext.prototype._currentActivityRef;
139
+ /**
140
+ * @type {?}
141
+ * @private
142
+ */
143
+ DialogInteractionContext.prototype.activityContainer;
144
+ /** @type {?} */
145
+ DialogInteractionContext.prototype.identifier;
146
+ /**
147
+ * @type {?}
148
+ * @private
149
+ */
150
+ DialogInteractionContext.prototype.api;
162
151
  /**
163
152
  * @type {?}
164
153
  * @private
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-interaction-context.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.ts"],"names":[],"mappings":";;;;;AAEA,OAAO,EAAiB,IAAI,EAAa,iBAAiB,EAAc,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE;IAA8C,oDAAsB;IAIlE,kCAA6B,aAAwB,EAAW,MAA4B;QAA5F,YACE,iBAAO,SAOR;QAR4B,mBAAa,GAAb,aAAa,CAAW;QAAW,YAAM,GAAN,MAAM,CAAsB;QAF3E,kBAAY,GAAG,IAAI,iBAAiB,CAAU,KAAK,CAAC,CAAC;QAIpE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7B,KAAI,CAAC,SAAS;;;QAAC;YACb,IAAI,KAAI,CAAC,QAAQ,EAAE,EAAE;gBACnB,IAAI,CAAC,YAAY,CAAC,8BAA8B,CAAC,CAAC;aACnD;QACH,CAAC,EAAC,CAAC;;IACL,CAAC;IAED,sBAAI,4CAAM;;;;QAAV;YACE,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC;QACpC,CAAC;;;OAAA;;;;;;;;;IAES,iDAAc;;;;;;;;IAAxB,UAAkC,YAA8C,EAA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E,CAAC,SAAS;;;;YAAC,UAAA,sBAAsB;gBACzD,IAAI,CAAC,sBAAsB,EAAE;oBAC3B,MAAM,CAAC,aAAa,CAAC,CAAC;iBACvB;YACH,CAAC,EAAC,CAAC;YACH,YAAY,CAAC,UAAU,EAAE,CAAC;YAC1B,YAAY,CAAC,WAAW,EAAE,CAAC,SAAS;;;;YAAC,UAAA,sBAAsB;gBACzD,YAAY,CAAC,UAAU,EAAE,CAAC;YAC5B,CAAC,EAAC,CAAC;QACL,CAAC,EAAC,CAAC,OAAO;;;QAAC;YACT,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,CAAC;YAC5C,KAAI,CAAC,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC;QAClC,CAAC,EAAC,CAAC;IACL,CAAC;IAED;;;OAGG;;;;;;IACH,mEAAgC;;;;;IAAhC,UAAiC,QAAuC;QAAxE,iBAEC;QADC,UAAU;;;QAAC,cAAM,OAAA,KAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,EAA9B,CAA8B,EAAC,CAAC;IACnD,CAAC;IAEH,+BAAC;AAAD,CAAC,AA5ED,CAA8C,sBAAsB,GA4EnE;;;;;;;IA1EC,gDAAsE;;;;;IAE1D,iDAAyC;;IAAE,0CAAqC","sourcesContent":["import { MatDialog, MatDialogRef } from '@angular/material';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { Constructable, lang, ListModel, MutableValueModel, ValueModel } from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\nimport { Activity } from '../../activity';\nimport { ActivityContainerComponent } from '../../components/activity-container/activity-container.component';\nimport { InteractionContextBase } from '../../interaction-context-base';\n\nexport class DialogInteractionContext extends InteractionContextBase {\n\n private readonly _activeModel = new MutableValueModel<boolean>(false);\n\n constructor(private readonly dialogService: MatDialog, readonly config: MatDialogConfig<any>) {\n super();\n assert.notNil(dialogService);\n this.onDispose(() => {\n if (this.isActive()) {\n lang.illegalState('Dispose called while active.');\n }\n });\n }\n\n get active(): ValueModel<boolean> {\n return this._activeModel.readonly;\n }\n\n protected _startActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data: D, disableClose: boolean = true) {\n if (this.isActive()) {\n lang.illegalState(`Activity already in progress: ${this.activityList.value.map(a => a.constructor.name).join(', ')}`);\n }\n this._activeModel.value = true;\n const config: MatDialogConfig = {\n ...this.config,\n ...{\n data,\n disableClose,\n panelClass: 'dialog-interaction-context'\n }\n };\n\n const self = this;\n const matDialogRef = this.dialogService.open(ActivityContainerComponent, config) as MatDialogRef<ActivityContainerComponent<D, R, E>>;\n return new Promise<R>((resolve, reject) => {\n const activityContainer = matDialogRef.componentInstance;\n self.safelyUpdateActivityListDelegate(activityContainer.activityList);\n\n activityContainer.initialActivityOutletContext = {\n activityClass: activityType,\n activityData: data,\n onDone(result) {\n resolve(result);\n matDialogRef.close(true); // return true to let the after close listener know we've already handled it.\n },\n onCancel(error) {\n reject(error);\n matDialogRef.close(true); // return true to let the after close listener know we've already handled it.\n }\n };\n // we need to check if our onDone/onCancel methods above we called or if we were\n // closed by the user clicking the backdrop. If the later then we need to reject\n // our promise.\n matDialogRef.afterClosed().subscribe(promiseAlreadyFinished => {\n if (!promiseAlreadyFinished) {\n reject('auto-closed');\n }\n });\n matDialogRef.updateSize();\n matDialogRef.afterOpened().subscribe(promiseAlreadyFinished => {\n matDialogRef.updateSize();\n });\n }).finally(() => {\n self.safelyUpdateActivityListDelegate(null);\n this._activeModel.value = false;\n });\n }\n\n /**\n * Updates teh delegate on the next tick to avoid modifying state during the current change detection cycle.\n * @param delegate\n */\n safelyUpdateActivityListDelegate(delegate: ListModel<Activity<any, any>>) {\n setTimeout(() => this.setActivityList(delegate));\n }\n\n}\n"]}
1
+ {"version":3,"file":"dialog-interaction-context.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.ts"],"names":[],"mappings":";;;;;AAEA,OAAO,EAAmD,gBAAgB,EAAE,IAAI,EAAS,MA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import { MatDialogConfig, MatDialogRef } from '@angular/material/dialog';\nimport { Constructable, DelegatingValueModel, Disposable, GarbageCollector, lang, Trace } from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\nimport { AbstractInteractionContext } from '../../abstract-interaction-context';\nimport { Activity } from '../../activity';\nimport { ActivityRef } from '../../activity-ref';\nimport { ActivityContainerComponent } from '../../components/activity-container/activity-container.component';\nimport { InteractionService } from '../interaction.service';\n\nexport class DialogInteractionContext extends AbstractInteractionContext {\n\n private garbage = new GarbageCollector();\n private _currentActivityRef: ActivityRef<any, any, any>;\n private activityContainer: ActivityContainerComponent<any, any, any>;\n\n constructor(readonly identifier: string,\n private readonly api: InteractionService.Api,\n private readonly dialogService: MatDialog,\n readonly config: MatDialogConfig<any>) {\n super();\n assert.notNil(dialogService);\n }\n\n cancelActiveActivity(): Promise<boolean> {\n return this.activityContainer.cancelActiveActivity();\n }\n\n dispose(): void {\n if (this.isActive()) {\n lang.illegalState('Dispose called while active.');\n }\n this.garbage.dispose();\n }\n\n registerDisposable<T extends Disposable>(disposable: T): T {\n return this.garbage.registerDisposable(disposable);\n }\n\n isActive(): boolean {\n return !!this.activityContainer && this.activityContainer.isActive();\n }\n\n protected createAndLaunchActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data: D, disableClose: boolean): Promise<R> {\n assert.isNil(this._currentActivityRef);\n\n const config: MatDialogConfig = {\n ...this.config,\n ...{\n disableClose,\n panelClass: 'dialog-interaction-context'\n }\n };\n const self = this;\n const matDialogRef = this.dialogService.open(ActivityContainerComponent, config) as MatDialogRef<ActivityContainerComponent<D, R, E>>;\n const activityContainer = this.activityContainer = matDialogRef.componentInstance;\n this.activityContainer.initialise(this.identifier, this.api);\n const activityResult = this.activityContainer.startActivity(activityType, data);\n\n activityResult.finally(() => matDialogRef.close());\n // we need to check if our onDone/onCancel methods above we called or if we were\n // closed by the user clicking the backdrop. If the later then we need to cancel our\n // activity.\n matDialogRef.afterClosed().subscribe(promiseAlreadyFinished => {\n if (activityContainer.isActive()) {\n activityContainer.cancelActiveActivity();\n }\n this.activityContainer = null;\n });\n matDialogRef.updateSize();\n matDialogRef.afterOpened().subscribe(promiseAlreadyFinished => {\n matDialogRef.updateSize();\n });\n\n return activityResult;\n }\n}\n"]}
@@ -20,8 +20,10 @@ export { ModalInteractionContextFactory };
20
20
  if (false) {
21
21
  /**
22
22
  * @abstract
23
+ * @param {?} identifier
24
+ * @param {?} api
23
25
  * @return {?}
24
26
  */
25
- ModalInteractionContextFactory.prototype.createInteractionContext = function () { };
27
+ ModalInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) { };
26
28
  }
27
29
  //# sourceMappingURL=modal-interaction-context.factory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal-interaction-context.factory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/services/modal-interaction-context.factory.ts"],"names":[],"mappings":";;;;;;;AAEA;;;;IAAA;IAGA,CAAC;IAAD,qCAAC;AAAD,CAAC,AAHD,IAGC;;;;;;;;;;IADC,oFAAwD","sourcesContent":["import { InteractionContext } from '../interaction-context';\n\nexport abstract class ModalInteractionContextFactory {\n\n abstract createInteractionContext(): InteractionContext;\n}\n"]}
1
+ {"version":3,"file":"modal-interaction-context.factory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/services/modal-interaction-context.factory.ts"],"names":[],"mappings":";;;;;;;AAGA;;;;IAAA;IAGA,CAAC;IAAD,qCAAC;AAAD,CAAC,AAHD,IAGC;;;;;;;;;;;;IADC,mGAAuG","sourcesContent":["import { InteractionContext } from '../interaction-context';\nimport { InteractionService } from './interaction.service';\n\nexport abstract class ModalInteractionContextFactory {\n\n abstract createInteractionContext(identifier: string, api: InteractionService.Api): InteractionContext;\n}\n"]}
@@ -4,17 +4,19 @@
4
4
  */
5
5
  import * as tslib_1 from "tslib";
6
6
  import { Component, Input } from '@angular/core';
7
- import { Command, Dsl, ListModel, StoreInListModel, StoreInValueModel, UseDelegate, ValueModel } from '@coolon/pectin';
7
+ import { Command, DelegatingValueModel, Dsl, ListModel, StoreInListModel, StoreInValueModel, UseDelegate, ValueModel } from '@coolon/pectin';
8
8
  import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
9
9
  import { DisposableComponent } from '../../components/disposable-component';
10
10
  import { PlaceComponent } from '../place-component';
11
11
  import { PlaceDefinition } from '../place-definition';
12
+ import { PlaceRouter } from '../place-router';
12
13
  import { Visit } from '../visit';
13
14
  import { PlaceOutletComponent } from './place-outlet/place-outlet.component';
14
15
  var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
15
16
  tslib_1.__extends(AbstractPlaceNavigationComponent, _super);
16
- function AbstractPlaceNavigationComponent() {
17
+ function AbstractPlaceNavigationComponent(placeRouter) {
17
18
  var _this = _super.call(this) || this;
19
+ _this._activePlaceComponent = new DelegatingValueModel();
18
20
  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;
19
21
  _this.placeDefinitions = chain(_this.placesModel).map((/**
20
22
  * @param {?} c
@@ -28,11 +30,20 @@ var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
28
30
  function (placeDefinition) {
29
31
  _this.placeOutlet.navigate(new Visit(placeDefinition));
30
32
  }));
31
- _this.activePlaceDefinition = chain(_this.placeOutletModel).pullValueModel((/**
32
- * @param {?} o
33
+ when.valueOf(_this.placeOutletModel).changes((/**
34
+ * @param {?} outlet
33
35
  * @return {?}
34
36
  */
35
- function (o) { return o.activePlaceModel; })).pluck("placeDefinition");
37
+ function (outlet) {
38
+ // NOTE: this updates during a change cycle and causes our isActiveMethod to return 2 different
39
+ // values in the one change detection cycle. So instead we delay the update to a different
40
+ // tick.
41
+ setTimeout((/**
42
+ * @return {?}
43
+ */
44
+ function () { return _this._activePlaceComponent.setDelegate(outlet ? outlet.activePlaceModel : null); }));
45
+ }));
46
+ _this.activePlaceDefinition = chain(_this._activePlaceComponent).pluck('placeDefinition');
36
47
  return _this;
37
48
  }
38
49
  /**
@@ -86,7 +97,9 @@ var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
86
97
  }] }
87
98
  ];
88
99
  /** @nocollapse */
89
- AbstractPlaceNavigationComponent.ctorParameters = function () { return []; };
100
+ AbstractPlaceNavigationComponent.ctorParameters = function () { return [
101
+ { type: PlaceRouter }
102
+ ]; };
90
103
  AbstractPlaceNavigationComponent.propDecorators = {
91
104
  places: [{ type: Input }],
92
105
  placesModel: [{ type: Input }],
@@ -132,6 +145,11 @@ if (false) {
132
145
  /** @type {?} */
133
146
  AbstractPlaceNavigationComponent.prototype.commandFactory;
134
147
  /** @type {?} */
148
+ AbstractPlaceNavigationComponent.prototype._activePlaceComponent;
149
+ /**
150
+ * @type {?}
151
+ * @private
152
+ */
135
153
  AbstractPlaceNavigationComponent.prototype.activePlaceDefinition;
136
154
  }
137
155
  //# sourceMappingURL=abstract-place-navigation.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-place-navigation.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/components/abstract-place-navigation.component.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AAEzD,OAAO,EACL,OAAO,EAEP,GAAG,EACH,SAAS,EAET,gBAAgB,EAAE,iBAAiB,EACnC,WAAW,EACX,UAAU,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,kDAAkD,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC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,CAAA;YACzG,IAAI;;;YAAE,cAAM,OAAA,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,EAAjF,CAAiF,CAAA;SAC9F,CAAC;IACJ,CAAC;;;;;IAED,mDAAQ;;;;IAAR,UAAS,KAAqB;QAC5B,OAAO,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC;;;;IAED,mDAAQ;;;IAAR;IACA,CAAC;;gBAhDF,SAAS,SAAC;oBACT,QAAQ,EAAE,EAAE;iBACb;;;;;yBAGE,KAAK;8BAGL,KAAK;8BAIL,KAAK;mCAGL,KAAK;;IATN;QADU,gBAAgB,CAAC,aAAa,CAAC;;oEACD;IAGxC;QADU,WAAW,EAAE;0CACV,SAAS;yEAAgC;IAItD;QADU,iBAAiB,CAAC,kBAAkB,CAAC;0CAClC,oBAAoB;yEAAC;IAGlC;QADU,WAAW,EAAE;0CACL,UAAU;8EAAuB;IAkBnD;QADC,OAAO,EAAE;;iDACO,eAAe;;kEAO/B;IASH,uCAAC;CAAA,AAlDD,CAGsD,mBAAmB,GA+CxE;SA/CY,gCAAgC;;;IAE3C,kDACwC;;IAExC,uDACsD;;IAGtD,uDACkC;;IAElC,4DACmD;;IAEnD,4DAA2D;;IAE3D,0DAAgE;;IAChE,iEAAiE","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport {\n Command,\n Constructable,\n Dsl,\n ListModel,\n ListModelChain,\n StoreInListModel, StoreInValueModel,\n UseDelegate,\n ValueModel, ValueModelChain\n} from '@coolon/pectin';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';\nimport { DisposableComponent } from '../../components/disposable-component';\nimport { NavItem } from '../nav-item';\nimport { PlaceComponent } from '../place-component';\nimport { PlaceDefinition } from '../place-definition';\nimport { Visit } from '../visit';\nimport { PlaceOutletComponent } from './place-outlet/place-outlet.component';\n\n@Component({\n template: ''\n})\nexport class AbstractPlaceNavigationComponent extends DisposableComponent implements OnInit {\n\n @Input() @StoreInListModel('placesModel')\n places: Constructable<PlaceComponent>[];\n\n @Input() @UseDelegate()\n placesModel: ListModel<Constructable<PlaceComponent>>;\n\n\n @Input() @StoreInValueModel('placeOutletModel')\n placeOutlet: PlaceOutletComponent;\n\n @Input() @UseDelegate()\n placeOutletModel: ValueModel<PlaceOutletComponent>;\n\n readonly placeDefinitions: ListModelChain<PlaceDefinition>;\n\n readonly commandFactory: Command.Factory<PlaceDefinition, void>;\n readonly activePlaceDefinition: ValueModelChain<PlaceDefinition>;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.placeDefinitions = chain(this.placesModel).map(c => PlaceComponent.getDefinition(c));\n this.commandFactory = Command.createFactory((placeDefinition:PlaceDefinition) => {\n this.placeOutlet.navigate(new Visit(placeDefinition))\n });\n this.activePlaceDefinition = chain(this.placeOutletModel).pullValueModel(o => o.activePlaceModel).pluck(\"placeDefinition\")\n }\n\n @Memoize()\n getNav(placeDef: PlaceDefinition): NavItem {\n const navItem = placeDef.getPlaceData('nav') as NavItem;\n return {\n title: () => navItem ? navItem.title() : placeDef.searchPlaceData(['navTitle', 'title']),\n tooltip: () => navItem && navItem.tooltip ? navItem.tooltip() : placeDef.getPlaceData('navTooltip', null),\n icon: () => navItem && navItem.icon ? navItem.icon() : placeDef.getPlaceData('navIcon', null)\n };\n }\n\n isActive(place:PlaceDefinition) {\n return this.activePlaceDefinition.query().equals(place);\n }\n\n ngOnInit() {\n }\n\n}\n"]}
1
+ {"version":3,"file":"abstract-place-navigation.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/components/abstract-place-navigation.component.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAE,SAAS,EAAE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C;;gBAzDF,SAAS,SAAC;oBACT,QAAQ,EAAE,EAAE;iBACb;;;;gBANQ,WAAW;;;yBASjB,KAAK;8BAGL,KAAK;8BAIL,KAAK;mCAGL,KAAK;;IATN;QADU,gBAAgB,CAAC,aAAa,CAAC;;oEACD;IAGxC;QADU,WAAW,EAAE;0CACV,SAAS;yEAAgC;IAItD;QADU,iBAAiB,CAAC,kBAAkB,CAAC;0CAClC,oBAAoB;yEAAC;IAGlC;QADU,WAAW,EAAE;0CACL,UAAU;8EAAuB;IA2BnD;QADC,OAAO,EAAE;;iDACO,eAAe;;kEAO/B;IASH,uCAAC;CAAA,AA3DD,CAGsD,mBAAmB,GAwDxE;SAxDY,gCAAgC;;;IAE3C,kDACwC;;IAExC,uDACsD;;IAGtD,uDACkC;;IAElC,4DACmD;;IAEnD,4DAA2D;;IAE3D,0DAAgE;;IAChE,iEAA4E;;;;;IAC5E,iEAAgE","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport {\n Command,\n Constructable,\n DelegatingValueModel,\n Dsl,\n ListModel,\n ListModelChain,\n StoreInListModel,\n StoreInValueModel,\n TransactionObserver,\n UseDelegate,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';\nimport { DisposableComponent } from '../../components/disposable-component';\nimport { NavItem } from '../nav-item';\nimport { PlaceComponent } from '../place-component';\nimport { PlaceDefinition } from '../place-definition';\nimport { PlaceRouter } from '../place-router';\nimport { Visit } from '../visit';\nimport { PlaceOutletComponent } from './place-outlet/place-outlet.component';\n\n@Component({\n template: ''\n})\nexport class AbstractPlaceNavigationComponent extends DisposableComponent implements OnInit {\n\n @Input() @StoreInListModel('placesModel')\n places: Constructable<PlaceComponent>[];\n\n @Input() @UseDelegate()\n placesModel: ListModel<Constructable<PlaceComponent>>;\n\n\n @Input() @StoreInValueModel('placeOutletModel')\n placeOutlet: PlaceOutletComponent;\n\n @Input() @UseDelegate()\n placeOutletModel: ValueModel<PlaceOutletComponent>;\n\n readonly placeDefinitions: ListModelChain<PlaceDefinition>;\n\n readonly commandFactory: Command.Factory<PlaceDefinition, void>;\n readonly _activePlaceComponent = new DelegatingValueModel<PlaceComponent>();\n private activePlaceDefinition: ValueModelChain<PlaceDefinition>;\n\n constructor(placeRouter: PlaceRouter) {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.placeDefinitions = chain(this.placesModel).map(c => PlaceComponent.getDefinition(c));\n this.commandFactory = Command.createFactory((placeDefinition: PlaceDefinition) => {\n this.placeOutlet.navigate(new Visit(placeDefinition));\n });\n\n when.valueOf(this.placeOutletModel).changes(outlet => {\n // NOTE: this updates during a change cycle and causes our isActiveMethod to return 2 different\n // values in the one change detection cycle. So instead we delay the update to a different\n // tick.\n setTimeout(() => this._activePlaceComponent.setDelegate(outlet ? outlet.activePlaceModel : null));\n });\n this.activePlaceDefinition = chain(this._activePlaceComponent).pluck('placeDefinition');\n }\n\n\n @Memoize()\n getNav(placeDef: PlaceDefinition): NavItem {\n const navItem = placeDef.getPlaceData('nav') as NavItem;\n return {\n title: () => navItem ? navItem.title() : placeDef.searchPlaceData(['navTitle', 'title']),\n tooltip: () => navItem && navItem.tooltip ? navItem.tooltip() : placeDef.getPlaceData('navTooltip', null),\n icon: () => navItem && navItem.icon ? navItem.icon() : placeDef.getPlaceData('navIcon', null)\n };\n }\n\n isActive(place: PlaceDefinition): boolean {\n return this.activePlaceDefinition.query().equals(place);\n }\n\n ngOnInit() {\n }\n\n}\n"]}
@@ -4,11 +4,12 @@
4
4
  */
5
5
  import * as tslib_1 from "tslib";
6
6
  import { Component, HostBinding } from '@angular/core';
7
+ import { PlaceRouter } from '../../place-router';
7
8
  import { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';
8
9
  var ListPlaceNavComponent = /** @class */ (function (_super) {
9
10
  tslib_1.__extends(ListPlaceNavComponent, _super);
10
- function ListPlaceNavComponent() {
11
- var _this = _super.call(this) || this;
11
+ function ListPlaceNavComponent(placeRouter) {
12
+ var _this = _super.call(this, placeRouter) || this;
12
13
  _this.expanded = true;
13
14
  return _this;
14
15
  }
@@ -47,7 +48,9 @@ var ListPlaceNavComponent = /** @class */ (function (_super) {
47
48
  }] }
48
49
  ];
49
50
  /** @nocollapse */
50
- ListPlaceNavComponent.ctorParameters = function () { return []; };
51
+ ListPlaceNavComponent.ctorParameters = function () { return [
52
+ { type: PlaceRouter }
53
+ ]; };
51
54
  ListPlaceNavComponent.propDecorators = {
52
55
  expanded: [{ type: HostBinding, args: ['class.expanded',] }]
53
56
  };
@@ -1 +1 @@
1
- {"version":3,"file":"list-place-nav.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/components/list-place-nav/list-place-nav.component.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAE1F;IAK2C,iDAAgC;IAKzE;QAAA,YACE,iBAAO,SACR;QAJM,cAAQ,GAAG,IAAI,CAAC;;IAIvB,CAAC;;;;IAED,0CAAU;;;IAAV;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;;;;IAED,4CAAY;;;IAAZ;QACE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;;;;IAED,0CAAU;;;IAAV;QACE,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;IACjC,CAAC;;gBAxBF,SAAS,SAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,ufAA8C;;iBAE/C;;;;;2BAGE,WAAW,SAAC,gBAAgB;;IAkB/B,4BAAC;CAAA,AAzBD,CAK2C,gCAAgC,GAoB1E;SApBY,qBAAqB;;;IAEhC,yCACuB","sourcesContent":["import { Component, HostBinding } from '@angular/core';\nimport { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';\n\n@Component({\n selector: 'aup-list-place-nav',\n templateUrl: './list-place-nav.component.html',\n styleUrls: ['./list-place-nav.component.scss']\n})\nexport class ListPlaceNavComponent extends AbstractPlaceNavigationComponent {\n\n @HostBinding('class.expanded')\n public expanded = true;\n\n constructor() {\n super();\n }\n\n expandMenu() {\n this.expanded = true;\n }\n\n collapseMenu() {\n this.expanded = false;\n }\n\n toggleMenu() {\n this.expanded = !this.expanded;\n }\n}\n"]}
1
+ {"version":3,"file":"list-place-nav.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/components/list-place-nav/list-place-nav.component.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAE1F;IAK2C,iDAAgC;IAKzE,+BAAY,WAAuB;QAAnC,YACE,kBAAM,WAAW,CAAC,SACnB;QAJM,cAAQ,GAAG,IAAI,CAAC;;IAIvB,CAAC;;;;IAED,0CAAU;;;IAAV;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;;;;IAED,4CAAY;;;IAAZ;QACE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;;;;IAED,0CAAU;;;IAAV;QACE,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;IACjC,CAAC;;gBAxBF,SAAS,SAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,ufAA8C;;iBAE/C;;;;gBAPQ,WAAW;;;2BAUjB,WAAW,SAAC,gBAAgB;;IAkB/B,4BAAC;CAAA,AAzBD,CAK2C,gCAAgC,GAoB1E;SApBY,qBAAqB;;;IAEhC,yCACuB","sourcesContent":["import { Component, HostBinding } from '@angular/core';\nimport { PlaceRouter } from '../../place-router';\nimport { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';\n\n@Component({\n selector: 'aup-list-place-nav',\n templateUrl: './list-place-nav.component.html',\n styleUrls: ['./list-place-nav.component.scss']\n})\nexport class ListPlaceNavComponent extends AbstractPlaceNavigationComponent {\n\n @HostBinding('class.expanded')\n public expanded = true;\n\n constructor(placeRouter:PlaceRouter) {\n super(placeRouter);\n }\n\n expandMenu() {\n this.expanded = true;\n }\n\n collapseMenu() {\n this.expanded = false;\n }\n\n toggleMenu() {\n this.expanded = !this.expanded;\n }\n}\n"]}