@coolon/angular-ui-powerups 0.0.120 → 0.0.122

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.
Files changed (27) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +54 -16
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  5. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +8 -3
  6. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  7. package/esm2015/lib/place/place-component.js +28 -6
  8. package/esm2015/lib/place/place-component.js.map +1 -1
  9. package/esm2015/lib/place/place-component.metadata.json +1 -1
  10. package/esm2015/lib/place/place-definition.js +7 -1
  11. package/esm2015/lib/place/place-definition.js.map +1 -1
  12. package/esm2015/lib/place/route/parameter-decorators.js +6 -6
  13. package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
  14. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +8 -3
  15. package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  16. package/esm5/lib/place/place-component.js +32 -7
  17. package/esm5/lib/place/place-component.js.map +1 -1
  18. package/esm5/lib/place/place-definition.js +11 -2
  19. package/esm5/lib/place/place-definition.js.map +1 -1
  20. package/esm5/lib/place/route/parameter-decorators.js +6 -6
  21. package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
  22. package/fesm2015/coolon-angular-ui-powerups.js +47 -15
  23. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  24. package/fesm5/coolon-angular-ui-powerups.js +55 -17
  25. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  26. package/lib/place/place-component.d.ts +4 -2
  27. package/package.json +2 -2
@@ -3293,12 +3293,16 @@
3293
3293
  // an empty string.
3294
3294
  return visit.hasRouteId() ? this.getRouteIdParameterDef().urlFormat.format(visit.getRouteId()) : "";
3295
3295
  };
3296
+ // @Trace()
3297
+ // @Trace()
3296
3298
  /**
3297
3299
  * @param {?} visit
3298
3300
  * @param {?=} includeRouteId
3299
3301
  * @return {?}
3300
3302
  */
3301
- PlaceDefinition.prototype.getFormattedRouteParameters = /**
3303
+ PlaceDefinition.prototype.getFormattedRouteParameters =
3304
+ // @Trace()
3305
+ /**
3302
3306
  * @param {?} visit
3303
3307
  * @param {?=} includeRouteId
3304
3308
  * @return {?}
@@ -3384,8 +3388,13 @@
3384
3388
  // params will return null for non existent names
3385
3389
  if (params.has(def.name)) {
3386
3390
  if (def.isArray) {
3391
+ // const values = params.getAll(def.name); // TODO: EEEK getAll is returning ["1,2,3,4"] when we gave it ["1","2","3","4"].
3387
3392
  /** @type {?} */
3388
- var values = params.getAll(def.name);
3393
+ var values = params.get(def.name).split(',').map((/**
3394
+ * @param {?} s
3395
+ * @return {?}
3396
+ */
3397
+ function (s) { return s.trim(); }));
3389
3398
  result[def.name] = values.map((/**
3390
3399
  * @param {?} v
3391
3400
  * @return {?}
@@ -3480,15 +3489,26 @@
3480
3489
  * @param {?} visit
3481
3490
  * @return {?}
3482
3491
  */
3483
- PlaceComponent.prototype.initialiseBindings = /**
3492
+ PlaceComponent.prototype.initialiseVisit = /**
3484
3493
  * @param {?} visit
3485
3494
  * @return {?}
3486
3495
  */
3487
3496
  function (visit) {
3488
- var _this = this;
3489
3497
  pectin.assert.isNil(this.visit);
3490
3498
  this.visit = visit;
3491
- // DebugContext.get(this.visit).tag(`${this.placeDefinition.component.name}.visit`);
3499
+ pectin.DebugContext.get(this.visit).tag(this.placeDefinition.component.name + ".visit");
3500
+ // this.placeDefinition.getVisitParameterDefs().forEach(parameterDef => {
3501
+ // this.installBinding(parameterDef);
3502
+ // });
3503
+ };
3504
+ /**
3505
+ * @return {?}
3506
+ */
3507
+ PlaceComponent.prototype.ngAfterViewInit = /**
3508
+ * @return {?}
3509
+ */
3510
+ function () {
3511
+ var _this = this;
3492
3512
  this.placeDefinition.getVisitParameterDefs().forEach((/**
3493
3513
  * @param {?} parameterDef
3494
3514
  * @return {?}
@@ -3512,8 +3532,9 @@
3512
3532
  function (parameterDef) {
3513
3533
  /** @type {?} */
3514
3534
  var model = (/** @type {?} */ (this[parameterDef.propertyName]));
3515
- // this.txo.observe(parameterDef.propertyName, model);
3516
- this.registerDisposable(new pectin.Binding(this.visit, model, {
3535
+ pectin.DebugContext.tag(model, this.placeDefinition.component.name + "." + parameterDef.propertyName);
3536
+ /** @type {?} */
3537
+ var binding = this.registerDisposable(new pectin.Binding(this.visit, model, {
3517
3538
  toRight: /**
3518
3539
  * @param {?} visit
3519
3540
  * @return {?}
@@ -3521,7 +3542,7 @@
3521
3542
  function (visit) {
3522
3543
  /** @type {?} */
3523
3544
  var value = visit.getParameter(parameterDef.name);
3524
- // console.log('push to component', {name:parameterDef.name, value, visit});
3545
+ console.log('push to component', { name: parameterDef.name, value: value, visit: visit });
3525
3546
  return value;
3526
3547
  },
3527
3548
  toLeft: /**
@@ -3534,6 +3555,12 @@
3534
3555
  return currentVisit.replace(parameterDef, value);
3535
3556
  }
3536
3557
  }));
3558
+ setTimeout((/**
3559
+ * @return {?}
3560
+ */
3561
+ function () {
3562
+ binding.writeRight();
3563
+ }));
3537
3564
  };
3538
3565
  Object.defineProperty(PlaceComponent.prototype, "placeDefinition", {
3539
3566
  get: /**
@@ -3567,6 +3594,12 @@
3567
3594
  */
3568
3595
  function () {
3569
3596
  };
3597
+ __decorate([
3598
+ pectin.Trace(),
3599
+ __metadata("design:type", Function),
3600
+ __metadata("design:paramtypes", [exports.ParameterDefinition]),
3601
+ __metadata("design:returntype", void 0)
3602
+ ], PlaceComponent.prototype, "installBinding", null);
3570
3603
  __decorate([
3571
3604
  fastMemoizeDecorator.Memoize(),
3572
3605
  __metadata("design:type", exports.PlaceDefinition),
@@ -6435,7 +6468,11 @@
6435
6468
  _this.initialPlaceIndex = null;
6436
6469
  var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
6437
6470
  _this.parentOutletModel = new pectin.MutableValueModel(parentOutlet);
6438
- _this._activePlaceVisitModel.setDelegate(new pectin.MutableValueModel());
6471
+ /** @type {?} */
6472
+ var mutableValueModel = new pectin.MutableValueModel();
6473
+ pectin.DebugContext.tag(mutableValueModel, "PlaceOutletComponent -> mutableValueModel");
6474
+ _this._activePlaceVisitModel.setDelegate(mutableValueModel);
6475
+ pectin.DebugContext.tag(_this._activePlaceVisitModel, "PlaceOutletComponent._activePlaceVisitModel");
6439
6476
  _this._inOutletUpdate = valueOf.any(_this._inOutletDeactivation, _this._inOutletActivation).areTruthy();
6440
6477
  /** @type {?} */
6441
6478
  var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
@@ -6649,8 +6686,9 @@
6649
6686
  _this._placeDefinition.value = place.placeDefinition;
6650
6687
  /** @type {?} */
6651
6688
  var visitModel = new pectin.MutableValueModel();
6689
+ pectin.DebugContext.tag(visitModel, "PlaceOutletCompeont.visitModel");
6652
6690
  _this._activePlaceVisitModel.setDelegate(visitModel);
6653
- place.initialiseBindings(visitModel);
6691
+ place.initialiseVisit(visitModel);
6654
6692
  }
6655
6693
  catch (error) {
6656
6694
  console.error(error);
@@ -8604,8 +8642,8 @@
8604
8642
  /** @type {?} */
8605
8643
  var param = new exports.ParameterDefinition.RouteId(propertyKey.toString(), options, type);
8606
8644
  typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
8607
- // UseDelegate({tag: `@RouteId(${prototype.constructor.name}.${propertyKey.toString()})`})(prototype, propertyKey);
8608
- pectin.UseDelegate()(prototype, propertyKey);
8645
+ pectin.UseDelegate({ tag: "@RouteId(" + prototype.constructor.name + "." + propertyKey.toString() + ")" })(prototype, propertyKey);
8646
+ // UseDelegate()(prototype, propertyKey);
8609
8647
  });
8610
8648
  }
8611
8649
  /**
@@ -8625,8 +8663,8 @@
8625
8663
  /** @type {?} */
8626
8664
  var param = new exports.ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional("storeInUrl", null));
8627
8665
  typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
8628
- // UseDelegate({tag: `@VisitParameter(${prototype.constructor.name}.${propertyKey.toString()})`})(prototype, propertyKey);
8629
- pectin.UseDelegate()(prototype, propertyKey);
8666
+ pectin.UseDelegate({ tag: "@VisitParameter(" + prototype.constructor.name + "." + propertyKey.toString() + ")" })(prototype, propertyKey);
8667
+ // UseDelegate()(prototype, propertyKey);
8630
8668
  });
8631
8669
  }
8632
8670
  /**
@@ -8645,8 +8683,8 @@
8645
8683
  function (prototype, propertyKey) {
8646
8684
  /** @type {?} */
8647
8685
  var param = new exports.ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional("storeInUrl", null));
8648
- // UseDelegate({tag: `@VisitParameterList(${prototype.constructor.name}.${propertyKey.toString()})`})(prototype, propertyKey);
8649
- pectin.UseDelegate()(prototype, propertyKey);
8686
+ pectin.UseDelegate({ tag: "@VisitParameterList(" + prototype.constructor.name + "." + propertyKey.toString() + ")" })(prototype, propertyKey);
8687
+ // UseDelegate()(prototype, propertyKey);
8650
8688
  typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
8651
8689
  });
8652
8690
  }