@coolon/angular-ui-powerups 0.0.80 → 0.0.83
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 +86 -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/interaction/components/alert-dialog/alert-dialog.component.js +3 -3
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +3 -3
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +3 -3
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +52 -19
- package/esm2015/lib/place/place-component.js +13 -4
- package/esm2015/lib/place/place.module.js +5 -2
- package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +3 -3
- package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +3 -3
- package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +3 -3
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +57 -29
- package/esm5/lib/place/place-component.js +26 -4
- package/esm5/lib/place/place.module.js +5 -2
- package/fesm2015/coolon-angular-ui-powerups.js +69 -26
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +87 -36
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +3 -9
- package/lib/place/place-component.d.ts +8 -3
- package/package.json +1 -1
|
@@ -1447,8 +1447,8 @@
|
|
|
1447
1447
|
AlertDialogComponent.decorators = [
|
|
1448
1448
|
{ type: core.Component, args: [{
|
|
1449
1449
|
selector: 'aup-alert-dialog',
|
|
1450
|
-
template: "<h3 matDialogTitle *ngIf=\"alert.title\">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of alert.content()\">{{line}}</p>\n</div>\n<
|
|
1451
|
-
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
|
|
1450
|
+
template: "<h3 matDialogTitle *ngIf=\"alert.title\">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of alert.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-raised-button color=\"primary\" (click)=\"done()\" data-cy=\"close-button\">{{alert.ok()}}</button>\n</div>\n",
|
|
1451
|
+
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]
|
|
1452
1452
|
}] }
|
|
1453
1453
|
];
|
|
1454
1454
|
/** @nocollapse */
|
|
@@ -1528,8 +1528,8 @@
|
|
|
1528
1528
|
ConfirmThenDialogComponent.decorators = [
|
|
1529
1529
|
{ type: core.Component, args: [{
|
|
1530
1530
|
selector: 'aup-confirmation-dialog',
|
|
1531
|
-
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<
|
|
1532
|
-
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
|
|
1531
|
+
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"onConfirm()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n",
|
|
1532
|
+
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]
|
|
1533
1533
|
}] }
|
|
1534
1534
|
];
|
|
1535
1535
|
/** @nocollapse */
|
|
@@ -1594,8 +1594,8 @@
|
|
|
1594
1594
|
ConfirmationDialogComponent.decorators = [
|
|
1595
1595
|
{ type: core.Component, args: [{
|
|
1596
1596
|
selector: 'aup-confirmation-dialog',
|
|
1597
|
-
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<
|
|
1598
|
-
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
|
|
1597
|
+
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"done()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n",
|
|
1598
|
+
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]
|
|
1599
1599
|
}] }
|
|
1600
1600
|
];
|
|
1601
1601
|
/** @nocollapse */
|
|
@@ -3486,13 +3486,36 @@
|
|
|
3486
3486
|
*/
|
|
3487
3487
|
function () {
|
|
3488
3488
|
};
|
|
3489
|
+
/**
|
|
3490
|
+
* Called by the place outlet after all animations have finished. We need this instead of ngOnDestroy
|
|
3491
|
+
* to avoid the fact that the angular router calls it before the animations have run causing the component
|
|
3492
|
+
* to loose any pectin bindings.
|
|
3493
|
+
*/
|
|
3494
|
+
// @Trace()
|
|
3495
|
+
/**
|
|
3496
|
+
* Called by the place outlet after all animations have finished. We need this instead of ngOnDestroy
|
|
3497
|
+
* to avoid the fact that the angular router calls it before the animations have run causing the component
|
|
3498
|
+
* to loose any pectin bindings.
|
|
3499
|
+
* @return {?}
|
|
3500
|
+
*/
|
|
3501
|
+
// @Trace()
|
|
3502
|
+
PlaceComponent.prototype.onPlaceDestroyed = /**
|
|
3503
|
+
* Called by the place outlet after all animations have finished. We need this instead of ngOnDestroy
|
|
3504
|
+
* to avoid the fact that the angular router calls it before the animations have run causing the component
|
|
3505
|
+
* to loose any pectin bindings.
|
|
3506
|
+
* @return {?}
|
|
3507
|
+
*/
|
|
3508
|
+
// @Trace()
|
|
3509
|
+
function () {
|
|
3510
|
+
this.dispose();
|
|
3511
|
+
};
|
|
3489
3512
|
__decorate([
|
|
3490
3513
|
fastMemoizeDecorator.Memoize(),
|
|
3491
3514
|
__metadata("design:type", exports.PlaceDefinition),
|
|
3492
3515
|
__metadata("design:paramtypes", [])
|
|
3493
3516
|
], PlaceComponent.prototype, "placeDefinition", null);
|
|
3494
3517
|
return PlaceComponent;
|
|
3495
|
-
}(
|
|
3518
|
+
}(pectin.GarbageCollector));
|
|
3496
3519
|
if (false) {
|
|
3497
3520
|
/**
|
|
3498
3521
|
* @type {?}
|
|
@@ -4440,13 +4463,14 @@
|
|
|
4440
4463
|
_this.animate = true;
|
|
4441
4464
|
_this.placeChanged = new core.EventEmitter();
|
|
4442
4465
|
_this._activePlace = new pectin.MutableValueModel();
|
|
4443
|
-
_this.
|
|
4466
|
+
_this._activePlaceVisitModel = new pectin.DelegatingValueModel();
|
|
4444
4467
|
_this._inOutletUpdate = new pectin.Guard();
|
|
4445
4468
|
_this._activatedRouteModel = new pectin.MutableValueModel();
|
|
4446
4469
|
_this._placeDefinition = new pectin.MutableValueModel();
|
|
4447
4470
|
_this.isOnInitialPlace = true;
|
|
4448
4471
|
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;
|
|
4449
4472
|
_this.parentOutletModel = new pectin.MutableValueModel(parentOutlet);
|
|
4473
|
+
_this._activePlaceVisitModel.setDelegate(new pectin.MutableValueModel());
|
|
4450
4474
|
/** @type {?} */
|
|
4451
4475
|
var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
|
|
4452
4476
|
.pullValueModel((/**
|
|
@@ -4454,9 +4478,9 @@
|
|
|
4454
4478
|
* @return {?}
|
|
4455
4479
|
*/
|
|
4456
4480
|
function (o) { return o.activePlaceModel; }))
|
|
4457
|
-
.pluck(
|
|
4458
|
-
.pluckList(
|
|
4459
|
-
.pluck(
|
|
4481
|
+
.pluck('placeDefinition')
|
|
4482
|
+
.pluckList('children')
|
|
4483
|
+
.pluck('component');
|
|
4460
4484
|
/** @type {?} */
|
|
4461
4485
|
var activatePlaceType = chain(_this.activePlaceModel).map((/**
|
|
4462
4486
|
* @param {?} p
|
|
@@ -4486,17 +4510,18 @@
|
|
|
4486
4510
|
* @return {?}
|
|
4487
4511
|
*/
|
|
4488
4512
|
function (visit) {
|
|
4513
|
+
console.log("### Route visit changed");
|
|
4489
4514
|
if (visit) { // can be null while the place and index sync up
|
|
4490
4515
|
inRouteVisitUpdate.whileTrue((/**
|
|
4491
4516
|
* @return {?}
|
|
4492
4517
|
*/
|
|
4493
4518
|
function () {
|
|
4494
|
-
_this.
|
|
4519
|
+
_this._activePlaceVisitModel.value = visit;
|
|
4495
4520
|
}));
|
|
4496
4521
|
}
|
|
4497
4522
|
}));
|
|
4498
4523
|
// Handle component based changes
|
|
4499
|
-
when.valueOf(_this.
|
|
4524
|
+
when.valueOf(_this._activePlaceVisitModel).changes((/**
|
|
4500
4525
|
* @param {?} next
|
|
4501
4526
|
* @param {?} previous
|
|
4502
4527
|
* @return {?}
|
|
@@ -4504,7 +4529,7 @@
|
|
|
4504
4529
|
function (next, previous) {
|
|
4505
4530
|
_this.pushVisitChangesToRoute(next, previous);
|
|
4506
4531
|
}), {
|
|
4507
|
-
unless: inRouteVisitUpdate
|
|
4532
|
+
unless: valueOf.any(_this._inOutletUpdate, inRouteVisitUpdate).areTruthy()
|
|
4508
4533
|
});
|
|
4509
4534
|
chain(_this._activePlace)
|
|
4510
4535
|
.postponeWhile(placeRouter.navigationSessionActive)
|
|
@@ -4530,7 +4555,7 @@
|
|
|
4530
4555
|
* @return {?}
|
|
4531
4556
|
*/
|
|
4532
4557
|
function () {
|
|
4533
|
-
return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration :
|
|
4558
|
+
return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';
|
|
4534
4559
|
},
|
|
4535
4560
|
enumerable: true,
|
|
4536
4561
|
configurable: true
|
|
@@ -4594,16 +4619,12 @@
|
|
|
4594
4619
|
enumerable: true,
|
|
4595
4620
|
configurable: true
|
|
4596
4621
|
});
|
|
4597
|
-
// @Trace()
|
|
4598
|
-
// @Trace()
|
|
4599
4622
|
/**
|
|
4600
4623
|
* @param {?} routerOutlet
|
|
4601
4624
|
* @param {?} place
|
|
4602
4625
|
* @return {?}
|
|
4603
4626
|
*/
|
|
4604
|
-
PlaceOutletComponent.prototype.onOutletActivated =
|
|
4605
|
-
// @Trace()
|
|
4606
|
-
/**
|
|
4627
|
+
PlaceOutletComponent.prototype.onOutletActivated = /**
|
|
4607
4628
|
* @param {?} routerOutlet
|
|
4608
4629
|
* @param {?} place
|
|
4609
4630
|
* @return {?}
|
|
@@ -4618,7 +4639,10 @@
|
|
|
4618
4639
|
_this._activePlace.value = place;
|
|
4619
4640
|
_this._activatedRouteModel.value = routerOutlet.activatedRoute;
|
|
4620
4641
|
_this._placeDefinition.value = place.placeDefinition;
|
|
4621
|
-
|
|
4642
|
+
/** @type {?} */
|
|
4643
|
+
var visitModel = new pectin.MutableValueModel();
|
|
4644
|
+
_this._activePlaceVisitModel.setDelegate(visitModel);
|
|
4645
|
+
place.initialiseBindings(visitModel);
|
|
4622
4646
|
}
|
|
4623
4647
|
catch (error) {
|
|
4624
4648
|
console.error(error);
|
|
@@ -4629,32 +4653,34 @@
|
|
|
4629
4653
|
this.animationDone();
|
|
4630
4654
|
}
|
|
4631
4655
|
};
|
|
4632
|
-
// @Trace()
|
|
4633
|
-
// @Trace()
|
|
4634
4656
|
/**
|
|
4635
|
-
* @param {?} routerOutlet
|
|
4636
|
-
* @param {?} $event
|
|
4637
4657
|
* @return {?}
|
|
4638
4658
|
*/
|
|
4639
|
-
PlaceOutletComponent.prototype.onOutletDeactivated =
|
|
4640
|
-
// @Trace()
|
|
4641
|
-
/**
|
|
4642
|
-
* @param {?} routerOutlet
|
|
4643
|
-
* @param {?} $event
|
|
4659
|
+
PlaceOutletComponent.prototype.onOutletDeactivated = /**
|
|
4644
4660
|
* @return {?}
|
|
4645
4661
|
*/
|
|
4646
|
-
function (
|
|
4662
|
+
function () {
|
|
4647
4663
|
var _this = this;
|
|
4648
4664
|
this._inOutletUpdate.whileTrue((/**
|
|
4649
4665
|
* @return {?}
|
|
4650
4666
|
*/
|
|
4651
4667
|
function () {
|
|
4668
|
+
_this._activePlaceVisitModel.setDelegate(null);
|
|
4652
4669
|
_this.isOnInitialPlace = false;
|
|
4653
4670
|
_this._activePlace.value = null;
|
|
4654
4671
|
_this._activatedRouteModel.value = null;
|
|
4655
4672
|
_this._placeDefinition.value = null;
|
|
4656
4673
|
}));
|
|
4657
4674
|
};
|
|
4675
|
+
/**
|
|
4676
|
+
* @return {?}
|
|
4677
|
+
*/
|
|
4678
|
+
PlaceOutletComponent.prototype.animationStarted = /**
|
|
4679
|
+
* @return {?}
|
|
4680
|
+
*/
|
|
4681
|
+
function () {
|
|
4682
|
+
console.log({ activePlace: this._activePlace.value });
|
|
4683
|
+
};
|
|
4658
4684
|
/**
|
|
4659
4685
|
* @return {?}
|
|
4660
4686
|
*/
|
|
@@ -4669,7 +4695,7 @@
|
|
|
4669
4695
|
PlaceOutletComponent.decorators = [
|
|
4670
4696
|
{ type: core.Component, args: [{
|
|
4671
4697
|
selector: 'aup-place-outlet',
|
|
4672
|
-
template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"{value: placeAnimationOrder.value, params:{duration: animationDuration}}\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated(
|
|
4698
|
+
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",
|
|
4673
4699
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
4674
4700
|
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}"]
|
|
4675
4701
|
}] }
|
|
@@ -4693,7 +4719,7 @@
|
|
|
4693
4719
|
__metadata("design:type", pectin.ListModel)
|
|
4694
4720
|
], PlaceOutletComponent.prototype, "customPlaceAnimationOrderModel", void 0);
|
|
4695
4721
|
__decorate([
|
|
4696
|
-
pectin.StoreInListModel(
|
|
4722
|
+
pectin.StoreInListModel('customPlaceAnimationOrderModel'),
|
|
4697
4723
|
__metadata("design:type", Array)
|
|
4698
4724
|
], PlaceOutletComponent.prototype, "customPlaceAnimationOrder", void 0);
|
|
4699
4725
|
__decorate([
|
|
@@ -4702,6 +4728,30 @@
|
|
|
4702
4728
|
__metadata("design:paramtypes", [Visit]),
|
|
4703
4729
|
__metadata("design:returntype", void 0)
|
|
4704
4730
|
], PlaceOutletComponent.prototype, "navigate", null);
|
|
4731
|
+
__decorate([
|
|
4732
|
+
pectin.Trace(),
|
|
4733
|
+
__metadata("design:type", Function),
|
|
4734
|
+
__metadata("design:paramtypes", [router.RouterOutlet, exports.PlaceComponent]),
|
|
4735
|
+
__metadata("design:returntype", void 0)
|
|
4736
|
+
], PlaceOutletComponent.prototype, "onOutletActivated", null);
|
|
4737
|
+
__decorate([
|
|
4738
|
+
pectin.Trace(),
|
|
4739
|
+
__metadata("design:type", Function),
|
|
4740
|
+
__metadata("design:paramtypes", []),
|
|
4741
|
+
__metadata("design:returntype", void 0)
|
|
4742
|
+
], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
|
|
4743
|
+
__decorate([
|
|
4744
|
+
pectin.Trace(),
|
|
4745
|
+
__metadata("design:type", Function),
|
|
4746
|
+
__metadata("design:paramtypes", []),
|
|
4747
|
+
__metadata("design:returntype", void 0)
|
|
4748
|
+
], PlaceOutletComponent.prototype, "animationStarted", null);
|
|
4749
|
+
__decorate([
|
|
4750
|
+
pectin.Trace(),
|
|
4751
|
+
__metadata("design:type", Function),
|
|
4752
|
+
__metadata("design:paramtypes", []),
|
|
4753
|
+
__metadata("design:returntype", void 0)
|
|
4754
|
+
], PlaceOutletComponent.prototype, "animationDone", null);
|
|
4705
4755
|
return PlaceOutletComponent;
|
|
4706
4756
|
}(DisposableComponent));
|
|
4707
4757
|
if (false) {
|
|
@@ -4724,7 +4774,7 @@
|
|
|
4724
4774
|
* @type {?}
|
|
4725
4775
|
* @private
|
|
4726
4776
|
*/
|
|
4727
|
-
PlaceOutletComponent.prototype.
|
|
4777
|
+
PlaceOutletComponent.prototype._activePlaceVisitModel;
|
|
4728
4778
|
/**
|
|
4729
4779
|
* @type {?}
|
|
4730
4780
|
* @private
|
|
@@ -4968,6 +5018,7 @@
|
|
|
4968
5018
|
* @fileoverview added by tsickle
|
|
4969
5019
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4970
5020
|
*/
|
|
5021
|
+
var ɵ0 = { animationDuration: "2000ms" };
|
|
4971
5022
|
var PlaceModule = /** @class */ (function () {
|
|
4972
5023
|
function PlaceModule() {
|
|
4973
5024
|
}
|
|
@@ -5000,7 +5051,7 @@
|
|
|
5000
5051
|
ListPlaceNavComponent
|
|
5001
5052
|
],
|
|
5002
5053
|
providers: [
|
|
5003
|
-
|
|
5054
|
+
{ provide: AUP_PLACE_CONFIG, useValue: ɵ0 }
|
|
5004
5055
|
]
|
|
5005
5056
|
},] }
|
|
5006
5057
|
];
|