@fluid-topics/ft-search-context 2.2.16 → 2.2.18
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.
- package/build/ft-search-context.d.ts +1 -0
- package/build/ft-search-context.js +7 -2
- package/build/ft-search-context.light.js +5 -5
- package/build/ft-search-context.min.js +19 -19
- package/build/registration.d.ts +5 -2
- package/build/registration.js +12 -5
- package/build/store/FtSearchStateManager.d.ts +1 -0
- package/build/store/FtSearchStateManager.js +5 -0
- package/build/store/model.d.ts +1 -0
- package/build/store/redux.js +1 -0
- package/package.json +5 -5
package/build/registration.d.ts
CHANGED
|
@@ -3,8 +3,11 @@ import { FtSearchStateManager } from "./store/FtSearchStateManager";
|
|
|
3
3
|
import { FtSearchStateResourceRequest } from "./store/model";
|
|
4
4
|
export * from "./store/model";
|
|
5
5
|
export { FtSearchStateManager } from "./store/FtSearchStateManager";
|
|
6
|
-
export
|
|
7
|
-
|
|
6
|
+
export interface RegisterSearchComponentEventDetail {
|
|
7
|
+
registrationId?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class RegisterSearchComponentEvent extends CustomEvent<RegisterSearchComponentEventDetail> {
|
|
10
|
+
constructor(searchRegistrationId?: string);
|
|
8
11
|
}
|
|
9
12
|
export interface FtSearchComponentInterface {
|
|
10
13
|
stateManager?: FtSearchStateManager;
|
package/build/registration.js
CHANGED
|
@@ -5,12 +5,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { applyMixinOnce, FtLitElementRedux, hasChanged, } from "@fluid-topics/ft-wc-utils";
|
|
8
|
-
import { state } from "lit/decorators.js";
|
|
8
|
+
import { property, state, } from "lit/decorators.js";
|
|
9
9
|
export * from "./store/model";
|
|
10
10
|
export { FtSearchStateManager } from "./store/FtSearchStateManager";
|
|
11
|
-
export class RegisterSearchComponentEvent extends
|
|
12
|
-
constructor() {
|
|
13
|
-
super("register-ft-search-component", {
|
|
11
|
+
export class RegisterSearchComponentEvent extends CustomEvent {
|
|
12
|
+
constructor(searchRegistrationId) {
|
|
13
|
+
super("register-ft-search-component", {
|
|
14
|
+
bubbles: true, composed: true, detail: {
|
|
15
|
+
registrationId: searchRegistrationId,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
20
|
const registerInterval = Symbol("registerInterval");
|
|
@@ -55,7 +59,7 @@ export const toFtSearchComponent = applyMixinOnce(Symbol("toFtSearchComponent"),
|
|
|
55
59
|
}
|
|
56
60
|
else {
|
|
57
61
|
this[registerAttempts]++;
|
|
58
|
-
this.dispatchEvent(new RegisterSearchComponentEvent());
|
|
62
|
+
this.dispatchEvent(new RegisterSearchComponentEvent(this.searchRegistrationId));
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
disconnectedCallback() {
|
|
@@ -69,6 +73,9 @@ export const toFtSearchComponent = applyMixinOnce(Symbol("toFtSearchComponent"),
|
|
|
69
73
|
__decorate([
|
|
70
74
|
state({ hasChanged })
|
|
71
75
|
], FtSearchComponentClass.prototype, "neededSearchRequests", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
property()
|
|
78
|
+
], FtSearchComponentClass.prototype, "searchRegistrationId", void 0);
|
|
72
79
|
return FtSearchComponentClass;
|
|
73
80
|
});
|
|
74
81
|
export class FtSearchComponent extends toFtSearchComponent(FtLitElementRedux) {
|
|
@@ -46,6 +46,7 @@ export declare class FtSearchStateManager extends FtStateManager {
|
|
|
46
46
|
replaceFacet(oldId: string, newId?: string): void;
|
|
47
47
|
private get facetIds();
|
|
48
48
|
private set facetIds(value);
|
|
49
|
+
addPropagatedFacet(facetId: string): void;
|
|
49
50
|
/** @deprecated */
|
|
50
51
|
setFilter(key: string, values: string[]): void;
|
|
51
52
|
setValueFilter(key: string, values: string[]): void;
|
|
@@ -243,6 +243,11 @@ export class FtSearchStateManager extends FtStateManager {
|
|
|
243
243
|
const facets = uniqIds.map((id) => ({ id: id }));
|
|
244
244
|
this.updateSearchRequest({ facets });
|
|
245
245
|
}
|
|
246
|
+
addPropagatedFacet(facetId) {
|
|
247
|
+
const propagatedFacets = new Set(this.store.getState().propagatedFacets);
|
|
248
|
+
propagatedFacets.add(facetId);
|
|
249
|
+
this.store.actions.propagatedFacets([...propagatedFacets]);
|
|
250
|
+
}
|
|
246
251
|
/** @deprecated */
|
|
247
252
|
setFilter(key, values) {
|
|
248
253
|
this.setValueFilter(key, values);
|
package/build/store/model.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface FtSearchPageState {
|
|
|
7
7
|
results: Array<FtSearchResultCluster> | undefined;
|
|
8
8
|
announcements: Array<FtSearchResultAnnouncement> | undefined;
|
|
9
9
|
facets: Array<FtSearchFacet> | undefined;
|
|
10
|
+
propagatedFacets: Array<string>;
|
|
10
11
|
paging: FtSearchResultsPageInfo | undefined;
|
|
11
12
|
spellcheck: FtSpellcheck | undefined;
|
|
12
13
|
liveQuery: string;
|
package/build/store/redux.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-context",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.18",
|
|
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": "2.2.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "2.2.
|
|
22
|
+
"@fluid-topics/ft-app-context": "2.2.18",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "2.2.18",
|
|
24
24
|
"lit": "3.3.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@fluid-topics/public-api": "1.0.
|
|
27
|
+
"@fluid-topics/public-api": "1.0.143"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "0d86a22efcc09de35d3da8d470ae3f1d69f282bc"
|
|
30
30
|
}
|