@coolon/angular-ui-powerups 0.0.87 → 0.0.88
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 +34 -35
- 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 +8 -8
- package/esm2015/lib/place/place-router.js +3 -13
- package/esm2015/lib/place/route/guards/leave-place.guard.js +19 -16
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +8 -8
- package/esm5/lib/place/place-router.js +11 -15
- package/esm5/lib/place/route/guards/leave-place.guard.js +18 -15
- package/fesm2015/coolon-angular-ui-powerups.js +27 -34
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +34 -35
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/route/guards/leave-place.guard.d.ts +2 -2
- package/package.json +1 -1
|
@@ -4253,12 +4253,16 @@
|
|
|
4253
4253
|
[def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
|
|
4254
4254
|
[def.getFormattedRouteParameters(visit)];
|
|
4255
4255
|
};
|
|
4256
|
+
// @Trace()
|
|
4257
|
+
// @Trace()
|
|
4256
4258
|
/**
|
|
4257
4259
|
* @private
|
|
4258
4260
|
* @param {?} event
|
|
4259
4261
|
* @return {?}
|
|
4260
4262
|
*/
|
|
4261
|
-
PlaceRouter.prototype.onAngularRouterStarted =
|
|
4263
|
+
PlaceRouter.prototype.onAngularRouterStarted =
|
|
4264
|
+
// @Trace()
|
|
4265
|
+
/**
|
|
4262
4266
|
* @private
|
|
4263
4267
|
* @param {?} event
|
|
4264
4268
|
* @return {?}
|
|
@@ -4275,11 +4279,15 @@
|
|
|
4275
4279
|
}
|
|
4276
4280
|
this.firstRoute = false;
|
|
4277
4281
|
};
|
|
4282
|
+
// @Trace()
|
|
4283
|
+
// @Trace()
|
|
4278
4284
|
/**
|
|
4279
4285
|
* @private
|
|
4280
4286
|
* @return {?}
|
|
4281
4287
|
*/
|
|
4282
|
-
PlaceRouter.prototype.onAngularRouterFinished =
|
|
4288
|
+
PlaceRouter.prototype.onAngularRouterFinished =
|
|
4289
|
+
// @Trace()
|
|
4290
|
+
/**
|
|
4283
4291
|
* @private
|
|
4284
4292
|
* @return {?}
|
|
4285
4293
|
*/
|
|
@@ -4334,18 +4342,6 @@
|
|
|
4334
4342
|
__metadata("design:paramtypes", [Visit, Object]),
|
|
4335
4343
|
__metadata("design:returntype", Promise)
|
|
4336
4344
|
], PlaceRouter.prototype, "navigate", null);
|
|
4337
|
-
__decorate([
|
|
4338
|
-
pectin.Trace(),
|
|
4339
|
-
__metadata("design:type", Function),
|
|
4340
|
-
__metadata("design:paramtypes", [router.NavigationStart]),
|
|
4341
|
-
__metadata("design:returntype", void 0)
|
|
4342
|
-
], PlaceRouter.prototype, "onAngularRouterStarted", null);
|
|
4343
|
-
__decorate([
|
|
4344
|
-
pectin.Trace(),
|
|
4345
|
-
__metadata("design:type", Function),
|
|
4346
|
-
__metadata("design:paramtypes", []),
|
|
4347
|
-
__metadata("design:returntype", void 0)
|
|
4348
|
-
], PlaceRouter.prototype, "onAngularRouterFinished", null);
|
|
4349
4345
|
return PlaceRouter;
|
|
4350
4346
|
}(pectin.GarbageCollector));
|
|
4351
4347
|
if (false) {
|
|
@@ -4615,12 +4611,12 @@
|
|
|
4615
4611
|
var _this = this;
|
|
4616
4612
|
/** @type {?} */
|
|
4617
4613
|
var visit = this.routerVisit.value;
|
|
4618
|
-
console.log({
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
});
|
|
4614
|
+
// console.log({
|
|
4615
|
+
// visit,
|
|
4616
|
+
// place: visit ? visit.placeDefinition.component : null,
|
|
4617
|
+
// inOutletActivation: this._inOutletActivation.value,
|
|
4618
|
+
// inRoutingSession: this.placeRouter.navigationSessionActive.value
|
|
4619
|
+
// });
|
|
4624
4620
|
if (visit) { // can be null while the place and index sync up
|
|
4625
4621
|
this._inRouteVisitUpdate.whileTrue((/**
|
|
4626
4622
|
* @return {?}
|
|
@@ -4736,7 +4732,7 @@
|
|
|
4736
4732
|
* @return {?}
|
|
4737
4733
|
*/
|
|
4738
4734
|
function () {
|
|
4739
|
-
console.log({ activePlace: this._activePlace.value });
|
|
4735
|
+
// console.log({ activePlace: this._activePlace.value });
|
|
4740
4736
|
};
|
|
4741
4737
|
// @Trace()
|
|
4742
4738
|
// @Trace()
|
|
@@ -6328,11 +6324,11 @@
|
|
|
6328
6324
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
6329
6325
|
*/
|
|
6330
6326
|
var LeavePlaceGuard = /** @class */ (function () {
|
|
6331
|
-
function LeavePlaceGuard(router, injector, placeRouter,
|
|
6327
|
+
function LeavePlaceGuard(router, injector, placeRouter, dialogInteractionContext, angularLocation) {
|
|
6332
6328
|
this.router = router;
|
|
6333
6329
|
this.injector = injector;
|
|
6334
6330
|
this.placeRouter = placeRouter;
|
|
6335
|
-
this.
|
|
6331
|
+
this.dialogInteractionContext = dialogInteractionContext;
|
|
6336
6332
|
this.angularLocation = angularLocation;
|
|
6337
6333
|
}
|
|
6338
6334
|
// @Trace()
|
|
@@ -6444,19 +6440,22 @@
|
|
|
6444
6440
|
// we check the dialog interaction first, so that components that don't need to check if they're in an
|
|
6445
6441
|
// interaction during the canDeactivate cycle.
|
|
6446
6442
|
// TODO: Add tests: show dialog -> hit back -> same route
|
|
6447
|
-
if (this.
|
|
6448
|
-
console.log('cancelling', { activity: this.
|
|
6449
|
-
this.
|
|
6443
|
+
if (this.dialogInteractionContext.isActive()) {
|
|
6444
|
+
console.log('cancelling', { activity: this.dialogInteractionContext.currentActivity });
|
|
6445
|
+
this.dialogInteractionContext.currentActivity.cancel(null);
|
|
6450
6446
|
canLeave = false;
|
|
6451
6447
|
}
|
|
6452
6448
|
else {
|
|
6453
6449
|
canLeave = true;
|
|
6454
6450
|
}
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6451
|
+
if (canLeave) {
|
|
6452
|
+
// now check if the component has an active interaction. This will handle
|
|
6453
|
+
// an inplace interaction contexts
|
|
6454
|
+
if (component.interactionContext && component.interactionContext.isActive()) {
|
|
6455
|
+
canLeave = false;
|
|
6456
|
+
console.log('cancelling', { activity: component.interactionContext.currentActivity });
|
|
6457
|
+
component.interactionContext.currentActivity.cancel(null);
|
|
6458
|
+
}
|
|
6460
6459
|
}
|
|
6461
6460
|
if (!canLeave) return [3 /*break*/, 3];
|
|
6462
6461
|
return [4 /*yield*/, component.canDeactivate()];
|
|
@@ -6466,9 +6465,9 @@
|
|
|
6466
6465
|
_a.label = 3;
|
|
6467
6466
|
case 3: return [3 /*break*/, 5];
|
|
6468
6467
|
case 4:
|
|
6469
|
-
if (this.
|
|
6470
|
-
console.log('cancelling', { activity: this.
|
|
6471
|
-
this.
|
|
6468
|
+
if (this.dialogInteractionContext.isActive()) {
|
|
6469
|
+
console.log('cancelling', { activity: this.dialogInteractionContext.currentActivity });
|
|
6470
|
+
this.dialogInteractionContext.currentActivity.cancel(null);
|
|
6472
6471
|
canLeave = false;
|
|
6473
6472
|
}
|
|
6474
6473
|
else {
|
|
@@ -6527,7 +6526,7 @@
|
|
|
6527
6526
|
*/
|
|
6528
6527
|
LeavePlaceGuard.prototype.placeRouter;
|
|
6529
6528
|
/** @type {?} */
|
|
6530
|
-
LeavePlaceGuard.prototype.
|
|
6529
|
+
LeavePlaceGuard.prototype.dialogInteractionContext;
|
|
6531
6530
|
/** @type {?} */
|
|
6532
6531
|
LeavePlaceGuard.prototype.angularLocation;
|
|
6533
6532
|
}
|