@fluid-topics/ft-search-result-metadata 1.2.50 → 1.2.52
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.
|
@@ -3,6 +3,7 @@ import { ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
|
|
|
3
3
|
import { FtSearchResultMetadataProperties } from "./ft-search-result-metadata.properties";
|
|
4
4
|
import type { FtSearchResultStateManager } from "@fluid-topics/ft-search-result-context/build/registration";
|
|
5
5
|
import { FtSearchResultComponent } from "@fluid-topics/ft-search-result-context/build/registration";
|
|
6
|
+
import { FtSearchResultClusterEntry } from "@fluid-topics/public-api";
|
|
6
7
|
declare const FtSearchResultMetadata_base: typeof FtSearchResultComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface> & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-app-context").FtLitElementWithDateFormatInterface>;
|
|
7
8
|
export declare class FtSearchResultMetadata extends FtSearchResultMetadata_base implements FtSearchResultMetadataProperties {
|
|
8
9
|
static elementDefinitions: ElementDefinitionsMap;
|
|
@@ -34,6 +35,7 @@ export declare class FtSearchResultMetadata extends FtSearchResultMetadata_base
|
|
|
34
35
|
private onClusterSelected;
|
|
35
36
|
private computeClusters;
|
|
36
37
|
private renderClusterItem;
|
|
38
|
+
onAuxClick(e: MouseEvent, result: FtSearchResultClusterEntry): void;
|
|
37
39
|
private renderClusterItemValue;
|
|
38
40
|
private onResultClick;
|
|
39
41
|
private renderChip;
|
|
@@ -91,13 +91,18 @@ class FtSearchResultMetadata extends withDateFormat(withI18n(FtSearchResultCompo
|
|
|
91
91
|
renderClusterItem(result, metadata) {
|
|
92
92
|
if (this.goToDocumentOnSwitch) {
|
|
93
93
|
return html `
|
|
94
|
-
<a href="${getResultUrl(result)}" @click=${() => this.onResultClick(result)}>
|
|
94
|
+
<a href="${getResultUrl(result)}" @click=${() => this.onResultClick(result)} @auxclick=${(e) => this.onAuxClick(e, result)}>
|
|
95
95
|
${this.renderClusterItemValue(metadata.value, metadata.displayValue)}
|
|
96
96
|
</a>
|
|
97
97
|
`;
|
|
98
98
|
}
|
|
99
99
|
return this.renderClusterItemValue(metadata.value, metadata.displayValue);
|
|
100
100
|
}
|
|
101
|
+
onAuxClick(e, result) {
|
|
102
|
+
if (e.button == 1) {
|
|
103
|
+
this.onResultClick(result);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
101
106
|
renderClusterItemValue(value, displayValue) {
|
|
102
107
|
return html `
|
|
103
108
|
<ft-floating-menu-item value="${value !== null && value !== void 0 ? value : "ft:no_value"}">
|