@fluid-topics/ft-search-bar 1.1.89 → 1.1.91

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.
@@ -210,13 +210,14 @@ class FtSearchBar extends FtLitElement {
210
210
  `;
211
211
  }
212
212
  renderSearchBar() {
213
- return this.facetsInitialized && this.availableContentLocalesInitialized
214
- ? this.isMobile() ? this.mobileSearchBarManager.render() : this.desktopSearchBarManager.render()
215
- : html `
216
- <ft-skeleton class="ft-search-bar--container ft-search-bar--skeleton"
217
- part="loader"
218
- tabindex="-1"></ft-skeleton>
219
- `;
213
+ if (this.facetsInitialized && this.availableContentLocalesInitialized) {
214
+ return this.isMobile() ? this.mobileSearchBarManager.render() : this.desktopSearchBarManager.render();
215
+ }
216
+ return html `
217
+ <ft-skeleton class="ft-search-bar--container ft-search-bar--skeleton"
218
+ part="loader"
219
+ tabindex="-1"></ft-skeleton>
220
+ `;
220
221
  }
221
222
  renderMobileFacets() {
222
223
  const currentLocale = this.availableContentLocales.filter(l => l.lang === this.contentLocale).pop();
@@ -564,7 +565,7 @@ class FtSearchBar extends FtLitElement {
564
565
  document.addEventListener("focusin", this.closeFloatingContainer);
565
566
  document.addEventListener("click", this.closeFloatingContainer);
566
567
  if (this.focusOnDisplay && !isTouchScreen) {
567
- await this.focusInput();
568
+ this.focusInput();
568
569
  }
569
570
  ftAppInfoStore.eventBus.addEventListener("authentication-change", this.initSearchData);
570
571
  this.initSearchData();
@@ -626,17 +627,15 @@ class FtSearchBar extends FtLitElement {
626
627
  </div>`;
627
628
  }
628
629
  enableFocusReactionOnAnyUserInteraction() {
629
- var _a, _b, _c;
630
- (_a = this.container) === null || _a === void 0 ? void 0 : _a.addEventListener("blur", this.enableFocusReactionCallback);
631
- (_b = this.container) === null || _b === void 0 ? void 0 : _b.addEventListener("click", this.enableFocusReactionCallback);
632
- (_c = this.container) === null || _c === void 0 ? void 0 : _c.addEventListener("keyup", this.enableFocusReactionCallback);
630
+ this.addEventListener("blur", this.enableFocusReactionCallback);
631
+ this.addEventListener("click", this.enableFocusReactionCallback);
632
+ this.addEventListener("keyup", this.enableFocusReactionCallback);
633
633
  }
634
634
  enableFocusReaction() {
635
- var _a, _b, _c;
636
635
  this.reactToFocus = true;
637
- (_a = this.container) === null || _a === void 0 ? void 0 : _a.removeEventListener("blur", this.enableFocusReactionCallback);
638
- (_b = this.container) === null || _b === void 0 ? void 0 : _b.removeEventListener("click", this.enableFocusReactionCallback);
639
- (_c = this.container) === null || _c === void 0 ? void 0 : _c.removeEventListener("keyup", this.enableFocusReactionCallback);
636
+ this.removeEventListener("blur", this.enableFocusReactionCallback);
637
+ this.removeEventListener("click", this.enableFocusReactionCallback);
638
+ this.removeEventListener("keyup", this.enableFocusReactionCallback);
640
639
  }
641
640
  }
642
641
  FtSearchBar.elementDefinitions = {