@fluid-topics/ft-search-bar 1.0.36 → 1.0.38

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.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  A search bar component using Fluid Topics public API.
2
2
 
3
- The search bar requires the [Fluid Topics public API](https://www.npmjs.com/package/@fluid-topics/public-api)
4
- and [Material Icon font](https://developers.google.com/fonts/docs/material_icons)
3
+ The search bar requires the [Fluid Topics public API](https://www.npmjs.com/package/@fluid-topics/public-api)
4
+ and [Material Icon font](https://developers.google.com/fonts/docs/material_icons)
5
5
  to be imported independently.
6
6
 
7
7
  ## Install
@@ -190,9 +190,10 @@ class FtSearchBar extends FtLitElement {
190
190
  return this.facetsInitialized && this.availableContentLocalesInitialized
191
191
  ? this.isMobile() ? this.mobileSearchBarManager.render() : this.desktopSearchBarManager.render()
192
192
  : html `
193
- <ft-skeleton class="ft-search-bar--container ft-search-bar--skeleton" part="loader"
193
+ <ft-skeleton class="ft-search-bar--container ft-search-bar--skeleton"
194
+ part="loader"
194
195
  tabindex="-1"></ft-skeleton>
195
- `;
196
+ `;
196
197
  }
197
198
  renderMobileFacets() {
198
199
  const currentLocale = this.availableContentLocales.filter(l => l.lang === this.contentLocale).pop();
@@ -385,7 +386,9 @@ class FtSearchBar extends FtLitElement {
385
386
  if ((props.has("availableContentLocales") || props.has("contentLocale")) && this.availableContentLocales.length > 0) {
386
387
  const isKnown = (locale) => this.availableContentLocales.some(l => l.lang == locale);
387
388
  if (!isKnown(this.contentLocale)) {
388
- this.contentLocale = props.has("contentLocale") && isKnown(props.get("contentLocale")) ? props.get("contentLocale") : (_a = this.availableContentLocales[0]) === null || _a === void 0 ? void 0 : _a.lang;
389
+ this.contentLocale = props.has("contentLocale") && isKnown(props.get("contentLocale"))
390
+ ? props.get("contentLocale")
391
+ : (_a = this.availableContentLocales[0]) === null || _a === void 0 ? void 0 : _a.lang;
389
392
  }
390
393
  }
391
394
  if (props.has("baseUrl") && this.baseUrl) {
@@ -480,7 +483,9 @@ class FtSearchBar extends FtLitElement {
480
483
  }
481
484
  initApi() {
482
485
  if (this.api == null) {
483
- this.api = window.fluidtopics ? new window.fluidtopics.FluidTopicsApi(this.baseUrl, this.apiIntegrationIdentifier, true) : undefined;
486
+ this.api = window.fluidtopics
487
+ ? new window.fluidtopics.FluidTopicsApi(this.baseUrl, this.apiIntegrationIdentifier, true)
488
+ : undefined;
484
489
  setTimeout(() => this.initApi(), 10);
485
490
  }
486
491
  }