@coolon/angular-ui-powerups 0.0.125 → 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 +3743 -3012
- 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 +47 -22
- 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 +66 -25
- 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 +2641 -2268
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +3703 -2984
- 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 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"PlaceGuard":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"PlaceGuard":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":27,"character":39},{"__symbolic":"reference","module":"../url-service","name":"UrlService","line":28,"character":34},{"__symbolic":"reference","module":"../place-router","name":"PlaceRouter","line":29,"character":44},{"__symbolic":"reference","module":"../place-history","name":"PlaceHistory","line":30,"character":45},{"__symbolic":"reference","module":"../../interaction/services/interaction.service","name":"InteractionService","line":31,"character":51},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":32,"character":41}]}],"canActivate":[{"__symbolic":"method"}],"canDeactivate":[{"__symbolic":"method"}],"handleGuardResult":[{"__symbolic":"method"}],"authorisePlaceThen":[{"__symbolic":"method"}],"isAuthorised":[{"__symbolic":"method"}],"getAuthGuard":[{"__symbolic":"method"}],"cleanInteractionState":[{"__symbolic":"method"}]}}}}]
|
|
@@ -13,6 +13,7 @@ export { PlaceHistory } from "./place-history";
|
|
|
13
13
|
export { PlaceRouter } from "./place-router";
|
|
14
14
|
export { Place } from "./place.decorator";
|
|
15
15
|
export { PlaceModule } from "./place.module";
|
|
16
|
+
export { UrlService } from "./url-service";
|
|
16
17
|
export { UrlSnapshot } from "./url-snapshot";
|
|
17
18
|
export { Visit } from "./visit";
|
|
18
19
|
export { AbstractPlaceNavigationComponent } from "./components/abstract-place-navigation.component";
|
|
@@ -23,10 +24,22 @@ export { PlaceOutletComponent } from "./components/place-outlet/place-outlet.com
|
|
|
23
24
|
export { leftRightPlaceAnimation, LEFT_RIGHT_PLACE_ANIMATION } from "./components/place-outlet/route-animations";
|
|
24
25
|
export { TabbedPlaceNavigationComponent } from "./components/tabbed-place-navigation/tabbed-place-navigation.component";
|
|
25
26
|
export { ConsolidatedParameterMap } from "./guards/consolidated-param-map";
|
|
26
|
-
export { NavigationState } from "./guards/navigation-state";
|
|
27
27
|
export { NoopAuthGuard } from "./guards/noop-auth-guard.service";
|
|
28
|
-
export { PlaceComponentDeactivationHandler } from "./guards/place-component-deactivation-handler";
|
|
29
28
|
export { PlaceGuard } from "./guards/place.guard";
|
|
29
|
+
export { PlaceComponentDeactivationHandler } from "./navigation/place-component-deactivation-handler";
|
|
30
|
+
export { AbstractPopStateNavigation } from "./navigation/session/abstract-pop-state-navigation";
|
|
31
|
+
export { Navigating } from "./navigation/session/navigating";
|
|
32
|
+
export { NavigationContext } from "./navigation/session/navigation-context";
|
|
33
|
+
export { NavigationSession } from "./navigation/session/navigation-session";
|
|
34
|
+
export { PopStateNavigation } from "./navigation/session/pop-state-navigation";
|
|
35
|
+
export { EventCleanUpSession } from "./navigation/session/event-cleanup/event-clean-up-session";
|
|
36
|
+
export { WaitUntilLeavingInteractionTransitionCancelled } from "./navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled";
|
|
37
|
+
export { WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish } from "./navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes";
|
|
38
|
+
export { WaitUntilPopStateDuringCanDeactivateInteractionFinishes } from "./navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes";
|
|
39
|
+
export { NavigatingDuringInteraction } from "./navigation/session/interactions/navigating-during-interaction";
|
|
40
|
+
export { PopStateDuringInteractionNavigation } from "./navigation/session/interactions/pop-state-during-interaction-navigation";
|
|
41
|
+
export { RemoveLastInteractionFromUrlNavigationSession } from "./navigation/session/interactions/remove-last-interaction-from-url-navigation-session";
|
|
42
|
+
export { SynchroniseInteractionContextIdsWithRoute } from "./navigation/session/interactions/synchronise-interaction-context-ids-with-route";
|
|
30
43
|
export { Formatter } from "./route/formatter";
|
|
31
44
|
export {} from "./route/json-types";
|
|
32
45
|
export { RouteId, VisitParameter, VisitParameterList } from "./route/parameter-decorators";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/index.ts"],"names":[],"mappings":";;;;;;;AAIA,eAAc,YAAY,CAAC;AAC3B,mFAAc,mBAAmB,CAAC;AAClC,iCAAc,gBAAgB,CAAC;AAC/B,gCAAc,oBAAoB,CAAC;AACnC,6BAAc,iBAAiB,CAAC;AAChC,4BAAc,gBAAgB,CAAC;AAC/B,sBAAc,mBAAmB,CAAC;AAClC,4BAAc,gBAAgB,CAAC;AAC/B,4BAAc,gBAAgB,CAAC;AAC/B,sBAAc,SAAS,CAAC;AACxB,iDAAc,kDAAkD,CAAC;AACjE,qCAAc,kDAAkD,CAAC;AACjE,oCAAc,gDAAgD,CAAC;AAC/D,sCAAc,sDAAsD,CAAC;AACrE,qCAAc,kDAAkD,CAAC;AACjE,oEAAc,4CAA4C,CAAC;AAC3D,+CAAc,wEAAwE,CAAC;AACvF,yCAAc,iCAAiC,CAAC;AAChD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/index.ts"],"names":[],"mappings":";;;;;;;AAIA,eAAc,YAAY,CAAC;AAC3B,mFAAc,mBAAmB,CAAC;AAClC,iCAAc,gBAAgB,CAAC;AAC/B,gCAAc,oBAAoB,CAAC;AACnC,6BAAc,iBAAiB,CAAC;AAChC,4BAAc,gBAAgB,CAAC;AAC/B,sBAAc,mBAAmB,CAAC;AAClC,4BAAc,gBAAgB,CAAC;AAC/B,2BAAc,eAAe,CAAC;AAC9B,4BAAc,gBAAgB,CAAC;AAC/B,sBAAc,SAAS,CAAC;AACxB,iDAAc,kDAAkD,CAAC;AACjE,qCAAc,kDAAkD,CAAC;AACjE,oCAAc,gDAAgD,CAAC;AAC/D,sCAAc,sDAAsD,CAAC;AACrE,qCAAc,kDAAkD,CAAC;AACjE,oEAAc,4CAA4C,CAAC;AAC3D,+CAAc,wEAAwE,CAAC;AACvF,yCAAc,iCAAiC,CAAC;AAChD,8BAAc,kCAAkC,CAAC;AACjD,2BAAc,sBAAsB,CAAC;AACrC,kDAAc,mDAAmD,CAAC;AAClE,2CAAc,oDAAoD,CAAC;AACnE,2BAAc,iCAAiC,CAAC;AAChD,kCAAc,yCAAyC,CAAC;AACxD,kCAAc,yCAAyC,CAAC;AACxD,mCAAc,2CAA2C,CAAC;AAC1D,oCAAc,2DAA2D,CAAC;AAC1E,+DAAc,wFAAwF,CAAC;AACvG,oFAAc,+FAA+F,CAAC;AAC9G,wEAAc,kGAAkG,CAAC;AACjH,4CAAc,iEAAiE,CAAC;AAChF,oDAAc,2EAA2E,CAAC;AAC1F,8DAAc,uFAAuF,CAAC;AACtG,0DAAc,kFAAkF,CAAC;AACjG,0BAAc,mBAAmB,CAAC;AAClC,eAAc,oBAAoB,CAAC;AACnC,4DAAc,8BAA8B,CAAC;AAC7C,oCAAc,oCAAoC,CAAC;AACnD,eAAc,6BAA6B,CAAC;AAC5C,eAAc,4BAA4B,CAAC;AAC3C,+BAAc,yBAAyB,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./nav-item\";\nexport * from \"./place-component\";\nexport * from \"./place-config\";\nexport * from \"./place-definition\";\nexport * from \"./place-history\";\nexport * from \"./place-router\";\nexport * from \"./place.decorator\";\nexport * from \"./place.module\";\nexport * from \"./url-service\";\nexport * from \"./url-snapshot\";\nexport * from \"./visit\";\nexport * from \"./components/abstract-place-navigation.component\";\nexport * from \"./components/busy-overlay/busy-overlay.component\";\nexport * from \"./components/empty-state/empty-state.component\";\nexport * from \"./components/list-place-nav/list-place-nav.component\";\nexport * from \"./components/place-outlet/place-outlet.component\";\nexport * from \"./components/place-outlet/route-animations\";\nexport * from \"./components/tabbed-place-navigation/tabbed-place-navigation.component\";\nexport * from \"./guards/consolidated-param-map\";\nexport * from \"./guards/noop-auth-guard.service\";\nexport * from \"./guards/place.guard\";\nexport * from \"./navigation/place-component-deactivation-handler\";\nexport * from \"./navigation/session/abstract-pop-state-navigation\";\nexport * from \"./navigation/session/navigating\";\nexport * from \"./navigation/session/navigation-context\";\nexport * from \"./navigation/session/navigation-session\";\nexport * from \"./navigation/session/pop-state-navigation\";\nexport * from \"./navigation/session/event-cleanup/event-clean-up-session\";\nexport * from \"./navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled\";\nexport * from \"./navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes\";\nexport * from \"./navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes\";\nexport * from \"./navigation/session/interactions/navigating-during-interaction\";\nexport * from \"./navigation/session/interactions/pop-state-during-interaction-navigation\";\nexport * from \"./navigation/session/interactions/remove-last-interaction-from-url-navigation-session\";\nexport * from \"./navigation/session/interactions/synchronise-interaction-context-ids-with-route\";\nexport * from \"./route/formatter\";\nexport * from \"./route/json-types\";\nexport * from \"./route/parameter-decorators\";\nexport * from \"./route/parameter-definition.class\";\nexport * from \"./route/parameter-sanitiser\";\nexport * from \"./route/parameter-snapshot\";\nexport * from \"./route/visit-sanitiser\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./nav-item"},{"from":"./place-component"},{"from":"./place-config"},{"from":"./place-definition"},{"from":"./place-history"},{"from":"./place-router"},{"from":"./place.decorator"},{"from":"./place.module"},{"from":"./url-snapshot"},{"from":"./visit"},{"from":"./components/abstract-place-navigation.component"},{"from":"./components/busy-overlay/busy-overlay.component"},{"from":"./components/empty-state/empty-state.component"},{"from":"./components/list-place-nav/list-place-nav.component"},{"from":"./components/place-outlet/place-outlet.component"},{"from":"./components/place-outlet/route-animations"},{"from":"./components/tabbed-place-navigation/tabbed-place-navigation.component"},{"from":"./guards/consolidated-param-map"},{"from":"./guards/
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./nav-item"},{"from":"./place-component"},{"from":"./place-config"},{"from":"./place-definition"},{"from":"./place-history"},{"from":"./place-router"},{"from":"./place.decorator"},{"from":"./place.module"},{"from":"./url-service"},{"from":"./url-snapshot"},{"from":"./visit"},{"from":"./components/abstract-place-navigation.component"},{"from":"./components/busy-overlay/busy-overlay.component"},{"from":"./components/empty-state/empty-state.component"},{"from":"./components/list-place-nav/list-place-nav.component"},{"from":"./components/place-outlet/place-outlet.component"},{"from":"./components/place-outlet/route-animations"},{"from":"./components/tabbed-place-navigation/tabbed-place-navigation.component"},{"from":"./guards/consolidated-param-map"},{"from":"./guards/noop-auth-guard.service"},{"from":"./guards/place.guard"},{"from":"./navigation/place-component-deactivation-handler"},{"from":"./navigation/session/abstract-pop-state-navigation"},{"from":"./navigation/session/navigating"},{"from":"./navigation/session/navigation-context"},{"from":"./navigation/session/navigation-session"},{"from":"./navigation/session/pop-state-navigation"},{"from":"./navigation/session/event-cleanup/event-clean-up-session"},{"from":"./navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled"},{"from":"./navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes"},{"from":"./navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes"},{"from":"./navigation/session/interactions/navigating-during-interaction"},{"from":"./navigation/session/interactions/pop-state-during-interaction-navigation"},{"from":"./navigation/session/interactions/remove-last-interaction-from-url-navigation-session"},{"from":"./navigation/session/interactions/synchronise-interaction-context-ids-with-route"},{"from":"./route/formatter"},{"from":"./route/json-types"},{"from":"./route/parameter-decorators"},{"from":"./route/parameter-definition.class"},{"from":"./route/parameter-sanitiser"},{"from":"./route/parameter-snapshot"},{"from":"./route/visit-sanitiser"}]}]
|
|
@@ -4,29 +4,37 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
6
|
import * as _ from 'lodash';
|
|
7
|
+
/**
|
|
8
|
+
* This class handles the logic around canDeactivate for a given router state transition. It's core responsibilities are:
|
|
9
|
+
* 1. Ensure we only ask the component to deactivate once on a given navigation cycle (since visit sanitisation can result in multiple round trips to through the router.)
|
|
10
|
+
* 2. Ensure only the primary place component is asked when there are nested places. The primary component is the one at the top
|
|
11
|
+
* of the routing change tree.
|
|
12
|
+
* 3. Automatically handle standard interaction scenarios on the components behalf.
|
|
13
|
+
*/
|
|
7
14
|
export class PlaceComponentDeactivationHandler {
|
|
8
15
|
/**
|
|
9
16
|
* @param {?} component
|
|
10
|
-
* @param {?}
|
|
17
|
+
* @param {?} navigationSession
|
|
11
18
|
* @param {?} isPrimaryComponent
|
|
12
19
|
*/
|
|
13
|
-
constructor(component,
|
|
20
|
+
constructor(component, navigationSession, isPrimaryComponent) {
|
|
14
21
|
this.component = component;
|
|
15
|
-
this.
|
|
22
|
+
this.navigationSession = navigationSession;
|
|
16
23
|
this.isPrimaryComponent = isPrimaryComponent;
|
|
17
24
|
}
|
|
18
25
|
/**
|
|
19
26
|
* @return {?}
|
|
20
27
|
*/
|
|
21
|
-
get
|
|
22
|
-
return this.
|
|
28
|
+
get routerInteractionAdapter() {
|
|
29
|
+
return this.navigationSession.interactionServiceAdapter;
|
|
23
30
|
}
|
|
24
31
|
/**
|
|
25
32
|
* @return {?}
|
|
26
33
|
*/
|
|
27
|
-
get
|
|
28
|
-
return this.
|
|
34
|
+
get urlService() {
|
|
35
|
+
return this.navigationSession.urlService;
|
|
29
36
|
}
|
|
37
|
+
// @Trace()
|
|
30
38
|
/**
|
|
31
39
|
* @param {?} currentUrl
|
|
32
40
|
* @param {?} nextState
|
|
@@ -53,26 +61,24 @@ export class PlaceComponentDeactivationHandler {
|
|
|
53
61
|
*/
|
|
54
62
|
canDeactivateComponent(currentUrl, nextState) {
|
|
55
63
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
// console.log(this.navigationState.toString());
|
|
57
64
|
// Automatically cancel any active activities if the navigation session was triggered by the back button.
|
|
58
65
|
// If we handled more than just the pop state then it leads to the UI ignoring clicks and just cancelling things which is deeply disconcerting.
|
|
59
|
-
if (this.
|
|
60
|
-
if (this.isPrimaryComponent && this.
|
|
66
|
+
if (this.navigationSession.isPopState) {
|
|
67
|
+
if (this.isPrimaryComponent && this.routerInteractionAdapter.isModalActive()) {
|
|
61
68
|
/** @type {?} */
|
|
62
|
-
const routeIds = this.
|
|
69
|
+
const routeIds = this.urlService.getActiveInteractionIdsFromUrl(nextState.url);
|
|
63
70
|
/** @type {?} */
|
|
64
|
-
const currentIds = this.
|
|
65
|
-
if (!_.isEqual(currentIds, routeIds)) {
|
|
66
|
-
yield this.
|
|
67
|
-
return
|
|
71
|
+
const currentIds = this.routerInteractionAdapter.getActiveInteractionContextIds();
|
|
72
|
+
if (!_.isEqual(currentIds, routeIds)) { // why am I checking this????
|
|
73
|
+
yield this.routerInteractionAdapter.cancelCurrentModalInteraction();
|
|
74
|
+
return false;
|
|
68
75
|
}
|
|
69
76
|
}
|
|
70
77
|
else {
|
|
71
78
|
// check if the component has an in place interaction
|
|
72
|
-
if (this.
|
|
73
|
-
yield this.
|
|
74
|
-
return
|
|
75
|
-
.updateInteractionIds(this.interactionService.activeInteractionContextIds.value);
|
|
79
|
+
if (this.routerInteractionAdapter.isComponentInteracting(this.component)) {
|
|
80
|
+
yield this.routerInteractionAdapter.cancelComponentInteraction(this.component);
|
|
81
|
+
return false;
|
|
76
82
|
}
|
|
77
83
|
}
|
|
78
84
|
}
|
|
@@ -82,11 +88,11 @@ export class PlaceComponentDeactivationHandler {
|
|
|
82
88
|
// No interaction in progress, so ask the component .
|
|
83
89
|
// This may start an interaction, hence checking the interaction context before now. I.e. if the place pops up the dialog, and
|
|
84
90
|
// the user clicks back again, we'll re-enter here and go bang when the component tries to open another dialog.
|
|
85
|
-
return this.component.canDeactivate(this.
|
|
91
|
+
return this.component.canDeactivate(this.navigationSession.canDeactivateInteractionContext);
|
|
86
92
|
}
|
|
87
93
|
// The component has an active interaction but no deactivation hook. Rather than guessing what to do
|
|
88
94
|
// we'll just cancel the navigation and print a warning.
|
|
89
|
-
if (this.
|
|
95
|
+
if (this.routerInteractionAdapter.isComponentInteracting(this.component)) {
|
|
90
96
|
console.warn('Route changed while component has active interaction, cancelling navigation');
|
|
91
97
|
return false;
|
|
92
98
|
}
|
|
@@ -115,7 +121,7 @@ if (false) {
|
|
|
115
121
|
/** @type {?} */
|
|
116
122
|
PlaceComponentDeactivationHandler.prototype.component;
|
|
117
123
|
/** @type {?} */
|
|
118
|
-
PlaceComponentDeactivationHandler.prototype.
|
|
124
|
+
PlaceComponentDeactivationHandler.prototype.navigationSession;
|
|
119
125
|
/** @type {?} */
|
|
120
126
|
PlaceComponentDeactivationHandler.prototype.isPrimaryComponent;
|
|
121
127
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"place-component-deactivation-handler.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/place-component-deactivation-handler.ts"],"names":[],"mappings":";;;;;AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;;;;;;;;AAY5B,MAAM,OAAO,iCAAiC;;;;;;IAI5C,YAAqB,SAAyB,EAAW,iBAAoC,EAAW,kBAA2B;QAA9G,cAAS,GAAT,SAAS,CAAgB;QAAW,sBAAiB,GAAjB,iBAAiB,CAAmB;QAAW,uBAAkB,GAAlB,kBAAkB,CAAS;IACnI,CAAC;;;;IAED,IAAI,wBAAwB;QAC1B,OAAO,IAAI,CAAC,iBAAiB,CAAC,yBAAyB,CAAC;IAC1D,CAAC;;;;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC;IAC3C,CAAC;;;;;;;IAGK,aAAa,CAAC,UAAuB,EAAE,SAAsB;;YACjE,2EAA2E;YAC3E,oFAAoF;YACpF,sBAAsB;YACtB,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;gBAC9B,wFAAwF;gBACxF,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,sBAAsB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;aAChF;YACD,OAAO,IAAI,CAAC,oBAAoB,CAAC;QACnC,CAAC;KAAA;;;;;;;;IAIe,sBAAsB,CAAC,UAAuB,EAAE,SAAsB;;YACpF,yGAAyG;YACzG,+IAA+I;YAC/I,IAAI,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE;gBAErC,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,wBAAwB,CAAC,aAAa,EAAE,EAAE;;0BACtE,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,8BAA8B,CAAC,SAAS,CAAC,GAAG,CAAC;;0BACxE,UAAU,GAAG,IAAI,CAAC,wBAAwB,CAAC,8BAA8B,EAAE;oBACjF,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,EAAE,6BAA6B;wBACnE,MAAM,IAAI,CAAC,wBAAwB,CAAC,6BAA6B,EAAE,CAAC;wBACpE,OAAO,KAAK,CAAC;qBACd;iBACF;qBAAM;oBACL,qDAAqD;oBACrD,IAAI,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;wBACxE,MAAM,IAAI,CAAC,wBAAwB,CAAC,0BAA0B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;wBAC/E,OAAO,KAAK,CAAC;qBACd;iBACF;aACF;YAGD,0EAA0E;YAC1E,IAAI,IAAI,CAAC,yBAAyB,CAAC,SAAS,CAAC,EAAE;gBAE7C,IAAI,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE;oBAChC,qDAAqD;oBACrD,8HAA8H;oBAC9H,+GAA+G;oBAC/G,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAiB,CAAC,+BAA+B,CAAC,CAAC;iBAC7F;gBAED,qGAAqG;gBACrG,wDAAwD;gBACxD,IAAI,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;oBACxE,OAAO,CAAC,IAAI,CAAC,6EAA6E,CAAC,CAAC;oBAC5F,OAAO,KAAK,CAAC;iBACd;aAEF;YACD,OAAO,IAAI,CAAC;QACd,CAAC;KAAA;;;;;;IAES,yBAAyB,CAAC,SAAsB;QACxD,qFAAqF;QACrF,gFAAgF;QAChF,0CAA0C;QAC1C,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IACnE,CAAC;CACF;;;;;;IA5EC,iEAA6D;;IAEjD,sDAAkC;;IAAE,8DAA6C;;IAAE,+DAAoC","sourcesContent":["import { Trace } from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { PlaceComponent } from '../place-component';\nimport { UrlSnapshot } from '../url-snapshot';\nimport { NavigationSession } from './session/navigation-session';\n\n/**\n * This class handles the logic around canDeactivate for a given router state transition. It's core responsibilities are:\n * 1. Ensure we only ask the component to deactivate once on a given navigation cycle (since visit sanitisation can result in multiple round trips to through the router.)\n * 2. Ensure only the primary place component is asked when there are nested places. The primary component is the one at the top\n * of the routing change tree.\n * 3. Automatically handle standard interaction scenarios on the components behalf.\n */\nexport class PlaceComponentDeactivationHandler {\n\n private canDeactivatePromise: Promise<boolean | UrlSnapshot>;\n\n constructor(readonly component: PlaceComponent, readonly navigationSession: NavigationSession, readonly isPrimaryComponent: boolean) {\n }\n\n get routerInteractionAdapter() {\n return this.navigationSession.interactionServiceAdapter;\n }\n\n get urlService() {\n return this.navigationSession.urlService;\n }\n\n // @Trace()\n async canDeactivate(currentUrl: UrlSnapshot, nextState: UrlSnapshot): Promise<boolean | UrlSnapshot> {\n // We'll get called multiple times if there's any parameter sanitisation so\n // we always return true if we accepted promise from a previous cycle of the current\n // navigation session.\n if (!this.canDeactivatePromise) {\n // console.log(`creating deactivate promise for -> ${this.component.constructor.name}`);\n this.canDeactivatePromise = this.canDeactivateComponent(currentUrl, nextState);\n }\n return this.canDeactivatePromise;\n }\n\n\n // @Trace()\n protected async canDeactivateComponent(currentUrl: UrlSnapshot, nextState: UrlSnapshot): Promise<UrlSnapshot | boolean> {\n // Automatically cancel any active activities if the navigation session was triggered by the back button.\n // If we handled more than just the pop state then it leads to the UI ignoring clicks and just cancelling things which is deeply disconcerting.\n if (this.navigationSession.isPopState) {\n\n if (this.isPrimaryComponent && this.routerInteractionAdapter.isModalActive()) {\n const routeIds = this.urlService.getActiveInteractionIdsFromUrl(nextState.url);\n const currentIds = this.routerInteractionAdapter.getActiveInteractionContextIds();\n if (!_.isEqual(currentIds, routeIds)) { // why am I checking this????\n await this.routerInteractionAdapter.cancelCurrentModalInteraction();\n return false;\n }\n } else {\n // check if the component has an in place interaction\n if (this.routerInteractionAdapter.isComponentInteracting(this.component)) {\n await this.routerInteractionAdapter.cancelComponentInteraction(this.component);\n return false;\n }\n }\n }\n\n\n // Ok, so now we're really leaving, so we ask the component if we should.;\n if (this.isNotJustAChangeInRouteId(nextState)) {\n\n if (this.component.canDeactivate) {\n // No interaction in progress, so ask the component .\n // This may start an interaction, hence checking the interaction context before now. I.e. if the place pops up the dialog, and\n // the user clicks back again, we'll re-enter here and go bang when the component tries to open another dialog.\n return this.component.canDeactivate(this.navigationSession.canDeactivateInteractionContext);\n }\n\n // The component has an active interaction but no deactivation hook. Rather than guessing what to do\n // we'll just cancel the navigation and print a warning.\n if (this.routerInteractionAdapter.isComponentInteracting(this.component)) {\n console.warn('Route changed while component has active interaction, cancelling navigation');\n return false;\n }\n\n }\n return true;\n }\n\n protected isNotJustAChangeInRouteId(nextState: UrlSnapshot) {\n // Because places with a route-id cover two route segments we get asked to deactivate\n // if the route id is added or removed. So if our path is still present the url\n // then we shouldn't deactivate the place.\n return !nextState.includesPathOf(this.component.placeDefinition);\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"PlaceComponentDeactivationHandler":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../place-component","name":"PlaceComponent","line":17,"character":34},{"__symbolic":"reference","module":"./session/navigation-session","name":"NavigationSession","line":17,"character":78},{"__symbolic":"reference","name":"boolean"}]}],"canDeactivate":[{"__symbolic":"method"}],"canDeactivateComponent":[{"__symbolic":"method"}],"isNotJustAChangeInRouteId":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview added by tsickle
|
|
3
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
+
*/
|
|
5
|
+
import { NavigationSession } from './navigation-session';
|
|
6
|
+
/**
|
|
7
|
+
* @abstract
|
|
8
|
+
*/
|
|
9
|
+
export class AbstractPopStateNavigation extends NavigationSession {
|
|
10
|
+
/**
|
|
11
|
+
* @param {?} context
|
|
12
|
+
* @param {?} startingUrl
|
|
13
|
+
* @param {?} poppedHistoryUrl
|
|
14
|
+
*/
|
|
15
|
+
constructor(context, startingUrl, poppedHistoryUrl) {
|
|
16
|
+
super(context, startingUrl);
|
|
17
|
+
this.poppedHistoryUrl = poppedHistoryUrl;
|
|
18
|
+
this.isPopState = true;
|
|
19
|
+
this.debugPropertyKeys = ['startingUrl', 'poppedHistoryUrl'];
|
|
20
|
+
}
|
|
21
|
+
// @Trace()
|
|
22
|
+
/**
|
|
23
|
+
* @return {?}
|
|
24
|
+
*/
|
|
25
|
+
repairBrowserHistoryAndUrlAfterGuardCancellation() {
|
|
26
|
+
super.repairBrowserHistoryAndUrlAfterGuardCancellation(this.poppedHistoryUrl, this.startingUrl);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (false) {
|
|
30
|
+
/** @type {?} */
|
|
31
|
+
AbstractPopStateNavigation.prototype.isPopState;
|
|
32
|
+
/** @type {?} */
|
|
33
|
+
AbstractPopStateNavigation.prototype.debugPropertyKeys;
|
|
34
|
+
/** @type {?} */
|
|
35
|
+
AbstractPopStateNavigation.prototype.poppedHistoryUrl;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=abstract-pop-state-navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-pop-state-navigation.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/abstract-pop-state-navigation.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;;;;AAEzD,MAAM,OAAgB,0BAA2B,SAAQ,iBAAiB;;;;;;IAIxE,YAAY,OAA0B,EAAE,WAAmB,EAAW,gBAAwB;QAC5F,KAAK,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QADwC,qBAAgB,GAAhB,gBAAgB,CAAQ;QAHrF,eAAU,GAAG,IAAI,CAAC;QAC3B,sBAAiB,GAAG,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC;IAIxD,CAAC;;;;;IAGD,gDAAgD;QAC9C,KAAK,CAAC,gDAAgD,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;IACjG,CAAC;CAEF;;;IAZC,gDAA2B;;IAC3B,uDAAwD;;IAEK,sDAAiC","sourcesContent":["import { Logger, Trace } from '@coolon/pectin';\nimport { NavigationContext } from './navigation-context';\nimport { NavigationSession } from './navigation-session';\n\nexport abstract class AbstractPopStateNavigation extends NavigationSession {\n readonly isPopState = true;\n debugPropertyKeys = ['startingUrl', 'poppedHistoryUrl'];\n\n constructor(context: NavigationContext, startingUrl: string, readonly poppedHistoryUrl: string) {\n super(context, startingUrl);\n }\n\n // @Trace()\n repairBrowserHistoryAndUrlAfterGuardCancellation(): void {\n super.repairBrowserHistoryAndUrlAfterGuardCancellation(this.poppedHistoryUrl, this.startingUrl)\n }\n\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"AbstractPopStateNavigation":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./navigation-session","name":"NavigationSession","line":4,"character":57},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./navigation-context","name":"NavigationContext","line":8,"character":23},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"repairBrowserHistoryAndUrlAfterGuardCancellation":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview added by tsickle
|
|
3
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
+
*/
|
|
5
|
+
import { lang } from '@coolon/typescript-utilities';
|
|
6
|
+
import { NavigationSession } from '../navigation-session';
|
|
7
|
+
/**
|
|
8
|
+
* @abstract
|
|
9
|
+
*/
|
|
10
|
+
export class EventCleanUpSession extends NavigationSession {
|
|
11
|
+
/**
|
|
12
|
+
* @param {?} newUrl
|
|
13
|
+
* @return {?}
|
|
14
|
+
*/
|
|
15
|
+
handleCanDeactivateCancelledEventScenario(newUrl) {
|
|
16
|
+
lang.illegalState('onCanDeactivateInteractionCancelled not supported for event clean up states');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=event-clean-up-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-clean-up-session.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/event-cleanup/event-clean-up-session.ts"],"names":[],"mappings":";;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;;;;AAE1D,MAAM,OAAgB,mBAAoB,SAAQ,iBAAiB;;;;;IAGjE,yCAAyC,CAAC,MAAc;QACtD,IAAI,CAAC,YAAY,CAAC,6EAA6E,CAAC,CAAC;IACnG,CAAC;CAEF","sourcesContent":["import { lang } from '@coolon/typescript-utilities';\nimport { NavigationSession } from '../navigation-session';\n\nexport abstract class EventCleanUpSession extends NavigationSession {\n\n\n handleCanDeactivateCancelledEventScenario(newUrl: string): void {\n lang.illegalState('onCanDeactivateInteractionCancelled not supported for event clean up states');\n }\n\n}\n"]}
|
package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.metadata.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"EventCleanUpSession":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../navigation-session","name":"NavigationSession","line":3,"character":50},"members":{"handleCanDeactivateCancelledEventScenario":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
* The sequence of router events are:
|
|
9
|
+
* NavigationError -> url = url of navigation link
|
|
10
|
+
* NavigationEnd
|
|
11
|
+
* onPopState url = Our currentUrl sans and interaction query params
|
|
12
|
+
* NavigationCancel url == same as above.
|
|
13
|
+
*/
|
|
14
|
+
export class WaitUntilLeavingInteractionTransitionCancelled extends EventCleanUpSession {
|
|
15
|
+
/**
|
|
16
|
+
* @param {?} context
|
|
17
|
+
* @param {?} startingUrl
|
|
18
|
+
* @param {?} locationChangeTriggerUrl
|
|
19
|
+
*/
|
|
20
|
+
constructor(context, startingUrl, locationChangeTriggerUrl) {
|
|
21
|
+
super(context, startingUrl);
|
|
22
|
+
this.locationChangeTriggerUrl = locationChangeTriggerUrl;
|
|
23
|
+
this.isPopState = false;
|
|
24
|
+
this.firstCancelHandled = false;
|
|
25
|
+
this.popStateHandled = false;
|
|
26
|
+
this.debugPropertyKeys = ['idle', 'startingUrl', 'poppedHistoryUrl', 'locationChangeTriggerUrl', 'popStateEventUrl', 'firstCancelHandled', 'popStateHandled'];
|
|
27
|
+
}
|
|
28
|
+
// @Trace()
|
|
29
|
+
/**
|
|
30
|
+
* @param {?} event
|
|
31
|
+
* @return {?}
|
|
32
|
+
*/
|
|
33
|
+
onRouterStarted(event) {
|
|
34
|
+
this.ignore(event);
|
|
35
|
+
}
|
|
36
|
+
// @Trace()
|
|
37
|
+
/**
|
|
38
|
+
* @param {?} event
|
|
39
|
+
* @return {?}
|
|
40
|
+
*/
|
|
41
|
+
onRouterCancelled(event) {
|
|
42
|
+
this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.locationChangeTriggerUrl, this.startingUrl);
|
|
43
|
+
this.context.finishRoutingSession();
|
|
44
|
+
}
|
|
45
|
+
// @Trace()
|
|
46
|
+
/**
|
|
47
|
+
* @param {?} event
|
|
48
|
+
* @return {?}
|
|
49
|
+
*/
|
|
50
|
+
onRouterEnd(event) {
|
|
51
|
+
this.ignore(event);
|
|
52
|
+
}
|
|
53
|
+
// @Trace()
|
|
54
|
+
/**
|
|
55
|
+
* @param {?} event
|
|
56
|
+
* @return {?}
|
|
57
|
+
*/
|
|
58
|
+
onRouterError(event) {
|
|
59
|
+
this.ignore(event);
|
|
60
|
+
}
|
|
61
|
+
// @Trace()
|
|
62
|
+
/**
|
|
63
|
+
* @param {?} event
|
|
64
|
+
* @return {?}
|
|
65
|
+
*/
|
|
66
|
+
onPopState(event) {
|
|
67
|
+
this.ignore(event);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @param {?} component
|
|
71
|
+
* @param {?} currentUrl
|
|
72
|
+
* @param {?} nextUrl
|
|
73
|
+
* @return {?}
|
|
74
|
+
*/
|
|
75
|
+
canDeactivatePlace(component, currentUrl, nextUrl) {
|
|
76
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
return false;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (false) {
|
|
82
|
+
/** @type {?} */
|
|
83
|
+
WaitUntilLeavingInteractionTransitionCancelled.prototype.isPopState;
|
|
84
|
+
/** @type {?} */
|
|
85
|
+
WaitUntilLeavingInteractionTransitionCancelled.prototype.firstCancelHandled;
|
|
86
|
+
/** @type {?} */
|
|
87
|
+
WaitUntilLeavingInteractionTransitionCancelled.prototype.popStateHandled;
|
|
88
|
+
/** @type {?} */
|
|
89
|
+
WaitUntilLeavingInteractionTransitionCancelled.prototype.popStateEventUrl;
|
|
90
|
+
/** @type {?} */
|
|
91
|
+
WaitUntilLeavingInteractionTransitionCancelled.prototype.debugPropertyKeys;
|
|
92
|
+
/** @type {?} */
|
|
93
|
+
WaitUntilLeavingInteractionTransitionCancelled.prototype.locationChangeTriggerUrl;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=wait-until-leaving-interaction-transition-cancelled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-until-leaving-interaction-transition-cancelled.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.ts"],"names":[],"mappings":";;;;;AAQA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;;;;;;;;AAS/D,MAAM,OAAO,8CAA+C,SAAQ,mBAAmB;;;;;;IAQrF,YAAY,OAA0B,EAC1B,WAAmB,EACV,wBAAgC;QACnD,KAAK,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QADT,6BAAwB,GAAxB,wBAAwB,CAAQ;QAR5C,eAAU,GAAG,KAAK,CAAC;QAC5B,uBAAkB,GAAG,KAAK,CAAC;QAC3B,oBAAe,GAAG,KAAK,CAAC;QAExB,sBAAiB,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;IAMzJ,CAAC;;;;;;IAGD,eAAe,CAAC,KAAsB;QACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;;;;;;IAGD,iBAAiB,CAAC,KAAuB;QACvC,IAAI,CAAC,gDAAgD,CAAC,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACvG,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;IACtC,CAAC;;;;;;IAGD,WAAW,CAAC,KAAoB;QAC9B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;;;;;;IAGD,aAAa,CAAC,KAAsB;QAClC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;;;;;;IAGD,UAAU,CAAC,KAAsB;QAC/B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;;;;;;;IAEK,kBAAkB,CAAC,SAAyB,EAAE,UAAuB,EAAE,OAAoB;;YAC/F,OAAO,KAAK,CAAC;QACf,CAAC;KAAA;CACF;;;IAzCC,oEAA4B;;IAC5B,4EAA2B;;IAC3B,yEAAwB;;IACxB,0EAAyB;;IACzB,2EAAyJ;;IAI7I,kFAAyC","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 { SynchroniseInteractionContextIdsWithRoute } from '../interactions/synchronise-interaction-context-ids-with-route';\nimport { NavigationContext } from '../navigation-context';\nimport { NavigationSession } from '../navigation-session';\nimport { lang } from '@coolon/typescript-utilities';\nimport { EventCleanUpSession } from './event-clean-up-session';\n\n/**\n * The sequence of router events are:\n * NavigationError -> url = url of navigation link\n * NavigationEnd\n * onPopState url = Our currentUrl sans and interaction query params\n * NavigationCancel url == same as above.\n */\nexport class WaitUntilLeavingInteractionTransitionCancelled 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\n constructor(context: NavigationContext,\n startingUrl: string,\n readonly locationChangeTriggerUrl: 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 this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.locationChangeTriggerUrl, this.startingUrl);\n this.context.finishRoutingSession();\n }\n\n // @Trace()\n onRouterEnd(event: NavigationEnd): void {\n this.ignore(event);\n }\n\n // @Trace()\n onRouterError(event: NavigationError): void {\n this.ignore(event);\n }\n\n // @Trace()\n onPopState(event: NavigationStart): void {\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 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"WaitUntilLeavingInteractionTransitionCancelled":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./event-clean-up-session","name":"EventCleanUpSession","line":17,"character":68},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../navigation-context","name":"NavigationContext","line":25,"character":23},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"onRouterStarted":[{"__symbolic":"method"}],"onRouterCancelled":[{"__symbolic":"method"}],"onRouterEnd":[{"__symbolic":"method"}],"onRouterError":[{"__symbolic":"method"}],"onPopState":[{"__symbolic":"method"}],"canDeactivatePlace":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1,132 @@
|
|
|
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
|
+
export class WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish extends EventCleanUpSession {
|
|
30
|
+
/**
|
|
31
|
+
* @param {?} context
|
|
32
|
+
* @param {?} startingUrl
|
|
33
|
+
* @param {?} clickedLinkUrl
|
|
34
|
+
*/
|
|
35
|
+
constructor(context, startingUrl, clickedLinkUrl) {
|
|
36
|
+
super(context, startingUrl);
|
|
37
|
+
this.clickedLinkUrl = clickedLinkUrl;
|
|
38
|
+
this.isPopState = false;
|
|
39
|
+
this.clickedLinkMatchedBackButtonUrl = false;
|
|
40
|
+
this.debugPropertyKeys = ['idle', 'startingUrl', 'clickedLinkUrl', 'firstCancelEventUrl', 'clickedLinkMatchedBackButtonUrl', 'popStateEventUrl'];
|
|
41
|
+
}
|
|
42
|
+
// @Trace()
|
|
43
|
+
/**
|
|
44
|
+
* @param {?} event
|
|
45
|
+
* @return {?}
|
|
46
|
+
*/
|
|
47
|
+
onRouterStarted(event) {
|
|
48
|
+
this.ignore(event);
|
|
49
|
+
}
|
|
50
|
+
// @Trace()
|
|
51
|
+
/**
|
|
52
|
+
* @param {?} event
|
|
53
|
+
* @return {?}
|
|
54
|
+
*/
|
|
55
|
+
onRouterCancelled(event) {
|
|
56
|
+
// TODO: should really split this into two sub states in the first cancel event.
|
|
57
|
+
if (!this.firstCancelEventUrl) {
|
|
58
|
+
this.firstCancelEventUrl = event.url;
|
|
59
|
+
this.clickedLinkMatchedBackButtonUrl = event.url === this.clickedLinkUrl;
|
|
60
|
+
this.ignore(event);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
// we wait for our popped state to come in.
|
|
64
|
+
if (!this.clickedLinkMatchedBackButtonUrl && this.popStateEventUrl) {
|
|
65
|
+
this.finaliseRouting();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// @Trace()
|
|
70
|
+
/**
|
|
71
|
+
* @param {?} event
|
|
72
|
+
* @return {?}
|
|
73
|
+
*/
|
|
74
|
+
onRouterEnd(event) {
|
|
75
|
+
if (this.clickedLinkMatchedBackButtonUrl) {
|
|
76
|
+
this.finaliseRouting();
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
this.ignore(event);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// @Trace()
|
|
83
|
+
/**
|
|
84
|
+
* @param {?} event
|
|
85
|
+
* @return {?}
|
|
86
|
+
*/
|
|
87
|
+
onRouterError(event) {
|
|
88
|
+
this.ignore(event);
|
|
89
|
+
}
|
|
90
|
+
// @Trace()
|
|
91
|
+
/**
|
|
92
|
+
* @param {?} event
|
|
93
|
+
* @return {?}
|
|
94
|
+
*/
|
|
95
|
+
onPopState(event) {
|
|
96
|
+
this.popStateEventUrl = event.url;
|
|
97
|
+
this.ignore(event);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @return {?}
|
|
101
|
+
*/
|
|
102
|
+
finaliseRouting() {
|
|
103
|
+
this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.clickedLinkUrl, this.startingUrl);
|
|
104
|
+
return this.context.finishRoutingSession();
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @param {?} component
|
|
108
|
+
* @param {?} currentUrl
|
|
109
|
+
* @param {?} nextUrl
|
|
110
|
+
* @return {?}
|
|
111
|
+
*/
|
|
112
|
+
canDeactivatePlace(component, currentUrl, nextUrl) {
|
|
113
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
return false;
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (false) {
|
|
119
|
+
/** @type {?} */
|
|
120
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.isPopState;
|
|
121
|
+
/** @type {?} */
|
|
122
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.firstCancelEventUrl;
|
|
123
|
+
/** @type {?} */
|
|
124
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.popStateEventUrl;
|
|
125
|
+
/** @type {?} */
|
|
126
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.clickedLinkMatchedBackButtonUrl;
|
|
127
|
+
/** @type {?} */
|
|
128
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.debugPropertyKeys;
|
|
129
|
+
/** @type {?} */
|
|
130
|
+
WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish.prototype.clickedLinkUrl;
|
|
131
|
+
}
|
|
132
|
+
//# 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,MAAM,OAAO,mEAAoE,SAAQ,mBAAmB;;;;;;IAQ1G,YAAY,OAA0B,EAC1B,WAAmB,EACV,cAAsB;QACzC,KAAK,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QADT,mBAAc,GAAd,cAAc,CAAQ;QARlC,eAAU,GAAG,KAAK,CAAC;QAG5B,oCAA+B,GAAG,KAAK,CAAC;QACxC,sBAAiB,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,iCAAiC,EAAE,kBAAkB,CAAC,CAAC;IAM5I,CAAC;;;;;;IAGD,eAAe,CAAC,KAAsB;QACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;;;;;;IAGD,iBAAiB,CAAC,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;;;;;;IAGD,WAAW,CAAC,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;;;;;;IAGD,aAAa,CAAC,KAAsB;QAClC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;;;;;;IAGD,UAAU,CAAC,KAAsB;QAC/B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC;QAClC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;;;;IAED,eAAe;QACb,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,kBAAkB,CAAC,SAAyB,EAAE,UAAuB,EAAE,OAAoB;;YAC/F,OAAO,KAAK,CAAC;QACf,CAAC;KAAA;CACF;;;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 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./event-clean-up-session","name":"EventCleanUpSession","line":29,"character":89},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../navigation-context","name":"NavigationContext","line":37,"character":23},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"onRouterStarted":[{"__symbolic":"method"}],"onRouterCancelled":[{"__symbolic":"method"}],"onRouterEnd":[{"__symbolic":"method"}],"onRouterError":[{"__symbolic":"method"}],"onPopState":[{"__symbolic":"method"}],"finaliseRouting":[{"__symbolic":"method"}],"canDeactivatePlace":[{"__symbolic":"method"}]}}}}]
|