@fluid-topics/ft-search-context 1.2.49 → 1.2.51
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.
|
@@ -239,7 +239,7 @@ export class FtSearchStateManager {
|
|
|
239
239
|
return this.localesDebouncer.run(async () => this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales));
|
|
240
240
|
}
|
|
241
241
|
async fetchSearchData(request) {
|
|
242
|
-
var _a, _b, _c;
|
|
242
|
+
var _a, _b, _c, _d;
|
|
243
243
|
try {
|
|
244
244
|
(_a = this.cancelableSearch) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
245
245
|
this.store.actions.paging(undefined);
|
|
@@ -259,6 +259,9 @@ export class FtSearchStateManager {
|
|
|
259
259
|
else {
|
|
260
260
|
let newResults = ((_b = this.store.getState().results) !== null && _b !== void 0 ? _b : []).concat(results.results);
|
|
261
261
|
this.store.actions.results(newResults);
|
|
262
|
+
// Focus on first new result
|
|
263
|
+
this.store.commands.clear(/^focus-result-/);
|
|
264
|
+
this.store.commands.add({ type: `focus-result-${(results.paging.currentPage - 1) * ((_c = request.paging.perPage) !== null && _c !== void 0 ? _c : 20) + 1}` });
|
|
262
265
|
}
|
|
263
266
|
this.store.actions.paging(results.paging);
|
|
264
267
|
}
|
|
@@ -266,7 +269,7 @@ export class FtSearchStateManager {
|
|
|
266
269
|
catch (e) {
|
|
267
270
|
if (!(e instanceof CanceledPromiseError)) {
|
|
268
271
|
console.error(e);
|
|
269
|
-
(
|
|
272
|
+
(_d = this.errorHandler) === null || _d === void 0 ? void 0 : _d.call(this, e);
|
|
270
273
|
}
|
|
271
274
|
}
|
|
272
275
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-context",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.51",
|
|
4
4
|
"description": "Context block for integrated search components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-app-context": "1.2.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "1.2.
|
|
22
|
+
"@fluid-topics/ft-app-context": "1.2.51",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "1.2.51",
|
|
24
24
|
"lit": "3.1.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@fluid-topics/public-api": "1.0.
|
|
27
|
+
"@fluid-topics/public-api": "1.0.90"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "f37803963479545409bdddea3571d34dbad90413"
|
|
30
30
|
}
|