@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
@@ -17,7 +17,7 @@ import { MatTableModule } from '@angular/material/table';
17
17
  import { MatTooltipModule } from '@angular/material/tooltip';
18
18
  import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
19
19
  import { fas } from '@fortawesome/free-solid-svg-icons';
20
- import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, FocusManager, Form, Guard, DebugContext, MutableListModel, MutableValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Binding, Functions } from '@coolon/pectin';
20
+ import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, FocusManager, EventListenerList, Form, MutableListModel, Guard, Binding, DebugContext, MutableValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Functions } from '@coolon/pectin';
21
21
  import ___default, { isEqual, isNil } from 'lodash';
22
22
  import { assert as assert$1, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
23
23
  import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
@@ -522,6 +522,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
522
522
  __extends(AbstractInputComponent, _super);
523
523
  function AbstractInputComponent() {
524
524
  var _this = _super.call(this) || this;
525
+ _this.onValueEditedListeners = new EventListenerList();
525
526
  _this.dense = false;
526
527
  // TODO: fix this.
527
528
  // tslint:disable-next-line:no-output-native
@@ -572,7 +573,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
572
573
  };
573
574
  Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
574
575
  get: function () {
575
- return this.inputModel.enabled;
576
+ return this.formValueModel.enabled;
576
577
  },
577
578
  enumerable: true,
578
579
  configurable: true
@@ -582,7 +583,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
582
583
  };
583
584
  Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
584
585
  get: function () {
585
- return this.inputModel.errorList;
586
+ return this.formValueModel.errorList;
586
587
  },
587
588
  enumerable: true,
588
589
  configurable: true
@@ -596,7 +597,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
596
597
  });
597
598
  Object.defineProperty(AbstractInputComponent.prototype, "focusContext", {
598
599
  get: function () {
599
- return this.inputModel.focusContext;
600
+ return this.formValueModel.focusContext;
600
601
  },
601
602
  enumerable: true,
602
603
  configurable: true
@@ -615,6 +616,13 @@ var AbstractInputComponent = /** @class */ (function (_super) {
615
616
  enumerable: true,
616
617
  configurable: true
617
618
  });
619
+ /**
620
+ * Invokes the callback when this components value is changed by a user edit.
621
+ * @param callback
622
+ */
623
+ AbstractInputComponent.prototype.onValueEdited = function (callback) {
624
+ return this.onValueEditedListeners.add(callback);
625
+ };
618
626
  __decorate([
619
627
  Input(),
620
628
  __metadata("design:type", String)
@@ -716,18 +724,30 @@ var AbstractListInputComponent = /** @class */ (function (_super) {
716
724
  * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
717
725
  */
718
726
  // We have to register it as a disposable so it ditches any listeners when we're disposed.
719
- _this.inputModel = _this.registerDisposable(new Form.DelegatingListModel());
727
+ _this.formValueModel = _this.registerDisposable(new Form.DelegatingListModel());
728
+ _this.componentListModel = new MutableListModel();
720
729
  _this.setValueIsInProgress = new Guard();
721
730
  _this.valueChange = new EventEmitter();
722
- var when = Dsl.disposeWith(_this).when;
723
- when(_this.inputModel).changes(function (value) { return _this.valueChange.emit(value); }, {
731
+ var _a = Dsl.disposeWith(_this), when = _a.when, valueOf = _a.valueOf, chain = _a.chain;
732
+ var binding = new Binding.Identity(_this.formValueModel, _this.componentListModel);
733
+ var inExternalChange = valueOf.any(_this.setValueIsInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
734
+ when(_this.componentListModel).changes(function (is, was) {
735
+ _this.valueChange.emit(is);
736
+ _this.onValueEditedListeners.fire(function (l) { return l(is, was); });
737
+ }, {
724
738
  initialValue: 'ignore',
725
- unless: _this.setValueIsInProgress
739
+ // we never fire events during an external changes to the value. This allows
740
+ // the component to behave when used in the conventional angular
741
+ // fashion, i.e. [(value)]="..."
742
+ unless: inExternalChange
726
743
  });
727
- DebugContext.tag(_this.inputModel, _this.constructor.name + ".inputModel");
744
+ DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
728
745
  return _this;
729
746
  }
730
747
  Object.defineProperty(AbstractListInputComponent.prototype, "value", {
748
+ // We add support for simple direct display of values by allowing components to be used
749
+ // by `component.value = ...` This use of the component without a value model in tables
750
+ // and the like.
731
751
  set: function (value) {
732
752
  var _this = this;
733
753
  this.setValueIsInProgress.whileTrue(function () {
@@ -744,7 +764,7 @@ var AbstractListInputComponent = /** @class */ (function (_super) {
744
764
  configurable: true
745
765
  });
746
766
  __decorate([
747
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
767
+ Input(), TrackExternal({ delegateTo: 'formValueModel' }),
748
768
  __metadata("design:type", Object)
749
769
  ], AbstractListInputComponent.prototype, "listModel", void 0);
750
770
  __decorate([
@@ -778,30 +798,39 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
778
798
  * gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
779
799
  */
780
800
  // We have to register it as a disposable so it ditches any listeners when we're disposed.
781
- _this.inputModel = _this.registerDisposable(new Form.DelegatingValueModel());
801
+ _this.formValueModel = _this.registerDisposable(new Form.DelegatingValueModel());
782
802
  _this.setValueInProgress = new Guard();
803
+ _this.componentValueModel = new MutableValueModel();
783
804
  _this.valueChange = new EventEmitter();
784
- var when = Dsl.disposeWith(_this).when;
785
- when(_this.inputModel).changes(function (value) { return _this.valueChange.emit(value); }, {
805
+ var _a = Dsl.disposeWith(_this), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
806
+ var binding = new Binding.Identity(_this.formValueModel, _this.componentValueModel);
807
+ var inExternalChange = valueOf.any(_this.setValueInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
808
+ when(_this.componentValueModel).changes(function (is, was) {
809
+ _this.valueChange.emit(is);
810
+ _this.onValueEditedListeners.fire(function (l) { return l(is, was); });
811
+ }, {
786
812
  initialValue: 'ignore',
787
- unless: _this.setValueInProgress
813
+ // we never fire events during an external set value operation. This allows
814
+ // the component to behave when used in the conventional angular
815
+ // fashion, i.e. [(value)]="..."
816
+ unless: inExternalChange
788
817
  });
789
- DebugContext.tag(_this.inputModel, _this.constructor.name + ".inputModel");
818
+ DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
790
819
  return _this;
791
820
  }
792
821
  Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
822
+ // We add support for simple direct display of values by allowing components to be used
823
+ // by `component.value = ...` This use of the component without a value model in tables
824
+ // and the like.
793
825
  set: function (value) {
794
826
  var _this = this;
795
- // we never fire events during an external set value operation. This allows
796
- // the component to behave when used in the conventional angular
797
- // fashion, i.e. [(value)]="..."
798
827
  this.setValueInProgress.whileTrue(function () {
799
- if (!_this.valueHolder) {
800
- _this.valueHolder = new MutableValueModel(value);
801
- _this.valueModel = _this.valueHolder;
828
+ if (!_this.plainValueHolder) {
829
+ _this.plainValueHolder = new MutableValueModel(value);
830
+ _this.valueModel = _this.plainValueHolder;
802
831
  }
803
832
  else {
804
- _this.valueHolder.value = value;
833
+ _this.plainValueHolder.value = value;
805
834
  }
806
835
  });
807
836
  },
@@ -809,7 +838,7 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
809
838
  configurable: true
810
839
  });
811
840
  __decorate([
812
- Input(), TrackExternal({ delegateTo: 'inputModel' }),
841
+ Input(), TrackExternal({ delegateTo: 'formValueModel' }),
813
842
  __metadata("design:type", Object)
814
843
  ], AbstractValueInputComponent.prototype, "valueModel", void 0);
815
844
  __decorate([
@@ -887,7 +916,7 @@ var AutocompleteInputComponent = /** @class */ (function (_super) {
887
916
  AutocompleteInputComponent = __decorate([
888
917
  Component({
889
918
  selector: 'aup-autocomplete-input',
890
- 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",
919
+ 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",
891
920
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
892
921
  }),
893
922
  __metadata("design:paramtypes", [])
@@ -918,7 +947,7 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
918
947
  CheckboxInputComponent = __decorate([
919
948
  Component({
920
949
  selector: 'aup-checkbox-input',
921
- 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",
950
+ 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",
922
951
  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}"]
923
952
  }),
924
953
  __metadata("design:paramtypes", [])
@@ -965,7 +994,7 @@ var MultipleSelectInputComponent = /** @class */ (function (_super) {
965
994
  MultipleSelectInputComponent = __decorate([
966
995
  Component({
967
996
  selector: 'aup-multiple-select-input',
968
- 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",
997
+ 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",
969
998
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
970
999
  }),
971
1000
  __metadata("design:paramtypes", [])
@@ -996,7 +1025,7 @@ var NumberInputComponent = /** @class */ (function (_super) {
996
1025
  NumberInputComponent = __decorate([
997
1026
  Component({
998
1027
  selector: 'aup-number-input',
999
- 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",
1028
+ 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",
1000
1029
  styles: [""]
1001
1030
  }),
1002
1031
  __metadata("design:paramtypes", [])
@@ -1016,7 +1045,7 @@ var PasswordInputComponent = /** @class */ (function (_super) {
1016
1045
  PasswordInputComponent = __decorate([
1017
1046
  Component({
1018
1047
  selector: 'aup-password-input',
1019
- 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",
1048
+ 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",
1020
1049
  styles: [""]
1021
1050
  }),
1022
1051
  __metadata("design:paramtypes", [])
@@ -1071,7 +1100,7 @@ var SelectInputComponent = /** @class */ (function (_super) {
1071
1100
  SelectInputComponent = __decorate([
1072
1101
  Component({
1073
1102
  selector: 'aup-select-input',
1074
- 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",
1103
+ 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",
1075
1104
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
1076
1105
  }),
1077
1106
  __metadata("design:paramtypes", [])
@@ -1085,9 +1114,9 @@ var StringInputComponent = /** @class */ (function (_super) {
1085
1114
  var _this = _super.call(this) || this;
1086
1115
  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;
1087
1116
  _this.clearCommand = Command.create(function () {
1088
- _this.valueModel.value = null;
1117
+ _this.componentValueModel.value = null;
1089
1118
  });
1090
- _this.clearCommand.disableWhile(chain.stringValue(_this.valueModel).isBlank());
1119
+ _this.clearCommand.disableWhile(chain.stringValue(_this.componentValueModel).isBlank());
1091
1120
  return _this;
1092
1121
  }
1093
1122
  StringInputComponent.prototype.ngOnInit = function () {
@@ -1103,7 +1132,7 @@ var StringInputComponent = /** @class */ (function (_super) {
1103
1132
  StringInputComponent = __decorate([
1104
1133
  Component({
1105
1134
  selector: 'aup-string-input',
1106
- 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",
1135
+ 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",
1107
1136
  styles: ["button[disabled]{visibility:hidden}"]
1108
1137
  }),
1109
1138
  __metadata("design:paramtypes", [])
@@ -1134,7 +1163,7 @@ var TextInputComponent = /** @class */ (function (_super) {
1134
1163
  TextInputComponent = __decorate([
1135
1164
  Component({
1136
1165
  selector: 'aup-text-input',
1137
- 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",
1166
+ 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",
1138
1167
  styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
1139
1168
  }),
1140
1169
  __metadata("design:paramtypes", [])