@fluid-topics/ft-search-result-metadata 1.1.13 → 1.1.14
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.
|
@@ -144,7 +144,7 @@ class FtSearchResultMetadata extends withI18n(FtSearchResultComponent) {
|
|
|
144
144
|
(_c = this.resultStateManager) === null || _c === void 0 ? void 0 : _c.registerMetadata(this.key);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
if (props.has("
|
|
147
|
+
if (props.has("useAsClusterSwitch") && this.key) {
|
|
148
148
|
if (this.useAsClusterSwitch) {
|
|
149
149
|
(_d = this.resultStateManager) === null || _d === void 0 ? void 0 : _d.registerMetadata(this.key);
|
|
150
150
|
}
|
|
@@ -152,7 +152,7 @@ class FtSearchResultMetadata extends withI18n(FtSearchResultComponent) {
|
|
|
152
152
|
(_e = this.resultStateManager) === null || _e === void 0 ? void 0 : _e.unregisterMetadata(this.key);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
if ((props.has("cluster") || props.has("result") || props.has("key") || props.has("
|
|
155
|
+
if ((props.has("cluster") || props.has("result") || props.has("key") || props.has("useAsClusterSwitch"))
|
|
156
156
|
&& this.cluster && this.result && this.key && this.useAsClusterSwitch) {
|
|
157
157
|
this.computeClusters();
|
|
158
158
|
}
|
|
@@ -1133,4 +1133,4 @@ const Bt=Symbol.for(""),Dt=t=>{if(t?.r===Bt)return t?._$litStatic$},Ft=t=>({_$li
|
|
|
1133
1133
|
display: none !important;
|
|
1134
1134
|
}
|
|
1135
1135
|
</style>
|
|
1136
|
-
`}get displayCluster(){var t,o;return this.useAsClusterSwitch&&(null!==(o=null===(t=this.cluster)||void 0===t?void 0:t.entries.length)&&void 0!==o?o:0)>1}getEllipsis(t){let o=this.maxLength?t.substring(0,this.maxLength):t;return o+(o.length<t.length?"…":"")}update(t){var o,e,i,n,r;super.update(t),(t.has("result")||t.has("key"))&&this.result&&(this.resultMetadata=null===(o=this.resultData)||void 0===o?void 0:o.metadata.find((t=>t.key==this.key)),this.metadataLabel=this.findClusterMetadataLabel()),t.has("key")&&this.useAsClusterSwitch&&(t.get("key")&&(null===(e=this.resultStateManager)||void 0===e||e.unregisterMetadata(t.get("key"))),this.key&&(null===(i=this.resultStateManager)||void 0===i||i.registerMetadata(this.key))),t.has("
|
|
1136
|
+
`}get displayCluster(){var t,o;return this.useAsClusterSwitch&&(null!==(o=null===(t=this.cluster)||void 0===t?void 0:t.entries.length)&&void 0!==o?o:0)>1}getEllipsis(t){let o=this.maxLength?t.substring(0,this.maxLength):t;return o+(o.length<t.length?"…":"")}update(t){var o,e,i,n,r;super.update(t),(t.has("result")||t.has("key"))&&this.result&&(this.resultMetadata=null===(o=this.resultData)||void 0===o?void 0:o.metadata.find((t=>t.key==this.key)),this.metadataLabel=this.findClusterMetadataLabel()),t.has("key")&&this.useAsClusterSwitch&&(t.get("key")&&(null===(e=this.resultStateManager)||void 0===e||e.unregisterMetadata(t.get("key"))),this.key&&(null===(i=this.resultStateManager)||void 0===i||i.registerMetadata(this.key))),t.has("useAsClusterSwitch")&&this.key&&(this.useAsClusterSwitch?null===(n=this.resultStateManager)||void 0===n||n.registerMetadata(this.key):null===(r=this.resultStateManager)||void 0===r||r.unregisterMetadata(this.key)),(t.has("cluster")||t.has("result")||t.has("key")||t.has("useAsClusterSwitch"))&&this.cluster&&this.result&&this.key&&this.useAsClusterSwitch&&this.computeClusters()}get resultData(){var t,o,e,i,n;return null!==(i=null!==(o=null===(t=this.result)||void 0===t?void 0:t.map)&&void 0!==o?o:null===(e=this.result)||void 0===e?void 0:e.topic)&&void 0!==i?i:null===(n=this.result)||void 0===n?void 0:n.document}get valueText(){var t,o;return null!==(o=null===(t=this.resultMetadata)||void 0===t?void 0:t.values.join(", "))&&void 0!==o?o:""}get tooltipText(){return this.resultMetadata?`${this.metadataLabel}: ${this.valueText}`:this.useAsClusterSwitch?`${this.metadataLabel}: ${ot.messages.noValueInCluster()}`:""}findClusterMetadataLabel(){var t;const o=null===(t=this.cluster)||void 0===t?void 0:t.entries.flatMap((t=>{var o,e;return(null!==(e=null!==(o=null==t?void 0:t.map)&&void 0!==o?o:null==t?void 0:t.document)&&void 0!==e?e:null==t?void 0:t.topic).metadata.filter((t=>t.key==this.key))}))[0];return null==o?void 0:o.label}}Dn.elementDefinitions={"ft-tooltip":xi,"ft-chip":un,"ft-floating-menu":kn,"ft-floating-menu-item":In,"ft-floating-menu-label":zn},Dn.styles=l,Bn([i.property()],Dn.prototype,"key",void 0),Bn([i.property({type:Boolean})],Dn.prototype,"useChip",void 0),Bn([i.property({type:Boolean})],Dn.prototype,"useAsClusterSwitch",void 0),Bn([i.property({type:Boolean})],Dn.prototype,"goToDocumentOnSwitch",void 0),Bn([i.property({type:Number,attribute:"max-length"})],Dn.prototype,"maxLength",void 0),Bn([o.redux({store:w.name})],Dn.prototype,"editorMode",void 0),Bn([i.state()],Dn.prototype,"resultMetadata",void 0),Bn([i.state()],Dn.prototype,"metadataLabel",void 0),Bn([i.state()],Dn.prototype,"computedClusters",void 0),o.customElement("ft-search-result-metadata")(Dn),t.FtSearchResultMetadata=Dn,t.FtSearchResultMetadataCssVariables={},t.styles=l}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML,ftGlobals.litRepeat);
|
|
@@ -1284,4 +1284,4 @@ class Ms extends Cs{constructor(t){if(super(t),this.et=rt,t.type!==Ss)throw Erro
|
|
|
1284
1284
|
display: none !important;
|
|
1285
1285
|
}
|
|
1286
1286
|
</style>
|
|
1287
|
-
`}get displayCluster(){var t,e;return this.useAsClusterSwitch&&(null!==(e=null===(t=this.cluster)||void 0===t?void 0:t.entries.length)&&void 0!==e?e:0)>1}getEllipsis(t){let e=this.maxLength?t.substring(0,this.maxLength):t;return e+(e.length<t.length?"…":"")}update(t){var e,o,i,r,n;super.update(t),(t.has("result")||t.has("key"))&&this.result&&(this.resultMetadata=null===(e=this.resultData)||void 0===e?void 0:e.metadata.find((t=>t.key==this.key)),this.metadataLabel=this.findClusterMetadataLabel()),t.has("key")&&this.useAsClusterSwitch&&(t.get("key")&&(null===(o=this.resultStateManager)||void 0===o||o.unregisterMetadata(t.get("key"))),this.key&&(null===(i=this.resultStateManager)||void 0===i||i.registerMetadata(this.key))),t.has("
|
|
1287
|
+
`}get displayCluster(){var t,e;return this.useAsClusterSwitch&&(null!==(e=null===(t=this.cluster)||void 0===t?void 0:t.entries.length)&&void 0!==e?e:0)>1}getEllipsis(t){let e=this.maxLength?t.substring(0,this.maxLength):t;return e+(e.length<t.length?"…":"")}update(t){var e,o,i,r,n;super.update(t),(t.has("result")||t.has("key"))&&this.result&&(this.resultMetadata=null===(e=this.resultData)||void 0===e?void 0:e.metadata.find((t=>t.key==this.key)),this.metadataLabel=this.findClusterMetadataLabel()),t.has("key")&&this.useAsClusterSwitch&&(t.get("key")&&(null===(o=this.resultStateManager)||void 0===o||o.unregisterMetadata(t.get("key"))),this.key&&(null===(i=this.resultStateManager)||void 0===i||i.registerMetadata(this.key))),t.has("useAsClusterSwitch")&&this.key&&(this.useAsClusterSwitch?null===(r=this.resultStateManager)||void 0===r||r.registerMetadata(this.key):null===(n=this.resultStateManager)||void 0===n||n.unregisterMetadata(this.key)),(t.has("cluster")||t.has("result")||t.has("key")||t.has("useAsClusterSwitch"))&&this.cluster&&this.result&&this.key&&this.useAsClusterSwitch&&this.computeClusters()}get resultData(){var t,e,o,i,r;return null!==(i=null!==(e=null===(t=this.result)||void 0===t?void 0:t.map)&&void 0!==e?e:null===(o=this.result)||void 0===o?void 0:o.topic)&&void 0!==i?i:null===(r=this.result)||void 0===r?void 0:r.document}get valueText(){var t,e;return null!==(e=null===(t=this.resultMetadata)||void 0===t?void 0:t.values.join(", "))&&void 0!==e?e:""}get tooltipText(){return this.resultMetadata?`${this.metadataLabel}: ${this.valueText}`:this.useAsClusterSwitch?`${this.metadataLabel}: ${Zr.messages.noValueInCluster()}`:""}findClusterMetadataLabel(){var t;const e=null===(t=this.cluster)||void 0===t?void 0:t.entries.flatMap((t=>{var e,o;return(null!==(o=null!==(e=null==t?void 0:t.map)&&void 0!==e?e:null==t?void 0:t.document)&&void 0!==o?o:null==t?void 0:t.topic).metadata.filter((t=>t.key==this.key))}))[0];return null==e?void 0:e.label}}tc.elementDefinitions={"ft-tooltip":Os,"ft-chip":Ol,"ft-floating-menu":Fl,"ft-floating-menu-item":Wl,"ft-floating-menu-label":zl},tc.styles=Yi,Ql([R()],tc.prototype,"key",void 0),Ql([R({type:Boolean})],tc.prototype,"useChip",void 0),Ql([R({type:Boolean})],tc.prototype,"useAsClusterSwitch",void 0),Ql([R({type:Boolean})],tc.prototype,"goToDocumentOnSwitch",void 0),Ql([R({type:Number,attribute:"max-length"})],tc.prototype,"maxLength",void 0),Ql([He({store:ur.name})],tc.prototype,"editorMode",void 0),Ql([k()],tc.prototype,"resultMetadata",void 0),Ql([k()],tc.prototype,"metadataLabel",void 0),Ql([k()],tc.prototype,"computedClusters",void 0),W("ft-search-result-metadata")(tc),t.FtSearchResultMetadata=tc,t.FtSearchResultMetadataCssVariables={},t.styles=Yi}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-result-metadata",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.14",
|
|
4
4
|
"description": "Search result metadata for integrated search component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-chip": "1.1.
|
|
23
|
-
"@fluid-topics/ft-floating-menu": "1.1.
|
|
24
|
-
"@fluid-topics/ft-search-result-context": "1.1.
|
|
25
|
-
"@fluid-topics/ft-tooltip": "1.1.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-chip": "1.1.14",
|
|
23
|
+
"@fluid-topics/ft-floating-menu": "1.1.14",
|
|
24
|
+
"@fluid-topics/ft-search-result-context": "1.1.14",
|
|
25
|
+
"@fluid-topics/ft-tooltip": "1.1.14",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.1.14",
|
|
27
27
|
"lit": "3.1.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@fluid-topics/public-api": "1.0.52"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "f58494852acf5409f0881678c76cd0af9a203482"
|
|
33
33
|
}
|