@coolon/angular-ui-powerups 0.0.80 → 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 +77 -18
- 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 +48 -9
- package/esm2015/lib/place/place-component.js +13 -4
- package/esm2015/lib/place/place.module.js +5 -2
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +53 -17
- 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 +60 -11
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +78 -19
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +2 -0
- package/lib/place/place-component.d.ts +8 -3
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
|
7
7
|
import { __extends, __decorate, __metadata, __assign, __awaiter, __generator, __spread } from 'tslib';
|
|
8
8
|
import { assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingValueModel, MutableStream, MutableListModel, DelegatingListModel, StoreInValueModel, Binding, MutableValueModel, Trace, Guard as Guard$1, Command, OptionsHelper, ValueHolder } from '@coolon/pectin';
|
|
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';
|
|
@@ -3302,13 +3302,36 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
3302
3302
|
*/
|
|
3303
3303
|
function () {
|
|
3304
3304
|
};
|
|
3305
|
+
/**
|
|
3306
|
+
* Called by the place outlet after all animations have finished. We need this instead of ngOnDestroy
|
|
3307
|
+
* to avoid the fact that the angular router calls it before the animations have run causing the component
|
|
3308
|
+
* to loose any pectin bindings.
|
|
3309
|
+
*/
|
|
3310
|
+
// @Trace()
|
|
3311
|
+
/**
|
|
3312
|
+
* Called by the place outlet after all animations have finished. We need this instead of ngOnDestroy
|
|
3313
|
+
* to avoid the fact that the angular router calls it before the animations have run causing the component
|
|
3314
|
+
* to loose any pectin bindings.
|
|
3315
|
+
* @return {?}
|
|
3316
|
+
*/
|
|
3317
|
+
// @Trace()
|
|
3318
|
+
PlaceComponent.prototype.onPlaceDestroyed = /**
|
|
3319
|
+
* Called by the place outlet after all animations have finished. We need this instead of ngOnDestroy
|
|
3320
|
+
* to avoid the fact that the angular router calls it before the animations have run causing the component
|
|
3321
|
+
* to loose any pectin bindings.
|
|
3322
|
+
* @return {?}
|
|
3323
|
+
*/
|
|
3324
|
+
// @Trace()
|
|
3325
|
+
function () {
|
|
3326
|
+
this.dispose();
|
|
3327
|
+
};
|
|
3305
3328
|
__decorate([
|
|
3306
3329
|
Memoize$1(),
|
|
3307
3330
|
__metadata("design:type", PlaceDefinition),
|
|
3308
3331
|
__metadata("design:paramtypes", [])
|
|
3309
3332
|
], PlaceComponent.prototype, "placeDefinition", null);
|
|
3310
3333
|
return PlaceComponent;
|
|
3311
|
-
}(
|
|
3334
|
+
}(GarbageCollector));
|
|
3312
3335
|
if (false) {
|
|
3313
3336
|
/**
|
|
3314
3337
|
* @type {?}
|
|
@@ -4270,9 +4293,9 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4270
4293
|
* @return {?}
|
|
4271
4294
|
*/
|
|
4272
4295
|
function (o) { return o.activePlaceModel; }))
|
|
4273
|
-
.pluck(
|
|
4274
|
-
.pluckList(
|
|
4275
|
-
.pluck(
|
|
4296
|
+
.pluck('placeDefinition')
|
|
4297
|
+
.pluckList('children')
|
|
4298
|
+
.pluck('component');
|
|
4276
4299
|
/** @type {?} */
|
|
4277
4300
|
var activatePlaceType = chain(_this.activePlaceModel).map((/**
|
|
4278
4301
|
* @param {?} p
|
|
@@ -4346,7 +4369,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4346
4369
|
* @return {?}
|
|
4347
4370
|
*/
|
|
4348
4371
|
function () {
|
|
4349
|
-
return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration :
|
|
4372
|
+
return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';
|
|
4350
4373
|
},
|
|
4351
4374
|
enumerable: true,
|
|
4352
4375
|
configurable: true
|
|
@@ -4410,16 +4433,12 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4410
4433
|
enumerable: true,
|
|
4411
4434
|
configurable: true
|
|
4412
4435
|
});
|
|
4413
|
-
// @Trace()
|
|
4414
|
-
// @Trace()
|
|
4415
4436
|
/**
|
|
4416
4437
|
* @param {?} routerOutlet
|
|
4417
4438
|
* @param {?} place
|
|
4418
4439
|
* @return {?}
|
|
4419
4440
|
*/
|
|
4420
|
-
PlaceOutletComponent.prototype.onOutletActivated =
|
|
4421
|
-
// @Trace()
|
|
4422
|
-
/**
|
|
4441
|
+
PlaceOutletComponent.prototype.onOutletActivated = /**
|
|
4423
4442
|
* @param {?} routerOutlet
|
|
4424
4443
|
* @param {?} place
|
|
4425
4444
|
* @return {?}
|
|
@@ -4445,16 +4464,12 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4445
4464
|
this.animationDone();
|
|
4446
4465
|
}
|
|
4447
4466
|
};
|
|
4448
|
-
// @Trace()
|
|
4449
|
-
// @Trace()
|
|
4450
4467
|
/**
|
|
4451
4468
|
* @param {?} routerOutlet
|
|
4452
4469
|
* @param {?} $event
|
|
4453
4470
|
* @return {?}
|
|
4454
4471
|
*/
|
|
4455
|
-
PlaceOutletComponent.prototype.onOutletDeactivated =
|
|
4456
|
-
// @Trace()
|
|
4457
|
-
/**
|
|
4472
|
+
PlaceOutletComponent.prototype.onOutletDeactivated = /**
|
|
4458
4473
|
* @param {?} routerOutlet
|
|
4459
4474
|
* @param {?} $event
|
|
4460
4475
|
* @return {?}
|
|
@@ -4465,12 +4480,22 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4465
4480
|
* @return {?}
|
|
4466
4481
|
*/
|
|
4467
4482
|
function () {
|
|
4483
|
+
_this._previousPlace = _this._activePlace.value;
|
|
4468
4484
|
_this.isOnInitialPlace = false;
|
|
4469
4485
|
_this._activePlace.value = null;
|
|
4470
4486
|
_this._activatedRouteModel.value = null;
|
|
4471
4487
|
_this._placeDefinition.value = null;
|
|
4472
4488
|
}));
|
|
4473
4489
|
};
|
|
4490
|
+
/**
|
|
4491
|
+
* @return {?}
|
|
4492
|
+
*/
|
|
4493
|
+
PlaceOutletComponent.prototype.animationStarted = /**
|
|
4494
|
+
* @return {?}
|
|
4495
|
+
*/
|
|
4496
|
+
function () {
|
|
4497
|
+
console.log({ activePlace: this._activePlace.value });
|
|
4498
|
+
};
|
|
4474
4499
|
/**
|
|
4475
4500
|
* @return {?}
|
|
4476
4501
|
*/
|
|
@@ -4478,6 +4503,10 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4478
4503
|
* @return {?}
|
|
4479
4504
|
*/
|
|
4480
4505
|
function () {
|
|
4506
|
+
console.log({ activePlace: this._activePlace.value });
|
|
4507
|
+
if (this._previousPlace) {
|
|
4508
|
+
this._previousPlace.onPlaceDestroyed();
|
|
4509
|
+
}
|
|
4481
4510
|
if (this._activePlace.value) {
|
|
4482
4511
|
this._activePlace.value.onPlaceReady();
|
|
4483
4512
|
}
|
|
@@ -4485,7 +4514,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4485
4514
|
PlaceOutletComponent.decorators = [
|
|
4486
4515
|
{ type: Component, args: [{
|
|
4487
4516
|
selector: 'aup-place-outlet',
|
|
4488
|
-
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(routerOutlet, $event)\">\n </router-outlet>\n</div>\n\n",
|
|
4517
|
+
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",
|
|
4489
4518
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
4490
4519
|
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}"]
|
|
4491
4520
|
}] }
|
|
@@ -4509,7 +4538,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4509
4538
|
__metadata("design:type", ListModel)
|
|
4510
4539
|
], PlaceOutletComponent.prototype, "customPlaceAnimationOrderModel", void 0);
|
|
4511
4540
|
__decorate([
|
|
4512
|
-
StoreInListModel(
|
|
4541
|
+
StoreInListModel('customPlaceAnimationOrderModel'),
|
|
4513
4542
|
__metadata("design:type", Array)
|
|
4514
4543
|
], PlaceOutletComponent.prototype, "customPlaceAnimationOrder", void 0);
|
|
4515
4544
|
__decorate([
|
|
@@ -4518,6 +4547,30 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4518
4547
|
__metadata("design:paramtypes", [Visit]),
|
|
4519
4548
|
__metadata("design:returntype", void 0)
|
|
4520
4549
|
], PlaceOutletComponent.prototype, "navigate", null);
|
|
4550
|
+
__decorate([
|
|
4551
|
+
Trace(),
|
|
4552
|
+
__metadata("design:type", Function),
|
|
4553
|
+
__metadata("design:paramtypes", [RouterOutlet, PlaceComponent]),
|
|
4554
|
+
__metadata("design:returntype", void 0)
|
|
4555
|
+
], PlaceOutletComponent.prototype, "onOutletActivated", null);
|
|
4556
|
+
__decorate([
|
|
4557
|
+
Trace(),
|
|
4558
|
+
__metadata("design:type", Function),
|
|
4559
|
+
__metadata("design:paramtypes", [RouterOutlet, Object]),
|
|
4560
|
+
__metadata("design:returntype", void 0)
|
|
4561
|
+
], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
|
|
4562
|
+
__decorate([
|
|
4563
|
+
Trace(),
|
|
4564
|
+
__metadata("design:type", Function),
|
|
4565
|
+
__metadata("design:paramtypes", []),
|
|
4566
|
+
__metadata("design:returntype", void 0)
|
|
4567
|
+
], PlaceOutletComponent.prototype, "animationStarted", null);
|
|
4568
|
+
__decorate([
|
|
4569
|
+
Trace(),
|
|
4570
|
+
__metadata("design:type", Function),
|
|
4571
|
+
__metadata("design:paramtypes", []),
|
|
4572
|
+
__metadata("design:returntype", void 0)
|
|
4573
|
+
], PlaceOutletComponent.prototype, "animationDone", null);
|
|
4521
4574
|
return PlaceOutletComponent;
|
|
4522
4575
|
}(DisposableComponent));
|
|
4523
4576
|
if (false) {
|
|
@@ -4568,6 +4621,11 @@ if (false) {
|
|
|
4568
4621
|
* @private
|
|
4569
4622
|
*/
|
|
4570
4623
|
PlaceOutletComponent.prototype.isOnInitialPlace;
|
|
4624
|
+
/**
|
|
4625
|
+
* @type {?}
|
|
4626
|
+
* @private
|
|
4627
|
+
*/
|
|
4628
|
+
PlaceOutletComponent.prototype._previousPlace;
|
|
4571
4629
|
/**
|
|
4572
4630
|
* @type {?}
|
|
4573
4631
|
* @private
|
|
@@ -4784,6 +4842,7 @@ var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
4784
4842
|
* @fileoverview added by tsickle
|
|
4785
4843
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4786
4844
|
*/
|
|
4845
|
+
var ɵ0 = { animationDuration: "2000ms" };
|
|
4787
4846
|
var PlaceModule = /** @class */ (function () {
|
|
4788
4847
|
function PlaceModule() {
|
|
4789
4848
|
}
|
|
@@ -4816,7 +4875,7 @@ var PlaceModule = /** @class */ (function () {
|
|
|
4816
4875
|
ListPlaceNavComponent
|
|
4817
4876
|
],
|
|
4818
4877
|
providers: [
|
|
4819
|
-
|
|
4878
|
+
{ provide: AUP_PLACE_CONFIG, useValue: ɵ0 }
|
|
4820
4879
|
]
|
|
4821
4880
|
},] }
|
|
4822
4881
|
];
|