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

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.
@@ -851,9 +851,15 @@ var AutocompleteInputComponent = /** @class */ (function (_super) {
851
851
  }
852
852
  AutocompleteInputComponent.prototype.ngOnInit = function () {
853
853
  };
854
+ AutocompleteInputComponent.prototype.formatOption = function (option) {
855
+ return this.optionLabelFormat(option);
856
+ };
854
857
  AutocompleteInputComponent.prototype.updateFilter = function ($event) {
855
858
  this.filterValue.value = $event;
856
859
  };
860
+ AutocompleteInputComponent.prototype.onSelect = function ($event) {
861
+ this.valueModel.value = $event.option.value;
862
+ };
857
863
  __decorate([
858
864
  Input(), TrackExternal(),
859
865
  __metadata("design:type", ListModel)
@@ -881,7 +887,7 @@ var AutocompleteInputComponent = /** @class */ (function (_super) {
881
887
  AutocompleteInputComponent = __decorate([
882
888
  Component({
883
889
  selector: 'aup-autocomplete-input',
884
- 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]=\"optionLabelFormat(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\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{optionLabelFormat(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",
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",
885
891
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
886
892
  }),
887
893
  __metadata("design:paramtypes", [])