@dialpad/dialtone 9.155.0 → 9.155.1

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,6 +1,6 @@
1
1
  import { nodeViewProps as $, NodeViewWrapper as v, VueRenderer as R, VueNodeViewRenderer as I, BubbleMenu as Q, EditorContent as Z, Editor as ee } from "../../node_modules/@tiptap/vue-3.js";
2
- import { Node as te, nodePasteRule as A, InputRule as ne, mergeAttributes as b, getMarksBetween as oe, combineTransactionSteps as re, getChangedRanges as se, findChildrenInRange as ie, Mark as ae, nodeInputRule as ce, Extension as de } from "@tiptap/core";
3
- import le from "@tiptap/extension-blockquote";
2
+ import { Node as te, nodePasteRule as A, InputRule as ne, mergeAttributes as b, getMarksBetween as oe, combineTransactionSteps as re, getChangedRanges as se, findChildrenInRange as ie, Mark as ae, nodeInputRule as ce, Extension as le } from "@tiptap/core";
3
+ import de from "@tiptap/extension-blockquote";
4
4
  import ue from "@tiptap/extension-code-block";
5
5
  import me from "@tiptap/extension-code";
6
6
  import he from "@tiptap/extension-document";
@@ -24,7 +24,7 @@ import ve from "@tiptap/extension-font-family";
24
24
  import { PluginKey as T, Plugin as Re } from "@tiptap/pm/state";
25
25
  import Ie from "@tiptap/suggestion";
26
26
  import { emojiPattern as z } from "regex-combined-emojis";
27
- import { resolveComponent as l, createBlock as m, openBlock as d, withCtx as u, createVNode as f, createElementBlock as _, withDirectives as Me, createElementVNode as k, Fragment as Be, renderList as Ne, withModifiers as j, normalizeClass as X, resolveDynamicComponent as Oe, vShow as De, createTextVNode as C, toDisplayString as h, markRaw as M, createCommentVNode as w, mergeProps as Ae } from "vue";
27
+ import { resolveComponent as d, createBlock as m, openBlock as l, withCtx as u, createVNode as f, createElementBlock as _, withDirectives as Me, createElementVNode as k, Fragment as Be, renderList as Ne, withModifiers as j, normalizeClass as X, resolveDynamicComponent as Oe, vShow as De, createTextVNode as C, toDisplayString as h, markRaw as M, createCommentVNode as w, mergeProps as Ae } from "vue";
28
28
  import { _ as g } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
29
29
  import J from "../emoji/emoji.js";
30
30
  import { getEmojiData as Pe, emojiRegex as je, stringToUnicode as He, codeToEmojiData as H, emojiShortCodeRegex as Ke } from "../../common/emoji/index.js";
@@ -53,8 +53,8 @@ const nt = {
53
53
  props: $
54
54
  };
55
55
  function ot(e, t, o, n, r, s) {
56
- const i = l("dt-emoji"), a = l("node-view-wrapper");
57
- return d(), m(a, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
56
+ const i = d("dt-emoji"), a = d("node-view-wrapper");
57
+ return l(), m(a, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
58
58
  default: u(() => [
59
59
  f(i, {
60
60
  size: "500",
@@ -129,7 +129,7 @@ const rt = /* @__PURE__ */ g(nt, [["render", ot]]), st = {
129
129
  this.command({ name: t.name, id: t.id, avatarSrc: t.avatarSrc, contactKey: t.contactKey });
130
130
  break;
131
131
  case "channel":
132
- this.command({ name: t.name, id: t.id, locked: t.locked });
132
+ this.command({ name: t.name, id: t.id, locked: t.locked, channelKey: t.channelKey });
133
133
  break;
134
134
  case "slash-command":
135
135
  this.command({ command: t.command });
@@ -142,10 +142,10 @@ const rt = /* @__PURE__ */ g(nt, [["render", ot]]), st = {
142
142
  class: "d-suggestion-list"
143
143
  };
144
144
  function ct(e, t, o, n, r, s) {
145
- const i = l("dt-list-item");
146
- return d(), _("div", it, [
145
+ const i = d("dt-list-item");
146
+ return l(), _("div", it, [
147
147
  Me(k("ul", at, [
148
- (d(!0), _(Be, null, Ne(o.items, (a, c) => (d(), m(i, {
148
+ (l(!0), _(Be, null, Ne(o.items, (a, c) => (l(), m(i, {
149
149
  key: a.id,
150
150
  class: X([
151
151
  "d-suggestion-list__item",
@@ -156,7 +156,7 @@ function ct(e, t, o, n, r, s) {
156
156
  onKeydown: j(s.onKeyDown, ["prevent"])
157
157
  }, {
158
158
  default: u(() => [
159
- (d(), m(Oe(o.itemComponent), { item: a }, null, 8, ["item"]))
159
+ (l(), m(Oe(o.itemComponent), { item: a }, null, 8, ["item"]))
160
160
  ]),
161
161
  _: 2
162
162
  }, 1032, ["class", "onClick", "onKeydown"]))), 128))
@@ -165,7 +165,7 @@ function ct(e, t, o, n, r, s) {
165
165
  ])
166
166
  ]);
167
167
  }
168
- const N = /* @__PURE__ */ g(st, [["render", ct]]), dt = {
168
+ const N = /* @__PURE__ */ g(st, [["render", ct]]), lt = {
169
169
  compatConfig: { MODE: 3 },
170
170
  name: "EmojiSuggestion",
171
171
  components: {
@@ -179,9 +179,9 @@ const N = /* @__PURE__ */ g(st, [["render", ct]]), dt = {
179
179
  }
180
180
  }
181
181
  };
182
- function lt(e, t, o, n, r, s) {
183
- const i = l("dt-emoji"), a = l("dt-stack");
184
- return d(), m(a, {
182
+ function dt(e, t, o, n, r, s) {
183
+ const i = d("dt-emoji"), a = d("dt-stack");
184
+ return l(), m(a, {
185
185
  direction: "row",
186
186
  gap: "400"
187
187
  }, {
@@ -195,7 +195,7 @@ function lt(e, t, o, n, r, s) {
195
195
  _: 1
196
196
  });
197
197
  }
198
- const ut = /* @__PURE__ */ g(dt, [["render", lt]]), O = {
198
+ const ut = /* @__PURE__ */ g(lt, [["render", dt]]), O = {
199
199
  name: "hideOnEsc",
200
200
  defaultValue: !0,
201
201
  fn({ hide: e }) {
@@ -571,8 +571,8 @@ const St = {
571
571
  }
572
572
  };
573
573
  function It(e, t, o, n, r, s) {
574
- const i = l("dt-link"), a = l("node-view-wrapper");
575
- return d(), m(a, { class: "d-d-inline-block" }, {
574
+ const i = d("dt-link"), a = d("node-view-wrapper");
575
+ return l(), m(a, { class: "d-d-inline-block" }, {
576
576
  default: u(() => [
577
577
  f(i, {
578
578
  kind: "mention",
@@ -645,15 +645,16 @@ const Mt = /* @__PURE__ */ g(Rt, [["render", It]]), Bt = K.extend({
645
645
  const e = {
646
646
  name: this.$props.node.attrs.name,
647
647
  id: this.$props.node.attrs.id,
648
- locked: this.$props.node.attrs.locked
648
+ locked: this.$props.node.attrs.locked,
649
+ channelKey: this.$props.node.attrs.channelKey
649
650
  };
650
651
  this.$props.editor.emit("channel-click", e);
651
652
  }
652
653
  }
653
654
  };
654
655
  function Ot(e, t, o, n, r, s) {
655
- const i = l("dt-icon-lock"), a = l("dt-stack"), c = l("dt-link"), p = l("node-view-wrapper");
656
- return d(), m(p, { class: "d-d-inline-block" }, {
656
+ const i = d("dt-icon-lock"), a = d("dt-stack"), c = d("dt-link"), p = d("node-view-wrapper");
657
+ return l(), m(p, { class: "d-d-inline-block" }, {
657
658
  default: u(() => [
658
659
  f(c, {
659
660
  kind: "mention",
@@ -665,7 +666,7 @@ function Ot(e, t, o, n, r, s) {
665
666
  gap: "0"
666
667
  }, {
667
668
  default: u(() => [
668
- e.$props.node.attrs.locked ? (d(), m(i, {
669
+ e.$props.node.attrs.locked ? (l(), m(i, {
669
670
  key: 0,
670
671
  size: "200"
671
672
  })) : w("", !0),
@@ -702,6 +703,9 @@ const Dt = /* @__PURE__ */ g(Nt, [["render", Ot]]), At = K.extend({
702
703
  },
703
704
  locked: {
704
705
  default: !1
706
+ },
707
+ channelKey: {
708
+ default: ""
705
709
  }
706
710
  };
707
711
  },
@@ -740,8 +744,8 @@ const Dt = /* @__PURE__ */ g(Nt, [["render", Ot]]), At = K.extend({
740
744
  }
741
745
  };
742
746
  function jt(e, t, o, n, r, s) {
743
- const i = l("node-view-wrapper");
744
- return d(), m(i, { class: "d-d-inline-block" }, {
747
+ const i = d("node-view-wrapper");
748
+ return l(), m(i, { class: "d-d-inline-block" }, {
745
749
  default: u(() => [
746
750
  C(h(s.text), 1)
747
751
  ]),
@@ -880,8 +884,8 @@ const Ht = /* @__PURE__ */ g(Pt, [["render", jt]]), Kt = (e, t) => [...e.matchAl
880
884
  class: "d-mention-suggestion__status"
881
885
  };
882
886
  function zt(e, t, o, n, r, s) {
883
- const i = l("dt-avatar"), a = l("dt-stack");
884
- return d(), m(a, {
887
+ const i = d("dt-avatar"), a = d("dt-stack");
888
+ return l(), m(a, {
885
889
  direction: "row",
886
890
  class: "d-mention-suggestion__container",
887
891
  gap: "400"
@@ -901,19 +905,19 @@ function zt(e, t, o, n, r, s) {
901
905
  }, {
902
906
  default: u(() => [
903
907
  k("span", qt, h(s.name), 1),
904
- s.showDetails ? (d(), m(a, {
908
+ s.showDetails ? (l(), m(a, {
905
909
  key: 0,
906
910
  direction: "row",
907
911
  gap: "300",
908
912
  class: "d-label--sm-plain"
909
913
  }, {
910
914
  default: u(() => [
911
- s.presenceText ? (d(), _("span", {
915
+ s.presenceText ? (l(), _("span", {
912
916
  key: 0,
913
917
  class: X(["d-mention-suggestion__presence", [s.presenceFontColorClass]])
914
918
  }, h(s.presenceText), 3)) : w("", !0),
915
- s.status && s.presenceText ? (d(), _("div", Ut, " • ")) : w("", !0),
916
- s.status ? (d(), _("div", Wt, h(s.status), 1)) : w("", !0)
919
+ s.status && s.presenceText ? (l(), _("div", Ut, " • ")) : w("", !0),
920
+ s.status ? (l(), _("div", Wt, h(s.status), 1)) : w("", !0)
917
921
  ]),
918
922
  _: 1
919
923
  })) : w("", !0)
@@ -994,16 +998,16 @@ const Xt = /* @__PURE__ */ g(Vt, [["render", zt]]), Jt = {
994
998
  }
995
999
  };
996
1000
  function Gt(e, t, o, n, r, s) {
997
- const i = l("dt-icon-hash"), a = l("dt-icon-lock"), c = l("dt-stack");
998
- return d(), m(c, {
1001
+ const i = d("dt-icon-hash"), a = d("dt-icon-lock"), c = d("dt-stack");
1002
+ return l(), m(c, {
999
1003
  direction: "row",
1000
1004
  gap: "400"
1001
1005
  }, {
1002
1006
  default: u(() => [
1003
- o.item.locked ? (d(), m(a, {
1007
+ o.item.locked ? (l(), m(a, {
1004
1008
  key: 1,
1005
1009
  size: "300"
1006
- })) : (d(), m(i, {
1010
+ })) : (l(), m(i, {
1007
1011
  key: 0,
1008
1012
  size: "300"
1009
1013
  })),
@@ -1083,10 +1087,10 @@ const Qt = /* @__PURE__ */ g(Yt, [["render", Gt]]), Zt = {
1083
1087
  }
1084
1088
  }, tn = { class: "d-body--md-compact" }, nn = { key: 0 }, on = { class: "d-body--sm d-fc-tertiary" };
1085
1089
  function rn(e, t, o, n, r, s) {
1086
- return d(), _("div", null, [
1090
+ return l(), _("div", null, [
1087
1091
  k("div", tn, [
1088
1092
  k("span", null, "/" + h(s.command), 1),
1089
- s.parametersExample ? (d(), _("span", nn, h(s.parametersExample), 1)) : w("", !0)
1093
+ s.parametersExample ? (l(), _("span", nn, h(s.parametersExample), 1)) : w("", !0)
1090
1094
  ]),
1091
1095
  k("div", on, h(s.description), 1)
1092
1096
  ]);
@@ -1290,7 +1294,7 @@ const sn = /* @__PURE__ */ g(en, [["render", rn]]), an = {
1290
1294
  * The only required key is the items function which is used to query the channels for suggestion.
1291
1295
  * items({ query }) => { return [ChannelObject]; }
1292
1296
  * ChannelObject format:
1293
- * { name: string, id: string, locked: boolean }
1297
+ * { name: string, id: string, locked: boolean, channelKey?: string }
1294
1298
  *
1295
1299
  * When null, it does not add the plugin. Setting locked to true will display a lock rather than hash.
1296
1300
  */
@@ -1588,9 +1592,9 @@ ${this.processNodeContent(e)}
1588
1592
  return `<!-- @mention: {"id": "${o}", "contactKey": "${n}", "name": "${t}"} -->`;
1589
1593
  },
1590
1594
  processChannelNode(e) {
1591
- var r, s, i;
1592
- const t = ((r = e.attrs) == null ? void 0 : r.name) || "", o = ((s = e.attrs) == null ? void 0 : s.id) || "", n = ((i = e.attrs) == null ? void 0 : i.locked.toString()) || "";
1593
- return `<!-- @channel: {"id": "${o}", "name": "${t}", "locked": "${n}"} -->`;
1595
+ var s, i, a, c;
1596
+ const t = ((s = e.attrs) == null ? void 0 : s.name) || "", o = ((i = e.attrs) == null ? void 0 : i.id) || "", n = ((a = e.attrs) == null ? void 0 : a.locked.toString()) || "", r = ((c = e.attrs) == null ? void 0 : c.channelKey) || "";
1597
+ return `<!-- @channel: {"id": "${o}", "channelKey": "${r}", "name": "${t}", "locked": "${n}"} -->`;
1594
1598
  },
1595
1599
  processSlashCommandsNode(e) {
1596
1600
  var n, r;
@@ -1650,14 +1654,14 @@ ${this.processNodeContent(e)}
1650
1654
  // eslint-disable-next-line complexity
1651
1655
  extensions() {
1652
1656
  const e = [he, Te, Se, pe];
1653
- e.push(this.useDivTags ? vt : W), this.allowBold && e.push(ge), this.allowBlockquote && e.push(le), this.allowBulletList && (e.push(_e), e.push(we.extend({
1657
+ e.push(this.useDivTags ? vt : W), this.allowBold && e.push(ge), this.allowBlockquote && e.push(de), this.allowBulletList && (e.push(_e), e.push(we.extend({
1654
1658
  renderText({ node: n }) {
1655
1659
  return n.textContent;
1656
1660
  }
1657
1661
  })), e.push(Ce)), this.allowItalic && e.push(ke), this.allowStrike && e.push(be), this.allowUnderline && e.push(xe), this.placeholder && e.push(
1658
1662
  fe.configure({ placeholder: this.placeholder })
1659
1663
  );
1660
- const t = this, o = de.create({
1664
+ const t = this, o = le.create({
1661
1665
  addKeyboardShortcuts() {
1662
1666
  return {
1663
1667
  "Shift-Enter": ({ editor: n }) => t.allowLineBreaks ? !1 : (n.commands.first(({ commands: r }) => [
@@ -1971,11 +1975,11 @@ ${n.textContent}
1971
1975
  this.editor.commands.focus();
1972
1976
  }
1973
1977
  }
1974
- }, dn = { class: "d-popover__dialog" };
1975
- function ln(e, t, o, n, r, s) {
1976
- const i = l("dt-button"), a = l("dt-stack"), c = l("bubble-menu"), p = l("editor-content");
1977
- return d(), _("div", null, [
1978
- r.editor && o.link && !o.hideLinkBubbleMenu ? (d(), m(c, {
1978
+ }, ln = { class: "d-popover__dialog" };
1979
+ function dn(e, t, o, n, r, s) {
1980
+ const i = d("dt-button"), a = d("dt-stack"), c = d("bubble-menu"), p = d("editor-content");
1981
+ return l(), _("div", null, [
1982
+ r.editor && o.link && !o.hideLinkBubbleMenu ? (l(), m(c, {
1979
1983
  key: 0,
1980
1984
  editor: r.editor,
1981
1985
  "should-show": s.bubbleMenuShouldShow,
@@ -1983,7 +1987,7 @@ function ln(e, t, o, n, r, s) {
1983
1987
  style: { visibility: "visible" }
1984
1988
  }, {
1985
1989
  default: u(() => [
1986
- k("div", dn, [
1990
+ k("div", ln, [
1987
1991
  f(a, {
1988
1992
  direction: "row",
1989
1993
  class: "d-rich-text-editor-bubble-menu__button-stack",
@@ -2035,7 +2039,7 @@ function ln(e, t, o, n, r, s) {
2035
2039
  }, s.attrs), null, 16, ["editor"])
2036
2040
  ]);
2037
2041
  }
2038
- const no = /* @__PURE__ */ g(cn, [["render", ln]]);
2042
+ const no = /* @__PURE__ */ g(cn, [["render", dn]]);
2039
2043
  export {
2040
2044
  no as default
2041
2045
  };