@fluid-topics/ft-search-results-spellcheck 1.2.2 → 1.2.4

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.
@@ -7,7 +7,6 @@ declare const FtSearchResultsSpellcheck_base: typeof FtSearchComponent & import(
7
7
  export declare class FtSearchResultsSpellcheck extends FtSearchResultsSpellcheck_base implements FtSearchResultsSpellcheckProperties {
8
8
  static elementDefinitions: ElementDefinitionsMap;
9
9
  static styles: import("lit").CSSResult;
10
- baseUrl?: string;
11
10
  request?: FtSearchRequest;
12
11
  autocorrect?: FtSpellcheck;
13
12
  autocorrectLink?: string;
@@ -6,17 +6,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { html, nothing, } from "lit";
8
8
  import { state } from "lit/decorators.js";
9
- import { redux, SearchPlaceConverter, } from "@fluid-topics/ft-wc-utils";
9
+ import { redux, } from "@fluid-topics/ft-wc-utils";
10
10
  import { styles } from "./ft-search-results-spellcheck.styles";
11
11
  import { FtTypography } from "@fluid-topics/ft-typography";
12
12
  import { withI18n } from "@fluid-topics/ft-i18n";
13
13
  import { FtSearchComponent } from "@fluid-topics/ft-search-context/build/registration";
14
14
  import { defaultSpellcheckMessages, spellcheck } from "./SpellcheckComponentMessages";
15
- import { ftAppInfoStore } from "@fluid-topics/ft-app-context";
15
+ import { SearchPlaceConverterProvider } from "@fluid-topics/ft-app-context";
16
16
  class FtSearchResultsSpellcheck extends withI18n(FtSearchComponent) {
17
17
  constructor() {
18
18
  super();
19
- this.addStore(ftAppInfoStore);
20
19
  this.addI18nContext(spellcheck, defaultSpellcheckMessages);
21
20
  }
22
21
  render() {
@@ -44,9 +43,9 @@ class FtSearchResultsSpellcheck extends withI18n(FtSearchComponent) {
44
43
  }
45
44
  update(props) {
46
45
  super.update(props);
47
- if (["baseUrl", "request", "autocorrect"].some(k => props.has(k))
48
- && this.baseUrl && this.request && this.autocorrect) {
49
- this.autocorrectLink = new SearchPlaceConverter(this.baseUrl, {}).serialize({ ...this.request, query: this.autocorrect.suggestedQuery });
46
+ if (["request", "autocorrect"].some(k => props.has(k))
47
+ && this.request && this.autocorrect) {
48
+ this.autocorrectLink = SearchPlaceConverterProvider.get().serialize({ ...this.request, query: this.autocorrect.suggestedQuery });
50
49
  }
51
50
  }
52
51
  }
@@ -54,9 +53,6 @@ FtSearchResultsSpellcheck.elementDefinitions = {
54
53
  "ft-typography": FtTypography
55
54
  };
56
55
  FtSearchResultsSpellcheck.styles = styles;
57
- __decorate([
58
- redux({ store: ftAppInfoStore.name })
59
- ], FtSearchResultsSpellcheck.prototype, "baseUrl", void 0);
60
56
  __decorate([
61
57
  redux({ store: "search" })
62
58
  ], FtSearchResultsSpellcheck.prototype, "request", void 0);