@coolon/angular-ui-powerups 0.0.84 → 0.0.86

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.
@@ -4473,7 +4473,7 @@
4473
4473
  _this._inRouteVisitUpdate = new pectin.Guard();
4474
4474
  _this._activatedRouteModel = new pectin.MutableValueModel();
4475
4475
  _this._placeDefinition = new pectin.MutableValueModel();
4476
- _this.isOnInitialPlace = true;
4476
+ _this.initialPlaceIndex = null;
4477
4477
  var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
4478
4478
  _this.parentOutletModel = new pectin.MutableValueModel(parentOutlet);
4479
4479
  _this._activePlaceVisitModel.setDelegate(new pectin.MutableValueModel());
@@ -4496,17 +4496,21 @@
4496
4496
  function (p) { return (/** @type {?} */ (p.constructor)); }));
4497
4497
  _this.placeAnimationOrder = chain(_this.customPlaceAnimationOrderModel)
4498
4498
  .otherwise(defaultPlaceAnimationOrder)
4499
- .indexOf(activatePlaceType)
4500
- .map((/**
4501
- * @param {?} order
4499
+ .reduce((/**
4500
+ * @param {?} placesInOrder
4502
4501
  * @return {?}
4503
4502
  */
4504
- function (order) {
4505
- // we get -1 on the first load which triggers an animation to the first page, so alway pin it to 0
4506
- // if we're animating.
4507
- return _this.isOnInitialPlace ? 0 :
4508
- _this.animate ? Math.max(order, 0) : 0;
4509
- }));
4503
+ function (placesInOrder) {
4504
+ /** @type {?} */
4505
+ var placeIndex = 0;
4506
+ if (activatePlaceType.value) {
4507
+ placeIndex = placesInOrder.indexOf(activatePlaceType.value);
4508
+ if (___default.isNil(_this.initialPlaceIndex)) {
4509
+ _this.initialPlaceIndex = placeIndex;
4510
+ }
4511
+ }
4512
+ return ___default.isNil(_this.initialPlaceIndex) ? 0 : placeIndex - _this.initialPlaceIndex;
4513
+ }), { dependsOn: activatePlaceType });
4510
4514
  // Push incoming changes into the component
4511
4515
  _this.routerVisit = chain(_this._activePlace).pluck('placeDefinition').findIn(placeRouter.activeVisitIndex);
4512
4516
  // Our router visit will change when our active is nullified during deactivation, which will push a null visit
@@ -4547,6 +4551,19 @@
4547
4551
  */
4548
4552
  function () {
4549
4553
  };
4554
+ // @Trace()
4555
+ // @Trace()
4556
+ /**
4557
+ * @return {?}
4558
+ */
4559
+ PlaceOutletComponent.prototype.getAnimationOrder =
4560
+ // @Trace()
4561
+ /**
4562
+ * @return {?}
4563
+ */
4564
+ function () {
4565
+ return this.placeAnimationOrder.value;
4566
+ };
4550
4567
  Object.defineProperty(PlaceOutletComponent.prototype, "animationDuration", {
4551
4568
  get: /**
4552
4569
  * @return {?}
@@ -4557,16 +4574,20 @@
4557
4574
  enumerable: true,
4558
4575
  configurable: true
4559
4576
  });
4577
+ // @Trace()
4578
+ // @Trace()
4560
4579
  /**
4561
4580
  * @param {?} visit
4562
4581
  * @return {?}
4563
4582
  */
4564
- PlaceOutletComponent.prototype.navigate = /**
4583
+ PlaceOutletComponent.prototype.navigate =
4584
+ // @Trace()
4585
+ /**
4565
4586
  * @param {?} visit
4566
4587
  * @return {?}
4567
4588
  */
4568
4589
  function (visit) {
4569
- console.log({ activatedRoute: this._activatedRouteModel.value });
4590
+ // console.log({ activatedRoute: this._activatedRouteModel.value });
4570
4591
  this.placeRouter.navigate(visit, {
4571
4592
  relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
4572
4593
  });
@@ -4581,10 +4602,14 @@
4581
4602
  enumerable: true,
4582
4603
  configurable: true
4583
4604
  });
4605
+ // @Trace()
4606
+ // @Trace()
4584
4607
  /**
4585
4608
  * @return {?}
4586
4609
  */
4587
- PlaceOutletComponent.prototype.pushRouteChangesToVisit = /**
4610
+ PlaceOutletComponent.prototype.pushRouteChangesToVisit =
4611
+ // @Trace()
4612
+ /**
4588
4613
  * @return {?}
4589
4614
  */
4590
4615
  function () {
@@ -4595,7 +4620,7 @@
4595
4620
  visit: visit,
4596
4621
  place: visit ? visit.placeDefinition.component : null,
4597
4622
  inOutletActivation: this._inOutletActivation.value,
4598
- inRoutingSession: this.placeRouter.navigationSessionActive.value,
4623
+ inRoutingSession: this.placeRouter.navigationSessionActive.value
4599
4624
  });
4600
4625
  if (visit) { // can be null while the place and index sync up
4601
4626
  this._inRouteVisitUpdate.whileTrue((/**
@@ -4641,12 +4666,16 @@
4641
4666
  enumerable: true,
4642
4667
  configurable: true
4643
4668
  });
4669
+ // @Trace()
4670
+ // @Trace()
4644
4671
  /**
4645
4672
  * @param {?} routerOutlet
4646
4673
  * @param {?} place
4647
4674
  * @return {?}
4648
4675
  */
4649
- PlaceOutletComponent.prototype.onOutletActivated = /**
4676
+ PlaceOutletComponent.prototype.onOutletActivated =
4677
+ // @Trace()
4678
+ /**
4650
4679
  * @param {?} routerOutlet
4651
4680
  * @param {?} place
4652
4681
  * @return {?}
@@ -4675,10 +4704,14 @@
4675
4704
  this.animationDone();
4676
4705
  }
4677
4706
  };
4707
+ // @Trace()
4708
+ // @Trace()
4678
4709
  /**
4679
4710
  * @return {?}
4680
4711
  */
4681
- PlaceOutletComponent.prototype.onOutletDeactivated = /**
4712
+ PlaceOutletComponent.prototype.onOutletDeactivated =
4713
+ // @Trace()
4714
+ /**
4682
4715
  * @return {?}
4683
4716
  */
4684
4717
  function () {
@@ -4687,26 +4720,33 @@
4687
4720
  * @return {?}
4688
4721
  */
4689
4722
  function () {
4690
- _this.isOnInitialPlace = false;
4691
4723
  _this._activePlace.value = null;
4692
4724
  _this._activatedRouteModel.value = null;
4693
4725
  _this._placeDefinition.value = null;
4694
4726
  _this._activePlaceVisitModel.setDelegate(null);
4695
4727
  }));
4696
4728
  };
4729
+ // @Trace()
4730
+ // @Trace()
4697
4731
  /**
4698
4732
  * @return {?}
4699
4733
  */
4700
- PlaceOutletComponent.prototype.animationStarted = /**
4734
+ PlaceOutletComponent.prototype.animationStarted =
4735
+ // @Trace()
4736
+ /**
4701
4737
  * @return {?}
4702
4738
  */
4703
4739
  function () {
4704
4740
  console.log({ activePlace: this._activePlace.value });
4705
4741
  };
4742
+ // @Trace()
4743
+ // @Trace()
4706
4744
  /**
4707
4745
  * @return {?}
4708
4746
  */
4709
- PlaceOutletComponent.prototype.animationDone = /**
4747
+ PlaceOutletComponent.prototype.animationDone =
4748
+ // @Trace()
4749
+ /**
4710
4750
  * @return {?}
4711
4751
  */
4712
4752
  function () {
@@ -4717,7 +4757,7 @@
4717
4757
  PlaceOutletComponent.decorators = [
4718
4758
  { type: core.Component, args: [{
4719
4759
  selector: 'aup-place-outlet',
4720
- template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"{value: placeAnimationOrder.value, params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n</div>\n\n",
4760
+ template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n</div>\n\n",
4721
4761
  animations: [LEFT_RIGHT_PLACE_ANIMATION],
4722
4762
  styles: [":host{display:flex;flex-direction:column;min-height:0;overflow-x:hidden}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]
4723
4763
  }] }
@@ -4744,42 +4784,6 @@
4744
4784
  pectin.StoreInListModel('customPlaceAnimationOrderModel'),
4745
4785
  __metadata("design:type", Array)
4746
4786
  ], PlaceOutletComponent.prototype, "customPlaceAnimationOrder", void 0);
4747
- __decorate([
4748
- pectin.Trace(),
4749
- __metadata("design:type", Function),
4750
- __metadata("design:paramtypes", [Visit]),
4751
- __metadata("design:returntype", void 0)
4752
- ], PlaceOutletComponent.prototype, "navigate", null);
4753
- __decorate([
4754
- pectin.Trace(),
4755
- __metadata("design:type", Function),
4756
- __metadata("design:paramtypes", []),
4757
- __metadata("design:returntype", void 0)
4758
- ], PlaceOutletComponent.prototype, "pushRouteChangesToVisit", null);
4759
- __decorate([
4760
- pectin.Trace(),
4761
- __metadata("design:type", Function),
4762
- __metadata("design:paramtypes", [router.RouterOutlet, exports.PlaceComponent]),
4763
- __metadata("design:returntype", void 0)
4764
- ], PlaceOutletComponent.prototype, "onOutletActivated", null);
4765
- __decorate([
4766
- pectin.Trace(),
4767
- __metadata("design:type", Function),
4768
- __metadata("design:paramtypes", []),
4769
- __metadata("design:returntype", void 0)
4770
- ], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
4771
- __decorate([
4772
- pectin.Trace(),
4773
- __metadata("design:type", Function),
4774
- __metadata("design:paramtypes", []),
4775
- __metadata("design:returntype", void 0)
4776
- ], PlaceOutletComponent.prototype, "animationStarted", null);
4777
- __decorate([
4778
- pectin.Trace(),
4779
- __metadata("design:type", Function),
4780
- __metadata("design:paramtypes", []),
4781
- __metadata("design:returntype", void 0)
4782
- ], PlaceOutletComponent.prototype, "animationDone", null);
4783
4787
  return PlaceOutletComponent;
4784
4788
  }(DisposableComponent));
4785
4789
  if (false) {
@@ -4844,7 +4848,7 @@
4844
4848
  * @type {?}
4845
4849
  * @private
4846
4850
  */
4847
- PlaceOutletComponent.prototype.isOnInitialPlace;
4851
+ PlaceOutletComponent.prototype.initialPlaceIndex;
4848
4852
  /**
4849
4853
  * @type {?}
4850
4854
  * @private