@coolon/angular-ui-powerups 0.0.83 → 0.0.84
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/bundles/coolon-angular-ui-powerups.umd.js +81 -34
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +63 -23
- package/esm2015/lib/place/place-router.js +13 -3
- package/esm2015/lib/place/place.module.js +2 -5
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +67 -23
- package/esm5/lib/place/place-router.js +15 -11
- package/esm5/lib/place/place.module.js +2 -5
- package/fesm2015/coolon-angular-ui-powerups.js +75 -26
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +81 -34
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +5 -0
- package/package.json +1 -1
|
@@ -4254,16 +4254,12 @@
|
|
|
4254
4254
|
[def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
|
|
4255
4255
|
[def.getFormattedRouteParameters(visit)];
|
|
4256
4256
|
};
|
|
4257
|
-
// @Trace()
|
|
4258
|
-
// @Trace()
|
|
4259
4257
|
/**
|
|
4260
4258
|
* @private
|
|
4261
4259
|
* @param {?} event
|
|
4262
4260
|
* @return {?}
|
|
4263
4261
|
*/
|
|
4264
|
-
PlaceRouter.prototype.onAngularRouterStarted =
|
|
4265
|
-
// @Trace()
|
|
4266
|
-
/**
|
|
4262
|
+
PlaceRouter.prototype.onAngularRouterStarted = /**
|
|
4267
4263
|
* @private
|
|
4268
4264
|
* @param {?} event
|
|
4269
4265
|
* @return {?}
|
|
@@ -4280,15 +4276,11 @@
|
|
|
4280
4276
|
}
|
|
4281
4277
|
this.firstRoute = false;
|
|
4282
4278
|
};
|
|
4283
|
-
// @Trace()
|
|
4284
|
-
// @Trace()
|
|
4285
4279
|
/**
|
|
4286
4280
|
* @private
|
|
4287
4281
|
* @return {?}
|
|
4288
4282
|
*/
|
|
4289
|
-
PlaceRouter.prototype.onAngularRouterFinished =
|
|
4290
|
-
// @Trace()
|
|
4291
|
-
/**
|
|
4283
|
+
PlaceRouter.prototype.onAngularRouterFinished = /**
|
|
4292
4284
|
* @private
|
|
4293
4285
|
* @return {?}
|
|
4294
4286
|
*/
|
|
@@ -4343,6 +4335,18 @@
|
|
|
4343
4335
|
__metadata("design:paramtypes", [Visit, Object]),
|
|
4344
4336
|
__metadata("design:returntype", Promise)
|
|
4345
4337
|
], PlaceRouter.prototype, "navigate", null);
|
|
4338
|
+
__decorate([
|
|
4339
|
+
pectin.Trace(),
|
|
4340
|
+
__metadata("design:type", Function),
|
|
4341
|
+
__metadata("design:paramtypes", [router.NavigationStart]),
|
|
4342
|
+
__metadata("design:returntype", void 0)
|
|
4343
|
+
], PlaceRouter.prototype, "onAngularRouterStarted", null);
|
|
4344
|
+
__decorate([
|
|
4345
|
+
pectin.Trace(),
|
|
4346
|
+
__metadata("design:type", Function),
|
|
4347
|
+
__metadata("design:paramtypes", []),
|
|
4348
|
+
__metadata("design:returntype", void 0)
|
|
4349
|
+
], PlaceRouter.prototype, "onAngularRouterFinished", null);
|
|
4346
4350
|
return PlaceRouter;
|
|
4347
4351
|
}(pectin.GarbageCollector));
|
|
4348
4352
|
if (false) {
|
|
@@ -4464,13 +4468,16 @@
|
|
|
4464
4468
|
_this.placeChanged = new core.EventEmitter();
|
|
4465
4469
|
_this._activePlace = new pectin.MutableValueModel();
|
|
4466
4470
|
_this._activePlaceVisitModel = new pectin.DelegatingValueModel();
|
|
4467
|
-
_this.
|
|
4471
|
+
_this._inOutletActivation = new pectin.Guard();
|
|
4472
|
+
_this._inOutletDeactivation = new pectin.Guard();
|
|
4473
|
+
_this._inRouteVisitUpdate = new pectin.Guard();
|
|
4468
4474
|
_this._activatedRouteModel = new pectin.MutableValueModel();
|
|
4469
4475
|
_this._placeDefinition = new pectin.MutableValueModel();
|
|
4470
4476
|
_this.isOnInitialPlace = true;
|
|
4471
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;
|
|
4472
4478
|
_this.parentOutletModel = new pectin.MutableValueModel(parentOutlet);
|
|
4473
4479
|
_this._activePlaceVisitModel.setDelegate(new pectin.MutableValueModel());
|
|
4480
|
+
_this._inOutletUpdate = valueOf.any(_this._inOutletDeactivation, _this._inOutletActivation).areTruthy();
|
|
4474
4481
|
/** @type {?} */
|
|
4475
4482
|
var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
|
|
4476
4483
|
.pullValueModel((/**
|
|
@@ -4501,25 +4508,15 @@
|
|
|
4501
4508
|
_this.animate ? Math.max(order, 0) : 0;
|
|
4502
4509
|
}));
|
|
4503
4510
|
// Push incoming changes into the component
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4511
|
+
_this.routerVisit = chain(_this._activePlace).pluck('placeDefinition').findIn(placeRouter.activeVisitIndex);
|
|
4512
|
+
// Our router visit will change when our active is nullified during deactivation, which will push a null visit
|
|
4513
|
+
// the the deactivated component, which will nuke it's view before the animations have finished.
|
|
4514
|
+
// The visit will alway updated after the router session is finsised (when the new visits are registered) so
|
|
4515
|
+
// we can safely ignore it during outlet changes as these always happen before the router session ends.
|
|
4516
|
+
when.valueOf(_this.routerVisit).changes((/**
|
|
4510
4517
|
* @return {?}
|
|
4511
4518
|
*/
|
|
4512
|
-
function (
|
|
4513
|
-
console.log("### Route visit changed");
|
|
4514
|
-
if (visit) { // can be null while the place and index sync up
|
|
4515
|
-
inRouteVisitUpdate.whileTrue((/**
|
|
4516
|
-
* @return {?}
|
|
4517
|
-
*/
|
|
4518
|
-
function () {
|
|
4519
|
-
_this._activePlaceVisitModel.value = visit;
|
|
4520
|
-
}));
|
|
4521
|
-
}
|
|
4522
|
-
}));
|
|
4519
|
+
function () { return _this.pushRouteChangesToVisit(); }), { unless: _this._inOutletUpdate });
|
|
4523
4520
|
// Handle component based changes
|
|
4524
4521
|
when.valueOf(_this._activePlaceVisitModel).changes((/**
|
|
4525
4522
|
* @param {?} next
|
|
@@ -4529,7 +4526,7 @@
|
|
|
4529
4526
|
function (next, previous) {
|
|
4530
4527
|
_this.pushVisitChangesToRoute(next, previous);
|
|
4531
4528
|
}), {
|
|
4532
|
-
unless:
|
|
4529
|
+
unless: _this.placeRouter.navigationSessionActive
|
|
4533
4530
|
});
|
|
4534
4531
|
chain(_this._activePlace)
|
|
4535
4532
|
.postponeWhile(placeRouter.navigationSessionActive)
|
|
@@ -4584,6 +4581,31 @@
|
|
|
4584
4581
|
enumerable: true,
|
|
4585
4582
|
configurable: true
|
|
4586
4583
|
});
|
|
4584
|
+
/**
|
|
4585
|
+
* @return {?}
|
|
4586
|
+
*/
|
|
4587
|
+
PlaceOutletComponent.prototype.pushRouteChangesToVisit = /**
|
|
4588
|
+
* @return {?}
|
|
4589
|
+
*/
|
|
4590
|
+
function () {
|
|
4591
|
+
var _this = this;
|
|
4592
|
+
/** @type {?} */
|
|
4593
|
+
var visit = this.routerVisit.value;
|
|
4594
|
+
console.log({
|
|
4595
|
+
visit: visit,
|
|
4596
|
+
place: visit ? visit.placeDefinition.component : null,
|
|
4597
|
+
inOutletActivation: this._inOutletActivation.value,
|
|
4598
|
+
inRoutingSession: this.placeRouter.navigationSessionActive.value,
|
|
4599
|
+
});
|
|
4600
|
+
if (visit) { // can be null while the place and index sync up
|
|
4601
|
+
this._inRouteVisitUpdate.whileTrue((/**
|
|
4602
|
+
* @return {?}
|
|
4603
|
+
*/
|
|
4604
|
+
function () {
|
|
4605
|
+
_this._activePlaceVisitModel.value = visit;
|
|
4606
|
+
}));
|
|
4607
|
+
}
|
|
4608
|
+
};
|
|
4587
4609
|
/**
|
|
4588
4610
|
* @param {?} next
|
|
4589
4611
|
* @param {?} previous
|
|
@@ -4631,7 +4653,7 @@
|
|
|
4631
4653
|
*/
|
|
4632
4654
|
function (routerOutlet, place) {
|
|
4633
4655
|
var _this = this;
|
|
4634
|
-
this.
|
|
4656
|
+
this._inOutletActivation.whileTrue((/**
|
|
4635
4657
|
* @return {?}
|
|
4636
4658
|
*/
|
|
4637
4659
|
function () {
|
|
@@ -4661,15 +4683,15 @@
|
|
|
4661
4683
|
*/
|
|
4662
4684
|
function () {
|
|
4663
4685
|
var _this = this;
|
|
4664
|
-
this.
|
|
4686
|
+
this._inOutletDeactivation.whileTrue((/**
|
|
4665
4687
|
* @return {?}
|
|
4666
4688
|
*/
|
|
4667
4689
|
function () {
|
|
4668
|
-
_this._activePlaceVisitModel.setDelegate(null);
|
|
4669
4690
|
_this.isOnInitialPlace = false;
|
|
4670
4691
|
_this._activePlace.value = null;
|
|
4671
4692
|
_this._activatedRouteModel.value = null;
|
|
4672
4693
|
_this._placeDefinition.value = null;
|
|
4694
|
+
_this._activePlaceVisitModel.setDelegate(null);
|
|
4673
4695
|
}));
|
|
4674
4696
|
};
|
|
4675
4697
|
/**
|
|
@@ -4728,6 +4750,12 @@
|
|
|
4728
4750
|
__metadata("design:paramtypes", [Visit]),
|
|
4729
4751
|
__metadata("design:returntype", void 0)
|
|
4730
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);
|
|
4731
4759
|
__decorate([
|
|
4732
4760
|
pectin.Trace(),
|
|
4733
4761
|
__metadata("design:type", Function),
|
|
@@ -4775,11 +4803,26 @@
|
|
|
4775
4803
|
* @private
|
|
4776
4804
|
*/
|
|
4777
4805
|
PlaceOutletComponent.prototype._activePlaceVisitModel;
|
|
4806
|
+
/**
|
|
4807
|
+
* @type {?}
|
|
4808
|
+
* @private
|
|
4809
|
+
*/
|
|
4810
|
+
PlaceOutletComponent.prototype._inOutletActivation;
|
|
4811
|
+
/**
|
|
4812
|
+
* @type {?}
|
|
4813
|
+
* @private
|
|
4814
|
+
*/
|
|
4815
|
+
PlaceOutletComponent.prototype._inOutletDeactivation;
|
|
4778
4816
|
/**
|
|
4779
4817
|
* @type {?}
|
|
4780
4818
|
* @private
|
|
4781
4819
|
*/
|
|
4782
4820
|
PlaceOutletComponent.prototype._inOutletUpdate;
|
|
4821
|
+
/**
|
|
4822
|
+
* @type {?}
|
|
4823
|
+
* @private
|
|
4824
|
+
*/
|
|
4825
|
+
PlaceOutletComponent.prototype._inRouteVisitUpdate;
|
|
4783
4826
|
/**
|
|
4784
4827
|
* @type {?}
|
|
4785
4828
|
* @private
|
|
@@ -4802,6 +4845,11 @@
|
|
|
4802
4845
|
* @private
|
|
4803
4846
|
*/
|
|
4804
4847
|
PlaceOutletComponent.prototype.isOnInitialPlace;
|
|
4848
|
+
/**
|
|
4849
|
+
* @type {?}
|
|
4850
|
+
* @private
|
|
4851
|
+
*/
|
|
4852
|
+
PlaceOutletComponent.prototype.routerVisit;
|
|
4805
4853
|
/**
|
|
4806
4854
|
* @type {?}
|
|
4807
4855
|
* @private
|
|
@@ -5018,7 +5066,6 @@
|
|
|
5018
5066
|
* @fileoverview added by tsickle
|
|
5019
5067
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5020
5068
|
*/
|
|
5021
|
-
var ɵ0 = { animationDuration: "2000ms" };
|
|
5022
5069
|
var PlaceModule = /** @class */ (function () {
|
|
5023
5070
|
function PlaceModule() {
|
|
5024
5071
|
}
|
|
@@ -5051,7 +5098,7 @@
|
|
|
5051
5098
|
ListPlaceNavComponent
|
|
5052
5099
|
],
|
|
5053
5100
|
providers: [
|
|
5054
|
-
|
|
5101
|
+
// {provide: AUP_PLACE_CONFIG, useValue: {animationDuration: "2000ms"}}
|
|
5055
5102
|
]
|
|
5056
5103
|
},] }
|
|
5057
5104
|
];
|