@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,21 +1,14 @@
|
|
|
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, __decorate, __extends, __generator, __metadata } from "tslib";
|
|
6
2
|
import { Component, Input, QueryList, ViewChild, ViewChildren } from '@angular/core';
|
|
7
|
-
import { MatTabGroup } from '@angular/material';
|
|
3
|
+
import { MatTabGroup } from '@angular/material/tabs';
|
|
8
4
|
import { assert, Dsl, GarbageCollector, Trace } from '@coolon/pectin';
|
|
9
5
|
import { lang } from '@coolon/typescript-utilities';
|
|
10
6
|
import _ from 'lodash';
|
|
11
7
|
import { AbstractInteractionContext } from '../../abstract-interaction-context';
|
|
12
8
|
import { ActivityRef } from '../../activity-ref';
|
|
13
9
|
import { ActivityOutletComponent } from './activity-outlet/activity-outlet.component';
|
|
14
|
-
/**
|
|
15
|
-
* @template D, R, E
|
|
16
|
-
*/
|
|
17
10
|
var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
18
|
-
|
|
11
|
+
__extends(ActivityContainerComponent, _super);
|
|
19
12
|
function ActivityContainerComponent() {
|
|
20
13
|
var _this = _super.call(this) || this;
|
|
21
14
|
_this.dynamicHeight = false;
|
|
@@ -23,39 +16,14 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
23
16
|
_this.garbage = new GarbageCollector();
|
|
24
17
|
return _this;
|
|
25
18
|
}
|
|
26
|
-
|
|
27
|
-
* @return {?}
|
|
28
|
-
*/
|
|
29
|
-
ActivityContainerComponent.prototype.ngOnInit = /**
|
|
30
|
-
* @return {?}
|
|
31
|
-
*/
|
|
32
|
-
function () {
|
|
19
|
+
ActivityContainerComponent.prototype.ngOnInit = function () {
|
|
33
20
|
};
|
|
34
|
-
|
|
35
|
-
* @return {?}
|
|
36
|
-
*/
|
|
37
|
-
ActivityContainerComponent.prototype.ngAfterViewInit = /**
|
|
38
|
-
* @return {?}
|
|
39
|
-
*/
|
|
40
|
-
function () {
|
|
21
|
+
ActivityContainerComponent.prototype.ngAfterViewInit = function () {
|
|
41
22
|
var _this = this;
|
|
42
23
|
var _a = Dsl.disposeWith(this), chain = _a.chain, observe = _a.observe;
|
|
43
|
-
observe.valuesFrom(this.tabs.animationDone).subscribe((
|
|
44
|
-
* @return {?}
|
|
45
|
-
*/
|
|
46
|
-
function () { return _this.onAnimationFinished(); }));
|
|
24
|
+
observe.valuesFrom(this.tabs.animationDone).subscribe(function () { return _this.onAnimationFinished(); });
|
|
47
25
|
};
|
|
48
|
-
|
|
49
|
-
* @param {?} identifier
|
|
50
|
-
* @param {?} api
|
|
51
|
-
* @return {?}
|
|
52
|
-
*/
|
|
53
|
-
ActivityContainerComponent.prototype.initialise = /**
|
|
54
|
-
* @param {?} identifier
|
|
55
|
-
* @param {?} api
|
|
56
|
-
* @return {?}
|
|
57
|
-
*/
|
|
58
|
-
function (identifier, api) {
|
|
26
|
+
ActivityContainerComponent.prototype.initialise = function (identifier, api) {
|
|
59
27
|
assert.isFalsey(this.isInitialised());
|
|
60
28
|
assert.notNil(identifier);
|
|
61
29
|
assert.notNil(api);
|
|
@@ -63,100 +31,45 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
63
31
|
this.interactionServiceApi = api;
|
|
64
32
|
};
|
|
65
33
|
Object.defineProperty(ActivityContainerComponent.prototype, "identifier", {
|
|
66
|
-
get:
|
|
67
|
-
* @return {?}
|
|
68
|
-
*/
|
|
69
|
-
function () {
|
|
34
|
+
get: function () {
|
|
70
35
|
return this._identifier;
|
|
71
36
|
},
|
|
72
37
|
enumerable: true,
|
|
73
38
|
configurable: true
|
|
74
39
|
});
|
|
75
|
-
|
|
76
|
-
* @return {?}
|
|
77
|
-
*/
|
|
78
|
-
ActivityContainerComponent.prototype.isInitialised = /**
|
|
79
|
-
* @return {?}
|
|
80
|
-
*/
|
|
81
|
-
function () {
|
|
40
|
+
ActivityContainerComponent.prototype.isInitialised = function () {
|
|
82
41
|
return !!this.identifier;
|
|
83
42
|
};
|
|
84
43
|
/**
|
|
85
44
|
* Returns true if an activity is currently running.
|
|
86
45
|
*/
|
|
87
|
-
|
|
88
|
-
* Returns true if an activity is currently running.
|
|
89
|
-
* @return {?}
|
|
90
|
-
*/
|
|
91
|
-
ActivityContainerComponent.prototype.isActive = /**
|
|
92
|
-
* Returns true if an activity is currently running.
|
|
93
|
-
* @return {?}
|
|
94
|
-
*/
|
|
95
|
-
function () {
|
|
46
|
+
ActivityContainerComponent.prototype.isActive = function () {
|
|
96
47
|
return this.getActiveActivityCount() > 0;
|
|
97
48
|
};
|
|
98
|
-
|
|
99
|
-
* @template T
|
|
100
|
-
* @param {?} disposable
|
|
101
|
-
* @return {?}
|
|
102
|
-
*/
|
|
103
|
-
ActivityContainerComponent.prototype.registerDisposable = /**
|
|
104
|
-
* @template T
|
|
105
|
-
* @param {?} disposable
|
|
106
|
-
* @return {?}
|
|
107
|
-
*/
|
|
108
|
-
function (disposable) {
|
|
49
|
+
ActivityContainerComponent.prototype.registerDisposable = function (disposable) {
|
|
109
50
|
return this.garbage.registerDisposable(disposable);
|
|
110
51
|
};
|
|
111
|
-
|
|
112
|
-
* @return {?}
|
|
113
|
-
*/
|
|
114
|
-
ActivityContainerComponent.prototype.dispose = /**
|
|
115
|
-
* @return {?}
|
|
116
|
-
*/
|
|
117
|
-
function () {
|
|
52
|
+
ActivityContainerComponent.prototype.dispose = function () {
|
|
118
53
|
// TODO: think about auto cancelling any outstanding activity on dispose.
|
|
119
54
|
// See NavigationState.Navigating for a use-case.
|
|
120
55
|
assert.isFalsey(this.isActive());
|
|
121
56
|
this.garbage.dispose();
|
|
122
57
|
};
|
|
123
|
-
|
|
124
|
-
* @return {?}
|
|
125
|
-
*/
|
|
126
|
-
ActivityContainerComponent.prototype.getActiveActivityRef = /**
|
|
127
|
-
* @return {?}
|
|
128
|
-
*/
|
|
129
|
-
function () {
|
|
58
|
+
ActivityContainerComponent.prototype.getActiveActivityRef = function () {
|
|
130
59
|
if (!this.isActive()) {
|
|
131
60
|
lang.illegalState('no activity in progress');
|
|
132
61
|
}
|
|
133
|
-
return _.findLast(this.activityTabs, (
|
|
134
|
-
* @param {?} tab
|
|
135
|
-
* @return {?}
|
|
136
|
-
*/
|
|
137
|
-
function (tab) { return !tab.isComplete(); }));
|
|
62
|
+
return _.findLast(this.activityTabs, function (tab) { return !tab.isComplete(); });
|
|
138
63
|
};
|
|
139
64
|
/**
|
|
140
65
|
* Cancels the current activity and returns true the context is no longer active, false if
|
|
141
66
|
* there is still another activity running.
|
|
142
67
|
*/
|
|
143
68
|
// @Trace()
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
* there is still another activity running.
|
|
147
|
-
* @return {?}
|
|
148
|
-
*/
|
|
149
|
-
// @Trace()
|
|
150
|
-
ActivityContainerComponent.prototype.cancelActiveActivity = /**
|
|
151
|
-
* Cancels the current activity and returns true the context is no longer active, false if
|
|
152
|
-
* there is still another activity running.
|
|
153
|
-
* @return {?}
|
|
154
|
-
*/
|
|
155
|
-
// @Trace()
|
|
156
|
-
function () {
|
|
157
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
69
|
+
ActivityContainerComponent.prototype.cancelActiveActivity = function () {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
158
71
|
var activity;
|
|
159
|
-
return
|
|
72
|
+
return __generator(this, function (_a) {
|
|
160
73
|
activity = this.getActiveActivityRef();
|
|
161
74
|
activity.cancel();
|
|
162
75
|
if (this.isCleaningUp()) {
|
|
@@ -171,37 +84,10 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
171
84
|
};
|
|
172
85
|
// TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.
|
|
173
86
|
// @Trace()
|
|
174
|
-
|
|
175
|
-
// @Trace()
|
|
176
|
-
/**
|
|
177
|
-
* @protected
|
|
178
|
-
* @template D1, R1, E1
|
|
179
|
-
* @param {?} activityType
|
|
180
|
-
* @param {?} data
|
|
181
|
-
* @param {?} disableClose
|
|
182
|
-
* @return {?}
|
|
183
|
-
*/
|
|
184
|
-
ActivityContainerComponent.prototype.createAndLaunchActivity =
|
|
185
|
-
// TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.
|
|
186
|
-
// @Trace()
|
|
187
|
-
/**
|
|
188
|
-
* @protected
|
|
189
|
-
* @template D1, R1, E1
|
|
190
|
-
* @param {?} activityType
|
|
191
|
-
* @param {?} data
|
|
192
|
-
* @param {?} disableClose
|
|
193
|
-
* @return {?}
|
|
194
|
-
*/
|
|
195
|
-
function (activityType, data, disableClose) {
|
|
87
|
+
ActivityContainerComponent.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
196
88
|
var _this = this;
|
|
197
89
|
assert.isTruthy(this.isInitialised()); // make sure we've been initialised
|
|
198
|
-
|
|
199
|
-
/** @type {?} */
|
|
200
|
-
var activityRef = new ActivityRef(activityType, data, (/**
|
|
201
|
-
* @return {?}
|
|
202
|
-
*/
|
|
203
|
-
function () {
|
|
204
|
-
/** @type {?} */
|
|
90
|
+
var activityRef = new ActivityRef(activityType, data, function () {
|
|
205
91
|
var activeActivityCount = _this.getActiveActivityCount() > 0;
|
|
206
92
|
if (activeActivityCount) {
|
|
207
93
|
_this.triggerTabSynchronisation();
|
|
@@ -209,7 +95,7 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
209
95
|
else {
|
|
210
96
|
_this.finishAndStartCleanup();
|
|
211
97
|
}
|
|
212
|
-
})
|
|
98
|
+
});
|
|
213
99
|
this.launchActivity(activityRef);
|
|
214
100
|
// if this is the first activity let the interaction service know.
|
|
215
101
|
if (this.activityTabs.length === 1) {
|
|
@@ -218,47 +104,19 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
218
104
|
}
|
|
219
105
|
return activityRef.activityResult;
|
|
220
106
|
};
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
* @return {?}
|
|
224
|
-
*/
|
|
225
|
-
ActivityContainerComponent.prototype.getActiveActivityCount = /**
|
|
226
|
-
* @private
|
|
227
|
-
* @return {?}
|
|
228
|
-
*/
|
|
229
|
-
function () {
|
|
230
|
-
return this.activityTabs.filter((/**
|
|
231
|
-
* @param {?} ref
|
|
232
|
-
* @return {?}
|
|
233
|
-
*/
|
|
234
|
-
function (ref) { return !ref.isComplete(); })).length;
|
|
107
|
+
ActivityContainerComponent.prototype.getActiveActivityCount = function () {
|
|
108
|
+
return this.activityTabs.filter(function (ref) { return !ref.isComplete(); }).length;
|
|
235
109
|
};
|
|
236
110
|
/**
|
|
237
111
|
* Checks if this interaction context has finished an is in the process of waiting
|
|
238
112
|
* for all the infrastructure (including route updates) to be completed.
|
|
239
113
|
*/
|
|
240
|
-
|
|
241
|
-
* Checks if this interaction context has finished an is in the process of waiting
|
|
242
|
-
* for all the infrastructure (including route updates) to be completed.
|
|
243
|
-
* @return {?}
|
|
244
|
-
*/
|
|
245
|
-
ActivityContainerComponent.prototype.isCleaningUp = /**
|
|
246
|
-
* Checks if this interaction context has finished an is in the process of waiting
|
|
247
|
-
* for all the infrastructure (including route updates) to be completed.
|
|
248
|
-
* @return {?}
|
|
249
|
-
*/
|
|
250
|
-
function () {
|
|
114
|
+
ActivityContainerComponent.prototype.isCleaningUp = function () {
|
|
251
115
|
return !!this._deferredCleanUp;
|
|
252
116
|
};
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
ActivityContainerComponent.prototype.waitForInteractionContextCleanupToFinish = /**
|
|
257
|
-
* @return {?}
|
|
258
|
-
*/
|
|
259
|
-
function () {
|
|
260
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
261
|
-
return tslib_1.__generator(this, function (_a) {
|
|
117
|
+
ActivityContainerComponent.prototype.waitForInteractionContextCleanupToFinish = function () {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
119
|
+
return __generator(this, function (_a) {
|
|
262
120
|
return [2 /*return*/, this._deferredCleanUp ?
|
|
263
121
|
this._deferredCleanUp :
|
|
264
122
|
true];
|
|
@@ -266,206 +124,82 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
266
124
|
});
|
|
267
125
|
};
|
|
268
126
|
// @Trace()
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* @private
|
|
272
|
-
* @return {?}
|
|
273
|
-
*/
|
|
274
|
-
ActivityContainerComponent.prototype.finishAndStartCleanup =
|
|
275
|
-
// @Trace()
|
|
276
|
-
/**
|
|
277
|
-
* @private
|
|
278
|
-
* @return {?}
|
|
279
|
-
*/
|
|
280
|
-
function () {
|
|
127
|
+
ActivityContainerComponent.prototype.finishAndStartCleanup = function () {
|
|
281
128
|
var _this = this;
|
|
282
129
|
if (!this._deferredCleanUp) {
|
|
283
|
-
/** @type {?} */
|
|
284
130
|
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
285
131
|
this._deferredCleanUp = promise
|
|
286
|
-
.finally((
|
|
287
|
-
* @return {?}
|
|
288
|
-
*/
|
|
289
|
-
function () {
|
|
132
|
+
.finally(function () {
|
|
290
133
|
_this._deferredCleanUp = null;
|
|
291
|
-
})
|
|
134
|
+
});
|
|
292
135
|
}
|
|
293
136
|
};
|
|
294
137
|
// @Trace()
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
* @template D1, R1, E1
|
|
298
|
-
* @param {?} activityRef
|
|
299
|
-
* @return {?}
|
|
300
|
-
*/
|
|
301
|
-
ActivityContainerComponent.prototype.launchActivity =
|
|
302
|
-
// @Trace()
|
|
303
|
-
/**
|
|
304
|
-
* @template D1, R1, E1
|
|
305
|
-
* @param {?} activityRef
|
|
306
|
-
* @return {?}
|
|
307
|
-
*/
|
|
308
|
-
function (activityRef) {
|
|
309
|
-
/** @type {?} */
|
|
310
|
-
var cleanedTabs = this.activityTabs.filter((/**
|
|
311
|
-
* @param {?} tab
|
|
312
|
-
* @return {?}
|
|
313
|
-
*/
|
|
314
|
-
function (tab) { return !tab.isComplete(); }));
|
|
138
|
+
ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
|
|
139
|
+
var cleanedTabs = this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
315
140
|
this.activityTabs = cleanedTabs.concat(activityRef);
|
|
316
141
|
this.tabs.selectedIndex = this.activityTabs.length;
|
|
317
142
|
};
|
|
318
|
-
|
|
319
|
-
* @param {?} index
|
|
320
|
-
* @param {?} activityRef
|
|
321
|
-
* @return {?}
|
|
322
|
-
*/
|
|
323
|
-
ActivityContainerComponent.prototype.activityIndex = /**
|
|
324
|
-
* @param {?} index
|
|
325
|
-
* @param {?} activityRef
|
|
326
|
-
* @return {?}
|
|
327
|
-
*/
|
|
328
|
-
function (index, activityRef) {
|
|
143
|
+
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
329
144
|
return index;
|
|
330
145
|
};
|
|
331
146
|
;
|
|
332
147
|
// @Trace()
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* @private
|
|
336
|
-
* @return {?}
|
|
337
|
-
*/
|
|
338
|
-
ActivityContainerComponent.prototype.onAnimationFinished =
|
|
339
|
-
// @Trace()
|
|
340
|
-
/**
|
|
341
|
-
* @private
|
|
342
|
-
* @return {?}
|
|
343
|
-
*/
|
|
344
|
-
function () {
|
|
148
|
+
ActivityContainerComponent.prototype.onAnimationFinished = function () {
|
|
345
149
|
this.getSelectedOutlet().component.onActivityReady();
|
|
346
|
-
this.activityTabs = this.activityTabs.filter((
|
|
347
|
-
* @param {?} tab
|
|
348
|
-
* @return {?}
|
|
349
|
-
*/
|
|
350
|
-
function (tab) { return !tab.isComplete(); }));
|
|
150
|
+
this.activityTabs = this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
351
151
|
};
|
|
352
152
|
/**
|
|
353
153
|
* Synchronises the selected tab index. Returns true if there was no change to the selected index.
|
|
354
154
|
*/
|
|
355
155
|
// @Trace()
|
|
356
|
-
|
|
357
|
-
* Synchronises the selected tab index. Returns true if there was no change to the selected index.
|
|
358
|
-
* @private
|
|
359
|
-
* @return {?}
|
|
360
|
-
*/
|
|
361
|
-
// @Trace()
|
|
362
|
-
ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = /**
|
|
363
|
-
* Synchronises the selected tab index. Returns true if there was no change to the selected index.
|
|
364
|
-
* @private
|
|
365
|
-
* @return {?}
|
|
366
|
-
*/
|
|
367
|
-
// @Trace()
|
|
368
|
-
function () {
|
|
369
|
-
/** @type {?} */
|
|
156
|
+
ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = function () {
|
|
370
157
|
var previousIndex = this.tabs.selectedIndex;
|
|
371
|
-
/** @type {?} */
|
|
372
158
|
var newIndex = this.getActiveActivityCount() - 1;
|
|
373
159
|
this.tabs.selectedIndex = newIndex;
|
|
374
160
|
return previousIndex === newIndex;
|
|
375
161
|
};
|
|
376
|
-
|
|
377
|
-
* @private
|
|
378
|
-
* @return {?}
|
|
379
|
-
*/
|
|
380
|
-
ActivityContainerComponent.prototype.getSelectedOutlet = /**
|
|
381
|
-
* @private
|
|
382
|
-
* @return {?}
|
|
383
|
-
*/
|
|
384
|
-
function () {
|
|
162
|
+
ActivityContainerComponent.prototype.getSelectedOutlet = function () {
|
|
385
163
|
return this.activityOutlets.toArray()[this.tabs.selectedIndex];
|
|
386
164
|
};
|
|
387
165
|
// @Trace()
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* @private
|
|
391
|
-
* @return {?}
|
|
392
|
-
*/
|
|
393
|
-
ActivityContainerComponent.prototype.triggerTabSynchronisation =
|
|
394
|
-
// @Trace()
|
|
395
|
-
/**
|
|
396
|
-
* @private
|
|
397
|
-
* @return {?}
|
|
398
|
-
*/
|
|
399
|
-
function () {
|
|
166
|
+
ActivityContainerComponent.prototype.triggerTabSynchronisation = function () {
|
|
400
167
|
var _this = this;
|
|
401
168
|
if (this.syncSelectedTabTimeout) {
|
|
402
169
|
clearTimeout(this.syncSelectedTabTimeout);
|
|
403
170
|
}
|
|
404
|
-
this.syncSelectedTabTimeout = setTimeout((
|
|
405
|
-
* @return {?}
|
|
406
|
-
*/
|
|
407
|
-
function () {
|
|
171
|
+
this.syncSelectedTabTimeout = setTimeout(function () {
|
|
408
172
|
_this.syncSelectedTabTimeout = null;
|
|
409
173
|
_this.synchroniseSelectedTabIndex();
|
|
410
|
-
}
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
};
|
|
426
|
-
tslib_1.__decorate([
|
|
174
|
+
}, 75);
|
|
175
|
+
};
|
|
176
|
+
__decorate([
|
|
177
|
+
Input(),
|
|
178
|
+
__metadata("design:type", Object)
|
|
179
|
+
], ActivityContainerComponent.prototype, "dynamicHeight", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
ViewChild('tabs', { static: true }),
|
|
182
|
+
__metadata("design:type", MatTabGroup)
|
|
183
|
+
], ActivityContainerComponent.prototype, "tabs", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
ViewChildren(ActivityOutletComponent),
|
|
186
|
+
__metadata("design:type", QueryList)
|
|
187
|
+
], ActivityContainerComponent.prototype, "activityOutlets", void 0);
|
|
188
|
+
__decorate([
|
|
427
189
|
Trace(),
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
190
|
+
__metadata("design:type", Function),
|
|
191
|
+
__metadata("design:paramtypes", []),
|
|
192
|
+
__metadata("design:returntype", void 0)
|
|
431
193
|
], ActivityContainerComponent.prototype, "dispose", null);
|
|
194
|
+
ActivityContainerComponent = __decorate([
|
|
195
|
+
Component({
|
|
196
|
+
selector: 'aup-activity-container',
|
|
197
|
+
template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"dynamicHeight\" [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; trackBy: activityIndex\" >\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
|
|
198
|
+
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
199
|
+
}),
|
|
200
|
+
__metadata("design:paramtypes", [])
|
|
201
|
+
], ActivityContainerComponent);
|
|
432
202
|
return ActivityContainerComponent;
|
|
433
203
|
}(AbstractInteractionContext));
|
|
434
204
|
export { ActivityContainerComponent };
|
|
435
|
-
if (false) {
|
|
436
|
-
/** @type {?} */
|
|
437
|
-
ActivityContainerComponent.prototype.dynamicHeight;
|
|
438
|
-
/** @type {?} */
|
|
439
|
-
ActivityContainerComponent.prototype.tabs;
|
|
440
|
-
/** @type {?} */
|
|
441
|
-
ActivityContainerComponent.prototype.activityOutlets;
|
|
442
|
-
/** @type {?} */
|
|
443
|
-
ActivityContainerComponent.prototype.activityTabs;
|
|
444
|
-
/**
|
|
445
|
-
* @type {?}
|
|
446
|
-
* @private
|
|
447
|
-
*/
|
|
448
|
-
ActivityContainerComponent.prototype._identifier;
|
|
449
|
-
/**
|
|
450
|
-
* @type {?}
|
|
451
|
-
* @private
|
|
452
|
-
*/
|
|
453
|
-
ActivityContainerComponent.prototype._deferredCleanUp;
|
|
454
|
-
/**
|
|
455
|
-
* @type {?}
|
|
456
|
-
* @private
|
|
457
|
-
*/
|
|
458
|
-
ActivityContainerComponent.prototype.interactionServiceApi;
|
|
459
|
-
/**
|
|
460
|
-
* @type {?}
|
|
461
|
-
* @private
|
|
462
|
-
*/
|
|
463
|
-
ActivityContainerComponent.prototype.garbage;
|
|
464
|
-
/**
|
|
465
|
-
* @type {?}
|
|
466
|
-
* @private
|
|
467
|
-
*/
|
|
468
|
-
ActivityContainerComponent.prototype.syncSelectedTabTimeout;
|
|
469
|
-
/* Skipping unhandled member: ;*/
|
|
470
|
-
}
|
|
471
205
|
//# sourceMappingURL=activity-container.component.js.map
|
package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-container.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/activity-container/activity-container.component.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAiB,SAAS,EAAE,KAAK,EAAU,SAAS,EAAE,SAAS,EAAE,YAAY,E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AAC,eAAe,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACjE,CAAC;IAED,WAAW;;;;;;IACH,8DAAyB;;;;;;IAAjC;QAAA,iBAQC;QAPC,IAAI,IAAI,CAAC,sBAAsB,EAAE;YAC/B,YAAY,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;SAC3C;QACD,IAAI,CAAC,sBAAsB,GAAG,UAAU;;;QAAC;YACvC,KAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;YACnC,KAAI,CAAC,2BAA2B,EAAE,CAAC;QACrC,CAAC,GAAE,EAAE,CAAC,CAAC;IACT,CAAC;;gBA3LF,SAAS,SAAC;oBACT,QAAQ,EAAE,wBAAwB;oBAClC,mVAAkD;;iBAEnD;;;;;gCAGE,KAAK;uBAGL,SAAS,SAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;kCAGlC,YAAY,SAAC,uBAAuB;;IAqDrC;QADC,KAAK,EAAE;;;;6DAMP;IAqHH,iCAAC;CAAA,AA5LD,CAKyD,0BAA0B,GAuLlF;SAvLY,0BAA0B;;;IAErC,mDACsB;;IAEtB,0CACkB;;IAElB,qDACmE;;IAEnE,kDAAgD;;;;;IAEhD,iDAA4B;;;;;IAC5B,sDAAuC;;;;;IAEvC,2DAAsD;;;;;IAEtD,6CAAyC;;;;;IACzC,4DAAoC","sourcesContent":["import { AfterViewInit, Component, Input, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { MatTabGroup } from '@angular/material';\nimport { assert, Constructable, Disposable, Dsl, GarbageCollector, Trace, ValueModel } from '@coolon/pectin';\nimport { lang } from '@coolon/typescript-utilities';\nimport _ from 'lodash';\nimport { AbstractInteractionContext } from '../../abstract-interaction-context';\nimport { Activity } from '../../activity';\nimport { ActivityRef } from '../../activity-ref';\nimport { InteractionService } from '../../services/interaction.service';\nimport { ActivityOutletComponent } from './activity-outlet/activity-outlet.component';\n\n@Component({\n selector: 'aup-activity-container',\n templateUrl: './activity-container.component.html',\n styleUrls: ['./activity-container.component.scss']\n})\nexport class ActivityContainerComponent<D, R, E> extends AbstractInteractionContext implements OnInit, AfterViewInit {\n\n @Input()\n dynamicHeight = false;\n\n @ViewChild('tabs', { static: true })\n tabs: MatTabGroup;\n\n @ViewChildren(ActivityOutletComponent)\n activityOutlets: QueryList<ActivityOutletComponent<any, any, any>>;\n\n activityTabs: ActivityRef<any, any, any>[] = [];\n\n private _identifier: string;\n private _deferredCleanUp: Promise<any>;\n\n private interactionServiceApi: InteractionService.Api;\n\n private garbage = new GarbageCollector();\n private syncSelectedTabTimeout: any;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n ngAfterViewInit(): void {\n const { chain, observe } = Dsl.disposeWith(this);\n observe.valuesFrom(this.tabs.animationDone).subscribe(() => this.onAnimationFinished());\n }\n\n initialise(identifier: string, api: InteractionService.Api) {\n assert.isFalsey(this.isInitialised());\n assert.notNil(identifier);\n assert.notNil(api);\n this._identifier = identifier;\n this.interactionServiceApi = api;\n }\n\n get identifier() {\n return this._identifier;\n }\n\n isInitialised() {\n return !!this.identifier;\n }\n\n /**\n * Returns true if an activity is currently running.\n */\n isActive(): boolean {\n return this.getActiveActivityCount() > 0;\n }\n\n registerDisposable<T extends Disposable>(disposable: T): T {\n return this.garbage.registerDisposable(disposable);\n }\n\n @Trace()\n dispose(): void {\n // TODO: think about auto cancelling any outstanding activity on dispose.\n // See NavigationState.Navigating for a use-case.\n assert.isFalsey(this.isActive());\n this.garbage.dispose();\n }\n\n getActiveActivityRef(): ActivityRef<any, any, any> {\n if (!this.isActive()) {\n lang.illegalState('no activity in progress');\n }\n return _.findLast(this.activityTabs, tab => !tab.isComplete());\n }\n\n /**\n * Cancels the current activity and returns true the context is no longer active, false if\n * there is still another activity running.\n */\n // @Trace()\n async cancelActiveActivity(): Promise<boolean> {\n const activity = this.getActiveActivityRef();\n activity.cancel();\n if (this.isCleaningUp()) {\n return this.waitForInteractionContextCleanupToFinish();\n } else {\n return !this.isActive();\n }\n }\n\n // TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.\n // @Trace()\n protected createAndLaunchActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data: D1, disableClose: boolean): Promise<R1> {\n assert.isTruthy(this.isInitialised()); // make sure we've been initialised\n const activityRef = new ActivityRef<D1, R1, E1>(activityType, data, () => {\n const activeActivityCount = this.getActiveActivityCount() > 0;\n if (activeActivityCount) {\n this.triggerTabSynchronisation();\n } else {\n this.finishAndStartCleanup();\n }\n });\n this.launchActivity(activityRef);\n // if this is the first activity let the interaction service know.\n if (this.activityTabs.length === 1) {\n // console.log('Now active!!!');\n this.interactionServiceApi.notifyActive(this);\n }\n return activityRef.activityResult;\n }\n\n private getActiveActivityCount(): number {\n return this.activityTabs.filter(ref => !ref.isComplete()).length;\n }\n\n /**\n * Checks if this interaction context has finished an is in the process of waiting\n * for all the infrastructure (including route updates) to be completed.\n */\n isCleaningUp(): boolean {\n return !!this._deferredCleanUp;\n }\n\n async waitForInteractionContextCleanupToFinish(): Promise<any> {\n return this._deferredCleanUp ?\n this._deferredCleanUp :\n true;\n }\n\n // @Trace()\n private finishAndStartCleanup(): void {\n if (!this._deferredCleanUp) {\n const promise = this.interactionServiceApi.notifyFinished(this);\n this._deferredCleanUp = promise\n .finally(() => {\n this._deferredCleanUp = null;\n });\n }\n }\n\n// @Trace()\n launchActivity<D1, R1, E1>(activityRef: ActivityRef<D1, R1, E1>) {\n const cleanedTabs = this.activityTabs.filter(tab => !tab.isComplete());\n this.activityTabs = cleanedTabs.concat(activityRef);\n this.tabs.selectedIndex = this.activityTabs.length;\n }\n\n activityIndex(index: number, activityRef: ActivityRef<any, any, any>) {\n return index;\n };\n\n\n // @Trace()\n private onAnimationFinished() {\n this.getSelectedOutlet().component.onActivityReady();\n this.activityTabs = this.activityTabs.filter(tab => !tab.isComplete());\n }\n\n /**\n * Synchronises the selected tab index. Returns true if there was no change to the selected index.\n */\n // @Trace()\n private synchroniseSelectedTabIndex(): boolean {\n const previousIndex = this.tabs.selectedIndex;\n const newIndex = this.getActiveActivityCount() - 1;\n this.tabs.selectedIndex = newIndex;\n return previousIndex === newIndex;\n }\n\n private getSelectedOutlet() {\n return this.activityOutlets.toArray()[this.tabs.selectedIndex];\n }\n\n // @Trace()\n private triggerTabSynchronisation() {\n if (this.syncSelectedTabTimeout) {\n clearTimeout(this.syncSelectedTabTimeout);\n }\n this.syncSelectedTabTimeout = setTimeout(() => {\n this.syncSelectedTabTimeout = null;\n this.synchroniseSelectedTabIndex();\n }, 75);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"activity-container.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/activity-container/activity-container.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAiB,SAAS,EAAE,KAAK,EAAU,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,MAAM,EAA6B,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAc,MAAM,gBAAgB,CAAC;AAC7G,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAOtF;IAAyD,8CAA0B;IAqBjF;QAAA,YACE,iBAAO,SACR;QApBD,mBAAa,GAAG,KAAK,CAAC;QAQtB,kBAAY,GAAiC,EAAE,CAAC;QAOxC,aAAO,GAAG,IAAI,gBAAgB,EAAE,CAAC;;IAKzC,CAAC;IAED,6CAAQ,GAAR;IACA,CAAC;IAED,oDAAe,GAAf;QAAA,iBAGC;QAF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ourcesContent":["import { AfterViewInit, Component, Input, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { MatTabGroup } from '@angular/material/tabs';\nimport { assert, Constructable, Disposable, Dsl, GarbageCollector, Trace, ValueModel } from '@coolon/pectin';\nimport { lang } from '@coolon/typescript-utilities';\nimport _ from 'lodash';\nimport { AbstractInteractionContext } from '../../abstract-interaction-context';\nimport { Activity } from '../../activity';\nimport { ActivityRef } from '../../activity-ref';\nimport { InteractionService } from '../../services/interaction.service';\nimport { ActivityOutletComponent } from './activity-outlet/activity-outlet.component';\n\n@Component({\n selector: 'aup-activity-container',\n templateUrl: './activity-container.component.html',\n styleUrls: ['./activity-container.component.scss']\n})\nexport class ActivityContainerComponent<D, R, E> extends AbstractInteractionContext implements OnInit, AfterViewInit {\n\n @Input()\n dynamicHeight = false;\n\n @ViewChild('tabs', { static: true })\n tabs: MatTabGroup;\n\n @ViewChildren(ActivityOutletComponent)\n activityOutlets: QueryList<ActivityOutletComponent<any, any, any>>;\n\n activityTabs: ActivityRef<any, any, any>[] = [];\n\n private _identifier: string;\n private _deferredCleanUp: Promise<any>;\n\n private interactionServiceApi: InteractionService.Api;\n\n private garbage = new GarbageCollector();\n private syncSelectedTabTimeout: any;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n ngAfterViewInit(): void {\n const { chain, observe } = Dsl.disposeWith(this);\n observe.valuesFrom(this.tabs.animationDone).subscribe(() => this.onAnimationFinished());\n }\n\n initialise(identifier: string, api: InteractionService.Api) {\n assert.isFalsey(this.isInitialised());\n assert.notNil(identifier);\n assert.notNil(api);\n this._identifier = identifier;\n this.interactionServiceApi = api;\n }\n\n get identifier() {\n return this._identifier;\n }\n\n isInitialised() {\n return !!this.identifier;\n }\n\n /**\n * Returns true if an activity is currently running.\n */\n isActive(): boolean {\n return this.getActiveActivityCount() > 0;\n }\n\n registerDisposable<T extends Disposable>(disposable: T): T {\n return this.garbage.registerDisposable(disposable);\n }\n\n @Trace()\n dispose(): void {\n // TODO: think about auto cancelling any outstanding activity on dispose.\n // See NavigationState.Navigating for a use-case.\n assert.isFalsey(this.isActive());\n this.garbage.dispose();\n }\n\n getActiveActivityRef(): ActivityRef<any, any, any> {\n if (!this.isActive()) {\n lang.illegalState('no activity in progress');\n }\n return _.findLast(this.activityTabs, tab => !tab.isComplete());\n }\n\n /**\n * Cancels the current activity and returns true the context is no longer active, false if\n * there is still another activity running.\n */\n // @Trace()\n async cancelActiveActivity(): Promise<boolean> {\n const activity = this.getActiveActivityRef();\n activity.cancel();\n if (this.isCleaningUp()) {\n return this.waitForInteractionContextCleanupToFinish();\n } else {\n return !this.isActive();\n }\n }\n\n // TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.\n // @Trace()\n protected createAndLaunchActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data: D1, disableClose: boolean): Promise<R1> {\n assert.isTruthy(this.isInitialised()); // make sure we've been initialised\n const activityRef = new ActivityRef<D1, R1, E1>(activityType, data, () => {\n const activeActivityCount = this.getActiveActivityCount() > 0;\n if (activeActivityCount) {\n this.triggerTabSynchronisation();\n } else {\n this.finishAndStartCleanup();\n }\n });\n this.launchActivity(activityRef);\n // if this is the first activity let the interaction service know.\n if (this.activityTabs.length === 1) {\n // console.log('Now active!!!');\n this.interactionServiceApi.notifyActive(this);\n }\n return activityRef.activityResult;\n }\n\n private getActiveActivityCount(): number {\n return this.activityTabs.filter(ref => !ref.isComplete()).length;\n }\n\n /**\n * Checks if this interaction context has finished an is in the process of waiting\n * for all the infrastructure (including route updates) to be completed.\n */\n isCleaningUp(): boolean {\n return !!this._deferredCleanUp;\n }\n\n async waitForInteractionContextCleanupToFinish(): Promise<any> {\n return this._deferredCleanUp ?\n this._deferredCleanUp :\n true;\n }\n\n // @Trace()\n private finishAndStartCleanup(): void {\n if (!this._deferredCleanUp) {\n const promise = this.interactionServiceApi.notifyFinished(this);\n this._deferredCleanUp = promise\n .finally(() => {\n this._deferredCleanUp = null;\n });\n }\n }\n\n// @Trace()\n launchActivity<D1, R1, E1>(activityRef: ActivityRef<D1, R1, E1>) {\n const cleanedTabs = this.activityTabs.filter(tab => !tab.isComplete());\n this.activityTabs = cleanedTabs.concat(activityRef);\n this.tabs.selectedIndex = this.activityTabs.length;\n }\n\n activityIndex(index: number, activityRef: ActivityRef<any, any, any>) {\n return index;\n };\n\n\n // @Trace()\n private onAnimationFinished() {\n this.getSelectedOutlet().component.onActivityReady();\n this.activityTabs = this.activityTabs.filter(tab => !tab.isComplete());\n }\n\n /**\n * Synchronises the selected tab index. Returns true if there was no change to the selected index.\n */\n // @Trace()\n private synchroniseSelectedTabIndex(): boolean {\n const previousIndex = this.tabs.selectedIndex;\n const newIndex = this.getActiveActivityCount() - 1;\n this.tabs.selectedIndex = newIndex;\n return previousIndex === newIndex;\n }\n\n private getSelectedOutlet() {\n return this.activityOutlets.toArray()[this.tabs.selectedIndex];\n }\n\n // @Trace()\n private triggerTabSynchronisation() {\n if (this.syncSelectedTabTimeout) {\n clearTimeout(this.syncSelectedTabTimeout);\n }\n this.syncSelectedTabTimeout = setTimeout(() => {\n this.syncSelectedTabTimeout = null;\n this.synchroniseSelectedTabIndex();\n }, 75);\n }\n}\n"]}
|