@coolon/angular-ui-powerups 2.0.0-alpha.17 → 2.0.0-alpha.19

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 (74) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +61 -32
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  8. package/esm2015/lib/components/forms/abstract-input.component.js +12 -4
  9. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  10. package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
  11. package/esm2015/lib/components/forms/abstract-list-input.component.js +19 -7
  12. package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
  13. package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -1
  14. package/esm2015/lib/components/forms/abstract-value-input.component.js +23 -14
  15. package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
  16. package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -1
  17. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +1 -1
  18. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -1
  19. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +1 -1
  20. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
  21. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  22. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
  23. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +1 -1
  24. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
  25. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
  26. package/esm2015/lib/components/forms/number-input/number-input.component.js +1 -1
  27. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  28. package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
  29. package/esm2015/lib/components/forms/password-input/password-input.component.js +1 -1
  30. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  31. package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
  32. package/esm2015/lib/components/forms/select-input/select-input.component.js +1 -1
  33. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  34. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  35. package/esm2015/lib/components/forms/string-input/string-input.component.js +3 -3
  36. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  37. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  38. package/esm2015/lib/components/forms/text-input/text-input.component.js +1 -1
  39. package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
  40. package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
  41. package/esm2015/lib/components/table/column-model.js.map +1 -1
  42. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  43. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  44. package/esm5/lib/components/forms/abstract-input.component.js +12 -4
  45. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  46. package/esm5/lib/components/forms/abstract-list-input.component.js +19 -7
  47. package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
  48. package/esm5/lib/components/forms/abstract-value-input.component.js +23 -14
  49. package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
  50. package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js +1 -1
  51. package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +1 -1
  52. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
  53. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  54. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +1 -1
  55. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
  56. package/esm5/lib/components/forms/number-input/number-input.component.js +1 -1
  57. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  58. package/esm5/lib/components/forms/password-input/password-input.component.js +1 -1
  59. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  60. package/esm5/lib/components/forms/select-input/select-input.component.js +1 -1
  61. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  62. package/esm5/lib/components/forms/string-input/string-input.component.js +3 -3
  63. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  64. package/esm5/lib/components/forms/text-input/text-input.component.js +1 -1
  65. package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
  66. package/esm5/lib/components/table/column-model.js.map +1 -1
  67. package/fesm2015/coolon-angular-ui-powerups.js +62 -33
  68. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  69. package/fesm5/coolon-angular-ui-powerups.js +62 -33
  70. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  71. package/lib/components/forms/abstract-input.component.d.ts +8 -2
  72. package/lib/components/forms/abstract-list-input.component.d.ts +3 -2
  73. package/lib/components/forms/abstract-value-input.component.d.ts +4 -3
  74. package/package.json +4 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [2.0.0-alpha.19](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.18...v2.0.0-alpha.19) (2020-08-11)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * input-components with plain values weren't enabled ([46e15fa](https://bitbucket.org/coolon/angular-ui-powerups/commit/46e15fa0bd7d3e8fe8f7edcef652e101c18abe79))
11
+
12
+ ## [2.0.0-alpha.18](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.17...v2.0.0-alpha.18) (2020-08-11)
13
+
14
+
15
+ ### Features
16
+
17
+ * updated input components to fire changes on edit ([a0fafa8](https://bitbucket.org/coolon/angular-ui-powerups/commit/a0fafa8a26368b974bf93f95f861c3de0554eeab))
18
+
5
19
  ## [2.0.0-alpha.17](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.16...v2.0.0-alpha.17) (2020-08-07)
6
20
 
7
21
 
@@ -693,6 +693,7 @@
693
693
  __extends(AbstractInputComponent, _super);
694
694
  function AbstractInputComponent() {
695
695
  var _this = _super.call(this) || this;
696
+ _this.onValueEditedListeners = new pectin.EventListenerList();
696
697
  _this.dense = false;
697
698
  // TODO: fix this.
698
699
  // tslint:disable-next-line:no-output-native
@@ -743,7 +744,7 @@
743
744
  };
744
745
  Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
745
746
  get: function () {
746
- return this.inputModel.enabled;
747
+ return this.formValueModel.enabled;
747
748
  },
748
749
  enumerable: true,
749
750
  configurable: true
@@ -753,7 +754,7 @@
753
754
  };
754
755
  Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
755
756
  get: function () {
756
- return this.inputModel.errorList;
757
+ return this.formValueModel.errorList;
757
758
  },
758
759
  enumerable: true,
759
760
  configurable: true
@@ -767,7 +768,7 @@
767
768
  });
768
769
  Object.defineProperty(AbstractInputComponent.prototype, "focusContext", {
769
770
  get: function () {
770
- return this.inputModel.focusContext;
771
+ return this.formValueModel.focusContext;
771
772
  },
772
773
  enumerable: true,
773
774
  configurable: true
@@ -786,6 +787,13 @@
786
787
  enumerable: true,
787
788
  configurable: true
788
789
  });
790
+ /**
791
+ * Invokes the callback when this components value is changed by a user edit.
792
+ * @param callback
793
+ */
794
+ AbstractInputComponent.prototype.onValueEdited = function (callback) {
795
+ return this.onValueEditedListeners.add(callback);
796
+ };
789
797
  __decorate([
790
798
  core.Input(),
791
799
  __metadata("design:type", String)
@@ -887,18 +895,30 @@
887
895
  * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
888
896
  */
889
897
  // We have to register it as a disposable so it ditches any listeners when we're disposed.
890
- _this.inputModel = _this.registerDisposable(new pectin.Form.DelegatingListModel());
898
+ _this.formValueModel = _this.registerDisposable(new pectin.Form.DelegatingListModel());
899
+ _this.componentListModel = new pectin.MutableListModel();
891
900
  _this.setValueIsInProgress = new pectin.Guard();
892
901
  _this.valueChange = new core.EventEmitter();
893
- var when = pectin.Dsl.disposeWith(_this).when;
894
- when(_this.inputModel).changes(function (value) { return _this.valueChange.emit(value); }, {
902
+ var _a = pectin.Dsl.disposeWith(_this), when = _a.when, valueOf = _a.valueOf, chain = _a.chain;
903
+ var binding = new pectin.Binding.Identity(_this.formValueModel, _this.componentListModel);
904
+ var inExternalChange = valueOf.any(_this.setValueIsInProgress, chain(binding.direction).equals(pectin.Binding.Direction.RIGHT)).areTruthy();
905
+ when(_this.componentListModel).changes(function (is, was) {
906
+ _this.valueChange.emit(is);
907
+ _this.onValueEditedListeners.fire(function (l) { return l(is, was); });
908
+ }, {
895
909
  initialValue: 'ignore',
896
- unless: _this.setValueIsInProgress
910
+ // we never fire events during an external changes to the value. This allows
911
+ // the component to behave when used in the conventional angular
912
+ // fashion, i.e. [(value)]="..."
913
+ unless: inExternalChange
897
914
  });
898
- pectin.DebugContext.tag(_this.inputModel, _this.constructor.name + ".inputModel");
915
+ pectin.DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
899
916
  return _this;
900
917
  }
901
918
  Object.defineProperty(AbstractListInputComponent.prototype, "value", {
919
+ // We add support for simple direct display of values by allowing components to be used
920
+ // by `component.value = ...` This use of the component without a value model in tables
921
+ // and the like.
902
922
  set: function (value) {
903
923
  var _this = this;
904
924
  this.setValueIsInProgress.whileTrue(function () {
@@ -915,7 +935,7 @@
915
935
  configurable: true
916
936
  });
917
937
  __decorate([
918
- core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
938
+ core.Input(), pectin.TrackExternal({ delegateTo: 'formValueModel' }),
919
939
  __metadata("design:type", Object)
920
940
  ], AbstractListInputComponent.prototype, "listModel", void 0);
921
941
  __decorate([
@@ -949,30 +969,39 @@
949
969
  * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
950
970
  */
951
971
  // We have to register it as a disposable so it ditches any listeners when we're disposed.
952
- _this.inputModel = _this.registerDisposable(new pectin.Form.DelegatingValueModel());
972
+ _this.formValueModel = _this.registerDisposable(new pectin.Form.DelegatingValueModel());
953
973
  _this.setValueInProgress = new pectin.Guard();
974
+ _this.componentValueModel = new pectin.MutableValueModel();
954
975
  _this.valueChange = new core.EventEmitter();
955
- var when = pectin.Dsl.disposeWith(_this).when;
956
- when(_this.inputModel).changes(function (value) { return _this.valueChange.emit(value); }, {
976
+ var _a = pectin.Dsl.disposeWith(_this), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
977
+ var binding = new pectin.Binding.Identity(_this.formValueModel, _this.componentValueModel);
978
+ var inExternalChange = valueOf.any(_this.setValueInProgress, chain(binding.direction).equals(pectin.Binding.Direction.RIGHT)).areTruthy();
979
+ when(_this.componentValueModel).changes(function (is, was) {
980
+ _this.valueChange.emit(is);
981
+ _this.onValueEditedListeners.fire(function (l) { return l(is, was); });
982
+ }, {
957
983
  initialValue: 'ignore',
958
- unless: _this.setValueInProgress
984
+ // we never fire events during an external set value operation. This allows
985
+ // the component to behave when used in the conventional angular
986
+ // fashion, i.e. [(value)]="..."
987
+ unless: inExternalChange
959
988
  });
960
- pectin.DebugContext.tag(_this.inputModel, _this.constructor.name + ".inputModel");
989
+ pectin.DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
961
990
  return _this;
962
991
  }
963
992
  Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
993
+ // We add support for simple direct display of values by allowing components to be used
994
+ // by `component.value = ...` This use of the component without a value model in tables
995
+ // and the like.
964
996
  set: function (value) {
965
997
  var _this = this;
966
- // we never fire events during an external set value operation. This allows
967
- // the component to behave when used in the conventional angular
968
- // fashion, i.e. [(value)]="..."
969
998
  this.setValueInProgress.whileTrue(function () {
970
- if (!_this.valueHolder) {
971
- _this.valueHolder = new pectin.MutableValueModel(value);
972
- _this.valueModel = _this.valueHolder;
999
+ if (!_this.plainValueHolder) {
1000
+ _this.plainValueHolder = new pectin.MutableValueModel(value);
1001
+ _this.valueModel = _this.plainValueHolder;
973
1002
  }
974
1003
  else {
975
- _this.valueHolder.value = value;
1004
+ _this.plainValueHolder.value = value;
976
1005
  }
977
1006
  });
978
1007
  },
@@ -980,7 +1009,7 @@
980
1009
  configurable: true
981
1010
  });
982
1011
  __decorate([
983
- core.Input(), pectin.TrackExternal({ delegateTo: 'inputModel' }),
1012
+ core.Input(), pectin.TrackExternal({ delegateTo: 'formValueModel' }),
984
1013
  __metadata("design:type", Object)
985
1014
  ], AbstractValueInputComponent.prototype, "valueModel", void 0);
986
1015
  __decorate([
@@ -1058,7 +1087,7 @@
1058
1087
  AutocompleteInputComponent = __decorate([
1059
1088
  core.Component({
1060
1089
  selector: 'aup-autocomplete-input',
1061
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"valueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\" [autoActiveFirstOption]=\"true\" (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
1090
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\" [autoActiveFirstOption]=\"true\" (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
1062
1091
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
1063
1092
  }),
1064
1093
  __metadata("design:paramtypes", [])
@@ -1089,7 +1118,7 @@
1089
1118
  CheckboxInputComponent = __decorate([
1090
1119
  core.Component({
1091
1120
  selector: 'aup-checkbox-input',
1092
- template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"valueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
1121
+ template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"componentValueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
1093
1122
  styles: [":host{display:inline-flex;flex-direction:column;padding:24px 0 16px}:host.dense{padding:6px 0 2px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
1094
1123
  }),
1095
1124
  __metadata("design:paramtypes", [])
@@ -1136,7 +1165,7 @@
1136
1165
  MultipleSelectInputComponent = __decorate([
1137
1166
  core.Component({
1138
1167
  selector: 'aup-multiple-select-input',
1139
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"listModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
1168
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"componentListModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
1140
1169
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
1141
1170
  }),
1142
1171
  __metadata("design:paramtypes", [])
@@ -1167,7 +1196,7 @@
1167
1196
  NumberInputComponent = __decorate([
1168
1197
  core.Component({
1169
1198
  selector: 'aup-number-input',
1170
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint && !dense\" >{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
1199
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint && !dense\" >{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
1171
1200
  styles: [""]
1172
1201
  }),
1173
1202
  __metadata("design:paramtypes", [])
@@ -1187,7 +1216,7 @@
1187
1216
  PasswordInputComponent = __decorate([
1188
1217
  core.Component({
1189
1218
  selector: 'aup-password-input',
1190
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
1219
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
1191
1220
  styles: [""]
1192
1221
  }),
1193
1222
  __metadata("design:paramtypes", [])
@@ -1242,7 +1271,7 @@
1242
1271
  SelectInputComponent = __decorate([
1243
1272
  core.Component({
1244
1273
  selector: 'aup-select-input',
1245
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
1274
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
1246
1275
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
1247
1276
  }),
1248
1277
  __metadata("design:paramtypes", [])
@@ -1256,9 +1285,9 @@
1256
1285
  var _this = _super.call(this) || this;
1257
1286
  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;
1258
1287
  _this.clearCommand = pectin.Command.create(function () {
1259
- _this.valueModel.value = null;
1288
+ _this.componentValueModel.value = null;
1260
1289
  });
1261
- _this.clearCommand.disableWhile(chain.stringValue(_this.valueModel).isBlank());
1290
+ _this.clearCommand.disableWhile(chain.stringValue(_this.componentValueModel).isBlank());
1262
1291
  return _this;
1263
1292
  }
1264
1293
  StringInputComponent.prototype.ngOnInit = function () {
@@ -1274,7 +1303,7 @@
1274
1303
  StringInputComponent = __decorate([
1275
1304
  core.Component({
1276
1305
  selector: 'aup-string-input',
1277
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
1306
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
1278
1307
  styles: ["button[disabled]{visibility:hidden}"]
1279
1308
  }),
1280
1309
  __metadata("design:paramtypes", [])
@@ -1305,7 +1334,7 @@
1305
1334
  TextInputComponent = __decorate([
1306
1335
  core.Component({
1307
1336
  selector: 'aup-text-input',
1308
- template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
1337
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
1309
1338
  styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
1310
1339
  }),
1311
1340
  __metadata("design:paramtypes", [])