@fluid-topics/ft-search-result-context 1.0.55 → 1.0.56
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.
|
@@ -20,6 +20,6 @@ export declare class FtSearchResultContext extends FtLitElement implements FtSea
|
|
|
20
20
|
private onResultClick;
|
|
21
21
|
private registerComponent;
|
|
22
22
|
register(component: FtSearchResultComponentInterface): void;
|
|
23
|
-
protected
|
|
23
|
+
protected update(changedProperties: PropertyValues): void;
|
|
24
24
|
disconnectedCallback(): void;
|
|
25
25
|
}
|
|
@@ -51,8 +51,8 @@ class FtSearchResultContext extends FtLitElement {
|
|
|
51
51
|
this.registeredComponents.push(component);
|
|
52
52
|
component.result = this.result;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
super.
|
|
54
|
+
update(changedProperties) {
|
|
55
|
+
super.update(changedProperties);
|
|
56
56
|
if (changedProperties.has("result")) {
|
|
57
57
|
this.registeredComponents.forEach(c => c.result = this.result);
|
|
58
58
|
}
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
<a href="${this.url}" @click=${this.onResultClick}>
|
|
8
8
|
<slot @register-ft-search-result-component=${this.registerComponent}></slot>
|
|
9
9
|
</a>
|
|
10
|
-
`}get url(){var t;switch(null===(t=this.result)||void 0===t?void 0:t.type){case d.MAP:return this.result.map.readerUrl;case d.DOCUMENT:return this.result.document.viewerUrl;case d.TOPIC:return this.result.topic.readerUrl}return""}onResultClick(){this.dispatchEvent(new T(this.result,this.index+1))}registerComponent(t){t.stopPropagation();const n=t.composedPath()[0];this.register(n)}register(t){this.registeredComponents.push(t),t.result=this.result}
|
|
10
|
+
`}get url(){var t;switch(null===(t=this.result)||void 0===t?void 0:t.type){case d.MAP:return this.result.map.readerUrl;case d.DOCUMENT:return this.result.document.viewerUrl;case d.TOPIC:return this.result.topic.readerUrl}return""}onResultClick(){this.dispatchEvent(new T(this.result,this.index+1))}registerComponent(t){t.stopPropagation();const n=t.composedPath()[0];this.register(n)}register(t){this.registeredComponents.push(t),t.result=this.result}update(t){super.update(t),t.has("result")&&this.registeredComponents.forEach((t=>t.result=this.result))}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}b.elementDefinitions={},b.styles=e,w([i.property({attribute:!1})],b.prototype,"result",void 0),w([i.property()],b.prototype,"index",void 0),n.customElement("ft-search-result-context")(b),t.FtSearchResultContext=b,t.FtSearchResultContextCssVariables={},t.SearchResultClickEvent=T,t.styles=e}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators);
|
|
@@ -88,4 +88,4 @@ var at,ht;class ct extends O{constructor(){super(...arguments),this.renderOption
|
|
|
88
88
|
<a href="${this.url}" @click=${this.onResultClick}>
|
|
89
89
|
<slot @register-ft-search-result-component=${this.registerComponent}></slot>
|
|
90
90
|
</a>
|
|
91
|
-
`}get url(){var t;switch(null===(t=this.result)||void 0===t?void 0:t.type){case Lt.MAP:return this.result.map.readerUrl;case Lt.DOCUMENT:return this.result.document.viewerUrl;case Lt.TOPIC:return this.result.topic.readerUrl}return""}onResultClick(){this.dispatchEvent(new $t(this.result,this.index+1))}registerComponent(t){t.stopPropagation();const i=t.composedPath()[0];this.register(i)}register(t){this.registeredComponents.push(t),t.result=this.result}
|
|
91
|
+
`}get url(){var t;switch(null===(t=this.result)||void 0===t?void 0:t.type){case Lt.MAP:return this.result.map.readerUrl;case Lt.DOCUMENT:return this.result.document.viewerUrl;case Lt.TOPIC:return this.result.topic.readerUrl}return""}onResultClick(){this.dispatchEvent(new $t(this.result,this.index+1))}registerComponent(t){t.stopPropagation();const i=t.composedPath()[0];this.register(i)}register(t){this.registeredComponents.push(t),t.result=this.result}update(t){super.update(t),t.has("result")&&this.registeredComponents.forEach((t=>t.result=this.result))}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}jt.elementDefinitions={},jt.styles=gt,kt([s({attribute:!1})],jt.prototype,"result",void 0),kt([s()],jt.prototype,"index",void 0),(Ft="ft-search-result-context",t=>{window.customElements.get(Ft)||window.customElements.define(Ft,t)})(jt),t.FtSearchResultContext=jt,t.FtSearchResultContextCssVariables={},t.SearchResultClickEvent=$t,t.styles=gt}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-result-context",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.56",
|
|
4
4
|
"description": "Search result context for integrated search component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "1.0.56",
|
|
23
23
|
"lit": "2.7.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@fluid-topics/public-api": "1.0.45"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "da00d6ea6bfc74fef8c6687f383355e35a26289b"
|
|
29
29
|
}
|