@fluid-topics/ft-search-result-abstract 1.0.29 → 1.0.31
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.
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { nothing } from "lit";
|
|
2
1
|
import { ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
|
|
3
2
|
import { FtSearchResultAbstractProperties } from "./ft-search-result-abstract.properties";
|
|
4
3
|
import { FtSearchResultComponent } from "@fluid-topics/ft-search-result-context/build/registration";
|
|
5
4
|
export declare class FtSearchResultAbstract extends FtSearchResultComponent implements FtSearchResultAbstractProperties {
|
|
6
5
|
static elementDefinitions: ElementDefinitionsMap;
|
|
7
6
|
static styles: import("lit").CSSResult;
|
|
8
|
-
protected render():
|
|
7
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
9
8
|
private selectAbstract;
|
|
10
9
|
}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import { html
|
|
1
|
+
import { html } from "lit";
|
|
2
2
|
import { FtSearchResultComponent } from "@fluid-topics/ft-search-result-context/build/registration";
|
|
3
3
|
import { styles } from "./ft-search-result-abstract.css";
|
|
4
4
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
5
5
|
import { FtTypography } from "@fluid-topics/ft-typography";
|
|
6
6
|
class FtSearchResultAbstract extends FtSearchResultComponent {
|
|
7
7
|
render() {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
let abstract = this.result ? this.selectAbstract(this.result) : undefined;
|
|
9
|
+
if (!abstract) {
|
|
10
|
+
return html `
|
|
11
|
+
<style>
|
|
12
|
+
:host {
|
|
13
|
+
display: none !important;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
16
|
+
`;
|
|
17
|
+
}
|
|
18
|
+
return html `
|
|
19
|
+
<ft-typography variant="body1" part="text">${unsafeHTML(abstract)}</ft-typography>
|
|
20
|
+
`;
|
|
11
21
|
}
|
|
12
22
|
selectAbstract(result) {
|
|
13
23
|
switch (result.type) {
|
|
@@ -118,6 +118,12 @@ const rt=Symbol.for(""),ht=t=>{if((null==t?void 0:t.r)===rt)return null==t?void
|
|
|
118
118
|
</${at(this.element)}>
|
|
119
119
|
`:pt`
|
|
120
120
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
121
|
-
`}}_i.styles=[wi,xi,Ci,zi,Ai,Ui,Si,Ii,Mi,Ni,ji],Oi([s.property()],_i.prototype,"element",void 0),Oi([s.property()],_i.prototype,"variant",void 0),i.customElement("ft-typography")(_i);class Ti extends w{render(){
|
|
122
|
-
<ft-typography variant="body1" part="text">${o.unsafeHTML(
|
|
123
|
-
`:e.
|
|
121
|
+
`}}_i.styles=[wi,xi,Ci,zi,Ai,Ui,Si,Ii,Mi,Ni,ji],Oi([s.property()],_i.prototype,"element",void 0),Oi([s.property()],_i.prototype,"variant",void 0),i.customElement("ft-typography")(_i);class Ti extends w{render(){let t=this.result?this.selectAbstract(this.result):void 0;return t?e.html`
|
|
122
|
+
<ft-typography variant="body1" part="text">${o.unsafeHTML(t)}</ft-typography>
|
|
123
|
+
`:e.html`
|
|
124
|
+
<style>
|
|
125
|
+
:host {
|
|
126
|
+
display: none !important;
|
|
127
|
+
}
|
|
128
|
+
</style>
|
|
129
|
+
`}selectAbstract(t){switch(t.type){case"MAP":return t.map.htmlExcerpt;case"DOCUMENT":return t.document.htmlExcerpt;case"TOPIC":return t.topic.htmlExcerpt}return""}}Ti.elementDefinitions={"ft-typography":_i},Ti.styles=x,i.customElement("ft-search-result-abstract")(Ti),t.FtSearchResultAbstract=Ti,t.FtSearchResultAbstractCssVariables={},t.styles=x}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
|
|
@@ -207,6 +207,12 @@ var ft,ht;let dt=class extends R{constructor(){super(...arguments),this.renderOp
|
|
|
207
207
|
</${Hr(this.element)}>
|
|
208
208
|
`:Vr`
|
|
209
209
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
210
|
-
`}}bi.styles=[oi,si,ai,ui,ci,li,fi,hi,di,pi,vi],yi([s()],bi.prototype,"element",void 0),yi([s()],bi.prototype,"variant",void 0),l("ft-typography")(bi);class gi extends Tr{render(){
|
|
211
|
-
<ft-typography variant="body1" part="text">${zr(
|
|
212
|
-
`:
|
|
210
|
+
`}}bi.styles=[oi,si,ai,ui,ci,li,fi,hi,di,pi,vi],yi([s()],bi.prototype,"element",void 0),yi([s()],bi.prototype,"variant",void 0),l("ft-typography")(bi);class gi extends Tr{render(){let t=this.result?this.selectAbstract(this.result):void 0;return t?X`
|
|
211
|
+
<ft-typography variant="body1" part="text">${zr(t)}</ft-typography>
|
|
212
|
+
`:X`
|
|
213
|
+
<style>
|
|
214
|
+
:host {
|
|
215
|
+
display: none !important;
|
|
216
|
+
}
|
|
217
|
+
</style>
|
|
218
|
+
`}selectAbstract(t){switch(t.type){case"MAP":return t.map.htmlExcerpt;case"DOCUMENT":return t.document.htmlExcerpt;case"TOPIC":return t.topic.htmlExcerpt}return""}}gi.elementDefinitions={"ft-typography":bi},gi.styles=_r,l("ft-search-result-abstract")(gi),t.FtSearchResultAbstract=gi,t.FtSearchResultAbstractCssVariables={},t.styles=_r}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-result-abstract",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.31",
|
|
4
4
|
"description": "Search result abstract for integrated search component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-search-result-context": "1.0.
|
|
23
|
-
"@fluid-topics/ft-typography": "1.0.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-search-result-context": "1.0.31",
|
|
23
|
+
"@fluid-topics/ft-typography": "1.0.31",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "1.0.31",
|
|
25
25
|
"lit": "2.7.2"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@fluid-topics/public-api": "1.0.38"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "b55d9d0634c2fff57ed2bd1b3f913105bbcca3c5"
|
|
31
31
|
}
|