@coolon/angular-ui-powerups 0.0.97 → 0.0.98

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.
Files changed (35) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +99 -241
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  5. package/coolon-angular-ui-powerups.metadata.json +1 -1
  6. package/esm2015/coolon-angular-ui-powerups.js +2 -2
  7. package/esm2015/index.js +2 -2
  8. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +2 -2
  9. package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +6 -5
  10. package/esm2015/lib/place/guards/navigation-state.js +613 -0
  11. package/esm2015/lib/place/guards/place-component-deactivation-handler.js +14 -37
  12. package/esm2015/lib/place/index.js +2 -2
  13. package/esm2015/lib/place/place-router.js +11 -54
  14. package/esm2015/public_api.js +2 -2
  15. package/esm5/coolon-angular-ui-powerups.js +2 -2
  16. package/esm5/index.js +2 -2
  17. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +2 -2
  18. package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +6 -5
  19. package/esm5/lib/place/guards/navigation-state.js +764 -0
  20. package/esm5/lib/place/guards/place-component-deactivation-handler.js +21 -55
  21. package/esm5/lib/place/index.js +2 -2
  22. package/esm5/lib/place/place-router.js +12 -144
  23. package/esm5/public_api.js +2 -2
  24. package/fesm2015/coolon-angular-ui-powerups.js +80 -122
  25. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  26. package/fesm5/coolon-angular-ui-powerups.js +101 -243
  27. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  28. package/lib/interaction/components/activity-container/activity-container.component.d.ts +1 -1
  29. package/lib/place/guards/{navigation-session.d.ts → navigation-state.d.ts} +34 -34
  30. package/lib/place/guards/place-component-deactivation-handler.d.ts +3 -5
  31. package/lib/place/index.d.ts +1 -1
  32. package/lib/place/place-router.d.ts +4 -4
  33. package/package.json +1 -1
  34. package/esm2015/lib/place/guards/navigation-session.js +0 -590
  35. package/esm5/lib/place/guards/navigation-session.js +0 -741
@@ -7,7 +7,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
7
  import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, EventListenerList, DelegatingListModel, Deferred, MutableStream, MutableValueModel, MutableListModel, Binding, Trace, Guard as Guard$1, StoreInValueModel, Command, OptionsHelper, ValueHolder } from '@coolon/pectin';
8
8
  import { __decorate, __metadata, __awaiter } from 'tslib';
9
9
  import { PortalModule } from '@angular/cdk/portal';
10
- import { RouterModule, NavigationStart, NavigationCancel, NavigationEnd, UrlSegment, NavigationError, Router, UrlSerializer, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
10
+ import { RouterModule, NavigationStart, NavigationCancel, NavigationError, NavigationEnd, UrlSegment, Router, UrlSerializer, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
11
11
  import ___default, { last, isNil, isEqual } from 'lodash';
12
12
  import { assert as assert$1, Opts, Klass } from '@coolon/typescript-utilities';
13
13
  import { MatDialogConfig, MatDialog as MatDialog$1, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
@@ -1632,7 +1632,7 @@ class ActivityContainerComponent extends InteractionContextBase {
1632
1632
  * @return {?}
1633
1633
  */
1634
1634
  finishInitialActivity() {
1635
- this._initialActivityOutletContext = null;
1635
+ this._initialActivityOutletContext.value = null;
1636
1636
  this.initialActivityOutletContextEvent.emit(null);
1637
1637
  }
1638
1638
  // @Trace()
@@ -1767,15 +1767,13 @@ if (false) {
1767
1767
  class InplaceInteractionContextComponent extends InteractionContextBase {
1768
1768
  constructor() {
1769
1769
  super();
1770
- this._active = new DelegatingValueModel().withDefault(false);
1771
- const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
1770
+ this._active = new MutableValueModel(false);
1772
1771
  }
1773
1772
  /**
1774
1773
  * @return {?}
1775
1774
  */
1776
1775
  ngAfterViewInit() {
1777
1776
  this.setActivityList(this.interactionContext.activityList);
1778
- this._active.setDelegate(this.interactionContext.active);
1779
1777
  }
1780
1778
  /**
1781
1779
  * @return {?}
@@ -1791,6 +1789,7 @@ class InplaceInteractionContextComponent extends InteractionContextBase {
1791
1789
  * @return {?}
1792
1790
  */
1793
1791
  _startActivity(activityType, data) {
1792
+ this._active.value = true;
1794
1793
  /** @type {?} */
1795
1794
  const self = this;
1796
1795
  return new Promise((/**
@@ -1807,6 +1806,7 @@ class InplaceInteractionContextComponent extends InteractionContextBase {
1807
1806
  * @return {?}
1808
1807
  */
1809
1808
  onDone(result) {
1809
+ self._active.value = false;
1810
1810
  resolve(result);
1811
1811
  },
1812
1812
  /**
@@ -1814,6 +1814,7 @@ class InplaceInteractionContextComponent extends InteractionContextBase {
1814
1814
  * @return {?}
1815
1815
  */
1816
1816
  onCancel(error) {
1817
+ self._active.value = false;
1817
1818
  reject(error);
1818
1819
  }
1819
1820
  };
@@ -3109,32 +3110,22 @@ class PlaceComponentDeactivationHandler {
3109
3110
  */
3110
3111
  canDeactivateComponent(nextState) {
3111
3112
  return __awaiter(this, void 0, void 0, function* () {
3112
- // Automatically cancel any active activities if the navigation session was triggered
3113
- // by the back button.
3113
+ // Automatically cancel any active activities if the navigation session was triggered by the back button.
3114
+ // any other navigations (such as the user clicking a differnt place) must be handled by the component itself
3115
+ // during the canDeativate method. If we handled more than just the pop state then it leads to the UI ignoring
3116
+ // clicks and just cancelling things which is deeply disconcerting.
3114
3117
  if (this.navigationSession.isPopState && this.component.interactionContext && this.component.interactionContext.isActive()) {
3115
- // Note: any modal interactions run in a different router outlet so we should never get place deactivated while
3116
- // one is active. This is because:
3118
+ // Note: Modal interactions are run in a different router outlet so we never get place deactivating while
3119
+ // a model interaction is active. This is because:
3117
3120
  // 1. the user can't click anything to navigate away
3118
- // 2. clicking the back button will only change the outlet route and will leave the component route alone. This
3121
+ // 2. clicking the back button will only change the outlet route portion of the URL. This
3119
3122
  // is all handled by the InteractionGuard and so the component guards will never run.
3120
- // TODO: how will I handle this now??
3121
- // BUT: activities could call navigate while they're still active.. but we'll barf and tell them
3122
- // to call activity.done(newVisitToNavigateTo) and let the caller do the navigate after the
3123
- // dialog has closed.
3124
- // Can I capture this in placeRouter.navigate(..) ? i.e. navigationSession && navigationSession.interactionContext.isActive()
3125
- // Or can I just ignore it altogether?
3126
- // 1. I no longer have a singleton dialog interaction that can be returned from any component in the deactivation cycle.
3127
- // 2. We only ever check the component once per nav cycle
3128
- // 3. The navigation session interaction context will barf if multiple components try and use it at once.
3129
- // if (this.component.interactionContext instanceof DialogInteractionContext) {
3130
- // // BUT: activities could call navigate while they're still active.. but we'll barf and tell them
3131
- // // to call activity.done(newVisitToNavigateTo) and let the caller do the navigate after the
3132
- // // dialog has closed.
3133
- // lang.illegalState('Navigation started from an activity in a modal dialog. Have your activity return a Visit instead and navigate after the activity has finished');
3134
- // }
3135
- // Now we just cancel the current activity and stay where we are
3136
- this.cancelCurrentActivityOf(this.component.interactionContext);
3137
- return false;
3123
+ //
3124
+ // Now we just cancel the current activity...
3125
+ /** @type {?} */
3126
+ const activity = yield this.component.interactionContext.getCurrentActivity();
3127
+ activity.cancel(null);
3128
+ return false; // ..and stay where we are.
3138
3129
  }
3139
3130
  // Ok, so now we're really leaving, so we ask the component if we should.;
3140
3131
  if (this.isNotJustAChangeInRouteId(nextState) && this.component.canDeactivate) {
@@ -3146,19 +3137,6 @@ class PlaceComponentDeactivationHandler {
3146
3137
  return true;
3147
3138
  });
3148
3139
  }
3149
- /**
3150
- * @protected
3151
- * @param {?} interactionContext
3152
- * @return {?}
3153
- */
3154
- cancelCurrentActivityOf(interactionContext) {
3155
- return __awaiter(this, void 0, void 0, function* () {
3156
- /** @type {?} */
3157
- const activity = yield interactionContext.getCurrentActivity();
3158
- console.log('cancelling', { activity });
3159
- activity.cancel(null);
3160
- });
3161
- }
3162
3140
  /**
3163
3141
  * @protected
3164
3142
  * @param {?} nextState
@@ -3190,7 +3168,7 @@ if (false) {
3190
3168
  /**
3191
3169
  * @abstract
3192
3170
  */
3193
- class NavigationSession extends GarbageCollector {
3171
+ class NavigationState extends GarbageCollector {
3194
3172
  /**
3195
3173
  * @param {?} context
3196
3174
  */
@@ -3255,7 +3233,7 @@ class NavigationSession extends GarbageCollector {
3255
3233
  */
3256
3234
  createActiveSession(event) {
3257
3235
  // TODO: check if the event is purely for interaction context changes.
3258
- return new NavigationSession.Active(this.context, event.navigationTrigger === 'popstate', this.currentRouterUrl());
3236
+ return new NavigationState.Active(this.context, event.navigationTrigger === 'popstate', this.currentRouterUrl());
3259
3237
  }
3260
3238
  /**
3261
3239
  * @protected
@@ -3277,57 +3255,57 @@ __decorate([
3277
3255
  __metadata("design:type", Function),
3278
3256
  __metadata("design:paramtypes", [Object]),
3279
3257
  __metadata("design:returntype", void 0)
3280
- ], NavigationSession.prototype, "updateLocation", null);
3258
+ ], NavigationState.prototype, "updateLocation", null);
3281
3259
  if (false) {
3282
3260
  /**
3283
3261
  * @type {?}
3284
3262
  * @private
3285
3263
  */
3286
- NavigationSession.prototype._visits;
3264
+ NavigationState.prototype._visits;
3287
3265
  /** @type {?} */
3288
- NavigationSession.prototype.isPopState;
3266
+ NavigationState.prototype.isPopState;
3289
3267
  /** @type {?} */
3290
- NavigationSession.prototype.active;
3268
+ NavigationState.prototype.active;
3291
3269
  /** @type {?} */
3292
- NavigationSession.prototype.startingUrl;
3270
+ NavigationState.prototype.startingUrl;
3293
3271
  /**
3294
3272
  * @type {?}
3295
3273
  * @protected
3296
3274
  */
3297
- NavigationSession.prototype.context;
3275
+ NavigationState.prototype.context;
3298
3276
  /**
3299
3277
  * @abstract
3300
3278
  * @param {?} event
3301
3279
  * @return {?}
3302
3280
  */
3303
- NavigationSession.prototype.onStart = function (event) { };
3281
+ NavigationState.prototype.onStart = function (event) { };
3304
3282
  /**
3305
3283
  * @abstract
3306
3284
  * @param {?} event
3307
3285
  * @return {?}
3308
3286
  */
3309
- NavigationSession.prototype.onCancel = function (event) { };
3287
+ NavigationState.prototype.onCancel = function (event) { };
3310
3288
  /**
3311
3289
  * @abstract
3312
3290
  * @param {?} event
3313
3291
  * @return {?}
3314
3292
  */
3315
- NavigationSession.prototype.onError = function (event) { };
3293
+ NavigationState.prototype.onError = function (event) { };
3316
3294
  /**
3317
3295
  * @abstract
3318
3296
  * @param {?} event
3319
3297
  * @return {?}
3320
3298
  */
3321
- NavigationSession.prototype.onEnd = function (event) { };
3299
+ NavigationState.prototype.onEnd = function (event) { };
3322
3300
  /**
3323
3301
  * @abstract
3324
3302
  * @param {?} component
3325
3303
  * @param {?} nextState
3326
3304
  * @return {?}
3327
3305
  */
3328
- NavigationSession.prototype.canDeactivatePlace = function (component, nextState) { };
3306
+ NavigationState.prototype.canDeactivatePlace = function (component, nextState) { };
3329
3307
  }
3330
- (function (NavigationSession) {
3308
+ (function (NavigationState) {
3331
3309
  class Context {
3332
3310
  /**
3333
3311
  * @param {?} router
@@ -3342,7 +3320,7 @@ if (false) {
3342
3320
  this.notifySuccess = notifySuccess;
3343
3321
  }
3344
3322
  }
3345
- NavigationSession.Context = Context;
3323
+ NavigationState.Context = Context;
3346
3324
  if (false) {
3347
3325
  /** @type {?} */
3348
3326
  Context.prototype.router;
@@ -3353,7 +3331,7 @@ if (false) {
3353
3331
  /** @type {?} */
3354
3332
  Context.prototype.notifySuccess;
3355
3333
  }
3356
- class Idle extends NavigationSession {
3334
+ class Idle extends NavigationState {
3357
3335
  /**
3358
3336
  * @param {?} context
3359
3337
  */
@@ -3410,7 +3388,7 @@ if (false) {
3410
3388
  return this.illegalTransition(event);
3411
3389
  }
3412
3390
  }
3413
- NavigationSession.Idle = Idle;
3391
+ NavigationState.Idle = Idle;
3414
3392
  if (false) {
3415
3393
  /** @type {?} */
3416
3394
  Idle.prototype.isPopState;
@@ -3419,7 +3397,7 @@ if (false) {
3419
3397
  /** @type {?} */
3420
3398
  Idle.prototype.startingUrl;
3421
3399
  }
3422
- class Active extends NavigationSession {
3400
+ class Active extends NavigationState {
3423
3401
  /**
3424
3402
  * @param {?} context
3425
3403
  * @param {?} isPopState
@@ -3473,8 +3451,13 @@ if (false) {
3473
3451
  * @return {?}
3474
3452
  */
3475
3453
  onCancel(event) {
3476
- // active sessions can have many cancel start cycles.
3477
- return this;
3454
+ if (this.isPopState) { // back button clicked and a guard cancelled
3455
+ // Angular doesn't preserve the url when a guard cancels the back button.
3456
+ // See https://github.com/angular/angular/issues/13586#issuecomment-432795720
3457
+ Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');
3458
+ this.updateLocation(this.startingUrl);
3459
+ }
3460
+ return this.isPopState ? new Idle(this.context) : this;
3478
3461
  }
3479
3462
  /**
3480
3463
  * @param {?} event
@@ -3555,7 +3538,25 @@ if (false) {
3555
3538
  return `${this.constructor.name}(startingUrl: ${this.startingUrl}, isPopState:${this.isPopState})`;
3556
3539
  }
3557
3540
  }
3558
- NavigationSession.Active = Active;
3541
+ __decorate([
3542
+ Trace(),
3543
+ __metadata("design:type", Function),
3544
+ __metadata("design:paramtypes", [NavigationStart]),
3545
+ __metadata("design:returntype", NavigationState)
3546
+ ], Active.prototype, "onStart", null);
3547
+ __decorate([
3548
+ Trace(),
3549
+ __metadata("design:type", Function),
3550
+ __metadata("design:paramtypes", [NavigationCancel]),
3551
+ __metadata("design:returntype", NavigationState)
3552
+ ], Active.prototype, "onCancel", null);
3553
+ __decorate([
3554
+ Trace(),
3555
+ __metadata("design:type", Function),
3556
+ __metadata("design:paramtypes", [NavigationError]),
3557
+ __metadata("design:returntype", NavigationState)
3558
+ ], Active.prototype, "onError", null);
3559
+ NavigationState.Active = Active;
3559
3560
  if (false) {
3560
3561
  /** @type {?} */
3561
3562
  Active.prototype.active;
@@ -3574,7 +3575,7 @@ if (false) {
3574
3575
  /** @type {?} */
3575
3576
  Active.prototype.startingUrl;
3576
3577
  }
3577
- class ModalInteractionSession extends NavigationSession {
3578
+ class ModalInteractionSession extends NavigationState {
3578
3579
  /**
3579
3580
  * @param {?} context
3580
3581
  * @param {?} startingUrl
@@ -3652,21 +3653,21 @@ if (false) {
3652
3653
  Trace(),
3653
3654
  __metadata("design:type", Function),
3654
3655
  __metadata("design:paramtypes", [NavigationStart]),
3655
- __metadata("design:returntype", NavigationSession)
3656
+ __metadata("design:returntype", NavigationState)
3656
3657
  ], ModalInteractionSession.prototype, "onStart", null);
3657
3658
  __decorate([
3658
3659
  Trace(),
3659
3660
  __metadata("design:type", Function),
3660
3661
  __metadata("design:paramtypes", [NavigationCancel]),
3661
- __metadata("design:returntype", NavigationSession)
3662
+ __metadata("design:returntype", NavigationState)
3662
3663
  ], ModalInteractionSession.prototype, "onCancel", null);
3663
3664
  __decorate([
3664
3665
  Trace(),
3665
3666
  __metadata("design:type", Function),
3666
3667
  __metadata("design:paramtypes", [NavigationEnd]),
3667
- __metadata("design:returntype", NavigationSession)
3668
+ __metadata("design:returntype", NavigationState)
3668
3669
  ], ModalInteractionSession.prototype, "onEnd", null);
3669
- NavigationSession.ModalInteractionSession = ModalInteractionSession;
3670
+ NavigationState.ModalInteractionSession = ModalInteractionSession;
3670
3671
  if (false) {
3671
3672
  /** @type {?} */
3672
3673
  ModalInteractionSession.prototype.active;
@@ -3675,7 +3676,7 @@ if (false) {
3675
3676
  /** @type {?} */
3676
3677
  ModalInteractionSession.prototype.startingUrl;
3677
3678
  }
3678
- class CancelledDuringNavigationInteraction extends NavigationSession {
3679
+ class CancelledDuringNavigationInteraction extends NavigationState {
3679
3680
  /**
3680
3681
  * @param {?} context
3681
3682
  * @param {?} startingUrl
@@ -3751,7 +3752,7 @@ if (false) {
3751
3752
  return `${this.constructor.name}(startingUrl: ${this.startingUrl}, locationChangeTriggerUrl:${this.locationChangeTriggerUrl})`;
3752
3753
  }
3753
3754
  }
3754
- NavigationSession.CancelledDuringNavigationInteraction = CancelledDuringNavigationInteraction;
3755
+ NavigationState.CancelledDuringNavigationInteraction = CancelledDuringNavigationInteraction;
3755
3756
  if (false) {
3756
3757
  /** @type {?} */
3757
3758
  CancelledDuringNavigationInteraction.prototype.active;
@@ -3767,7 +3768,7 @@ if (false) {
3767
3768
  /** @type {?} */
3768
3769
  CancelledDuringNavigationInteraction.prototype.locationChangeTriggerUrl;
3769
3770
  }
3770
- })(NavigationSession || (NavigationSession = {}));
3771
+ })(NavigationState || (NavigationState = {}));
3771
3772
 
3772
3773
  /**
3773
3774
  * @fileoverview added by tsickle
@@ -3951,14 +3952,14 @@ class PlaceRouter extends GarbageCollector {
3951
3952
  const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
3952
3953
  this.activeVisitIndex = chain(this._activeVisits).indexBy('placeDefinition');
3953
3954
  this.navigationSessionActive = chain(this.navigationSessionModel).pluck('active');
3954
- this._navigationSessionContext = new NavigationSession.Context(this.router, this.modalInteractionService, this.angularLocation, (/**
3955
+ this._navigationSessionContext = new NavigationState.Context(this.router, this.modalInteractionService, this.angularLocation, (/**
3955
3956
  * @param {?} session
3956
3957
  * @return {?}
3957
3958
  */
3958
3959
  session => {
3959
3960
  this.processNavigationSuccess(session);
3960
3961
  }));
3961
- this._navigationSessionModel.value = new NavigationSession.Idle(this._navigationSessionContext);
3962
+ this._navigationSessionModel.value = new NavigationState.Idle(this._navigationSessionContext);
3962
3963
  // TODO: make setup the callbacks in during module initiation to make this testable.
3963
3964
  this.router.events.subscribe((/**
3964
3965
  * @param {?} event
@@ -4009,7 +4010,7 @@ class PlaceRouter extends GarbageCollector {
4009
4010
  * @return {?}
4010
4011
  */
4011
4012
  url => {
4012
- console.log(`#### url changed -> ${url}`);
4013
+ console.log(`#### url changed ->`, { url, navIsActive: this.navigationSessionActive.value });
4013
4014
  /** @type {?} */
4014
4015
  const interactionContext = this.navigationSessionActive.value && this.navigationSession.interactionContext;
4015
4016
  if (interactionContext && interactionContext.isActive()) {
@@ -4028,6 +4029,9 @@ class PlaceRouter extends GarbageCollector {
4028
4029
  * @return {?}
4029
4030
  */
4030
4031
  processNavigationSuccess(session) {
4032
+ // We need to update the visits before the session finishes. This allows the placeOutets to ignore visit
4033
+ // changes that occur while routerNavigationActive is true.
4034
+ assert.isTruthy(this.navigationSessionActive.value);
4031
4035
  /** @type {?} */
4032
4036
  const visits = session.getVisits();
4033
4037
  visits.forEach((/**
@@ -4035,8 +4039,6 @@ class PlaceRouter extends GarbageCollector {
4035
4039
  * @return {?}
4036
4040
  */
4037
4041
  v => this.placeHistory.add(v)));
4038
- // Update visits before we end the navigation session. This allows the placeOutets to
4039
- // ignore visit changes that occur while the navigation is in progress
4040
4042
  this._activeVisits.value = visits;
4041
4043
  }
4042
4044
  /**
@@ -4124,7 +4126,7 @@ class PlaceRouter extends GarbageCollector {
4124
4126
  */
4125
4127
  current => {
4126
4128
  /** @type {?} */
4127
- const session = new NavigationSession.Active(this._navigationSessionContext, false, this.router.routerState.snapshot.url);
4129
+ const session = new NavigationState.Active(this._navigationSessionContext, false, this.router.routerState.snapshot.url);
4128
4130
  session.storeVisit(visit);
4129
4131
  return session;
4130
4132
  }));
@@ -4172,50 +4174,6 @@ class PlaceRouter extends GarbageCollector {
4172
4174
  [def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
4173
4175
  [def.getFormattedRouteParameters(visit)];
4174
4176
  }
4175
- // private onAngularRouterStarted(event: NavigationStart) {
4176
- // if (!this.navigationSession) {
4177
- // // We been activated by an external route rather than placeRouter.go(visit)
4178
- // this._navigationSessionModel.value = this.createExternalNavigationSession(event);
4179
- // }
4180
- // this.firstRoute = false;
4181
- // }
4182
- //
4183
- // private createExternalNavigationSession(event: NavigationStart) {
4184
- // return new NavigationSession.Active(
4185
- // this.modalInteractionService,
4186
- // this.angularLocation,
4187
- // // event.url,
4188
- // event.navigationTrigger === 'popstate'
4189
- // );
4190
- // }
4191
- // private onAngularRouterFinished(cancelled: boolean) {
4192
- // const session = this._navigationSessionModel.value;
4193
- // if (session.backClickedDuringCanDeactivateInteraction) {
4194
- // // we swallow this finished event but keep the session alive as we're going to
4195
- // // get another route started event, which will trigger anohter canDeactivate dialog
4196
- // // if we start a new session.
4197
- // // session.resetInteractionSession()
4198
- // } else {
4199
- // if (!cancelled) {
4200
- // const visits = session.getVisits();
4201
- // visits.forEach(v => this.placeHistory.add(v));
4202
- // // Update visits before we end the navigation session. This allows the placeOutets to
4203
- // // ignore visit changes that occur while the navigation is in progress
4204
- // this._activeVisits.value = visits;
4205
- // } else {
4206
- // // TODO: move this to the navigation session
4207
- // // Angular doesn't preserve the url when a guard cancels the back button.
4208
- // // See https://github.com/angular/angular/issues/13586#issuecomment-432795720
4209
- // // session.rememberPopStateReturnUrl(this.router.routerState.snapshot.url);
4210
- // if (session.isPopState) {
4211
- // console.log('cancelled during popstate');
4212
- // // this.angularLocation.go(session.previousUrl);
4213
- // }
4214
- // }
4215
- // session.dispose();
4216
- // this._navigationSessionModel.value = null;
4217
- // }
4218
- // }
4219
4177
  /**
4220
4178
  * @param {?} activatedRoute
4221
4179
  * @return {?}
@@ -4329,7 +4287,7 @@ if (false) {
4329
4287
  [PlaceRouter.INTERACTION_ROUTER_OUTLET]: ['modal'] // "open" must be a valid route for this outlet.
4330
4288
  }
4331
4289
  }], {
4332
- replaceUrl: false,
4290
+ replaceUrl: false
4333
4291
  });
4334
4292
  }
4335
4293
  }
@@ -6260,5 +6218,5 @@ if (false) {
6260
6218
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6261
6219
  */
6262
6220
 
6263
- export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractActivity, AbstractInputComponent, AbstractPlaceGuard, AbstractPlaceNavigationComponent, Activity, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionContext, DialogInteractionService, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, FocusBindingDirective, Formatter, InplaceInteractionContextComponent, InteractionContext, InteractionContextBase, InteractionGuard, InteractionModule, InteractionOutletComponent, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ModalInteractionService, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, UrlSnapshot, Visit, VisitParameter, VisitParameterList, VisitSanitiser, leftRightPlaceAnimation, slideDownAndUpAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, ActivityContainerComponent as ɵba, InteractionContextBase as ɵbb, InteractionContext as ɵbc, ActivityOutletComponent as ɵbd, ConfirmationDialogComponent as ɵbe, AbstractActivity as ɵbf, ACTIVITY_DATA as ɵbg, Activity as ɵbh, ConfirmThenDialogComponent as ɵbj, AlertDialogComponent as ɵbk, InteractionOutletComponent as ɵbm, InplaceInteractionContextComponent as ɵbn, DIALOG_INTERACTION_SERVICE_DEFAULTS as ɵbo, DialogInteractionService as ɵbp, FocusBindingDirective as ɵc, DisposableComponent as ɵd, ComponentsModule as ɵe, NumberInputComponent as ɵf, AbstractInputComponent as ɵg, StringInputComponent as ɵh, PasswordInputComponent as ɵi, SelectInputComponent as ɵj, NoopComponent as ɵk, PlaceModule as ɵl, EmptyStateComponent as ɵm, BusyOverlayComponent as ɵn, PlaceOutletComponent as ɵo, leftRightPlaceAnimation as ɵp, LEFT_RIGHT_PLACE_ANIMATION as ɵq, AUP_PLACE_CONFIG as ɵr, PlaceRouter as ɵt, PlaceHistory as ɵu, ModalInteractionService as ɵv, TabbedPlaceNavigationComponent as ɵw, AbstractPlaceNavigationComponent as ɵx, ListPlaceNavComponent as ɵy, InteractionModule as ɵz };
6221
+ export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractActivity, AbstractInputComponent, AbstractPlaceGuard, AbstractPlaceNavigationComponent, Activity, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionContext, DialogInteractionService, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, FocusBindingDirective, Formatter, InplaceInteractionContextComponent, InteractionContext, InteractionContextBase, InteractionGuard, InteractionModule, InteractionOutletComponent, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ModalInteractionService, NavigationState, NoopAuthGuard, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, UrlSnapshot, Visit, VisitParameter, VisitParameterList, VisitSanitiser, leftRightPlaceAnimation, slideDownAndUpAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, ActivityContainerComponent as ɵba, InteractionContextBase as ɵbb, InteractionContext as ɵbc, ActivityOutletComponent as ɵbd, ConfirmationDialogComponent as ɵbe, AbstractActivity as ɵbf, ACTIVITY_DATA as ɵbg, Activity as ɵbh, ConfirmThenDialogComponent as ɵbj, AlertDialogComponent as ɵbk, InteractionOutletComponent as ɵbm, InplaceInteractionContextComponent as ɵbn, DIALOG_INTERACTION_SERVICE_DEFAULTS as ɵbo, DialogInteractionService as ɵbp, FocusBindingDirective as ɵc, DisposableComponent as ɵd, ComponentsModule as ɵe, NumberInputComponent as ɵf, AbstractInputComponent as ɵg, StringInputComponent as ɵh, PasswordInputComponent as ɵi, SelectInputComponent as ɵj, NoopComponent as ɵk, PlaceModule as ɵl, EmptyStateComponent as ɵm, BusyOverlayComponent as ɵn, PlaceOutletComponent as ɵo, leftRightPlaceAnimation as ɵp, LEFT_RIGHT_PLACE_ANIMATION as ɵq, AUP_PLACE_CONFIG as ɵr, PlaceRouter as ɵt, PlaceHistory as ɵu, ModalInteractionService as ɵv, TabbedPlaceNavigationComponent as ɵw, AbstractPlaceNavigationComponent as ɵx, ListPlaceNavComponent as ɵy, InteractionModule as ɵz };
6264
6222
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map