@coolon/angular-ui-powerups 0.0.81 → 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.
@@ -1263,8 +1263,8 @@ var AlertDialogComponent = /** @class */ (function (_super) {
1263
1263
  AlertDialogComponent.decorators = [
1264
1264
  { type: Component, args: [{
1265
1265
  selector: 'aup-alert-dialog',
1266
- 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<p matDialogActions>\n <button mat-raised-button color=\"primary\" (click)=\"done()\" data-cy=\"close-button\">{{alert.ok()}}</button>\n</p>\n",
1267
- styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
1266
+ 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",
1267
+ styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]
1268
1268
  }] }
1269
1269
  ];
1270
1270
  /** @nocollapse */
@@ -1344,8 +1344,8 @@ var ConfirmThenDialogComponent = /** @class */ (function (_super) {
1344
1344
  ConfirmThenDialogComponent.decorators = [
1345
1345
  { type: Component, args: [{
1346
1346
  selector: 'aup-confirmation-dialog',
1347
- 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<p 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</p>\n\n",
1348
- styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
1347
+ 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",
1348
+ styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]
1349
1349
  }] }
1350
1350
  ];
1351
1351
  /** @nocollapse */
@@ -1410,8 +1410,8 @@ var ConfirmationDialogComponent = /** @class */ (function (_super) {
1410
1410
  ConfirmationDialogComponent.decorators = [
1411
1411
  { type: Component, args: [{
1412
1412
  selector: 'aup-confirmation-dialog',
1413
- 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<p 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</p>\n\n",
1414
- styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
1413
+ 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",
1414
+ styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]
1415
1415
  }] }
1416
1416
  ];
1417
1417
  /** @nocollapse */
@@ -4279,13 +4279,14 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
4279
4279
  _this.animate = true;
4280
4280
  _this.placeChanged = new EventEmitter();
4281
4281
  _this._activePlace = new MutableValueModel();
4282
- _this._placeVisit = new MutableValueModel();
4282
+ _this._activePlaceVisitModel = new DelegatingValueModel();
4283
4283
  _this._inOutletUpdate = new Guard$1();
4284
4284
  _this._activatedRouteModel = new MutableValueModel();
4285
4285
  _this._placeDefinition = new MutableValueModel();
4286
4286
  _this.isOnInitialPlace = true;
4287
4287
  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;
4288
4288
  _this.parentOutletModel = new MutableValueModel(parentOutlet);
4289
+ _this._activePlaceVisitModel.setDelegate(new MutableValueModel());
4289
4290
  /** @type {?} */
4290
4291
  var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
4291
4292
  .pullValueModel((/**
@@ -4325,17 +4326,18 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
4325
4326
  * @return {?}
4326
4327
  */
4327
4328
  function (visit) {
4329
+ console.log("### Route visit changed");
4328
4330
  if (visit) { // can be null while the place and index sync up
4329
4331
  inRouteVisitUpdate.whileTrue((/**
4330
4332
  * @return {?}
4331
4333
  */
4332
4334
  function () {
4333
- _this._placeVisit.value = visit;
4335
+ _this._activePlaceVisitModel.value = visit;
4334
4336
  }));
4335
4337
  }
4336
4338
  }));
4337
4339
  // Handle component based changes
4338
- when.valueOf(_this._placeVisit).changes((/**
4340
+ when.valueOf(_this._activePlaceVisitModel).changes((/**
4339
4341
  * @param {?} next
4340
4342
  * @param {?} previous
4341
4343
  * @return {?}
@@ -4343,7 +4345,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
4343
4345
  function (next, previous) {
4344
4346
  _this.pushVisitChangesToRoute(next, previous);
4345
4347
  }), {
4346
- unless: inRouteVisitUpdate
4348
+ unless: valueOf.any(_this._inOutletUpdate, inRouteVisitUpdate).areTruthy()
4347
4349
  });
4348
4350
  chain(_this._activePlace)
4349
4351
  .postponeWhile(placeRouter.navigationSessionActive)
@@ -4453,7 +4455,10 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
4453
4455
  _this._activePlace.value = place;
4454
4456
  _this._activatedRouteModel.value = routerOutlet.activatedRoute;
4455
4457
  _this._placeDefinition.value = place.placeDefinition;
4456
- place.initialiseBindings(_this._placeVisit);
4458
+ /** @type {?} */
4459
+ var visitModel = new MutableValueModel();
4460
+ _this._activePlaceVisitModel.setDelegate(visitModel);
4461
+ place.initialiseBindings(visitModel);
4457
4462
  }
4458
4463
  catch (error) {
4459
4464
  console.error(error);
@@ -4465,22 +4470,18 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
4465
4470
  }
4466
4471
  };
4467
4472
  /**
4468
- * @param {?} routerOutlet
4469
- * @param {?} $event
4470
4473
  * @return {?}
4471
4474
  */
4472
4475
  PlaceOutletComponent.prototype.onOutletDeactivated = /**
4473
- * @param {?} routerOutlet
4474
- * @param {?} $event
4475
4476
  * @return {?}
4476
4477
  */
4477
- function (routerOutlet, $event) {
4478
+ function () {
4478
4479
  var _this = this;
4479
4480
  this._inOutletUpdate.whileTrue((/**
4480
4481
  * @return {?}
4481
4482
  */
4482
4483
  function () {
4483
- _this._previousPlace = _this._activePlace.value;
4484
+ _this._activePlaceVisitModel.setDelegate(null);
4484
4485
  _this.isOnInitialPlace = false;
4485
4486
  _this._activePlace.value = null;
4486
4487
  _this._activatedRouteModel.value = null;
@@ -4503,10 +4504,6 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
4503
4504
  * @return {?}
4504
4505
  */
4505
4506
  function () {
4506
- console.log({ activePlace: this._activePlace.value });
4507
- if (this._previousPlace) {
4508
- this._previousPlace.onPlaceDestroyed();
4509
- }
4510
4507
  if (this._activePlace.value) {
4511
4508
  this._activePlace.value.onPlaceReady();
4512
4509
  }
@@ -4514,7 +4511,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
4514
4511
  PlaceOutletComponent.decorators = [
4515
4512
  { type: Component, args: [{
4516
4513
  selector: 'aup-place-outlet',
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",
4514
+ 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",
4518
4515
  animations: [LEFT_RIGHT_PLACE_ANIMATION],
4519
4516
  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}"]
4520
4517
  }] }
@@ -4556,7 +4553,7 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
4556
4553
  __decorate([
4557
4554
  Trace(),
4558
4555
  __metadata("design:type", Function),
4559
- __metadata("design:paramtypes", [RouterOutlet, Object]),
4556
+ __metadata("design:paramtypes", []),
4560
4557
  __metadata("design:returntype", void 0)
4561
4558
  ], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
4562
4559
  __decorate([
@@ -4593,7 +4590,7 @@ if (false) {
4593
4590
  * @type {?}
4594
4591
  * @private
4595
4592
  */
4596
- PlaceOutletComponent.prototype._placeVisit;
4593
+ PlaceOutletComponent.prototype._activePlaceVisitModel;
4597
4594
  /**
4598
4595
  * @type {?}
4599
4596
  * @private
@@ -4621,11 +4618,6 @@ if (false) {
4621
4618
  * @private
4622
4619
  */
4623
4620
  PlaceOutletComponent.prototype.isOnInitialPlace;
4624
- /**
4625
- * @type {?}
4626
- * @private
4627
- */
4628
- PlaceOutletComponent.prototype._previousPlace;
4629
4621
  /**
4630
4622
  * @type {?}
4631
4623
  * @private