@coolon/angular-ui-powerups 0.0.126 → 0.0.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/coolon-angular-ui-powerups.umd.js +3753 -3020
- 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 +314 -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 +414 -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 +2644 -2266
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +3703 -2982
- 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,53 +5,78 @@
|
|
|
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
|
export class PlaceRouter extends GarbageCollector {
|
|
21
26
|
/**
|
|
22
|
-
* @param {?}
|
|
23
|
-
* @param {?} urlSerializer
|
|
27
|
+
* @param {?} angularRouter
|
|
24
28
|
* @param {?} angularLocation
|
|
25
|
-
* @param {?} placeHistory
|
|
26
29
|
* @param {?} interactionService
|
|
30
|
+
* @param {?} urlService
|
|
31
|
+
* @param {?} placeHistory
|
|
27
32
|
*/
|
|
28
|
-
constructor(
|
|
33
|
+
constructor(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
|
|
29
34
|
super();
|
|
30
|
-
this.
|
|
31
|
-
this.urlSerializer = urlSerializer;
|
|
35
|
+
this.angularRouter = angularRouter;
|
|
32
36
|
this.angularLocation = angularLocation;
|
|
33
|
-
this.placeHistory = placeHistory;
|
|
34
37
|
this.interactionService = interactionService;
|
|
35
|
-
this.
|
|
38
|
+
this.urlService = urlService;
|
|
39
|
+
this.placeHistory = placeHistory;
|
|
40
|
+
this.navigationSessionModel = new MutableValueModel();
|
|
36
41
|
this._activeVisits = new MutableListModel();
|
|
37
|
-
|
|
38
|
-
this.
|
|
39
|
-
this
|
|
40
|
-
this.
|
|
41
|
-
* @param {?}
|
|
42
|
+
this.sessionFinishedJobs = [];
|
|
43
|
+
this.routerInteractionAdapter = interactionService.registerPlaceRouter(this);
|
|
44
|
+
// TODO: Make this an interface and use 'this' instead.
|
|
45
|
+
this.navigationContext = new NavigationContext.Impl(this.urlService, this.routerInteractionAdapter, (/**
|
|
46
|
+
* @param {?} urlSnapshot
|
|
47
|
+
* @param {?} options
|
|
42
48
|
* @return {?}
|
|
43
49
|
*/
|
|
44
|
-
|
|
45
|
-
this.
|
|
46
|
-
})
|
|
47
|
-
this._navigationStateModel.value = new NavigationState.Idle(this._navigationSessionContext);
|
|
48
|
-
this._navigationStateTypeModel = chain(this._navigationStateModel).map((/**
|
|
50
|
+
(urlSnapshot, options) => {
|
|
51
|
+
return this.navigateByUrl(urlSnapshot, options);
|
|
52
|
+
}), (/**
|
|
49
53
|
* @param {?} state
|
|
50
54
|
* @return {?}
|
|
51
55
|
*/
|
|
52
|
-
state =>
|
|
56
|
+
state => {
|
|
57
|
+
this.transitionTo(state);
|
|
58
|
+
}), (/**
|
|
59
|
+
* @param {?} visits
|
|
60
|
+
* @return {?}
|
|
61
|
+
*/
|
|
62
|
+
visits => {
|
|
63
|
+
this.routingSessionFinished(visits);
|
|
64
|
+
}));
|
|
65
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
66
|
+
this.navigationInProgress = chain(this.navigationSessionModel).isNotNil();
|
|
67
|
+
/** @type {?} */
|
|
68
|
+
const idleStateName = chain(this.interactionService.active).map((/**
|
|
69
|
+
* @param {?} active
|
|
70
|
+
* @return {?}
|
|
71
|
+
*/
|
|
72
|
+
active => active ? 'IdleDuringInteraction' : 'Idle'));
|
|
73
|
+
this.navigationSessionName = chain(this.navigationSessionModel)
|
|
74
|
+
.pluck('name')
|
|
75
|
+
.otherwise(idleStateName);
|
|
76
|
+
DebugContext.tag(this._activeVisits, "PlaceRouter.activeVisits");
|
|
77
|
+
this.activeVisitsByPlaceDefinition = chain(this._activeVisits).indexBy('placeDefinition');
|
|
53
78
|
// TODO: make setup the callbacks in during module initiation to make this testable.
|
|
54
|
-
|
|
79
|
+
angularRouter.events.subscribe((/**
|
|
55
80
|
* @param {?} event
|
|
56
81
|
* @return {?}
|
|
57
82
|
*/
|
|
@@ -63,154 +88,199 @@ export class PlaceRouter extends GarbageCollector {
|
|
|
63
88
|
// NavigationStart -> .... -> NavigationError --> navigation aborted, end session.
|
|
64
89
|
// =======================
|
|
65
90
|
if (event instanceof NavigationStart) {
|
|
91
|
+
// console.log(`---> NavigationStart[${event.id}]: ${event.url} (${event.navigationTrigger})`);
|
|
66
92
|
if (event.navigationTrigger === 'popstate') {
|
|
67
|
-
this.
|
|
68
|
-
* @param {?} state
|
|
69
|
-
* @return {?}
|
|
70
|
-
*/
|
|
71
|
-
state => state.onPopState(event)));
|
|
93
|
+
this.onPopState(event);
|
|
72
94
|
}
|
|
73
95
|
else {
|
|
74
|
-
this.
|
|
75
|
-
* @param {?} state
|
|
76
|
-
* @return {?}
|
|
77
|
-
*/
|
|
78
|
-
state => state.onRouterStarted(event)));
|
|
96
|
+
this.onRouterStarted(event);
|
|
79
97
|
}
|
|
98
|
+
// console.log(`<--- NavigationStart[${event.id}]: ${event.url} (${event.navigationTrigger})`);
|
|
80
99
|
}
|
|
81
100
|
if (event instanceof NavigationEnd) {
|
|
82
|
-
console.log(event);
|
|
83
|
-
this.
|
|
84
|
-
|
|
85
|
-
* @return {?}
|
|
86
|
-
*/
|
|
87
|
-
state => state.onRouterEnd(event)));
|
|
101
|
+
// console.log(`---> NavigationEnd[${event.id}]: ${event.url}`);
|
|
102
|
+
this.onRouterEnd(event);
|
|
103
|
+
// console.log(`<--- NavigationEnd[${event.id}]: ${event.url}`);
|
|
88
104
|
}
|
|
89
105
|
if (event instanceof NavigationError) {
|
|
90
|
-
console.log(event);
|
|
91
|
-
this.
|
|
92
|
-
|
|
93
|
-
* @return {?}
|
|
94
|
-
*/
|
|
95
|
-
state => state.onRouterError(event)));
|
|
106
|
+
// console.log(`---> NavigationError[${event.id}]: ${event.url}`);
|
|
107
|
+
this.onRouterError(event);
|
|
108
|
+
// console.log(`<--- NavigationError[${event.id}]: ${event.url}`);
|
|
96
109
|
}
|
|
97
110
|
if (event instanceof NavigationCancel) {
|
|
98
|
-
console.log(event);
|
|
99
|
-
this.
|
|
100
|
-
|
|
101
|
-
* @return {?}
|
|
102
|
-
*/
|
|
103
|
-
state => state.onRouterCancelled(event)));
|
|
111
|
+
// console.log(`---> NavigationCancel[${event.id}]: ${event.url}`);
|
|
112
|
+
this.onRouterCancelled(event);
|
|
113
|
+
// console.log(`<--- NavigationCancel[${event.id}]: ${event.url}`);
|
|
104
114
|
}
|
|
105
115
|
}));
|
|
106
|
-
//
|
|
107
|
-
|
|
108
|
-
* @param {?} ids
|
|
109
|
-
* @param {?} previous
|
|
110
|
-
* @return {?}
|
|
111
|
-
*/
|
|
112
|
-
(ids, previous) => {
|
|
113
|
-
this.syncInteractionIdsWithRouter(ids, previous);
|
|
114
|
-
}), { unless: this.navigationInProgress }); // TODO: I think the exclusive interaction prevents interactions starting while it's active so we might not need this.
|
|
115
|
-
// TODO: I think the exclusive interaction prevents interactions starting while it's active so we might not need this.
|
|
116
|
-
/** @type {?} */
|
|
117
|
-
const urlChanges = new MutableStream();
|
|
118
|
-
// The angular router doesn't always fire router events when the back button is pushed while a navigation
|
|
119
|
-
// session is in progress. Sometimes we only know about it from the url change.
|
|
120
|
-
// IMPORTANT ORDER DEPENDENCY
|
|
121
|
-
// This only works because we're notified of the change after the router has started reacting to it. This
|
|
122
|
-
// we can can use our navigationState to determine things.
|
|
116
|
+
// The router needs to know about url changes and in some cases they are the only way the router can know if
|
|
117
|
+
// the back button was clicked.
|
|
123
118
|
angularLocation.onUrlChange((/**
|
|
124
119
|
* @param {?} url
|
|
125
120
|
* @return {?}
|
|
126
121
|
*/
|
|
127
|
-
url =>
|
|
122
|
+
url => this.onUrlChanged(url)));
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* @return {?}
|
|
126
|
+
*/
|
|
127
|
+
get navigationSession() {
|
|
128
|
+
return this.navigationSessionModel.value;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* @return {?}
|
|
132
|
+
*/
|
|
133
|
+
get currentSession() {
|
|
134
|
+
return this.navigationSessionModel.value;
|
|
135
|
+
}
|
|
136
|
+
// @Trace()
|
|
137
|
+
/**
|
|
138
|
+
* @param {?} event
|
|
139
|
+
* @return {?}
|
|
140
|
+
*/
|
|
141
|
+
onPopState(event) {
|
|
142
|
+
assert.isTruthy(event.navigationTrigger === 'popstate');
|
|
143
|
+
if (this.currentSession) {
|
|
144
|
+
this.currentSession.onPopState(event);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
128
147
|
/** @type {?} */
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
* @param {?} state
|
|
139
|
-
* @return {?}
|
|
140
|
-
*/
|
|
141
|
-
state => state.onBackClickedDuringNavigationInteraction(url)));
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}));
|
|
148
|
+
const poppedHistoryUrl = event.url;
|
|
149
|
+
/** @type {?} */
|
|
150
|
+
const currentRouterUrl = this.urlService.getCurrentRouterUrl();
|
|
151
|
+
/** @type {?} */
|
|
152
|
+
const session = this.interactionService.isActive() ?
|
|
153
|
+
new PopStateDuringInteractionNavigation(this.navigationContext, currentRouterUrl, poppedHistoryUrl) :
|
|
154
|
+
new PopStateNavigation(this.navigationContext, currentRouterUrl, poppedHistoryUrl);
|
|
155
|
+
this.transitionTo(session);
|
|
156
|
+
}
|
|
145
157
|
}
|
|
158
|
+
// @Trace()
|
|
146
159
|
/**
|
|
147
|
-
* @
|
|
148
|
-
* @param {?} session
|
|
160
|
+
* @param {?} event
|
|
149
161
|
* @return {?}
|
|
150
162
|
*/
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
// changes that occur while routerNavigationActive is true.
|
|
154
|
-
assert.isTruthy(this.navigationInProgress.value);
|
|
163
|
+
onRouterStarted(event) {
|
|
164
|
+
assert.isFalsey(event.navigationTrigger === 'popstate');
|
|
155
165
|
/** @type {?} */
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
const inInteraction = this.interactionService.isActive();
|
|
167
|
+
if (this.currentSession) {
|
|
168
|
+
this.currentSession.onRouterStarted(event);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.transitionTo(this.createNavigationSession(this.urlService.getCurrentRouterUrl()));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
// @Trace()
|
|
175
|
+
/**
|
|
176
|
+
* @param {?} newUrl
|
|
177
|
+
* @return {?}
|
|
178
|
+
*/
|
|
179
|
+
onUrlChanged(newUrl) {
|
|
180
|
+
// the back button can trigger a url change without a navigation session in progress so we
|
|
181
|
+
// console.log(`---> Url Changed ${newUrl}`);
|
|
182
|
+
if (this.currentSession) {
|
|
183
|
+
this.currentSession.onUrlChange(newUrl);
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
console.log('FYI: url changed without a navigation session in progress');
|
|
187
|
+
}
|
|
188
|
+
// console.log(`<--- Url Changed`);
|
|
163
189
|
}
|
|
190
|
+
// @Trace()
|
|
164
191
|
/**
|
|
192
|
+
* @param {?} event
|
|
165
193
|
* @return {?}
|
|
166
194
|
*/
|
|
167
|
-
|
|
168
|
-
|
|
195
|
+
onRouterCancelled(event) {
|
|
196
|
+
this.currentSession.onRouterCancelled(event);
|
|
169
197
|
}
|
|
198
|
+
// @Trace()
|
|
170
199
|
/**
|
|
200
|
+
* @param {?} event
|
|
171
201
|
* @return {?}
|
|
172
202
|
*/
|
|
173
|
-
|
|
174
|
-
|
|
203
|
+
onRouterError(event) {
|
|
204
|
+
this.currentSession.onRouterError(event);
|
|
175
205
|
}
|
|
206
|
+
// @Trace()
|
|
176
207
|
/**
|
|
208
|
+
* @param {?} event
|
|
177
209
|
* @return {?}
|
|
178
210
|
*/
|
|
179
|
-
|
|
180
|
-
|
|
211
|
+
onRouterEnd(event) {
|
|
212
|
+
this.currentSession.onRouterEnd(event);
|
|
181
213
|
}
|
|
182
214
|
/**
|
|
183
|
-
* placeRouter.navigate(placeDestinations.somePlace.createVisit(routeId, ...visitParams));
|
|
184
215
|
* @param {?} visit
|
|
185
216
|
* @param {?=} options
|
|
186
217
|
* @return {?}
|
|
187
218
|
*/
|
|
188
219
|
navigate(visit, options) {
|
|
220
|
+
return this.doNavigation(visit, (/**
|
|
221
|
+
* @param {?} router
|
|
222
|
+
* @return {?}
|
|
223
|
+
*/
|
|
224
|
+
(router) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
225
|
+
/** @type {?} */
|
|
226
|
+
const commands = [
|
|
227
|
+
visit.placeDefinition.path,
|
|
228
|
+
...this.createRouteParameters(visit)
|
|
229
|
+
];
|
|
230
|
+
yield this.angularRouter.navigate(commands, {
|
|
231
|
+
relativeTo: options ? options.relativeTo : null
|
|
232
|
+
});
|
|
233
|
+
})));
|
|
234
|
+
}
|
|
235
|
+
// @Trace()
|
|
236
|
+
/**
|
|
237
|
+
* @param {?} visit
|
|
238
|
+
* @param {?} runNavigationCommands
|
|
239
|
+
* @return {?}
|
|
240
|
+
*/
|
|
241
|
+
doNavigation(visit, runNavigationCommands) {
|
|
189
242
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
190
|
-
this.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
243
|
+
if (this.navigationInProgress.value) {
|
|
244
|
+
lang.illegalState('Navigation already in progress');
|
|
245
|
+
}
|
|
246
|
+
/** @type {?} */
|
|
247
|
+
const navigation = this.createNavigationSession(this.urlService.getCurrentRouterUrl());
|
|
248
|
+
navigation.storeVisit(visit);
|
|
249
|
+
this.transitionTo(navigation);
|
|
250
|
+
try {
|
|
251
|
+
yield runNavigationCommands(this.angularRouter);
|
|
252
|
+
}
|
|
253
|
+
finally {
|
|
254
|
+
// Check if the router has finished (in the case where no router change required) and we're still in a
|
|
255
|
+
// transient state and finish of the transition.
|
|
256
|
+
if (!this.angularRouter.getCurrentNavigation() && this.currentSession) {
|
|
257
|
+
this.currentSession.onRouterEnd(new NavigationEnd(-1, '', ''));
|
|
258
|
+
}
|
|
259
|
+
}
|
|
204
260
|
});
|
|
205
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* @param {?} urlSnapshot
|
|
264
|
+
* @param {?=} navigationExtras
|
|
265
|
+
* @return {?}
|
|
266
|
+
*/
|
|
267
|
+
navigateByUrl(urlSnapshot, navigationExtras) {
|
|
268
|
+
// console.log(`### navigationByUrl -> ${urlSnapshot.urlTree.toString()}`);
|
|
269
|
+
return this.angularRouter.navigateByUrl(urlSnapshot.urlTree, navigationExtras);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* @return {?}
|
|
273
|
+
*/
|
|
274
|
+
get activeVisits() {
|
|
275
|
+
return this._activeVisits.readonly;
|
|
276
|
+
}
|
|
206
277
|
// @Trace()
|
|
207
278
|
/**
|
|
208
|
-
* @param {?} activatedRoute
|
|
209
279
|
* @param {?} previous
|
|
210
280
|
* @param {?} next
|
|
211
281
|
* @return {?}
|
|
212
282
|
*/
|
|
213
|
-
pushVisitChangesToRoute(
|
|
283
|
+
pushVisitChangesToRoute(previous, next) {
|
|
214
284
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
215
285
|
// we have to push to history so our remember sanitisers don't pick up the previous value
|
|
216
286
|
// when it's been cleared by the user.
|
|
@@ -223,214 +293,145 @@ export class PlaceRouter extends GarbageCollector {
|
|
|
223
293
|
*/
|
|
224
294
|
router => {
|
|
225
295
|
/** @type {?} */
|
|
226
|
-
const urlSnapshot = this.parseUrl(this.
|
|
227
|
-
console.log('### Push Changes to route Redirect', { commands: urlSnapshot.url });
|
|
296
|
+
const urlSnapshot = this.urlService.parseUrl(this.angularRouter.routerState.snapshot.url).updateVisitSegments(next);
|
|
297
|
+
// console.log('### Push Changes to route Redirect', { commands: urlSnapshot.url });
|
|
228
298
|
return this.navigateByUrl(urlSnapshot);
|
|
229
299
|
}));
|
|
230
300
|
}
|
|
231
301
|
});
|
|
232
302
|
}
|
|
233
303
|
/**
|
|
234
|
-
* @
|
|
235
|
-
* @param {?}
|
|
304
|
+
* @private
|
|
305
|
+
* @param {?} currentRouterUrl
|
|
236
306
|
* @return {?}
|
|
237
307
|
*/
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
this.
|
|
244
|
-
* @param {?} current
|
|
245
|
-
* @return {?}
|
|
246
|
-
*/
|
|
247
|
-
current => {
|
|
248
|
-
/** @type {?} */
|
|
249
|
-
const session = this.navigationState.onPlaceNavigationStart(visit, this.getCurrentRouterUrl());
|
|
250
|
-
session.storeVisit(visit);
|
|
251
|
-
return session;
|
|
252
|
-
}));
|
|
253
|
-
try {
|
|
254
|
-
yield runNavigationCommands(this.router);
|
|
255
|
-
}
|
|
256
|
-
finally {
|
|
257
|
-
// Router has finished (since there was no router change required) so we
|
|
258
|
-
// need to end the navigation session.
|
|
259
|
-
if (this.navigationState.isTransitional && !this.router.getCurrentNavigation()) {
|
|
260
|
-
this.runStateTransition((/**
|
|
261
|
-
* @param {?} session
|
|
262
|
-
* @return {?}
|
|
263
|
-
*/
|
|
264
|
-
session => session.onRouterEnd(new NavigationEnd(-1, '', ''))));
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
});
|
|
308
|
+
createNavigationSession(currentRouterUrl) {
|
|
309
|
+
/** @type {?} */
|
|
310
|
+
const inInteraction = this.interactionService.isActive();
|
|
311
|
+
return inInteraction ?
|
|
312
|
+
new NavigatingDuringInteraction(this.navigationContext, currentRouterUrl) :
|
|
313
|
+
new Navigating(this.navigationContext, currentRouterUrl);
|
|
268
314
|
}
|
|
269
315
|
// @Trace()
|
|
270
316
|
/**
|
|
271
317
|
* @protected
|
|
272
|
-
* @param {?}
|
|
318
|
+
* @param {?} next
|
|
273
319
|
* @return {?}
|
|
274
320
|
*/
|
|
275
|
-
|
|
276
|
-
/** @type {?} */
|
|
277
|
-
const previous = this._navigationStateModel.value;
|
|
321
|
+
transitionTo(next) {
|
|
278
322
|
/** @type {?} */
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
|
|
323
|
+
const previous = this.navigationSessionModel.value;
|
|
324
|
+
assert.isTruthy(next !== previous);
|
|
325
|
+
Logger.get(this).info(`### Router State Transition: ${previous ? previous.toString() : 'null'} -> ${next.toString()}`);
|
|
326
|
+
this.navigationSessionModel.value = next;
|
|
327
|
+
if (!!previous) {
|
|
282
328
|
previous.dispose();
|
|
283
|
-
Logger.get(this).info(`Router State Transition: ${previous.toString()} -> ${next.toString()}`);
|
|
284
329
|
}
|
|
330
|
+
next.notifyActive();
|
|
285
331
|
}
|
|
332
|
+
// @Trace()
|
|
286
333
|
/**
|
|
287
334
|
* @private
|
|
288
|
-
* @param {?}
|
|
289
|
-
* @return {?}
|
|
290
|
-
*/
|
|
291
|
-
createRouteParameters(visit) {
|
|
292
|
-
/** @type {?} */
|
|
293
|
-
const def = visit.placeDefinition;
|
|
294
|
-
return visit.hasRouteId() ?
|
|
295
|
-
[def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
|
|
296
|
-
[def.getFormattedRouteParameters(visit)];
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* @param {?} activatedRoute
|
|
300
|
-
* @return {?}
|
|
301
|
-
*/
|
|
302
|
-
extractChildPath(activatedRoute) {
|
|
303
|
-
return _.flatten(activatedRoute.children.map((/**
|
|
304
|
-
* @param {?} child
|
|
305
|
-
* @return {?}
|
|
306
|
-
*/
|
|
307
|
-
child => child.url)));
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* @param {?} url
|
|
335
|
+
* @param {?} visits
|
|
311
336
|
* @return {?}
|
|
312
337
|
*/
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
*/
|
|
327
|
-
forward() {
|
|
328
|
-
this.angularLocation.forward();
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* @param {...?} visits
|
|
332
|
-
* @return {?}
|
|
333
|
-
*/
|
|
334
|
-
createUrlSnapshot(...visits) {
|
|
338
|
+
routingSessionFinished(visits) {
|
|
339
|
+
if (visits && visits.length > 0) {
|
|
340
|
+
assert.isTruthy(this.navigationInProgress.value);
|
|
341
|
+
visits.forEach((/**
|
|
342
|
+
* @param {?} v
|
|
343
|
+
* @return {?}
|
|
344
|
+
*/
|
|
345
|
+
v => this.placeHistory.add(v)));
|
|
346
|
+
// We update the active visits before we finish the session so the
|
|
347
|
+
// place outlets can ignore the incoming changes until things are
|
|
348
|
+
// settled. TODO: can we removed the event'ness here and just do a push?
|
|
349
|
+
this._activeVisits.value = visits;
|
|
350
|
+
}
|
|
335
351
|
/** @type {?} */
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
|
|
352
|
+
const session = this.currentSession;
|
|
353
|
+
session.dispose();
|
|
354
|
+
this.navigationSessionModel.value = null;
|
|
355
|
+
console.log(`### Router Session Finished (was ${session.toString()})`);
|
|
356
|
+
this.sessionFinishedJobs.forEach((/**
|
|
357
|
+
* @param {?} job
|
|
339
358
|
* @return {?}
|
|
340
359
|
*/
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}));
|
|
344
|
-
return this.parseUrl(bits.join(''));
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* @return {?}
|
|
348
|
-
*/
|
|
349
|
-
getCurrentRouterUrl() {
|
|
350
|
-
return this.router.routerState ? this.router.routerState.snapshot.url : null;
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* @return {?}
|
|
354
|
-
*/
|
|
355
|
-
getCurrentRouteSnapshot() {
|
|
356
|
-
return this.parseUrl(this.getCurrentRouterUrl());
|
|
360
|
+
job => job()));
|
|
361
|
+
this.sessionFinishedJobs = [];
|
|
357
362
|
}
|
|
358
363
|
/**
|
|
359
|
-
* @
|
|
364
|
+
* @private
|
|
365
|
+
* @param {?} func
|
|
360
366
|
* @return {?}
|
|
361
367
|
*/
|
|
362
|
-
|
|
363
|
-
|
|
368
|
+
runAfterCurrentRoutingSession(func) {
|
|
369
|
+
assert.isTruthy(this.navigationInProgress);
|
|
370
|
+
this.sessionFinishedJobs.push(func);
|
|
364
371
|
}
|
|
365
|
-
// @Trace()
|
|
366
372
|
/**
|
|
367
|
-
*
|
|
373
|
+
* Sync's the current interaction state with the URL. We need to push something in the URL in order
|
|
374
|
+
* to be able to capture the back button on the first page. If we don't then the back click will exit
|
|
375
|
+
* the app directly and we don't get to ask.
|
|
368
376
|
* @return {?}
|
|
369
377
|
*/
|
|
370
|
-
hasActiveInteractionIds(url) {
|
|
371
|
-
return this.getActiveInteractionIdsFromUrl(url).length > 0;
|
|
372
|
-
}
|
|
373
378
|
// @Trace()
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
* @return {?}
|
|
378
|
-
*/
|
|
379
|
-
navigateByUrl(urlSnapshot, navigationExtras) {
|
|
380
|
-
return this.router.navigateByUrl(urlSnapshot.urlTree, navigationExtras);
|
|
381
|
-
}
|
|
382
|
-
// TODO: Should this be moved to the navigation states?
|
|
383
|
-
/**
|
|
384
|
-
* @param {?} currentIds
|
|
385
|
-
* @param {?} previous
|
|
386
|
-
* @return {?}
|
|
387
|
-
*/
|
|
388
|
-
syncInteractionIdsWithRouter(currentIds, previous) {
|
|
389
|
-
assert.isFalsey(this.navigationInProgress.value); // Updating interaction routes during an existing navigation breaks all the things.
|
|
390
|
-
console.log({
|
|
391
|
-
startingActivity: currentIds.length > previous.length,
|
|
392
|
-
wasBackButton: this.navigationState.isPopState
|
|
393
|
-
});
|
|
394
|
-
if (_.isEqual(currentIds, previous)) {
|
|
395
|
-
console.log('activity ids were the same, skipping');
|
|
396
|
-
}
|
|
397
|
-
else {
|
|
398
|
-
// OMG, this is nuts.
|
|
379
|
+
syncInteractionContextIdsWithRouter() {
|
|
380
|
+
if (this.navigationSession) {
|
|
381
|
+
// console.log(`Navigation active -> ${this.navigationSession.toString()}, sync delayed until finished.`);
|
|
399
382
|
/** @type {?} */
|
|
400
|
-
const
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
this.
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
this.navigateByUrl(urlSnapshot, {
|
|
416
|
-
replaceUrl: true
|
|
417
|
-
}).then((/**
|
|
383
|
+
const session = this.navigationSession;
|
|
384
|
+
return new Promise((/**
|
|
385
|
+
* @param {?} resolve
|
|
386
|
+
* @param {?} reject
|
|
387
|
+
* @return {?}
|
|
388
|
+
*/
|
|
389
|
+
(resolve, reject) => {
|
|
390
|
+
this.runAfterCurrentRoutingSession((/**
|
|
391
|
+
* @return {?}
|
|
392
|
+
*/
|
|
393
|
+
() => {
|
|
394
|
+
// console.log(`Starting delayed sync job`);
|
|
395
|
+
/** @type {?} */
|
|
396
|
+
const syncSession = new SynchroniseInteractionContextIdsWithRoute(this.navigationContext, this.urlService.getCurrentRouterUrl(), false);
|
|
397
|
+
syncSession.onDispose((/**
|
|
418
398
|
* @return {?}
|
|
419
399
|
*/
|
|
420
|
-
() =>
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
400
|
+
() => resolve()));
|
|
401
|
+
this.transitionTo(syncSession);
|
|
402
|
+
}));
|
|
403
|
+
}));
|
|
404
|
+
}
|
|
405
|
+
else {
|
|
406
|
+
return new Promise(((/**
|
|
407
|
+
* @param {?} resolve
|
|
408
|
+
* @param {?} reject
|
|
409
|
+
* @return {?}
|
|
410
|
+
*/
|
|
411
|
+
(resolve, reject) => {
|
|
412
|
+
// console.log(`No navigation in progress, starting synchronisation job`);
|
|
413
|
+
/** @type {?} */
|
|
414
|
+
const session = new SynchroniseInteractionContextIdsWithRoute(this.navigationContext, this.urlService.getCurrentRouterUrl(), false);
|
|
415
|
+
session.onDispose((/**
|
|
416
|
+
* @return {?}
|
|
417
|
+
*/
|
|
418
|
+
() => resolve()));
|
|
419
|
+
this.transitionTo(session);
|
|
420
|
+
})));
|
|
432
421
|
}
|
|
433
422
|
}
|
|
423
|
+
/**
|
|
424
|
+
* @private
|
|
425
|
+
* @param {?} visit
|
|
426
|
+
* @return {?}
|
|
427
|
+
*/
|
|
428
|
+
createRouteParameters(visit) {
|
|
429
|
+
/** @type {?} */
|
|
430
|
+
const def = visit.placeDefinition;
|
|
431
|
+
return visit.hasRouteId() ?
|
|
432
|
+
[def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
|
|
433
|
+
[def.getFormattedRouteParameters(visit)];
|
|
434
|
+
}
|
|
434
435
|
}
|
|
435
436
|
PlaceRouter.decorators = [
|
|
436
437
|
{ type: Injectable, args: [{
|
|
@@ -440,61 +441,65 @@ PlaceRouter.decorators = [
|
|
|
440
441
|
/** @nocollapse */
|
|
441
442
|
PlaceRouter.ctorParameters = () => [
|
|
442
443
|
{ type: Router },
|
|
443
|
-
{ type: UrlSerializer },
|
|
444
444
|
{ type: Location },
|
|
445
|
-
{ type:
|
|
446
|
-
{ type:
|
|
445
|
+
{ type: InteractionService },
|
|
446
|
+
{ type: UrlService },
|
|
447
|
+
{ type: PlaceHistory }
|
|
447
448
|
];
|
|
448
|
-
/** @nocollapse */ PlaceRouter.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(i0.ɵɵinject(i1.Router), i0.ɵɵinject(
|
|
449
|
+
/** @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" });
|
|
449
450
|
if (false) {
|
|
451
|
+
/** @type {?} */
|
|
452
|
+
PlaceRouter.prototype.navigationSessionModel;
|
|
453
|
+
/** @type {?} */
|
|
454
|
+
PlaceRouter.prototype.navigationInProgress;
|
|
455
|
+
/** @type {?} */
|
|
456
|
+
PlaceRouter.prototype.navigationSessionName;
|
|
450
457
|
/**
|
|
451
458
|
* @type {?}
|
|
452
459
|
* @private
|
|
453
460
|
*/
|
|
454
|
-
PlaceRouter.prototype.
|
|
461
|
+
PlaceRouter.prototype.navigationContext;
|
|
455
462
|
/**
|
|
456
463
|
* @type {?}
|
|
457
464
|
* @private
|
|
458
465
|
*/
|
|
459
466
|
PlaceRouter.prototype._activeVisits;
|
|
460
467
|
/** @type {?} */
|
|
461
|
-
PlaceRouter.prototype.
|
|
462
|
-
/** @type {?} */
|
|
463
|
-
PlaceRouter.prototype.activeVisitIndex;
|
|
468
|
+
PlaceRouter.prototype.activeVisitsByPlaceDefinition;
|
|
464
469
|
/**
|
|
465
470
|
* @type {?}
|
|
466
471
|
* @private
|
|
467
472
|
*/
|
|
468
|
-
PlaceRouter.prototype.
|
|
473
|
+
PlaceRouter.prototype.routerInteractionAdapter;
|
|
469
474
|
/**
|
|
470
475
|
* @type {?}
|
|
471
476
|
* @private
|
|
472
477
|
*/
|
|
473
|
-
PlaceRouter.prototype.
|
|
478
|
+
PlaceRouter.prototype.sessionFinishedJobs;
|
|
474
479
|
/**
|
|
475
480
|
* @type {?}
|
|
476
481
|
* @private
|
|
477
482
|
*/
|
|
478
|
-
PlaceRouter.prototype.
|
|
483
|
+
PlaceRouter.prototype.angularRouter;
|
|
479
484
|
/**
|
|
480
485
|
* @type {?}
|
|
481
486
|
* @private
|
|
482
487
|
*/
|
|
483
|
-
PlaceRouter.prototype.
|
|
488
|
+
PlaceRouter.prototype.angularLocation;
|
|
484
489
|
/**
|
|
485
490
|
* @type {?}
|
|
486
491
|
* @private
|
|
487
492
|
*/
|
|
488
|
-
PlaceRouter.prototype.
|
|
493
|
+
PlaceRouter.prototype.interactionService;
|
|
489
494
|
/**
|
|
490
495
|
* @type {?}
|
|
491
496
|
* @private
|
|
492
497
|
*/
|
|
493
|
-
PlaceRouter.prototype.
|
|
498
|
+
PlaceRouter.prototype.urlService;
|
|
494
499
|
/**
|
|
495
500
|
* @type {?}
|
|
496
501
|
* @private
|
|
497
502
|
*/
|
|
498
|
-
PlaceRouter.prototype.
|
|
503
|
+
PlaceRouter.prototype.placeHistory;
|
|
499
504
|
}
|
|
500
505
|
//# sourceMappingURL=place-router.js.map
|