@fluid-topics/ft-search-results-spellcheck 1.3.53 → 1.3.54

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.
@@ -2,6 +2,7 @@ import { nothing, PropertyValues } from "lit";
2
2
  import { ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
3
3
  import { FtSearchResultsSpellcheckProperties } from "./ft-search-results-spellcheck.properties";
4
4
  import { FtSearchRequest, FtSpellcheck } from "@fluid-topics/public-api";
5
+ import { FtSearchStateResourceRequest } from "@fluid-topics/ft-search-context/build/store/model";
5
6
  import { FtSearchComponent } from "@fluid-topics/ft-search-context/build/registration";
6
7
  declare const FtSearchResultsSpellcheck_base: typeof FtSearchComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface>;
7
8
  export declare class FtSearchResultsSpellcheck extends FtSearchResultsSpellcheck_base implements FtSearchResultsSpellcheckProperties {
@@ -10,6 +11,7 @@ export declare class FtSearchResultsSpellcheck extends FtSearchResultsSpellcheck
10
11
  request?: FtSearchRequest;
11
12
  autocorrect?: FtSpellcheck;
12
13
  autocorrectLink?: string;
14
+ neededSearchRequests: FtSearchStateResourceRequest[];
13
15
  constructor();
14
16
  protected render(): import("lit-html").TemplateResult<1> | typeof nothing;
15
17
  protected update(props: PropertyValues): void;
@@ -4,10 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { html, nothing, } from "lit";
7
+ import { html, nothing } from "lit";
8
8
  import { state } from "lit/decorators.js";
9
- import { redux, } 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
+ import { FtSearchStateResourceRequest } from "@fluid-topics/ft-search-context/build/store/model";
11
12
  import { FtTypography } from "@fluid-topics/ft-typography";
12
13
  import { withI18n } from "@fluid-topics/ft-i18n";
13
14
  import { FtSearchComponent } from "@fluid-topics/ft-search-context/build/registration";
@@ -16,6 +17,7 @@ import { SearchPlaceConverterProvider } from "@fluid-topics/ft-app-context";
16
17
  class FtSearchResultsSpellcheck extends withI18n(FtSearchComponent) {
17
18
  constructor() {
18
19
  super();
20
+ this.neededSearchRequests = [FtSearchStateResourceRequest.CLUSTERED_SEARCH];
19
21
  this.addI18nContext(spellcheck, defaultSpellcheckMessages);
20
22
  }
21
23
  render() {
@@ -43,14 +45,14 @@ class FtSearchResultsSpellcheck extends withI18n(FtSearchComponent) {
43
45
  }
44
46
  update(props) {
45
47
  super.update(props);
46
- if (["request", "autocorrect"].some(k => props.has(k))
48
+ if (["request", "autocorrect"].some((k) => props.has(k))
47
49
  && this.request && this.autocorrect) {
48
50
  this.autocorrectLink = SearchPlaceConverterProvider.get().serialize({ ...this.request, query: this.autocorrect.suggestedQuery });
49
51
  }
50
52
  }
51
53
  }
52
54
  FtSearchResultsSpellcheck.elementDefinitions = {
53
- "ft-typography": FtTypography
55
+ "ft-typography": FtTypography,
54
56
  };
55
57
  FtSearchResultsSpellcheck.styles = styles;
56
58
  __decorate([