@coolon/angular-ui-powerups 0.0.126 → 0.0.129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/coolon-angular-ui-powerups.umd.js +3745 -3019
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +17 -18
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +16 -17
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/index.js +1 -1
- package/esm2015/index.js.map +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/interaction/abstract-interaction-context.js +104 -0
- package/esm2015/lib/interaction/abstract-interaction-context.js.map +1 -0
- package/esm2015/lib/interaction/abstract-interaction-context.metadata.json +1 -0
- package/esm2015/lib/interaction/activity-ref.js +123 -0
- package/esm2015/lib/interaction/activity-ref.js.map +1 -0
- package/esm2015/lib/interaction/activity-ref.metadata.json +1 -0
- package/esm2015/lib/interaction/activity.js +21 -1
- package/esm2015/lib/interaction/activity.js.map +1 -1
- package/esm2015/lib/interaction/activity.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +199 -230
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/{activity-outlet → activity-container/activity-outlet}/activity-outlet.component.js +24 -31
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +2 -3
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +4 -11
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +2 -3
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +113 -0
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -0
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/index.js +7 -6
- package/esm2015/lib/interaction/index.js.map +1 -1
- package/esm2015/lib/interaction/index.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction-context.js +12 -67
- package/esm2015/lib/interaction/interaction-context.js.map +1 -1
- package/esm2015/lib/interaction/interaction-context.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.js +4 -4
- package/esm2015/lib/interaction/interaction.module.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/interaction/route-synchronisation-adapter.js +17 -0
- package/esm2015/lib/interaction/route-synchronisation-adapter.js.map +1 -0
- package/esm2015/lib/interaction/route-synchronisation-adapter.metadata.json +1 -0
- package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js +72 -0
- package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -0
- package/esm2015/lib/interaction/services/interaction-service-routing-adapter.metadata.json +1 -0
- package/esm2015/lib/interaction/services/interaction.service.js +174 -104
- package/esm2015/lib/interaction/services/interaction.service.js.map +1 -1
- package/esm2015/lib/interaction/services/interaction.service.metadata.json +1 -1
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +4 -2
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.metadata.json +1 -1
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +79 -87
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
- package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.metadata.json +1 -1
- package/esm2015/lib/interaction/services/modal-interaction-context.factory.js +3 -1
- package/esm2015/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +27 -6
- package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +9 -3
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +98 -110
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +9 -3
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/guards/place.guard.js +14 -13
- package/esm2015/lib/place/guards/place.guard.js.map +1 -1
- package/esm2015/lib/place/guards/place.guard.metadata.json +1 -1
- package/esm2015/lib/place/index.js +15 -2
- package/esm2015/lib/place/index.js.map +1 -1
- package/esm2015/lib/place/index.metadata.json +1 -1
- package/esm2015/lib/place/{guards → navigation}/place-component-deactivation-handler.js +28 -22
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -0
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js +37 -0
- package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -0
- package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +19 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +95 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +132 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +123 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -0
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js +62 -0
- package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -0
- package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +48 -0
- package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -0
- package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +104 -0
- package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -0
- package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +141 -0
- package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -0
- package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/navigating.js +54 -0
- package/esm2015/lib/place/navigation/session/navigating.js.map +1 -0
- package/esm2015/lib/place/navigation/session/navigating.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/navigation-context.js +38 -0
- package/esm2015/lib/place/navigation/session/navigation-context.js.map +1 -0
- package/esm2015/lib/place/navigation/session/navigation-context.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/navigation-session.js +326 -0
- package/esm2015/lib/place/navigation/session/navigation-session.js.map +1 -0
- package/esm2015/lib/place/navigation/session/navigation-session.metadata.json +1 -0
- package/esm2015/lib/place/navigation/session/pop-state-navigation.js +31 -0
- package/esm2015/lib/place/navigation/session/pop-state-navigation.js.map +1 -0
- package/esm2015/lib/place/navigation/session/pop-state-navigation.metadata.json +1 -0
- package/esm2015/lib/place/place-component.js +46 -15
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-component.metadata.json +1 -1
- package/esm2015/lib/place/place-router.js +307 -309
- package/esm2015/lib/place/place-router.js.map +1 -1
- package/esm2015/lib/place/place-router.metadata.json +1 -1
- package/esm2015/lib/place/place.module.js.map +1 -1
- package/esm2015/lib/place/place.module.metadata.json +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +1 -0
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
- package/esm2015/lib/place/url-service.js +126 -0
- package/esm2015/lib/place/url-service.js.map +1 -0
- package/esm2015/lib/place/url-service.metadata.json +1 -0
- package/esm2015/lib/place/url-service.ngfactory.js.map +1 -0
- package/esm2015/lib/place/url-snapshot.js +15 -1
- package/esm2015/lib/place/url-snapshot.js.map +1 -1
- package/esm2015/lib/place/url-snapshot.metadata.json +1 -1
- package/esm2015/lib/place/visit.js +10 -0
- package/esm2015/lib/place/visit.js.map +1 -1
- package/esm2015/lib/place/visit.metadata.json +1 -1
- package/esm2015/public_api.js +2 -2
- package/esm2015/public_api.js.map +1 -1
- package/esm5/coolon-angular-ui-powerups.js +16 -17
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/index.js +1 -1
- package/esm5/index.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm5/lib/interaction/abstract-interaction-context.js +146 -0
- package/esm5/lib/interaction/abstract-interaction-context.js.map +1 -0
- package/esm5/lib/interaction/activity-ref.js +153 -0
- package/esm5/lib/interaction/activity-ref.js.map +1 -0
- package/esm5/lib/interaction/activity.js +29 -1
- package/esm5/lib/interaction/activity.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +273 -265
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm5/lib/interaction/components/{activity-outlet → activity-container/activity-outlet}/activity-outlet.component.js +25 -32
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -0
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.ngfactory.js.map +1 -0
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +2 -3
- package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
- package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +4 -10
- package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
- package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +2 -3
- package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
- package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +158 -0
- package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -0
- package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.ngfactory.js.map +1 -0
- package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/interaction/index.js +7 -6
- package/esm5/lib/interaction/index.js.map +1 -1
- package/esm5/lib/interaction/interaction-context.js +12 -106
- package/esm5/lib/interaction/interaction-context.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.js +4 -4
- package/esm5/lib/interaction/interaction.module.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/interaction/route-synchronisation-adapter.js +17 -0
- package/esm5/lib/interaction/route-synchronisation-adapter.js.map +1 -0
- package/esm5/lib/interaction/services/interaction-service-routing-adapter.js +98 -0
- package/esm5/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -0
- package/esm5/lib/interaction/services/interaction.service.js +243 -117
- package/esm5/lib/interaction/services/interaction.service.js.map +1 -1
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +6 -2
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +96 -107
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
- package/esm5/lib/interaction/services/modal-interaction-context.factory.js +3 -1
- package/esm5/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
- package/esm5/lib/place/components/abstract-place-navigation.component.js +24 -6
- package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +6 -3
- package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +130 -129
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +6 -3
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/guards/place.guard.js +17 -13
- package/esm5/lib/place/guards/place.guard.js.map +1 -1
- package/esm5/lib/place/index.js +15 -2
- package/esm5/lib/place/index.js.map +1 -1
- package/esm5/lib/place/{guards → navigation}/place-component-deactivation-handler.js +45 -21
- package/esm5/lib/place/navigation/place-component-deactivation-handler.js.map +1 -0
- package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js +49 -0
- package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -0
- package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +36 -0
- package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -0
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +151 -0
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -0
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +221 -0
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -0
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +186 -0
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -0
- package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js +107 -0
- package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -0
- package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +77 -0
- package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -0
- package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +167 -0
- package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -0
- package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +185 -0
- package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -0
- package/esm5/lib/place/navigation/session/navigating.js +75 -0
- package/esm5/lib/place/navigation/session/navigating.js.map +1 -0
- package/esm5/lib/place/navigation/session/navigation-context.js +32 -0
- package/esm5/lib/place/navigation/session/navigation-context.js.map +1 -0
- package/esm5/lib/place/navigation/session/navigation-session.js +450 -0
- package/esm5/lib/place/navigation/session/navigation-session.js.map +1 -0
- package/esm5/lib/place/navigation/session/pop-state-navigation.js +50 -0
- package/esm5/lib/place/navigation/session/pop-state-navigation.js.map +1 -0
- package/esm5/lib/place/place-component.js +61 -17
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/place-router.js +407 -401
- package/esm5/lib/place/place-router.js.map +1 -1
- package/esm5/lib/place/place.module.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +1 -0
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm5/lib/place/url-service.js +176 -0
- package/esm5/lib/place/url-service.js.map +1 -0
- package/esm5/lib/place/url-service.ngfactory.js.map +1 -0
- package/esm5/lib/place/url-snapshot.js +22 -1
- package/esm5/lib/place/url-snapshot.js.map +1 -1
- package/esm5/lib/place/visit.js +14 -0
- package/esm5/lib/place/visit.js.map +1 -1
- package/esm5/public_api.js +2 -2
- package/esm5/public_api.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +2637 -2266
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +3694 -2980
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/interaction/abstract-interaction-context.d.ts +24 -0
- package/lib/interaction/activity-ref.d.ts +19 -0
- package/lib/interaction/activity.d.ts +5 -1
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +42 -43
- package/lib/interaction/components/{activity-outlet → activity-container/activity-outlet}/activity-outlet.component.d.ts +7 -10
- package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +2 -2
- package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +2 -5
- package/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.d.ts +2 -2
- package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +24 -0
- package/lib/interaction/index.d.ts +6 -5
- package/lib/interaction/interaction-context.d.ts +8 -29
- package/lib/interaction/route-synchronisation-adapter.d.ts +5 -0
- package/lib/interaction/services/interaction-service-routing-adapter.d.ts +15 -0
- package/lib/interaction/services/interaction.service.d.ts +52 -24
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.d.ts +2 -1
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +15 -12
- package/lib/interaction/services/modal-interaction-context.factory.d.ts +2 -1
- package/lib/place/components/abstract-place-navigation.component.d.ts +5 -3
- package/lib/place/components/list-place-nav/list-place-nav.component.d.ts +2 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +9 -10
- package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +2 -1
- package/lib/place/guards/place.guard.d.ts +4 -3
- package/lib/place/index.d.ts +15 -2
- package/lib/place/navigation/place-component-deactivation-handler.d.ts +22 -0
- package/lib/place/navigation/session/abstract-pop-state-navigation.d.ts +9 -0
- package/lib/place/navigation/session/event-cleanup/event-clean-up-session.d.ts +4 -0
- package/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.d.ts +27 -0
- package/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.d.ts +43 -0
- package/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.d.ts +33 -0
- package/lib/place/navigation/session/interactions/navigating-during-interaction.d.ts +15 -0
- package/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.d.ts +17 -0
- package/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.d.ts +24 -0
- package/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.d.ts +15 -0
- package/lib/place/navigation/session/navigating.d.ts +11 -0
- package/lib/place/navigation/session/navigation-context.d.ts +28 -0
- package/lib/place/navigation/session/navigation-session.d.ts +51 -0
- package/lib/place/navigation/session/pop-state-navigation.d.ts +7 -0
- package/lib/place/place-component.d.ts +6 -3
- package/lib/place/place-router.d.ts +39 -35
- package/lib/place/url-service.d.ts +30 -0
- package/lib/place/url-snapshot.d.ts +3 -1
- package/lib/place/visit.d.ts +1 -0
- package/package.json +1 -1
- package/schematics/place-routes/templates/place-routes.ts.template +4 -3
- package/esm2015/lib/interaction/abstract-activity.js +0 -13
- package/esm2015/lib/interaction/abstract-activity.js.map +0 -1
- package/esm2015/lib/interaction/abstract-activity.metadata.json +0 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet-context.js +0 -21
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet-context.js.map +0 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet-context.metadata.json +0 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.js.map +0 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.metadata.json +0 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.ngfactory.js.map +0 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +0 -102
- package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js.map +0 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.metadata.json +0 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.ngfactory.js.map +0 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/interaction/interaction-context-base.js +0 -171
- package/esm2015/lib/interaction/interaction-context-base.js.map +0 -1
- package/esm2015/lib/interaction/interaction-context-base.metadata.json +0 -1
- package/esm2015/lib/place/guards/navigation-state.js +0 -1118
- package/esm2015/lib/place/guards/navigation-state.js.map +0 -1
- package/esm2015/lib/place/guards/navigation-state.metadata.json +0 -1
- package/esm2015/lib/place/guards/place-component-deactivation-handler.js.map +0 -1
- package/esm2015/lib/place/guards/place-component-deactivation-handler.metadata.json +0 -1
- package/esm5/lib/interaction/abstract-activity.js +0 -30
- package/esm5/lib/interaction/abstract-activity.js.map +0 -1
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet-context.js +0 -21
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet-context.js.map +0 -1
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.js.map +0 -1
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.ngfactory.js.map +0 -1
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.scss.shim.ngstyle.js.map +0 -1
- package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +0 -119
- package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js.map +0 -1
- package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.ngfactory.js.map +0 -1
- package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.scss.shim.ngstyle.js.map +0 -1
- package/esm5/lib/interaction/interaction-context-base.js +0 -228
- package/esm5/lib/interaction/interaction-context-base.js.map +0 -1
- package/esm5/lib/place/guards/navigation-state.js +0 -1491
- package/esm5/lib/place/guards/navigation-state.js.map +0 -1
- package/esm5/lib/place/guards/place-component-deactivation-handler.js.map +0 -1
- package/lib/interaction/abstract-activity.d.ts +0 -6
- package/lib/interaction/components/activity-outlet/activity-outlet-context.d.ts +0 -7
- package/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.d.ts +0 -17
- package/lib/interaction/interaction-context-base.d.ts +0 -29
- package/lib/place/guards/navigation-state.d.ts +0 -228
- package/lib/place/guards/place-component-deactivation-handler.d.ts +0 -15
|
@@ -0,0 +1,221 @@
|
|
|
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 { EventCleanUpSession } from './event-clean-up-session';
|
|
7
|
+
/**
|
|
8
|
+
* This state handles the scenario where a link navigation triggered an interaction and the user clicked back a to cancel it.
|
|
9
|
+
* The routing event sequence is different depending on the link that was clicked.
|
|
10
|
+
*
|
|
11
|
+
* 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:
|
|
12
|
+
*
|
|
13
|
+
* -> Idle -> NavigationTransition
|
|
14
|
+
* -> confirm dialog shown.
|
|
15
|
+
* -> click back
|
|
16
|
+
* -> NavigationCancel -> clickedLinkUrl === cancel.url
|
|
17
|
+
* -> NavigationEnd
|
|
18
|
+
*
|
|
19
|
+
* Otherwise if the link is different from teh history location then the sequence is:
|
|
20
|
+
*
|
|
21
|
+
* -> Idle -> NavigationTransition
|
|
22
|
+
* -> confirm dialog shown.
|
|
23
|
+
* -> click back
|
|
24
|
+
* -> NavigationCancel -> clickedLinkUrl !== cancel.url
|
|
25
|
+
* -> NavigationEnd
|
|
26
|
+
* -> PopState
|
|
27
|
+
* -> NavigationCancel
|
|
28
|
+
*/
|
|
29
|
+
var /**
|
|
30
|
+
* This state handles the scenario where a link navigation triggered an interaction and the user clicked back a to cancel it.
|
|
31
|
+
* The routing event sequence is different depending on the link that was clicked.
|
|
32
|
+
*
|
|
33
|
+
* 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:
|
|
34
|
+
*
|
|
35
|
+
* -> Idle -> NavigationTransition
|
|
36
|
+
* -> confirm dialog shown.
|
|
37
|
+
* -> click back
|
|
38
|
+
* -> NavigationCancel -> clickedLinkUrl === cancel.url
|
|
39
|
+
* -> NavigationEnd
|
|
40
|
+
*
|
|
41
|
+
* Otherwise if the link is different from teh history location then the sequence is:
|
|
42
|
+
*
|
|
43
|
+
* -> Idle -> NavigationTransition
|
|
44
|
+
* -> confirm dialog shown.
|
|
45
|
+
* -> click back
|
|
46
|
+
* -> NavigationCancel -> clickedLinkUrl !== cancel.url
|
|
47
|
+
* -> NavigationEnd
|
|
48
|
+
* -> PopState
|
|
49
|
+
* -> NavigationCancel
|
|
50
|
+
*/
|
|
51
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish = /** @class */ (function (_super) {
|
|
52
|
+
tslib_1.__extends(WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, _super);
|
|
53
|
+
function WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish(context, startingUrl, clickedLinkUrl) {
|
|
54
|
+
var _this = _super.call(this, context, startingUrl) || this;
|
|
55
|
+
_this.clickedLinkUrl = clickedLinkUrl;
|
|
56
|
+
_this.isPopState = false;
|
|
57
|
+
_this.clickedLinkMatchedBackButtonUrl = false;
|
|
58
|
+
_this.debugPropertyKeys = ['idle', 'startingUrl', 'clickedLinkUrl', 'firstCancelEventUrl', 'clickedLinkMatchedBackButtonUrl', 'popStateEventUrl'];
|
|
59
|
+
return _this;
|
|
60
|
+
}
|
|
61
|
+
// @Trace()
|
|
62
|
+
// @Trace()
|
|
63
|
+
/**
|
|
64
|
+
* @param {?} event
|
|
65
|
+
* @return {?}
|
|
66
|
+
*/
|
|
67
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.onRouterStarted =
|
|
68
|
+
// @Trace()
|
|
69
|
+
/**
|
|
70
|
+
* @param {?} event
|
|
71
|
+
* @return {?}
|
|
72
|
+
*/
|
|
73
|
+
function (event) {
|
|
74
|
+
this.ignore(event);
|
|
75
|
+
};
|
|
76
|
+
// @Trace()
|
|
77
|
+
// @Trace()
|
|
78
|
+
/**
|
|
79
|
+
* @param {?} event
|
|
80
|
+
* @return {?}
|
|
81
|
+
*/
|
|
82
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.onRouterCancelled =
|
|
83
|
+
// @Trace()
|
|
84
|
+
/**
|
|
85
|
+
* @param {?} event
|
|
86
|
+
* @return {?}
|
|
87
|
+
*/
|
|
88
|
+
function (event) {
|
|
89
|
+
// TODO: should really split this into two sub states in the first cancel event.
|
|
90
|
+
if (!this.firstCancelEventUrl) {
|
|
91
|
+
this.firstCancelEventUrl = event.url;
|
|
92
|
+
this.clickedLinkMatchedBackButtonUrl = event.url === this.clickedLinkUrl;
|
|
93
|
+
this.ignore(event);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
// we wait for our popped state to come in.
|
|
97
|
+
if (!this.clickedLinkMatchedBackButtonUrl && this.popStateEventUrl) {
|
|
98
|
+
this.finaliseRouting();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
// @Trace()
|
|
103
|
+
// @Trace()
|
|
104
|
+
/**
|
|
105
|
+
* @param {?} event
|
|
106
|
+
* @return {?}
|
|
107
|
+
*/
|
|
108
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.onRouterEnd =
|
|
109
|
+
// @Trace()
|
|
110
|
+
/**
|
|
111
|
+
* @param {?} event
|
|
112
|
+
* @return {?}
|
|
113
|
+
*/
|
|
114
|
+
function (event) {
|
|
115
|
+
if (this.clickedLinkMatchedBackButtonUrl) {
|
|
116
|
+
this.finaliseRouting();
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
this.ignore(event);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
// @Trace()
|
|
123
|
+
// @Trace()
|
|
124
|
+
/**
|
|
125
|
+
* @param {?} event
|
|
126
|
+
* @return {?}
|
|
127
|
+
*/
|
|
128
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.onRouterError =
|
|
129
|
+
// @Trace()
|
|
130
|
+
/**
|
|
131
|
+
* @param {?} event
|
|
132
|
+
* @return {?}
|
|
133
|
+
*/
|
|
134
|
+
function (event) {
|
|
135
|
+
this.ignore(event);
|
|
136
|
+
};
|
|
137
|
+
// @Trace()
|
|
138
|
+
// @Trace()
|
|
139
|
+
/**
|
|
140
|
+
* @param {?} event
|
|
141
|
+
* @return {?}
|
|
142
|
+
*/
|
|
143
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.onPopState =
|
|
144
|
+
// @Trace()
|
|
145
|
+
/**
|
|
146
|
+
* @param {?} event
|
|
147
|
+
* @return {?}
|
|
148
|
+
*/
|
|
149
|
+
function (event) {
|
|
150
|
+
this.popStateEventUrl = event.url;
|
|
151
|
+
this.ignore(event);
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* @return {?}
|
|
155
|
+
*/
|
|
156
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.finaliseRouting = /**
|
|
157
|
+
* @return {?}
|
|
158
|
+
*/
|
|
159
|
+
function () {
|
|
160
|
+
this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.clickedLinkUrl, this.startingUrl);
|
|
161
|
+
return this.context.finishRoutingSession();
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* @param {?} component
|
|
165
|
+
* @param {?} currentUrl
|
|
166
|
+
* @param {?} nextUrl
|
|
167
|
+
* @return {?}
|
|
168
|
+
*/
|
|
169
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.canDeactivatePlace = /**
|
|
170
|
+
* @param {?} component
|
|
171
|
+
* @param {?} currentUrl
|
|
172
|
+
* @param {?} nextUrl
|
|
173
|
+
* @return {?}
|
|
174
|
+
*/
|
|
175
|
+
function (component, currentUrl, nextUrl) {
|
|
176
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
177
|
+
return tslib_1.__generator(this, function (_a) {
|
|
178
|
+
return [2 /*return*/, false];
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
return WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish;
|
|
183
|
+
}(EventCleanUpSession));
|
|
184
|
+
/**
|
|
185
|
+
* This state handles the scenario where a link navigation triggered an interaction and the user clicked back a to cancel it.
|
|
186
|
+
* The routing event sequence is different depending on the link that was clicked.
|
|
187
|
+
*
|
|
188
|
+
* 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:
|
|
189
|
+
*
|
|
190
|
+
* -> Idle -> NavigationTransition
|
|
191
|
+
* -> confirm dialog shown.
|
|
192
|
+
* -> click back
|
|
193
|
+
* -> NavigationCancel -> clickedLinkUrl === cancel.url
|
|
194
|
+
* -> NavigationEnd
|
|
195
|
+
*
|
|
196
|
+
* Otherwise if the link is different from teh history location then the sequence is:
|
|
197
|
+
*
|
|
198
|
+
* -> Idle -> NavigationTransition
|
|
199
|
+
* -> confirm dialog shown.
|
|
200
|
+
* -> click back
|
|
201
|
+
* -> NavigationCancel -> clickedLinkUrl !== cancel.url
|
|
202
|
+
* -> NavigationEnd
|
|
203
|
+
* -> PopState
|
|
204
|
+
* -> NavigationCancel
|
|
205
|
+
*/
|
|
206
|
+
export { WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish };
|
|
207
|
+
if (false) {
|
|
208
|
+
/** @type {?} */
|
|
209
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.isPopState;
|
|
210
|
+
/** @type {?} */
|
|
211
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.firstCancelEventUrl;
|
|
212
|
+
/** @type {?} */
|
|
213
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.popStateEventUrl;
|
|
214
|
+
/** @type {?} */
|
|
215
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.clickedLinkMatchedBackButtonUrl;
|
|
216
|
+
/** @type {?} */
|
|
217
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.debugPropertyKeys;
|
|
218
|
+
/** @type {?} */
|
|
219
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.clickedLinkUrl;
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=wait-until-link-triggered-interaction-cancelation-finishes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-until-link-triggered-interaction-cancelation-finishes.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.ts"],"names":[],"mappings":";;;;;AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;;;;;;;;;;;;;;;;;;;;;;;AAyB/D;;;;;;;;;;;;;;;;;;;;;;;IAAyF,+FAAmB;IAQ1G,6EAAY,OAA0B,EAC1B,WAAmB,EACV,cAAsB;QAF3C,YAGE,kBAAM,OAAO,EAAE,WAAW,CAAC,SAC5B;QAFoB,oBAAc,GAAd,cAAc,CAAQ;QARlC,gBAAU,GAAG,KAAK,CAAC;QAG5B,qCAA+B,GAAG,KAAK,CAAC;QACxC,uBAAiB,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,iCAAiC,EAAE,kBAAkB,CAAC,CAAC;;IAM5I,CAAC;IAED,WAAW;;;;;;IACX,6FAAe;;;;;;IAAf,UAAgB,KAAsB;QACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IAED,WAAW;;;;;;IACX,+FAAiB;;;;;;IAAjB,UAAkB,KAAuB;QACvC,gFAAgF;QAChF,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE;YAC7B,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC;YACrC,IAAI,CAAC,+BAA+B,GAAG,KAAK,CAAC,GAAG,KAAK,IAAI,CAAC,cAAc,CAAC;YACzE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SACpB;aAAM;YACL,2CAA2C;YAC3C,IAAI,CAAC,IAAI,CAAC,+BAA+B,IAAI,IAAI,CAAC,gBAAgB,EAAE;gBAClE,IAAI,CAAC,eAAe,EAAE,CAAC;aACxB;SACF;IACH,CAAC;IAED,WAAW;;;;;;IACX,yFAAW;;;;;;IAAX,UAAY,KAAoB;QAC9B,IAAI,IAAI,CAAC,+BAA+B,EAAE;YACxC,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SACpB;IACH,CAAC;IAED,WAAW;;;;;;IACX,2FAAa;;;;;;IAAb,UAAc,KAAsB;QAClC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IAED,WAAW;;;;;;IACX,wFAAU;;;;;;IAAV,UAAW,KAAsB;QAC/B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC;QAClC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;;;;IAED,6FAAe;;;IAAf;QACE,IAAI,CAAC,gDAAgD,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7F,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAC7C,CAAC;;;;;;;IAEK,gGAAkB;;;;;;IAAxB,UAAyB,SAAyB,EAAE,UAAuB,EAAE,OAAoB;;;gBAC/F,sBAAO,KAAK,EAAC;;;KACd;IACH,0EAAC;AAAD,CAAC,AA9DD,CAAyF,mBAAmB,GA8D3G;;;;;;;;;;;;;;;;;;;;;;;;;;IA5DC,yFAA4B;;IAC5B,kGAA4B;;IAC5B,+FAAyB;;IACzB,8GAAwC;;IACxC,gGAA4I;;IAIhI,6FAA+B","sourcesContent":["import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart } from '@angular/router';\nimport { Logger, Trace } from '@coolon/pectin';\nimport { PlaceComponent } from '../../../place-component';\nimport { UrlSnapshot } from '../../../url-snapshot';\nimport { EventCleanUpSession } from './event-clean-up-session';\nimport { NavigationContext } from '../navigation-context';\n\n/**\n * This state handles the scenario where a link navigation triggered an interaction and the user clicked back a to cancel it.\n * The routing event sequence is different depending on the link that was clicked.\n *\n * 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:\n *\n * -> Idle -> NavigationTransition\n * -> confirm dialog shown.\n * -> click back\n * -> NavigationCancel -> clickedLinkUrl === cancel.url\n * -> NavigationEnd\n *\n * Otherwise if the link is different from teh history location then the sequence is:\n *\n * -> Idle -> NavigationTransition\n * -> confirm dialog shown.\n * -> click back\n * -> NavigationCancel -> clickedLinkUrl !== cancel.url\n * -> NavigationEnd\n * -> PopState\n * -> NavigationCancel\n */\nexport class WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish extends EventCleanUpSession {\n\n readonly isPopState = false;\n firstCancelEventUrl: string;\n popStateEventUrl: string;\n clickedLinkMatchedBackButtonUrl = false;\n debugPropertyKeys = ['idle', 'startingUrl', 'clickedLinkUrl', 'firstCancelEventUrl', 'clickedLinkMatchedBackButtonUrl', 'popStateEventUrl'];\n\n constructor(context: NavigationContext,\n startingUrl: string,\n readonly clickedLinkUrl: string) {\n super(context, startingUrl);\n }\n\n // @Trace()\n onRouterStarted(event: NavigationStart): void {\n this.ignore(event);\n }\n\n // @Trace()\n onRouterCancelled(event: NavigationCancel): void {\n // TODO: should really split this into two sub states in the first cancel event.\n if (!this.firstCancelEventUrl) {\n this.firstCancelEventUrl = event.url;\n this.clickedLinkMatchedBackButtonUrl = event.url === this.clickedLinkUrl;\n this.ignore(event);\n } else {\n // we wait for our popped state to come in.\n if (!this.clickedLinkMatchedBackButtonUrl && this.popStateEventUrl) {\n this.finaliseRouting();\n }\n }\n }\n\n // @Trace()\n onRouterEnd(event: NavigationEnd): void {\n if (this.clickedLinkMatchedBackButtonUrl) {\n this.finaliseRouting();\n } else {\n this.ignore(event);\n }\n }\n\n // @Trace()\n onRouterError(event: NavigationError): void {\n this.ignore(event);\n }\n\n // @Trace()\n onPopState(event: NavigationStart): void {\n this.popStateEventUrl = event.url;\n this.ignore(event);\n }\n\n finaliseRouting() {\n this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.clickedLinkUrl, this.startingUrl);\n return this.context.finishRoutingSession();\n }\n\n async canDeactivatePlace(component: PlaceComponent, currentUrl: UrlSnapshot, nextUrl: UrlSnapshot): Promise<boolean | UrlSnapshot> {\n return false;\n }\n}\n"]}
|
|
@@ -0,0 +1,186 @@
|
|
|
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 { EventCleanUpSession } from './event-clean-up-session';
|
|
7
|
+
/**
|
|
8
|
+
* This state handles the scenario where a pop state triggered and interaction and the user clickeb back a second time to cancel it.
|
|
9
|
+
* The sequence of routing events/state transitions is as follows.
|
|
10
|
+
* -> Idle -> PopStateTransition (poppedHistoryUrl == page to go to, startingUrl = page to stay on )
|
|
11
|
+
* -> confirm dialog shown.
|
|
12
|
+
* -> click back
|
|
13
|
+
* -> PopStateTransition -> CancelledDuringBackButtonNavigationInteraction(trigger url is the page before the popped history url)
|
|
14
|
+
* -> NavigationCancel (for the previous back)
|
|
15
|
+
* -> PopState
|
|
16
|
+
* -> NavigationCancel
|
|
17
|
+
*/
|
|
18
|
+
var /**
|
|
19
|
+
* This state handles the scenario where a pop state triggered and interaction and the user clickeb back a second time to cancel it.
|
|
20
|
+
* The sequence of routing events/state transitions is as follows.
|
|
21
|
+
* -> Idle -> PopStateTransition (poppedHistoryUrl == page to go to, startingUrl = page to stay on )
|
|
22
|
+
* -> confirm dialog shown.
|
|
23
|
+
* -> click back
|
|
24
|
+
* -> PopStateTransition -> CancelledDuringBackButtonNavigationInteraction(trigger url is the page before the popped history url)
|
|
25
|
+
* -> NavigationCancel (for the previous back)
|
|
26
|
+
* -> PopState
|
|
27
|
+
* -> NavigationCancel
|
|
28
|
+
*/
|
|
29
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes = /** @class */ (function (_super) {
|
|
30
|
+
tslib_1.__extends(WaitUntilPopStateDuringCanDeactivateInteractionFinishes, _super);
|
|
31
|
+
function WaitUntilPopStateDuringCanDeactivateInteractionFinishes(context, startingUrl, locationChangeTriggerUrl, poppedHistoryUrl) {
|
|
32
|
+
var _this = _super.call(this, context, startingUrl) || this;
|
|
33
|
+
_this.locationChangeTriggerUrl = locationChangeTriggerUrl;
|
|
34
|
+
_this.poppedHistoryUrl = poppedHistoryUrl;
|
|
35
|
+
_this.isPopState = false;
|
|
36
|
+
_this.firstCancelHandled = false;
|
|
37
|
+
_this.popStateHandled = false;
|
|
38
|
+
_this.debugPropertyKeys = ['idle', 'startingUrl', 'poppedHistoryUrl', 'locationChangeTriggerUrl', 'popStateEventUrl', 'firstCancelHandled', 'popStateHandled'];
|
|
39
|
+
return _this;
|
|
40
|
+
}
|
|
41
|
+
// @Trace()
|
|
42
|
+
// @Trace()
|
|
43
|
+
/**
|
|
44
|
+
* @param {?} event
|
|
45
|
+
* @return {?}
|
|
46
|
+
*/
|
|
47
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.onRouterStarted =
|
|
48
|
+
// @Trace()
|
|
49
|
+
/**
|
|
50
|
+
* @param {?} event
|
|
51
|
+
* @return {?}
|
|
52
|
+
*/
|
|
53
|
+
function (event) {
|
|
54
|
+
this.ignore(event);
|
|
55
|
+
};
|
|
56
|
+
// @Trace()
|
|
57
|
+
// @Trace()
|
|
58
|
+
/**
|
|
59
|
+
* @param {?} event
|
|
60
|
+
* @return {?}
|
|
61
|
+
*/
|
|
62
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.onRouterCancelled =
|
|
63
|
+
// @Trace()
|
|
64
|
+
/**
|
|
65
|
+
* @param {?} event
|
|
66
|
+
* @return {?}
|
|
67
|
+
*/
|
|
68
|
+
function (event) {
|
|
69
|
+
if (!this.firstCancelHandled) {
|
|
70
|
+
this.firstCancelHandled = true;
|
|
71
|
+
this.parentPageUrl = event.url;
|
|
72
|
+
this.ignore(event);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
if (this.popStateHandled) {
|
|
76
|
+
/** @type {?} */
|
|
77
|
+
var grandParentPageUrl = event.url;
|
|
78
|
+
this.repairBrowserHistoryAndUrlAfterGuardCancellation(grandParentPageUrl, this.parentPageUrl);
|
|
79
|
+
// we've had one more back click than normal so we need to add our initial url back in as well.
|
|
80
|
+
this.resetBrowserLocation(this.startingUrl, { replaceCurrent: false });
|
|
81
|
+
return this.context.finishRoutingSession();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
// @Trace()
|
|
86
|
+
// @Trace()
|
|
87
|
+
/**
|
|
88
|
+
* @param {?} event
|
|
89
|
+
* @return {?}
|
|
90
|
+
*/
|
|
91
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.onRouterEnd =
|
|
92
|
+
// @Trace()
|
|
93
|
+
/**
|
|
94
|
+
* @param {?} event
|
|
95
|
+
* @return {?}
|
|
96
|
+
*/
|
|
97
|
+
function (event) {
|
|
98
|
+
this.ignore(event);
|
|
99
|
+
};
|
|
100
|
+
// @Trace()
|
|
101
|
+
// @Trace()
|
|
102
|
+
/**
|
|
103
|
+
* @param {?} event
|
|
104
|
+
* @return {?}
|
|
105
|
+
*/
|
|
106
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.onRouterError =
|
|
107
|
+
// @Trace()
|
|
108
|
+
/**
|
|
109
|
+
* @param {?} event
|
|
110
|
+
* @return {?}
|
|
111
|
+
*/
|
|
112
|
+
function (event) {
|
|
113
|
+
void this.ignore(event);
|
|
114
|
+
};
|
|
115
|
+
// @Trace()
|
|
116
|
+
// @Trace()
|
|
117
|
+
/**
|
|
118
|
+
* @param {?} event
|
|
119
|
+
* @return {?}
|
|
120
|
+
*/
|
|
121
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.onPopState =
|
|
122
|
+
// @Trace()
|
|
123
|
+
/**
|
|
124
|
+
* @param {?} event
|
|
125
|
+
* @return {?}
|
|
126
|
+
*/
|
|
127
|
+
function (event) {
|
|
128
|
+
this.popStateHandled = true;
|
|
129
|
+
this.popStateEventUrl = event.url;
|
|
130
|
+
this.ignore(event);
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* @param {?} component
|
|
134
|
+
* @param {?} currentUrl
|
|
135
|
+
* @param {?} nextUrl
|
|
136
|
+
* @return {?}
|
|
137
|
+
*/
|
|
138
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.canDeactivatePlace = /**
|
|
139
|
+
* @param {?} component
|
|
140
|
+
* @param {?} currentUrl
|
|
141
|
+
* @param {?} nextUrl
|
|
142
|
+
* @return {?}
|
|
143
|
+
*/
|
|
144
|
+
function (component, currentUrl, nextUrl) {
|
|
145
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
146
|
+
return tslib_1.__generator(this, function (_a) {
|
|
147
|
+
return [2 /*return*/, false];
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
return WaitUntilPopStateDuringCanDeactivateInteractionFinishes;
|
|
152
|
+
}(EventCleanUpSession));
|
|
153
|
+
/**
|
|
154
|
+
* This state handles the scenario where a pop state triggered and interaction and the user clickeb back a second time to cancel it.
|
|
155
|
+
* The sequence of routing events/state transitions is as follows.
|
|
156
|
+
* -> Idle -> PopStateTransition (poppedHistoryUrl == page to go to, startingUrl = page to stay on )
|
|
157
|
+
* -> confirm dialog shown.
|
|
158
|
+
* -> click back
|
|
159
|
+
* -> PopStateTransition -> CancelledDuringBackButtonNavigationInteraction(trigger url is the page before the popped history url)
|
|
160
|
+
* -> NavigationCancel (for the previous back)
|
|
161
|
+
* -> PopState
|
|
162
|
+
* -> NavigationCancel
|
|
163
|
+
*/
|
|
164
|
+
export { WaitUntilPopStateDuringCanDeactivateInteractionFinishes };
|
|
165
|
+
if (false) {
|
|
166
|
+
/** @type {?} */
|
|
167
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.isPopState;
|
|
168
|
+
/** @type {?} */
|
|
169
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.firstCancelHandled;
|
|
170
|
+
/** @type {?} */
|
|
171
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.popStateHandled;
|
|
172
|
+
/** @type {?} */
|
|
173
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.popStateEventUrl;
|
|
174
|
+
/** @type {?} */
|
|
175
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.debugPropertyKeys;
|
|
176
|
+
/**
|
|
177
|
+
* @type {?}
|
|
178
|
+
* @private
|
|
179
|
+
*/
|
|
180
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.parentPageUrl;
|
|
181
|
+
/** @type {?} */
|
|
182
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.locationChangeTriggerUrl;
|
|
183
|
+
/** @type {?} */
|
|
184
|
+
WaitUntilPopStateDuringCanDeactivateInteractionFinishes.prototype.poppedHistoryUrl;
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=wait-until-popstate-during-can-deactivate-transition-finishes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-until-popstate-during-can-deactivate-transition-finishes.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.ts"],"names":[],"mappings":";;;;;AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;;;;;;;;;;;;AAa/D;;;;;;;;;;;;IAA6E,mFAAmB;IAS9F,iEAAY,OAA0B,EAC1B,WAAmB,EACV,wBAAgC,EAChC,gBAAwB;QAH7C,YAIE,kBAAM,OAAO,EAAE,WAAW,CAAC,SAC5B;QAHoB,8BAAwB,GAAxB,wBAAwB,CAAQ;QAChC,sBAAgB,GAAhB,gBAAgB,CAAQ;QAVpC,gBAAU,GAAG,KAAK,CAAC;QAC5B,wBAAkB,GAAG,KAAK,CAAC;QAC3B,qBAAe,GAAG,KAAK,CAAC;QAExB,uBAAiB,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;;IAQzJ,CAAC;IAED,WAAW;;;;;;IACX,iFAAe;;;;;;IAAf,UAAgB,KAAsB;QACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IAED,WAAW;;;;;;IACX,mFAAiB;;;;;;IAAjB,UAAkB,KAAuB;QACvC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAC5B,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;YAC/B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC;YAC/B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SACpB;aAAM;YACL,IAAI,IAAI,CAAC,eAAe,EAAE;;oBAClB,kBAAkB,GAAG,KAAK,CAAC,GAAG;gBACpC,IAAI,CAAC,gDAAgD,CAAC,kBAAkB,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;gBAC9F,+FAA+F;gBAC/F,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,WAAW,EAAE,EAAC,cAAc,EAAE,KAAK,EAAC,CAAC,CAAC;gBACrE,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;aAC5C;SACF;IACH,CAAC;IAED,WAAW;;;;;;IACX,6EAAW;;;;;;IAAX,UAAY,KAAoB;QAC9B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IAED,WAAW;;;;;;IACX,+EAAa;;;;;;IAAb,UAAc,KAAsB;QAClC,KAAK,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,WAAW;;;;;;IACX,4EAAU;;;;;;IAAV,UAAW,KAAsB;QAC/B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC;QAClC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;;;;;;;IAEK,oFAAkB;;;;;;IAAxB,UAAyB,SAAyB,EAAE,UAAuB,EAAE,OAAoB;;;gBAC/F,sBAAO,KAAK,EAAC;;;KACd;IACH,8DAAC;AAAD,CAAC,AA1DD,CAA6E,mBAAmB,GA0D/F;;;;;;;;;;;;;;;IAxDC,6EAA4B;;IAC5B,qFAA2B;;IAC3B,kFAAwB;;IACxB,mFAAyB;;IACzB,oFAAyJ;;;;;IACzJ,gFAA8B;;IAIlB,2FAAyC;;IACzC,mFAAiC","sourcesContent":["import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart } from '@angular/router';\nimport { Logger, Trace } from '@coolon/pectin';\nimport { PlaceComponent } from '../../../place-component';\nimport { UrlSnapshot } from '../../../url-snapshot';\nimport { NavigationContext } from '../navigation-context';\nimport { EventCleanUpSession } from './event-clean-up-session';\n\n/**\n * This state handles the scenario where a pop state triggered and interaction and the user clickeb back a second time to cancel it.\n * The sequence of routing events/state transitions is as follows.\n * -> Idle -> PopStateTransition (poppedHistoryUrl == page to go to, startingUrl = page to stay on )\n * -> confirm dialog shown.\n * -> click back\n * -> PopStateTransition -> CancelledDuringBackButtonNavigationInteraction(trigger url is the page before the popped history url)\n * -> NavigationCancel (for the previous back)\n * -> PopState\n * -> NavigationCancel\n */\nexport class WaitUntilPopStateDuringCanDeactivateInteractionFinishes extends EventCleanUpSession {\n\n readonly isPopState = false;\n firstCancelHandled = false;\n popStateHandled = false;\n popStateEventUrl: string;\n debugPropertyKeys = ['idle', 'startingUrl', 'poppedHistoryUrl', 'locationChangeTriggerUrl', 'popStateEventUrl', 'firstCancelHandled', 'popStateHandled'];\n private parentPageUrl: string;\n\n constructor(context: NavigationContext,\n startingUrl: string,\n readonly locationChangeTriggerUrl: string,\n readonly poppedHistoryUrl: string) {\n super(context, startingUrl);\n }\n\n // @Trace()\n onRouterStarted(event: NavigationStart): void {\n this.ignore(event);\n }\n\n // @Trace()\n onRouterCancelled(event: NavigationCancel): void {\n if (!this.firstCancelHandled) {\n this.firstCancelHandled = true;\n this.parentPageUrl = event.url;\n this.ignore(event);\n } else {\n if (this.popStateHandled) {\n const grandParentPageUrl = event.url;\n this.repairBrowserHistoryAndUrlAfterGuardCancellation(grandParentPageUrl, this.parentPageUrl);\n // we've had one more back click than normal so we need to add our initial url back in as well.\n this.resetBrowserLocation(this.startingUrl, {replaceCurrent: false});\n return this.context.finishRoutingSession();\n }\n }\n }\n\n // @Trace()\n onRouterEnd(event: NavigationEnd): void {\n this.ignore(event);\n }\n\n // @Trace()\n onRouterError(event: NavigationError): void {\n void this.ignore(event);\n }\n\n // @Trace()\n onPopState(event: NavigationStart): void {\n this.popStateHandled = true;\n this.popStateEventUrl = event.url;\n this.ignore(event);\n }\n\n async canDeactivatePlace(component: PlaceComponent, currentUrl: UrlSnapshot, nextUrl: UrlSnapshot): Promise<boolean | UrlSnapshot> {\n return false;\n }\n}\n"]}
|
|
@@ -0,0 +1,107 @@
|
|
|
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 { NavigationSession } from '../navigation-session';
|
|
7
|
+
import { WaitUntilLeavingInteractionTransitionCancelled } from '../event-cleanup/wait-until-leaving-interaction-transition-cancelled';
|
|
8
|
+
import { SynchroniseInteractionContextIdsWithRoute } from './synchronise-interaction-context-ids-with-route';
|
|
9
|
+
/**
|
|
10
|
+
* This state exists to handle all events while any kind of navigation is in progress. That way all other states can
|
|
11
|
+
* happily ignore interaction contexts.
|
|
12
|
+
* NOTE: This state is activated when ever an interaction is started. It might be better to split it into
|
|
13
|
+
* different states for different scenarios, e.g. starting model, starting model during route guard etc.
|
|
14
|
+
*/
|
|
15
|
+
var /**
|
|
16
|
+
* This state exists to handle all events while any kind of navigation is in progress. That way all other states can
|
|
17
|
+
* happily ignore interaction contexts.
|
|
18
|
+
* NOTE: This state is activated when ever an interaction is started. It might be better to split it into
|
|
19
|
+
* different states for different scenarios, e.g. starting model, starting model during route guard etc.
|
|
20
|
+
*/
|
|
21
|
+
NavigatingDuringInteraction = /** @class */ (function (_super) {
|
|
22
|
+
tslib_1.__extends(NavigatingDuringInteraction, _super);
|
|
23
|
+
function NavigatingDuringInteraction() {
|
|
24
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
+
_this.isPopState = false;
|
|
26
|
+
return _this;
|
|
27
|
+
}
|
|
28
|
+
// @Trace()
|
|
29
|
+
// @Trace()
|
|
30
|
+
/**
|
|
31
|
+
* @param {?} event
|
|
32
|
+
* @return {?}
|
|
33
|
+
*/
|
|
34
|
+
NavigatingDuringInteraction.prototype.onRouterCancelled =
|
|
35
|
+
// @Trace()
|
|
36
|
+
/**
|
|
37
|
+
* @param {?} event
|
|
38
|
+
* @return {?}
|
|
39
|
+
*/
|
|
40
|
+
function (event) {
|
|
41
|
+
this.context.finishRoutingSession();
|
|
42
|
+
};
|
|
43
|
+
// @Trace()
|
|
44
|
+
// @Trace()
|
|
45
|
+
/**
|
|
46
|
+
* @param {?} event
|
|
47
|
+
* @return {?}
|
|
48
|
+
*/
|
|
49
|
+
NavigatingDuringInteraction.prototype.onRouterError =
|
|
50
|
+
// @Trace()
|
|
51
|
+
/**
|
|
52
|
+
* @param {?} event
|
|
53
|
+
* @return {?}
|
|
54
|
+
*/
|
|
55
|
+
function (event) {
|
|
56
|
+
// navigation was aborted.
|
|
57
|
+
this.context.finishRoutingSession();
|
|
58
|
+
};
|
|
59
|
+
// @Trace()
|
|
60
|
+
// @Trace()
|
|
61
|
+
/**
|
|
62
|
+
* @param {?} event
|
|
63
|
+
* @return {?}
|
|
64
|
+
*/
|
|
65
|
+
NavigatingDuringInteraction.prototype.onRouterEnd =
|
|
66
|
+
// @Trace()
|
|
67
|
+
/**
|
|
68
|
+
* @param {?} event
|
|
69
|
+
* @return {?}
|
|
70
|
+
*/
|
|
71
|
+
function (event) {
|
|
72
|
+
if (this.context.routerInteractionAdapter.isActive()) {
|
|
73
|
+
this.context.transitionTo(new SynchroniseInteractionContextIdsWithRoute(this.context, this.startingUrl, false));
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
this.context.finishRoutingSession(this.getVisits());
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
// @Trace()
|
|
80
|
+
// @Trace()
|
|
81
|
+
/**
|
|
82
|
+
* @param {?} locationTriggerUrl
|
|
83
|
+
* @return {?}
|
|
84
|
+
*/
|
|
85
|
+
NavigatingDuringInteraction.prototype.handleCanDeactivateCancelledEventScenario =
|
|
86
|
+
// @Trace()
|
|
87
|
+
/**
|
|
88
|
+
* @param {?} locationTriggerUrl
|
|
89
|
+
* @return {?}
|
|
90
|
+
*/
|
|
91
|
+
function (locationTriggerUrl) {
|
|
92
|
+
this.context.transitionTo(new WaitUntilLeavingInteractionTransitionCancelled(this.context, this.startingUrl, locationTriggerUrl));
|
|
93
|
+
};
|
|
94
|
+
return NavigatingDuringInteraction;
|
|
95
|
+
}(NavigationSession));
|
|
96
|
+
/**
|
|
97
|
+
* This state exists to handle all events while any kind of navigation is in progress. That way all other states can
|
|
98
|
+
* happily ignore interaction contexts.
|
|
99
|
+
* NOTE: This state is activated when ever an interaction is started. It might be better to split it into
|
|
100
|
+
* different states for different scenarios, e.g. starting model, starting model during route guard etc.
|
|
101
|
+
*/
|
|
102
|
+
export { NavigatingDuringInteraction };
|
|
103
|
+
if (false) {
|
|
104
|
+
/** @type {?} */
|
|
105
|
+
NavigatingDuringInteraction.prototype.isPopState;
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=navigating-during-interaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigating-during-interaction.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/interactions/navigating-during-interaction.ts"],"names":[],"mappings":";;;;;AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAE,8CAA8C,EAAE,MAAM,sEAAsE,CAAC;AACtI,OAAO,EAAE,yCAAyC,EAAE,MAAM,kDAAkD,CAAC;;;;;;;AAQ7G;;;;;;;IAAiD,uDAAiB;IAAlE;QAAA,qEA8BC;QA7BU,gBAAU,GAAG,KAAK,CAAC;;IA6B9B,CAAC;IA3BC,WAAW;;;;;;IACX,uDAAiB;;;;;;IAAjB,UAAkB,KAAuB;QACvC,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;IACtC,CAAC;IAED,WAAW;;;;;;IACX,mDAAa;;;;;;IAAb,UAAc,KAAsB;QAClC,0BAA0B;QAC1B,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;IACtC,CAAC;IAED,WAAW;;;;;;IACX,iDAAW;;;;;;IAAX,UAAY,KAAoB;QAC9B,IAAI,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,QAAQ,EAAE,EAAE;YACpD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,yCAAyC,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAA;SAChH;aAAM;YACL,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;SACrD;IACH,CAAC;IAED,WAAW;;;;;;IACX,+EAAyC;;;;;;IAAzC,UAA0C,kBAA0B;QAClE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,8CAA8C,CAAC,IAAI,CAAC,OAAO,EACvF,IAAI,CAAC,WAAW,EAChB,kBAAkB,CAAC,CAAC,CAAC;IACzB,CAAC;IAEH,kCAAC;AAAD,CAAC,AA9BD,CAAiD,iBAAiB,GA8BjE;;;;;;;;;;IA7BC,iDAA4B","sourcesContent":["import { NavigationCancel, NavigationEnd, NavigationError } from '@angular/router';\nimport { Trace } from '@coolon/pectin';\nimport { NavigationSession } from '../navigation-session';\n\nimport { WaitUntilLeavingInteractionTransitionCancelled } from '../event-cleanup/wait-until-leaving-interaction-transition-cancelled';\nimport { SynchroniseInteractionContextIdsWithRoute } from './synchronise-interaction-context-ids-with-route';\n\n/**\n * This state exists to handle all events while any kind of navigation is in progress. That way all other states can\n * happily ignore interaction contexts.\n * NOTE: This state is activated when ever an interaction is started. It might be better to split it into\n * different states for different scenarios, e.g. starting model, starting model during route guard etc.\n */\nexport class NavigatingDuringInteraction extends NavigationSession {\n readonly isPopState = false;\n\n // @Trace()\n onRouterCancelled(event: NavigationCancel): void {\n this.context.finishRoutingSession();\n }\n\n // @Trace()\n onRouterError(event: NavigationError): void {\n // navigation was aborted.\n this.context.finishRoutingSession();\n }\n\n // @Trace()\n onRouterEnd(event: NavigationEnd): void {\n if (this.context.routerInteractionAdapter.isActive()) {\n this.context.transitionTo(new SynchroniseInteractionContextIdsWithRoute(this.context, this.startingUrl, false))\n } else {\n this.context.finishRoutingSession(this.getVisits());\n }\n }\n\n // @Trace()\n handleCanDeactivateCancelledEventScenario(locationTriggerUrl: string): void {\n this.context.transitionTo(new WaitUntilLeavingInteractionTransitionCancelled(this.context,\n this.startingUrl,\n locationTriggerUrl));\n }\n\n}\n"]}
|
package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
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 { AbstractPopStateNavigation } from '../abstract-pop-state-navigation';
|
|
7
|
+
import { SynchroniseInteractionContextIdsWithRoute } from './synchronise-interaction-context-ids-with-route';
|
|
8
|
+
/**
|
|
9
|
+
* This state exists to handle all events while any kind of navigation is in progress. That way all other states can
|
|
10
|
+
* happily ignore interaction contexts.
|
|
11
|
+
*/
|
|
12
|
+
var /**
|
|
13
|
+
* This state exists to handle all events while any kind of navigation is in progress. That way all other states can
|
|
14
|
+
* happily ignore interaction contexts.
|
|
15
|
+
*/
|
|
16
|
+
PopStateDuringInteractionNavigation = /** @class */ (function (_super) {
|
|
17
|
+
tslib_1.__extends(PopStateDuringInteractionNavigation, _super);
|
|
18
|
+
function PopStateDuringInteractionNavigation(context, startingUrl, poppedHistoryUrl) {
|
|
19
|
+
return _super.call(this, context, startingUrl, poppedHistoryUrl) || this;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Invoked when the place refuses to deactivate because of an unfinished interaction.
|
|
23
|
+
* @param event
|
|
24
|
+
*/
|
|
25
|
+
// @Trace()
|
|
26
|
+
/**
|
|
27
|
+
* Invoked when the place refuses to deactivate because of an unfinished interaction.
|
|
28
|
+
* @param {?} event
|
|
29
|
+
* @return {?}
|
|
30
|
+
*/
|
|
31
|
+
// @Trace()
|
|
32
|
+
PopStateDuringInteractionNavigation.prototype.onRouterCancelled = /**
|
|
33
|
+
* Invoked when the place refuses to deactivate because of an unfinished interaction.
|
|
34
|
+
* @param {?} event
|
|
35
|
+
* @return {?}
|
|
36
|
+
*/
|
|
37
|
+
// @Trace()
|
|
38
|
+
function (event) {
|
|
39
|
+
this.repairBrowserHistoryAndUrlAfterGuardCancellation();
|
|
40
|
+
// NOTE: for now we need to wasTriggeredByPopState=false because we're resetting the url and history in the previous line.
|
|
41
|
+
this.context.transitionTo(new SynchroniseInteractionContextIdsWithRoute(this.context, this.poppedHistoryUrl, false));
|
|
42
|
+
};
|
|
43
|
+
// @Trace()
|
|
44
|
+
// @Trace()
|
|
45
|
+
/**
|
|
46
|
+
* @param {?} event
|
|
47
|
+
* @return {?}
|
|
48
|
+
*/
|
|
49
|
+
PopStateDuringInteractionNavigation.prototype.onRouterEnd =
|
|
50
|
+
// @Trace()
|
|
51
|
+
/**
|
|
52
|
+
* @param {?} event
|
|
53
|
+
* @return {?}
|
|
54
|
+
*/
|
|
55
|
+
function (event) {
|
|
56
|
+
// this.context.transitionTo(new SynchroniseInteractionContextIdsWithRoute(this.context, this.poppedHistoryUrl, false));
|
|
57
|
+
this.context.finishRoutingSession();
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* @param {?} newUrl
|
|
61
|
+
* @return {?}
|
|
62
|
+
*/
|
|
63
|
+
PopStateDuringInteractionNavigation.prototype.handleCanDeactivateCancelledEventScenario = /**
|
|
64
|
+
* @param {?} newUrl
|
|
65
|
+
* @return {?}
|
|
66
|
+
*/
|
|
67
|
+
function (newUrl) {
|
|
68
|
+
this.illegalTransition('Leaving interaction after pop-state should\'t block so should never see a back button click');
|
|
69
|
+
};
|
|
70
|
+
return PopStateDuringInteractionNavigation;
|
|
71
|
+
}(AbstractPopStateNavigation));
|
|
72
|
+
/**
|
|
73
|
+
* This state exists to handle all events while any kind of navigation is in progress. That way all other states can
|
|
74
|
+
* happily ignore interaction contexts.
|
|
75
|
+
*/
|
|
76
|
+
export { PopStateDuringInteractionNavigation };
|
|
77
|
+
//# sourceMappingURL=pop-state-during-interaction-navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pop-state-during-interaction-navigation.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.ts"],"names":[],"mappings":";;;;;AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E,OAAO,EAAE,yCAAyC,EAAE,MAAM,kDAAkD,CAAC;;;;;AAM7G;;;;;IAAyD,+DAA0B;IAEjF,6CAAY,OAA0B,EAAE,WAAmB,EAAE,gBAAwB;eACnF,kBAAM,OAAO,EAAE,WAAW,EAAE,gBAAgB,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACH,WAAW;;;;;;;IACX,+DAAiB;;;;;;IAAjB,UAAkB,KAAuB;QACvC,IAAI,CAAC,gDAAgD,EAAE,CAAC;QACxD,0HAA0H;QAC1H,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,yCAAyC,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC;IACvH,CAAC;IAED,WAAW;;;;;;IACX,yDAAW;;;;;;IAAX,UAAY,KAAoB;QAC9B,wHAAwH;QACxH,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;IACtC,CAAC;;;;;IAED,uFAAyC;;;;IAAzC,UAA0C,MAAc;QACtD,IAAI,CAAC,iBAAiB,CAAC,6FAA6F,CAAC,CAAC;IACxH,CAAC;IAEH,0CAAC;AAAD,CAAC,AA3BD,CAAyD,0BAA0B,GA2BlF","sourcesContent":["import { NavigationCancel, NavigationEnd } from '@angular/router';\nimport { Trace } from '@coolon/pectin';\nimport { AbstractPopStateNavigation } from '../abstract-pop-state-navigation';\nimport { NavigationContext } from '../navigation-context';\nimport { SynchroniseInteractionContextIdsWithRoute } from './synchronise-interaction-context-ids-with-route';\n\n/**\n * This state exists to handle all events while any kind of navigation is in progress. That way all other states can\n * happily ignore interaction contexts.\n */\nexport class PopStateDuringInteractionNavigation extends AbstractPopStateNavigation {\n\n constructor(context: NavigationContext, startingUrl: string, poppedHistoryUrl: string) {\n super(context, startingUrl, poppedHistoryUrl);\n }\n\n /**\n * Invoked when the place refuses to deactivate because of an unfinished interaction.\n * @param event\n */\n // @Trace()\n onRouterCancelled(event: NavigationCancel): void {\n this.repairBrowserHistoryAndUrlAfterGuardCancellation();\n // NOTE: for now we need to wasTriggeredByPopState=false because we're resetting the url and history in the previous line.\n this.context.transitionTo(new SynchroniseInteractionContextIdsWithRoute(this.context, this.poppedHistoryUrl, false));\n }\n\n // @Trace()\n onRouterEnd(event: NavigationEnd): void {\n // this.context.transitionTo(new SynchroniseInteractionContextIdsWithRoute(this.context, this.poppedHistoryUrl, false));\n this.context.finishRoutingSession();\n }\n\n handleCanDeactivateCancelledEventScenario(newUrl: string): void {\n this.illegalTransition('Leaving interaction after pop-state should\\'t block so should never see a back button click');\n }\n\n}\n"]}
|