@coolon/angular-ui-powerups 0.0.84 → 0.0.85
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 +61 -57
- 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 +34 -55
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +64 -61
- package/fesm2015/coolon-angular-ui-powerups.js +32 -52
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +62 -58
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +2 -1
- 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,
|
|
10
|
+
import { Router, RouterModule, UrlSegment, NavigationStart, NavigationEnd, NavigationError, 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';
|
|
@@ -4289,7 +4289,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4289
4289
|
_this._inRouteVisitUpdate = new Guard$1();
|
|
4290
4290
|
_this._activatedRouteModel = new MutableValueModel();
|
|
4291
4291
|
_this._placeDefinition = new MutableValueModel();
|
|
4292
|
-
_this.
|
|
4292
|
+
_this.initialPlaceIndex = null;
|
|
4293
4293
|
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
4294
4294
|
_this.parentOutletModel = new MutableValueModel(parentOutlet);
|
|
4295
4295
|
_this._activePlaceVisitModel.setDelegate(new MutableValueModel());
|
|
@@ -4312,17 +4312,21 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4312
4312
|
function (p) { return (/** @type {?} */ (p.constructor)); }));
|
|
4313
4313
|
_this.placeAnimationOrder = chain(_this.customPlaceAnimationOrderModel)
|
|
4314
4314
|
.otherwise(defaultPlaceAnimationOrder)
|
|
4315
|
-
.
|
|
4316
|
-
|
|
4317
|
-
* @param {?} order
|
|
4315
|
+
.reduce((/**
|
|
4316
|
+
* @param {?} placesInOrder
|
|
4318
4317
|
* @return {?}
|
|
4319
4318
|
*/
|
|
4320
|
-
function (
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4319
|
+
function (placesInOrder) {
|
|
4320
|
+
/** @type {?} */
|
|
4321
|
+
var placeIndex = 0;
|
|
4322
|
+
if (activatePlaceType.value) {
|
|
4323
|
+
placeIndex = placesInOrder.indexOf(activatePlaceType.value);
|
|
4324
|
+
if (isNil(_this.initialPlaceIndex)) {
|
|
4325
|
+
_this.initialPlaceIndex = placeIndex;
|
|
4326
|
+
}
|
|
4327
|
+
}
|
|
4328
|
+
return isNil(_this.initialPlaceIndex) ? 0 : placeIndex - _this.initialPlaceIndex;
|
|
4329
|
+
}), { dependsOn: activatePlaceType });
|
|
4326
4330
|
// Push incoming changes into the component
|
|
4327
4331
|
_this.routerVisit = chain(_this._activePlace).pluck('placeDefinition').findIn(placeRouter.activeVisitIndex);
|
|
4328
4332
|
// Our router visit will change when our active is nullified during deactivation, which will push a null visit
|
|
@@ -4363,6 +4367,19 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4363
4367
|
*/
|
|
4364
4368
|
function () {
|
|
4365
4369
|
};
|
|
4370
|
+
// @Trace()
|
|
4371
|
+
// @Trace()
|
|
4372
|
+
/**
|
|
4373
|
+
* @return {?}
|
|
4374
|
+
*/
|
|
4375
|
+
PlaceOutletComponent.prototype.getAnimationOrder =
|
|
4376
|
+
// @Trace()
|
|
4377
|
+
/**
|
|
4378
|
+
* @return {?}
|
|
4379
|
+
*/
|
|
4380
|
+
function () {
|
|
4381
|
+
return this.placeAnimationOrder.value;
|
|
4382
|
+
};
|
|
4366
4383
|
Object.defineProperty(PlaceOutletComponent.prototype, "animationDuration", {
|
|
4367
4384
|
get: /**
|
|
4368
4385
|
* @return {?}
|
|
@@ -4373,16 +4390,20 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4373
4390
|
enumerable: true,
|
|
4374
4391
|
configurable: true
|
|
4375
4392
|
});
|
|
4393
|
+
// @Trace()
|
|
4394
|
+
// @Trace()
|
|
4376
4395
|
/**
|
|
4377
4396
|
* @param {?} visit
|
|
4378
4397
|
* @return {?}
|
|
4379
4398
|
*/
|
|
4380
|
-
PlaceOutletComponent.prototype.navigate =
|
|
4399
|
+
PlaceOutletComponent.prototype.navigate =
|
|
4400
|
+
// @Trace()
|
|
4401
|
+
/**
|
|
4381
4402
|
* @param {?} visit
|
|
4382
4403
|
* @return {?}
|
|
4383
4404
|
*/
|
|
4384
4405
|
function (visit) {
|
|
4385
|
-
console.log({ activatedRoute: this._activatedRouteModel.value });
|
|
4406
|
+
// console.log({ activatedRoute: this._activatedRouteModel.value });
|
|
4386
4407
|
this.placeRouter.navigate(visit, {
|
|
4387
4408
|
relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
|
|
4388
4409
|
});
|
|
@@ -4397,10 +4418,14 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4397
4418
|
enumerable: true,
|
|
4398
4419
|
configurable: true
|
|
4399
4420
|
});
|
|
4421
|
+
// @Trace()
|
|
4422
|
+
// @Trace()
|
|
4400
4423
|
/**
|
|
4401
4424
|
* @return {?}
|
|
4402
4425
|
*/
|
|
4403
|
-
PlaceOutletComponent.prototype.pushRouteChangesToVisit =
|
|
4426
|
+
PlaceOutletComponent.prototype.pushRouteChangesToVisit =
|
|
4427
|
+
// @Trace()
|
|
4428
|
+
/**
|
|
4404
4429
|
* @return {?}
|
|
4405
4430
|
*/
|
|
4406
4431
|
function () {
|
|
@@ -4411,7 +4436,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4411
4436
|
visit: visit,
|
|
4412
4437
|
place: visit ? visit.placeDefinition.component : null,
|
|
4413
4438
|
inOutletActivation: this._inOutletActivation.value,
|
|
4414
|
-
inRoutingSession: this.placeRouter.navigationSessionActive.value
|
|
4439
|
+
inRoutingSession: this.placeRouter.navigationSessionActive.value
|
|
4415
4440
|
});
|
|
4416
4441
|
if (visit) { // can be null while the place and index sync up
|
|
4417
4442
|
this._inRouteVisitUpdate.whileTrue((/**
|
|
@@ -4457,12 +4482,16 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4457
4482
|
enumerable: true,
|
|
4458
4483
|
configurable: true
|
|
4459
4484
|
});
|
|
4485
|
+
// @Trace()
|
|
4486
|
+
// @Trace()
|
|
4460
4487
|
/**
|
|
4461
4488
|
* @param {?} routerOutlet
|
|
4462
4489
|
* @param {?} place
|
|
4463
4490
|
* @return {?}
|
|
4464
4491
|
*/
|
|
4465
|
-
PlaceOutletComponent.prototype.onOutletActivated =
|
|
4492
|
+
PlaceOutletComponent.prototype.onOutletActivated =
|
|
4493
|
+
// @Trace()
|
|
4494
|
+
/**
|
|
4466
4495
|
* @param {?} routerOutlet
|
|
4467
4496
|
* @param {?} place
|
|
4468
4497
|
* @return {?}
|
|
@@ -4491,10 +4520,14 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4491
4520
|
this.animationDone();
|
|
4492
4521
|
}
|
|
4493
4522
|
};
|
|
4523
|
+
// @Trace()
|
|
4524
|
+
// @Trace()
|
|
4494
4525
|
/**
|
|
4495
4526
|
* @return {?}
|
|
4496
4527
|
*/
|
|
4497
|
-
PlaceOutletComponent.prototype.onOutletDeactivated =
|
|
4528
|
+
PlaceOutletComponent.prototype.onOutletDeactivated =
|
|
4529
|
+
// @Trace()
|
|
4530
|
+
/**
|
|
4498
4531
|
* @return {?}
|
|
4499
4532
|
*/
|
|
4500
4533
|
function () {
|
|
@@ -4503,26 +4536,33 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4503
4536
|
* @return {?}
|
|
4504
4537
|
*/
|
|
4505
4538
|
function () {
|
|
4506
|
-
_this.isOnInitialPlace = false;
|
|
4507
4539
|
_this._activePlace.value = null;
|
|
4508
4540
|
_this._activatedRouteModel.value = null;
|
|
4509
4541
|
_this._placeDefinition.value = null;
|
|
4510
4542
|
_this._activePlaceVisitModel.setDelegate(null);
|
|
4511
4543
|
}));
|
|
4512
4544
|
};
|
|
4545
|
+
// @Trace()
|
|
4546
|
+
// @Trace()
|
|
4513
4547
|
/**
|
|
4514
4548
|
* @return {?}
|
|
4515
4549
|
*/
|
|
4516
|
-
PlaceOutletComponent.prototype.animationStarted =
|
|
4550
|
+
PlaceOutletComponent.prototype.animationStarted =
|
|
4551
|
+
// @Trace()
|
|
4552
|
+
/**
|
|
4517
4553
|
* @return {?}
|
|
4518
4554
|
*/
|
|
4519
4555
|
function () {
|
|
4520
4556
|
console.log({ activePlace: this._activePlace.value });
|
|
4521
4557
|
};
|
|
4558
|
+
// @Trace()
|
|
4559
|
+
// @Trace()
|
|
4522
4560
|
/**
|
|
4523
4561
|
* @return {?}
|
|
4524
4562
|
*/
|
|
4525
|
-
PlaceOutletComponent.prototype.animationDone =
|
|
4563
|
+
PlaceOutletComponent.prototype.animationDone =
|
|
4564
|
+
// @Trace()
|
|
4565
|
+
/**
|
|
4526
4566
|
* @return {?}
|
|
4527
4567
|
*/
|
|
4528
4568
|
function () {
|
|
@@ -4533,7 +4573,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4533
4573
|
PlaceOutletComponent.decorators = [
|
|
4534
4574
|
{ type: Component, args: [{
|
|
4535
4575
|
selector: 'aup-place-outlet',
|
|
4536
|
-
template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"{value:
|
|
4576
|
+
template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"{value: getAnimationOrder(), 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",
|
|
4537
4577
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
4538
4578
|
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}"]
|
|
4539
4579
|
}] }
|
|
@@ -4560,42 +4600,6 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
4560
4600
|
StoreInListModel('customPlaceAnimationOrderModel'),
|
|
4561
4601
|
__metadata("design:type", Array)
|
|
4562
4602
|
], PlaceOutletComponent.prototype, "customPlaceAnimationOrder", void 0);
|
|
4563
|
-
__decorate([
|
|
4564
|
-
Trace(),
|
|
4565
|
-
__metadata("design:type", Function),
|
|
4566
|
-
__metadata("design:paramtypes", [Visit]),
|
|
4567
|
-
__metadata("design:returntype", void 0)
|
|
4568
|
-
], PlaceOutletComponent.prototype, "navigate", null);
|
|
4569
|
-
__decorate([
|
|
4570
|
-
Trace(),
|
|
4571
|
-
__metadata("design:type", Function),
|
|
4572
|
-
__metadata("design:paramtypes", []),
|
|
4573
|
-
__metadata("design:returntype", void 0)
|
|
4574
|
-
], PlaceOutletComponent.prototype, "pushRouteChangesToVisit", null);
|
|
4575
|
-
__decorate([
|
|
4576
|
-
Trace(),
|
|
4577
|
-
__metadata("design:type", Function),
|
|
4578
|
-
__metadata("design:paramtypes", [RouterOutlet, PlaceComponent]),
|
|
4579
|
-
__metadata("design:returntype", void 0)
|
|
4580
|
-
], PlaceOutletComponent.prototype, "onOutletActivated", null);
|
|
4581
|
-
__decorate([
|
|
4582
|
-
Trace(),
|
|
4583
|
-
__metadata("design:type", Function),
|
|
4584
|
-
__metadata("design:paramtypes", []),
|
|
4585
|
-
__metadata("design:returntype", void 0)
|
|
4586
|
-
], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
|
|
4587
|
-
__decorate([
|
|
4588
|
-
Trace(),
|
|
4589
|
-
__metadata("design:type", Function),
|
|
4590
|
-
__metadata("design:paramtypes", []),
|
|
4591
|
-
__metadata("design:returntype", void 0)
|
|
4592
|
-
], PlaceOutletComponent.prototype, "animationStarted", null);
|
|
4593
|
-
__decorate([
|
|
4594
|
-
Trace(),
|
|
4595
|
-
__metadata("design:type", Function),
|
|
4596
|
-
__metadata("design:paramtypes", []),
|
|
4597
|
-
__metadata("design:returntype", void 0)
|
|
4598
|
-
], PlaceOutletComponent.prototype, "animationDone", null);
|
|
4599
4603
|
return PlaceOutletComponent;
|
|
4600
4604
|
}(DisposableComponent));
|
|
4601
4605
|
if (false) {
|
|
@@ -4660,7 +4664,7 @@ if (false) {
|
|
|
4660
4664
|
* @type {?}
|
|
4661
4665
|
* @private
|
|
4662
4666
|
*/
|
|
4663
|
-
PlaceOutletComponent.prototype.
|
|
4667
|
+
PlaceOutletComponent.prototype.initialPlaceIndex;
|
|
4664
4668
|
/**
|
|
4665
4669
|
* @type {?}
|
|
4666
4670
|
* @private
|