@dialpad/dialtone-vue 3.225.0-next.7 → 3.225.0-next.8

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.
@@ -2643,7 +2643,8 @@ var Bi = {
2643
2643
  "mention-hover",
2644
2644
  "mention-leave",
2645
2645
  "channel-click",
2646
- "phone-click"
2646
+ "phone-click",
2647
+ "link-click"
2647
2648
  ],
2648
2649
  data() {
2649
2650
  return {
@@ -2818,6 +2819,15 @@ var Bi = {
2818
2819
  ...this.inputAttrs,
2819
2820
  class: this.inputClass
2820
2821
  },
2822
+ handleDOMEvents: { click: (e, t) => {
2823
+ if (!this.link || t.button !== 0) return !1;
2824
+ let n = t.target?.closest?.("a");
2825
+ return n ? (this.editor.emit("link-click", {
2826
+ href: n.href,
2827
+ text: n.textContent,
2828
+ event: t
2829
+ }), t.defaultPrevented) : !1;
2830
+ } },
2821
2831
  handleKeyDown: (e, t) => {
2822
2832
  if (this.allowTyping) return !1;
2823
2833
  let n = ["Backspace"];
@@ -2982,6 +2992,8 @@ var Bi = {
2982
2992
  this.$emit("channel-click", e);
2983
2993
  }), this.editor.on("phone-click", (e) => {
2984
2994
  this.$emit("phone-click", e);
2995
+ }), this.editor.on("link-click", (e) => {
2996
+ this.$emit("link-click", e);
2985
2997
  });
2986
2998
  },
2987
2999
  getOutput() {
@@ -3067,4 +3079,4 @@ var Wi = /* @__PURE__ */ i(Vi, [["render", Ui]]);
3067
3079
  //#endregion
3068
3080
  export { Wi as t };
3069
3081
 
3070
- //# sourceMappingURL=RichTextEditor-SgD4goFh.js.map
3082
+ //# sourceMappingURL=RichTextEditor-Bs2RwA4g.js.map