@fluid-topics/ft-search-context 1.3.44 → 1.3.45

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,7 +2,7 @@ import { PropertyValues } from "lit";
2
2
  import { ElementDefinitionsMap, FtLitElementRedux, FtRegistrationContext } from "@fluid-topics/ft-wc-utils";
3
3
  import { FtSearchContextProperties } from "./ft-search-context.properties";
4
4
  import { FtSearchComponentInterface, FtSearchResultsChangeEventDetail, FtSearchStateManager } from "./registration";
5
- import { FtMetadataFilter, FtSearchRequest, FtSearchResultsPageInfo, FtSearchScope, FtSearchSortCriterion, FtSession, FtSpellcheck, FtVirtualField } from "@fluid-topics/public-api";
5
+ import { FtMetadataFilter, FtSearchKeywordMatch, FtSearchRequest, FtSearchResultsPageInfo, FtSearchScope, FtSearchSortCriterion, FtSession, FtSpellcheck, FtVirtualField } from "@fluid-topics/public-api";
6
6
  import { FtSearchService } from "./store/utils/FtSearchService";
7
7
  import { FtAnalyticsSearchEventManager } from "./store/FtAnalyticsSearchEventManager";
8
8
  export declare class LoadErrorEvent extends CustomEvent<Error> {
@@ -22,6 +22,7 @@ export declare class FtSearchContext extends FtLitElementRedux implements FtSear
22
22
  contentLocale?: string;
23
23
  pageSize: number;
24
24
  searchInDocumentTitlesOnly: boolean;
25
+ keywordMatch?: FtSearchKeywordMatch;
25
26
  scope?: FtSearchScope;
26
27
  virtualField?: FtVirtualField;
27
28
  ignoreEmptyQuery: boolean;
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { html } from "lit";
8
8
  import { property } from "lit/decorators.js";
9
- import { FtLitElementRedux, jsonProperty, redux } from "@fluid-topics/ft-wc-utils";
9
+ import { FtLitElementRedux, jsonProperty, numberProperty, redux } from "@fluid-topics/ft-wc-utils";
10
10
  import { styles } from "./ft-search-context.styles";
11
11
  import { FtSearchStateManager } from "./registration";
12
12
  import { ftAppInfoStore } from "@fluid-topics/ft-app-context";
@@ -57,8 +57,8 @@ class FtSearchContext extends FtLitElementRedux {
57
57
  }
58
58
  render() {
59
59
  return html `
60
- <slot @register-ft-search-component="${this.registerComponent}" @ft-search-result-click="${this.onResultClicked}"
61
- @ft-search-result-open-context-menu="${this.onResultContextMenuOpened}"></slot>
60
+ <slot @register-ft-search-component=${this.registerComponent} @ft-search-result-click=${this.onResultClicked}
61
+ @ft-search-result-open-context-menu=${this.onResultContextMenuOpened}></slot>
62
62
  `;
63
63
  }
64
64
  willUpdate(props) {
@@ -84,6 +84,9 @@ class FtSearchContext extends FtLitElementRedux {
84
84
  if (props.has("searchInDocumentTitlesOnly") && this.searchInDocumentTitlesOnly !== undefined) {
85
85
  this.stateManager.setSearchInDocumentTitlesOnly(this.searchInDocumentTitlesOnly);
86
86
  }
87
+ if (props.has("keywordMatch")) {
88
+ this.stateManager.setKeywordMatch(this.keywordMatch);
89
+ }
87
90
  if (props.has("scope") && this.scope !== undefined) {
88
91
  this.stateManager.setScope(this.scope);
89
92
  }
@@ -166,11 +169,14 @@ __decorate([
166
169
  property()
167
170
  ], FtSearchContext.prototype, "contentLocale", void 0);
168
171
  __decorate([
169
- property({ type: Number })
172
+ numberProperty()
170
173
  ], FtSearchContext.prototype, "pageSize", void 0);
171
174
  __decorate([
172
175
  property({ type: Boolean })
173
176
  ], FtSearchContext.prototype, "searchInDocumentTitlesOnly", void 0);
177
+ __decorate([
178
+ property()
179
+ ], FtSearchContext.prototype, "keywordMatch", void 0);
174
180
  __decorate([
175
181
  property()
176
182
  ], FtSearchContext.prototype, "scope", void 0);