@coolon/angular-ui-powerups 0.0.107 → 0.0.109

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.
@@ -4,10 +4,10 @@ import { FormsModule } from '@angular/forms';
4
4
  import { MatInputModule, MatFormFieldModule, MatSelectModule, MatButtonModule, MatDialogModule, MatTabsModule as MatTabsModule$1, MatProgressSpinnerModule, MatDialog } from '@angular/material';
5
5
  import { MatTabsModule } from '@angular/material/tabs';
6
6
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
- import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingListModel, Deferred, MutableStream, MutableValueModel, MutableListModel, Binding, Trace, Guard, StoreInValueModel, Command, OptionsHelper, ValueHolder } from '@coolon/pectin';
7
+ import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingListModel, Deferred, MutableStream, MutableValueModel, MutableListModel, Binding, Guard, 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, NavigationError, NavigationEnd, UrlSegment, Router, UrlSerializer } from '@angular/router';
10
+ import { RouterModule, UrlSegment, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, Router, UrlSerializer } from '@angular/router';
11
11
  import { assert as assert$1, Opts, Klass } from '@coolon/typescript-utilities';
12
12
  import { MatIconModule } from '@angular/material/icon';
13
13
  import { MatListModule } from '@angular/material/list';
@@ -3542,6 +3542,7 @@ if (false) {
3542
3542
  onRouterStarted(event) {
3543
3543
  return new InteractionTransition(this.context, event.url);
3544
3544
  }
3545
+ // @Trace()
3545
3546
  /**
3546
3547
  * @param {?} event
3547
3548
  * @return {?}
@@ -3550,12 +3551,6 @@ if (false) {
3550
3551
  return new InteractionPopStateTransition(this.context, event.url);
3551
3552
  }
3552
3553
  }
3553
- __decorate([
3554
- Trace(),
3555
- __metadata("design:type", Function),
3556
- __metadata("design:paramtypes", [NavigationStart]),
3557
- __metadata("design:returntype", NavigationState)
3558
- ], IdleDuringInteraction.prototype, "onPopState", null);
3559
3554
  NavigationState.IdleDuringInteraction = IdleDuringInteraction;
3560
3555
  if (false) {
3561
3556
  /** @type {?} */
@@ -3595,6 +3590,7 @@ if (false) {
3595
3590
  super(...arguments);
3596
3591
  this.isPopState = false;
3597
3592
  }
3593
+ // @Trace()
3598
3594
  /**
3599
3595
  * @param {?} event
3600
3596
  * @return {?}
@@ -3610,6 +3606,7 @@ if (false) {
3610
3606
  return new Idle(this.context);
3611
3607
  }
3612
3608
  }
3609
+ // @Trace()
3613
3610
  /**
3614
3611
  * @param {?} event
3615
3612
  * @return {?}
@@ -3618,6 +3615,7 @@ if (false) {
3618
3615
  // navigation was aborted.
3619
3616
  return new IdleDuringInteraction(this.context, this.startingUrl);
3620
3617
  }
3618
+ // @Trace()
3621
3619
  /**
3622
3620
  * @param {?} event
3623
3621
  * @return {?}
@@ -3631,24 +3629,6 @@ if (false) {
3631
3629
  }
3632
3630
  }
3633
3631
  }
3634
- __decorate([
3635
- Trace(),
3636
- __metadata("design:type", Function),
3637
- __metadata("design:paramtypes", [NavigationCancel]),
3638
- __metadata("design:returntype", NavigationState)
3639
- ], InteractionTransition.prototype, "onRouterCancelled", null);
3640
- __decorate([
3641
- Trace(),
3642
- __metadata("design:type", Function),
3643
- __metadata("design:paramtypes", [NavigationError]),
3644
- __metadata("design:returntype", NavigationState)
3645
- ], InteractionTransition.prototype, "onRouterError", null);
3646
- __decorate([
3647
- Trace(),
3648
- __metadata("design:type", Function),
3649
- __metadata("design:paramtypes", [NavigationEnd]),
3650
- __metadata("design:returntype", NavigationState)
3651
- ], InteractionTransition.prototype, "onRouterEnd", null);
3652
3632
  NavigationState.InteractionTransition = InteractionTransition;
3653
3633
  if (false) {
3654
3634
  /** @type {?} */
@@ -3663,6 +3643,7 @@ if (false) {
3663
3643
  super(...arguments);
3664
3644
  this.isPopState = true;
3665
3645
  }
3646
+ // @Trace()
3666
3647
  /**
3667
3648
  * @param {?} event
3668
3649
  * @return {?}
@@ -3678,6 +3659,7 @@ if (false) {
3678
3659
  return new Idle(this.context);
3679
3660
  }
3680
3661
  }
3662
+ // @Trace()
3681
3663
  /**
3682
3664
  * @param {?} event
3683
3665
  * @return {?}
@@ -3691,18 +3673,6 @@ if (false) {
3691
3673
  }
3692
3674
  }
3693
3675
  }
3694
- __decorate([
3695
- Trace(),
3696
- __metadata("design:type", Function),
3697
- __metadata("design:paramtypes", [NavigationCancel]),
3698
- __metadata("design:returntype", NavigationState)
3699
- ], InteractionPopStateTransition.prototype, "onRouterCancelled", null);
3700
- __decorate([
3701
- Trace(),
3702
- __metadata("design:type", Function),
3703
- __metadata("design:paramtypes", [NavigationEnd]),
3704
- __metadata("design:returntype", NavigationState)
3705
- ], InteractionPopStateTransition.prototype, "onRouterEnd", null);
3706
3676
  NavigationState.InteractionPopStateTransition = InteractionPopStateTransition;
3707
3677
  if (false) {
3708
3678
  /** @type {?} */
@@ -3736,16 +3706,21 @@ if (false) {
3736
3706
  onRouterStarted(event) {
3737
3707
  return this.ignore(event);
3738
3708
  }
3709
+ // @Trace()
3739
3710
  /**
3740
3711
  * @param {?} event
3741
3712
  * @return {?}
3742
3713
  */
3743
3714
  onRouterCancelled(event) {
3744
3715
  // Depending on the state of the router and what was done we get a different
3745
- // sequence of events. I.e. If they just clicked a link we'll get a cancel
3746
- // with the locationChangeTriggerUrl as the final event. However the user
3747
- // started the initial navigation with a pop state then we'll get one of
3748
- // those with the locationChangeTriggerUrl but no cancel event with it.
3716
+ // sequence of events.
3717
+ // If the navigation change was triggered by clicking a link we'll get a cancel with the locationChangeTriggerUrl as the final event.
3718
+ // If the navigation change was triggered with a pop state then we'll get an onPopState with the locationChangeTriggerUrl but no cancel event with it.
3719
+ if (this.gotPopStateWithLeavingUrl && this.interactionService.isActive()) {
3720
+ /** @type {?} */
3721
+ const interactionIds = this.interactionService.activeInteractionContextIds.value;
3722
+ this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(interactionIds).url);
3723
+ }
3749
3724
  return this.gotPopStateWithLeavingUrl || this.locationChangeTriggerUrl === event.url ? this.createIdleState() : this.ignore(event);
3750
3725
  }
3751
3726
  /**
@@ -3799,12 +3774,6 @@ if (false) {
3799
3774
  return `${this.constructor.name}(isIdl: ${this.idle}, startingUrl: ${this.startingUrl}, locationChangeTriggerUrl:${this.locationChangeTriggerUrl})`;
3800
3775
  }
3801
3776
  }
3802
- __decorate([
3803
- Trace(),
3804
- __metadata("design:type", Function),
3805
- __metadata("design:paramtypes", [NavigationCancel]),
3806
- __metadata("design:returntype", NavigationState)
3807
- ], CancelledDuringNavigationInteraction.prototype, "onRouterCancelled", null);
3808
3777
  NavigationState.CancelledDuringNavigationInteraction = CancelledDuringNavigationInteraction;
3809
3778
  if (false) {
3810
3779
  /** @type {?} */
@@ -4398,6 +4367,7 @@ class PlaceRouter extends GarbageCollector {
4398
4367
  hasActiveInteractionIds(url) {
4399
4368
  return this.getActiveInteractionIdsFromUrl(url).length > 0;
4400
4369
  }
4370
+ // @Trace()
4401
4371
  /**
4402
4372
  * @param {?} urlSnapshot
4403
4373
  * @param {?=} navigationExtras
@@ -4473,12 +4443,6 @@ PlaceRouter.ctorParameters = () => [
4473
4443
  { type: InteractionService }
4474
4444
  ];
4475
4445
  /** @nocollapse */ PlaceRouter.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(ɵɵinject(Router), ɵɵinject(UrlSerializer), ɵɵinject(Location), ɵɵinject(PlaceHistory), ɵɵinject(InteractionService)); }, token: PlaceRouter, providedIn: "root" });
4476
- __decorate([
4477
- Trace(),
4478
- __metadata("design:type", Function),
4479
- __metadata("design:paramtypes", [UrlSnapshot, Object]),
4480
- __metadata("design:returntype", Promise)
4481
- ], PlaceRouter.prototype, "navigateByUrl", null);
4482
4446
  if (false) {
4483
4447
  /**
4484
4448
  * @type {?}