@coolon/angular-ui-powerups 0.0.79 → 0.0.81
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 +143 -51
- 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.d.ts +20 -19
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +20 -19
- package/esm2015/index.js +2 -2
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +61 -10
- package/esm2015/lib/place/index.js +2 -1
- package/esm2015/lib/place/place-component.js +13 -4
- package/esm2015/lib/place/place-config.js +16 -0
- package/esm2015/lib/place/place.module.js +7 -2
- package/esm2015/public_api.js +2 -2
- package/esm5/coolon-angular-ui-powerups.js +20 -19
- package/esm5/index.js +2 -2
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +69 -18
- package/esm5/lib/place/index.js +2 -1
- package/esm5/lib/place/place-component.js +26 -4
- package/esm5/lib/place/place-config.js +16 -0
- package/esm5/lib/place/place.module.js +7 -2
- package/esm5/public_api.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +89 -12
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +110 -20
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +6 -1
- package/lib/place/index.d.ts +1 -0
- package/lib/place/place-component.d.ts +8 -3
- package/lib/place/place-config.d.ts +5 -0
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
|
7
7
|
import { GarbageCollector, assert, UnaryCommand, lang, Dsl, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingValueModel, MutableStream, MutableListModel, DelegatingListModel, StoreInValueModel, Binding, MutableValueModel, Trace, Guard as Guard$1, Command, OptionsHelper, ValueHolder } from '@coolon/pectin';
|
|
8
8
|
import { __decorate, __metadata, __awaiter } from 'tslib';
|
|
9
9
|
import { PortalModule } from '@angular/cdk/portal';
|
|
10
|
-
import { Router, RouterModule, UrlSegment, NavigationStart, NavigationEnd, NavigationError, ActivatedRouteSnapshot, RouterStateSnapshot, UrlSerializer } from '@angular/router';
|
|
10
|
+
import { Router, RouterModule, UrlSegment, NavigationStart, NavigationEnd, NavigationError, RouterOutlet, ActivatedRouteSnapshot, RouterStateSnapshot, UrlSerializer } from '@angular/router';
|
|
11
11
|
import ___default, { last, isNil, isEqual } from 'lodash';
|
|
12
12
|
import { assert as assert$1, Opts, Klass } from '@coolon/typescript-utilities';
|
|
13
13
|
import { MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS, MatDialog as MatDialog$1 } from '@angular/material/dialog';
|
|
@@ -2584,7 +2584,7 @@ const DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';
|
|
|
2584
2584
|
// this one seems ok.
|
|
2585
2585
|
/** @type {?} */
|
|
2586
2586
|
const ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
2587
|
-
class PlaceComponent extends
|
|
2587
|
+
class PlaceComponent extends GarbageCollector {
|
|
2588
2588
|
constructor() {
|
|
2589
2589
|
super();
|
|
2590
2590
|
}
|
|
@@ -2662,6 +2662,16 @@ class PlaceComponent extends DisposableComponent {
|
|
|
2662
2662
|
*/
|
|
2663
2663
|
onPlaceReady() {
|
|
2664
2664
|
}
|
|
2665
|
+
/**
|
|
2666
|
+
* Called by the place outlet after all animations have finished. We need this instead of ngOnDestroy
|
|
2667
|
+
* to avoid the fact that the angular router calls it before the animations have run causing the component
|
|
2668
|
+
* to loose any pectin bindings.
|
|
2669
|
+
* @return {?}
|
|
2670
|
+
*/
|
|
2671
|
+
// @Trace()
|
|
2672
|
+
onPlaceDestroyed() {
|
|
2673
|
+
this.dispose();
|
|
2674
|
+
}
|
|
2665
2675
|
}
|
|
2666
2676
|
__decorate([
|
|
2667
2677
|
Memoize$1(),
|
|
@@ -2841,6 +2851,21 @@ if (false) {
|
|
|
2841
2851
|
Visit.prototype.visitParameters;
|
|
2842
2852
|
}
|
|
2843
2853
|
|
|
2854
|
+
/**
|
|
2855
|
+
* @fileoverview added by tsickle
|
|
2856
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2857
|
+
*/
|
|
2858
|
+
/** @type {?} */
|
|
2859
|
+
const AUP_PLACE_CONFIG = new InjectionToken('AUP_PLACE_CONFIG');
|
|
2860
|
+
/**
|
|
2861
|
+
* @record
|
|
2862
|
+
*/
|
|
2863
|
+
function PlaceConfig() { }
|
|
2864
|
+
if (false) {
|
|
2865
|
+
/** @type {?} */
|
|
2866
|
+
PlaceConfig.prototype.animationDuration;
|
|
2867
|
+
}
|
|
2868
|
+
|
|
2844
2869
|
/**
|
|
2845
2870
|
* @fileoverview added by tsickle
|
|
2846
2871
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -3399,12 +3424,14 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
3399
3424
|
/**
|
|
3400
3425
|
* @param {?} router
|
|
3401
3426
|
* @param {?} placeRouter
|
|
3427
|
+
* @param {?} placeConfig
|
|
3402
3428
|
* @param {?} parentOutlet
|
|
3403
3429
|
*/
|
|
3404
|
-
constructor(router, placeRouter, parentOutlet) {
|
|
3430
|
+
constructor(router, placeRouter, placeConfig, parentOutlet) {
|
|
3405
3431
|
super();
|
|
3406
3432
|
this.router = router;
|
|
3407
3433
|
this.placeRouter = placeRouter;
|
|
3434
|
+
this.placeConfig = placeConfig;
|
|
3408
3435
|
this.animate = true;
|
|
3409
3436
|
this.placeChanged = new EventEmitter();
|
|
3410
3437
|
this._activePlace = new MutableValueModel();
|
|
@@ -3422,9 +3449,9 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
3422
3449
|
* @return {?}
|
|
3423
3450
|
*/
|
|
3424
3451
|
o => o.activePlaceModel))
|
|
3425
|
-
.pluck(
|
|
3426
|
-
.pluckList(
|
|
3427
|
-
.pluck(
|
|
3452
|
+
.pluck('placeDefinition')
|
|
3453
|
+
.pluckList('children')
|
|
3454
|
+
.pluck('component');
|
|
3428
3455
|
/** @type {?} */
|
|
3429
3456
|
const activatePlaceType = chain(this.activePlaceModel).map((/**
|
|
3430
3457
|
* @param {?} p
|
|
@@ -3489,6 +3516,12 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
3489
3516
|
*/
|
|
3490
3517
|
ngOnInit() {
|
|
3491
3518
|
}
|
|
3519
|
+
/**
|
|
3520
|
+
* @return {?}
|
|
3521
|
+
*/
|
|
3522
|
+
get animationDuration() {
|
|
3523
|
+
return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';
|
|
3524
|
+
}
|
|
3492
3525
|
/**
|
|
3493
3526
|
* @param {?} visit
|
|
3494
3527
|
* @return {?}
|
|
@@ -3527,7 +3560,6 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
3527
3560
|
get activatedRouteModel() {
|
|
3528
3561
|
return this._activatedRouteModel.readonly;
|
|
3529
3562
|
}
|
|
3530
|
-
// @Trace()
|
|
3531
3563
|
/**
|
|
3532
3564
|
* @param {?} routerOutlet
|
|
3533
3565
|
* @param {?} place
|
|
@@ -3553,7 +3585,6 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
3553
3585
|
this.animationDone();
|
|
3554
3586
|
}
|
|
3555
3587
|
}
|
|
3556
|
-
// @Trace()
|
|
3557
3588
|
/**
|
|
3558
3589
|
* @param {?} routerOutlet
|
|
3559
3590
|
* @param {?} $event
|
|
@@ -3564,16 +3595,27 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
3564
3595
|
* @return {?}
|
|
3565
3596
|
*/
|
|
3566
3597
|
() => {
|
|
3598
|
+
this._previousPlace = this._activePlace.value;
|
|
3567
3599
|
this.isOnInitialPlace = false;
|
|
3568
3600
|
this._activePlace.value = null;
|
|
3569
3601
|
this._activatedRouteModel.value = null;
|
|
3570
3602
|
this._placeDefinition.value = null;
|
|
3571
3603
|
}));
|
|
3572
3604
|
}
|
|
3605
|
+
/**
|
|
3606
|
+
* @return {?}
|
|
3607
|
+
*/
|
|
3608
|
+
animationStarted() {
|
|
3609
|
+
console.log({ activePlace: this._activePlace.value });
|
|
3610
|
+
}
|
|
3573
3611
|
/**
|
|
3574
3612
|
* @return {?}
|
|
3575
3613
|
*/
|
|
3576
3614
|
animationDone() {
|
|
3615
|
+
console.log({ activePlace: this._activePlace.value });
|
|
3616
|
+
if (this._previousPlace) {
|
|
3617
|
+
this._previousPlace.onPlaceDestroyed();
|
|
3618
|
+
}
|
|
3577
3619
|
if (this._activePlace.value) {
|
|
3578
3620
|
this._activePlace.value.onPlaceReady();
|
|
3579
3621
|
}
|
|
@@ -3582,7 +3624,7 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
3582
3624
|
PlaceOutletComponent.decorators = [
|
|
3583
3625
|
{ type: Component, args: [{
|
|
3584
3626
|
selector: 'aup-place-outlet',
|
|
3585
|
-
template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"placeAnimationOrder.value\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated(routerOutlet, $event)\">\n </router-outlet>\n</div>\n\n",
|
|
3627
|
+
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(routerOutlet, $event)\">\n </router-outlet>\n</div>\n\n",
|
|
3586
3628
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
3587
3629
|
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}"]
|
|
3588
3630
|
}] }
|
|
@@ -3591,6 +3633,7 @@ PlaceOutletComponent.decorators = [
|
|
|
3591
3633
|
PlaceOutletComponent.ctorParameters = () => [
|
|
3592
3634
|
{ type: Router },
|
|
3593
3635
|
{ type: PlaceRouter },
|
|
3636
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [AUP_PLACE_CONFIG,] }] },
|
|
3594
3637
|
{ type: PlaceOutletComponent, decorators: [{ type: SkipSelf }, { type: Optional }] }
|
|
3595
3638
|
];
|
|
3596
3639
|
PlaceOutletComponent.propDecorators = {
|
|
@@ -3605,7 +3648,7 @@ __decorate([
|
|
|
3605
3648
|
__metadata("design:type", ListModel)
|
|
3606
3649
|
], PlaceOutletComponent.prototype, "customPlaceAnimationOrderModel", void 0);
|
|
3607
3650
|
__decorate([
|
|
3608
|
-
StoreInListModel(
|
|
3651
|
+
StoreInListModel('customPlaceAnimationOrderModel'),
|
|
3609
3652
|
__metadata("design:type", Array)
|
|
3610
3653
|
], PlaceOutletComponent.prototype, "customPlaceAnimationOrder", void 0);
|
|
3611
3654
|
__decorate([
|
|
@@ -3614,6 +3657,30 @@ __decorate([
|
|
|
3614
3657
|
__metadata("design:paramtypes", [Visit]),
|
|
3615
3658
|
__metadata("design:returntype", void 0)
|
|
3616
3659
|
], PlaceOutletComponent.prototype, "navigate", null);
|
|
3660
|
+
__decorate([
|
|
3661
|
+
Trace(),
|
|
3662
|
+
__metadata("design:type", Function),
|
|
3663
|
+
__metadata("design:paramtypes", [RouterOutlet, PlaceComponent]),
|
|
3664
|
+
__metadata("design:returntype", void 0)
|
|
3665
|
+
], PlaceOutletComponent.prototype, "onOutletActivated", null);
|
|
3666
|
+
__decorate([
|
|
3667
|
+
Trace(),
|
|
3668
|
+
__metadata("design:type", Function),
|
|
3669
|
+
__metadata("design:paramtypes", [RouterOutlet, Object]),
|
|
3670
|
+
__metadata("design:returntype", void 0)
|
|
3671
|
+
], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
|
|
3672
|
+
__decorate([
|
|
3673
|
+
Trace(),
|
|
3674
|
+
__metadata("design:type", Function),
|
|
3675
|
+
__metadata("design:paramtypes", []),
|
|
3676
|
+
__metadata("design:returntype", void 0)
|
|
3677
|
+
], PlaceOutletComponent.prototype, "animationStarted", null);
|
|
3678
|
+
__decorate([
|
|
3679
|
+
Trace(),
|
|
3680
|
+
__metadata("design:type", Function),
|
|
3681
|
+
__metadata("design:paramtypes", []),
|
|
3682
|
+
__metadata("design:returntype", void 0)
|
|
3683
|
+
], PlaceOutletComponent.prototype, "animationDone", null);
|
|
3617
3684
|
if (false) {
|
|
3618
3685
|
/** @type {?} */
|
|
3619
3686
|
PlaceOutletComponent.prototype.animate;
|
|
@@ -3662,6 +3729,11 @@ if (false) {
|
|
|
3662
3729
|
* @private
|
|
3663
3730
|
*/
|
|
3664
3731
|
PlaceOutletComponent.prototype.isOnInitialPlace;
|
|
3732
|
+
/**
|
|
3733
|
+
* @type {?}
|
|
3734
|
+
* @private
|
|
3735
|
+
*/
|
|
3736
|
+
PlaceOutletComponent.prototype._previousPlace;
|
|
3665
3737
|
/**
|
|
3666
3738
|
* @type {?}
|
|
3667
3739
|
* @private
|
|
@@ -3672,6 +3744,8 @@ if (false) {
|
|
|
3672
3744
|
* @private
|
|
3673
3745
|
*/
|
|
3674
3746
|
PlaceOutletComponent.prototype.placeRouter;
|
|
3747
|
+
/** @type {?} */
|
|
3748
|
+
PlaceOutletComponent.prototype.placeConfig;
|
|
3675
3749
|
}
|
|
3676
3750
|
|
|
3677
3751
|
/**
|
|
@@ -3848,6 +3922,7 @@ TabbedPlaceNavigationComponent.ctorParameters = () => [];
|
|
|
3848
3922
|
* @fileoverview added by tsickle
|
|
3849
3923
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3850
3924
|
*/
|
|
3925
|
+
const ɵ0 = { animationDuration: "2000ms" };
|
|
3851
3926
|
class PlaceModule {
|
|
3852
3927
|
}
|
|
3853
3928
|
PlaceModule.decorators = [
|
|
@@ -3878,7 +3953,9 @@ PlaceModule.decorators = [
|
|
|
3878
3953
|
TabbedPlaceNavigationComponent,
|
|
3879
3954
|
ListPlaceNavComponent
|
|
3880
3955
|
],
|
|
3881
|
-
providers: [
|
|
3956
|
+
providers: [
|
|
3957
|
+
{ provide: AUP_PLACE_CONFIG, useValue: ɵ0 }
|
|
3958
|
+
]
|
|
3882
3959
|
},] }
|
|
3883
3960
|
];
|
|
3884
3961
|
|
|
@@ -5192,5 +5269,5 @@ if (false) {
|
|
|
5192
5269
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5193
5270
|
*/
|
|
5194
5271
|
|
|
5195
|
-
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, AbstractPlaceNavigationComponent, Activity, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionService, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EnterPlaceGuard, FocusBindingDirective, Formatter, InplaceInteractionContextComponent, InteractionContext, InteractionGuard, InteractionModule, InteractionOutletComponent, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, ListPlaceNavComponent, NavigationSession, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, leftRightPlaceAnimation, slideDownAndUpAnimation, DirectivesModule as ɵa, CommandDirective as ɵb,
|
|
5272
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractActivity, AbstractInputComponent, AbstractPlaceNavigationComponent, Activity, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionService, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EnterPlaceGuard, FocusBindingDirective, Formatter, InplaceInteractionContextComponent, InteractionContext, InteractionGuard, InteractionModule, InteractionOutletComponent, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, ListPlaceNavComponent, NavigationSession, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, leftRightPlaceAnimation, slideDownAndUpAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, InteractionContext as ɵba, ActivityOutletComponent as ɵbb, ConfirmationDialogComponent as ɵbc, AbstractActivity as ɵbd, ACTIVITY_DATA as ɵbe, Activity as ɵbf, ConfirmThenDialogComponent as ɵbh, AlertDialogComponent as ɵbi, InteractionOutletComponent as ɵbk, InplaceInteractionContextComponent as ɵbl, DIALOG_INTERACTION_SERVICE_DEFAULTS as ɵbm, DialogInteractionService as ɵbn, FocusBindingDirective as ɵc, DisposableComponent as ɵd, ComponentsModule as ɵe, NumberInputComponent as ɵf, AbstractInputComponent as ɵg, StringInputComponent as ɵh, PasswordInputComponent as ɵi, SelectInputComponent as ɵj, NoopComponent as ɵk, PlaceModule as ɵl, EmptyStateComponent as ɵm, BusyOverlayComponent as ɵn, PlaceOutletComponent as ɵo, leftRightPlaceAnimation as ɵp, LEFT_RIGHT_PLACE_ANIMATION as ɵq, AUP_PLACE_CONFIG as ɵr, PlaceRouter as ɵt, PlaceHistory as ɵu, TabbedPlaceNavigationComponent as ɵv, AbstractPlaceNavigationComponent as ɵw, ListPlaceNavComponent as ɵx, InteractionModule as ɵy, ActivityContainerComponent as ɵz };
|
|
5196
5273
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|