@coolon/angular-ui-powerups 0.0.123 → 0.0.126

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.
@@ -3506,13 +3506,17 @@
3506
3506
  _this.installBinding(parameterDef);
3507
3507
  }));
3508
3508
  };
3509
+ // @Trace()
3510
+ // @Trace()
3509
3511
  /**
3510
3512
  * @private
3511
3513
  * @template T, S
3512
3514
  * @param {?} parameterDef
3513
3515
  * @return {?}
3514
3516
  */
3515
- PlaceComponent.prototype.installBinding = /**
3517
+ PlaceComponent.prototype.installBinding =
3518
+ // @Trace()
3519
+ /**
3516
3520
  * @private
3517
3521
  * @template T, S
3518
3522
  * @param {?} parameterDef
@@ -3583,12 +3587,6 @@
3583
3587
  */
3584
3588
  function () {
3585
3589
  };
3586
- __decorate([
3587
- pectin.Trace(),
3588
- __metadata("design:type", Function),
3589
- __metadata("design:paramtypes", [exports.ParameterDefinition]),
3590
- __metadata("design:returntype", void 0)
3591
- ], PlaceComponent.prototype, "installBinding", null);
3592
3590
  __decorate([
3593
3591
  fastMemoizeDecorator.Memoize(),
3594
3592
  __metadata("design:type", exports.PlaceDefinition),
@@ -8615,6 +8613,57 @@
8615
8613
  /** @type {?|undefined} */
8616
8614
  RouteListParameterOptions.prototype.storeInUrl;
8617
8615
  }
8616
+ /**
8617
+ * @template M
8618
+ * @param {?} prototype
8619
+ * @param {?} propertyKey
8620
+ * @param {?} backingModel
8621
+ * @param {?} tagPrefix
8622
+ * @param {?} isEmpty
8623
+ * @return {?}
8624
+ */
8625
+ function installMechanics(prototype, propertyKey, backingModel, tagPrefix, isEmpty) {
8626
+ /** @type {?} */
8627
+ var mechanics = {
8628
+ backingModel: backingModel,
8629
+ binding: (/** @type {?} */ (null))
8630
+ };
8631
+ /** @type {?} */
8632
+ var tag = tagPrefix + "(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
8633
+ pectin.DebugContext.get(mechanics.backingModel).tag(tag);
8634
+ pectin.Logger.get(mechanics.backingModel).tag(tag);
8635
+ Object.defineProperty(prototype, propertyKey, {
8636
+ get: (/**
8637
+ * @return {?}
8638
+ */
8639
+ function () {
8640
+ return mechanics.backingModel;
8641
+ }),
8642
+ set: (/**
8643
+ * @param {?} userModel
8644
+ * @return {?}
8645
+ */
8646
+ function (userModel) {
8647
+ // This handles the scenario where we want to push an existing value model (such as a form model)
8648
+ // to and from the route.
8649
+ if (mechanics.binding) {
8650
+ mechanics.binding.dispose();
8651
+ }
8652
+ if (userModel) {
8653
+ mechanics.binding = new pectin.Binding(mechanics.backingModel, userModel);
8654
+ if (isEmpty(userModel)) {
8655
+ mechanics.binding.writeRight(); // push the visit into the user model;
8656
+ }
8657
+ else {
8658
+ if (!isEmpty(mechanics.backingModel)) {
8659
+ console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');
8660
+ }
8661
+ mechanics.binding.writeLeft(); // push the user model into the visit
8662
+ }
8663
+ }
8664
+ })
8665
+ });
8666
+ }
8618
8667
  /**
8619
8668
  * @template T
8620
8669
  * @param {?} type
@@ -8631,8 +8680,11 @@
8631
8680
  /** @type {?} */
8632
8681
  var param = new exports.ParameterDefinition.RouteId(propertyKey.toString(), options, type);
8633
8682
  typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
8634
- pectin.UseDelegate({ tag: "@RouteId(" + prototype.constructor.name + "." + propertyKey.toString() + ")" })(prototype, propertyKey);
8635
- // UseDelegate()(prototype, propertyKey);
8683
+ installMechanics(prototype, propertyKey, new pectin.MutableValueModel(), "@RouteId", (/**
8684
+ * @param {?} m
8685
+ * @return {?}
8686
+ */
8687
+ function (m) { return m.query().isNil(); }));
8636
8688
  });
8637
8689
  }
8638
8690
  /**
@@ -8652,46 +8704,11 @@
8652
8704
  /** @type {?} */
8653
8705
  var param = new exports.ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
8654
8706
  typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
8655
- /** @type {?} */
8656
- var mechanics = {
8657
- backingModel: new pectin.MutableValueModel(),
8658
- binding: (/** @type {?} */ (null))
8659
- };
8660
- /** @type {?} */
8661
- var tag = "@VisitParameter(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
8662
- pectin.DebugContext.get(mechanics.backingModel).tag(tag);
8663
- pectin.Logger.get(mechanics.backingModel).tag(tag);
8664
- Object.defineProperty(prototype, propertyKey, {
8665
- get: (/**
8666
- * @return {?}
8667
- */
8668
- function () {
8669
- return mechanics.backingModel;
8670
- }),
8671
- set: (/**
8672
- * @param {?} userModel
8673
- * @return {?}
8674
- */
8675
- function (userModel) {
8676
- // This handles the scenario where we want to push an existing value model (such as a form model)
8677
- // to and from the route.
8678
- if (mechanics.binding) {
8679
- mechanics.binding.dispose();
8680
- }
8681
- if (userModel) {
8682
- mechanics.binding = new pectin.Binding(mechanics.backingModel, userModel);
8683
- if (userModel.query().isNil()) {
8684
- mechanics.binding.writeRight(); // push the visit into the user model;
8685
- }
8686
- else {
8687
- if (!mechanics.backingModel.query().isNil()) {
8688
- console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');
8689
- }
8690
- mechanics.binding.writeLeft(); // push the user model into the visit
8691
- }
8692
- }
8693
- })
8694
- });
8707
+ installMechanics(prototype, propertyKey, new pectin.MutableValueModel(), "@VisitParameter", (/**
8708
+ * @param {?} m
8709
+ * @return {?}
8710
+ */
8711
+ function (m) { return m.query().isNil(); }));
8695
8712
  });
8696
8713
  }
8697
8714
  /**
@@ -8711,46 +8728,11 @@
8711
8728
  /** @type {?} */
8712
8729
  var param = new exports.ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
8713
8730
  typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
8714
- /** @type {?} */
8715
- var mechanics = {
8716
- backingModel: new pectin.MutableListModel(),
8717
- binding: (/** @type {?} */ (null))
8718
- };
8719
- /** @type {?} */
8720
- var tag = "@VisitParameterList(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
8721
- pectin.DebugContext.get(mechanics.backingModel).tag(tag);
8722
- pectin.Logger.get(mechanics.backingModel).tag(tag);
8723
- Object.defineProperty(prototype, propertyKey, {
8724
- get: (/**
8725
- * @return {?}
8726
- */
8727
- function () {
8728
- return mechanics.backingModel;
8729
- }),
8730
- set: (/**
8731
- * @param {?} userModel
8732
- * @return {?}
8733
- */
8734
- function (userModel) {
8735
- // This handles the scenario where we want to push an existing value model (such as a form model)
8736
- // to and from the route.
8737
- if (mechanics.binding) {
8738
- mechanics.binding.dispose();
8739
- }
8740
- if (userModel) {
8741
- mechanics.binding = new pectin.Binding(mechanics.backingModel, userModel);
8742
- if (userModel.query().isEmpty()) {
8743
- mechanics.binding.writeRight(); // push the visit into the user model;
8744
- }
8745
- else {
8746
- if (!mechanics.backingModel.query().isEmpty()) {
8747
- console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');
8748
- }
8749
- mechanics.binding.writeLeft(); // push the user model into the visit
8750
- }
8751
- }
8752
- })
8753
- });
8731
+ installMechanics(prototype, propertyKey, new pectin.MutableListModel(), "@VisitParameterList", (/**
8732
+ * @param {?} m
8733
+ * @return {?}
8734
+ */
8735
+ function (m) { return m.query().isEmpty(); }));
8754
8736
  });
8755
8737
  }
8756
8738