@fluid-topics/ft-reader-search-in-document 1.2.57 → 1.2.59

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.
@@ -21,6 +21,7 @@ export declare class FtReaderSearchInDocument extends FtReaderSearchInDocument_b
21
21
  private get filters();
22
22
  private renderResult;
23
23
  onAuxClick(e: MouseEvent, result: FtSearchResultClusterEntry, rank: number): void;
24
+ onContextMenu(result: FtSearchResultClusterEntry, rank: number): void;
24
25
  protected render(): typeof nothing | TemplateResult<1>;
25
26
  protected update(props: PropertyValues): void;
26
27
  private onLinkClick;
@@ -14,7 +14,7 @@ import { getResultUrl } from "@fluid-topics/ft-search-result-context/build/utils
14
14
  import { SearchInDocumentEvent } from "./events";
15
15
  import { readerSearchInDocumentContext } from "./ReaderSearchInDocumentMessages";
16
16
  import { FtCard } from "@fluid-topics/ft-card";
17
- import { SearchResultClickEvent } from "@fluid-topics/ft-search-context/build/utils";
17
+ import { SearchResultClickEvent, SearchResultOpenContextMenuEvent } from "@fluid-topics/ft-search-context/build/utils";
18
18
  class FtReaderSearchInDocument extends withI18n(FtReaderComponent) {
19
19
  constructor() {
20
20
  super();
@@ -43,7 +43,9 @@ class FtReaderSearchInDocument extends withI18n(FtReaderComponent) {
43
43
  var _a;
44
44
  return html `
45
45
  <style> ${resultStyles}</style>
46
- <a href="${getResultUrl(result)}" @click="${() => this.onLinkClick(result, rank)}" @auxclick="${(e) => this.onAuxClick(e, result, rank)}">
46
+ <a href="${getResultUrl(result)}" @click="${() => this.onLinkClick(result, rank)}"
47
+ @auxclick="${(e) => this.onAuxClick(e, result, rank)}"
48
+ @contextmenu="${() => this.onContextMenu(result, rank)}">
47
49
  <ft-card clickable noheader>
48
50
  <div class="result-container">
49
51
  ${this.hideResultTitle ? nothing : html `
@@ -64,6 +66,9 @@ class FtReaderSearchInDocument extends withI18n(FtReaderComponent) {
64
66
  this.onLinkClick(result, rank);
65
67
  }
66
68
  }
69
+ onContextMenu(result, rank) {
70
+ this.dispatchEvent(new SearchResultOpenContextMenuEvent(result, rank));
71
+ }
67
72
  render() {
68
73
  if (!this.map) {
69
74
  return nothing;