@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
|
@@ -4070,16 +4070,12 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
4070
4070
|
[def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
|
|
4071
4071
|
[def.getFormattedRouteParameters(visit)];
|
|
4072
4072
|
};
|
|
4073
|
-
// @Trace()
|
|
4074
|
-
// @Trace()
|
|
4075
4073
|
/**
|
|
4076
4074
|
* @private
|
|
4077
4075
|
* @param {?} event
|
|
4078
4076
|
* @return {?}
|
|
4079
4077
|
*/
|
|
4080
|
-
PlaceRouter.prototype.onAngularRouterStarted =
|
|
4081
|
-
// @Trace()
|
|
4082
|
-
/**
|
|
4078
|
+
PlaceRouter.prototype.onAngularRouterStarted = /**
|
|
4083
4079
|
* @private
|
|
4084
4080
|
* @param {?} event
|
|
4085
4081
|
* @return {?}
|
|
@@ -4096,15 +4092,11 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
4096
4092
|
}
|
|
4097
4093
|
this.firstRoute = false;
|
|
4098
4094
|
};
|
|
4099
|
-
// @Trace()
|
|
4100
|
-
// @Trace()
|
|
4101
4095
|
/**
|
|
4102
4096
|
* @private
|
|
4103
4097
|
* @return {?}
|
|
4104
4098
|
*/
|
|
4105
|
-
PlaceRouter.prototype.onAngularRouterFinished =
|
|
4106
|
-
// @Trace()
|
|
4107
|
-
/**
|
|
4099
|
+
PlaceRouter.prototype.onAngularRouterFinished = /**
|
|
4108
4100
|
* @private
|
|
4109
4101
|
* @return {?}
|
|
4110
4102
|
*/
|
|
@@ -4159,6 +4151,18 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
4159
4151
|
__metadata("design:paramtypes", [Visit, Object]),
|
|
4160
4152
|
__metadata("design:returntype", Promise)
|
|
4161
4153
|
], PlaceRouter.prototype, "navigate", null);
|
|
4154
|
+
__decorate([
|
|
4155
|
+
Trace(),
|
|
4156
|
+
__metadata("design:type", Function),
|
|
4157
|
+
__metadata("design:paramtypes", [NavigationStart]),
|
|
4158
|
+
__metadata("design:returntype", void 0)
|
|
4159
|
+
], PlaceRouter.prototype, "onAngularRouterStarted", null);
|
|
4160
|
+
__decorate([
|
|
4161
|
+
Trace(),
|
|
4162
|
+
__metadata("design:type", Function),
|
|
4163
|
+
__metadata("design:paramtypes", []),
|
|
4164
|
+
__metadata("design:returntype", void 0)
|
|
4165
|
+
], PlaceRouter.prototype, "onAngularRouterFinished", null);
|
|
4162
4166
|
return PlaceRouter;
|
|
4163
4167
|
}(GarbageCollector));
|
|
4164
4168
|
if (false) {
|
|
@@ -4280,13 +4284,16 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4280
4284
|
_this.placeChanged = new EventEmitter();
|
|
4281
4285
|
_this._activePlace = new MutableValueModel();
|
|
4282
4286
|
_this._activePlaceVisitModel = new DelegatingValueModel();
|
|
4283
|
-
_this.
|
|
4287
|
+
_this._inOutletActivation = new Guard$1();
|
|
4288
|
+
_this._inOutletDeactivation = new Guard$1();
|
|
4289
|
+
_this._inRouteVisitUpdate = new Guard$1();
|
|
4284
4290
|
_this._activatedRouteModel = new MutableValueModel();
|
|
4285
4291
|
_this._placeDefinition = new MutableValueModel();
|
|
4286
4292
|
_this.isOnInitialPlace = true;
|
|
4287
4293
|
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
4288
4294
|
_this.parentOutletModel = new MutableValueModel(parentOutlet);
|
|
4289
4295
|
_this._activePlaceVisitModel.setDelegate(new MutableValueModel());
|
|
4296
|
+
_this._inOutletUpdate = valueOf.any(_this._inOutletDeactivation, _this._inOutletActivation).areTruthy();
|
|
4290
4297
|
/** @type {?} */
|
|
4291
4298
|
var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
|
|
4292
4299
|
.pullValueModel((/**
|
|
@@ -4317,25 +4324,15 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4317
4324
|
_this.animate ? Math.max(order, 0) : 0;
|
|
4318
4325
|
}));
|
|
4319
4326
|
// Push incoming changes into the component
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4327
|
+
_this.routerVisit = chain(_this._activePlace).pluck('placeDefinition').findIn(placeRouter.activeVisitIndex);
|
|
4328
|
+
// Our router visit will change when our active is nullified during deactivation, which will push a null visit
|
|
4329
|
+
// the the deactivated component, which will nuke it's view before the animations have finished.
|
|
4330
|
+
// The visit will alway updated after the router session is finsised (when the new visits are registered) so
|
|
4331
|
+
// we can safely ignore it during outlet changes as these always happen before the router session ends.
|
|
4332
|
+
when.valueOf(_this.routerVisit).changes((/**
|
|
4326
4333
|
* @return {?}
|
|
4327
4334
|
*/
|
|
4328
|
-
function (
|
|
4329
|
-
console.log("### Route visit changed");
|
|
4330
|
-
if (visit) { // can be null while the place and index sync up
|
|
4331
|
-
inRouteVisitUpdate.whileTrue((/**
|
|
4332
|
-
* @return {?}
|
|
4333
|
-
*/
|
|
4334
|
-
function () {
|
|
4335
|
-
_this._activePlaceVisitModel.value = visit;
|
|
4336
|
-
}));
|
|
4337
|
-
}
|
|
4338
|
-
}));
|
|
4335
|
+
function () { return _this.pushRouteChangesToVisit(); }), { unless: _this._inOutletUpdate });
|
|
4339
4336
|
// Handle component based changes
|
|
4340
4337
|
when.valueOf(_this._activePlaceVisitModel).changes((/**
|
|
4341
4338
|
* @param {?} next
|
|
@@ -4345,7 +4342,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4345
4342
|
function (next, previous) {
|
|
4346
4343
|
_this.pushVisitChangesToRoute(next, previous);
|
|
4347
4344
|
}), {
|
|
4348
|
-
unless:
|
|
4345
|
+
unless: _this.placeRouter.navigationSessionActive
|
|
4349
4346
|
});
|
|
4350
4347
|
chain(_this._activePlace)
|
|
4351
4348
|
.postponeWhile(placeRouter.navigationSessionActive)
|
|
@@ -4400,6 +4397,31 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4400
4397
|
enumerable: true,
|
|
4401
4398
|
configurable: true
|
|
4402
4399
|
});
|
|
4400
|
+
/**
|
|
4401
|
+
* @return {?}
|
|
4402
|
+
*/
|
|
4403
|
+
PlaceOutletComponent.prototype.pushRouteChangesToVisit = /**
|
|
4404
|
+
* @return {?}
|
|
4405
|
+
*/
|
|
4406
|
+
function () {
|
|
4407
|
+
var _this = this;
|
|
4408
|
+
/** @type {?} */
|
|
4409
|
+
var visit = this.routerVisit.value;
|
|
4410
|
+
console.log({
|
|
4411
|
+
visit: visit,
|
|
4412
|
+
place: visit ? visit.placeDefinition.component : null,
|
|
4413
|
+
inOutletActivation: this._inOutletActivation.value,
|
|
4414
|
+
inRoutingSession: this.placeRouter.navigationSessionActive.value,
|
|
4415
|
+
});
|
|
4416
|
+
if (visit) { // can be null while the place and index sync up
|
|
4417
|
+
this._inRouteVisitUpdate.whileTrue((/**
|
|
4418
|
+
* @return {?}
|
|
4419
|
+
*/
|
|
4420
|
+
function () {
|
|
4421
|
+
_this._activePlaceVisitModel.value = visit;
|
|
4422
|
+
}));
|
|
4423
|
+
}
|
|
4424
|
+
};
|
|
4403
4425
|
/**
|
|
4404
4426
|
* @param {?} next
|
|
4405
4427
|
* @param {?} previous
|
|
@@ -4447,7 +4469,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4447
4469
|
*/
|
|
4448
4470
|
function (routerOutlet, place) {
|
|
4449
4471
|
var _this = this;
|
|
4450
|
-
this.
|
|
4472
|
+
this._inOutletActivation.whileTrue((/**
|
|
4451
4473
|
* @return {?}
|
|
4452
4474
|
*/
|
|
4453
4475
|
function () {
|
|
@@ -4477,15 +4499,15 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4477
4499
|
*/
|
|
4478
4500
|
function () {
|
|
4479
4501
|
var _this = this;
|
|
4480
|
-
this.
|
|
4502
|
+
this._inOutletDeactivation.whileTrue((/**
|
|
4481
4503
|
* @return {?}
|
|
4482
4504
|
*/
|
|
4483
4505
|
function () {
|
|
4484
|
-
_this._activePlaceVisitModel.setDelegate(null);
|
|
4485
4506
|
_this.isOnInitialPlace = false;
|
|
4486
4507
|
_this._activePlace.value = null;
|
|
4487
4508
|
_this._activatedRouteModel.value = null;
|
|
4488
4509
|
_this._placeDefinition.value = null;
|
|
4510
|
+
_this._activePlaceVisitModel.setDelegate(null);
|
|
4489
4511
|
}));
|
|
4490
4512
|
};
|
|
4491
4513
|
/**
|
|
@@ -4544,6 +4566,12 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4544
4566
|
__metadata("design:paramtypes", [Visit]),
|
|
4545
4567
|
__metadata("design:returntype", void 0)
|
|
4546
4568
|
], PlaceOutletComponent.prototype, "navigate", null);
|
|
4569
|
+
__decorate([
|
|
4570
|
+
Trace(),
|
|
4571
|
+
__metadata("design:type", Function),
|
|
4572
|
+
__metadata("design:paramtypes", []),
|
|
4573
|
+
__metadata("design:returntype", void 0)
|
|
4574
|
+
], PlaceOutletComponent.prototype, "pushRouteChangesToVisit", null);
|
|
4547
4575
|
__decorate([
|
|
4548
4576
|
Trace(),
|
|
4549
4577
|
__metadata("design:type", Function),
|
|
@@ -4591,11 +4619,26 @@ if (false) {
|
|
|
4591
4619
|
* @private
|
|
4592
4620
|
*/
|
|
4593
4621
|
PlaceOutletComponent.prototype._activePlaceVisitModel;
|
|
4622
|
+
/**
|
|
4623
|
+
* @type {?}
|
|
4624
|
+
* @private
|
|
4625
|
+
*/
|
|
4626
|
+
PlaceOutletComponent.prototype._inOutletActivation;
|
|
4627
|
+
/**
|
|
4628
|
+
* @type {?}
|
|
4629
|
+
* @private
|
|
4630
|
+
*/
|
|
4631
|
+
PlaceOutletComponent.prototype._inOutletDeactivation;
|
|
4594
4632
|
/**
|
|
4595
4633
|
* @type {?}
|
|
4596
4634
|
* @private
|
|
4597
4635
|
*/
|
|
4598
4636
|
PlaceOutletComponent.prototype._inOutletUpdate;
|
|
4637
|
+
/**
|
|
4638
|
+
* @type {?}
|
|
4639
|
+
* @private
|
|
4640
|
+
*/
|
|
4641
|
+
PlaceOutletComponent.prototype._inRouteVisitUpdate;
|
|
4599
4642
|
/**
|
|
4600
4643
|
* @type {?}
|
|
4601
4644
|
* @private
|
|
@@ -4618,6 +4661,11 @@ if (false) {
|
|
|
4618
4661
|
* @private
|
|
4619
4662
|
*/
|
|
4620
4663
|
PlaceOutletComponent.prototype.isOnInitialPlace;
|
|
4664
|
+
/**
|
|
4665
|
+
* @type {?}
|
|
4666
|
+
* @private
|
|
4667
|
+
*/
|
|
4668
|
+
PlaceOutletComponent.prototype.routerVisit;
|
|
4621
4669
|
/**
|
|
4622
4670
|
* @type {?}
|
|
4623
4671
|
* @private
|
|
@@ -4834,7 +4882,6 @@ var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
4834
4882
|
* @fileoverview added by tsickle
|
|
4835
4883
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4836
4884
|
*/
|
|
4837
|
-
var ɵ0 = { animationDuration: "2000ms" };
|
|
4838
4885
|
var PlaceModule = /** @class */ (function () {
|
|
4839
4886
|
function PlaceModule() {
|
|
4840
4887
|
}
|
|
@@ -4867,7 +4914,7 @@ var PlaceModule = /** @class */ (function () {
|
|
|
4867
4914
|
ListPlaceNavComponent
|
|
4868
4915
|
],
|
|
4869
4916
|
providers: [
|
|
4870
|
-
|
|
4917
|
+
// {provide: AUP_PLACE_CONFIG, useValue: {animationDuration: "2000ms"}}
|
|
4871
4918
|
]
|
|
4872
4919
|
},] }
|
|
4873
4920
|
];
|