@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.
- package/bundles/coolon-angular-ui-powerups.umd.js +3745 -3019
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +17 -18
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +16 -17
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/index.js +1 -1
- package/esm2015/index.js.map +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/interaction/abstract-interaction-context.js +104 -0
- package/esm2015/lib/interaction/abstract-interaction-context.js.map +1 -0
- package/esm2015/lib/interaction/abstract-interaction-context.metadata.json +1 -0
- package/esm2015/lib/interaction/activity-ref.js +123 -0
- package/esm2015/lib/interaction/activity-ref.js.map +1 -0
- package/esm2015/lib/interaction/activity-ref.metadata.json +1 -0
- package/esm2015/lib/interaction/activity.js +21 -1
- package/esm2015/lib/interaction/activity.js.map +1 -1
- package/esm2015/lib/interaction/activity.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +199 -230
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/{activity-outlet → activity-container/activity-outlet}/activity-outlet.component.js +24 -31
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +2 -3
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +4 -11
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +2 -3
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +113 -0
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -0
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/index.js +7 -6
- package/esm2015/lib/interaction/index.js.map +1 -1
- package/esm2015/lib/interaction/index.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction-context.js +12 -67
- package/esm2015/lib/interaction/interaction-context.js.map +1 -1
- package/esm2015/lib/interaction/interaction-context.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.js +4 -4
- package/esm2015/lib/interaction/interaction.module.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/interaction/route-synchronisation-adapter.js +17 -0
- package/esm2015/lib/interaction/route-synchronisation-adapter.js.map +1 -0
- package/esm2015/lib/interaction/route-synchronisation-adapter.metadata.json +1 -0
- package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js +72 -0
- package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -0
- package/esm2015/lib/interaction/services/interaction-service-routing-adapter.metadata.json +1 -0
- package/esm2015/lib/interaction/services/interaction.service.js +174 -104
- package/esm2015/lib/interaction/services/interaction.service.js.map +1 -1
- package/esm2015/lib/interaction/services/interaction.service.metadata.json +1 -1
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +4 -2
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.metadata.json +1 -1
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +79 -87
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.metadata.json +1 -1
- package/esm2015/lib/interaction/services/modal-interaction-context.factory.js +3 -1
- package/esm2015/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +27 -6
- package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +9 -3
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +98 -110
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +9 -3
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/guards/place.guard.js +14 -13
- package/esm2015/lib/place/guards/place.guard.js.map +1 -1
- package/esm2015/lib/place/guards/place.guard.metadata.json +1 -1
- package/esm2015/lib/place/index.js +15 -2
- package/esm2015/lib/place/index.js.map +1 -1
- package/esm2015/lib/place/index.metadata.json +1 -1
- package/esm2015/lib/place/{guards → navigation}/place-component-deactivation-handler.js +28 -22
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -0
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js +37 -0
- package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -0
- package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +19 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +95 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +132 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +123 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js +62 -0
- package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -0
- package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +48 -0
- package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -0
- package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +104 -0
- package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -0
- package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +141 -0
- package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -0
- package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/navigating.js +54 -0
- package/esm2015/lib/place/navigation/session/navigating.js.map +1 -0
- package/esm2015/lib/place/navigation/session/navigating.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/navigation-context.js +38 -0
- package/esm2015/lib/place/navigation/session/navigation-context.js.map +1 -0
- package/esm2015/lib/place/navigation/session/navigation-context.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/navigation-session.js +326 -0
- package/esm2015/lib/place/navigation/session/navigation-session.js.map +1 -0
- package/esm2015/lib/place/navigation/session/navigation-session.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/pop-state-navigation.js +31 -0
- package/esm2015/lib/place/navigation/session/pop-state-navigation.js.map +1 -0
- package/esm2015/lib/place/navigation/session/pop-state-navigation.metadata.json +1 -0
- package/esm2015/lib/place/place-component.js +46 -15
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-component.metadata.json +1 -1
- package/esm2015/lib/place/place-router.js +307 -309
- package/esm2015/lib/place/place-router.js.map +1 -1
- package/esm2015/lib/place/place-router.metadata.json +1 -1
- package/esm2015/lib/place/place.module.js.map +1 -1
- package/esm2015/lib/place/place.module.metadata.json +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +1 -0
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
- package/esm2015/lib/place/url-service.js +126 -0
- package/esm2015/lib/place/url-service.js.map +1 -0
- package/esm2015/lib/place/url-service.metadata.json +1 -0
- package/esm2015/lib/place/url-service.ngfactory.js.map +1 -0
- package/esm2015/lib/place/url-snapshot.js +15 -1
- package/esm2015/lib/place/url-snapshot.js.map +1 -1
- package/esm2015/lib/place/url-snapshot.metadata.json +1 -1
- package/esm2015/lib/place/visit.js +10 -0
- package/esm2015/lib/place/visit.js.map +1 -1
- package/esm2015/lib/place/visit.metadata.json +1 -1
- package/esm2015/public_api.js +2 -2
- package/esm2015/public_api.js.map +1 -1
- package/esm5/coolon-angular-ui-powerups.js +16 -17
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/index.js +1 -1
- package/esm5/index.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm5/lib/interaction/abstract-interaction-context.js +146 -0
- package/esm5/lib/interaction/abstract-interaction-context.js.map +1 -0
- package/esm5/lib/interaction/activity-ref.js +153 -0
- package/esm5/lib/interaction/activity-ref.js.map +1 -0
- package/esm5/lib/interaction/activity.js +29 -1
- package/esm5/lib/interaction/activity.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +273 -265
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm5/lib/interaction/components/{activity-outlet → activity-container/activity-outlet}/activity-outlet.component.js +25 -32
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -0
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.ngfactory.js.map +1 -0
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +2 -3
- package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
- package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +4 -10
- package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
- package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +2 -3
- package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
- package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +158 -0
- package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -0
- package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.ngfactory.js.map +1 -0
- package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/interaction/index.js +7 -6
- package/esm5/lib/interaction/index.js.map +1 -1
- package/esm5/lib/interaction/interaction-context.js +12 -106
- package/esm5/lib/interaction/interaction-context.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.js +4 -4
- package/esm5/lib/interaction/interaction.module.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/interaction/route-synchronisation-adapter.js +17 -0
- package/esm5/lib/interaction/route-synchronisation-adapter.js.map +1 -0
- package/esm5/lib/interaction/services/interaction-service-routing-adapter.js +98 -0
- package/esm5/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -0
- package/esm5/lib/interaction/services/interaction.service.js +243 -117
- package/esm5/lib/interaction/services/interaction.service.js.map +1 -1
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +6 -2
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +96 -107
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
- package/esm5/lib/interaction/services/modal-interaction-context.factory.js +3 -1
- package/esm5/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
- package/esm5/lib/place/components/abstract-place-navigation.component.js +24 -6
- package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +6 -3
- package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +130 -129
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +6 -3
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/guards/place.guard.js +17 -13
- package/esm5/lib/place/guards/place.guard.js.map +1 -1
- package/esm5/lib/place/index.js +15 -2
- package/esm5/lib/place/index.js.map +1 -1
- package/esm5/lib/place/{guards → navigation}/place-component-deactivation-handler.js +45 -21
- package/esm5/lib/place/navigation/place-component-deactivation-handler.js.map +1 -0
- package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js +49 -0
- package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -0
- package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +36 -0
- package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -0
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +151 -0
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -0
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +221 -0
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -0
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +186 -0
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -0
- package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js +107 -0
- package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -0
- package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +77 -0
- package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -0
- package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +167 -0
- package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -0
- package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +185 -0
- package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -0
- package/esm5/lib/place/navigation/session/navigating.js +75 -0
- package/esm5/lib/place/navigation/session/navigating.js.map +1 -0
- package/esm5/lib/place/navigation/session/navigation-context.js +32 -0
- package/esm5/lib/place/navigation/session/navigation-context.js.map +1 -0
- package/esm5/lib/place/navigation/session/navigation-session.js +450 -0
- package/esm5/lib/place/navigation/session/navigation-session.js.map +1 -0
- package/esm5/lib/place/navigation/session/pop-state-navigation.js +50 -0
- package/esm5/lib/place/navigation/session/pop-state-navigation.js.map +1 -0
- package/esm5/lib/place/place-component.js +61 -17
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/place-router.js +407 -401
- package/esm5/lib/place/place-router.js.map +1 -1
- package/esm5/lib/place/place.module.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +1 -0
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm5/lib/place/url-service.js +176 -0
- package/esm5/lib/place/url-service.js.map +1 -0
- package/esm5/lib/place/url-service.ngfactory.js.map +1 -0
- package/esm5/lib/place/url-snapshot.js +22 -1
- package/esm5/lib/place/url-snapshot.js.map +1 -1
- package/esm5/lib/place/visit.js +14 -0
- package/esm5/lib/place/visit.js.map +1 -1
- package/esm5/public_api.js +2 -2
- package/esm5/public_api.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +2637 -2266
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +3694 -2980
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/interaction/abstract-interaction-context.d.ts +24 -0
- package/lib/interaction/activity-ref.d.ts +19 -0
- package/lib/interaction/activity.d.ts +5 -1
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +42 -43
- package/lib/interaction/components/{activity-outlet → activity-container/activity-outlet}/activity-outlet.component.d.ts +7 -10
- package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +2 -2
- package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +2 -5
- package/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.d.ts +2 -2
- package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +24 -0
- package/lib/interaction/index.d.ts +6 -5
- package/lib/interaction/interaction-context.d.ts +8 -29
- package/lib/interaction/route-synchronisation-adapter.d.ts +5 -0
- package/lib/interaction/services/interaction-service-routing-adapter.d.ts +15 -0
- package/lib/interaction/services/interaction.service.d.ts +52 -24
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.d.ts +2 -1
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +15 -12
- package/lib/interaction/services/modal-interaction-context.factory.d.ts +2 -1
- package/lib/place/components/abstract-place-navigation.component.d.ts +5 -3
- package/lib/place/components/list-place-nav/list-place-nav.component.d.ts +2 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +9 -10
- package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +2 -1
- package/lib/place/guards/place.guard.d.ts +4 -3
- package/lib/place/index.d.ts +15 -2
- package/lib/place/navigation/place-component-deactivation-handler.d.ts +22 -0
- package/lib/place/navigation/session/abstract-pop-state-navigation.d.ts +9 -0
- package/lib/place/navigation/session/event-cleanup/event-clean-up-session.d.ts +4 -0
- package/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.d.ts +27 -0
- package/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.d.ts +43 -0
- package/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.d.ts +33 -0
- package/lib/place/navigation/session/interactions/navigating-during-interaction.d.ts +15 -0
- package/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.d.ts +17 -0
- package/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.d.ts +24 -0
- package/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.d.ts +15 -0
- package/lib/place/navigation/session/navigating.d.ts +11 -0
- package/lib/place/navigation/session/navigation-context.d.ts +28 -0
- package/lib/place/navigation/session/navigation-session.d.ts +51 -0
- package/lib/place/navigation/session/pop-state-navigation.d.ts +7 -0
- package/lib/place/place-component.d.ts +6 -3
- package/lib/place/place-router.d.ts +39 -35
- package/lib/place/url-service.d.ts +30 -0
- package/lib/place/url-snapshot.d.ts +3 -1
- package/lib/place/visit.d.ts +1 -0
- package/package.json +1 -1
- package/schematics/place-routes/templates/place-routes.ts.template +4 -3
- package/esm2015/lib/interaction/abstract-activity.js +0 -13
- package/esm2015/lib/interaction/abstract-activity.js.map +0 -1
- package/esm2015/lib/interaction/abstract-activity.metadata.json +0 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet-context.js +0 -21
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet-context.js.map +0 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet-context.metadata.json +0 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.js.map +0 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.metadata.json +0 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.ngfactory.js.map +0 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +0 -102
- package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js.map +0 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.metadata.json +0 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.ngfactory.js.map +0 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/interaction/interaction-context-base.js +0 -171
- package/esm2015/lib/interaction/interaction-context-base.js.map +0 -1
- package/esm2015/lib/interaction/interaction-context-base.metadata.json +0 -1
- package/esm2015/lib/place/guards/navigation-state.js +0 -1118
- package/esm2015/lib/place/guards/navigation-state.js.map +0 -1
- package/esm2015/lib/place/guards/navigation-state.metadata.json +0 -1
- package/esm2015/lib/place/guards/place-component-deactivation-handler.js.map +0 -1
- package/esm2015/lib/place/guards/place-component-deactivation-handler.metadata.json +0 -1
- package/esm5/lib/interaction/abstract-activity.js +0 -30
- package/esm5/lib/interaction/abstract-activity.js.map +0 -1
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet-context.js +0 -21
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet-context.js.map +0 -1
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.js.map +0 -1
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.ngfactory.js.map +0 -1
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.scss.shim.ngstyle.js.map +0 -1
- package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +0 -119
- package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js.map +0 -1
- package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.ngfactory.js.map +0 -1
- package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.scss.shim.ngstyle.js.map +0 -1
- package/esm5/lib/interaction/interaction-context-base.js +0 -228
- package/esm5/lib/interaction/interaction-context-base.js.map +0 -1
- package/esm5/lib/place/guards/navigation-state.js +0 -1491
- package/esm5/lib/place/guards/navigation-state.js.map +0 -1
- package/esm5/lib/place/guards/place-component-deactivation-handler.js.map +0 -1
- package/lib/interaction/abstract-activity.d.ts +0 -6
- package/lib/interaction/components/activity-outlet/activity-outlet-context.d.ts +0 -7
- package/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.d.ts +0 -17
- package/lib/interaction/interaction-context-base.d.ts +0 -29
- package/lib/place/guards/navigation-state.d.ts +0 -228
- package/lib/place/guards/place-component-deactivation-handler.d.ts +0 -15
|
@@ -5,47 +5,72 @@
|
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
6
|
import { Location } from '@angular/common';
|
|
7
7
|
import { Injectable } from '@angular/core';
|
|
8
|
-
import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Router
|
|
9
|
-
import { assert, Dsl, GarbageCollector, lang, Logger, MutableListModel,
|
|
10
|
-
import _ from 'lodash';
|
|
8
|
+
import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Router } from '@angular/router';
|
|
9
|
+
import { assert, DebugContext, Dsl, GarbageCollector, lang, Logger, MutableListModel, MutableValueModel } from '@coolon/pectin';
|
|
11
10
|
import { InteractionService } from '../interaction/services/interaction.service';
|
|
12
|
-
import {
|
|
11
|
+
import { NavigatingDuringInteraction } from './navigation/session/interactions/navigating-during-interaction';
|
|
12
|
+
import { PopStateDuringInteractionNavigation } from './navigation/session/interactions/pop-state-during-interaction-navigation';
|
|
13
|
+
import { SynchroniseInteractionContextIdsWithRoute } from './navigation/session/interactions/synchronise-interaction-context-ids-with-route';
|
|
14
|
+
import { Navigating } from './navigation/session/navigating';
|
|
15
|
+
import { NavigationContext } from './navigation/session/navigation-context';
|
|
16
|
+
import { PopStateNavigation } from './navigation/session/pop-state-navigation';
|
|
13
17
|
import { PlaceHistory } from './place-history';
|
|
14
|
-
import {
|
|
18
|
+
import { UrlService } from './url-service';
|
|
15
19
|
import * as i0 from "@angular/core";
|
|
16
20
|
import * as i1 from "@angular/router";
|
|
17
21
|
import * as i2 from "@angular/common";
|
|
18
|
-
import * as i3 from "
|
|
19
|
-
import * as i4 from "
|
|
22
|
+
import * as i3 from "../interaction/services/interaction.service";
|
|
23
|
+
import * as i4 from "./url-service";
|
|
24
|
+
import * as i5 from "./place-history";
|
|
20
25
|
var PlaceRouter = /** @class */ (function (_super) {
|
|
21
26
|
tslib_1.__extends(PlaceRouter, _super);
|
|
22
|
-
function PlaceRouter(
|
|
27
|
+
function PlaceRouter(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
|
|
23
28
|
var _this = _super.call(this) || this;
|
|
24
|
-
_this.
|
|
25
|
-
_this.urlSerializer = urlSerializer;
|
|
29
|
+
_this.angularRouter = angularRouter;
|
|
26
30
|
_this.angularLocation = angularLocation;
|
|
27
|
-
_this.placeHistory = placeHistory;
|
|
28
31
|
_this.interactionService = interactionService;
|
|
29
|
-
_this.
|
|
32
|
+
_this.urlService = urlService;
|
|
33
|
+
_this.placeHistory = placeHistory;
|
|
34
|
+
_this.navigationSessionModel = new MutableValueModel();
|
|
30
35
|
_this._activeVisits = new MutableListModel();
|
|
31
|
-
|
|
32
|
-
_this.
|
|
33
|
-
|
|
34
|
-
_this.
|
|
35
|
-
* @param {?}
|
|
36
|
+
_this.sessionFinishedJobs = [];
|
|
37
|
+
_this.routerInteractionAdapter = interactionService.registerPlaceRouter(_this);
|
|
38
|
+
// TODO: Make this an interface and use 'this' instead.
|
|
39
|
+
_this.navigationContext = new NavigationContext.Impl(_this.urlService, _this.routerInteractionAdapter, (/**
|
|
40
|
+
* @param {?} urlSnapshot
|
|
41
|
+
* @param {?} options
|
|
36
42
|
* @return {?}
|
|
37
43
|
*/
|
|
38
|
-
function (
|
|
39
|
-
_this.
|
|
40
|
-
})
|
|
41
|
-
_this._navigationStateModel.value = new NavigationState.Idle(_this._navigationSessionContext);
|
|
42
|
-
_this._navigationStateTypeModel = chain(_this._navigationStateModel).map((/**
|
|
44
|
+
function (urlSnapshot, options) {
|
|
45
|
+
return _this.navigateByUrl(urlSnapshot, options);
|
|
46
|
+
}), (/**
|
|
43
47
|
* @param {?} state
|
|
44
48
|
* @return {?}
|
|
45
49
|
*/
|
|
46
|
-
function (state) {
|
|
50
|
+
function (state) {
|
|
51
|
+
_this.transitionTo(state);
|
|
52
|
+
}), (/**
|
|
53
|
+
* @param {?} visits
|
|
54
|
+
* @return {?}
|
|
55
|
+
*/
|
|
56
|
+
function (visits) {
|
|
57
|
+
_this.routingSessionFinished(visits);
|
|
58
|
+
}));
|
|
59
|
+
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;
|
|
60
|
+
_this.navigationInProgress = chain(_this.navigationSessionModel).isNotNil();
|
|
61
|
+
/** @type {?} */
|
|
62
|
+
var idleStateName = chain(_this.interactionService.active).map((/**
|
|
63
|
+
* @param {?} active
|
|
64
|
+
* @return {?}
|
|
65
|
+
*/
|
|
66
|
+
function (active) { return active ? 'IdleDuringInteraction' : 'Idle'; }));
|
|
67
|
+
_this.navigationSessionName = chain(_this.navigationSessionModel)
|
|
68
|
+
.pluck('name')
|
|
69
|
+
.otherwise(idleStateName);
|
|
70
|
+
DebugContext.tag(_this._activeVisits, "PlaceRouter.activeVisits");
|
|
71
|
+
_this.activeVisitsByPlaceDefinition = chain(_this._activeVisits).indexBy('placeDefinition');
|
|
47
72
|
// TODO: make setup the callbacks in during module initiation to make this testable.
|
|
48
|
-
|
|
73
|
+
angularRouter.events.subscribe((/**
|
|
49
74
|
* @param {?} event
|
|
50
75
|
* @return {?}
|
|
51
76
|
*/
|
|
@@ -57,271 +82,252 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
57
82
|
// NavigationStart -> .... -> NavigationError --> navigation aborted, end session.
|
|
58
83
|
// =======================
|
|
59
84
|
if (event instanceof NavigationStart) {
|
|
85
|
+
// console.log(`---> NavigationStart[${event.id}]: ${event.url} (${event.navigationTrigger})`);
|
|
60
86
|
if (event.navigationTrigger === 'popstate') {
|
|
61
|
-
_this.
|
|
62
|
-
* @param {?} state
|
|
63
|
-
* @return {?}
|
|
64
|
-
*/
|
|
65
|
-
function (state) { return state.onPopState(event); }));
|
|
87
|
+
_this.onPopState(event);
|
|
66
88
|
}
|
|
67
89
|
else {
|
|
68
|
-
_this.
|
|
69
|
-
* @param {?} state
|
|
70
|
-
* @return {?}
|
|
71
|
-
*/
|
|
72
|
-
function (state) { return state.onRouterStarted(event); }));
|
|
90
|
+
_this.onRouterStarted(event);
|
|
73
91
|
}
|
|
92
|
+
// console.log(`<--- NavigationStart[${event.id}]: ${event.url} (${event.navigationTrigger})`);
|
|
74
93
|
}
|
|
75
94
|
if (event instanceof NavigationEnd) {
|
|
76
|
-
console.log(event);
|
|
77
|
-
_this.
|
|
78
|
-
|
|
79
|
-
* @return {?}
|
|
80
|
-
*/
|
|
81
|
-
function (state) { return state.onRouterEnd(event); }));
|
|
95
|
+
// console.log(`---> NavigationEnd[${event.id}]: ${event.url}`);
|
|
96
|
+
_this.onRouterEnd(event);
|
|
97
|
+
// console.log(`<--- NavigationEnd[${event.id}]: ${event.url}`);
|
|
82
98
|
}
|
|
83
99
|
if (event instanceof NavigationError) {
|
|
84
|
-
console.log(event);
|
|
85
|
-
_this.
|
|
86
|
-
|
|
87
|
-
* @return {?}
|
|
88
|
-
*/
|
|
89
|
-
function (state) { return state.onRouterError(event); }));
|
|
100
|
+
// console.log(`---> NavigationError[${event.id}]: ${event.url}`);
|
|
101
|
+
_this.onRouterError(event);
|
|
102
|
+
// console.log(`<--- NavigationError[${event.id}]: ${event.url}`);
|
|
90
103
|
}
|
|
91
104
|
if (event instanceof NavigationCancel) {
|
|
92
|
-
console.log(event);
|
|
93
|
-
_this.
|
|
94
|
-
|
|
95
|
-
* @return {?}
|
|
96
|
-
*/
|
|
97
|
-
function (state) { return state.onRouterCancelled(event); }));
|
|
105
|
+
// console.log(`---> NavigationCancel[${event.id}]: ${event.url}`);
|
|
106
|
+
_this.onRouterCancelled(event);
|
|
107
|
+
// console.log(`<--- NavigationCancel[${event.id}]: ${event.url}`);
|
|
98
108
|
}
|
|
99
109
|
}));
|
|
100
|
-
//
|
|
101
|
-
|
|
102
|
-
* @param {?} ids
|
|
103
|
-
* @param {?} previous
|
|
104
|
-
* @return {?}
|
|
105
|
-
*/
|
|
106
|
-
function (ids, previous) {
|
|
107
|
-
_this.syncInteractionIdsWithRouter(ids, previous);
|
|
108
|
-
}), { unless: _this.navigationInProgress }); // TODO: I think the exclusive interaction prevents interactions starting while it's active so we might not need this.
|
|
109
|
-
// TODO: I think the exclusive interaction prevents interactions starting while it's active so we might not need this.
|
|
110
|
-
/** @type {?} */
|
|
111
|
-
var urlChanges = new MutableStream();
|
|
112
|
-
// The angular router doesn't always fire router events when the back button is pushed while a navigation
|
|
113
|
-
// session is in progress. Sometimes we only know about it from the url change.
|
|
114
|
-
// IMPORTANT ORDER DEPENDENCY
|
|
115
|
-
// This only works because we're notified of the change after the router has started reacting to it. This
|
|
116
|
-
// we can can use our navigationState to determine things.
|
|
110
|
+
// The router needs to know about url changes and in some cases they are the only way the router can know if
|
|
111
|
+
// the back button was clicked.
|
|
117
112
|
angularLocation.onUrlChange((/**
|
|
118
113
|
* @param {?} url
|
|
119
114
|
* @return {?}
|
|
120
115
|
*/
|
|
121
|
-
function (url) {
|
|
122
|
-
/** @type {?} */
|
|
123
|
-
var navigationState = _this._navigationStateModel.value;
|
|
124
|
-
console.log("URLChange -> " + url, { state: navigationState });
|
|
125
|
-
urlChanges.publish({ url: url, state: navigationState });
|
|
126
|
-
// The url has changed while we're in a transitional state
|
|
127
|
-
if (navigationState.isTransitional) {
|
|
128
|
-
/** @type {?} */
|
|
129
|
-
var navigationInteraction = _this.navigationState.interactionContext;
|
|
130
|
-
if (navigationInteraction && navigationInteraction.isActive()) {
|
|
131
|
-
_this.runStateTransition((/**
|
|
132
|
-
* @param {?} state
|
|
133
|
-
* @return {?}
|
|
134
|
-
*/
|
|
135
|
-
function (state) { return state.onBackClickedDuringNavigationInteraction(url); }));
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}));
|
|
116
|
+
function (url) { return _this.onUrlChanged(url); }));
|
|
139
117
|
return _this;
|
|
140
118
|
}
|
|
141
|
-
|
|
142
|
-
* @private
|
|
143
|
-
* @param {?} session
|
|
144
|
-
* @return {?}
|
|
145
|
-
*/
|
|
146
|
-
PlaceRouter.prototype.processNavigationSuccess = /**
|
|
147
|
-
* @private
|
|
148
|
-
* @param {?} session
|
|
149
|
-
* @return {?}
|
|
150
|
-
*/
|
|
151
|
-
function (session) {
|
|
152
|
-
var _this = this;
|
|
153
|
-
// We need to update the visits before the session finishes. This allows the placeOutets to ignore visit
|
|
154
|
-
// changes that occur while routerNavigationActive is true.
|
|
155
|
-
assert.isTruthy(this.navigationInProgress.value);
|
|
156
|
-
/** @type {?} */
|
|
157
|
-
var visits = session.getVisits();
|
|
158
|
-
visits.forEach((/**
|
|
159
|
-
* @param {?} v
|
|
160
|
-
* @return {?}
|
|
161
|
-
*/
|
|
162
|
-
function (v) { return _this.placeHistory.add(v); }));
|
|
163
|
-
this._activeVisits.value = visits;
|
|
164
|
-
};
|
|
165
|
-
Object.defineProperty(PlaceRouter.prototype, "navigationState", {
|
|
166
|
-
get: /**
|
|
167
|
-
* @return {?}
|
|
168
|
-
*/
|
|
169
|
-
function () {
|
|
170
|
-
return this._navigationStateModel.value;
|
|
171
|
-
},
|
|
172
|
-
enumerable: true,
|
|
173
|
-
configurable: true
|
|
174
|
-
});
|
|
175
|
-
Object.defineProperty(PlaceRouter.prototype, "navigationStateModel", {
|
|
119
|
+
Object.defineProperty(PlaceRouter.prototype, "navigationSession", {
|
|
176
120
|
get: /**
|
|
177
121
|
* @return {?}
|
|
178
122
|
*/
|
|
179
123
|
function () {
|
|
180
|
-
return this.
|
|
124
|
+
return this.navigationSessionModel.value;
|
|
181
125
|
},
|
|
182
126
|
enumerable: true,
|
|
183
127
|
configurable: true
|
|
184
128
|
});
|
|
185
|
-
Object.defineProperty(PlaceRouter.prototype, "
|
|
129
|
+
Object.defineProperty(PlaceRouter.prototype, "currentSession", {
|
|
186
130
|
get: /**
|
|
187
131
|
* @return {?}
|
|
188
132
|
*/
|
|
189
133
|
function () {
|
|
190
|
-
return this.
|
|
134
|
+
return this.navigationSessionModel.value;
|
|
191
135
|
},
|
|
192
136
|
enumerable: true,
|
|
193
137
|
configurable: true
|
|
194
138
|
});
|
|
139
|
+
// @Trace()
|
|
140
|
+
// @Trace()
|
|
195
141
|
/**
|
|
196
|
-
*
|
|
197
|
-
* @
|
|
142
|
+
* @param {?} event
|
|
143
|
+
* @return {?}
|
|
198
144
|
*/
|
|
145
|
+
PlaceRouter.prototype.onPopState =
|
|
146
|
+
// @Trace()
|
|
199
147
|
/**
|
|
200
|
-
*
|
|
201
|
-
* @param {?} visit
|
|
202
|
-
* @param {?=} options
|
|
148
|
+
* @param {?} event
|
|
203
149
|
* @return {?}
|
|
204
150
|
*/
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
151
|
+
function (event) {
|
|
152
|
+
assert.isTruthy(event.navigationTrigger === 'popstate');
|
|
153
|
+
if (this.currentSession) {
|
|
154
|
+
this.currentSession.onPopState(event);
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
/** @type {?} */
|
|
158
|
+
var poppedHistoryUrl = event.url;
|
|
159
|
+
/** @type {?} */
|
|
160
|
+
var currentRouterUrl = this.urlService.getCurrentRouterUrl();
|
|
161
|
+
/** @type {?} */
|
|
162
|
+
var session = this.interactionService.isActive() ?
|
|
163
|
+
new PopStateDuringInteractionNavigation(this.navigationContext, currentRouterUrl, poppedHistoryUrl) :
|
|
164
|
+
new PopStateNavigation(this.navigationContext, currentRouterUrl, poppedHistoryUrl);
|
|
165
|
+
this.transitionTo(session);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
// @Trace()
|
|
169
|
+
// @Trace()
|
|
170
|
+
/**
|
|
171
|
+
* @param {?} event
|
|
209
172
|
* @return {?}
|
|
210
173
|
*/
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
return [4 /*yield*/, this.router.navigate(commands, {
|
|
228
|
-
relativeTo: options ? options.relativeTo : null
|
|
229
|
-
})];
|
|
230
|
-
case 1:
|
|
231
|
-
_a.sent();
|
|
232
|
-
return [2 /*return*/];
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
}); }));
|
|
236
|
-
return [2 /*return*/];
|
|
237
|
-
});
|
|
238
|
-
});
|
|
174
|
+
PlaceRouter.prototype.onRouterStarted =
|
|
175
|
+
// @Trace()
|
|
176
|
+
/**
|
|
177
|
+
* @param {?} event
|
|
178
|
+
* @return {?}
|
|
179
|
+
*/
|
|
180
|
+
function (event) {
|
|
181
|
+
assert.isFalsey(event.navigationTrigger === 'popstate');
|
|
182
|
+
/** @type {?} */
|
|
183
|
+
var inInteraction = this.interactionService.isActive();
|
|
184
|
+
if (this.currentSession) {
|
|
185
|
+
this.currentSession.onRouterStarted(event);
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
this.transitionTo(this.createNavigationSession(this.urlService.getCurrentRouterUrl()));
|
|
189
|
+
}
|
|
239
190
|
};
|
|
240
191
|
// @Trace()
|
|
241
192
|
// @Trace()
|
|
242
193
|
/**
|
|
243
|
-
* @param {?}
|
|
244
|
-
* @param {?} previous
|
|
245
|
-
* @param {?} next
|
|
194
|
+
* @param {?} newUrl
|
|
246
195
|
* @return {?}
|
|
247
196
|
*/
|
|
248
|
-
PlaceRouter.prototype.
|
|
197
|
+
PlaceRouter.prototype.onUrlChanged =
|
|
249
198
|
// @Trace()
|
|
250
199
|
/**
|
|
251
|
-
* @param {?}
|
|
252
|
-
* @param {?} previous
|
|
253
|
-
* @param {?} next
|
|
200
|
+
* @param {?} newUrl
|
|
254
201
|
* @return {?}
|
|
255
202
|
*/
|
|
256
|
-
function (
|
|
257
|
-
|
|
258
|
-
|
|
203
|
+
function (newUrl) {
|
|
204
|
+
// the back button can trigger a url change without a navigation session in progress so we
|
|
205
|
+
// console.log(`---> Url Changed ${newUrl}`);
|
|
206
|
+
if (this.currentSession) {
|
|
207
|
+
this.currentSession.onUrlChange(newUrl);
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
console.log('FYI: url changed without a navigation session in progress');
|
|
211
|
+
}
|
|
212
|
+
// console.log(`<--- Url Changed`);
|
|
213
|
+
};
|
|
214
|
+
// @Trace()
|
|
215
|
+
// @Trace()
|
|
216
|
+
/**
|
|
217
|
+
* @param {?} event
|
|
218
|
+
* @return {?}
|
|
219
|
+
*/
|
|
220
|
+
PlaceRouter.prototype.onRouterCancelled =
|
|
221
|
+
// @Trace()
|
|
222
|
+
/**
|
|
223
|
+
* @param {?} event
|
|
224
|
+
* @return {?}
|
|
225
|
+
*/
|
|
226
|
+
function (event) {
|
|
227
|
+
this.currentSession.onRouterCancelled(event);
|
|
228
|
+
};
|
|
229
|
+
// @Trace()
|
|
230
|
+
// @Trace()
|
|
231
|
+
/**
|
|
232
|
+
* @param {?} event
|
|
233
|
+
* @return {?}
|
|
234
|
+
*/
|
|
235
|
+
PlaceRouter.prototype.onRouterError =
|
|
236
|
+
// @Trace()
|
|
237
|
+
/**
|
|
238
|
+
* @param {?} event
|
|
239
|
+
* @return {?}
|
|
240
|
+
*/
|
|
241
|
+
function (event) {
|
|
242
|
+
this.currentSession.onRouterError(event);
|
|
243
|
+
};
|
|
244
|
+
// @Trace()
|
|
245
|
+
// @Trace()
|
|
246
|
+
/**
|
|
247
|
+
* @param {?} event
|
|
248
|
+
* @return {?}
|
|
249
|
+
*/
|
|
250
|
+
PlaceRouter.prototype.onRouterEnd =
|
|
251
|
+
// @Trace()
|
|
252
|
+
/**
|
|
253
|
+
* @param {?} event
|
|
254
|
+
* @return {?}
|
|
255
|
+
*/
|
|
256
|
+
function (event) {
|
|
257
|
+
this.currentSession.onRouterEnd(event);
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* @param {?} visit
|
|
261
|
+
* @param {?=} options
|
|
262
|
+
* @return {?}
|
|
263
|
+
*/
|
|
264
|
+
PlaceRouter.prototype.navigate = /**
|
|
265
|
+
* @param {?} visit
|
|
266
|
+
* @param {?=} options
|
|
267
|
+
* @return {?}
|
|
268
|
+
*/
|
|
269
|
+
function (visit, options) {
|
|
270
|
+
var _this = this;
|
|
271
|
+
return this.doNavigation(visit, (/**
|
|
272
|
+
* @param {?} router
|
|
273
|
+
* @return {?}
|
|
274
|
+
*/
|
|
275
|
+
function (router) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
276
|
+
var commands;
|
|
259
277
|
return tslib_1.__generator(this, function (_a) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
var urlSnapshot = _this.parseUrl(_this.router.routerState.snapshot.url).updateVisitSegments(next);
|
|
272
|
-
console.log('### Push Changes to route Redirect', { commands: urlSnapshot.url });
|
|
273
|
-
return _this.navigateByUrl(urlSnapshot);
|
|
274
|
-
}))];
|
|
278
|
+
switch (_a.label) {
|
|
279
|
+
case 0:
|
|
280
|
+
commands = tslib_1.__spread([
|
|
281
|
+
visit.placeDefinition.path
|
|
282
|
+
], this.createRouteParameters(visit));
|
|
283
|
+
return [4 /*yield*/, this.angularRouter.navigate(commands, {
|
|
284
|
+
relativeTo: options ? options.relativeTo : null
|
|
285
|
+
})];
|
|
286
|
+
case 1:
|
|
287
|
+
_a.sent();
|
|
288
|
+
return [2 /*return*/];
|
|
275
289
|
}
|
|
276
|
-
return [2 /*return*/];
|
|
277
290
|
});
|
|
278
|
-
});
|
|
291
|
+
}); }));
|
|
279
292
|
};
|
|
293
|
+
// @Trace()
|
|
294
|
+
// @Trace()
|
|
280
295
|
/**
|
|
281
296
|
* @param {?} visit
|
|
282
297
|
* @param {?} runNavigationCommands
|
|
283
298
|
* @return {?}
|
|
284
299
|
*/
|
|
285
|
-
PlaceRouter.prototype.doNavigation =
|
|
300
|
+
PlaceRouter.prototype.doNavigation =
|
|
301
|
+
// @Trace()
|
|
302
|
+
/**
|
|
286
303
|
* @param {?} visit
|
|
287
304
|
* @param {?} runNavigationCommands
|
|
288
305
|
* @return {?}
|
|
289
306
|
*/
|
|
290
307
|
function (visit, runNavigationCommands) {
|
|
291
308
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
292
|
-
var
|
|
309
|
+
var navigation;
|
|
293
310
|
return tslib_1.__generator(this, function (_a) {
|
|
294
311
|
switch (_a.label) {
|
|
295
312
|
case 0:
|
|
296
313
|
if (this.navigationInProgress.value) {
|
|
297
314
|
lang.illegalState('Navigation already in progress');
|
|
298
315
|
}
|
|
299
|
-
this.
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
*/
|
|
303
|
-
function (current) {
|
|
304
|
-
/** @type {?} */
|
|
305
|
-
var session = _this.navigationState.onPlaceNavigationStart(visit, _this.getCurrentRouterUrl());
|
|
306
|
-
session.storeVisit(visit);
|
|
307
|
-
return session;
|
|
308
|
-
}));
|
|
316
|
+
navigation = this.createNavigationSession(this.urlService.getCurrentRouterUrl());
|
|
317
|
+
navigation.storeVisit(visit);
|
|
318
|
+
this.transitionTo(navigation);
|
|
309
319
|
_a.label = 1;
|
|
310
320
|
case 1:
|
|
311
321
|
_a.trys.push([1, , 3, 4]);
|
|
312
|
-
return [4 /*yield*/, runNavigationCommands(this.
|
|
322
|
+
return [4 /*yield*/, runNavigationCommands(this.angularRouter)];
|
|
313
323
|
case 2:
|
|
314
324
|
_a.sent();
|
|
315
325
|
return [3 /*break*/, 4];
|
|
316
326
|
case 3:
|
|
317
|
-
//
|
|
318
|
-
//
|
|
319
|
-
if (this.
|
|
320
|
-
this.
|
|
321
|
-
* @param {?} session
|
|
322
|
-
* @return {?}
|
|
323
|
-
*/
|
|
324
|
-
function (session) { return session.onRouterEnd(new NavigationEnd(-1, '', '')); }));
|
|
327
|
+
// Check if the router has finished (in the case where no router change required) and we're still in a
|
|
328
|
+
// transient state and finish of the transition.
|
|
329
|
+
if (!this.angularRouter.getCurrentNavigation() && this.currentSession) {
|
|
330
|
+
this.currentSession.onRouterEnd(new NavigationEnd(-1, '', ''));
|
|
325
331
|
}
|
|
326
332
|
return [7 /*endfinally*/];
|
|
327
333
|
case 4: return [2 /*return*/];
|
|
@@ -329,242 +335,238 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
329
335
|
});
|
|
330
336
|
});
|
|
331
337
|
};
|
|
338
|
+
/**
|
|
339
|
+
* @param {?} urlSnapshot
|
|
340
|
+
* @param {?=} navigationExtras
|
|
341
|
+
* @return {?}
|
|
342
|
+
*/
|
|
343
|
+
PlaceRouter.prototype.navigateByUrl = /**
|
|
344
|
+
* @param {?} urlSnapshot
|
|
345
|
+
* @param {?=} navigationExtras
|
|
346
|
+
* @return {?}
|
|
347
|
+
*/
|
|
348
|
+
function (urlSnapshot, navigationExtras) {
|
|
349
|
+
// console.log(`### navigationByUrl -> ${urlSnapshot.urlTree.toString()}`);
|
|
350
|
+
return this.angularRouter.navigateByUrl(urlSnapshot.urlTree, navigationExtras);
|
|
351
|
+
};
|
|
352
|
+
Object.defineProperty(PlaceRouter.prototype, "activeVisits", {
|
|
353
|
+
get: /**
|
|
354
|
+
* @return {?}
|
|
355
|
+
*/
|
|
356
|
+
function () {
|
|
357
|
+
return this._activeVisits.readonly;
|
|
358
|
+
},
|
|
359
|
+
enumerable: true,
|
|
360
|
+
configurable: true
|
|
361
|
+
});
|
|
332
362
|
// @Trace()
|
|
333
363
|
// @Trace()
|
|
334
364
|
/**
|
|
335
|
-
* @
|
|
336
|
-
* @param {?}
|
|
365
|
+
* @param {?} previous
|
|
366
|
+
* @param {?} next
|
|
337
367
|
* @return {?}
|
|
338
368
|
*/
|
|
339
|
-
PlaceRouter.prototype.
|
|
369
|
+
PlaceRouter.prototype.pushVisitChangesToRoute =
|
|
340
370
|
// @Trace()
|
|
341
371
|
/**
|
|
342
|
-
* @
|
|
343
|
-
* @param {?}
|
|
372
|
+
* @param {?} previous
|
|
373
|
+
* @param {?} next
|
|
344
374
|
* @return {?}
|
|
345
375
|
*/
|
|
346
|
-
function (
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
376
|
+
function (previous, next) {
|
|
377
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
378
|
+
var _this = this;
|
|
379
|
+
return tslib_1.__generator(this, function (_a) {
|
|
380
|
+
// we have to push to history so our remember sanitisers don't pick up the previous value
|
|
381
|
+
// when it's been cleared by the user.
|
|
382
|
+
this.placeHistory.add(next);
|
|
383
|
+
// FIXME: no route id -> route id duplicates route parameters
|
|
384
|
+
if (next.hasRoutingChangedFrom(previous)) {
|
|
385
|
+
return [2 /*return*/, this.doNavigation(next, (/**
|
|
386
|
+
* @param {?} router
|
|
387
|
+
* @return {?}
|
|
388
|
+
*/
|
|
389
|
+
function (router) {
|
|
390
|
+
/** @type {?} */
|
|
391
|
+
var urlSnapshot = _this.urlService.parseUrl(_this.angularRouter.routerState.snapshot.url).updateVisitSegments(next);
|
|
392
|
+
// console.log('### Push Changes to route Redirect', { commands: urlSnapshot.url });
|
|
393
|
+
return _this.navigateByUrl(urlSnapshot);
|
|
394
|
+
}))];
|
|
395
|
+
}
|
|
396
|
+
return [2 /*return*/];
|
|
397
|
+
});
|
|
398
|
+
});
|
|
356
399
|
};
|
|
357
400
|
/**
|
|
358
401
|
* @private
|
|
359
|
-
* @param {?}
|
|
402
|
+
* @param {?} currentRouterUrl
|
|
360
403
|
* @return {?}
|
|
361
404
|
*/
|
|
362
|
-
PlaceRouter.prototype.
|
|
405
|
+
PlaceRouter.prototype.createNavigationSession = /**
|
|
363
406
|
* @private
|
|
364
|
-
* @param {?}
|
|
407
|
+
* @param {?} currentRouterUrl
|
|
365
408
|
* @return {?}
|
|
366
409
|
*/
|
|
367
|
-
function (
|
|
410
|
+
function (currentRouterUrl) {
|
|
368
411
|
/** @type {?} */
|
|
369
|
-
var
|
|
370
|
-
return
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
};
|
|
374
|
-
/**
|
|
375
|
-
* @param {?} activatedRoute
|
|
376
|
-
* @return {?}
|
|
377
|
-
*/
|
|
378
|
-
PlaceRouter.prototype.extractChildPath = /**
|
|
379
|
-
* @param {?} activatedRoute
|
|
380
|
-
* @return {?}
|
|
381
|
-
*/
|
|
382
|
-
function (activatedRoute) {
|
|
383
|
-
return _.flatten(activatedRoute.children.map((/**
|
|
384
|
-
* @param {?} child
|
|
385
|
-
* @return {?}
|
|
386
|
-
*/
|
|
387
|
-
function (child) { return child.url; })));
|
|
412
|
+
var inInteraction = this.interactionService.isActive();
|
|
413
|
+
return inInteraction ?
|
|
414
|
+
new NavigatingDuringInteraction(this.navigationContext, currentRouterUrl) :
|
|
415
|
+
new Navigating(this.navigationContext, currentRouterUrl);
|
|
388
416
|
};
|
|
417
|
+
// @Trace()
|
|
418
|
+
// @Trace()
|
|
389
419
|
/**
|
|
390
|
-
* @
|
|
391
|
-
* @
|
|
392
|
-
*/
|
|
393
|
-
PlaceRouter.prototype.parseUrl = /**
|
|
394
|
-
* @param {?} url
|
|
420
|
+
* @protected
|
|
421
|
+
* @param {?} next
|
|
395
422
|
* @return {?}
|
|
396
423
|
*/
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
};
|
|
424
|
+
PlaceRouter.prototype.transitionTo =
|
|
425
|
+
// @Trace()
|
|
400
426
|
/**
|
|
401
|
-
* @
|
|
402
|
-
* @param {?}
|
|
403
|
-
* @return {?}
|
|
404
|
-
*/
|
|
405
|
-
PlaceRouter.prototype.resetBrowserLocation = /**
|
|
406
|
-
* @param {?} url
|
|
407
|
-
* @param {?} options
|
|
427
|
+
* @protected
|
|
428
|
+
* @param {?} next
|
|
408
429
|
* @return {?}
|
|
409
430
|
*/
|
|
410
|
-
function (
|
|
411
|
-
|
|
431
|
+
function (next) {
|
|
432
|
+
/** @type {?} */
|
|
433
|
+
var previous = this.navigationSessionModel.value;
|
|
434
|
+
assert.isTruthy(next !== previous);
|
|
435
|
+
Logger.get(this).info("### Router State Transition: " + (previous ? previous.toString() : 'null') + " -> " + next.toString());
|
|
436
|
+
this.navigationSessionModel.value = next;
|
|
437
|
+
if (!!previous) {
|
|
438
|
+
previous.dispose();
|
|
439
|
+
}
|
|
440
|
+
next.notifyActive();
|
|
412
441
|
};
|
|
442
|
+
// @Trace()
|
|
443
|
+
// @Trace()
|
|
413
444
|
/**
|
|
445
|
+
* @private
|
|
446
|
+
* @param {?} visits
|
|
414
447
|
* @return {?}
|
|
415
448
|
*/
|
|
416
|
-
PlaceRouter.prototype.
|
|
417
|
-
|
|
418
|
-
*/
|
|
419
|
-
function () {
|
|
420
|
-
this.angularLocation.forward();
|
|
421
|
-
};
|
|
449
|
+
PlaceRouter.prototype.routingSessionFinished =
|
|
450
|
+
// @Trace()
|
|
422
451
|
/**
|
|
423
|
-
* @
|
|
424
|
-
* @
|
|
425
|
-
*/
|
|
426
|
-
PlaceRouter.prototype.createUrlSnapshot = /**
|
|
427
|
-
* @param {...?} visits
|
|
452
|
+
* @private
|
|
453
|
+
* @param {?} visits
|
|
428
454
|
* @return {?}
|
|
429
455
|
*/
|
|
430
|
-
function () {
|
|
456
|
+
function (visits) {
|
|
431
457
|
var _this = this;
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
visits
|
|
458
|
+
if (visits && visits.length > 0) {
|
|
459
|
+
assert.isTruthy(this.navigationInProgress.value);
|
|
460
|
+
visits.forEach((/**
|
|
461
|
+
* @param {?} v
|
|
462
|
+
* @return {?}
|
|
463
|
+
*/
|
|
464
|
+
function (v) { return _this.placeHistory.add(v); }));
|
|
465
|
+
// We update the active visits before we finish the session so the
|
|
466
|
+
// place outlets can ignore the incoming changes until things are
|
|
467
|
+
// settled. TODO: can we removed the event'ness here and just do a push?
|
|
468
|
+
this._activeVisits.value = visits;
|
|
435
469
|
}
|
|
436
470
|
/** @type {?} */
|
|
437
|
-
var
|
|
438
|
-
|
|
439
|
-
|
|
471
|
+
var session = this.currentSession;
|
|
472
|
+
session.dispose();
|
|
473
|
+
this.navigationSessionModel.value = null;
|
|
474
|
+
console.log("### Router Session Finished (was " + session.toString() + ")");
|
|
475
|
+
this.sessionFinishedJobs.forEach((/**
|
|
476
|
+
* @param {?} job
|
|
440
477
|
* @return {?}
|
|
441
478
|
*/
|
|
442
|
-
function (
|
|
443
|
-
|
|
444
|
-
}));
|
|
445
|
-
return this.parseUrl(bits.join(''));
|
|
446
|
-
};
|
|
447
|
-
/**
|
|
448
|
-
* @return {?}
|
|
449
|
-
*/
|
|
450
|
-
PlaceRouter.prototype.getCurrentRouterUrl = /**
|
|
451
|
-
* @return {?}
|
|
452
|
-
*/
|
|
453
|
-
function () {
|
|
454
|
-
return this.router.routerState ? this.router.routerState.snapshot.url : null;
|
|
479
|
+
function (job) { return job(); }));
|
|
480
|
+
this.sessionFinishedJobs = [];
|
|
455
481
|
};
|
|
456
482
|
/**
|
|
483
|
+
* @private
|
|
484
|
+
* @param {?} func
|
|
457
485
|
* @return {?}
|
|
458
486
|
*/
|
|
459
|
-
PlaceRouter.prototype.
|
|
487
|
+
PlaceRouter.prototype.runAfterRoutingSessionFinishes = /**
|
|
488
|
+
* @private
|
|
489
|
+
* @param {?} func
|
|
460
490
|
* @return {?}
|
|
461
491
|
*/
|
|
462
|
-
function () {
|
|
463
|
-
|
|
492
|
+
function (func) {
|
|
493
|
+
assert.isTruthy(this.navigationInProgress);
|
|
494
|
+
this.sessionFinishedJobs.push(func);
|
|
464
495
|
};
|
|
465
496
|
/**
|
|
466
|
-
*
|
|
467
|
-
*
|
|
497
|
+
* Sync's the current interaction state with the URL. We need to push something in the URL in order
|
|
498
|
+
* to be able to capture the back button on the first page. If we don't then the back click will exit
|
|
499
|
+
* the app directly and we don't get to ask.
|
|
468
500
|
*/
|
|
469
|
-
PlaceRouter.prototype.getActiveInteractionIdsFromUrl = /**
|
|
470
|
-
* @param {?} url
|
|
471
|
-
* @return {?}
|
|
472
|
-
*/
|
|
473
|
-
function (url) {
|
|
474
|
-
return this.parseUrl(url).getInteractionIds();
|
|
475
|
-
};
|
|
476
|
-
// @Trace()
|
|
477
501
|
// @Trace()
|
|
478
502
|
/**
|
|
479
|
-
*
|
|
503
|
+
* Sync's the current interaction state with the URL. We need to push something in the URL in order
|
|
504
|
+
* to be able to capture the back button on the first page. If we don't then the back click will exit
|
|
505
|
+
* the app directly and we don't get to ask.
|
|
480
506
|
* @return {?}
|
|
481
507
|
*/
|
|
482
|
-
PlaceRouter.prototype.hasActiveInteractionIds =
|
|
483
508
|
// @Trace()
|
|
484
|
-
/**
|
|
485
|
-
*
|
|
509
|
+
PlaceRouter.prototype.syncInteractionContextIdsWithRouter = /**
|
|
510
|
+
* Sync's the current interaction state with the URL. We need to push something in the URL in order
|
|
511
|
+
* to be able to capture the back button on the first page. If we don't then the back click will exit
|
|
512
|
+
* the app directly and we don't get to ask.
|
|
486
513
|
* @return {?}
|
|
487
514
|
*/
|
|
488
|
-
function (url) {
|
|
489
|
-
return this.getActiveInteractionIdsFromUrl(url).length > 0;
|
|
490
|
-
};
|
|
491
|
-
// @Trace()
|
|
492
515
|
// @Trace()
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
516
|
+
function () {
|
|
517
|
+
var _this = this;
|
|
518
|
+
if (this.navigationSession) {
|
|
519
|
+
// console.log(`Navigation active -> ${this.navigationSession.toString()}, sync delayed until finished.`);
|
|
520
|
+
/** @type {?} */
|
|
521
|
+
var session = this.navigationSession;
|
|
522
|
+
return new Promise((/**
|
|
523
|
+
* @param {?} resolve
|
|
524
|
+
* @param {?} reject
|
|
525
|
+
* @return {?}
|
|
526
|
+
*/
|
|
527
|
+
function (resolve, reject) {
|
|
528
|
+
_this.runAfterRoutingSessionFinishes((/**
|
|
529
|
+
* @return {?}
|
|
530
|
+
*/
|
|
531
|
+
function () {
|
|
532
|
+
_this.runAfterRoutingSessionFinishes(resolve);
|
|
533
|
+
/** @type {?} */
|
|
534
|
+
var syncSession = new SynchroniseInteractionContextIdsWithRoute(_this.navigationContext, _this.urlService.getCurrentRouterUrl(), false);
|
|
535
|
+
_this.transitionTo(syncSession);
|
|
536
|
+
}));
|
|
537
|
+
}));
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
return new Promise(((/**
|
|
541
|
+
* @param {?} resolve
|
|
542
|
+
* @param {?} reject
|
|
543
|
+
* @return {?}
|
|
544
|
+
*/
|
|
545
|
+
function (resolve, reject) {
|
|
546
|
+
// console.log(`No navigation in progress, starting synchronisation job`);
|
|
547
|
+
_this.runAfterRoutingSessionFinishes(resolve);
|
|
548
|
+
/** @type {?} */
|
|
549
|
+
var session = new SynchroniseInteractionContextIdsWithRoute(_this.navigationContext, _this.urlService.getCurrentRouterUrl(), false);
|
|
550
|
+
_this.transitionTo(session);
|
|
551
|
+
})));
|
|
552
|
+
}
|
|
507
553
|
};
|
|
508
|
-
// TODO: Should this be moved to the navigation states?
|
|
509
|
-
// TODO: Should this be moved to the navigation states?
|
|
510
554
|
/**
|
|
511
|
-
* @
|
|
512
|
-
* @param {?}
|
|
555
|
+
* @private
|
|
556
|
+
* @param {?} visit
|
|
513
557
|
* @return {?}
|
|
514
558
|
*/
|
|
515
|
-
PlaceRouter.prototype.
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
* @param {?} currentIds
|
|
519
|
-
* @param {?} previous
|
|
559
|
+
PlaceRouter.prototype.createRouteParameters = /**
|
|
560
|
+
* @private
|
|
561
|
+
* @param {?} visit
|
|
520
562
|
* @return {?}
|
|
521
563
|
*/
|
|
522
|
-
function (
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
});
|
|
529
|
-
if (_.isEqual(currentIds, previous)) {
|
|
530
|
-
console.log('activity ids were the same, skipping');
|
|
531
|
-
}
|
|
532
|
-
else {
|
|
533
|
-
// OMG, this is nuts.
|
|
534
|
-
/** @type {?} */
|
|
535
|
-
var addingActivity = currentIds.length > previous.length;
|
|
536
|
-
/** @type {?} */
|
|
537
|
-
var isFirstActivity = addingActivity && previous.length < 1;
|
|
538
|
-
/** @type {?} */
|
|
539
|
-
var removingLastActivity = currentIds.length < 1;
|
|
540
|
-
if (addingActivity) { // we're starting a new activity, push the change to the history and update the url
|
|
541
|
-
console.log('adding activity');
|
|
542
|
-
this.navigateByUrl(this.getCurrentRouteSnapshot().updateInteractionIds(currentIds), {
|
|
543
|
-
replaceUrl: !isFirstActivity // we don't let the history pile up
|
|
544
|
-
});
|
|
545
|
-
}
|
|
546
|
-
else {
|
|
547
|
-
/** @type {?} */
|
|
548
|
-
var urlSnapshot = this.getCurrentRouteSnapshot().updateInteractionIds(currentIds);
|
|
549
|
-
if (removingLastActivity) {
|
|
550
|
-
this.navigateByUrl(urlSnapshot, {
|
|
551
|
-
replaceUrl: true
|
|
552
|
-
}).then((/**
|
|
553
|
-
* @return {?}
|
|
554
|
-
*/
|
|
555
|
-
function () {
|
|
556
|
-
// for some reason we need to pop the last history off the stack when leaving the
|
|
557
|
-
// active activity state.
|
|
558
|
-
_this.angularLocation.back();
|
|
559
|
-
}));
|
|
560
|
-
}
|
|
561
|
-
else {
|
|
562
|
-
this.navigateByUrl(urlSnapshot, {
|
|
563
|
-
replaceUrl: true
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
}
|
|
564
|
+
function (visit) {
|
|
565
|
+
/** @type {?} */
|
|
566
|
+
var def = visit.placeDefinition;
|
|
567
|
+
return visit.hasRouteId() ?
|
|
568
|
+
[def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
|
|
569
|
+
[def.getFormattedRouteParameters(visit)];
|
|
568
570
|
};
|
|
569
571
|
PlaceRouter.decorators = [
|
|
570
572
|
{ type: Injectable, args: [{
|
|
@@ -574,64 +576,68 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
574
576
|
/** @nocollapse */
|
|
575
577
|
PlaceRouter.ctorParameters = function () { return [
|
|
576
578
|
{ type: Router },
|
|
577
|
-
{ type: UrlSerializer },
|
|
578
579
|
{ type: Location },
|
|
579
|
-
{ type:
|
|
580
|
-
{ type:
|
|
580
|
+
{ type: InteractionService },
|
|
581
|
+
{ type: UrlService },
|
|
582
|
+
{ type: PlaceHistory }
|
|
581
583
|
]; };
|
|
582
|
-
/** @nocollapse */ PlaceRouter.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(i0.ɵɵinject(i1.Router), i0.ɵɵinject(
|
|
584
|
+
/** @nocollapse */ PlaceRouter.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.Location), i0.ɵɵinject(i3.InteractionService), i0.ɵɵinject(i4.UrlService), i0.ɵɵinject(i5.PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
|
|
583
585
|
return PlaceRouter;
|
|
584
586
|
}(GarbageCollector));
|
|
585
587
|
export { PlaceRouter };
|
|
586
588
|
if (false) {
|
|
589
|
+
/** @type {?} */
|
|
590
|
+
PlaceRouter.prototype.navigationSessionModel;
|
|
591
|
+
/** @type {?} */
|
|
592
|
+
PlaceRouter.prototype.navigationInProgress;
|
|
593
|
+
/** @type {?} */
|
|
594
|
+
PlaceRouter.prototype.navigationSessionName;
|
|
587
595
|
/**
|
|
588
596
|
* @type {?}
|
|
589
597
|
* @private
|
|
590
598
|
*/
|
|
591
|
-
PlaceRouter.prototype.
|
|
599
|
+
PlaceRouter.prototype.navigationContext;
|
|
592
600
|
/**
|
|
593
601
|
* @type {?}
|
|
594
602
|
* @private
|
|
595
603
|
*/
|
|
596
604
|
PlaceRouter.prototype._activeVisits;
|
|
597
605
|
/** @type {?} */
|
|
598
|
-
PlaceRouter.prototype.
|
|
599
|
-
/** @type {?} */
|
|
600
|
-
PlaceRouter.prototype.activeVisitIndex;
|
|
606
|
+
PlaceRouter.prototype.activeVisitsByPlaceDefinition;
|
|
601
607
|
/**
|
|
602
608
|
* @type {?}
|
|
603
609
|
* @private
|
|
604
610
|
*/
|
|
605
|
-
PlaceRouter.prototype.
|
|
611
|
+
PlaceRouter.prototype.routerInteractionAdapter;
|
|
606
612
|
/**
|
|
607
613
|
* @type {?}
|
|
608
614
|
* @private
|
|
609
615
|
*/
|
|
610
|
-
PlaceRouter.prototype.
|
|
616
|
+
PlaceRouter.prototype.sessionFinishedJobs;
|
|
611
617
|
/**
|
|
612
618
|
* @type {?}
|
|
613
619
|
* @private
|
|
614
620
|
*/
|
|
615
|
-
PlaceRouter.prototype.
|
|
621
|
+
PlaceRouter.prototype.angularRouter;
|
|
616
622
|
/**
|
|
617
623
|
* @type {?}
|
|
618
624
|
* @private
|
|
619
625
|
*/
|
|
620
|
-
PlaceRouter.prototype.
|
|
626
|
+
PlaceRouter.prototype.angularLocation;
|
|
621
627
|
/**
|
|
622
628
|
* @type {?}
|
|
623
629
|
* @private
|
|
624
630
|
*/
|
|
625
|
-
PlaceRouter.prototype.
|
|
631
|
+
PlaceRouter.prototype.interactionService;
|
|
626
632
|
/**
|
|
627
633
|
* @type {?}
|
|
628
634
|
* @private
|
|
629
635
|
*/
|
|
630
|
-
PlaceRouter.prototype.
|
|
636
|
+
PlaceRouter.prototype.urlService;
|
|
631
637
|
/**
|
|
632
638
|
* @type {?}
|
|
633
639
|
* @private
|
|
634
640
|
*/
|
|
635
|
-
PlaceRouter.prototype.
|
|
641
|
+
PlaceRouter.prototype.placeHistory;
|
|
636
642
|
}
|
|
637
643
|
//# sourceMappingURL=place-router.js.map
|