@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.
@@ -5,9 +5,9 @@ import { MatInputModule, MatFormFieldModule, MatSelectModule, MatButtonModule, M
5
5
  import { MatTabsModule } from '@angular/material/tabs';
6
6
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
7
  import { __extends, __decorate, __metadata, __awaiter, __generator, __assign, __spread } from 'tslib';
8
- import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingListModel, Deferred, MutableStream, MutableValueModel, MutableListModel, Binding, Trace, Guard, StoreInValueModel, Command, OptionsHelper, ValueHolder } from '@coolon/pectin';
8
+ import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingListModel, Deferred, MutableStream, MutableValueModel, MutableListModel, Binding, Guard, StoreInValueModel, Command, OptionsHelper, ValueHolder } from '@coolon/pectin';
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';
@@ -4439,23 +4439,21 @@ if (false) {
4439
4439
  function (event) {
4440
4440
  return new InteractionTransition(this.context, event.url);
4441
4441
  };
4442
+ // @Trace()
4443
+ // @Trace()
4442
4444
  /**
4443
4445
  * @param {?} event
4444
4446
  * @return {?}
4445
4447
  */
4446
- IdleDuringInteraction.prototype.onPopState = /**
4448
+ IdleDuringInteraction.prototype.onPopState =
4449
+ // @Trace()
4450
+ /**
4447
4451
  * @param {?} event
4448
4452
  * @return {?}
4449
4453
  */
4450
4454
  function (event) {
4451
4455
  return new InteractionPopStateTransition(this.context, event.url);
4452
4456
  };
4453
- __decorate([
4454
- Trace(),
4455
- __metadata("design:type", Function),
4456
- __metadata("design:paramtypes", [NavigationStart]),
4457
- __metadata("design:returntype", NavigationState)
4458
- ], IdleDuringInteraction.prototype, "onPopState", null);
4459
4457
  return IdleDuringInteraction;
4460
4458
  }(NavigationState));
4461
4459
  NavigationState.IdleDuringInteraction = IdleDuringInteraction;
@@ -4494,18 +4492,26 @@ if (false) {
4494
4492
  * This state exists to handle all events while any kind of navigation is in progress. That way all other states can
4495
4493
  * happily ignore interaction contexts.
4496
4494
  */
4497
- var InteractionTransition = /** @class */ (function (_super) {
4495
+ var /**
4496
+ * This state exists to handle all events while any kind of navigation is in progress. That way all other states can
4497
+ * happily ignore interaction contexts.
4498
+ */
4499
+ InteractionTransition = /** @class */ (function (_super) {
4498
4500
  __extends(InteractionTransition, _super);
4499
4501
  function InteractionTransition() {
4500
4502
  var _this = _super !== null && _super.apply(this, arguments) || this;
4501
4503
  _this.isPopState = false;
4502
4504
  return _this;
4503
4505
  }
4506
+ // @Trace()
4507
+ // @Trace()
4504
4508
  /**
4505
4509
  * @param {?} event
4506
4510
  * @return {?}
4507
4511
  */
4508
- InteractionTransition.prototype.onRouterCancelled = /**
4512
+ InteractionTransition.prototype.onRouterCancelled =
4513
+ // @Trace()
4514
+ /**
4509
4515
  * @param {?} event
4510
4516
  * @return {?}
4511
4517
  */
@@ -4520,11 +4526,15 @@ if (false) {
4520
4526
  return new Idle(this.context);
4521
4527
  }
4522
4528
  };
4529
+ // @Trace()
4530
+ // @Trace()
4523
4531
  /**
4524
4532
  * @param {?} event
4525
4533
  * @return {?}
4526
4534
  */
4527
- InteractionTransition.prototype.onRouterError = /**
4535
+ InteractionTransition.prototype.onRouterError =
4536
+ // @Trace()
4537
+ /**
4528
4538
  * @param {?} event
4529
4539
  * @return {?}
4530
4540
  */
@@ -4532,11 +4542,15 @@ if (false) {
4532
4542
  // navigation was aborted.
4533
4543
  return new IdleDuringInteraction(this.context, this.startingUrl);
4534
4544
  };
4545
+ // @Trace()
4546
+ // @Trace()
4535
4547
  /**
4536
4548
  * @param {?} event
4537
4549
  * @return {?}
4538
4550
  */
4539
- InteractionTransition.prototype.onRouterEnd = /**
4551
+ InteractionTransition.prototype.onRouterEnd =
4552
+ // @Trace()
4553
+ /**
4540
4554
  * @param {?} event
4541
4555
  * @return {?}
4542
4556
  */
@@ -4548,24 +4562,6 @@ if (false) {
4548
4562
  return new Idle(this.context);
4549
4563
  }
4550
4564
  };
4551
- __decorate([
4552
- Trace(),
4553
- __metadata("design:type", Function),
4554
- __metadata("design:paramtypes", [NavigationCancel]),
4555
- __metadata("design:returntype", NavigationState)
4556
- ], InteractionTransition.prototype, "onRouterCancelled", null);
4557
- __decorate([
4558
- Trace(),
4559
- __metadata("design:type", Function),
4560
- __metadata("design:paramtypes", [NavigationError]),
4561
- __metadata("design:returntype", NavigationState)
4562
- ], InteractionTransition.prototype, "onRouterError", null);
4563
- __decorate([
4564
- Trace(),
4565
- __metadata("design:type", Function),
4566
- __metadata("design:paramtypes", [NavigationEnd]),
4567
- __metadata("design:returntype", NavigationState)
4568
- ], InteractionTransition.prototype, "onRouterEnd", null);
4569
4565
  return InteractionTransition;
4570
4566
  }(AbstractInteractionTransition));
4571
4567
  NavigationState.InteractionTransition = InteractionTransition;
@@ -4577,18 +4573,26 @@ if (false) {
4577
4573
  * This state exists to handle all events while any kind of navigation is in progress. That way all other states can
4578
4574
  * happily ignore interaction contexts.
4579
4575
  */
4580
- var InteractionPopStateTransition = /** @class */ (function (_super) {
4576
+ var /**
4577
+ * This state exists to handle all events while any kind of navigation is in progress. That way all other states can
4578
+ * happily ignore interaction contexts.
4579
+ */
4580
+ InteractionPopStateTransition = /** @class */ (function (_super) {
4581
4581
  __extends(InteractionPopStateTransition, _super);
4582
4582
  function InteractionPopStateTransition() {
4583
4583
  var _this = _super !== null && _super.apply(this, arguments) || this;
4584
4584
  _this.isPopState = true;
4585
4585
  return _this;
4586
4586
  }
4587
+ // @Trace()
4588
+ // @Trace()
4587
4589
  /**
4588
4590
  * @param {?} event
4589
4591
  * @return {?}
4590
4592
  */
4591
- InteractionPopStateTransition.prototype.onRouterCancelled = /**
4593
+ InteractionPopStateTransition.prototype.onRouterCancelled =
4594
+ // @Trace()
4595
+ /**
4592
4596
  * @param {?} event
4593
4597
  * @return {?}
4594
4598
  */
@@ -4603,11 +4607,15 @@ if (false) {
4603
4607
  return new Idle(this.context);
4604
4608
  }
4605
4609
  };
4610
+ // @Trace()
4611
+ // @Trace()
4606
4612
  /**
4607
4613
  * @param {?} event
4608
4614
  * @return {?}
4609
4615
  */
4610
- InteractionPopStateTransition.prototype.onRouterEnd = /**
4616
+ InteractionPopStateTransition.prototype.onRouterEnd =
4617
+ // @Trace()
4618
+ /**
4611
4619
  * @param {?} event
4612
4620
  * @return {?}
4613
4621
  */
@@ -4619,18 +4627,6 @@ if (false) {
4619
4627
  return new Idle(this.context);
4620
4628
  }
4621
4629
  };
4622
- __decorate([
4623
- Trace(),
4624
- __metadata("design:type", Function),
4625
- __metadata("design:paramtypes", [NavigationCancel]),
4626
- __metadata("design:returntype", NavigationState)
4627
- ], InteractionPopStateTransition.prototype, "onRouterCancelled", null);
4628
- __decorate([
4629
- Trace(),
4630
- __metadata("design:type", Function),
4631
- __metadata("design:paramtypes", [NavigationEnd]),
4632
- __metadata("design:returntype", NavigationState)
4633
- ], InteractionPopStateTransition.prototype, "onRouterEnd", null);
4634
4630
  return InteractionPopStateTransition;
4635
4631
  }(AbstractInteractionTransition));
4636
4632
  NavigationState.InteractionPopStateTransition = InteractionPopStateTransition;
@@ -4670,20 +4666,28 @@ if (false) {
4670
4666
  function (event) {
4671
4667
  return this.ignore(event);
4672
4668
  };
4669
+ // @Trace()
4670
+ // @Trace()
4673
4671
  /**
4674
4672
  * @param {?} event
4675
4673
  * @return {?}
4676
4674
  */
4677
- CancelledDuringNavigationInteraction.prototype.onRouterCancelled = /**
4675
+ CancelledDuringNavigationInteraction.prototype.onRouterCancelled =
4676
+ // @Trace()
4677
+ /**
4678
4678
  * @param {?} event
4679
4679
  * @return {?}
4680
4680
  */
4681
4681
  function (event) {
4682
4682
  // Depending on the state of the router and what was done we get a different
4683
- // sequence of events. I.e. If they just clicked a link we'll get a cancel
4684
- // with the locationChangeTriggerUrl as the final event. However the user
4685
- // started the initial navigation with a pop state then we'll get one of
4686
- // those with the locationChangeTriggerUrl but no cancel event with it.
4683
+ // sequence of events.
4684
+ // If the navigation change was triggered by clicking a link we'll get a cancel with the locationChangeTriggerUrl as the final event.
4685
+ // 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.
4686
+ if (this.gotPopStateWithLeavingUrl && this.interactionService.isActive()) {
4687
+ /** @type {?} */
4688
+ var interactionIds = this.interactionService.activeInteractionContextIds.value;
4689
+ this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(interactionIds).url);
4690
+ }
4687
4691
  return this.gotPopStateWithLeavingUrl || this.locationChangeTriggerUrl === event.url ? this.createIdleState() : this.ignore(event);
4688
4692
  };
4689
4693
  /**
@@ -4767,12 +4771,6 @@ if (false) {
4767
4771
  function () {
4768
4772
  return this.constructor.name + "(isIdl: " + this.idle + ", startingUrl: " + this.startingUrl + ", locationChangeTriggerUrl:" + this.locationChangeTriggerUrl + ")";
4769
4773
  };
4770
- __decorate([
4771
- Trace(),
4772
- __metadata("design:type", Function),
4773
- __metadata("design:paramtypes", [NavigationCancel]),
4774
- __metadata("design:returntype", NavigationState)
4775
- ], CancelledDuringNavigationInteraction.prototype, "onRouterCancelled", null);
4776
4774
  return CancelledDuringNavigationInteraction;
4777
4775
  }(NavigationState));
4778
4776
  NavigationState.CancelledDuringNavigationInteraction = CancelledDuringNavigationInteraction;
@@ -5539,12 +5537,16 @@ var PlaceRouter = /** @class */ (function (_super) {
5539
5537
  function (url) {
5540
5538
  return this.getActiveInteractionIdsFromUrl(url).length > 0;
5541
5539
  };
5540
+ // @Trace()
5541
+ // @Trace()
5542
5542
  /**
5543
5543
  * @param {?} urlSnapshot
5544
5544
  * @param {?=} navigationExtras
5545
5545
  * @return {?}
5546
5546
  */
5547
- PlaceRouter.prototype.navigateByUrl = /**
5547
+ PlaceRouter.prototype.navigateByUrl =
5548
+ // @Trace()
5549
+ /**
5548
5550
  * @param {?} urlSnapshot
5549
5551
  * @param {?=} navigationExtras
5550
5552
  * @return {?}
@@ -5627,12 +5629,6 @@ var PlaceRouter = /** @class */ (function (_super) {
5627
5629
  { type: InteractionService }
5628
5630
  ]; };
5629
5631
  /** @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" });
5630
- __decorate([
5631
- Trace(),
5632
- __metadata("design:type", Function),
5633
- __metadata("design:paramtypes", [UrlSnapshot, Object]),
5634
- __metadata("design:returntype", Promise)
5635
- ], PlaceRouter.prototype, "navigateByUrl", null);
5636
5632
  return PlaceRouter;
5637
5633
  }(GarbageCollector));
5638
5634
  if (false) {