@coolon/angular-ui-powerups 0.0.48 → 0.0.50

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.
@@ -5,7 +5,7 @@ import { MatDialog, MatButtonModule, MatDialogModule, MatTabsModule, MatProgress
5
5
  import { MatTabsModule as MatTabsModule$1 } from '@angular/material/tabs';
6
6
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
7
  import { __decorate, __metadata, __awaiter } from 'tslib';
8
- import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, assert, UnaryCommand, lang, Dsl, Logger, EventListenerList, DelegatingValueModel, MutableListModel, StoreInValueModel, Binding, Guard, MutableValueModel, OptionsHelper, ValueHolder } from '@coolon/pectin';
8
+ import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, assert, UnaryCommand, lang, Dsl, Logger, EventListenerList, DelegatingValueModel, MutableListModel, StoreInValueModel, Binding, Trace, MutableValueModel, Guard, OptionsHelper, ValueHolder } from '@coolon/pectin';
9
9
  import { PortalModule } from '@angular/cdk/portal';
10
10
  import { Deferred } from '@coolon/pectin/lib/promise/deferred.class';
11
11
  import { assert as assert$1, Klass, Opts } from '@coolon/typescript-utilities';
@@ -2099,12 +2099,9 @@ if (false) {
2099
2099
  */
2100
2100
  v => !this.isBlank(parameterDef, v)));
2101
2101
  }
2102
- value = this.isBlank(parameterDef, value) ? this.defaultValue : value;
2103
- console.log(`${parameterDef.name} is blank, returning: ${value}`);
2104
- return value;
2102
+ return this.isBlank(parameterDef, value) ? this.defaultValue : value;
2105
2103
  }
2106
2104
  else {
2107
- console.log(`${parameterDef.name} is not blank`);
2108
2105
  return value;
2109
2106
  }
2110
2107
  }
@@ -2120,6 +2117,12 @@ if (false) {
2120
2117
  return isNil ? true : def.isArray ? value['length'] < 1 : false;
2121
2118
  }
2122
2119
  }
2120
+ __decorate([
2121
+ Trace(),
2122
+ __metadata("design:type", Function),
2123
+ __metadata("design:paramtypes", [ParameterDefinition, Object, Object]),
2124
+ __metadata("design:returntype", Object)
2125
+ ], DefaultParameterSanitiser.prototype, "sanitise", null);
2123
2126
  ParameterDefinition.DefaultParameterSanitiser = DefaultParameterSanitiser;
2124
2127
  if (false) {
2125
2128
  /** @type {?} */
@@ -2131,7 +2134,7 @@ if (false) {
2131
2134
  }
2132
2135
  })(ParameterDefinition || (ParameterDefinition = {}));
2133
2136
 
2134
- var _a;
2137
+ var _a, _b;
2135
2138
  class ParameterSnapshot {
2136
2139
  /**
2137
2140
  * @param {?} placeDefinition
@@ -2294,7 +2297,6 @@ class ParameterSnapshot {
2294
2297
  return p.parameterDef === parameter ? p.replace(value) : p;
2295
2298
  })));
2296
2299
  }
2297
- // @Trace()
2298
2300
  /**
2299
2301
  * @param {?} injector
2300
2302
  * @return {?}
@@ -2318,9 +2320,11 @@ class ParameterSnapshot {
2318
2320
  const routeParameters = this.getRouteParameters();
2319
2321
  for (let i = 0; i < routeParameters.length; i++) {
2320
2322
  /** @type {?} */
2321
- const sanitisedValue = yield routeParameters[i].sanitise(this, injector);
2322
- if (!routeParameters[i].isSame(sanitisedValue)) {
2323
- result = this.replace(routeParameters[i].parameterDef, sanitisedValue);
2323
+ const routeParameter = routeParameters[i];
2324
+ /** @type {?} */
2325
+ const sanitisedValue = yield routeParameter.sanitise(this, injector);
2326
+ if (!routeParameter.isSame(sanitisedValue)) {
2327
+ result = this.replace(routeParameter.parameterDef, sanitisedValue);
2324
2328
  }
2325
2329
  }
2326
2330
  return result;
@@ -2357,6 +2361,18 @@ __decorate([
2357
2361
  __metadata("design:paramtypes", []),
2358
2362
  __metadata("design:returntype", Array)
2359
2363
  ], ParameterSnapshot.prototype, "getRouteParameters", null);
2364
+ __decorate([
2365
+ Trace(),
2366
+ __metadata("design:type", Function),
2367
+ __metadata("design:paramtypes", [ParameterDefinition, typeof (_b = typeof S !== "undefined" && S) === "function" ? _b : Object]),
2368
+ __metadata("design:returntype", ParameterSnapshot)
2369
+ ], ParameterSnapshot.prototype, "replace", null);
2370
+ __decorate([
2371
+ Trace(),
2372
+ __metadata("design:type", Function),
2373
+ __metadata("design:paramtypes", [Injector]),
2374
+ __metadata("design:returntype", Promise)
2375
+ ], ParameterSnapshot.prototype, "sanitise", null);
2360
2376
  if (false) {
2361
2377
  /** @type {?} */
2362
2378
  ParameterSnapshot.prototype.placeDefinition;
@@ -2738,6 +2754,7 @@ class PlaceOutletComponent extends DisposableComponent {
2738
2754
  this.router = router;
2739
2755
  this.placeHistory = placeHistory;
2740
2756
  this.animate = true;
2757
+ this._activePlace = new MutableValueModel();
2741
2758
  this._incomingRouteChange = new Guard();
2742
2759
  this._inOutletUpdate = new Guard();
2743
2760
  this._activatedRouteModel = new MutableValueModel();
@@ -2789,6 +2806,11 @@ class PlaceOutletComponent extends DisposableComponent {
2789
2806
  // txo.observe('urls', urls);
2790
2807
  // txo.observe('this._resolvedParameters', this._resolvedParameters);
2791
2808
  }
2809
+ /**
2810
+ * @return {?}
2811
+ */
2812
+ ngOnInit() {
2813
+ }
2792
2814
  /**
2793
2815
  * @return {?}
2794
2816
  */
@@ -2798,7 +2820,8 @@ class PlaceOutletComponent extends DisposableComponent {
2798
2820
  /**
2799
2821
  * @return {?}
2800
2822
  */
2801
- ngOnInit() {
2823
+ get activePlace() {
2824
+ return this._activePlace.readonly;
2802
2825
  }
2803
2826
  /**
2804
2827
  * @param {?} routerOutlet
@@ -2811,7 +2834,7 @@ class PlaceOutletComponent extends DisposableComponent {
2811
2834
  */
2812
2835
  () => {
2813
2836
  try {
2814
- this._currentPlace = place;
2837
+ this._activePlace.value = place;
2815
2838
  this._activatedRouteModel.value = routerOutlet.activatedRoute;
2816
2839
  this._placeDefinition.value = place.placeDefinition;
2817
2840
  place.initialiseBindings(this._resolvedParameters);
@@ -2835,7 +2858,7 @@ class PlaceOutletComponent extends DisposableComponent {
2835
2858
  * @return {?}
2836
2859
  */
2837
2860
  () => {
2838
- this._currentPlace = null;
2861
+ this._activePlace.value = null;
2839
2862
  this._activatedRouteModel.value = null;
2840
2863
  this._placeDefinition.value = null;
2841
2864
  }));
@@ -2851,8 +2874,8 @@ class PlaceOutletComponent extends DisposableComponent {
2851
2874
  * @return {?}
2852
2875
  */
2853
2876
  animationDone() {
2854
- if (this._currentPlace) {
2855
- this._currentPlace.onPlaceReady();
2877
+ if (this._activePlace.value) {
2878
+ this._activePlace.value.onPlaceReady();
2856
2879
  }
2857
2880
  }
2858
2881
  /**
@@ -2900,7 +2923,7 @@ if (false) {
2900
2923
  * @type {?}
2901
2924
  * @private
2902
2925
  */
2903
- PlaceOutletComponent.prototype._currentPlace;
2926
+ PlaceOutletComponent.prototype._activePlace;
2904
2927
  /**
2905
2928
  * @type {?}
2906
2929
  * @private
@@ -3560,6 +3583,7 @@ class PlaceRouteGuard {
3560
3583
  * @return {?}
3561
3584
  */
3562
3585
  sanitised => {
3586
+ Logger.get(this).info("ParameterSnapshot.sanitise", { sanitised });
3563
3587
  if (sanitised.hasChanged(snapshot, true)) {
3564
3588
  return this.placeRouter.getRedirectUrlTree(activatedRoute, sanitised);
3565
3589
  }