@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,8 +1,4 @@
|
|
|
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, __generator } from "tslib";
|
|
6
2
|
import { lang } from '@coolon/pectin';
|
|
7
3
|
import { Observable } from 'rxjs';
|
|
8
4
|
import { PlaceComponent } from '../place-component';
|
|
@@ -10,13 +6,7 @@ import { VisitSanitiser } from '../route/visit-sanitiser';
|
|
|
10
6
|
import { UrlSnapshot } from '../url-snapshot';
|
|
11
7
|
import { Visit } from '../visit';
|
|
12
8
|
import { ConsolidatedParameterMap } from './consolidated-param-map';
|
|
13
|
-
/**
|
|
14
|
-
* @abstract
|
|
15
|
-
*/
|
|
16
|
-
var /**
|
|
17
|
-
* @abstract
|
|
18
|
-
*/
|
|
19
|
-
PlaceGuard = /** @class */ (function () {
|
|
9
|
+
var PlaceGuard = /** @class */ (function () {
|
|
20
10
|
function PlaceGuard(router, urlService, placeRouter, placeHistory, interactionService, injector) {
|
|
21
11
|
this.router = router;
|
|
22
12
|
this.urlService = urlService;
|
|
@@ -26,43 +16,22 @@ PlaceGuard = /** @class */ (function () {
|
|
|
26
16
|
this.injector = injector;
|
|
27
17
|
}
|
|
28
18
|
// @Trace()
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
* @param {?} activatedRoute
|
|
32
|
-
* @param {?} state
|
|
33
|
-
* @return {?}
|
|
34
|
-
*/
|
|
35
|
-
PlaceGuard.prototype.canActivate =
|
|
36
|
-
// @Trace()
|
|
37
|
-
/**
|
|
38
|
-
* @param {?} activatedRoute
|
|
39
|
-
* @param {?} state
|
|
40
|
-
* @return {?}
|
|
41
|
-
*/
|
|
42
|
-
function (activatedRoute, state) {
|
|
43
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
19
|
+
PlaceGuard.prototype.canActivate = function (activatedRoute, state) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
44
21
|
var _this = this;
|
|
45
|
-
return
|
|
22
|
+
return __generator(this, function (_a) {
|
|
46
23
|
// TODO: this is ugly now that I'm return UrlSnapshots and not UrlTrees. It'd be better if the functions
|
|
47
24
|
// weren't nested or if I implemented a handler chain.
|
|
48
|
-
return [2 /*return*/, this.authorisePlaceThen(activatedRoute, state, (
|
|
49
|
-
* @param {?} placeDefinition
|
|
50
|
-
* @return {?}
|
|
51
|
-
*/
|
|
52
|
-
function (placeDefinition) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
25
|
+
return [2 /*return*/, this.authorisePlaceThen(activatedRoute, state, function (placeDefinition) { return __awaiter(_this, void 0, void 0, function () {
|
|
53
26
|
var result;
|
|
54
27
|
var _this = this;
|
|
55
|
-
return
|
|
28
|
+
return __generator(this, function (_a) {
|
|
56
29
|
switch (_a.label) {
|
|
57
|
-
case 0: return [4 /*yield*/, this.cleanInteractionState(activatedRoute, state, (
|
|
58
|
-
* @return {?}
|
|
59
|
-
*/
|
|
60
|
-
function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
30
|
+
case 0: return [4 /*yield*/, this.cleanInteractionState(activatedRoute, state, function () { return __awaiter(_this, void 0, void 0, function () {
|
|
61
31
|
var params, parsedParams, initialVisit, sanitiser, sanitisedVisit, urlSnapshot;
|
|
62
|
-
return
|
|
32
|
+
return __generator(this, function (_a) {
|
|
63
33
|
switch (_a.label) {
|
|
64
34
|
case 0:
|
|
65
|
-
// Parse our route params.
|
|
66
35
|
params = new ConsolidatedParameterMap(activatedRoute.paramMap, activatedRoute.url);
|
|
67
36
|
parsedParams = placeDefinition.parseRouteParams(params);
|
|
68
37
|
initialVisit = this.placeRouter.navigationSession.getVisitFor(placeDefinition) || new Visit(placeDefinition, parsedParams);
|
|
@@ -73,7 +42,6 @@ PlaceGuard = /** @class */ (function () {
|
|
|
73
42
|
// Save the visit with any updated parameters. We need to save it so we remember any non route parameters
|
|
74
43
|
this.placeRouter.navigationSession.storeVisit(sanitisedVisit);
|
|
75
44
|
if (initialVisit.hasRoutingChangedFrom(sanitisedVisit)) {
|
|
76
|
-
// Regenerate the url
|
|
77
45
|
urlSnapshot = this.urlService.parseUrl(state.url).updateVisitSegments(sanitisedVisit);
|
|
78
46
|
// console.log('##### Place Guard Redirect', urlSnapshot);
|
|
79
47
|
return [2 /*return*/, urlSnapshot];
|
|
@@ -84,38 +52,21 @@ PlaceGuard = /** @class */ (function () {
|
|
|
84
52
|
return [2 /*return*/];
|
|
85
53
|
}
|
|
86
54
|
});
|
|
87
|
-
}); })
|
|
55
|
+
}); })];
|
|
88
56
|
case 1:
|
|
89
57
|
result = _a.sent();
|
|
90
58
|
return [2 /*return*/, this.handleGuardResult(result)];
|
|
91
59
|
}
|
|
92
60
|
});
|
|
93
|
-
}); })
|
|
61
|
+
}); })];
|
|
94
62
|
});
|
|
95
63
|
});
|
|
96
64
|
};
|
|
97
65
|
// @Trace()
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
* @param {?} component
|
|
101
|
-
* @param {?} currentRoute
|
|
102
|
-
* @param {?} currentState
|
|
103
|
-
* @param {?=} nextState
|
|
104
|
-
* @return {?}
|
|
105
|
-
*/
|
|
106
|
-
PlaceGuard.prototype.canDeactivate =
|
|
107
|
-
// @Trace()
|
|
108
|
-
/**
|
|
109
|
-
* @param {?} component
|
|
110
|
-
* @param {?} currentRoute
|
|
111
|
-
* @param {?} currentState
|
|
112
|
-
* @param {?=} nextState
|
|
113
|
-
* @return {?}
|
|
114
|
-
*/
|
|
115
|
-
function (component, currentRoute, currentState, nextState) {
|
|
116
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
66
|
+
PlaceGuard.prototype.canDeactivate = function (component, currentRoute, currentState, nextState) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
117
68
|
var currentUrl, nextUrl, result;
|
|
118
|
-
return
|
|
69
|
+
return __generator(this, function (_a) {
|
|
119
70
|
switch (_a.label) {
|
|
120
71
|
case 0:
|
|
121
72
|
currentUrl = this.urlService.parseUrl(currentState.url);
|
|
@@ -129,20 +80,7 @@ PlaceGuard = /** @class */ (function () {
|
|
|
129
80
|
});
|
|
130
81
|
};
|
|
131
82
|
// @Trace()
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* @private
|
|
135
|
-
* @param {?} result
|
|
136
|
-
* @return {?}
|
|
137
|
-
*/
|
|
138
|
-
PlaceGuard.prototype.handleGuardResult =
|
|
139
|
-
// @Trace()
|
|
140
|
-
/**
|
|
141
|
-
* @private
|
|
142
|
-
* @param {?} result
|
|
143
|
-
* @return {?}
|
|
144
|
-
*/
|
|
145
|
-
function (result) {
|
|
83
|
+
PlaceGuard.prototype.handleGuardResult = function (result) {
|
|
146
84
|
if (result instanceof UrlSnapshot) {
|
|
147
85
|
return result.urlTree;
|
|
148
86
|
}
|
|
@@ -151,27 +89,10 @@ PlaceGuard = /** @class */ (function () {
|
|
|
151
89
|
}
|
|
152
90
|
};
|
|
153
91
|
// @Trace()
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
* @protected
|
|
157
|
-
* @param {?} activatedRoute
|
|
158
|
-
* @param {?} state
|
|
159
|
-
* @param {?} runPlaceGuards
|
|
160
|
-
* @return {?}
|
|
161
|
-
*/
|
|
162
|
-
PlaceGuard.prototype.authorisePlaceThen =
|
|
163
|
-
// @Trace()
|
|
164
|
-
/**
|
|
165
|
-
* @protected
|
|
166
|
-
* @param {?} activatedRoute
|
|
167
|
-
* @param {?} state
|
|
168
|
-
* @param {?} runPlaceGuards
|
|
169
|
-
* @return {?}
|
|
170
|
-
*/
|
|
171
|
-
function (activatedRoute, state, runPlaceGuards) {
|
|
172
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
92
|
+
PlaceGuard.prototype.authorisePlaceThen = function (activatedRoute, state, runPlaceGuards) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
173
94
|
var placeDefinition, authoriseResult, _a;
|
|
174
|
-
return
|
|
95
|
+
return __generator(this, function (_b) {
|
|
175
96
|
switch (_b.label) {
|
|
176
97
|
case 0:
|
|
177
98
|
if (!PlaceComponent.isPlaceComponentConstructor(activatedRoute.component)) return [3 /*break*/, 4];
|
|
@@ -202,48 +123,20 @@ PlaceGuard = /** @class */ (function () {
|
|
|
202
123
|
});
|
|
203
124
|
};
|
|
204
125
|
// @Trace()
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
* @param {?} activatedRoute
|
|
208
|
-
* @param {?} state
|
|
209
|
-
* @return {?}
|
|
210
|
-
*/
|
|
211
|
-
PlaceGuard.prototype.isAuthorised =
|
|
212
|
-
// @Trace()
|
|
213
|
-
/**
|
|
214
|
-
* @param {?} activatedRoute
|
|
215
|
-
* @param {?} state
|
|
216
|
-
* @return {?}
|
|
217
|
-
*/
|
|
218
|
-
function (activatedRoute, state) {
|
|
219
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
126
|
+
PlaceGuard.prototype.isAuthorised = function (activatedRoute, state) {
|
|
127
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
220
128
|
var authorised;
|
|
221
|
-
return
|
|
129
|
+
return __generator(this, function (_a) {
|
|
222
130
|
authorised = this.getAuthGuard(this.injector).canActivate(activatedRoute, state);
|
|
223
131
|
return [2 /*return*/, (authorised instanceof Observable) ? authorised.toPromise() : authorised];
|
|
224
132
|
});
|
|
225
133
|
});
|
|
226
134
|
};
|
|
227
135
|
// @Trace()
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
* @param {?} route
|
|
231
|
-
* @param {?} state
|
|
232
|
-
* @param {?} then
|
|
233
|
-
* @return {?}
|
|
234
|
-
*/
|
|
235
|
-
PlaceGuard.prototype.cleanInteractionState =
|
|
236
|
-
// @Trace()
|
|
237
|
-
/**
|
|
238
|
-
* @param {?} route
|
|
239
|
-
* @param {?} state
|
|
240
|
-
* @param {?} then
|
|
241
|
-
* @return {?}
|
|
242
|
-
*/
|
|
243
|
-
function (route, state, then) {
|
|
244
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
136
|
+
PlaceGuard.prototype.cleanInteractionState = function (route, state, then) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
245
138
|
var url;
|
|
246
|
-
return
|
|
139
|
+
return __generator(this, function (_a) {
|
|
247
140
|
url = this.urlService.parseUrl(state.url);
|
|
248
141
|
if (!this.interactionService.isActive() && url.hasInteractions()) {
|
|
249
142
|
// This happens if we reload the page or the url was pasted as the route should only be activated
|
|
@@ -259,46 +152,5 @@ PlaceGuard = /** @class */ (function () {
|
|
|
259
152
|
};
|
|
260
153
|
return PlaceGuard;
|
|
261
154
|
}());
|
|
262
|
-
/**
|
|
263
|
-
* @abstract
|
|
264
|
-
*/
|
|
265
155
|
export { PlaceGuard };
|
|
266
|
-
if (false) {
|
|
267
|
-
/**
|
|
268
|
-
* @type {?}
|
|
269
|
-
* @private
|
|
270
|
-
*/
|
|
271
|
-
PlaceGuard.prototype.router;
|
|
272
|
-
/**
|
|
273
|
-
* @type {?}
|
|
274
|
-
* @private
|
|
275
|
-
*/
|
|
276
|
-
PlaceGuard.prototype.urlService;
|
|
277
|
-
/**
|
|
278
|
-
* @type {?}
|
|
279
|
-
* @private
|
|
280
|
-
*/
|
|
281
|
-
PlaceGuard.prototype.placeRouter;
|
|
282
|
-
/**
|
|
283
|
-
* @type {?}
|
|
284
|
-
* @private
|
|
285
|
-
*/
|
|
286
|
-
PlaceGuard.prototype.placeHistory;
|
|
287
|
-
/**
|
|
288
|
-
* @type {?}
|
|
289
|
-
* @private
|
|
290
|
-
*/
|
|
291
|
-
PlaceGuard.prototype.interactionService;
|
|
292
|
-
/**
|
|
293
|
-
* @type {?}
|
|
294
|
-
* @private
|
|
295
|
-
*/
|
|
296
|
-
PlaceGuard.prototype.injector;
|
|
297
|
-
/**
|
|
298
|
-
* @abstract
|
|
299
|
-
* @param {?} injector
|
|
300
|
-
* @return {?}
|
|
301
|
-
*/
|
|
302
|
-
PlaceGuard.prototype.getAuthGuard = function (injector) { };
|
|
303
|
-
}
|
|
304
156
|
//# sourceMappingURL=place.guard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place.guard.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/guards/place.guard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"place.guard.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/guards/place.guard.ts"],"names":[],"mappings":";AAUA,OAAO,EAAE,IAAI,EAAS,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAGpE;IAGE,oBAA6B,MAAc,EACvB,UAAsB,EACb,WAAwB,EACxB,YAA0B,EAC1B,kBAAsC,EACtC,QAAkB;QALlB,WAAM,GAAN,MAAM,CAAQ;QACvB,eAAU,GAAV,UAAU,CAAY;QACb,gBAAW,GAAX,WAAW,CAAa;QACxB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,aAAQ,GAAR,QAAQ,CAAU;IAC/C,CAAC;IAED,WAAW;IACL,gCAAW,GAAjB,UAAkB,cAAsC,EAAE,KAA0B;;;;gBAElF,yGAAyG;gBACzG,6DAA6D;gBAC7D,sBAAO,IAAI,CAAC,kBAAkB,CAAC,cAAc,EAAE,KAAK,EAAE,UAAO,eAAe;;;;;wCAE3D,qBAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,KAAK,EAAE;;;;;oDAE/D,MAAM,GAAG,IAAI,wBAAwB,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;oDACnF,YAAY,GAAG,eAAe,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;oDAExD,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,IAAI,KAAK,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;oDAC3H,SAAS,GAAG,IAAI,cAAc,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;oDAC7E,qBAAM,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC,EAAA;;oDAA1F,cAAc,GAAG,SAAyE;oDAEhG,0GAA0G;oDAC1G,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;oDAC9D,IAAI,YAAY,CAAC,qBAAqB,CAAC,cAAc,CAAC,EAAE;wDAEhD,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;wDAC5F,0DAA0D;wDAC1D,sBAAO,WAAW,EAAC;qDACpB;yDAAM;wDACL,sBAAO,IAAI,EAAC;qDACb;;;;yCACF,CAAC,EAAA;;oCAnBI,MAAM,GAAG,SAmBb;oCACF,sBAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAC;;;yBAEvC,CAAC,EAAC;;;KACJ;IAED,WAAW;IACL,kCAAa,GAAnB,UAAoB,SAAyB,EAAE,YAAoC,EAAE,YAAiC,EAAE,SAA+B;;;;;;wBAC/I,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;wBACxD,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;wBACzC,qBAAM,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,EAAA;;wBAApG,MAAM,GAAG,SAA2F;wBAC1G,sBAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAC;;;;KACvC;IAED,WAAW;IACH,sCAAiB,GAAzB,UAA0B,MAAM;QAC9B,IAAI,MAAM,YAAY,WAAW,EAAE;YACjC,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;aAAM;YACL,OAAO,MAAM,CAAC;SACf;IACH,CAAC;IAED,WAAW;IACK,uCAAkB,GAAlC,UAAmC,cAAsC,EAAE,KAA0B,EAAE,cAAgF;;;;;;6BACjL,cAAc,CAAC,2BAA2B,CAAC,cAAc,CAAC,SAAS,CAAC,EAApE,wBAAoE;wBAChE,eAAe,GAAG,cAAc,CAAC,aAAa,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;6BACvD,eAAe,CAAC,YAAY,EAA5B,wBAA4B;wBAAG,qBAAM,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,KAAK,CAAC,EAAA;;wBAA9C,KAAA,SAA8C,CAAA;;;wBAAG,KAAA,IAAI,CAAA;;;wBAAtG,eAAe,KAAuF;wBAC5G,IAAI,eAAe,KAAK,IAAI,EAAE;4BAC5B,8CAA8C;4BAC9C,sBAAO,cAAc,CAAC,eAAe,CAAC,EAAC;yBACxC;6BAAM;4BACL,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,eAAe,CAAC,CAAC;4BACtD,sBAAO,eAAe,EAAC;yBACxB;;4BAED,sBAAO,IAAI,CAAC,YAAY,CAAC,iEAA+D,cAAc,CAAC,SAAW,CAAC,EAAC;;;;;KAEvH;IAED,WAAW;IACL,iCAAY,GAAlB,UAAmB,cAAsC,EAAE,KAA0B;;;;gBAC7E,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;gBACvF,sBAAO,CAAC,UAAU,YAAY,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU,EAAC;;;KACjF;IAID,WAAW;IACL,0CAAqB,GAA3B,UAA4B,KAA6B,EAAE,KAA0B,EAAE,IAA0C;;;;gBACzH,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBAChD,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,eAAe,EAAE,EAAE;oBAChE,iGAAiG;oBACjG,mDAAmD;oBACnD,sBAAO,GAAG,CAAC,oBAAoB,EAAE,EAAC;iBACnC;qBAAM;oBACL,sBAAO,IAAI,EAAE,EAAC;iBACf;;;;KACF;IAEH,iBAAC;AAAD,CAAC,AAjGD,IAiGC","sourcesContent":["import { Injector } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanActivate,\n CanDeactivate,\n Router,\n RouterStateSnapshot,\n UrlSerializer,\n UrlTree\n} from '@angular/router';\nimport { lang, Trace } from '@coolon/pectin';\nimport { Observable } from 'rxjs';\nimport { InteractionService } from '../../interaction/services/interaction.service';\nimport { PlaceComponent } from '../place-component';\nimport { PlaceDefinition } from '../place-definition';\nimport { PlaceHistory } from '../place-history';\nimport { PlaceRouter } from '../place-router';\nimport { VisitSanitiser } from '../route/visit-sanitiser';\nimport { UrlService } from '../url-service';\nimport { UrlSnapshot } from '../url-snapshot';\nimport { Visit } from '../visit';\nimport { ConsolidatedParameterMap } from './consolidated-param-map';\n\n\nexport abstract class PlaceGuard implements CanActivate, CanDeactivate<PlaceComponent> {\n\n\n constructor(private readonly router: Router,\n private urlService: UrlService,\n private readonly placeRouter: PlaceRouter,\n private readonly placeHistory: PlaceHistory,\n private readonly interactionService: InteractionService,\n private readonly injector: Injector) {\n }\n\n // @Trace()\n async canActivate(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree> {\n\n // TODO: this is ugly now that I'm return UrlSnapshots and not UrlTrees. It'd be better if the functions\n // weren't nested or if I implemented a handler chain.\n return this.authorisePlaceThen(activatedRoute, state, async (placeDefinition) => {\n\n const result = await this.cleanInteractionState(activatedRoute, state, async () => {\n // Parse our route params.\n const params = new ConsolidatedParameterMap(activatedRoute.paramMap, activatedRoute.url);\n const parsedParams = placeDefinition.parseRouteParams(params);\n\n const initialVisit = this.placeRouter.navigationSession.getVisitFor(placeDefinition) || new Visit(placeDefinition, parsedParams);\n const sanitiser = new VisitSanitiser(activatedRoute, this.router, this.placeHistory, this.injector);\n const sanitisedVisit = await sanitiser.sanitise(initialVisit.mergeRouteParameters(parsedParams));\n\n // Save the visit with any updated parameters. We need to save it so we remember any non route parameters\n this.placeRouter.navigationSession.storeVisit(sanitisedVisit);\n if (initialVisit.hasRoutingChangedFrom(sanitisedVisit)) {\n // Regenerate the url\n const urlSnapshot = this.urlService.parseUrl(state.url).updateVisitSegments(sanitisedVisit);\n // console.log('##### Place Guard Redirect', urlSnapshot);\n return urlSnapshot;\n } else {\n return true;\n }\n });\n return this.handleGuardResult(result);\n\n });\n }\n\n // @Trace()\n async canDeactivate(component: PlaceComponent, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Promise<boolean | UrlTree> {\n const currentUrl = this.urlService.parseUrl(currentState.url);\n const nextUrl = this.urlService.parseUrl(nextState.url);\n const result = await this.placeRouter.navigationSession.canDeactivatePlace(component, currentUrl, nextUrl);\n return this.handleGuardResult(result);\n }\n\n // @Trace()\n private handleGuardResult(result) {\n if (result instanceof UrlSnapshot) {\n return result.urlTree;\n } else {\n return result;\n }\n }\n\n // @Trace()\n protected async authorisePlaceThen(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot, runPlaceGuards: (placeDefinition: PlaceDefinition) => Promise<boolean | UrlTree>) {\n if (PlaceComponent.isPlaceComponentConstructor(activatedRoute.component)) {\n const placeDefinition = PlaceComponent.getDefinition(activatedRoute.component);\n const authoriseResult = placeDefinition.authenticate ? await this.isAuthorised(activatedRoute, state) : true;\n if (authoriseResult === true) {\n // we're authorised, now run the place guards.\n return runPlaceGuards(placeDefinition);\n } else {\n console.log('not authorised result', authoriseResult);\n return authoriseResult;\n }\n } else {\n return lang.illegalState(`expected component to be an instance of PlaceComponent, got ${activatedRoute.component}`);\n }\n }\n\n // @Trace()\n async isAuthorised(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree> {\n const authorised = this.getAuthGuard(this.injector).canActivate(activatedRoute, state);\n return (authorised instanceof Observable) ? authorised.toPromise() : authorised;\n }\n\n abstract getAuthGuard(injector: Injector): CanActivate;\n\n // @Trace()\n async cleanInteractionState(route: ActivatedRouteSnapshot, state: RouterStateSnapshot, then: () => Promise<boolean | UrlSnapshot>): Promise<boolean | UrlSnapshot> {\n const url = this.urlService.parseUrl(state.url);\n if (!this.interactionService.isActive() && url.hasInteractions()) {\n // This happens if we reload the page or the url was pasted as the route should only be activated\n // after the interaction context has become active.\n return url.removeInteractionIds();\n } else {\n return then();\n }\n }\n\n}\n"]}
|
package/esm5/lib/place/index.js
CHANGED
|
@@ -1,50 +1,42 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
1
|
/**
|
|
6
2
|
* @file Automatically generated by barrelsby.
|
|
7
3
|
*/
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
export { ParameterDefinition } from "./route/parameter-definition.class";
|
|
47
|
-
export {} from "./route/parameter-sanitiser";
|
|
48
|
-
export {} from "./route/parameter-snapshot";
|
|
49
|
-
export { VisitSanitiser } from "./route/visit-sanitiser";
|
|
4
|
+
export * from "./place-component";
|
|
5
|
+
export * from "./place-config";
|
|
6
|
+
export * from "./place-definition";
|
|
7
|
+
export * from "./place-history";
|
|
8
|
+
export * from "./place-router";
|
|
9
|
+
export * from "./place.decorator";
|
|
10
|
+
export * from "./place.module";
|
|
11
|
+
export * from "./url-service";
|
|
12
|
+
export * from "./url-snapshot";
|
|
13
|
+
export * from "./visit";
|
|
14
|
+
export * from "./components/abstract-place-navigation.component";
|
|
15
|
+
export * from "./components/busy-overlay/busy-overlay.component";
|
|
16
|
+
export * from "./components/empty-state/empty-state.component";
|
|
17
|
+
export * from "./components/list-place-nav/list-place-nav.component";
|
|
18
|
+
export * from "./components/place-outlet/place-outlet.component";
|
|
19
|
+
export * from "./components/place-outlet/route-animations";
|
|
20
|
+
export * from "./components/tabbed-place-navigation/tabbed-place-navigation.component";
|
|
21
|
+
export * from "./guards/consolidated-param-map";
|
|
22
|
+
export * from "./guards/noop-auth-guard.service";
|
|
23
|
+
export * from "./guards/place.guard";
|
|
24
|
+
export * from "./navigation/place-component-deactivation-handler";
|
|
25
|
+
export * from "./navigation/session/abstract-pop-state-navigation";
|
|
26
|
+
export * from "./navigation/session/navigating";
|
|
27
|
+
export * from "./navigation/session/navigation-context";
|
|
28
|
+
export * from "./navigation/session/navigation-session";
|
|
29
|
+
export * from "./navigation/session/pop-state-navigation";
|
|
30
|
+
export * from "./navigation/session/event-cleanup/event-clean-up-session";
|
|
31
|
+
export * from "./navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled";
|
|
32
|
+
export * from "./navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes";
|
|
33
|
+
export * from "./navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes";
|
|
34
|
+
export * from "./navigation/session/interactions/navigating-during-interaction";
|
|
35
|
+
export * from "./navigation/session/interactions/pop-state-during-interaction-navigation";
|
|
36
|
+
export * from "./navigation/session/interactions/remove-last-interaction-from-url-navigation-session";
|
|
37
|
+
export * from "./navigation/session/interactions/synchronise-interaction-context-ids-with-route";
|
|
38
|
+
export * from "./route/formatter";
|
|
39
|
+
export * from "./route/parameter-decorators";
|
|
40
|
+
export * from "./route/parameter-definition.class";
|
|
41
|
+
export * from "./route/visit-sanitiser";
|
|
50
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,kDAAkD,CAAC;AACjE,cAAc,kDAAkD,CAAC;AACjE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sDAAsD,CAAC;AACrE,cAAc,kDAAkD,CAAC;AACjE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wEAAwE,CAAC;AACvF,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2DAA2D,CAAC;AAC1E,cAAc,wFAAwF,CAAC;AACvG,cAAc,+FAA+F,CAAC;AAC9G,cAAc,kGAAkG,CAAC;AACjH,cAAc,iEAAiE,CAAC;AAChF,cAAc,2EAA2E,CAAC;AAC1F,cAAc,uFAAuF,CAAC;AACtG,cAAc,kFAAkF,CAAC;AACjG,cAAc,mBAAmB,CAAC;AAElC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AAGnD,cAAc,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,23 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @record
|
|
7
|
-
*/
|
|
8
|
-
export function NavItem() { }
|
|
9
|
-
if (false) {
|
|
10
|
-
/**
|
|
11
|
-
* @return {?}
|
|
12
|
-
*/
|
|
13
|
-
NavItem.prototype.title = function () { };
|
|
14
|
-
/**
|
|
15
|
-
* @return {?}
|
|
16
|
-
*/
|
|
17
|
-
NavItem.prototype.icon = function () { };
|
|
18
|
-
/**
|
|
19
|
-
* @return {?}
|
|
20
|
-
*/
|
|
21
|
-
NavItem.prototype.tooltip = function () { };
|
|
22
|
-
}
|
|
23
1
|
//# sourceMappingURL=nav-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-item.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/nav-item.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nav-item.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/nav-item.ts"],"names":[],"mappings":"","sourcesContent":["export interface NavItem {\n title(): string;\n\n icon?(): string;\n\n tooltip?(): string;\n}\n"]}
|
|
@@ -1,8 +1,4 @@
|
|
|
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, __generator } from "tslib";
|
|
6
2
|
import * as _ from 'lodash';
|
|
7
3
|
/**
|
|
8
4
|
* This class handles the logic around canDeactivate for a given router state transition. It's core responsibilities are:
|
|
@@ -11,56 +7,30 @@ import * as _ from 'lodash';
|
|
|
11
7
|
* of the routing change tree.
|
|
12
8
|
* 3. Automatically handle standard interaction scenarios on the components behalf.
|
|
13
9
|
*/
|
|
14
|
-
var /**
|
|
15
|
-
* This class handles the logic around canDeactivate for a given router state transition. It's core responsibilities are:
|
|
16
|
-
* 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.)
|
|
17
|
-
* 2. Ensure only the primary place component is asked when there are nested places. The primary component is the one at the top
|
|
18
|
-
* of the routing change tree.
|
|
19
|
-
* 3. Automatically handle standard interaction scenarios on the components behalf.
|
|
20
|
-
*/
|
|
21
|
-
PlaceComponentDeactivationHandler = /** @class */ (function () {
|
|
10
|
+
var PlaceComponentDeactivationHandler = /** @class */ (function () {
|
|
22
11
|
function PlaceComponentDeactivationHandler(component, navigationSession, isPrimaryComponent) {
|
|
23
12
|
this.component = component;
|
|
24
13
|
this.navigationSession = navigationSession;
|
|
25
14
|
this.isPrimaryComponent = isPrimaryComponent;
|
|
26
15
|
}
|
|
27
16
|
Object.defineProperty(PlaceComponentDeactivationHandler.prototype, "routerInteractionAdapter", {
|
|
28
|
-
get:
|
|
29
|
-
* @return {?}
|
|
30
|
-
*/
|
|
31
|
-
function () {
|
|
17
|
+
get: function () {
|
|
32
18
|
return this.navigationSession.interactionServiceAdapter;
|
|
33
19
|
},
|
|
34
20
|
enumerable: true,
|
|
35
21
|
configurable: true
|
|
36
22
|
});
|
|
37
23
|
Object.defineProperty(PlaceComponentDeactivationHandler.prototype, "urlService", {
|
|
38
|
-
get:
|
|
39
|
-
* @return {?}
|
|
40
|
-
*/
|
|
41
|
-
function () {
|
|
24
|
+
get: function () {
|
|
42
25
|
return this.navigationSession.urlService;
|
|
43
26
|
},
|
|
44
27
|
enumerable: true,
|
|
45
28
|
configurable: true
|
|
46
29
|
});
|
|
47
30
|
// @Trace()
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* @param {?} nextState
|
|
52
|
-
* @return {?}
|
|
53
|
-
*/
|
|
54
|
-
PlaceComponentDeactivationHandler.prototype.canDeactivate =
|
|
55
|
-
// @Trace()
|
|
56
|
-
/**
|
|
57
|
-
* @param {?} currentUrl
|
|
58
|
-
* @param {?} nextState
|
|
59
|
-
* @return {?}
|
|
60
|
-
*/
|
|
61
|
-
function (currentUrl, nextState) {
|
|
62
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
63
|
-
return tslib_1.__generator(this, function (_a) {
|
|
31
|
+
PlaceComponentDeactivationHandler.prototype.canDeactivate = function (currentUrl, nextState) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
33
|
+
return __generator(this, function (_a) {
|
|
64
34
|
// We'll get called multiple times if there's any parameter sanitisation so
|
|
65
35
|
// we always return true if we accepted promise from a previous cycle of the current
|
|
66
36
|
// navigation session.
|
|
@@ -73,25 +43,10 @@ PlaceComponentDeactivationHandler = /** @class */ (function () {
|
|
|
73
43
|
});
|
|
74
44
|
};
|
|
75
45
|
// @Trace()
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
* @protected
|
|
79
|
-
* @param {?} currentUrl
|
|
80
|
-
* @param {?} nextState
|
|
81
|
-
* @return {?}
|
|
82
|
-
*/
|
|
83
|
-
PlaceComponentDeactivationHandler.prototype.canDeactivateComponent =
|
|
84
|
-
// @Trace()
|
|
85
|
-
/**
|
|
86
|
-
* @protected
|
|
87
|
-
* @param {?} currentUrl
|
|
88
|
-
* @param {?} nextState
|
|
89
|
-
* @return {?}
|
|
90
|
-
*/
|
|
91
|
-
function (currentUrl, nextState) {
|
|
92
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
46
|
+
PlaceComponentDeactivationHandler.prototype.canDeactivateComponent = function (currentUrl, nextState) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
93
48
|
var routeIds, currentIds;
|
|
94
|
-
return
|
|
49
|
+
return __generator(this, function (_a) {
|
|
95
50
|
switch (_a.label) {
|
|
96
51
|
case 0:
|
|
97
52
|
if (!this.navigationSession.isPopState) return [3 /*break*/, 5];
|
|
@@ -131,17 +86,7 @@ PlaceComponentDeactivationHandler = /** @class */ (function () {
|
|
|
131
86
|
});
|
|
132
87
|
});
|
|
133
88
|
};
|
|
134
|
-
|
|
135
|
-
* @protected
|
|
136
|
-
* @param {?} nextState
|
|
137
|
-
* @return {?}
|
|
138
|
-
*/
|
|
139
|
-
PlaceComponentDeactivationHandler.prototype.isNotJustAChangeInRouteId = /**
|
|
140
|
-
* @protected
|
|
141
|
-
* @param {?} nextState
|
|
142
|
-
* @return {?}
|
|
143
|
-
*/
|
|
144
|
-
function (nextState) {
|
|
89
|
+
PlaceComponentDeactivationHandler.prototype.isNotJustAChangeInRouteId = function (nextState) {
|
|
145
90
|
// Because places with a route-id cover two route segments we get asked to deactivate
|
|
146
91
|
// if the route id is added or removed. So if our path is still present the url
|
|
147
92
|
// then we shouldn't deactivate the place.
|
|
@@ -149,25 +94,5 @@ PlaceComponentDeactivationHandler = /** @class */ (function () {
|
|
|
149
94
|
};
|
|
150
95
|
return PlaceComponentDeactivationHandler;
|
|
151
96
|
}());
|
|
152
|
-
/**
|
|
153
|
-
* This class handles the logic around canDeactivate for a given router state transition. It's core responsibilities are:
|
|
154
|
-
* 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.)
|
|
155
|
-
* 2. Ensure only the primary place component is asked when there are nested places. The primary component is the one at the top
|
|
156
|
-
* of the routing change tree.
|
|
157
|
-
* 3. Automatically handle standard interaction scenarios on the components behalf.
|
|
158
|
-
*/
|
|
159
97
|
export { PlaceComponentDeactivationHandler };
|
|
160
|
-
if (false) {
|
|
161
|
-
/**
|
|
162
|
-
* @type {?}
|
|
163
|
-
* @private
|
|
164
|
-
*/
|
|
165
|
-
PlaceComponentDeactivationHandler.prototype.canDeactivatePromise;
|
|
166
|
-
/** @type {?} */
|
|
167
|
-
PlaceComponentDeactivationHandler.prototype.component;
|
|
168
|
-
/** @type {?} */
|
|
169
|
-
PlaceComponentDeactivationHandler.prototype.navigationSession;
|
|
170
|
-
/** @type {?} */
|
|
171
|
-
PlaceComponentDeactivationHandler.prototype.isPrimaryComponent;
|
|
172
|
-
}
|
|
173
98
|
//# sourceMappingURL=place-component-deactivation-handler.js.map
|