@fluid-topics/ft-search-context 2.0.15 → 2.0.16
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.
|
@@ -25,6 +25,7 @@ export declare class FtSearchContext extends FtLitElementRedux implements FtSear
|
|
|
25
25
|
private request?;
|
|
26
26
|
private paging?;
|
|
27
27
|
private autocorrect?;
|
|
28
|
+
private _appIntegrationInfoReady;
|
|
28
29
|
searchServiceProvider?: () => FtSearchService;
|
|
29
30
|
private _stateManager?;
|
|
30
31
|
private _eventManager?;
|
|
@@ -13,7 +13,7 @@ import { ftAppInfoStore } from "@fluid-topics/ft-app-context";
|
|
|
13
13
|
import { userAssetsActions } from "@fluid-topics/ft-app-context/build/redux-stores/FtUserAssetsStore";
|
|
14
14
|
import { FtAnalyticsSearchEventManager } from "./store/FtAnalyticsSearchEventManager";
|
|
15
15
|
import { LoadErrorEvent, SearchRequestChangeEvent, SearchResultsChangeEvent, } from "./utils";
|
|
16
|
-
class FtSearchContext extends FtLitElementRedux {
|
|
16
|
+
export class FtSearchContext extends FtLitElementRedux {
|
|
17
17
|
get stateManager() {
|
|
18
18
|
if (this._stateManager == null) {
|
|
19
19
|
const service = this.searchServiceProvider ? this.searchServiceProvider() : undefined;
|
|
@@ -39,6 +39,7 @@ class FtSearchContext extends FtLitElementRedux {
|
|
|
39
39
|
this.filters = [];
|
|
40
40
|
this.sort = [];
|
|
41
41
|
this.otherQueryParams = {};
|
|
42
|
+
this._appIntegrationInfoReady = false;
|
|
42
43
|
this.addStore(ftAppInfoStore);
|
|
43
44
|
}
|
|
44
45
|
render() {
|
|
@@ -49,6 +50,9 @@ class FtSearchContext extends FtLitElementRedux {
|
|
|
49
50
|
}
|
|
50
51
|
willUpdate(props) {
|
|
51
52
|
super.willUpdate(props);
|
|
53
|
+
if (props.has("_appIntegrationInfoReady") && this._appIntegrationInfoReady) {
|
|
54
|
+
this.eventManager.initAppInfo();
|
|
55
|
+
}
|
|
52
56
|
if (props.has("query") && this.query !== undefined) {
|
|
53
57
|
this.stateManager.setQuery(this.query);
|
|
54
58
|
}
|
|
@@ -195,7 +199,9 @@ __decorate([
|
|
|
195
199
|
__decorate([
|
|
196
200
|
redux({ store: "search", selector: (s) => s.spellcheck })
|
|
197
201
|
], FtSearchContext.prototype, "autocorrect", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
redux({ store: ftAppInfoStore.name, selector: (s) => s.apiIntegrationIdentifier !== undefined && s.apiIntegrationAppVersion !== undefined })
|
|
204
|
+
], FtSearchContext.prototype, "_appIntegrationInfoReady", void 0);
|
|
198
205
|
__decorate([
|
|
199
206
|
property({ attribute: false })
|
|
200
207
|
], FtSearchContext.prototype, "searchServiceProvider", void 0);
|
|
201
|
-
export { FtSearchContext };
|