@coolon/angular-ui-powerups 0.0.87 → 0.0.89
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 +117 -109
- 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/abstract-place-navigation.component.js +9 -2
- 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/place.module.js +6 -3
- package/esm2015/lib/place/route/guards/leave-place.guard.js +19 -16
- package/esm5/lib/place/components/abstract-place-navigation.component.js +9 -2
- 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/place.module.js +6 -3
- package/esm5/lib/place/route/guards/leave-place.guard.js +18 -15
- package/fesm2015/coolon-angular-ui-powerups.js +107 -105
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +118 -110
- 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
|
@@ -2661,78 +2661,6 @@
|
|
|
2661
2661
|
return InteractionModule;
|
|
2662
2662
|
}());
|
|
2663
2663
|
|
|
2664
|
-
/**
|
|
2665
|
-
* @fileoverview added by tsickle
|
|
2666
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2667
|
-
*/
|
|
2668
|
-
var BusyOverlayComponent = /** @class */ (function () {
|
|
2669
|
-
function BusyOverlayComponent() {
|
|
2670
|
-
}
|
|
2671
|
-
/**
|
|
2672
|
-
* @return {?}
|
|
2673
|
-
*/
|
|
2674
|
-
BusyOverlayComponent.prototype.ngOnInit = /**
|
|
2675
|
-
* @return {?}
|
|
2676
|
-
*/
|
|
2677
|
-
function () {
|
|
2678
|
-
};
|
|
2679
|
-
BusyOverlayComponent.decorators = [
|
|
2680
|
-
{ type: core.Component, args: [{
|
|
2681
|
-
selector: 'aup-busy-overlay',
|
|
2682
|
-
template: "<ng-content></ng-content>\n<div class=\"busy-overlay-backdrop\" *ngIf=\"busyModel.value\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"52\"></mat-progress-spinner>\n</div>\n",
|
|
2683
|
-
styles: [":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]
|
|
2684
|
-
}] }
|
|
2685
|
-
];
|
|
2686
|
-
/** @nocollapse */
|
|
2687
|
-
BusyOverlayComponent.ctorParameters = function () { return []; };
|
|
2688
|
-
BusyOverlayComponent.propDecorators = {
|
|
2689
|
-
busyModel: [{ type: core.Input }],
|
|
2690
|
-
busy: [{ type: core.Input }]
|
|
2691
|
-
};
|
|
2692
|
-
__decorate([
|
|
2693
|
-
pectin.UseDelegate(),
|
|
2694
|
-
__metadata("design:type", pectin.ValueModel)
|
|
2695
|
-
], BusyOverlayComponent.prototype, "busyModel", void 0);
|
|
2696
|
-
__decorate([
|
|
2697
|
-
pectin.StoreInValueModel('busyModel'),
|
|
2698
|
-
__metadata("design:type", Boolean)
|
|
2699
|
-
], BusyOverlayComponent.prototype, "busy", void 0);
|
|
2700
|
-
return BusyOverlayComponent;
|
|
2701
|
-
}());
|
|
2702
|
-
if (false) {
|
|
2703
|
-
/** @type {?} */
|
|
2704
|
-
BusyOverlayComponent.prototype.busyModel;
|
|
2705
|
-
/** @type {?} */
|
|
2706
|
-
BusyOverlayComponent.prototype.busy;
|
|
2707
|
-
}
|
|
2708
|
-
|
|
2709
|
-
/**
|
|
2710
|
-
* @fileoverview added by tsickle
|
|
2711
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2712
|
-
*/
|
|
2713
|
-
var EmptyStateComponent = /** @class */ (function () {
|
|
2714
|
-
function EmptyStateComponent() {
|
|
2715
|
-
}
|
|
2716
|
-
/**
|
|
2717
|
-
* @return {?}
|
|
2718
|
-
*/
|
|
2719
|
-
EmptyStateComponent.prototype.ngOnInit = /**
|
|
2720
|
-
* @return {?}
|
|
2721
|
-
*/
|
|
2722
|
-
function () {
|
|
2723
|
-
};
|
|
2724
|
-
EmptyStateComponent.decorators = [
|
|
2725
|
-
{ type: core.Component, args: [{
|
|
2726
|
-
selector: 'aup-empty-state',
|
|
2727
|
-
template: "\n <div class=\"container\">\n <ng-content></ng-content>\n </div>\n ",
|
|
2728
|
-
styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
|
|
2729
|
-
}] }
|
|
2730
|
-
];
|
|
2731
|
-
/** @nocollapse */
|
|
2732
|
-
EmptyStateComponent.ctorParameters = function () { return []; };
|
|
2733
|
-
return EmptyStateComponent;
|
|
2734
|
-
}());
|
|
2735
|
-
|
|
2736
2664
|
/**
|
|
2737
2665
|
* @fileoverview added by tsickle
|
|
2738
2666
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -4253,12 +4181,16 @@
|
|
|
4253
4181
|
[def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
|
|
4254
4182
|
[def.getFormattedRouteParameters(visit)];
|
|
4255
4183
|
};
|
|
4184
|
+
// @Trace()
|
|
4185
|
+
// @Trace()
|
|
4256
4186
|
/**
|
|
4257
4187
|
* @private
|
|
4258
4188
|
* @param {?} event
|
|
4259
4189
|
* @return {?}
|
|
4260
4190
|
*/
|
|
4261
|
-
PlaceRouter.prototype.onAngularRouterStarted =
|
|
4191
|
+
PlaceRouter.prototype.onAngularRouterStarted =
|
|
4192
|
+
// @Trace()
|
|
4193
|
+
/**
|
|
4262
4194
|
* @private
|
|
4263
4195
|
* @param {?} event
|
|
4264
4196
|
* @return {?}
|
|
@@ -4275,11 +4207,15 @@
|
|
|
4275
4207
|
}
|
|
4276
4208
|
this.firstRoute = false;
|
|
4277
4209
|
};
|
|
4210
|
+
// @Trace()
|
|
4211
|
+
// @Trace()
|
|
4278
4212
|
/**
|
|
4279
4213
|
* @private
|
|
4280
4214
|
* @return {?}
|
|
4281
4215
|
*/
|
|
4282
|
-
PlaceRouter.prototype.onAngularRouterFinished =
|
|
4216
|
+
PlaceRouter.prototype.onAngularRouterFinished =
|
|
4217
|
+
// @Trace()
|
|
4218
|
+
/**
|
|
4283
4219
|
* @private
|
|
4284
4220
|
* @return {?}
|
|
4285
4221
|
*/
|
|
@@ -4334,18 +4270,6 @@
|
|
|
4334
4270
|
__metadata("design:paramtypes", [Visit, Object]),
|
|
4335
4271
|
__metadata("design:returntype", Promise)
|
|
4336
4272
|
], 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
4273
|
return PlaceRouter;
|
|
4350
4274
|
}(pectin.GarbageCollector));
|
|
4351
4275
|
if (false) {
|
|
@@ -4615,12 +4539,12 @@
|
|
|
4615
4539
|
var _this = this;
|
|
4616
4540
|
/** @type {?} */
|
|
4617
4541
|
var visit = this.routerVisit.value;
|
|
4618
|
-
console.log({
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
});
|
|
4542
|
+
// console.log({
|
|
4543
|
+
// visit,
|
|
4544
|
+
// place: visit ? visit.placeDefinition.component : null,
|
|
4545
|
+
// inOutletActivation: this._inOutletActivation.value,
|
|
4546
|
+
// inRoutingSession: this.placeRouter.navigationSessionActive.value
|
|
4547
|
+
// });
|
|
4624
4548
|
if (visit) { // can be null while the place and index sync up
|
|
4625
4549
|
this._inRouteVisitUpdate.whileTrue((/**
|
|
4626
4550
|
* @return {?}
|
|
@@ -4736,7 +4660,7 @@
|
|
|
4736
4660
|
* @return {?}
|
|
4737
4661
|
*/
|
|
4738
4662
|
function () {
|
|
4739
|
-
console.log({ activePlace: this._activePlace.value });
|
|
4663
|
+
// console.log({ activePlace: this._activePlace.value });
|
|
4740
4664
|
};
|
|
4741
4665
|
// @Trace()
|
|
4742
4666
|
// @Trace()
|
|
@@ -4940,6 +4864,13 @@
|
|
|
4940
4864
|
*/
|
|
4941
4865
|
function () {
|
|
4942
4866
|
};
|
|
4867
|
+
AbstractPlaceNavigationComponent.decorators = [
|
|
4868
|
+
{ type: core.Component, args: [{
|
|
4869
|
+
template: ''
|
|
4870
|
+
}] }
|
|
4871
|
+
];
|
|
4872
|
+
/** @nocollapse */
|
|
4873
|
+
AbstractPlaceNavigationComponent.ctorParameters = function () { return []; };
|
|
4943
4874
|
AbstractPlaceNavigationComponent.propDecorators = {
|
|
4944
4875
|
places: [{ type: core.Input }],
|
|
4945
4876
|
placesModel: [{ type: core.Input }],
|
|
@@ -4987,6 +4918,78 @@
|
|
|
4987
4918
|
AbstractPlaceNavigationComponent.prototype.activePlaceDefinition;
|
|
4988
4919
|
}
|
|
4989
4920
|
|
|
4921
|
+
/**
|
|
4922
|
+
* @fileoverview added by tsickle
|
|
4923
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4924
|
+
*/
|
|
4925
|
+
var BusyOverlayComponent = /** @class */ (function () {
|
|
4926
|
+
function BusyOverlayComponent() {
|
|
4927
|
+
}
|
|
4928
|
+
/**
|
|
4929
|
+
* @return {?}
|
|
4930
|
+
*/
|
|
4931
|
+
BusyOverlayComponent.prototype.ngOnInit = /**
|
|
4932
|
+
* @return {?}
|
|
4933
|
+
*/
|
|
4934
|
+
function () {
|
|
4935
|
+
};
|
|
4936
|
+
BusyOverlayComponent.decorators = [
|
|
4937
|
+
{ type: core.Component, args: [{
|
|
4938
|
+
selector: 'aup-busy-overlay',
|
|
4939
|
+
template: "<ng-content></ng-content>\n<div class=\"busy-overlay-backdrop\" *ngIf=\"busyModel.value\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"52\"></mat-progress-spinner>\n</div>\n",
|
|
4940
|
+
styles: [":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]
|
|
4941
|
+
}] }
|
|
4942
|
+
];
|
|
4943
|
+
/** @nocollapse */
|
|
4944
|
+
BusyOverlayComponent.ctorParameters = function () { return []; };
|
|
4945
|
+
BusyOverlayComponent.propDecorators = {
|
|
4946
|
+
busyModel: [{ type: core.Input }],
|
|
4947
|
+
busy: [{ type: core.Input }]
|
|
4948
|
+
};
|
|
4949
|
+
__decorate([
|
|
4950
|
+
pectin.UseDelegate(),
|
|
4951
|
+
__metadata("design:type", pectin.ValueModel)
|
|
4952
|
+
], BusyOverlayComponent.prototype, "busyModel", void 0);
|
|
4953
|
+
__decorate([
|
|
4954
|
+
pectin.StoreInValueModel('busyModel'),
|
|
4955
|
+
__metadata("design:type", Boolean)
|
|
4956
|
+
], BusyOverlayComponent.prototype, "busy", void 0);
|
|
4957
|
+
return BusyOverlayComponent;
|
|
4958
|
+
}());
|
|
4959
|
+
if (false) {
|
|
4960
|
+
/** @type {?} */
|
|
4961
|
+
BusyOverlayComponent.prototype.busyModel;
|
|
4962
|
+
/** @type {?} */
|
|
4963
|
+
BusyOverlayComponent.prototype.busy;
|
|
4964
|
+
}
|
|
4965
|
+
|
|
4966
|
+
/**
|
|
4967
|
+
* @fileoverview added by tsickle
|
|
4968
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4969
|
+
*/
|
|
4970
|
+
var EmptyStateComponent = /** @class */ (function () {
|
|
4971
|
+
function EmptyStateComponent() {
|
|
4972
|
+
}
|
|
4973
|
+
/**
|
|
4974
|
+
* @return {?}
|
|
4975
|
+
*/
|
|
4976
|
+
EmptyStateComponent.prototype.ngOnInit = /**
|
|
4977
|
+
* @return {?}
|
|
4978
|
+
*/
|
|
4979
|
+
function () {
|
|
4980
|
+
};
|
|
4981
|
+
EmptyStateComponent.decorators = [
|
|
4982
|
+
{ type: core.Component, args: [{
|
|
4983
|
+
selector: 'aup-empty-state',
|
|
4984
|
+
template: "\n <div class=\"container\">\n <ng-content></ng-content>\n </div>\n ",
|
|
4985
|
+
styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
|
|
4986
|
+
}] }
|
|
4987
|
+
];
|
|
4988
|
+
/** @nocollapse */
|
|
4989
|
+
EmptyStateComponent.ctorParameters = function () { return []; };
|
|
4990
|
+
return EmptyStateComponent;
|
|
4991
|
+
}());
|
|
4992
|
+
|
|
4990
4993
|
/**
|
|
4991
4994
|
* @fileoverview added by tsickle
|
|
4992
4995
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -5090,7 +5093,8 @@
|
|
|
5090
5093
|
BusyOverlayComponent,
|
|
5091
5094
|
PlaceOutletComponent,
|
|
5092
5095
|
TabbedPlaceNavigationComponent,
|
|
5093
|
-
ListPlaceNavComponent
|
|
5096
|
+
ListPlaceNavComponent,
|
|
5097
|
+
AbstractPlaceNavigationComponent
|
|
5094
5098
|
],
|
|
5095
5099
|
entryComponents: [BusyOverlayComponent],
|
|
5096
5100
|
exports: [
|
|
@@ -5098,7 +5102,8 @@
|
|
|
5098
5102
|
PlaceOutletComponent,
|
|
5099
5103
|
EmptyStateComponent,
|
|
5100
5104
|
TabbedPlaceNavigationComponent,
|
|
5101
|
-
ListPlaceNavComponent
|
|
5105
|
+
ListPlaceNavComponent,
|
|
5106
|
+
AbstractPlaceNavigationComponent
|
|
5102
5107
|
],
|
|
5103
5108
|
providers: [
|
|
5104
5109
|
// {provide: AUP_PLACE_CONFIG, useValue: {animationDuration: "2000ms"}}
|
|
@@ -6328,11 +6333,11 @@
|
|
|
6328
6333
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
6329
6334
|
*/
|
|
6330
6335
|
var LeavePlaceGuard = /** @class */ (function () {
|
|
6331
|
-
function LeavePlaceGuard(router, injector, placeRouter,
|
|
6336
|
+
function LeavePlaceGuard(router, injector, placeRouter, dialogInteractionContext, angularLocation) {
|
|
6332
6337
|
this.router = router;
|
|
6333
6338
|
this.injector = injector;
|
|
6334
6339
|
this.placeRouter = placeRouter;
|
|
6335
|
-
this.
|
|
6340
|
+
this.dialogInteractionContext = dialogInteractionContext;
|
|
6336
6341
|
this.angularLocation = angularLocation;
|
|
6337
6342
|
}
|
|
6338
6343
|
// @Trace()
|
|
@@ -6444,19 +6449,22 @@
|
|
|
6444
6449
|
// we check the dialog interaction first, so that components that don't need to check if they're in an
|
|
6445
6450
|
// interaction during the canDeactivate cycle.
|
|
6446
6451
|
// TODO: Add tests: show dialog -> hit back -> same route
|
|
6447
|
-
if (this.
|
|
6448
|
-
console.log('cancelling', { activity: this.
|
|
6449
|
-
this.
|
|
6452
|
+
if (this.dialogInteractionContext.isActive()) {
|
|
6453
|
+
console.log('cancelling', { activity: this.dialogInteractionContext.currentActivity });
|
|
6454
|
+
this.dialogInteractionContext.currentActivity.cancel(null);
|
|
6450
6455
|
canLeave = false;
|
|
6451
6456
|
}
|
|
6452
6457
|
else {
|
|
6453
6458
|
canLeave = true;
|
|
6454
6459
|
}
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
+
if (canLeave) {
|
|
6461
|
+
// now check if the component has an active interaction. This will handle
|
|
6462
|
+
// an inplace interaction contexts
|
|
6463
|
+
if (component.interactionContext && component.interactionContext.isActive()) {
|
|
6464
|
+
canLeave = false;
|
|
6465
|
+
console.log('cancelling', { activity: component.interactionContext.currentActivity });
|
|
6466
|
+
component.interactionContext.currentActivity.cancel(null);
|
|
6467
|
+
}
|
|
6460
6468
|
}
|
|
6461
6469
|
if (!canLeave) return [3 /*break*/, 3];
|
|
6462
6470
|
return [4 /*yield*/, component.canDeactivate()];
|
|
@@ -6466,9 +6474,9 @@
|
|
|
6466
6474
|
_a.label = 3;
|
|
6467
6475
|
case 3: return [3 /*break*/, 5];
|
|
6468
6476
|
case 4:
|
|
6469
|
-
if (this.
|
|
6470
|
-
console.log('cancelling', { activity: this.
|
|
6471
|
-
this.
|
|
6477
|
+
if (this.dialogInteractionContext.isActive()) {
|
|
6478
|
+
console.log('cancelling', { activity: this.dialogInteractionContext.currentActivity });
|
|
6479
|
+
this.dialogInteractionContext.currentActivity.cancel(null);
|
|
6472
6480
|
canLeave = false;
|
|
6473
6481
|
}
|
|
6474
6482
|
else {
|
|
@@ -6527,7 +6535,7 @@
|
|
|
6527
6535
|
*/
|
|
6528
6536
|
LeavePlaceGuard.prototype.placeRouter;
|
|
6529
6537
|
/** @type {?} */
|
|
6530
|
-
LeavePlaceGuard.prototype.
|
|
6538
|
+
LeavePlaceGuard.prototype.dialogInteractionContext;
|
|
6531
6539
|
/** @type {?} */
|
|
6532
6540
|
LeavePlaceGuard.prototype.angularLocation;
|
|
6533
6541
|
}
|