@skyux/lookup 5.6.1 → 5.7.1

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.
@@ -37,7 +37,7 @@
37
37
  /**
38
38
  * NOTICE: DO NOT MODIFY THIS FILE!
39
39
  * The contents of this file were automatically generated by
40
- * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-lookup' schematic.
40
+ * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-lookup' schematic.
41
41
  * To update this file, simply rerun the command.
42
42
  */
43
43
  var RESOURCES = {
@@ -131,7 +131,8 @@
131
131
  this._disabled = false;
132
132
  this._focus = new rxjs.Subject();
133
133
  this._textChanges = new rxjs.Subject();
134
- /* istanbul ignore next */
134
+ // istanbul ignore next
135
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
135
136
  this.onValidatorChange = function () { };
136
137
  }
137
138
  Object.defineProperty(SkyAutocompleteInputDirective.prototype, "autocompleteAttribute", {
@@ -332,9 +333,9 @@
332
333
  }
333
334
  };
334
335
  // Angular automatically constructs these methods.
335
- /* istanbul ignore next */
336
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
336
337
  SkyAutocompleteInputDirective.prototype.onChange = function (value) { };
337
- /* istanbul ignore next */
338
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
338
339
  SkyAutocompleteInputDirective.prototype.onTouched = function () { };
339
340
  SkyAutocompleteInputDirective.prototype.setAttributes = function (element) {
340
341
  this.renderer.setAttribute(element, 'autocomplete', this.autocompleteAttribute);
@@ -1274,7 +1275,9 @@
1274
1275
  this.currentSearchSub = this.performSearch()
1275
1276
  .pipe(operators.take(1))
1276
1277
  .subscribe(function (result) {
1277
- var items = result.items;
1278
+ var items = result.items.filter(function (item) {
1279
+ return item && _this.descriptorProperty in item;
1280
+ });
1278
1281
  _this.isSearchingAsync = false;
1279
1282
  _this._searchResults = items.map(function (r, i) {
1280
1283
  var result = {
@@ -1697,9 +1700,9 @@
1697
1700
  this._disabled = false;
1698
1701
  this._includePhoneInfo = false;
1699
1702
  // Angular automatically constructs these methods.
1700
- /* istanbul ignore next */
1703
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1701
1704
  this.onChange = function (value) { };
1702
- /* istanbul ignore next */
1705
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1703
1706
  this.onTouched = function () { };
1704
1707
  this.setupCountries();
1705
1708
  this.countrySearchFormControl = new i8.FormControl();
@@ -3079,9 +3082,9 @@
3079
3082
  _this.idle = new rxjs.Subject();
3080
3083
  _this.markForTokenFocusOnKeyUp = false;
3081
3084
  // Angular automatically constructs these methods.
3082
- /* istanbul ignore next */
3085
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
3083
3086
  _this.onChange = function (value) { };
3084
- /* istanbul ignore next */
3087
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
3085
3088
  _this.onTouched = function () { };
3086
3089
  ngControl.valueAccessor = _this;
3087
3090
  return _this;
@@ -3368,8 +3371,9 @@
3368
3371
  var isValueInTextBox = false;
3369
3372
  if (this.selectMode === 'single') {
3370
3373
  isValueInTextBox =
3371
- this.autocompleteInputDirective.inputTextValue ===
3372
- this.autocompleteInputDirective.value[this.descriptorProperty];
3374
+ this.autocompleteInputDirective.value &&
3375
+ this.autocompleteInputDirective.inputTextValue ===
3376
+ this.autocompleteInputDirective.value[this.descriptorProperty];
3373
3377
  }
3374
3378
  this.openPicker(isValueInTextBox ? '' : this.autocompleteInputDirective.inputTextValue);
3375
3379
  this.autocompleteInputDirective.restoreInputTextValueToPreviousState();