@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
|
@@ -1,1491 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Dsl, GarbageCollector, lang, Logger } from '@coolon/pectin';
|
|
7
|
-
import { PlaceComponentDeactivationHandler } from './place-component-deactivation-handler';
|
|
8
|
-
/**
|
|
9
|
-
* @abstract
|
|
10
|
-
*/
|
|
11
|
-
var /**
|
|
12
|
-
* @abstract
|
|
13
|
-
*/
|
|
14
|
-
NavigationState = /** @class */ (function (_super) {
|
|
15
|
-
tslib_1.__extends(NavigationState, _super);
|
|
16
|
-
function NavigationState(context) {
|
|
17
|
-
var _this = _super.call(this) || this;
|
|
18
|
-
_this.context = context;
|
|
19
|
-
_this._visits = new Map();
|
|
20
|
-
_this.debugPropertyKeys = [];
|
|
21
|
-
return _this;
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(NavigationState.prototype, "name", {
|
|
24
|
-
get: /**
|
|
25
|
-
* @return {?}
|
|
26
|
-
*/
|
|
27
|
-
function () {
|
|
28
|
-
return this.constructor.name;
|
|
29
|
-
},
|
|
30
|
-
enumerable: true,
|
|
31
|
-
configurable: true
|
|
32
|
-
});
|
|
33
|
-
Object.defineProperty(NavigationState.prototype, "idle", {
|
|
34
|
-
get: /**
|
|
35
|
-
* @return {?}
|
|
36
|
-
*/
|
|
37
|
-
function () {
|
|
38
|
-
return !this.isTransitional;
|
|
39
|
-
},
|
|
40
|
-
enumerable: true,
|
|
41
|
-
configurable: true
|
|
42
|
-
});
|
|
43
|
-
Object.defineProperty(NavigationState.prototype, "placeRouter", {
|
|
44
|
-
get: /**
|
|
45
|
-
* @return {?}
|
|
46
|
-
*/
|
|
47
|
-
function () {
|
|
48
|
-
return this.context.placeRouter;
|
|
49
|
-
},
|
|
50
|
-
enumerable: true,
|
|
51
|
-
configurable: true
|
|
52
|
-
});
|
|
53
|
-
Object.defineProperty(NavigationState.prototype, "interactionService", {
|
|
54
|
-
get: /**
|
|
55
|
-
* @return {?}
|
|
56
|
-
*/
|
|
57
|
-
function () {
|
|
58
|
-
return this.context.interactionService;
|
|
59
|
-
},
|
|
60
|
-
enumerable: true,
|
|
61
|
-
configurable: true
|
|
62
|
-
});
|
|
63
|
-
Object.defineProperty(NavigationState.prototype, "interactionContext", {
|
|
64
|
-
get: /**
|
|
65
|
-
* @return {?}
|
|
66
|
-
*/
|
|
67
|
-
function () {
|
|
68
|
-
return null;
|
|
69
|
-
},
|
|
70
|
-
enumerable: true,
|
|
71
|
-
configurable: true
|
|
72
|
-
});
|
|
73
|
-
/**
|
|
74
|
-
* @param {?} visit
|
|
75
|
-
* @return {?}
|
|
76
|
-
*/
|
|
77
|
-
NavigationState.prototype.storeVisit = /**
|
|
78
|
-
* @param {?} visit
|
|
79
|
-
* @return {?}
|
|
80
|
-
*/
|
|
81
|
-
function (visit) {
|
|
82
|
-
this._visits.set(visit.placeDefinition, visit);
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* @param {?} placeDef
|
|
86
|
-
* @return {?}
|
|
87
|
-
*/
|
|
88
|
-
NavigationState.prototype.getVisitFor = /**
|
|
89
|
-
* @param {?} placeDef
|
|
90
|
-
* @return {?}
|
|
91
|
-
*/
|
|
92
|
-
function (placeDef) {
|
|
93
|
-
return this._visits.get(placeDef);
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* @param {?} visit
|
|
97
|
-
* @param {?} initialUrl
|
|
98
|
-
* @return {?}
|
|
99
|
-
*/
|
|
100
|
-
NavigationState.prototype.onPlaceNavigationStart = /**
|
|
101
|
-
* @param {?} visit
|
|
102
|
-
* @param {?} initialUrl
|
|
103
|
-
* @return {?}
|
|
104
|
-
*/
|
|
105
|
-
function (visit, initialUrl) {
|
|
106
|
-
return this.illegalTransition('onPlaceNavigationStart');
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* @param {?} event
|
|
110
|
-
* @return {?}
|
|
111
|
-
*/
|
|
112
|
-
NavigationState.prototype.onPopState = /**
|
|
113
|
-
* @param {?} event
|
|
114
|
-
* @return {?}
|
|
115
|
-
*/
|
|
116
|
-
function (event) {
|
|
117
|
-
return this.illegalTransition(event);
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* @param {?} event
|
|
121
|
-
* @return {?}
|
|
122
|
-
*/
|
|
123
|
-
NavigationState.prototype.onRouterStarted = /**
|
|
124
|
-
* @param {?} event
|
|
125
|
-
* @return {?}
|
|
126
|
-
*/
|
|
127
|
-
function (event) {
|
|
128
|
-
return this.illegalTransition(event);
|
|
129
|
-
};
|
|
130
|
-
/**
|
|
131
|
-
* @param {?} event
|
|
132
|
-
* @return {?}
|
|
133
|
-
*/
|
|
134
|
-
NavigationState.prototype.onRouterCancelled = /**
|
|
135
|
-
* @param {?} event
|
|
136
|
-
* @return {?}
|
|
137
|
-
*/
|
|
138
|
-
function (event) {
|
|
139
|
-
return this.illegalTransition(event);
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* @param {?} event
|
|
143
|
-
* @return {?}
|
|
144
|
-
*/
|
|
145
|
-
NavigationState.prototype.onRouterError = /**
|
|
146
|
-
* @param {?} event
|
|
147
|
-
* @return {?}
|
|
148
|
-
*/
|
|
149
|
-
function (event) {
|
|
150
|
-
return this.illegalTransition(event);
|
|
151
|
-
};
|
|
152
|
-
/**
|
|
153
|
-
* @param {?} event
|
|
154
|
-
* @return {?}
|
|
155
|
-
*/
|
|
156
|
-
NavigationState.prototype.onRouterEnd = /**
|
|
157
|
-
* @param {?} event
|
|
158
|
-
* @return {?}
|
|
159
|
-
*/
|
|
160
|
-
function (event) {
|
|
161
|
-
return this.illegalTransition(event);
|
|
162
|
-
};
|
|
163
|
-
/**
|
|
164
|
-
* @param {?} newUrl
|
|
165
|
-
* @return {?}
|
|
166
|
-
*/
|
|
167
|
-
NavigationState.prototype.onBackClickedDuringNavigationInteraction = /**
|
|
168
|
-
* @param {?} newUrl
|
|
169
|
-
* @return {?}
|
|
170
|
-
*/
|
|
171
|
-
function (newUrl) {
|
|
172
|
-
return this.illegalTransition('onBackClickedDuringNavigationInteraction');
|
|
173
|
-
};
|
|
174
|
-
/**
|
|
175
|
-
* @param {?} component
|
|
176
|
-
* @param {?} currentUrl
|
|
177
|
-
* @param {?} nextUrl
|
|
178
|
-
* @return {?}
|
|
179
|
-
*/
|
|
180
|
-
NavigationState.prototype.canDeactivatePlace = /**
|
|
181
|
-
* @param {?} component
|
|
182
|
-
* @param {?} currentUrl
|
|
183
|
-
* @param {?} nextUrl
|
|
184
|
-
* @return {?}
|
|
185
|
-
*/
|
|
186
|
-
function (component, currentUrl, nextUrl) {
|
|
187
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
188
|
-
return tslib_1.__generator(this, function (_a) {
|
|
189
|
-
return [2 /*return*/, this.illegalTransition('canDeactivatePlace')];
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* @return {?}
|
|
195
|
-
*/
|
|
196
|
-
NavigationState.prototype.getVisits = /**
|
|
197
|
-
* @return {?}
|
|
198
|
-
*/
|
|
199
|
-
function () {
|
|
200
|
-
return Array.from(this._visits.values());
|
|
201
|
-
};
|
|
202
|
-
/**
|
|
203
|
-
* @protected
|
|
204
|
-
* @template R
|
|
205
|
-
* @param {?} message
|
|
206
|
-
* @return {?}
|
|
207
|
-
*/
|
|
208
|
-
NavigationState.prototype.illegalTransition = /**
|
|
209
|
-
* @protected
|
|
210
|
-
* @template R
|
|
211
|
-
* @param {?} message
|
|
212
|
-
* @return {?}
|
|
213
|
-
*/
|
|
214
|
-
function (message) {
|
|
215
|
-
return lang.illegalState(message.toString() + " not supported by " + this.toString());
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
* @protected
|
|
219
|
-
* @return {?}
|
|
220
|
-
*/
|
|
221
|
-
NavigationState.prototype.currentRouterUrl = /**
|
|
222
|
-
* @protected
|
|
223
|
-
* @return {?}
|
|
224
|
-
*/
|
|
225
|
-
function () {
|
|
226
|
-
return this.placeRouter.getCurrentRouterUrl();
|
|
227
|
-
};
|
|
228
|
-
/**
|
|
229
|
-
* @protected
|
|
230
|
-
* @param {?} event
|
|
231
|
-
* @return {?}
|
|
232
|
-
*/
|
|
233
|
-
NavigationState.prototype.createTransitionStateFor = /**
|
|
234
|
-
* @protected
|
|
235
|
-
* @param {?} event
|
|
236
|
-
* @return {?}
|
|
237
|
-
*/
|
|
238
|
-
function (event) {
|
|
239
|
-
/** @type {?} */
|
|
240
|
-
var popstate = event.navigationTrigger === 'popstate';
|
|
241
|
-
/** @type {?} */
|
|
242
|
-
var inInteraction = this.interactionService.isActive();
|
|
243
|
-
if (popstate) {
|
|
244
|
-
return inInteraction ?
|
|
245
|
-
new NavigationState.LeavingInteractionAfterPopStateTransition(this.context, this.currentRouterUrl(), event.url) :
|
|
246
|
-
new NavigationState.PopStateTransition(this.context, this.currentRouterUrl(), event.url);
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
return inInteraction ?
|
|
250
|
-
new NavigationState.StartingInteractionTransition(this.context, this.currentRouterUrl()) :
|
|
251
|
-
new NavigationState.NavigationTransition(this.context, this.currentRouterUrl());
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
/**
|
|
255
|
-
* @protected
|
|
256
|
-
* @return {?}
|
|
257
|
-
*/
|
|
258
|
-
NavigationState.prototype.createIdleState = /**
|
|
259
|
-
* @protected
|
|
260
|
-
* @return {?}
|
|
261
|
-
*/
|
|
262
|
-
function () {
|
|
263
|
-
return this.interactionService.isActive() ?
|
|
264
|
-
new NavigationState.IdleDuringInteraction(this.context, this.currentRouterUrl()) :
|
|
265
|
-
new NavigationState.Idle(this.context);
|
|
266
|
-
};
|
|
267
|
-
/**
|
|
268
|
-
* @param {?} url
|
|
269
|
-
* @param {?=} options
|
|
270
|
-
* @return {?}
|
|
271
|
-
*/
|
|
272
|
-
NavigationState.prototype.resetBrowserLocation = /**
|
|
273
|
-
* @param {?} url
|
|
274
|
-
* @param {?=} options
|
|
275
|
-
* @return {?}
|
|
276
|
-
*/
|
|
277
|
-
function (url, options) {
|
|
278
|
-
if (options === void 0) { options = { replaceCurrent: false }; }
|
|
279
|
-
this.placeRouter.resetBrowserLocation(url, options);
|
|
280
|
-
};
|
|
281
|
-
/**
|
|
282
|
-
* @param {?} event
|
|
283
|
-
* @param {?=} reason
|
|
284
|
-
* @return {?}
|
|
285
|
-
*/
|
|
286
|
-
NavigationState.prototype.ignore = /**
|
|
287
|
-
* @param {?} event
|
|
288
|
-
* @param {?=} reason
|
|
289
|
-
* @return {?}
|
|
290
|
-
*/
|
|
291
|
-
function (event, reason) {
|
|
292
|
-
reason = reason ? " -> " + reason : '';
|
|
293
|
-
Logger.get(this).info("Ignoring router event" + reason + ": " + event.constructor.name + " -> " + event.url + " :: " + this.toString());
|
|
294
|
-
return this;
|
|
295
|
-
};
|
|
296
|
-
/**
|
|
297
|
-
* @return {?}
|
|
298
|
-
*/
|
|
299
|
-
NavigationState.prototype.toString = /**
|
|
300
|
-
* @return {?}
|
|
301
|
-
*/
|
|
302
|
-
function () {
|
|
303
|
-
return this.constructor.name + "(" + this.debugState() + ")";
|
|
304
|
-
};
|
|
305
|
-
/**
|
|
306
|
-
* @protected
|
|
307
|
-
* @param {?=} properties
|
|
308
|
-
* @return {?}
|
|
309
|
-
*/
|
|
310
|
-
NavigationState.prototype.debugState = /**
|
|
311
|
-
* @protected
|
|
312
|
-
* @param {?=} properties
|
|
313
|
-
* @return {?}
|
|
314
|
-
*/
|
|
315
|
-
function (properties) {
|
|
316
|
-
var _this = this;
|
|
317
|
-
return (properties || this.debugPropertyKeys).map((/**
|
|
318
|
-
* @param {?} p
|
|
319
|
-
* @return {?}
|
|
320
|
-
*/
|
|
321
|
-
function (p) {
|
|
322
|
-
return p + ": " + _this[p];
|
|
323
|
-
})).join(', ');
|
|
324
|
-
};
|
|
325
|
-
/**
|
|
326
|
-
* @protected
|
|
327
|
-
* @param {?} url
|
|
328
|
-
* @return {?}
|
|
329
|
-
*/
|
|
330
|
-
NavigationState.prototype.replaceBuggeredUrlAfterAngularRouterCancelled = /**
|
|
331
|
-
* @protected
|
|
332
|
-
* @param {?} url
|
|
333
|
-
* @return {?}
|
|
334
|
-
*/
|
|
335
|
-
function (url) {
|
|
336
|
-
// Angular calls _this.resetUrlToCurrentUrlTree() on cancelling and fucks our history.
|
|
337
|
-
// So this means that the top of the stack is the url we want to go back to, and not the one that was on
|
|
338
|
-
// it before the cancel event fired.
|
|
339
|
-
// So we need to:
|
|
340
|
-
// - replace the just inserted url with the one that used to be there.
|
|
341
|
-
// - push our actual url back onto the top of the stack.
|
|
342
|
-
this.resetBrowserLocation(url, { replaceCurrent: true });
|
|
343
|
-
};
|
|
344
|
-
return NavigationState;
|
|
345
|
-
}(GarbageCollector));
|
|
346
|
-
/**
|
|
347
|
-
* @abstract
|
|
348
|
-
*/
|
|
349
|
-
export { NavigationState };
|
|
350
|
-
if (false) {
|
|
351
|
-
/**
|
|
352
|
-
* @type {?}
|
|
353
|
-
* @private
|
|
354
|
-
*/
|
|
355
|
-
NavigationState.prototype._visits;
|
|
356
|
-
/** @type {?} */
|
|
357
|
-
NavigationState.prototype.isTransitional;
|
|
358
|
-
/** @type {?} */
|
|
359
|
-
NavigationState.prototype.startingUrl;
|
|
360
|
-
/** @type {?} */
|
|
361
|
-
NavigationState.prototype.isPopState;
|
|
362
|
-
/** @type {?} */
|
|
363
|
-
NavigationState.prototype.debugPropertyKeys;
|
|
364
|
-
/**
|
|
365
|
-
* @type {?}
|
|
366
|
-
* @protected
|
|
367
|
-
*/
|
|
368
|
-
NavigationState.prototype.context;
|
|
369
|
-
}
|
|
370
|
-
(function (NavigationState) {
|
|
371
|
-
var Context = /** @class */ (function () {
|
|
372
|
-
function Context(placeRouter, interactionService, notifySuccess) {
|
|
373
|
-
this.placeRouter = placeRouter;
|
|
374
|
-
this.interactionService = interactionService;
|
|
375
|
-
this.notifySuccess = notifySuccess;
|
|
376
|
-
}
|
|
377
|
-
return Context;
|
|
378
|
-
}());
|
|
379
|
-
NavigationState.Context = Context;
|
|
380
|
-
if (false) {
|
|
381
|
-
/** @type {?} */
|
|
382
|
-
Context.prototype.placeRouter;
|
|
383
|
-
/** @type {?} */
|
|
384
|
-
Context.prototype.interactionService;
|
|
385
|
-
/** @type {?} */
|
|
386
|
-
Context.prototype.notifySuccess;
|
|
387
|
-
}
|
|
388
|
-
var Idle = /** @class */ (function (_super) {
|
|
389
|
-
tslib_1.__extends(Idle, _super);
|
|
390
|
-
function Idle(context) {
|
|
391
|
-
var _this = _super.call(this, context) || this;
|
|
392
|
-
_this.isTransitional = false;
|
|
393
|
-
_this.startingUrl = null;
|
|
394
|
-
_this.isPopState = false;
|
|
395
|
-
return _this;
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* @param {?} visit
|
|
399
|
-
* @param {?} initialUrl
|
|
400
|
-
* @return {?}
|
|
401
|
-
*/
|
|
402
|
-
Idle.prototype.onPlaceNavigationStart = /**
|
|
403
|
-
* @param {?} visit
|
|
404
|
-
* @param {?} initialUrl
|
|
405
|
-
* @return {?}
|
|
406
|
-
*/
|
|
407
|
-
function (visit, initialUrl) {
|
|
408
|
-
/** @type {?} */
|
|
409
|
-
var navigationTransition = new NavigationTransition(this.context, initialUrl);
|
|
410
|
-
navigationTransition.storeVisit(visit);
|
|
411
|
-
return navigationTransition;
|
|
412
|
-
};
|
|
413
|
-
/**
|
|
414
|
-
* @param {?} event
|
|
415
|
-
* @return {?}
|
|
416
|
-
*/
|
|
417
|
-
Idle.prototype.onRouterStarted = /**
|
|
418
|
-
* @param {?} event
|
|
419
|
-
* @return {?}
|
|
420
|
-
*/
|
|
421
|
-
function (event) {
|
|
422
|
-
// calling angularLocation.go() to clear back state can trigger router cycles to the current url if we don't ignore them
|
|
423
|
-
if (event.url === this.currentRouterUrl()) {
|
|
424
|
-
Logger.get(this).info("navigation started to same url -> " + event.url);
|
|
425
|
-
return this;
|
|
426
|
-
}
|
|
427
|
-
if (this.placeRouter.hasActiveInteractionIds(event.url)) {
|
|
428
|
-
Logger.get(this).info("navigation started with interaction outlet -> " + event.url);
|
|
429
|
-
return new StartingInteractionTransition(this.context, event.url);
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
return this.createTransitionStateFor(event);
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
/**
|
|
436
|
-
* @param {?} event
|
|
437
|
-
* @return {?}
|
|
438
|
-
*/
|
|
439
|
-
Idle.prototype.onPopState = /**
|
|
440
|
-
* @param {?} event
|
|
441
|
-
* @return {?}
|
|
442
|
-
*/
|
|
443
|
-
function (event) {
|
|
444
|
-
return this.createTransitionStateFor(event);
|
|
445
|
-
};
|
|
446
|
-
return Idle;
|
|
447
|
-
}(NavigationState));
|
|
448
|
-
NavigationState.Idle = Idle;
|
|
449
|
-
if (false) {
|
|
450
|
-
/** @type {?} */
|
|
451
|
-
Idle.prototype.isTransitional;
|
|
452
|
-
/** @type {?} */
|
|
453
|
-
Idle.prototype.startingUrl;
|
|
454
|
-
/** @type {?} */
|
|
455
|
-
Idle.prototype.isPopState;
|
|
456
|
-
}
|
|
457
|
-
/**
|
|
458
|
-
* @abstract
|
|
459
|
-
*/
|
|
460
|
-
var /**
|
|
461
|
-
* @abstract
|
|
462
|
-
*/
|
|
463
|
-
AbstractNavigationTransition = /** @class */ (function (_super) {
|
|
464
|
-
tslib_1.__extends(AbstractNavigationTransition, _super);
|
|
465
|
-
function AbstractNavigationTransition(context, startingUrl) {
|
|
466
|
-
var _this = _super.call(this, context) || this;
|
|
467
|
-
_this.startingUrl = startingUrl;
|
|
468
|
-
_this.isTransitional = true;
|
|
469
|
-
_this.componentDeactivationHandlers = new Map();
|
|
470
|
-
_this._interactionContext = _this.interactionService._createExclusiveModalInteractionContext();
|
|
471
|
-
_this.onDispose((/**
|
|
472
|
-
* @return {?}
|
|
473
|
-
*/
|
|
474
|
-
function () {
|
|
475
|
-
// the interaction context can be detached during the back button cancellation state transition
|
|
476
|
-
// as the transition is synchronous and activityCancellation isn't. Otherwise dispose will be
|
|
477
|
-
// called before the context has been cancelled. It might be work having the interaction context
|
|
478
|
-
// automatically cancel if the context is disposed so we don't have worry about detaching etc.
|
|
479
|
-
if (_this._interactionContext) {
|
|
480
|
-
_this._interactionContext.dispose(); // or do something like cancelAndDispose?
|
|
481
|
-
}
|
|
482
|
-
}));
|
|
483
|
-
return _this;
|
|
484
|
-
}
|
|
485
|
-
Object.defineProperty(AbstractNavigationTransition.prototype, "interactionContext", {
|
|
486
|
-
get: /**
|
|
487
|
-
* @return {?}
|
|
488
|
-
*/
|
|
489
|
-
function () {
|
|
490
|
-
return this._interactionContext;
|
|
491
|
-
},
|
|
492
|
-
enumerable: true,
|
|
493
|
-
configurable: true
|
|
494
|
-
});
|
|
495
|
-
/**
|
|
496
|
-
* @param {?} event
|
|
497
|
-
* @return {?}
|
|
498
|
-
*/
|
|
499
|
-
AbstractNavigationTransition.prototype.onRouterStarted = /**
|
|
500
|
-
* @param {?} event
|
|
501
|
-
* @return {?}
|
|
502
|
-
*/
|
|
503
|
-
function (event) {
|
|
504
|
-
// active sessions can have many cancel start cycles due
|
|
505
|
-
// to place guard redirects
|
|
506
|
-
return this;
|
|
507
|
-
};
|
|
508
|
-
/**
|
|
509
|
-
* @param {?} event
|
|
510
|
-
* @return {?}
|
|
511
|
-
*/
|
|
512
|
-
AbstractNavigationTransition.prototype.onRouterEnd = /**
|
|
513
|
-
* @param {?} event
|
|
514
|
-
* @return {?}
|
|
515
|
-
*/
|
|
516
|
-
function (event) {
|
|
517
|
-
// navigation succeeded
|
|
518
|
-
this.context.notifySuccess(this);
|
|
519
|
-
return new Idle(this.context);
|
|
520
|
-
};
|
|
521
|
-
/**
|
|
522
|
-
* @param {?} newUrl
|
|
523
|
-
* @return {?}
|
|
524
|
-
*/
|
|
525
|
-
AbstractNavigationTransition.prototype.onBackClickedDuringNavigationInteraction = /**
|
|
526
|
-
* @param {?} newUrl
|
|
527
|
-
* @return {?}
|
|
528
|
-
*/
|
|
529
|
-
function (newUrl) {
|
|
530
|
-
Logger.get(this).info("back button pressed during navigation session interaction promise");
|
|
531
|
-
// detach the interaction from the session so it doesn't get disposed until the activity has completed.
|
|
532
|
-
/** @type {?} */
|
|
533
|
-
var navigationInteraction = this.detachInteractionContext();
|
|
534
|
-
var when = Dsl.disposeWith(navigationInteraction).when;
|
|
535
|
-
// TODO: I need to make the exclusive interaction context disallow nested activities or
|
|
536
|
-
// that would mess things up entirely. Or, can I do a context.abortAll().then(..)
|
|
537
|
-
Logger.get(this).info('cancelling current navigation activity..');
|
|
538
|
-
navigationInteraction.cancelActiveActivity().then((/**
|
|
539
|
-
* @return {?}
|
|
540
|
-
*/
|
|
541
|
-
function () {
|
|
542
|
-
navigationInteraction.dispose();
|
|
543
|
-
}));
|
|
544
|
-
return this.createNavigationInteractionCancelledState(newUrl);
|
|
545
|
-
};
|
|
546
|
-
/**
|
|
547
|
-
* @param {?} component
|
|
548
|
-
* @param {?} currentUrl
|
|
549
|
-
* @param {?} nextUrl
|
|
550
|
-
* @return {?}
|
|
551
|
-
*/
|
|
552
|
-
AbstractNavigationTransition.prototype.canDeactivatePlace = /**
|
|
553
|
-
* @param {?} component
|
|
554
|
-
* @param {?} currentUrl
|
|
555
|
-
* @param {?} nextUrl
|
|
556
|
-
* @return {?}
|
|
557
|
-
*/
|
|
558
|
-
function (component, currentUrl, nextUrl) {
|
|
559
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
560
|
-
var handler, isPrimaryHandler;
|
|
561
|
-
return tslib_1.__generator(this, function (_a) {
|
|
562
|
-
// lookup the handler and create it if we've not seen it yet
|
|
563
|
-
handler = this.componentDeactivationHandlers.get(component);
|
|
564
|
-
if (!handler) {
|
|
565
|
-
isPrimaryHandler = this.componentDeactivationHandlers.size === 0;
|
|
566
|
-
handler = new PlaceComponentDeactivationHandler(component, this, isPrimaryHandler);
|
|
567
|
-
this.componentDeactivationHandlers.set(component, handler);
|
|
568
|
-
}
|
|
569
|
-
return [2 /*return*/, handler.canDeactivate(currentUrl, nextUrl)];
|
|
570
|
-
});
|
|
571
|
-
});
|
|
572
|
-
};
|
|
573
|
-
/**
|
|
574
|
-
* @protected
|
|
575
|
-
* @return {?}
|
|
576
|
-
*/
|
|
577
|
-
AbstractNavigationTransition.prototype.detachInteractionContext = /**
|
|
578
|
-
* @protected
|
|
579
|
-
* @return {?}
|
|
580
|
-
*/
|
|
581
|
-
function () {
|
|
582
|
-
/** @type {?} */
|
|
583
|
-
var context = this._interactionContext;
|
|
584
|
-
this._interactionContext = null;
|
|
585
|
-
return context;
|
|
586
|
-
};
|
|
587
|
-
return AbstractNavigationTransition;
|
|
588
|
-
}(NavigationState));
|
|
589
|
-
NavigationState.AbstractNavigationTransition = AbstractNavigationTransition;
|
|
590
|
-
if (false) {
|
|
591
|
-
/** @type {?} */
|
|
592
|
-
AbstractNavigationTransition.prototype.isTransitional;
|
|
593
|
-
/**
|
|
594
|
-
* @type {?}
|
|
595
|
-
* @private
|
|
596
|
-
*/
|
|
597
|
-
AbstractNavigationTransition.prototype.componentDeactivationHandlers;
|
|
598
|
-
/**
|
|
599
|
-
* @type {?}
|
|
600
|
-
* @private
|
|
601
|
-
*/
|
|
602
|
-
AbstractNavigationTransition.prototype._interactionContext;
|
|
603
|
-
/** @type {?} */
|
|
604
|
-
AbstractNavigationTransition.prototype.startingUrl;
|
|
605
|
-
/**
|
|
606
|
-
* @abstract
|
|
607
|
-
* @param {?} newUrl
|
|
608
|
-
* @return {?}
|
|
609
|
-
*/
|
|
610
|
-
AbstractNavigationTransition.prototype.createNavigationInteractionCancelledState = function (newUrl) { };
|
|
611
|
-
}
|
|
612
|
-
var NavigationTransition = /** @class */ (function (_super) {
|
|
613
|
-
tslib_1.__extends(NavigationTransition, _super);
|
|
614
|
-
function NavigationTransition() {
|
|
615
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
616
|
-
_this.isPopState = false;
|
|
617
|
-
_this.debugPropertyKeys = ['startingUrl'];
|
|
618
|
-
return _this;
|
|
619
|
-
}
|
|
620
|
-
/**
|
|
621
|
-
* @param {?} event
|
|
622
|
-
* @return {?}
|
|
623
|
-
*/
|
|
624
|
-
NavigationTransition.prototype.onRouterCancelled = /**
|
|
625
|
-
* @param {?} event
|
|
626
|
-
* @return {?}
|
|
627
|
-
*/
|
|
628
|
-
function (event) {
|
|
629
|
-
return this;
|
|
630
|
-
};
|
|
631
|
-
/**
|
|
632
|
-
* @param {?} event
|
|
633
|
-
* @return {?}
|
|
634
|
-
*/
|
|
635
|
-
NavigationTransition.prototype.onRouterError = /**
|
|
636
|
-
* @param {?} event
|
|
637
|
-
* @return {?}
|
|
638
|
-
*/
|
|
639
|
-
function (event) {
|
|
640
|
-
// navigation was aborted.
|
|
641
|
-
return new Idle(this.context);
|
|
642
|
-
};
|
|
643
|
-
/**
|
|
644
|
-
* @param {?} newUrl
|
|
645
|
-
* @return {?}
|
|
646
|
-
*/
|
|
647
|
-
NavigationTransition.prototype.createNavigationInteractionCancelledState = /**
|
|
648
|
-
* @param {?} newUrl
|
|
649
|
-
* @return {?}
|
|
650
|
-
*/
|
|
651
|
-
function (newUrl) {
|
|
652
|
-
return new LinkTriggeredNavigationInteractionCancelled(this.context, this.startingUrl, newUrl);
|
|
653
|
-
};
|
|
654
|
-
return NavigationTransition;
|
|
655
|
-
}(AbstractNavigationTransition));
|
|
656
|
-
NavigationState.NavigationTransition = NavigationTransition;
|
|
657
|
-
if (false) {
|
|
658
|
-
/** @type {?} */
|
|
659
|
-
NavigationTransition.prototype.isPopState;
|
|
660
|
-
/** @type {?} */
|
|
661
|
-
NavigationTransition.prototype.debugPropertyKeys;
|
|
662
|
-
}
|
|
663
|
-
var PopStateTransition = /** @class */ (function (_super) {
|
|
664
|
-
tslib_1.__extends(PopStateTransition, _super);
|
|
665
|
-
function PopStateTransition(context, startingUrl, poppedHistoryUrl) {
|
|
666
|
-
var _this = _super.call(this, context, startingUrl) || this;
|
|
667
|
-
_this.poppedHistoryUrl = poppedHistoryUrl;
|
|
668
|
-
_this.isPopState = true;
|
|
669
|
-
_this.debugPropertyKeys = ['startingUrl', 'poppedHistoryUrl'];
|
|
670
|
-
return _this;
|
|
671
|
-
}
|
|
672
|
-
/**
|
|
673
|
-
* @param {?} event
|
|
674
|
-
* @return {?}
|
|
675
|
-
*/
|
|
676
|
-
PopStateTransition.prototype.onRouterCancelled = /**
|
|
677
|
-
* @param {?} event
|
|
678
|
-
* @return {?}
|
|
679
|
-
*/
|
|
680
|
-
function (event) {
|
|
681
|
-
this.replaceBuggeredUrlAfterAngularRouterCancelled(this.poppedHistoryUrl);
|
|
682
|
-
// Angular doesn't preserve the url when a guard cancels the back button.
|
|
683
|
-
// See https://github.com/angular/angular/issues/13586#issuecomment-432795720
|
|
684
|
-
Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');
|
|
685
|
-
this.resetBrowserLocation(this.startingUrl);
|
|
686
|
-
return new Idle(this.context);
|
|
687
|
-
};
|
|
688
|
-
/**
|
|
689
|
-
* @param {?} event
|
|
690
|
-
* @return {?}
|
|
691
|
-
*/
|
|
692
|
-
PopStateTransition.prototype.onRouterError = /**
|
|
693
|
-
* @param {?} event
|
|
694
|
-
* @return {?}
|
|
695
|
-
*/
|
|
696
|
-
function (event) {
|
|
697
|
-
// // navigation was aborted.
|
|
698
|
-
// if (this.currentRouterUrl() !== this.startingUrl) {
|
|
699
|
-
// // Angular doesn't preserve the url when a guard cancels the back button.
|
|
700
|
-
// // See https://github.com/angular/angular/issues/13586#issuecomment-432795720
|
|
701
|
-
// Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');
|
|
702
|
-
// this.restoreHistory([
|
|
703
|
-
// this.poppedHistoryUrl,
|
|
704
|
-
// this.startingUrl
|
|
705
|
-
// ]);
|
|
706
|
-
// }
|
|
707
|
-
// return new Idle(this.context);
|
|
708
|
-
return this.illegalTransition("when do I get this???");
|
|
709
|
-
};
|
|
710
|
-
/**
|
|
711
|
-
* @param {?} locationTriggerUrl
|
|
712
|
-
* @return {?}
|
|
713
|
-
*/
|
|
714
|
-
PopStateTransition.prototype.createNavigationInteractionCancelledState = /**
|
|
715
|
-
* @param {?} locationTriggerUrl
|
|
716
|
-
* @return {?}
|
|
717
|
-
*/
|
|
718
|
-
function (locationTriggerUrl) {
|
|
719
|
-
return new PopStateTriggeredNavigationInteractionCancelled(this.context, this.startingUrl, locationTriggerUrl, this.poppedHistoryUrl);
|
|
720
|
-
};
|
|
721
|
-
return PopStateTransition;
|
|
722
|
-
}(AbstractNavigationTransition));
|
|
723
|
-
NavigationState.PopStateTransition = PopStateTransition;
|
|
724
|
-
if (false) {
|
|
725
|
-
/** @type {?} */
|
|
726
|
-
PopStateTransition.prototype.isPopState;
|
|
727
|
-
/** @type {?} */
|
|
728
|
-
PopStateTransition.prototype.debugPropertyKeys;
|
|
729
|
-
/** @type {?} */
|
|
730
|
-
PopStateTransition.prototype.poppedHistoryUrl;
|
|
731
|
-
}
|
|
732
|
-
/**
|
|
733
|
-
* @abstract
|
|
734
|
-
*/
|
|
735
|
-
var /**
|
|
736
|
-
* @abstract
|
|
737
|
-
*/
|
|
738
|
-
AbstractInteractionTransition = /** @class */ (function (_super) {
|
|
739
|
-
tslib_1.__extends(AbstractInteractionTransition, _super);
|
|
740
|
-
function AbstractInteractionTransition(context, startingUrl) {
|
|
741
|
-
var _this = _super.call(this, context, startingUrl) || this;
|
|
742
|
-
_this.startingUrl = startingUrl;
|
|
743
|
-
_this.isTransitional = true;
|
|
744
|
-
return _this;
|
|
745
|
-
}
|
|
746
|
-
return AbstractInteractionTransition;
|
|
747
|
-
}(AbstractNavigationTransition));
|
|
748
|
-
NavigationState.AbstractInteractionTransition = AbstractInteractionTransition;
|
|
749
|
-
if (false) {
|
|
750
|
-
/** @type {?} */
|
|
751
|
-
AbstractInteractionTransition.prototype.isTransitional;
|
|
752
|
-
/** @type {?} */
|
|
753
|
-
AbstractInteractionTransition.prototype.startingUrl;
|
|
754
|
-
}
|
|
755
|
-
// The following states exist to handle all events while any kind of navigation is in progress. That way all other states can
|
|
756
|
-
// happily ignore interaction contexts.
|
|
757
|
-
/**
|
|
758
|
-
* This is the non transitional (i.e. rest) state that is used whenever an interaction context is active.
|
|
759
|
-
*/
|
|
760
|
-
var
|
|
761
|
-
// The following states exist to handle all events while any kind of navigation is in progress. That way all other states can
|
|
762
|
-
// happily ignore interaction contexts.
|
|
763
|
-
/**
|
|
764
|
-
* This is the non transitional (i.e. rest) state that is used whenever an interaction context is active.
|
|
765
|
-
*/
|
|
766
|
-
IdleDuringInteraction = /** @class */ (function (_super) {
|
|
767
|
-
tslib_1.__extends(IdleDuringInteraction, _super);
|
|
768
|
-
function IdleDuringInteraction(context, startingUrl) {
|
|
769
|
-
var _this = _super.call(this, context) || this;
|
|
770
|
-
_this.startingUrl = startingUrl;
|
|
771
|
-
_this.isTransitional = false;
|
|
772
|
-
_this.isPopState = false;
|
|
773
|
-
_this.debugPropertyKeys = ['startingUrl'];
|
|
774
|
-
return _this;
|
|
775
|
-
}
|
|
776
|
-
/**
|
|
777
|
-
* @param {?} visit
|
|
778
|
-
* @param {?} initialUrl
|
|
779
|
-
* @return {?}
|
|
780
|
-
*/
|
|
781
|
-
IdleDuringInteraction.prototype.onPlaceNavigationStart = /**
|
|
782
|
-
* @param {?} visit
|
|
783
|
-
* @param {?} initialUrl
|
|
784
|
-
* @return {?}
|
|
785
|
-
*/
|
|
786
|
-
function (visit, initialUrl) {
|
|
787
|
-
// we're in an interaction and the user clicked back
|
|
788
|
-
/** @type {?} */
|
|
789
|
-
var navigationTransition = new StartingInteractionTransition(this.context, initialUrl);
|
|
790
|
-
navigationTransition.storeVisit(visit);
|
|
791
|
-
return navigationTransition;
|
|
792
|
-
};
|
|
793
|
-
/**
|
|
794
|
-
* @param {?} event
|
|
795
|
-
* @return {?}
|
|
796
|
-
*/
|
|
797
|
-
IdleDuringInteraction.prototype.onRouterStarted = /**
|
|
798
|
-
* @param {?} event
|
|
799
|
-
* @return {?}
|
|
800
|
-
*/
|
|
801
|
-
function (event) {
|
|
802
|
-
return new StartingInteractionTransition(this.context, event.url);
|
|
803
|
-
};
|
|
804
|
-
/**
|
|
805
|
-
* @param {?} event
|
|
806
|
-
* @return {?}
|
|
807
|
-
*/
|
|
808
|
-
IdleDuringInteraction.prototype.onPopState = /**
|
|
809
|
-
* @param {?} event
|
|
810
|
-
* @return {?}
|
|
811
|
-
*/
|
|
812
|
-
function (event) {
|
|
813
|
-
// we're in an interaction and the user clicked back
|
|
814
|
-
return new LeavingInteractionAfterPopStateTransition(this.context, event.url, event.url);
|
|
815
|
-
};
|
|
816
|
-
return IdleDuringInteraction;
|
|
817
|
-
}(NavigationState));
|
|
818
|
-
NavigationState.IdleDuringInteraction = IdleDuringInteraction;
|
|
819
|
-
if (false) {
|
|
820
|
-
/** @type {?} */
|
|
821
|
-
IdleDuringInteraction.prototype.isTransitional;
|
|
822
|
-
/** @type {?} */
|
|
823
|
-
IdleDuringInteraction.prototype.isPopState;
|
|
824
|
-
/** @type {?} */
|
|
825
|
-
IdleDuringInteraction.prototype.debugPropertyKeys;
|
|
826
|
-
/** @type {?} */
|
|
827
|
-
IdleDuringInteraction.prototype.startingUrl;
|
|
828
|
-
}
|
|
829
|
-
/**
|
|
830
|
-
* This state exists to handle all events while any kind of navigation is in progress. That way all other states can
|
|
831
|
-
* happily ignore interaction contexts.
|
|
832
|
-
* NOTE: This state is activated when ever an interaction is started. It might be better to split it into
|
|
833
|
-
* different states for different scenarios, e.g. starting model, starting model during route guard etc.
|
|
834
|
-
*/
|
|
835
|
-
var /**
|
|
836
|
-
* This state exists to handle all events while any kind of navigation is in progress. That way all other states can
|
|
837
|
-
* happily ignore interaction contexts.
|
|
838
|
-
* NOTE: This state is activated when ever an interaction is started. It might be better to split it into
|
|
839
|
-
* different states for different scenarios, e.g. starting model, starting model during route guard etc.
|
|
840
|
-
*/
|
|
841
|
-
StartingInteractionTransition = /** @class */ (function (_super) {
|
|
842
|
-
tslib_1.__extends(StartingInteractionTransition, _super);
|
|
843
|
-
function StartingInteractionTransition() {
|
|
844
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
845
|
-
_this.isPopState = false;
|
|
846
|
-
return _this;
|
|
847
|
-
}
|
|
848
|
-
/**
|
|
849
|
-
* @param {?} event
|
|
850
|
-
* @return {?}
|
|
851
|
-
*/
|
|
852
|
-
StartingInteractionTransition.prototype.onRouterCancelled = /**
|
|
853
|
-
* @param {?} event
|
|
854
|
-
* @return {?}
|
|
855
|
-
*/
|
|
856
|
-
function (event) {
|
|
857
|
-
// TODO: this.replaceBuggeredUrlAfterAngularRouterCancells(...);???
|
|
858
|
-
if (this.context.interactionService.isActive()) {
|
|
859
|
-
/** @type {?} */
|
|
860
|
-
var interactionIds = this.interactionService.activeInteractionContextIds.value;
|
|
861
|
-
this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(interactionIds).url);
|
|
862
|
-
return new IdleDuringInteraction(this.context, this.startingUrl);
|
|
863
|
-
}
|
|
864
|
-
else {
|
|
865
|
-
return new Idle(this.context);
|
|
866
|
-
}
|
|
867
|
-
};
|
|
868
|
-
/**
|
|
869
|
-
* @param {?} event
|
|
870
|
-
* @return {?}
|
|
871
|
-
*/
|
|
872
|
-
StartingInteractionTransition.prototype.onRouterError = /**
|
|
873
|
-
* @param {?} event
|
|
874
|
-
* @return {?}
|
|
875
|
-
*/
|
|
876
|
-
function (event) {
|
|
877
|
-
// navigation was aborted.
|
|
878
|
-
return new IdleDuringInteraction(this.context, this.startingUrl);
|
|
879
|
-
};
|
|
880
|
-
/**
|
|
881
|
-
* @param {?} event
|
|
882
|
-
* @return {?}
|
|
883
|
-
*/
|
|
884
|
-
StartingInteractionTransition.prototype.onRouterEnd = /**
|
|
885
|
-
* @param {?} event
|
|
886
|
-
* @return {?}
|
|
887
|
-
*/
|
|
888
|
-
function (event) {
|
|
889
|
-
if (this.context.interactionService.isActive()) {
|
|
890
|
-
return new IdleDuringInteraction(this.context, this.startingUrl);
|
|
891
|
-
}
|
|
892
|
-
else {
|
|
893
|
-
return new Idle(this.context);
|
|
894
|
-
}
|
|
895
|
-
};
|
|
896
|
-
/**
|
|
897
|
-
* @param {?} locationTriggerUrl
|
|
898
|
-
* @return {?}
|
|
899
|
-
*/
|
|
900
|
-
StartingInteractionTransition.prototype.createNavigationInteractionCancelledState = /**
|
|
901
|
-
* @param {?} locationTriggerUrl
|
|
902
|
-
* @return {?}
|
|
903
|
-
*/
|
|
904
|
-
function (locationTriggerUrl) {
|
|
905
|
-
return new LeavingInteractionTransitionCancelled(this.context, this.startingUrl, locationTriggerUrl);
|
|
906
|
-
};
|
|
907
|
-
return StartingInteractionTransition;
|
|
908
|
-
}(AbstractInteractionTransition));
|
|
909
|
-
NavigationState.StartingInteractionTransition = StartingInteractionTransition;
|
|
910
|
-
if (false) {
|
|
911
|
-
/** @type {?} */
|
|
912
|
-
StartingInteractionTransition.prototype.isPopState;
|
|
913
|
-
}
|
|
914
|
-
/**
|
|
915
|
-
* The sequence of router events are:
|
|
916
|
-
* Error -> url = url of navigation link
|
|
917
|
-
* End
|
|
918
|
-
* onPopState url = current intereaction url sans the query params
|
|
919
|
-
* Cancel url == same as above.
|
|
920
|
-
*/
|
|
921
|
-
var /**
|
|
922
|
-
* The sequence of router events are:
|
|
923
|
-
* Error -> url = url of navigation link
|
|
924
|
-
* End
|
|
925
|
-
* onPopState url = current intereaction url sans the query params
|
|
926
|
-
* Cancel url == same as above.
|
|
927
|
-
*/
|
|
928
|
-
LeavingInteractionTransitionCancelled = /** @class */ (function (_super) {
|
|
929
|
-
tslib_1.__extends(LeavingInteractionTransitionCancelled, _super);
|
|
930
|
-
function LeavingInteractionTransitionCancelled(context, startingUrl, locationChangeTriggerUrl) {
|
|
931
|
-
var _this = _super.call(this, context) || this;
|
|
932
|
-
_this.startingUrl = startingUrl;
|
|
933
|
-
_this.locationChangeTriggerUrl = locationChangeTriggerUrl;
|
|
934
|
-
_this.isPopState = false;
|
|
935
|
-
_this.firstCancelHandled = false;
|
|
936
|
-
_this.popStateHandled = false;
|
|
937
|
-
_this.debugPropertyKeys = ['idle', 'startingUrl', 'poppedHistoryUrl', 'locationChangeTriggerUrl', 'popStateEventUrl', 'firstCancelHandled', 'popStateHandled'];
|
|
938
|
-
return _this;
|
|
939
|
-
}
|
|
940
|
-
Object.defineProperty(LeavingInteractionTransitionCancelled.prototype, "isTransitional", {
|
|
941
|
-
get: /**
|
|
942
|
-
* @return {?}
|
|
943
|
-
*/
|
|
944
|
-
function () {
|
|
945
|
-
return true;
|
|
946
|
-
},
|
|
947
|
-
enumerable: true,
|
|
948
|
-
configurable: true
|
|
949
|
-
});
|
|
950
|
-
/**
|
|
951
|
-
* @param {?} event
|
|
952
|
-
* @return {?}
|
|
953
|
-
*/
|
|
954
|
-
LeavingInteractionTransitionCancelled.prototype.onRouterStarted = /**
|
|
955
|
-
* @param {?} event
|
|
956
|
-
* @return {?}
|
|
957
|
-
*/
|
|
958
|
-
function (event) {
|
|
959
|
-
return this.ignore(event);
|
|
960
|
-
};
|
|
961
|
-
/**
|
|
962
|
-
* @param {?} event
|
|
963
|
-
* @return {?}
|
|
964
|
-
*/
|
|
965
|
-
LeavingInteractionTransitionCancelled.prototype.onRouterCancelled = /**
|
|
966
|
-
* @param {?} event
|
|
967
|
-
* @return {?}
|
|
968
|
-
*/
|
|
969
|
-
function (event) {
|
|
970
|
-
// Angular doesn't preserve the url when a guard cancels the back button.
|
|
971
|
-
// See https://github.com/angular/angular/issues/13586#issuecomment-432795720
|
|
972
|
-
Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');
|
|
973
|
-
if (this.interactionService.isActive()) {
|
|
974
|
-
/** @type {?} */
|
|
975
|
-
var interactionIds = this.interactionService.activeInteractionContextIds.value;
|
|
976
|
-
this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(interactionIds).url);
|
|
977
|
-
}
|
|
978
|
-
else {
|
|
979
|
-
// this.replaceBuggeredUrlAfterAngularRouterCancells(this.start)
|
|
980
|
-
this.resetBrowserLocation(this.startingUrl); // and now put our own url back in.
|
|
981
|
-
}
|
|
982
|
-
return this.createIdleState();
|
|
983
|
-
};
|
|
984
|
-
/**
|
|
985
|
-
* @param {?} event
|
|
986
|
-
* @return {?}
|
|
987
|
-
*/
|
|
988
|
-
LeavingInteractionTransitionCancelled.prototype.onRouterEnd = /**
|
|
989
|
-
* @param {?} event
|
|
990
|
-
* @return {?}
|
|
991
|
-
*/
|
|
992
|
-
function (event) {
|
|
993
|
-
return this.ignore(event);
|
|
994
|
-
};
|
|
995
|
-
/**
|
|
996
|
-
* @param {?} event
|
|
997
|
-
* @return {?}
|
|
998
|
-
*/
|
|
999
|
-
LeavingInteractionTransitionCancelled.prototype.onRouterError = /**
|
|
1000
|
-
* @param {?} event
|
|
1001
|
-
* @return {?}
|
|
1002
|
-
*/
|
|
1003
|
-
function (event) {
|
|
1004
|
-
return this.ignore(event);
|
|
1005
|
-
};
|
|
1006
|
-
/**
|
|
1007
|
-
* @param {?} event
|
|
1008
|
-
* @return {?}
|
|
1009
|
-
*/
|
|
1010
|
-
LeavingInteractionTransitionCancelled.prototype.onPopState = /**
|
|
1011
|
-
* @param {?} event
|
|
1012
|
-
* @return {?}
|
|
1013
|
-
*/
|
|
1014
|
-
function (event) {
|
|
1015
|
-
return this.ignore(event);
|
|
1016
|
-
};
|
|
1017
|
-
/**
|
|
1018
|
-
* @param {?} component
|
|
1019
|
-
* @param {?} currentUrl
|
|
1020
|
-
* @param {?} nextUrl
|
|
1021
|
-
* @return {?}
|
|
1022
|
-
*/
|
|
1023
|
-
LeavingInteractionTransitionCancelled.prototype.canDeactivatePlace = /**
|
|
1024
|
-
* @param {?} component
|
|
1025
|
-
* @param {?} currentUrl
|
|
1026
|
-
* @param {?} nextUrl
|
|
1027
|
-
* @return {?}
|
|
1028
|
-
*/
|
|
1029
|
-
function (component, currentUrl, nextUrl) {
|
|
1030
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1031
|
-
return tslib_1.__generator(this, function (_a) {
|
|
1032
|
-
return [2 /*return*/, false];
|
|
1033
|
-
});
|
|
1034
|
-
});
|
|
1035
|
-
};
|
|
1036
|
-
return LeavingInteractionTransitionCancelled;
|
|
1037
|
-
}(NavigationState));
|
|
1038
|
-
NavigationState.LeavingInteractionTransitionCancelled = LeavingInteractionTransitionCancelled;
|
|
1039
|
-
if (false) {
|
|
1040
|
-
/** @type {?} */
|
|
1041
|
-
LeavingInteractionTransitionCancelled.prototype.isPopState;
|
|
1042
|
-
/** @type {?} */
|
|
1043
|
-
LeavingInteractionTransitionCancelled.prototype.firstCancelHandled;
|
|
1044
|
-
/** @type {?} */
|
|
1045
|
-
LeavingInteractionTransitionCancelled.prototype.popStateHandled;
|
|
1046
|
-
/** @type {?} */
|
|
1047
|
-
LeavingInteractionTransitionCancelled.prototype.popStateEventUrl;
|
|
1048
|
-
/** @type {?} */
|
|
1049
|
-
LeavingInteractionTransitionCancelled.prototype.debugPropertyKeys;
|
|
1050
|
-
/** @type {?} */
|
|
1051
|
-
LeavingInteractionTransitionCancelled.prototype.startingUrl;
|
|
1052
|
-
/** @type {?} */
|
|
1053
|
-
LeavingInteractionTransitionCancelled.prototype.locationChangeTriggerUrl;
|
|
1054
|
-
}
|
|
1055
|
-
/**
|
|
1056
|
-
* This state exists to handle all events while any kind of navigation is in progress. That way all other states can
|
|
1057
|
-
* happily ignore interaction contexts.
|
|
1058
|
-
*/
|
|
1059
|
-
var /**
|
|
1060
|
-
* This state exists to handle all events while any kind of navigation is in progress. That way all other states can
|
|
1061
|
-
* happily ignore interaction contexts.
|
|
1062
|
-
*/
|
|
1063
|
-
LeavingInteractionAfterPopStateTransition = /** @class */ (function (_super) {
|
|
1064
|
-
tslib_1.__extends(LeavingInteractionAfterPopStateTransition, _super);
|
|
1065
|
-
function LeavingInteractionAfterPopStateTransition(context, startingUrl, poppedHistoryUrl) {
|
|
1066
|
-
var _this = _super.call(this, context, startingUrl) || this;
|
|
1067
|
-
_this.poppedHistoryUrl = poppedHistoryUrl;
|
|
1068
|
-
_this.isPopState = true;
|
|
1069
|
-
return _this;
|
|
1070
|
-
}
|
|
1071
|
-
/**
|
|
1072
|
-
* @param {?} event
|
|
1073
|
-
* @return {?}
|
|
1074
|
-
*/
|
|
1075
|
-
LeavingInteractionAfterPopStateTransition.prototype.onRouterCancelled = /**
|
|
1076
|
-
* @param {?} event
|
|
1077
|
-
* @return {?}
|
|
1078
|
-
*/
|
|
1079
|
-
function (event) {
|
|
1080
|
-
// TODO: this.replaceBuggeredUrlAfterAngularRouterCancells(...);???
|
|
1081
|
-
if (this.interactionService.isActive()) {
|
|
1082
|
-
/** @type {?} */
|
|
1083
|
-
var interactionIds = this.interactionService.activeInteractionContextIds.value;
|
|
1084
|
-
this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(interactionIds).url);
|
|
1085
|
-
return new IdleDuringInteraction(this.context, this.startingUrl);
|
|
1086
|
-
}
|
|
1087
|
-
else {
|
|
1088
|
-
return new Idle(this.context);
|
|
1089
|
-
}
|
|
1090
|
-
};
|
|
1091
|
-
/**
|
|
1092
|
-
* @param {?} event
|
|
1093
|
-
* @return {?}
|
|
1094
|
-
*/
|
|
1095
|
-
LeavingInteractionAfterPopStateTransition.prototype.onRouterEnd = /**
|
|
1096
|
-
* @param {?} event
|
|
1097
|
-
* @return {?}
|
|
1098
|
-
*/
|
|
1099
|
-
function (event) {
|
|
1100
|
-
if (this.context.interactionService.isActive()) {
|
|
1101
|
-
return new IdleDuringInteraction(this.context, this.startingUrl);
|
|
1102
|
-
}
|
|
1103
|
-
else {
|
|
1104
|
-
return new Idle(this.context);
|
|
1105
|
-
}
|
|
1106
|
-
};
|
|
1107
|
-
/**
|
|
1108
|
-
* @param {?} newUrl
|
|
1109
|
-
* @return {?}
|
|
1110
|
-
*/
|
|
1111
|
-
LeavingInteractionAfterPopStateTransition.prototype.createNavigationInteractionCancelledState = /**
|
|
1112
|
-
* @param {?} newUrl
|
|
1113
|
-
* @return {?}
|
|
1114
|
-
*/
|
|
1115
|
-
function (newUrl) {
|
|
1116
|
-
return this.illegalTransition('Leaving interaction after pop-state should\'t block so should never see a back button click');
|
|
1117
|
-
};
|
|
1118
|
-
return LeavingInteractionAfterPopStateTransition;
|
|
1119
|
-
}(AbstractInteractionTransition));
|
|
1120
|
-
NavigationState.LeavingInteractionAfterPopStateTransition = LeavingInteractionAfterPopStateTransition;
|
|
1121
|
-
if (false) {
|
|
1122
|
-
/** @type {?} */
|
|
1123
|
-
LeavingInteractionAfterPopStateTransition.prototype.isPopState;
|
|
1124
|
-
/** @type {?} */
|
|
1125
|
-
LeavingInteractionAfterPopStateTransition.prototype.poppedHistoryUrl;
|
|
1126
|
-
}
|
|
1127
|
-
/**
|
|
1128
|
-
* This state handles the scenario where a link navigation triggered an interaction and the user clicked back a to cancel it.
|
|
1129
|
-
* The routing event sequence is different depending on the link that was clicked.
|
|
1130
|
-
*
|
|
1131
|
-
* If the link was the same as the previous history location (i.e. they've gone back via a link rather than clicking back) then the sequence is:
|
|
1132
|
-
*
|
|
1133
|
-
* -> Idle -> NavigationTransition
|
|
1134
|
-
* -> confirm dialog shown.
|
|
1135
|
-
* -> click back
|
|
1136
|
-
* -> NavigationCancel -> clickedLinkUrl === cancel.url
|
|
1137
|
-
* -> NavigationEnd
|
|
1138
|
-
*
|
|
1139
|
-
* Otherwise if the link is different from teh history location then the sequence is:
|
|
1140
|
-
*
|
|
1141
|
-
* -> Idle -> NavigationTransition
|
|
1142
|
-
* -> confirm dialog shown.
|
|
1143
|
-
* -> click back
|
|
1144
|
-
* -> NavigationCancel -> clickedLinkUrl !== cancel.url
|
|
1145
|
-
* -> NavigationEnd
|
|
1146
|
-
* -> PopState
|
|
1147
|
-
* -> NavigationCancel
|
|
1148
|
-
*/
|
|
1149
|
-
var /**
|
|
1150
|
-
* This state handles the scenario where a link navigation triggered an interaction and the user clicked back a to cancel it.
|
|
1151
|
-
* The routing event sequence is different depending on the link that was clicked.
|
|
1152
|
-
*
|
|
1153
|
-
* If the link was the same as the previous history location (i.e. they've gone back via a link rather than clicking back) then the sequence is:
|
|
1154
|
-
*
|
|
1155
|
-
* -> Idle -> NavigationTransition
|
|
1156
|
-
* -> confirm dialog shown.
|
|
1157
|
-
* -> click back
|
|
1158
|
-
* -> NavigationCancel -> clickedLinkUrl === cancel.url
|
|
1159
|
-
* -> NavigationEnd
|
|
1160
|
-
*
|
|
1161
|
-
* Otherwise if the link is different from teh history location then the sequence is:
|
|
1162
|
-
*
|
|
1163
|
-
* -> Idle -> NavigationTransition
|
|
1164
|
-
* -> confirm dialog shown.
|
|
1165
|
-
* -> click back
|
|
1166
|
-
* -> NavigationCancel -> clickedLinkUrl !== cancel.url
|
|
1167
|
-
* -> NavigationEnd
|
|
1168
|
-
* -> PopState
|
|
1169
|
-
* -> NavigationCancel
|
|
1170
|
-
*/
|
|
1171
|
-
LinkTriggeredNavigationInteractionCancelled = /** @class */ (function (_super) {
|
|
1172
|
-
tslib_1.__extends(LinkTriggeredNavigationInteractionCancelled, _super);
|
|
1173
|
-
function LinkTriggeredNavigationInteractionCancelled(context, startingUrl, clickedLinkUrl) {
|
|
1174
|
-
var _this = _super.call(this, context) || this;
|
|
1175
|
-
_this.startingUrl = startingUrl;
|
|
1176
|
-
_this.clickedLinkUrl = clickedLinkUrl;
|
|
1177
|
-
_this.isPopState = false;
|
|
1178
|
-
_this.clickedLinkMatchedBackButtonUrl = false;
|
|
1179
|
-
_this.debugPropertyKeys = ['idle', 'startingUrl', 'clickedLinkUrl', 'firstCancelEventUrl', 'clickedLinkMatchedBackButtonUrl', 'popStateEventUrl'];
|
|
1180
|
-
return _this;
|
|
1181
|
-
}
|
|
1182
|
-
Object.defineProperty(LinkTriggeredNavigationInteractionCancelled.prototype, "isTransitional", {
|
|
1183
|
-
get: /**
|
|
1184
|
-
* @return {?}
|
|
1185
|
-
*/
|
|
1186
|
-
function () {
|
|
1187
|
-
return true;
|
|
1188
|
-
},
|
|
1189
|
-
enumerable: true,
|
|
1190
|
-
configurable: true
|
|
1191
|
-
});
|
|
1192
|
-
/**
|
|
1193
|
-
* @param {?} event
|
|
1194
|
-
* @return {?}
|
|
1195
|
-
*/
|
|
1196
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.onRouterStarted = /**
|
|
1197
|
-
* @param {?} event
|
|
1198
|
-
* @return {?}
|
|
1199
|
-
*/
|
|
1200
|
-
function (event) {
|
|
1201
|
-
return this.ignore(event);
|
|
1202
|
-
};
|
|
1203
|
-
/**
|
|
1204
|
-
* @param {?} event
|
|
1205
|
-
* @return {?}
|
|
1206
|
-
*/
|
|
1207
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.onRouterCancelled = /**
|
|
1208
|
-
* @param {?} event
|
|
1209
|
-
* @return {?}
|
|
1210
|
-
*/
|
|
1211
|
-
function (event) {
|
|
1212
|
-
// TODO: should really split this into two sub states in the first cancel event.
|
|
1213
|
-
if (!this.firstCancelEventUrl) {
|
|
1214
|
-
this.firstCancelEventUrl = event.url;
|
|
1215
|
-
this.clickedLinkMatchedBackButtonUrl = event.url === this.clickedLinkUrl;
|
|
1216
|
-
return this.ignore(event);
|
|
1217
|
-
}
|
|
1218
|
-
else {
|
|
1219
|
-
// we wait for our popped state to come in.
|
|
1220
|
-
if (!this.clickedLinkMatchedBackButtonUrl && this.popStateEventUrl) {
|
|
1221
|
-
return this.finaliseRouting();
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
};
|
|
1225
|
-
/**
|
|
1226
|
-
* @param {?} event
|
|
1227
|
-
* @return {?}
|
|
1228
|
-
*/
|
|
1229
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.onRouterEnd = /**
|
|
1230
|
-
* @param {?} event
|
|
1231
|
-
* @return {?}
|
|
1232
|
-
*/
|
|
1233
|
-
function (event) {
|
|
1234
|
-
if (this.clickedLinkMatchedBackButtonUrl) {
|
|
1235
|
-
return this.finaliseRouting();
|
|
1236
|
-
}
|
|
1237
|
-
else {
|
|
1238
|
-
return this.ignore(event);
|
|
1239
|
-
}
|
|
1240
|
-
};
|
|
1241
|
-
/**
|
|
1242
|
-
* @param {?} event
|
|
1243
|
-
* @return {?}
|
|
1244
|
-
*/
|
|
1245
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.onRouterError = /**
|
|
1246
|
-
* @param {?} event
|
|
1247
|
-
* @return {?}
|
|
1248
|
-
*/
|
|
1249
|
-
function (event) {
|
|
1250
|
-
return this.ignore(event);
|
|
1251
|
-
};
|
|
1252
|
-
/**
|
|
1253
|
-
* @param {?} event
|
|
1254
|
-
* @return {?}
|
|
1255
|
-
*/
|
|
1256
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.onPopState = /**
|
|
1257
|
-
* @param {?} event
|
|
1258
|
-
* @return {?}
|
|
1259
|
-
*/
|
|
1260
|
-
function (event) {
|
|
1261
|
-
this.popStateEventUrl = event.url;
|
|
1262
|
-
return this.ignore(event);
|
|
1263
|
-
};
|
|
1264
|
-
/**
|
|
1265
|
-
* @return {?}
|
|
1266
|
-
*/
|
|
1267
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.finaliseRouting = /**
|
|
1268
|
-
* @return {?}
|
|
1269
|
-
*/
|
|
1270
|
-
function () {
|
|
1271
|
-
Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');
|
|
1272
|
-
this.replaceBuggeredUrlAfterAngularRouterCancelled(this.clickedLinkUrl); // put the back click one back in.
|
|
1273
|
-
if (this.interactionService.isActive()) {
|
|
1274
|
-
/** @type {?} */
|
|
1275
|
-
var interactionIds = this.interactionService.activeInteractionContextIds.value;
|
|
1276
|
-
// Angular doesn't preserve the url when a guard cancels the back button.
|
|
1277
|
-
// See https://github.com/angular/angular/issues/13586#issuecomment-432795720
|
|
1278
|
-
this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(interactionIds).url);
|
|
1279
|
-
}
|
|
1280
|
-
else {
|
|
1281
|
-
this.resetBrowserLocation(this.startingUrl); // and now put our own url back in.
|
|
1282
|
-
}
|
|
1283
|
-
return this.createIdleState();
|
|
1284
|
-
};
|
|
1285
|
-
/**
|
|
1286
|
-
* @param {?} component
|
|
1287
|
-
* @param {?} currentUrl
|
|
1288
|
-
* @param {?} nextUrl
|
|
1289
|
-
* @return {?}
|
|
1290
|
-
*/
|
|
1291
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.canDeactivatePlace = /**
|
|
1292
|
-
* @param {?} component
|
|
1293
|
-
* @param {?} currentUrl
|
|
1294
|
-
* @param {?} nextUrl
|
|
1295
|
-
* @return {?}
|
|
1296
|
-
*/
|
|
1297
|
-
function (component, currentUrl, nextUrl) {
|
|
1298
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1299
|
-
return tslib_1.__generator(this, function (_a) {
|
|
1300
|
-
return [2 /*return*/, false];
|
|
1301
|
-
});
|
|
1302
|
-
});
|
|
1303
|
-
};
|
|
1304
|
-
return LinkTriggeredNavigationInteractionCancelled;
|
|
1305
|
-
}(NavigationState));
|
|
1306
|
-
NavigationState.LinkTriggeredNavigationInteractionCancelled = LinkTriggeredNavigationInteractionCancelled;
|
|
1307
|
-
if (false) {
|
|
1308
|
-
/** @type {?} */
|
|
1309
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.isPopState;
|
|
1310
|
-
/** @type {?} */
|
|
1311
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.firstCancelEventUrl;
|
|
1312
|
-
/** @type {?} */
|
|
1313
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.popStateEventUrl;
|
|
1314
|
-
/** @type {?} */
|
|
1315
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.clickedLinkMatchedBackButtonUrl;
|
|
1316
|
-
/** @type {?} */
|
|
1317
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.debugPropertyKeys;
|
|
1318
|
-
/** @type {?} */
|
|
1319
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.startingUrl;
|
|
1320
|
-
/** @type {?} */
|
|
1321
|
-
LinkTriggeredNavigationInteractionCancelled.prototype.clickedLinkUrl;
|
|
1322
|
-
}
|
|
1323
|
-
/**
|
|
1324
|
-
* This state handles the scenario where a pop state triggered and interaction and the user clickeb back a second time to cancel it.
|
|
1325
|
-
* The sequence of routing events/state transitions is as follows.
|
|
1326
|
-
* -> Idle -> PopStateTransition (poppedHistoryUrl == page to go to, startingUrl = page to stay on )
|
|
1327
|
-
* -> confirm dialog shown.
|
|
1328
|
-
* -> click back
|
|
1329
|
-
* -> PopStateTransition -> CancelledDuringBackButtonNavigationInteraction(trigger url is the page before the popped history url)
|
|
1330
|
-
* -> NavigationCancel (for the previous back)
|
|
1331
|
-
* -> PopState
|
|
1332
|
-
* -> NavigationCancel
|
|
1333
|
-
*/
|
|
1334
|
-
var /**
|
|
1335
|
-
* This state handles the scenario where a pop state triggered and interaction and the user clickeb back a second time to cancel it.
|
|
1336
|
-
* The sequence of routing events/state transitions is as follows.
|
|
1337
|
-
* -> Idle -> PopStateTransition (poppedHistoryUrl == page to go to, startingUrl = page to stay on )
|
|
1338
|
-
* -> confirm dialog shown.
|
|
1339
|
-
* -> click back
|
|
1340
|
-
* -> PopStateTransition -> CancelledDuringBackButtonNavigationInteraction(trigger url is the page before the popped history url)
|
|
1341
|
-
* -> NavigationCancel (for the previous back)
|
|
1342
|
-
* -> PopState
|
|
1343
|
-
* -> NavigationCancel
|
|
1344
|
-
*/
|
|
1345
|
-
PopStateTriggeredNavigationInteractionCancelled = /** @class */ (function (_super) {
|
|
1346
|
-
tslib_1.__extends(PopStateTriggeredNavigationInteractionCancelled, _super);
|
|
1347
|
-
function PopStateTriggeredNavigationInteractionCancelled(context, startingUrl, locationChangeTriggerUrl, poppedHistoryUrl) {
|
|
1348
|
-
var _this = _super.call(this, context) || this;
|
|
1349
|
-
_this.startingUrl = startingUrl;
|
|
1350
|
-
_this.locationChangeTriggerUrl = locationChangeTriggerUrl;
|
|
1351
|
-
_this.poppedHistoryUrl = poppedHistoryUrl;
|
|
1352
|
-
_this.isPopState = false;
|
|
1353
|
-
_this.firstCancelHandled = false;
|
|
1354
|
-
_this.popStateHandled = false;
|
|
1355
|
-
_this.debugPropertyKeys = ['idle', 'startingUrl', 'poppedHistoryUrl', 'locationChangeTriggerUrl', 'popStateEventUrl', 'firstCancelHandled', 'popStateHandled'];
|
|
1356
|
-
return _this;
|
|
1357
|
-
}
|
|
1358
|
-
Object.defineProperty(PopStateTriggeredNavigationInteractionCancelled.prototype, "isTransitional", {
|
|
1359
|
-
get: /**
|
|
1360
|
-
* @return {?}
|
|
1361
|
-
*/
|
|
1362
|
-
function () {
|
|
1363
|
-
return true;
|
|
1364
|
-
},
|
|
1365
|
-
enumerable: true,
|
|
1366
|
-
configurable: true
|
|
1367
|
-
});
|
|
1368
|
-
/**
|
|
1369
|
-
* @param {?} event
|
|
1370
|
-
* @return {?}
|
|
1371
|
-
*/
|
|
1372
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.onRouterStarted = /**
|
|
1373
|
-
* @param {?} event
|
|
1374
|
-
* @return {?}
|
|
1375
|
-
*/
|
|
1376
|
-
function (event) {
|
|
1377
|
-
return this.ignore(event);
|
|
1378
|
-
};
|
|
1379
|
-
/**
|
|
1380
|
-
* @param {?} event
|
|
1381
|
-
* @return {?}
|
|
1382
|
-
*/
|
|
1383
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.onRouterCancelled = /**
|
|
1384
|
-
* @param {?} event
|
|
1385
|
-
* @return {?}
|
|
1386
|
-
*/
|
|
1387
|
-
function (event) {
|
|
1388
|
-
if (this.firstCancelHandled && this.popStateHandled) {
|
|
1389
|
-
// Angular doesn't preserve the url when a guard cancels the back button.
|
|
1390
|
-
// See https://github.com/angular/angular/issues/13586#issuecomment-432795720
|
|
1391
|
-
Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');
|
|
1392
|
-
// Angular calls _this.resetUrlToCurrentUrlTree() on cancelling and fucks our history.
|
|
1393
|
-
// So this means that the top of the stack is the url we want to go back to, and not the one that was on
|
|
1394
|
-
// it before the cancel event fired.
|
|
1395
|
-
// So we need to:
|
|
1396
|
-
// - replace the just inserted url with the one that used to be there.
|
|
1397
|
-
// - push our actual url back onto the top of the stack.
|
|
1398
|
-
this.replaceBuggeredUrlAfterAngularRouterCancelled(this.locationChangeTriggerUrl);
|
|
1399
|
-
this.resetBrowserLocation(this.poppedHistoryUrl); // put the first back click one back in.
|
|
1400
|
-
if (this.interactionService.isActive()) {
|
|
1401
|
-
/** @type {?} */
|
|
1402
|
-
var interactionIds = this.interactionService.activeInteractionContextIds.value;
|
|
1403
|
-
this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(interactionIds).url);
|
|
1404
|
-
}
|
|
1405
|
-
else {
|
|
1406
|
-
this.resetBrowserLocation(this.startingUrl); // and now put our own url back in.
|
|
1407
|
-
}
|
|
1408
|
-
return this.createIdleState();
|
|
1409
|
-
}
|
|
1410
|
-
else {
|
|
1411
|
-
this.firstCancelHandled = true;
|
|
1412
|
-
return this.ignore(event);
|
|
1413
|
-
}
|
|
1414
|
-
};
|
|
1415
|
-
/**
|
|
1416
|
-
* @param {?} event
|
|
1417
|
-
* @return {?}
|
|
1418
|
-
*/
|
|
1419
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.onRouterEnd = /**
|
|
1420
|
-
* @param {?} event
|
|
1421
|
-
* @return {?}
|
|
1422
|
-
*/
|
|
1423
|
-
function (event) {
|
|
1424
|
-
return this.ignore(event);
|
|
1425
|
-
};
|
|
1426
|
-
/**
|
|
1427
|
-
* @param {?} event
|
|
1428
|
-
* @return {?}
|
|
1429
|
-
*/
|
|
1430
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.onRouterError = /**
|
|
1431
|
-
* @param {?} event
|
|
1432
|
-
* @return {?}
|
|
1433
|
-
*/
|
|
1434
|
-
function (event) {
|
|
1435
|
-
return this.ignore(event);
|
|
1436
|
-
};
|
|
1437
|
-
/**
|
|
1438
|
-
* @param {?} event
|
|
1439
|
-
* @return {?}
|
|
1440
|
-
*/
|
|
1441
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.onPopState = /**
|
|
1442
|
-
* @param {?} event
|
|
1443
|
-
* @return {?}
|
|
1444
|
-
*/
|
|
1445
|
-
function (event) {
|
|
1446
|
-
this.popStateHandled = true;
|
|
1447
|
-
this.popStateEventUrl = event.url;
|
|
1448
|
-
return this.ignore(event);
|
|
1449
|
-
};
|
|
1450
|
-
/**
|
|
1451
|
-
* @param {?} component
|
|
1452
|
-
* @param {?} currentUrl
|
|
1453
|
-
* @param {?} nextUrl
|
|
1454
|
-
* @return {?}
|
|
1455
|
-
*/
|
|
1456
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.canDeactivatePlace = /**
|
|
1457
|
-
* @param {?} component
|
|
1458
|
-
* @param {?} currentUrl
|
|
1459
|
-
* @param {?} nextUrl
|
|
1460
|
-
* @return {?}
|
|
1461
|
-
*/
|
|
1462
|
-
function (component, currentUrl, nextUrl) {
|
|
1463
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1464
|
-
return tslib_1.__generator(this, function (_a) {
|
|
1465
|
-
return [2 /*return*/, false];
|
|
1466
|
-
});
|
|
1467
|
-
});
|
|
1468
|
-
};
|
|
1469
|
-
return PopStateTriggeredNavigationInteractionCancelled;
|
|
1470
|
-
}(NavigationState));
|
|
1471
|
-
NavigationState.PopStateTriggeredNavigationInteractionCancelled = PopStateTriggeredNavigationInteractionCancelled;
|
|
1472
|
-
if (false) {
|
|
1473
|
-
/** @type {?} */
|
|
1474
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.isPopState;
|
|
1475
|
-
/** @type {?} */
|
|
1476
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.firstCancelHandled;
|
|
1477
|
-
/** @type {?} */
|
|
1478
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.popStateHandled;
|
|
1479
|
-
/** @type {?} */
|
|
1480
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.popStateEventUrl;
|
|
1481
|
-
/** @type {?} */
|
|
1482
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.debugPropertyKeys;
|
|
1483
|
-
/** @type {?} */
|
|
1484
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.startingUrl;
|
|
1485
|
-
/** @type {?} */
|
|
1486
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.locationChangeTriggerUrl;
|
|
1487
|
-
/** @type {?} */
|
|
1488
|
-
PopStateTriggeredNavigationInteractionCancelled.prototype.poppedHistoryUrl;
|
|
1489
|
-
}
|
|
1490
|
-
})(NavigationState || (NavigationState = {}));
|
|
1491
|
-
//# sourceMappingURL=navigation-state.js.map
|