@dialpad/dialtone 9.173.0 → 9.174.0

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.
@@ -2251,14 +2251,56 @@ const Ki = {
2251
2251
  }
2252
2252
  };
2253
2253
  }
2254
- }).configure({ inline: !0, allowBase64: !0 }), Xi = ge.extend({
2254
+ }).configure({ inline: !0, allowBase64: !0 }), Xi = /* @__PURE__ */ new Set([
2255
+ "address",
2256
+ "article",
2257
+ "aside",
2258
+ "blockquote",
2259
+ "dd",
2260
+ "details",
2261
+ "dialog",
2262
+ "div",
2263
+ "dl",
2264
+ "dt",
2265
+ "fieldset",
2266
+ "figcaption",
2267
+ "figure",
2268
+ "footer",
2269
+ "form",
2270
+ "h1",
2271
+ "h2",
2272
+ "h3",
2273
+ "h4",
2274
+ "h5",
2275
+ "h6",
2276
+ "header",
2277
+ "hgroup",
2278
+ "hr",
2279
+ "li",
2280
+ "main",
2281
+ "nav",
2282
+ "ol",
2283
+ "p",
2284
+ "pre",
2285
+ "section",
2286
+ "table",
2287
+ "ul"
2288
+ ]), Yi = ge.extend({
2255
2289
  parseHTML() {
2256
- return [{ tag: "div" }];
2290
+ return [{
2291
+ tag: "div",
2292
+ getAttrs: (t) => {
2293
+ for (const e of t.children)
2294
+ if (Xi.has(e.tagName.toLowerCase()))
2295
+ return !1;
2296
+ return null;
2297
+ }
2298
+ }];
2257
2299
  },
2258
2300
  renderHTML({ HTMLAttributes: t }) {
2259
2301
  return ["div", st(this.options.HTMLAttributes, t), 0];
2260
2302
  }
2261
- }), Yi = {
2303
+ }), Gi = {
2262
2304
  compatConfig: { MODE: 3 },
2263
2305
  name: "MentionComponent",
2264
2306
  components: {
@@ -2291,7 +2333,7 @@ const Ki = {
2291
2333
  }
2292
2334
  }
2293
2335
  };
2294
- function Gi(t, e, o, n, i, s) {
2336
+ function Ji(t, e, o, n, i, s) {
2295
2337
  const r = T("dt-link"), a = T("node-view-wrapper");
2296
2338
  return _(), A(a, { class: "d-d-inline-block" }, {
2297
2339
  default: C(() => [
@@ -2312,9 +2354,9 @@ function Gi(t, e, o, n, i, s) {
2312
2354
  _: 1
2313
2355
  });
2314
2356
  }
2315
- const Ji = /* @__PURE__ */ q(Yi, [["render", Gi]]), Zi = Mt.extend({
2357
+ const Zi = /* @__PURE__ */ q(Gi, [["render", Ji]]), Qi = Mt.extend({
2316
2358
  addNodeView() {
2317
- return gt(Ji);
2359
+ return gt(Zi);
2318
2360
  },
2319
2361
  parseHTML() {
2320
2362
  return [
@@ -2350,7 +2392,7 @@ const Ji = /* @__PURE__ */ q(Yi, [["render", Gi]]), Zi = Mt.extend({
2350
2392
  char: "@",
2351
2393
  pluginKey: new at("mentionSuggestion")
2352
2394
  }
2353
- }), Qi = {
2395
+ }), ts = {
2354
2396
  compatConfig: { MODE: 3 },
2355
2397
  name: "ChannelComponent",
2356
2398
  components: {
@@ -2377,7 +2419,7 @@ const Ji = /* @__PURE__ */ q(Yi, [["render", Gi]]), Zi = Mt.extend({
2377
2419
  }
2378
2420
  }
2379
2421
  };
2380
- function ts(t, e, o, n, i, s) {
2422
+ function es(t, e, o, n, i, s) {
2381
2423
  const r = T("dt-icon-lock"), a = T("dt-stack"), l = T("dt-link"), u = T("node-view-wrapper");
2382
2424
  return _(), A(u, { class: "d-d-inline-block" }, {
2383
2425
  default: C(() => [
@@ -2406,10 +2448,10 @@ function ts(t, e, o, n, i, s) {
2406
2448
  _: 1
2407
2449
  });
2408
2450
  }
2409
- const es = /* @__PURE__ */ q(Qi, [["render", ts]]), ns = Mt.extend({
2451
+ const ns = /* @__PURE__ */ q(ts, [["render", es]]), os = Mt.extend({
2410
2452
  name: "channel",
2411
2453
  addNodeView() {
2412
- return gt(es);
2454
+ return gt(ns);
2413
2455
  },
2414
2456
  parseHTML() {
2415
2457
  return [
@@ -2445,7 +2487,7 @@ const es = /* @__PURE__ */ q(Qi, [["render", ts]]), ns = Mt.extend({
2445
2487
  char: "#",
2446
2488
  pluginKey: new at("channelSuggestion")
2447
2489
  }
2448
- }), os = {
2490
+ }), is = {
2449
2491
  compatConfig: { MODE: 3 },
2450
2492
  name: "SlashCommandsComponent",
2451
2493
  components: {
@@ -2468,7 +2510,7 @@ const es = /* @__PURE__ */ q(Qi, [["render", ts]]), ns = Mt.extend({
2468
2510
  e && typeof e == "function" && e(t);
2469
2511
  }
2470
2512
  };
2471
- function is(t, e, o, n, i, s) {
2513
+ function ss(t, e, o, n, i, s) {
2472
2514
  const r = T("node-view-wrapper");
2473
2515
  return _(), A(r, { class: "d-d-inline-block" }, {
2474
2516
  default: C(() => [
@@ -2477,14 +2519,14 @@ function is(t, e, o, n, i, s) {
2477
2519
  _: 1
2478
2520
  });
2479
2521
  }
2480
- const ss = /* @__PURE__ */ q(os, [["render", is]]), rs = (t, e) => [...t.matchAll(e)].map((n) => {
2522
+ const rs = /* @__PURE__ */ q(is, [["render", ss]]), as = (t, e) => [...t.matchAll(e)].map((n) => {
2481
2523
  let i = n[2];
2482
2524
  return i.endsWith(" ") || (i += " "), {
2483
2525
  index: n.index,
2484
2526
  text: i,
2485
2527
  match: n
2486
2528
  };
2487
- }), as = Mt.extend({
2529
+ }), ls = Mt.extend({
2488
2530
  name: "slash-commands",
2489
2531
  group: "inline",
2490
2532
  inline: !0,
@@ -2501,7 +2543,7 @@ const ss = /* @__PURE__ */ q(os, [["render", is]]), rs = (t, e) => [...t.matchAl
2501
2543
  };
2502
2544
  },
2503
2545
  addNodeView() {
2504
- return gt(ss);
2546
+ return gt(rs);
2505
2547
  },
2506
2548
  parseHTML() {
2507
2549
  return [
@@ -2547,7 +2589,7 @@ const ss = /* @__PURE__ */ q(os, [["render", is]]), rs = (t, e) => [...t.matchAl
2547
2589
  const t = (o = this.options.suggestion) == null ? void 0 : o.items({ query: "" }).map((n) => n.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) ?$`, "g");
2548
2590
  return [
2549
2591
  St({
2550
- find: (n) => rs(n, e),
2592
+ find: (n) => as(n, e),
2551
2593
  type: this.type,
2552
2594
  getAttributes(n) {
2553
2595
  return { command: n[0].trim() };
@@ -2560,7 +2602,7 @@ const ss = /* @__PURE__ */ q(os, [["render", is]]), rs = (t, e) => [...t.matchAl
2560
2602
  char: "/",
2561
2603
  pluginKey: new at("slashCommandSuggestion")
2562
2604
  }
2563
- }), ls = 100, cs = {
2605
+ }), cs = 100, ds = {
2564
2606
  name: "VariableComponent",
2565
2607
  components: {
2566
2608
  DtBadge: Zn,
@@ -2573,7 +2615,7 @@ const ss = /* @__PURE__ */ q(os, [["render", is]]), rs = (t, e) => [...t.matchAl
2573
2615
  data() {
2574
2616
  return {
2575
2617
  i18n: new ve(),
2576
- MAX_VARIABLE_ALT_LENGTH: ls
2618
+ MAX_VARIABLE_ALT_LENGTH: cs
2577
2619
  };
2578
2620
  },
2579
2621
  computed: {
@@ -2613,7 +2655,7 @@ const ss = /* @__PURE__ */ q(os, [["render", is]]), rs = (t, e) => [...t.matchAl
2613
2655
  }
2614
2656
  }
2615
2657
  };
2616
- function ds(t, e, o, n, i, s) {
2658
+ function us(t, e, o, n, i, s) {
2617
2659
  const r = T("dt-badge"), a = T("dt-button"), l = T("dt-input"), u = T("dt-popover"), d = T("node-view-wrapper");
2618
2660
  return _(), A(d, { class: "d-d-inline-block" }, {
2619
2661
  default: C(() => [
@@ -2664,7 +2706,7 @@ function ds(t, e, o, n, i, s) {
2664
2706
  _: 1
2665
2707
  });
2666
2708
  }
2667
- const us = /* @__PURE__ */ q(cs, [["render", ds]]), hs = le.create({
2709
+ const hs = /* @__PURE__ */ q(ds, [["render", us]]), fs = le.create({
2668
2710
  name: "variable",
2669
2711
  group: "inline",
2670
2712
  inline: !0,
@@ -2677,7 +2719,7 @@ const us = /* @__PURE__ */ q(cs, [["render", ds]]), hs = le.create({
2677
2719
  };
2678
2720
  },
2679
2721
  addNodeView() {
2680
- return gt(us);
2722
+ return gt(hs);
2681
2723
  },
2682
2724
  addAttributes() {
2683
2725
  return {
@@ -2736,7 +2778,7 @@ const us = /* @__PURE__ */ q(cs, [["render", ds]]), hs = le.create({
2736
2778
  })
2737
2779
  };
2738
2780
  }
2739
- }), fs = {
2781
+ }), ps = {
2740
2782
  compatConfig: { MODE: 3 },
2741
2783
  name: "MentionSuggestion",
2742
2784
  components: {
@@ -2777,14 +2819,14 @@ const us = /* @__PURE__ */ q(cs, [["render", ds]]), hs = le.create({
2777
2819
  return this.item.showDetails;
2778
2820
  }
2779
2821
  }
2780
- }, ps = { class: "d-mention-suggestion__name" }, ms = {
2822
+ }, ms = { class: "d-mention-suggestion__name" }, gs = {
2781
2823
  key: 1,
2782
2824
  class: "d-mention-suggestion__divider"
2783
- }, gs = {
2825
+ }, ys = {
2784
2826
  key: 2,
2785
2827
  class: "d-mention-suggestion__status"
2786
2828
  };
2787
- function ys(t, e, o, n, i, s) {
2829
+ function ws(t, e, o, n, i, s) {
2788
2830
  const r = T("dt-avatar"), a = T("dt-stack");
2789
2831
  return _(), A(a, {
2790
2832
  direction: "row",
@@ -2805,7 +2847,7 @@ function ys(t, e, o, n, i, s) {
2805
2847
  gap: "100"
2806
2848
  }, {
2807
2849
  default: C(() => [
2808
- ot("span", ps, $(s.name), 1),
2850
+ ot("span", ms, $(s.name), 1),
2809
2851
  s.showDetails ? (_(), A(a, {
2810
2852
  key: 0,
2811
2853
  direction: "row",
@@ -2817,8 +2859,8 @@ function ys(t, e, o, n, i, s) {
2817
2859
  key: 0,
2818
2860
  class: pe(["d-mention-suggestion__presence", [s.presenceFontColorClass]])
2819
2861
  }, $(s.presenceText), 3)) : rt("", !0),
2820
- s.status && s.presenceText ? (_(), nt("div", ms, " • ")) : rt("", !0),
2821
- s.status ? (_(), nt("div", gs, $(s.status), 1)) : rt("", !0)
2862
+ s.status && s.presenceText ? (_(), nt("div", gs, " • ")) : rt("", !0),
2863
+ s.status ? (_(), nt("div", ys, $(s.status), 1)) : rt("", !0)
2822
2864
  ]),
2823
2865
  _: 1
2824
2866
  })) : rt("", !0)
@@ -2829,13 +2871,13 @@ function ys(t, e, o, n, i, s) {
2829
2871
  _: 1
2830
2872
  });
2831
2873
  }
2832
- const ws = /* @__PURE__ */ q(fs, [["render", ys]]), bs = {
2874
+ const bs = /* @__PURE__ */ q(ps, [["render", ws]]), vs = {
2833
2875
  // This function comes from the user and passed to the editor directly.
2834
2876
  // This will also activate the mention plugin on the editor
2835
2877
  // items: ({ query }) => { return [] },
2836
2878
  allowSpaces: !0,
2837
- render: Ot(ws, "mention")
2838
- }, vs = {
2879
+ render: Ot(bs, "mention")
2880
+ }, xs = {
2839
2881
  compatConfig: { MODE: 3 },
2840
2882
  name: "ChannelSuggestion",
2841
2883
  components: {
@@ -2855,7 +2897,7 @@ const ws = /* @__PURE__ */ q(fs, [["render", ys]]), bs = {
2855
2897
  }
2856
2898
  }
2857
2899
  };
2858
- function xs(t, e, o, n, i, s) {
2900
+ function Ts(t, e, o, n, i, s) {
2859
2901
  const r = T("dt-icon-hash"), a = T("dt-icon-lock"), l = T("dt-stack");
2860
2902
  return _(), A(l, {
2861
2903
  direction: "row",
@@ -2874,13 +2916,13 @@ function xs(t, e, o, n, i, s) {
2874
2916
  _: 1
2875
2917
  });
2876
2918
  }
2877
- const Ts = /* @__PURE__ */ q(vs, [["render", xs]]), _s = {
2919
+ const _s = /* @__PURE__ */ q(xs, [["render", Ts]]), ks = {
2878
2920
  // This function comes from the user and passed to the editor directly.
2879
2921
  // This will also activate the mention plugin on the editor
2880
2922
  // items: ({ query }) => { return [] },
2881
2923
  allowSpaces: !0,
2882
- render: Ot(Ts, "channel")
2883
- }, ks = {
2924
+ render: Ot(_s, "channel")
2925
+ }, Cs = {
2884
2926
  compatConfig: { MODE: 3 },
2885
2927
  name: "SlashCommandSuggestion",
2886
2928
  props: {
@@ -2900,24 +2942,24 @@ const Ts = /* @__PURE__ */ q(vs, [["render", xs]]), _s = {
2900
2942
  return this.item.parametersExample;
2901
2943
  }
2902
2944
  }
2903
- }, Cs = { class: "d-body--md-compact" }, Os = { key: 0 }, Es = { class: "d-body--sm d-fc-tertiary" };
2904
- function Ss(t, e, o, n, i, s) {
2945
+ }, Os = { class: "d-body--md-compact" }, Es = { key: 0 }, Ss = { class: "d-body--sm d-fc-tertiary" };
2946
+ function Ls(t, e, o, n, i, s) {
2905
2947
  return _(), nt("div", null, [
2906
- ot("div", Cs, [
2948
+ ot("div", Os, [
2907
2949
  ot("span", null, "/" + $(s.command), 1),
2908
- s.parametersExample ? (_(), nt("span", Os, $(s.parametersExample), 1)) : rt("", !0)
2950
+ s.parametersExample ? (_(), nt("span", Es, $(s.parametersExample), 1)) : rt("", !0)
2909
2951
  ]),
2910
- ot("div", Es, $(s.description), 1)
2952
+ ot("div", Ss, $(s.description), 1)
2911
2953
  ]);
2912
2954
  }
2913
- const Ls = /* @__PURE__ */ q(ks, [["render", Ss]]), As = {
2955
+ const As = /* @__PURE__ */ q(Cs, [["render", Ls]]), Is = {
2914
2956
  // This function comes from the user and passed to the editor directly.
2915
2957
  // This will also activate the mention plugin on the editor
2916
2958
  // items: ({ query }) => { return [] },
2917
2959
  allowSpaces: !0,
2918
2960
  startOfLine: !0,
2919
- render: Ot(Ls, "slash-command")
2920
- }, Is = {
2961
+ render: Ot(As, "slash-command")
2962
+ }, Ds = {
2921
2963
  compatConfig: { MODE: 3 },
2922
2964
  name: "DtRichTextEditor",
2923
2965
  components: {
@@ -3507,7 +3549,7 @@ ${this.processNodeContent(t)}
3507
3549
  // eslint-disable-next-line complexity
3508
3550
  extensions() {
3509
3551
  const t = [wn, In, bn, Tn];
3510
- t.push(this.useDivTags ? Xi : ge), this.allowBold && t.push(_n), this.allowBlockquote && t.push(mn), this.allowBulletList && (t.push(kn), t.push(Cn.extend({
3552
+ t.push(this.useDivTags ? Yi : ge), this.allowBold && t.push(_n), this.allowBlockquote && t.push(mn), this.allowBulletList && (t.push(kn), t.push(Cn.extend({
3511
3553
  renderText({ node: n }) {
3512
3554
  return n.textContent;
3513
3555
  }
@@ -3543,23 +3585,23 @@ ${this.processNodeContent(t)}
3543
3585
  autolink: !0,
3544
3586
  protocols: Kt
3545
3587
  })), this.customLink && t.push(this.getExtension(Wi, this.customLink)), this.mentionSuggestion) {
3546
- const n = { ...this.mentionSuggestion, ...bs };
3547
- t.push(Zi.configure({ suggestion: n }));
3588
+ const n = { ...this.mentionSuggestion, ...vs };
3589
+ t.push(Qi.configure({ suggestion: n }));
3548
3590
  }
3549
3591
  if (this.channelSuggestion) {
3550
- const n = { ...this.channelSuggestion, ..._s };
3551
- t.push(ns.configure({ suggestion: n }));
3592
+ const n = { ...this.channelSuggestion, ...ks };
3593
+ t.push(os.configure({ suggestion: n }));
3552
3594
  }
3553
3595
  if (this.slashCommandSuggestion) {
3554
- const n = { ...this.slashCommandSuggestion, ...As };
3555
- t.push(as.configure({
3596
+ const n = { ...this.slashCommandSuggestion, ...Is };
3597
+ t.push(ls.configure({
3556
3598
  suggestion: n,
3557
3599
  onSelectedCommand: (i) => {
3558
3600
  this.$emit("selected-command", i);
3559
3601
  }
3560
3602
  }));
3561
3603
  }
3562
- return this.allowVariable && t.push(hs.configure({
3604
+ return this.allowVariable && t.push(fs.configure({
3563
3605
  variableItems: this.variableItems
3564
3606
  })), t.push(Ni), t.push(Dn.configure({
3565
3607
  types: ["paragraph"]
@@ -3856,8 +3898,8 @@ ${n.textContent}
3856
3898
  this.editor.commands.focus();
3857
3899
  }
3858
3900
  }
3859
- }, Ds = { class: "d-popover__dialog" };
3860
- function Rs(t, e, o, n, i, s) {
3901
+ }, Rs = { class: "d-popover__dialog" };
3902
+ function Ms(t, e, o, n, i, s) {
3861
3903
  const r = T("dt-button"), a = T("dt-stack"), l = T("bubble-menu"), u = T("editor-content");
3862
3904
  return _(), nt("div", null, [
3863
3905
  i.editor && o.link && !o.hideLinkBubbleMenu ? (_(), A(l, {
@@ -3869,7 +3911,7 @@ function Rs(t, e, o, n, i, s) {
3869
3911
  style: { visibility: "visible" }
3870
3912
  }, {
3871
3913
  default: C(() => [
3872
- ot("div", Ds, [
3914
+ ot("div", Rs, [
3873
3915
  M(a, {
3874
3916
  direction: "row",
3875
3917
  class: "d-rich-text-editor-bubble-menu__button-stack",
@@ -3921,8 +3963,8 @@ function Rs(t, e, o, n, i, s) {
3921
3963
  }, s.attrs), null, 16, ["editor"])
3922
3964
  ]);
3923
3965
  }
3924
- const kr = /* @__PURE__ */ q(Is, [["render", Rs]]);
3966
+ const Cr = /* @__PURE__ */ q(Ds, [["render", Ms]]);
3925
3967
  export {
3926
- kr as default
3968
+ Cr as default
3927
3969
  };
3928
3970
  //# sourceMappingURL=rich-text-editor.js.map