@coolon/angular-ui-powerups 0.0.134 → 1.0.0-alpha.11
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/CHANGELOG.md +301 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +1178 -6280
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +16 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +27 -26
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +26 -29
- 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 -5
- package/esm2015/index.js.map +1 -1
- package/esm2015/lib/angular-ui-powerups.module.js +32 -32
- package/esm2015/lib/angular-ui-powerups.module.js.map +1 -1
- package/esm2015/lib/angular-ui-powerups.module.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/animations/index.js +1 -5
- package/esm2015/lib/animations/index.js.map +1 -1
- package/esm2015/lib/animations/slide-animations.js +0 -8
- package/esm2015/lib/animations/slide-animations.js.map +1 -1
- package/esm2015/lib/components/components.module.js +40 -37
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/disposable-component.js +8 -9
- package/esm2015/lib/components/disposable-component.js.map +1 -1
- package/esm2015/lib/components/disposable-component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.js +82 -114
- package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js +12 -18
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +12 -18
- package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +38 -57
- package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js +19 -41
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm2015/lib/components/index.js +13 -16
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/noop/noop.component.js +12 -15
- package/esm2015/lib/components/noop/noop.component.js.map +1 -1
- package/esm2015/lib/components/resize-aware.component.js +17 -64
- package/esm2015/lib/components/resize-aware.component.js.map +1 -1
- package/esm2015/lib/components/resize-aware.component.metadata.json +1 -1
- package/esm2015/lib/components/scroll-container/scroll-container.component.js +17 -0
- package/esm2015/lib/components/scroll-container/scroll-container.component.js.map +1 -0
- package/esm2015/lib/components/scroll-container/scroll-container.component.metadata.json +1 -0
- package/esm2015/lib/components/scroll-container/scroll-container.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/scroll-container/scroll-container.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/types/bounds.class.js +0 -29
- package/esm2015/lib/components/types/bounds.class.js.map +1 -1
- package/esm2015/lib/components/types/dimension.class.js +0 -14
- package/esm2015/lib/components/types/dimension.class.js.map +1 -1
- package/esm2015/lib/components/types/point.class.js +0 -23
- package/esm2015/lib/components/types/point.class.js.map +1 -1
- package/esm2015/lib/directives/command.directive.js +31 -85
- package/esm2015/lib/directives/command.directive.js.map +1 -1
- package/esm2015/lib/directives/directives.module.js +28 -28
- package/esm2015/lib/directives/directives.module.js.map +1 -1
- package/esm2015/lib/directives/directives.module.metadata.json +1 -1
- package/esm2015/lib/directives/directives.module.ngfactory.js.map +1 -1
- package/esm2015/lib/directives/focus-binding.directive.js +41 -96
- package/esm2015/lib/directives/focus-binding.directive.js.map +1 -1
- package/esm2015/lib/directives/index.js +3 -7
- package/esm2015/lib/directives/index.js.map +1 -1
- package/esm2015/lib/interaction/abstract-interaction-context.js +4 -73
- package/esm2015/lib/interaction/abstract-interaction-context.js.map +1 -1
- package/esm2015/lib/interaction/activity-ref.js +2 -79
- package/esm2015/lib/interaction/activity-ref.js.map +1 -1
- package/esm2015/lib/interaction/activity.js +0 -72
- package/esm2015/lib/interaction/activity.js.map +1 -1
- package/esm2015/lib/interaction/alert.js +0 -22
- package/esm2015/lib/interaction/alert.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +41 -187
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +24 -74
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +13 -24
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +15 -62
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +13 -27
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +16 -71
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/confirm.js +0 -16
- package/esm2015/lib/interaction/confirm.js.map +1 -1
- package/esm2015/lib/interaction/index.js +15 -24
- package/esm2015/lib/interaction/index.js.map +1 -1
- package/esm2015/lib/interaction/interaction-context.js +0 -50
- package/esm2015/lib/interaction/interaction-context.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.js +41 -41
- 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/result.js +2 -23
- package/esm2015/lib/interaction/result.js.map +1 -1
- package/esm2015/lib/interaction/route-synchronisation-adapter.js +0 -16
- package/esm2015/lib/interaction/route-synchronisation-adapter.js.map +1 -1
- package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js +0 -43
- package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -1
- package/esm2015/lib/interaction/services/interaction.service.js +22 -172
- 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 +17 -40
- 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 +7 -86
- 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 +0 -16
- package/esm2015/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +36 -105
- package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js +17 -34
- package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
- package/esm2015/lib/place/components/empty-state/empty-state.component.js +12 -18
- package/esm2015/lib/place/components/empty-state/empty-state.component.js.map +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +16 -33
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +52 -240
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/route-animations.js +0 -12
- package/esm2015/lib/place/components/place-outlet/route-animations.js.map +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +12 -17
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/guards/consolidated-param-map.js +9 -92
- package/esm2015/lib/place/guards/consolidated-param-map.js.map +1 -1
- package/esm2015/lib/place/guards/noop-auth-guard.service.js +12 -21
- package/esm2015/lib/place/guards/noop-auth-guard.service.js.map +1 -1
- package/esm2015/lib/place/guards/noop-auth-guard.service.metadata.json +1 -1
- package/esm2015/lib/place/guards/place.guard.js +10 -119
- package/esm2015/lib/place/guards/place.guard.js.map +1 -1
- package/esm2015/lib/place/index.js +38 -46
- package/esm2015/lib/place/index.js.map +1 -1
- package/esm2015/lib/place/nav-item.js +0 -22
- package/esm2015/lib/place/nav-item.js.map +1 -1
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +3 -49
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
- package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js +0 -23
- package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -1
- package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +0 -11
- package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -1
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +2 -51
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -1
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +2 -54
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -1
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +2 -60
- package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -1
- package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js +0 -24
- package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -1
- package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +1 -19
- package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -1
- package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +0 -55
- package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -1
- package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +4 -60
- package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -1
- package/esm2015/lib/place/navigation/session/navigating.js +0 -31
- package/esm2015/lib/place/navigation/session/navigating.js.map +1 -1
- package/esm2015/lib/place/navigation/session/navigation-context.js +0 -24
- package/esm2015/lib/place/navigation/session/navigation-context.js.map +1 -1
- package/esm2015/lib/place/navigation/session/navigation-session.js +12 -178
- package/esm2015/lib/place/navigation/session/navigation-session.js.map +1 -1
- package/esm2015/lib/place/navigation/session/pop-state-navigation.js +0 -16
- package/esm2015/lib/place/navigation/session/pop-state-navigation.js.map +1 -1
- package/esm2015/lib/place/place-component.js +22 -107
- 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-config.js +0 -13
- package/esm2015/lib/place/place-config.js.map +1 -1
- package/esm2015/lib/place/place-definition.js +26 -163
- package/esm2015/lib/place/place-definition.js.map +1 -1
- package/esm2015/lib/place/place-history.js +11 -38
- package/esm2015/lib/place/place-history.js.map +1 -1
- package/esm2015/lib/place/place-history.metadata.json +1 -1
- package/esm2015/lib/place/place-router.js +38 -247
- 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.decorator.js +3 -38
- package/esm2015/lib/place/place.decorator.js.map +1 -1
- package/esm2015/lib/place/place.module.js +40 -42
- 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/formatter.js +0 -30
- package/esm2015/lib/place/route/formatter.js.map +1 -1
- package/esm2015/lib/place/route/json-types.js +0 -12
- package/esm2015/lib/place/route/json-types.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +14 -133
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm2015/lib/place/route/parameter-definition.class.js +2 -147
- package/esm2015/lib/place/route/parameter-definition.class.js.map +1 -1
- package/esm2015/lib/place/route/parameter-sanitiser.js +0 -18
- package/esm2015/lib/place/route/parameter-sanitiser.js.map +1 -1
- package/esm2015/lib/place/route/parameter-snapshot.js +0 -19
- package/esm2015/lib/place/route/parameter-snapshot.js.map +1 -1
- package/esm2015/lib/place/route/visit-sanitiser.js +2 -47
- package/esm2015/lib/place/route/visit-sanitiser.js.map +1 -1
- package/esm2015/lib/place/url-service.js +13 -68
- package/esm2015/lib/place/url-service.js.map +1 -1
- package/esm2015/lib/place/url-service.metadata.json +1 -1
- package/esm2015/lib/place/url-snapshot.js +3 -86
- package/esm2015/lib/place/url-snapshot.js.map +1 -1
- package/esm2015/lib/place/visit.js +5 -73
- package/esm2015/lib/place/visit.js.map +1 -1
- package/esm2015/public_api.js +6 -10
- package/esm2015/public_api.js.map +1 -1
- package/esm5/coolon-angular-ui-powerups.js +26 -29
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/index.js +1 -5
- package/esm5/index.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.js +29 -30
- package/esm5/lib/angular-ui-powerups.module.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm5/lib/animations/index.js +1 -5
- package/esm5/lib/animations/index.js.map +1 -1
- package/esm5/lib/animations/slide-animations.js +0 -8
- package/esm5/lib/animations/slide-animations.js.map +1 -1
- package/esm5/lib/components/components.module.js +37 -35
- package/esm5/lib/components/components.module.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/disposable-component.js +7 -13
- package/esm5/lib/components/disposable-component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-input.component.js +95 -157
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +11 -22
- package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +11 -22
- package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm5/lib/components/forms/select-input/select-input.component.js +38 -61
- package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js +19 -45
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm5/lib/components/index.js +13 -16
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/noop/noop.component.js +9 -13
- package/esm5/lib/components/noop/noop.component.js.map +1 -1
- package/esm5/lib/components/resize-aware.component.js +21 -80
- package/esm5/lib/components/resize-aware.component.js.map +1 -1
- package/esm5/lib/components/scroll-container/scroll-container.component.js +19 -0
- package/esm5/lib/components/scroll-container/scroll-container.component.js.map +1 -0
- package/esm5/lib/components/scroll-container/scroll-container.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/scroll-container/scroll-container.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/types/bounds.class.js +3 -30
- package/esm5/lib/components/types/bounds.class.js.map +1 -1
- package/esm5/lib/components/types/dimension.class.js +0 -10
- package/esm5/lib/components/types/dimension.class.js.map +1 -1
- package/esm5/lib/components/types/point.class.js +2 -30
- package/esm5/lib/components/types/point.class.js.map +1 -1
- package/esm5/lib/directives/command.directive.js +37 -103
- package/esm5/lib/directives/command.directive.js.map +1 -1
- package/esm5/lib/directives/directives.module.js +25 -26
- package/esm5/lib/directives/directives.module.js.map +1 -1
- package/esm5/lib/directives/directives.module.ngfactory.js.map +1 -1
- package/esm5/lib/directives/focus-binding.directive.js +50 -147
- package/esm5/lib/directives/focus-binding.directive.js.map +1 -1
- package/esm5/lib/directives/index.js +3 -7
- package/esm5/lib/directives/index.js.map +1 -1
- package/esm5/lib/interaction/abstract-interaction-context.js +7 -114
- package/esm5/lib/interaction/abstract-interaction-context.js.map +1 -1
- package/esm5/lib/interaction/activity-ref.js +12 -109
- package/esm5/lib/interaction/activity-ref.js.map +1 -1
- package/esm5/lib/interaction/activity.js +12 -121
- package/esm5/lib/interaction/activity.js.map +1 -1
- package/esm5/lib/interaction/alert.js +0 -22
- package/esm5/lib/interaction/alert.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +64 -330
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +26 -79
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +12 -25
- 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 +17 -72
- 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 +13 -32
- 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 +24 -117
- package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
- package/esm5/lib/interaction/confirm.js +0 -16
- package/esm5/lib/interaction/confirm.js.map +1 -1
- package/esm5/lib/interaction/index.js +15 -24
- package/esm5/lib/interaction/index.js.map +1 -1
- package/esm5/lib/interaction/interaction-context.js +0 -50
- package/esm5/lib/interaction/interaction-context.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.js +38 -39
- 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/result.js +2 -23
- package/esm5/lib/interaction/result.js.map +1 -1
- package/esm5/lib/interaction/route-synchronisation-adapter.js +0 -16
- package/esm5/lib/interaction/route-synchronisation-adapter.js.map +1 -1
- package/esm5/lib/interaction/services/interaction-service-routing-adapter.js +6 -73
- package/esm5/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -1
- package/esm5/lib/interaction/services/interaction.service.js +33 -290
- package/esm5/lib/interaction/services/interaction.service.js.map +1 -1
- package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +16 -41
- 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 +14 -109
- 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 +1 -23
- package/esm5/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
- package/esm5/lib/place/components/abstract-place-navigation.component.js +37 -115
- package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js +16 -37
- package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
- package/esm5/lib/place/components/empty-state/empty-state.component.js +10 -20
- package/esm5/lib/place/components/empty-state/empty-state.component.js.map +1 -1
- package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +17 -42
- 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 +64 -314
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm5/lib/place/components/place-outlet/route-animations.js +0 -12
- package/esm5/lib/place/components/place-outlet/route-animations.js.map +1 -1
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +10 -14
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/guards/consolidated-param-map.js +17 -117
- package/esm5/lib/place/guards/consolidated-param-map.js.map +1 -1
- package/esm5/lib/place/guards/noop-auth-guard.service.js +11 -26
- package/esm5/lib/place/guards/noop-auth-guard.service.js.map +1 -1
- package/esm5/lib/place/guards/place.guard.js +24 -172
- package/esm5/lib/place/guards/place.guard.js.map +1 -1
- package/esm5/lib/place/index.js +38 -46
- package/esm5/lib/place/index.js.map +1 -1
- package/esm5/lib/place/nav-item.js +0 -22
- package/esm5/lib/place/nav-item.js.map +1 -1
- package/esm5/lib/place/navigation/place-component-deactivation-handler.js +11 -86
- package/esm5/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
- package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js +4 -34
- package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -1
- package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +4 -25
- package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -1
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +11 -110
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -1
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +12 -147
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -1
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +11 -126
- package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -1
- package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js +7 -71
- package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -1
- package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +6 -49
- package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -1
- package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +11 -120
- package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -1
- package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +13 -106
- package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -1
- package/esm5/lib/place/navigation/session/navigating.js +6 -53
- package/esm5/lib/place/navigation/session/navigating.js.map +1 -1
- package/esm5/lib/place/navigation/session/navigation-context.js +0 -17
- package/esm5/lib/place/navigation/session/navigation-context.js.map +1 -1
- package/esm5/lib/place/navigation/session/navigation-session.js +39 -306
- package/esm5/lib/place/navigation/session/navigation-session.js.map +1 -1
- package/esm5/lib/place/navigation/session/pop-state-navigation.js +5 -33
- package/esm5/lib/place/navigation/session/pop-state-navigation.js.map +1 -1
- package/esm5/lib/place/place-component.js +30 -142
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/place-config.js +0 -13
- package/esm5/lib/place/place-config.js.map +1 -1
- package/esm5/lib/place/place-definition.js +37 -219
- package/esm5/lib/place/place-definition.js.map +1 -1
- package/esm5/lib/place/place-history.js +11 -56
- package/esm5/lib/place/place-history.js.map +1 -1
- package/esm5/lib/place/place-router.js +59 -372
- package/esm5/lib/place/place-router.js.map +1 -1
- package/esm5/lib/place/place.decorator.js +3 -38
- package/esm5/lib/place/place.decorator.js.map +1 -1
- package/esm5/lib/place/place.module.js +37 -40
- 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/formatter.js +6 -60
- package/esm5/lib/place/route/formatter.js.map +1 -1
- package/esm5/lib/place/route/json-types.js +0 -12
- package/esm5/lib/place/route/json-types.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +14 -133
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm5/lib/place/route/parameter-definition.class.js +21 -222
- package/esm5/lib/place/route/parameter-definition.class.js.map +1 -1
- package/esm5/lib/place/route/parameter-sanitiser.js +0 -18
- package/esm5/lib/place/route/parameter-sanitiser.js.map +1 -1
- package/esm5/lib/place/route/parameter-snapshot.js +0 -19
- package/esm5/lib/place/route/parameter-snapshot.js.map +1 -1
- package/esm5/lib/place/route/visit-sanitiser.js +4 -42
- package/esm5/lib/place/route/visit-sanitiser.js.map +1 -1
- package/esm5/lib/place/url-service.js +20 -119
- package/esm5/lib/place/url-service.js.map +1 -1
- package/esm5/lib/place/url-snapshot.js +15 -143
- package/esm5/lib/place/url-snapshot.js.map +1 -1
- package/esm5/lib/place/visit.js +14 -132
- package/esm5/lib/place/visit.js.map +1 -1
- package/esm5/public_api.js +6 -10
- package/esm5/public_api.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +866 -4507
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +1136 -6252
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +9 -9
- package/lib/components/index.d.ts +1 -0
- package/lib/components/resize-aware.component.d.ts +3 -3
- package/lib/components/scroll-container/scroll-container.component.d.ts +5 -0
- package/lib/directives/command.directive.d.ts +4 -2
- package/lib/directives/focus-binding.directive.d.ts +1 -1
- package/lib/interaction/activity-ref.d.ts +2 -2
- package/lib/interaction/activity.d.ts +2 -2
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -2
- package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +3 -2
- package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +1 -1
- package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +1 -1
- package/lib/interaction/services/interaction.service.d.ts +1 -1
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.d.ts +1 -1
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +1 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +4 -4
- package/lib/place/guards/consolidated-param-map.d.ts +1 -1
- package/lib/place/navigation/place-component-deactivation-handler.d.ts +2 -2
- package/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.d.ts +1 -1
- package/lib/place/navigation/session/navigation-session.d.ts +4 -4
- package/lib/place/place-component.d.ts +2 -2
- package/lib/place/place-router.d.ts +3 -3
- package/lib/place/route/formatter.d.ts +4 -3
- package/lib/place/route/parameter-definition.class.d.ts +2 -2
- package/package.json +10 -10
- package/schematics/place-routes/place-builder.js +4 -2
- package/schematics/place-routes/place-builder.js.map +1 -1
- package/schematics/place-routes/place-class-scanner.d.ts +3 -3
- package/schematics/place-routes/place-class-scanner.js +1 -1
- package/schematics/place-routes/place-class-scanner.js.map +1 -1
- package/schematics/place-routes/place-def.d.ts +9 -9
- /package/{styles → assets}/styles.scss +0 -0
|
@@ -1,20 +1,11 @@
|
|
|
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";
|
|
1
|
+
import { __awaiter, __extends, __generator } from "tslib";
|
|
6
2
|
import { GarbageCollector, lang, Logger } from '@coolon/pectin';
|
|
7
3
|
import { PlaceComponentDeactivationHandler } from '../place-component-deactivation-handler';
|
|
8
4
|
/**
|
|
9
5
|
* Transient states
|
|
10
|
-
* @abstract
|
|
11
|
-
*/
|
|
12
|
-
var /**
|
|
13
|
-
* Transient states
|
|
14
|
-
* @abstract
|
|
15
6
|
*/
|
|
16
|
-
NavigationSession = /** @class */ (function (_super) {
|
|
17
|
-
|
|
7
|
+
var NavigationSession = /** @class */ (function (_super) {
|
|
8
|
+
__extends(NavigationSession, _super);
|
|
18
9
|
function NavigationSession(context, startingUrl) {
|
|
19
10
|
var _this = _super.call(this) || this;
|
|
20
11
|
_this.context = context;
|
|
@@ -24,10 +15,7 @@ NavigationSession = /** @class */ (function (_super) {
|
|
|
24
15
|
_this.componentDeactivationHandlers = new Map();
|
|
25
16
|
// TODO: can I get away without creating one every time?
|
|
26
17
|
_this._interactionContext = _this.context.routerInteractionAdapter.createExclusiveInteractionContext();
|
|
27
|
-
_this.onDispose((
|
|
28
|
-
* @return {?}
|
|
29
|
-
*/
|
|
30
|
-
function () {
|
|
18
|
+
_this.onDispose(function () {
|
|
31
19
|
// the interaction context can be detached during the back button cancellation state transition
|
|
32
20
|
// as the transition is synchronous and activityCancellation isn't. Otherwise dispose will be
|
|
33
21
|
// called before the context has been cancelled. It might be work having the interaction context
|
|
@@ -35,109 +23,55 @@ NavigationSession = /** @class */ (function (_super) {
|
|
|
35
23
|
if (_this._interactionContext) {
|
|
36
24
|
_this._interactionContext.dispose(); // or do something like cancelAndDispose?
|
|
37
25
|
}
|
|
38
|
-
})
|
|
26
|
+
});
|
|
39
27
|
return _this;
|
|
40
28
|
}
|
|
41
29
|
Object.defineProperty(NavigationSession.prototype, "name", {
|
|
42
|
-
get:
|
|
43
|
-
* @return {?}
|
|
44
|
-
*/
|
|
45
|
-
function () {
|
|
30
|
+
get: function () {
|
|
46
31
|
return this.constructor.name;
|
|
47
32
|
},
|
|
48
33
|
enumerable: true,
|
|
49
34
|
configurable: true
|
|
50
35
|
});
|
|
51
36
|
Object.defineProperty(NavigationSession.prototype, "urlService", {
|
|
52
|
-
get:
|
|
53
|
-
* @return {?}
|
|
54
|
-
*/
|
|
55
|
-
function () {
|
|
37
|
+
get: function () {
|
|
56
38
|
return this.context.urlService;
|
|
57
39
|
},
|
|
58
40
|
enumerable: true,
|
|
59
41
|
configurable: true
|
|
60
42
|
});
|
|
61
43
|
Object.defineProperty(NavigationSession.prototype, "interactionServiceAdapter", {
|
|
62
|
-
get:
|
|
63
|
-
* @return {?}
|
|
64
|
-
*/
|
|
65
|
-
function () {
|
|
44
|
+
get: function () {
|
|
66
45
|
return this.context.routerInteractionAdapter;
|
|
67
46
|
},
|
|
68
47
|
enumerable: true,
|
|
69
48
|
configurable: true
|
|
70
49
|
});
|
|
71
|
-
|
|
72
|
-
* @param {?} visit
|
|
73
|
-
* @return {?}
|
|
74
|
-
*/
|
|
75
|
-
NavigationSession.prototype.storeVisit = /**
|
|
76
|
-
* @param {?} visit
|
|
77
|
-
* @return {?}
|
|
78
|
-
*/
|
|
79
|
-
function (visit) {
|
|
50
|
+
NavigationSession.prototype.storeVisit = function (visit) {
|
|
80
51
|
// console.log(`Storing visit for ${visit.placeDefinition.component.name}`, {visit});
|
|
81
52
|
this._visits.set(visit.placeDefinition, visit);
|
|
82
53
|
};
|
|
83
|
-
|
|
84
|
-
* @param {?} placeDef
|
|
85
|
-
* @return {?}
|
|
86
|
-
*/
|
|
87
|
-
NavigationSession.prototype.getVisitFor = /**
|
|
88
|
-
* @param {?} placeDef
|
|
89
|
-
* @return {?}
|
|
90
|
-
*/
|
|
91
|
-
function (placeDef) {
|
|
92
|
-
/** @type {?} */
|
|
54
|
+
NavigationSession.prototype.getVisitFor = function (placeDef) {
|
|
93
55
|
var visit = this._visits.get(placeDef);
|
|
94
56
|
// console.log(`Getting visit for ${placeDef.component.name}`, {visit});
|
|
95
57
|
return visit;
|
|
96
58
|
};
|
|
97
59
|
Object.defineProperty(NavigationSession.prototype, "canDeactivateInteractionContext", {
|
|
98
|
-
get:
|
|
99
|
-
* @return {?}
|
|
100
|
-
*/
|
|
101
|
-
function () {
|
|
60
|
+
get: function () {
|
|
102
61
|
return this._interactionContext;
|
|
103
62
|
},
|
|
104
63
|
enumerable: true,
|
|
105
64
|
configurable: true
|
|
106
65
|
});
|
|
107
|
-
|
|
108
|
-
* @return {?}
|
|
109
|
-
*/
|
|
110
|
-
NavigationSession.prototype.notifyActive = /**
|
|
111
|
-
* @return {?}
|
|
112
|
-
*/
|
|
113
|
-
function () {
|
|
66
|
+
NavigationSession.prototype.notifyActive = function () {
|
|
114
67
|
// noop.
|
|
115
68
|
};
|
|
116
|
-
|
|
117
|
-
* @param {?} event
|
|
118
|
-
* @return {?}
|
|
119
|
-
*/
|
|
120
|
-
NavigationSession.prototype.onRouterStarted = /**
|
|
121
|
-
* @param {?} event
|
|
122
|
-
* @return {?}
|
|
123
|
-
*/
|
|
124
|
-
function (event) {
|
|
69
|
+
NavigationSession.prototype.onRouterStarted = function (event) {
|
|
125
70
|
// navigation sessions can have many cancel start cycles due to place guard redirects
|
|
126
71
|
this.ignore(event);
|
|
127
72
|
};
|
|
128
73
|
// @Trace()
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* @param {?} url
|
|
132
|
-
* @return {?}
|
|
133
|
-
*/
|
|
134
|
-
NavigationSession.prototype.onUrlChange =
|
|
135
|
-
// @Trace()
|
|
136
|
-
/**
|
|
137
|
-
* @param {?} url
|
|
138
|
-
* @return {?}
|
|
139
|
-
*/
|
|
140
|
-
function (url) {
|
|
74
|
+
NavigationSession.prototype.onUrlChange = function (url) {
|
|
141
75
|
// Normally we just ignore these but they are the only way of detecting if the back button
|
|
142
76
|
// was clicked during a canDeactivate promise.
|
|
143
77
|
// 1. a route is in progress and awaiting a canDeactivateGuard
|
|
@@ -148,117 +82,34 @@ NavigationSession = /** @class */ (function (_super) {
|
|
|
148
82
|
this.cancelCanDeactivateInteraction(url);
|
|
149
83
|
}
|
|
150
84
|
};
|
|
151
|
-
|
|
152
|
-
* @param {?} event
|
|
153
|
-
* @return {?}
|
|
154
|
-
*/
|
|
155
|
-
NavigationSession.prototype.onPopState = /**
|
|
156
|
-
* @param {?} event
|
|
157
|
-
* @return {?}
|
|
158
|
-
*/
|
|
159
|
-
function (event) {
|
|
85
|
+
NavigationSession.prototype.onPopState = function (event) {
|
|
160
86
|
return this.illegalTransition(event);
|
|
161
87
|
};
|
|
162
|
-
|
|
163
|
-
* @param {?} event
|
|
164
|
-
* @return {?}
|
|
165
|
-
*/
|
|
166
|
-
NavigationSession.prototype.onRouterCancelled = /**
|
|
167
|
-
* @param {?} event
|
|
168
|
-
* @return {?}
|
|
169
|
-
*/
|
|
170
|
-
function (event) {
|
|
88
|
+
NavigationSession.prototype.onRouterCancelled = function (event) {
|
|
171
89
|
return this.illegalTransition(event);
|
|
172
90
|
};
|
|
173
|
-
|
|
174
|
-
* @param {?} event
|
|
175
|
-
* @return {?}
|
|
176
|
-
*/
|
|
177
|
-
NavigationSession.prototype.onRouterError = /**
|
|
178
|
-
* @param {?} event
|
|
179
|
-
* @return {?}
|
|
180
|
-
*/
|
|
181
|
-
function (event) {
|
|
91
|
+
NavigationSession.prototype.onRouterError = function (event) {
|
|
182
92
|
return this.illegalTransition(event);
|
|
183
93
|
};
|
|
184
|
-
|
|
185
|
-
* @param {?} event
|
|
186
|
-
* @return {?}
|
|
187
|
-
*/
|
|
188
|
-
NavigationSession.prototype.onRouterEnd = /**
|
|
189
|
-
* @param {?} event
|
|
190
|
-
* @return {?}
|
|
191
|
-
*/
|
|
192
|
-
function (event) {
|
|
94
|
+
NavigationSession.prototype.onRouterEnd = function (event) {
|
|
193
95
|
return this.illegalTransition(event);
|
|
194
96
|
};
|
|
195
|
-
|
|
196
|
-
* @return {?}
|
|
197
|
-
*/
|
|
198
|
-
NavigationSession.prototype.getVisits = /**
|
|
199
|
-
* @return {?}
|
|
200
|
-
*/
|
|
201
|
-
function () {
|
|
97
|
+
NavigationSession.prototype.getVisits = function () {
|
|
202
98
|
return Array.from(this._visits.values());
|
|
203
99
|
};
|
|
204
|
-
|
|
205
|
-
* @protected
|
|
206
|
-
* @template R
|
|
207
|
-
* @param {?} message
|
|
208
|
-
* @return {?}
|
|
209
|
-
*/
|
|
210
|
-
NavigationSession.prototype.illegalTransition = /**
|
|
211
|
-
* @protected
|
|
212
|
-
* @template R
|
|
213
|
-
* @param {?} message
|
|
214
|
-
* @return {?}
|
|
215
|
-
*/
|
|
216
|
-
function (message) {
|
|
100
|
+
NavigationSession.prototype.illegalTransition = function (message) {
|
|
217
101
|
return lang.illegalState(message.toString() + " not supported by " + this.toString());
|
|
218
102
|
};
|
|
219
|
-
|
|
220
|
-
* @protected
|
|
221
|
-
* @return {?}
|
|
222
|
-
*/
|
|
223
|
-
NavigationSession.prototype.currentRouterUrl = /**
|
|
224
|
-
* @protected
|
|
225
|
-
* @return {?}
|
|
226
|
-
*/
|
|
227
|
-
function () {
|
|
103
|
+
NavigationSession.prototype.currentRouterUrl = function () {
|
|
228
104
|
return this.urlService.getCurrentRouterUrl();
|
|
229
105
|
};
|
|
230
|
-
|
|
231
|
-
* @param {?} url
|
|
232
|
-
* @param {?=} options
|
|
233
|
-
* @return {?}
|
|
234
|
-
*/
|
|
235
|
-
NavigationSession.prototype.resetBrowserLocation = /**
|
|
236
|
-
* @param {?} url
|
|
237
|
-
* @param {?=} options
|
|
238
|
-
* @return {?}
|
|
239
|
-
*/
|
|
240
|
-
function (url, options) {
|
|
106
|
+
NavigationSession.prototype.resetBrowserLocation = function (url, options) {
|
|
241
107
|
if (options === void 0) { options = { replaceCurrent: false }; }
|
|
242
108
|
// console.log(`---> resetting browser location to: ${url}`);
|
|
243
109
|
this.urlService.resetBrowserLocation(url, options);
|
|
244
110
|
};
|
|
245
111
|
// @Trace()
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* @protected
|
|
249
|
-
* @param {?} poppedHistoryToReplace
|
|
250
|
-
* @param {?} activeUrl
|
|
251
|
-
* @return {?}
|
|
252
|
-
*/
|
|
253
|
-
NavigationSession.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation =
|
|
254
|
-
// @Trace()
|
|
255
|
-
/**
|
|
256
|
-
* @protected
|
|
257
|
-
* @param {?} poppedHistoryToReplace
|
|
258
|
-
* @param {?} activeUrl
|
|
259
|
-
* @return {?}
|
|
260
|
-
*/
|
|
261
|
-
function (poppedHistoryToReplace, activeUrl) {
|
|
112
|
+
NavigationSession.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation = function (poppedHistoryToReplace, activeUrl) {
|
|
262
113
|
// Important: I tried to perform this fix at a later point int he routing cycle but it created all kinds of
|
|
263
114
|
// strangeness.
|
|
264
115
|
Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');
|
|
@@ -267,126 +118,52 @@ NavigationSession = /** @class */ (function (_super) {
|
|
|
267
118
|
console.log("pushing " + activeUrl + " back onto the history.");
|
|
268
119
|
this.urlService.resetBrowserLocation(activeUrl, { replaceCurrent: false });
|
|
269
120
|
};
|
|
270
|
-
|
|
271
|
-
* @param {?} event
|
|
272
|
-
* @param {?=} reason
|
|
273
|
-
* @return {?}
|
|
274
|
-
*/
|
|
275
|
-
NavigationSession.prototype.ignore = /**
|
|
276
|
-
* @param {?} event
|
|
277
|
-
* @param {?=} reason
|
|
278
|
-
* @return {?}
|
|
279
|
-
*/
|
|
280
|
-
function (event, reason) {
|
|
121
|
+
NavigationSession.prototype.ignore = function (event, reason) {
|
|
281
122
|
reason = reason ? " -> " + reason : '';
|
|
282
123
|
Logger.get(this).info("Ignoring router event" + reason + ": " + event.constructor.name + " -> " + event.url + " :: " + this.toString());
|
|
283
124
|
};
|
|
284
|
-
|
|
285
|
-
* @return {?}
|
|
286
|
-
*/
|
|
287
|
-
NavigationSession.prototype.toString = /**
|
|
288
|
-
* @return {?}
|
|
289
|
-
*/
|
|
290
|
-
function () {
|
|
125
|
+
NavigationSession.prototype.toString = function () {
|
|
291
126
|
return this.constructor.name + "(" + this.debugState() + ")";
|
|
292
127
|
};
|
|
293
|
-
|
|
294
|
-
* @protected
|
|
295
|
-
* @param {?=} properties
|
|
296
|
-
* @return {?}
|
|
297
|
-
*/
|
|
298
|
-
NavigationSession.prototype.debugState = /**
|
|
299
|
-
* @protected
|
|
300
|
-
* @param {?=} properties
|
|
301
|
-
* @return {?}
|
|
302
|
-
*/
|
|
303
|
-
function (properties) {
|
|
128
|
+
NavigationSession.prototype.debugState = function (properties) {
|
|
304
129
|
var _this = this;
|
|
305
|
-
return (properties || this.debugPropertyKeys).map((
|
|
306
|
-
* @param {?} p
|
|
307
|
-
* @return {?}
|
|
308
|
-
*/
|
|
309
|
-
function (p) {
|
|
130
|
+
return (properties || this.debugPropertyKeys).map(function (p) {
|
|
310
131
|
return p + ": " + _this[p];
|
|
311
|
-
})
|
|
132
|
+
}).join(', ');
|
|
312
133
|
};
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
* @param {?} currentUrl
|
|
316
|
-
* @param {?} nextUrl
|
|
317
|
-
* @return {?}
|
|
318
|
-
*/
|
|
319
|
-
NavigationSession.prototype.canDeactivatePlace = /**
|
|
320
|
-
* @param {?} component
|
|
321
|
-
* @param {?} currentUrl
|
|
322
|
-
* @param {?} nextUrl
|
|
323
|
-
* @return {?}
|
|
324
|
-
*/
|
|
325
|
-
function (component, currentUrl, nextUrl) {
|
|
326
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
134
|
+
NavigationSession.prototype.canDeactivatePlace = function (component, currentUrl, nextUrl) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
327
136
|
var handler, isPrimaryHandler;
|
|
328
|
-
return
|
|
329
|
-
// console.log(`---> canDeactivatePlace(${component.placeDefinition.path}, ${currentUrl.url} -> ${nextUrl.url})`);
|
|
330
|
-
// lookup the handler and create it if we've not seen it yet
|
|
137
|
+
return __generator(this, function (_a) {
|
|
331
138
|
handler = this.componentDeactivationHandlers.get(component);
|
|
332
139
|
if (!handler) {
|
|
333
140
|
isPrimaryHandler = this.componentDeactivationHandlers.size === 0;
|
|
334
141
|
handler = new PlaceComponentDeactivationHandler(component, this, isPrimaryHandler);
|
|
335
142
|
this.componentDeactivationHandlers.set(component, handler);
|
|
336
143
|
}
|
|
337
|
-
return [2 /*return*/, handler.canDeactivate(currentUrl, nextUrl).then((
|
|
338
|
-
* @param {?} result
|
|
339
|
-
* @return {?}
|
|
340
|
-
*/
|
|
341
|
-
function (result) {
|
|
144
|
+
return [2 /*return*/, handler.canDeactivate(currentUrl, nextUrl).then(function (result) {
|
|
342
145
|
// console.log(`<--- canDeactivatePlace(${component.placeDefinition.path}): ${result}`);
|
|
343
146
|
return result;
|
|
344
|
-
})
|
|
345
|
-
* @param {?} error
|
|
346
|
-
* @return {?}
|
|
347
|
-
*/
|
|
348
|
-
function (error) {
|
|
147
|
+
}).catch(function (error) {
|
|
349
148
|
throw error;
|
|
350
|
-
})
|
|
149
|
+
})];
|
|
351
150
|
});
|
|
352
151
|
});
|
|
353
152
|
};
|
|
354
|
-
|
|
355
|
-
* @param {?} newUrl
|
|
356
|
-
* @return {?}
|
|
357
|
-
*/
|
|
358
|
-
NavigationSession.prototype.cancelCanDeactivateInteraction = /**
|
|
359
|
-
* @param {?} newUrl
|
|
360
|
-
* @return {?}
|
|
361
|
-
*/
|
|
362
|
-
function (newUrl) {
|
|
153
|
+
NavigationSession.prototype.cancelCanDeactivateInteraction = function (newUrl) {
|
|
363
154
|
Logger.get(this).info("back button pressed during navigation session interaction promise");
|
|
364
155
|
// detach the interaction from the session so it doesn't get disposed until the activity has finished
|
|
365
156
|
// all it's things.
|
|
366
|
-
/** @type {?} */
|
|
367
157
|
var canDeactivateInteractionContext = this.detachCanDeactivateInteractionContext();
|
|
368
158
|
// TODO: I need to make the exclusive interaction context disallow nested activities or
|
|
369
159
|
// that would mess things up entirely. Or, can I do a context.abortAll().then(..)
|
|
370
160
|
Logger.get(this).info('cancelling current navigation activity..');
|
|
371
|
-
canDeactivateInteractionContext.cancelActiveActivity().then((
|
|
372
|
-
* @return {?}
|
|
373
|
-
*/
|
|
374
|
-
function () {
|
|
161
|
+
canDeactivateInteractionContext.cancelActiveActivity().then(function () {
|
|
375
162
|
canDeactivateInteractionContext.dispose();
|
|
376
|
-
})
|
|
163
|
+
});
|
|
377
164
|
this.handleCanDeactivateCancelledEventScenario(newUrl);
|
|
378
165
|
};
|
|
379
|
-
|
|
380
|
-
* @protected
|
|
381
|
-
* @param {?} url
|
|
382
|
-
* @return {?}
|
|
383
|
-
*/
|
|
384
|
-
NavigationSession.prototype.reinstateUrlAfterAngularChangedItOnCancellation = /**
|
|
385
|
-
* @protected
|
|
386
|
-
* @param {?} url
|
|
387
|
-
* @return {?}
|
|
388
|
-
*/
|
|
389
|
-
function (url) {
|
|
166
|
+
NavigationSession.prototype.reinstateUrlAfterAngularChangedItOnCancellation = function (url) {
|
|
390
167
|
// Angular calls _this.resetUrlToCurrentUrlTree() on cancelling and fucks our history.
|
|
391
168
|
// So this means that the top of the stack is the url we want to go back to, and not the one that was on
|
|
392
169
|
// it before the cancel event fired.
|
|
@@ -395,56 +172,12 @@ NavigationSession = /** @class */ (function (_super) {
|
|
|
395
172
|
// - push our actual url back onto the top of the stack.
|
|
396
173
|
this.resetBrowserLocation(url, { replaceCurrent: true });
|
|
397
174
|
};
|
|
398
|
-
|
|
399
|
-
* @protected
|
|
400
|
-
* @return {?}
|
|
401
|
-
*/
|
|
402
|
-
NavigationSession.prototype.detachCanDeactivateInteractionContext = /**
|
|
403
|
-
* @protected
|
|
404
|
-
* @return {?}
|
|
405
|
-
*/
|
|
406
|
-
function () {
|
|
407
|
-
/** @type {?} */
|
|
175
|
+
NavigationSession.prototype.detachCanDeactivateInteractionContext = function () {
|
|
408
176
|
var context = this._interactionContext;
|
|
409
177
|
this._interactionContext = null;
|
|
410
178
|
return context;
|
|
411
179
|
};
|
|
412
180
|
return NavigationSession;
|
|
413
181
|
}(GarbageCollector));
|
|
414
|
-
/**
|
|
415
|
-
* Transient states
|
|
416
|
-
* @abstract
|
|
417
|
-
*/
|
|
418
182
|
export { NavigationSession };
|
|
419
|
-
if (false) {
|
|
420
|
-
/** @type {?} */
|
|
421
|
-
NavigationSession.prototype.debugPropertyKeys;
|
|
422
|
-
/**
|
|
423
|
-
* @type {?}
|
|
424
|
-
* @private
|
|
425
|
-
*/
|
|
426
|
-
NavigationSession.prototype._visits;
|
|
427
|
-
/**
|
|
428
|
-
* @type {?}
|
|
429
|
-
* @private
|
|
430
|
-
*/
|
|
431
|
-
NavigationSession.prototype.componentDeactivationHandlers;
|
|
432
|
-
/** @type {?} */
|
|
433
|
-
NavigationSession.prototype.isPopState;
|
|
434
|
-
/**
|
|
435
|
-
* @type {?}
|
|
436
|
-
* @private
|
|
437
|
-
*/
|
|
438
|
-
NavigationSession.prototype._interactionContext;
|
|
439
|
-
/** @type {?} */
|
|
440
|
-
NavigationSession.prototype.context;
|
|
441
|
-
/** @type {?} */
|
|
442
|
-
NavigationSession.prototype.startingUrl;
|
|
443
|
-
/**
|
|
444
|
-
* @abstract
|
|
445
|
-
* @param {?} newUrl
|
|
446
|
-
* @return {?}
|
|
447
|
-
*/
|
|
448
|
-
NavigationSession.prototype.handleCanDeactivateCancelledEventScenario = function (newUrl) { };
|
|
449
|
-
}
|
|
450
183
|
//# sourceMappingURL=navigation-session.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-session.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/navigation-session.ts"],"names":[],"mappings":";;;;;AACA,OAAO,EAAO,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAS,MAAM,gBAAgB,CAAC;AAQ5E,OAAO,EAAE,iCAAiC,EAAE,MAAM,yCAAyC,CAAC;;;;;AAM5F;;;;;IAAgD,6CAAgB;IAU9D,2BAAqB,OAA0B,EAAW,WAAmB;QAA7E,YACE,iBAAO,SAYR;QAboB,aAAO,GAAP,OAAO,CAAmB;QAAW,iBAAW,GAAX,WAAW,CAAQ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AA+B,CAAC,oBAAoB,EAAE,CAAC,IAAI;;;QAAC;YAC1D,+BAA+B,CAAC,OAAO,EAAE,CAAC;QAC5C,CAAC,EAAC,CAAC;QAEH,IAAI,CAAC,yCAAyC,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;;;;;;IAIS,2EAA+C;;;;;IAAzD,UAA0D,GAAW;QACnE,sFAAsF;QACtF,wGAAwG;QACxG,oCAAoC;QACpC,iBAAiB;QACjB,sEAAsE;QACtE,wDAAwD;QACxD,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;;;;;IAES,iEAAqC;;;;IAA/C;;YACQ,OAAO,GAAG,IAAI,CAAC,mBAAmB;QACxC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;IACH,wBAAC;AAAD,CAAC,AAxLD,CAAgD,gBAAgB,GAwL/D;;;;;;;;IAtLC,8CAAiC;;;;;IACjC,oCAAoD;;;;;IAEpD,0DAAqG;;IACrG,uCAAsC;;;;;IAEtC,gDAAgD;;IAEpC,oCAAmC;;IAAE,wCAA4B;;;;;;IA6J7E,8FAAwE","sourcesContent":["import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart, RouterEvent } from '@angular/router';\nimport { Dsl, GarbageCollector, lang, Logger, Trace } from '@coolon/pectin';\nimport { InteractionContext } from '../../../interaction/interaction-context';\nimport { InteractionServiceRoutingAdapter } from '../../../interaction/services/interaction-service-routing-adapter';\nimport { PlaceComponent } from '../../place-component';\nimport { PlaceDefinition } from '../../place-definition';\nimport { UrlService } from '../../url-service';\nimport { UrlSnapshot } from '../../url-snapshot';\nimport { Visit } from '../../visit';\nimport { PlaceComponentDeactivationHandler } from '../place-component-deactivation-handler';\nimport { NavigationContext } from './navigation-context';\n\n/**\n * Transient states\n */\nexport abstract class NavigationSession extends GarbageCollector {\n\n debugPropertyKeys: string[] = [];\n private _visits = new Map<PlaceDefinition, Visit>();\n\n private componentDeactivationHandlers = new Map<PlaceComponent, PlaceComponentDeactivationHandler>();\n abstract readonly isPopState: boolean;\n\n private _interactionContext: InteractionContext;\n\n constructor(readonly context: NavigationContext, readonly startingUrl: string) {\n super();\n // TODO: can I get away without creating one every time?\n this._interactionContext = this.context.routerInteractionAdapter.createExclusiveInteractionContext();\n this.onDispose(() => {\n // the interaction context can be detached during the back button cancellation state transition\n // as the transition is synchronous and activityCancellation isn't. Otherwise dispose will be\n // called before the context has been cancelled. It might be work having the interaction context\n // automatically cancel if the context is disposed so we don't have worry about detaching etc.\n if (this._interactionContext) {\n this._interactionContext.dispose(); // or do something like cancelAndDispose?\n }\n });\n }\n\n get name(): string {\n return this.constructor.name;\n }\n\n get urlService(): UrlService {\n return this.context.urlService;\n }\n\n get interactionServiceAdapter(): InteractionServiceRoutingAdapter {\n return this.context.routerInteractionAdapter;\n }\n\n storeVisit(visit: Visit) {\n // console.log(`Storing visit for ${visit.placeDefinition.component.name}`, {visit});\n this._visits.set(visit.placeDefinition, visit);\n }\n\n\n getVisitFor(placeDef: PlaceDefinition) {\n const visit = this._visits.get(placeDef);\n // console.log(`Getting visit for ${placeDef.component.name}`, {visit});\n return visit;\n }\n\n get canDeactivateInteractionContext(): InteractionContext {\n return this._interactionContext;\n }\n\n notifyActive() {\n // noop.\n }\n\n onRouterStarted(event: NavigationStart): void {\n // navigation sessions can have many cancel start cycles due to place guard redirects\n this.ignore(event);\n }\n\n // @Trace()\n onUrlChange(url: string) {\n // Normally we just ignore these but they are the only way of detecting if the back button\n // was clicked during a canDeactivate promise.\n // 1. a route is in progress and awaiting a canDeactivateGuard\n // 2. the user the clicks the back button.\n // So to handle that scenario we need to check if we've got a can deactivate interaction in\n // progress and the do the appropriate clean up.\n if (this.canDeactivateInteractionContext && this.canDeactivateInteractionContext.isActive()) {\n this.cancelCanDeactivateInteraction(url);\n }\n }\n\n onPopState(event: NavigationStart): void {\n return this.illegalTransition(event);\n }\n\n onRouterCancelled(event: NavigationCancel): void {\n return this.illegalTransition(event);\n }\n\n onRouterError(event: NavigationError): void {\n return this.illegalTransition(event);\n }\n\n onRouterEnd(event: NavigationEnd): void {\n return this.illegalTransition(event);\n }\n\n getVisits(): Visit[] {\n return Array.from(this._visits.values());\n }\n\n protected illegalTransition<R>(message: string | RouterEvent): R {\n return lang.illegalState(`${message.toString()} not supported by ${this.toString()}`);\n }\n\n protected currentRouterUrl(): string {\n return this.urlService.getCurrentRouterUrl();\n }\n\n resetBrowserLocation(url, options: { replaceCurrent: boolean } = { replaceCurrent: false }) {\n // console.log(`---> resetting browser location to: ${url}`);\n this.urlService.resetBrowserLocation(url, options);\n }\n\n // @Trace()\n protected repairBrowserHistoryAndUrlAfterGuardCancellation(poppedHistoryToReplace: string, activeUrl:string): void {\n // Important: I tried to perform this fix at a later point int he routing cycle but it created all kinds of\n // strangeness.\n Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');\n console.log(`replacing ${this.urlService.getCurrentLocationUrlSnapshot().url} with ${poppedHistoryToReplace}`);\n this.urlService.resetBrowserLocation(poppedHistoryToReplace, { replaceCurrent: true });\n console.log(`pushing ${activeUrl} back onto the history.`);\n this.urlService.resetBrowserLocation(activeUrl, { replaceCurrent: false });\n }\n\n\n ignore(event: RouterEvent, reason?: string): void {\n reason = reason ? ` -> ${reason}` : '';\n Logger.get(this).info(`Ignoring router event${reason}: ${event.constructor.name} -> ${event.url} :: ${this.toString()}`);\n }\n\n toString(): string {\n return `${this.constructor.name}(${this.debugState()})`;\n }\n\n protected debugState(properties?: string[]) {\n return (properties || this.debugPropertyKeys).map(p => {\n return `${p}: ${this[p]}`;\n }).join(', ');\n }\n\n async canDeactivatePlace(component: PlaceComponent, currentUrl: UrlSnapshot, nextUrl: UrlSnapshot): Promise<boolean | UrlSnapshot> {\n // console.log(`---> canDeactivatePlace(${component.placeDefinition.path}, ${currentUrl.url} -> ${nextUrl.url})`);\n // lookup the handler and create it if we've not seen it yet\n let handler = this.componentDeactivationHandlers.get(component);\n if (!handler) {\n const isPrimaryHandler = this.componentDeactivationHandlers.size === 0; // only primary handler cancels the app model interations\n handler = new PlaceComponentDeactivationHandler(component, this, isPrimaryHandler);\n this.componentDeactivationHandlers.set(component, handler);\n }\n return handler.canDeactivate(currentUrl, nextUrl).then(result => {\n // console.log(`<--- canDeactivatePlace(${component.placeDefinition.path}): ${result}`);\n return result;\n }).catch(error => {\n throw error;\n });\n }\n\n cancelCanDeactivateInteraction(newUrl: string): void {\n Logger.get(this).info(`back button pressed during navigation session interaction promise`);\n // detach the interaction from the session so it doesn't get disposed until the activity has finished\n // all it's things.\n const canDeactivateInteractionContext = this.detachCanDeactivateInteractionContext();\n // TODO: I need to make the exclusive interaction context disallow nested activities or\n // that would mess things up entirely. Or, can I do a context.abortAll().then(..)\n Logger.get(this).info('cancelling current navigation activity..');\n canDeactivateInteractionContext.cancelActiveActivity().then(() => {\n canDeactivateInteractionContext.dispose();\n });\n\n this.handleCanDeactivateCancelledEventScenario(newUrl);\n }\n\n abstract handleCanDeactivateCancelledEventScenario(newUrl: string): void\n\n protected reinstateUrlAfterAngularChangedItOnCancellation(url: string) {\n // Angular calls _this.resetUrlToCurrentUrlTree() on cancelling and fucks our history.\n // So this means that the top of the stack is the url we want to go back to, and not the one that was on\n // it before the cancel event fired.\n // So we need to:\n // - replace the just inserted url with the one that used to be there.\n // - push our actual url back onto the top of the stack.\n this.resetBrowserLocation(url, { replaceCurrent: true });\n }\n\n protected detachCanDeactivateInteractionContext(): InteractionContext {\n const context = this._interactionContext;\n this._interactionContext = null;\n return context;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"navigation-session.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/navigation-session.ts"],"names":[],"mappings":";AACA,OAAO,EAAO,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAS,MAAM,gBAAgB,CAAC;AAQ5E,OAAO,EAAE,iCAAiC,EAAE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0C,CAAC,CAAC;QAClE,+BAA+B,CAAC,oBAAoB,EAAE,CAAC,IAAI,CAAC;YAC1D,+BAA+B,CAAC,OAAO,EAAE,CAAC;QAC5C,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,yCAAyC,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;IAIS,2EAA+C,GAAzD,UAA0D,GAAW;QACnE,sFAAsF;QACtF,wGAAwG;QACxG,oCAAoC;QACpC,iBAAiB;QACjB,sEAAsE;QACtE,wDAAwD;QACxD,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;IAES,iEAAqC,GAA/C;QACE,IAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC;QACzC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;IACH,wBAAC;AAAD,CAAC,AAxLD,CAAgD,gBAAgB,GAwL/D","sourcesContent":["import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart, RouterEvent } from '@angular/router';\nimport { Dsl, GarbageCollector, lang, Logger, Trace } from '@coolon/pectin';\nimport { InteractionContext } from '../../../interaction/interaction-context';\nimport { InteractionServiceRoutingAdapter } from '../../../interaction/services/interaction-service-routing-adapter';\nimport { PlaceComponent } from '../../place-component';\nimport { PlaceDefinition } from '../../place-definition';\nimport { UrlService } from '../../url-service';\nimport { UrlSnapshot } from '../../url-snapshot';\nimport { Visit } from '../../visit';\nimport { PlaceComponentDeactivationHandler } from '../place-component-deactivation-handler';\nimport { NavigationContext } from './navigation-context';\n\n/**\n * Transient states\n */\nexport abstract class NavigationSession extends GarbageCollector {\n\n debugPropertyKeys: string[] = [];\n private _visits = new Map<PlaceDefinition, Visit>();\n\n private componentDeactivationHandlers = new Map<PlaceComponent, PlaceComponentDeactivationHandler>();\n abstract readonly isPopState: boolean;\n\n private _interactionContext: InteractionContext;\n\n constructor(readonly context: NavigationContext, readonly startingUrl: string) {\n super();\n // TODO: can I get away without creating one every time?\n this._interactionContext = this.context.routerInteractionAdapter.createExclusiveInteractionContext();\n this.onDispose(() => {\n // the interaction context can be detached during the back button cancellation state transition\n // as the transition is synchronous and activityCancellation isn't. Otherwise dispose will be\n // called before the context has been cancelled. It might be work having the interaction context\n // automatically cancel if the context is disposed so we don't have worry about detaching etc.\n if (this._interactionContext) {\n this._interactionContext.dispose(); // or do something like cancelAndDispose?\n }\n });\n }\n\n get name(): string {\n return this.constructor.name;\n }\n\n get urlService(): UrlService {\n return this.context.urlService;\n }\n\n get interactionServiceAdapter(): InteractionServiceRoutingAdapter {\n return this.context.routerInteractionAdapter;\n }\n\n storeVisit(visit: Visit) {\n // console.log(`Storing visit for ${visit.placeDefinition.component.name}`, {visit});\n this._visits.set(visit.placeDefinition, visit);\n }\n\n\n getVisitFor(placeDef: PlaceDefinition) {\n const visit = this._visits.get(placeDef);\n // console.log(`Getting visit for ${placeDef.component.name}`, {visit});\n return visit;\n }\n\n get canDeactivateInteractionContext(): InteractionContext {\n return this._interactionContext;\n }\n\n notifyActive() {\n // noop.\n }\n\n onRouterStarted(event: NavigationStart): void {\n // navigation sessions can have many cancel start cycles due to place guard redirects\n this.ignore(event);\n }\n\n // @Trace()\n onUrlChange(url: string) {\n // Normally we just ignore these but they are the only way of detecting if the back button\n // was clicked during a canDeactivate promise.\n // 1. a route is in progress and awaiting a canDeactivateGuard\n // 2. the user the clicks the back button.\n // So to handle that scenario we need to check if we've got a can deactivate interaction in\n // progress and the do the appropriate clean up.\n if (this.canDeactivateInteractionContext && this.canDeactivateInteractionContext.isActive()) {\n this.cancelCanDeactivateInteraction(url);\n }\n }\n\n onPopState(event: NavigationStart): void {\n return this.illegalTransition(event);\n }\n\n onRouterCancelled(event: NavigationCancel): void {\n return this.illegalTransition(event);\n }\n\n onRouterError(event: NavigationError): void {\n return this.illegalTransition(event);\n }\n\n onRouterEnd(event: NavigationEnd): void {\n return this.illegalTransition(event);\n }\n\n getVisits(): Visit[] {\n return Array.from(this._visits.values());\n }\n\n protected illegalTransition<R>(message: string | RouterEvent): R {\n return lang.illegalState(`${message.toString()} not supported by ${this.toString()}`);\n }\n\n protected currentRouterUrl(): string {\n return this.urlService.getCurrentRouterUrl();\n }\n\n resetBrowserLocation(url, options: { replaceCurrent: boolean } = { replaceCurrent: false }) {\n // console.log(`---> resetting browser location to: ${url}`);\n this.urlService.resetBrowserLocation(url, options);\n }\n\n // @Trace()\n protected repairBrowserHistoryAndUrlAfterGuardCancellation(poppedHistoryToReplace: string, activeUrl:string): void {\n // Important: I tried to perform this fix at a later point int he routing cycle but it created all kinds of\n // strangeness.\n Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');\n console.log(`replacing ${this.urlService.getCurrentLocationUrlSnapshot().url} with ${poppedHistoryToReplace}`);\n this.urlService.resetBrowserLocation(poppedHistoryToReplace, { replaceCurrent: true });\n console.log(`pushing ${activeUrl} back onto the history.`);\n this.urlService.resetBrowserLocation(activeUrl, { replaceCurrent: false });\n }\n\n\n ignore(event: RouterEvent, reason?: string): void {\n reason = reason ? ` -> ${reason}` : '';\n Logger.get(this).info(`Ignoring router event${reason}: ${event.constructor.name} -> ${event.url} :: ${this.toString()}`);\n }\n\n toString(): string {\n return `${this.constructor.name}(${this.debugState()})`;\n }\n\n protected debugState(properties?: string[]) {\n return (properties || this.debugPropertyKeys).map(p => {\n return `${p}: ${this[p]}`;\n }).join(', ');\n }\n\n async canDeactivatePlace(component: PlaceComponent, currentUrl: UrlSnapshot, nextUrl: UrlSnapshot): Promise<boolean | UrlSnapshot> {\n // console.log(`---> canDeactivatePlace(${component.placeDefinition.path}, ${currentUrl.url} -> ${nextUrl.url})`);\n // lookup the handler and create it if we've not seen it yet\n let handler = this.componentDeactivationHandlers.get(component);\n if (!handler) {\n const isPrimaryHandler = this.componentDeactivationHandlers.size === 0; // only primary handler cancels the app model interations\n handler = new PlaceComponentDeactivationHandler(component, this, isPrimaryHandler);\n this.componentDeactivationHandlers.set(component, handler);\n }\n return handler.canDeactivate(currentUrl, nextUrl).then(result => {\n // console.log(`<--- canDeactivatePlace(${component.placeDefinition.path}): ${result}`);\n return result;\n }).catch(error => {\n throw error;\n });\n }\n\n cancelCanDeactivateInteraction(newUrl: string): void {\n Logger.get(this).info(`back button pressed during navigation session interaction promise`);\n // detach the interaction from the session so it doesn't get disposed until the activity has finished\n // all it's things.\n const canDeactivateInteractionContext = this.detachCanDeactivateInteractionContext();\n // TODO: I need to make the exclusive interaction context disallow nested activities or\n // that would mess things up entirely. Or, can I do a context.abortAll().then(..)\n Logger.get(this).info('cancelling current navigation activity..');\n canDeactivateInteractionContext.cancelActiveActivity().then(() => {\n canDeactivateInteractionContext.dispose();\n });\n\n this.handleCanDeactivateCancelledEventScenario(newUrl);\n }\n\n abstract handleCanDeactivateCancelledEventScenario(newUrl: string): void\n\n protected reinstateUrlAfterAngularChangedItOnCancellation(url: string) {\n // Angular calls _this.resetUrlToCurrentUrlTree() on cancelling and fucks our history.\n // So this means that the top of the stack is the url we want to go back to, and not the one that was on\n // it before the cancel event fired.\n // So we need to:\n // - replace the just inserted url with the one that used to be there.\n // - push our actual url back onto the top of the stack.\n this.resetBrowserLocation(url, { replaceCurrent: true });\n }\n\n protected detachCanDeactivateInteractionContext(): InteractionContext {\n const context = this._interactionContext;\n this._interactionContext = null;\n return context;\n }\n}\n"]}
|
|
@@ -1,47 +1,19 @@
|
|
|
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";
|
|
1
|
+
import { __extends } from "tslib";
|
|
6
2
|
import { AbstractPopStateNavigation } from './abstract-pop-state-navigation';
|
|
7
3
|
import { WaitUntilPopStateDuringCanDeactivateInteractionFinishes } from './event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes';
|
|
8
4
|
var PopStateNavigation = /** @class */ (function (_super) {
|
|
9
|
-
|
|
5
|
+
__extends(PopStateNavigation, _super);
|
|
10
6
|
function PopStateNavigation() {
|
|
11
7
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
12
8
|
}
|
|
13
|
-
|
|
14
|
-
* @param {?} event
|
|
15
|
-
* @return {?}
|
|
16
|
-
*/
|
|
17
|
-
PopStateNavigation.prototype.onRouterCancelled = /**
|
|
18
|
-
* @param {?} event
|
|
19
|
-
* @return {?}
|
|
20
|
-
*/
|
|
21
|
-
function (event) {
|
|
9
|
+
PopStateNavigation.prototype.onRouterCancelled = function (event) {
|
|
22
10
|
this.repairBrowserHistoryAndUrlAfterGuardCancellation();
|
|
23
11
|
this.context.finishRoutingSession();
|
|
24
12
|
};
|
|
25
|
-
|
|
26
|
-
* @param {?} event
|
|
27
|
-
* @return {?}
|
|
28
|
-
*/
|
|
29
|
-
PopStateNavigation.prototype.onRouterEnd = /**
|
|
30
|
-
* @param {?} event
|
|
31
|
-
* @return {?}
|
|
32
|
-
*/
|
|
33
|
-
function (event) {
|
|
13
|
+
PopStateNavigation.prototype.onRouterEnd = function (event) {
|
|
34
14
|
this.context.finishRoutingSession(this.getVisits());
|
|
35
15
|
};
|
|
36
|
-
|
|
37
|
-
* @param {?} locationTriggerUrl
|
|
38
|
-
* @return {?}
|
|
39
|
-
*/
|
|
40
|
-
PopStateNavigation.prototype.handleCanDeactivateCancelledEventScenario = /**
|
|
41
|
-
* @param {?} locationTriggerUrl
|
|
42
|
-
* @return {?}
|
|
43
|
-
*/
|
|
44
|
-
function (locationTriggerUrl) {
|
|
16
|
+
PopStateNavigation.prototype.handleCanDeactivateCancelledEventScenario = function (locationTriggerUrl) {
|
|
45
17
|
this.context.transitionTo(new WaitUntilPopStateDuringCanDeactivateInteractionFinishes(this.context, this.startingUrl, locationTriggerUrl, this.poppedHistoryUrl));
|
|
46
18
|
};
|
|
47
19
|
return PopStateNavigation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pop-state-navigation.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/pop-state-navigation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pop-state-navigation.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/navigation/session/pop-state-navigation.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAG7E,OAAO,EAAE,uDAAuD,EAAE,MAAM,+EAA+E,CAAC;AAExJ;IAAwC,sCAA0B;IAAlE;;IAkBA,CAAC;IAhBC,8CAAiB,GAAjB,UAAkB,KAAuB;QACvC,IAAI,CAAC,gDAAgD,EAAE,CAAC;QACxD,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;IACtC,CAAC;IAED,wCAAW,GAAX,UAAY,KAAoB;QAC9B,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,sEAAyC,GAAzC,UAA0C,kBAA0B;QAClE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,uDAAuD,CAAC,IAAI,CAAC,OAAO,EAChG,IAAI,CAAC,WAAW,EAChB,kBAAkB,EAClB,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC5B,CAAC;IAEH,yBAAC;AAAD,CAAC,AAlBD,CAAwC,0BAA0B,GAkBjE","sourcesContent":["import { NavigationCancel, NavigationEnd, NavigationError } from '@angular/router';\nimport { Logger, Trace } from '@coolon/pectin';\nimport { AbstractPopStateNavigation } from './abstract-pop-state-navigation';\nimport { NavigationContext } from './navigation-context';\nimport { NavigationSession } from './navigation-session';\nimport { WaitUntilPopStateDuringCanDeactivateInteractionFinishes } from './event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes';\n\nexport class PopStateNavigation extends AbstractPopStateNavigation {\n\n onRouterCancelled(event: NavigationCancel): void {\n this.repairBrowserHistoryAndUrlAfterGuardCancellation();\n this.context.finishRoutingSession();\n }\n\n onRouterEnd(event: NavigationEnd): void {\n this.context.finishRoutingSession(this.getVisits());\n }\n\n handleCanDeactivateCancelledEventScenario(locationTriggerUrl: string): void {\n this.context.transitionTo(new WaitUntilPopStateDuringCanDeactivateInteractionFinishes(this.context,\n this.startingUrl,\n locationTriggerUrl,\n this.poppedHistoryUrl));\n }\n\n}\n"]}
|