@dialpad/dialtone-vue 3.92.0 → 3.93.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.
- package/CHANGELOG.json +1 -1
- package/CHANGELOG.md +22 -0
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.cjs +5 -5
- package/dist/dialtone-vue.js +2540 -2245
- package/dist/directives.cjs +1 -0
- package/dist/directives.js +75 -0
- package/dist/emoji-125c2250.cjs +1 -0
- package/dist/{emoji-83163b7b.js → emoji-ee056efb.js} +7568 -10101
- package/dist/emoji.cjs +1 -1
- package/dist/emoji.js +40 -39
- package/dist/{message_input-46ebe433.js → message_input-08860f81.js} +60 -59
- package/dist/message_input-ab3be145.cjs +93 -0
- package/dist/message_input.cjs +1 -1
- package/dist/message_input.js +4 -3
- package/dist/style.css +1 -1
- package/dist/tooltip-02b802bc.js +2577 -0
- package/dist/tooltip-3390fc3b.cjs +25 -0
- package/dist/types/common/dates.d.ts +49 -0
- package/dist/types/common/dates.d.ts.map +1 -0
- package/dist/types/common/utils.d.ts +8 -0
- package/dist/types/common/utils.d.ts.map +1 -1
- package/dist/types/components/button/button.vue.d.ts +2 -1
- package/dist/types/components/button/button.vue.d.ts.map +1 -1
- package/dist/types/components/tooltip/tooltip.vue.d.ts +23 -1
- package/dist/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
- package/dist/types/components/tooltip/tooltip_variants.vue.d.ts +0 -1
- package/dist/types/directives/tooltip/index.d.ts +2 -0
- package/dist/types/directives/tooltip/index.d.ts.map +1 -0
- package/dist/types/directives/tooltip/tooltip.d.ts +6 -0
- package/dist/types/directives/tooltip/tooltip.d.ts.map +1 -0
- package/dist/types/directives.d.ts +2 -0
- package/dist/types/directives.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +9 -0
- package/dist/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/emoji-f3e4b2ca.cjs +0 -25
- package/dist/message_input-4b60e253.cjs +0 -93
package/dist/emoji.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./emoji-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./emoji-125c2250.cjs"),n=require("vue");require("./tooltip-3390fc3b.cjs");const a={name:"DtEmojiTextWrapper",components:{DtEmoji:e.DtEmoji},inheritAttrs:!1,props:{elementType:{type:String,default:"div"},size:{type:String,default:"500",validator:t=>Object.keys(e.ICON_SIZE_MODIFIERS).includes(t)}},data(){return{loadingEmojiJson:!0}},async created(){this.loadingEmojiJson=!1},methods:{replaceDtEmojis(t,o){const i=new RegExp(`(${t.join("|")})`,"g");return o.split(i).map(r=>t.includes(r)?n.h(e.DtEmoji,{...this.$attrs,class:"d-mx4 d-d-inline-block",size:this.size,code:r}):r)},searchVNodes(t){var i;if(typeof t=="string")return this.searchCodes(t);if(typeof t.type=="symbol")return this.searchCodes(t.children);if((i=t.props)!=null&&i.innerHTML)return this.searchVNodes(t.props.innerHTML);const o=Array.isArray(t.children)?t.children:[t.children];return n.h(t.type,t.props,o.map(s=>this.searchVNodes(s)))},replaceVueComponentVNodeContent(t){},searchCodes(t){const o=e.findShortCodes(t),i=e.findEmojis(t),s=[...o,...i];return s.length===0?t:this.replaceDtEmojis(s,t)}},render(){const t=this.$slots.default?this.$slots.default():[];return n.h(this.elementType,{"data-qa":"emoji-text-wrapper",class:this.$attrs.class},this.loadingEmojiJson?t:t.map(o=>this.searchVNodes(o)))}};exports.CDN_URL=e.CDN_URL;exports.DtEmoji=e.DtEmoji;exports.DtEmojiPicker=e._sfc_main;exports.EMOJIS_PER_ROW=e.EMOJIS_PER_ROW;exports.EMOJI_CATEGORIES=e.EMOJI_CATEGORIES;exports.EMOJI_SKIN_TONE_MODIFIERS=e.EMOJI_SKIN_TONE_MODIFIERS;exports.codeToEmojiData=e.codeToEmojiData;Object.defineProperty(exports,"customEmojiAssetUrl",{enumerable:!0,get:()=>e.customEmojiAssetUrl});exports.defaultEmojiAssetUrl=e.defaultEmojiAssetUrl;Object.defineProperty(exports,"emojiFileExtensionLarge",{enumerable:!0,get:()=>e.emojiFileExtensionLarge});Object.defineProperty(exports,"emojiFileExtensionSmall",{enumerable:!0,get:()=>e.emojiFileExtensionSmall});Object.defineProperty(exports,"emojiImageUrlLarge",{enumerable:!0,get:()=>e.emojiImageUrlLarge});Object.defineProperty(exports,"emojiImageUrlSmall",{enumerable:!0,get:()=>e.emojiImageUrlSmall});exports.emojiJson=e.emojiJson;exports.emojiVersion=e.emojiVersion;exports.filterValidShortCodes=e.filterValidShortCodes;exports.findEmojis=e.findEmojis;exports.findShortCodes=e.findShortCodes;exports.getEmojiData=e.getEmojiData;exports.setCustomEmojiJson=e.setCustomEmojiJson;exports.setCustomEmojiUrl=e.setCustomEmojiUrl;exports.setEmojiAssetUrlLarge=e.setEmojiAssetUrlLarge;exports.setEmojiAssetUrlSmall=e.setEmojiAssetUrlSmall;exports.shortcodeToEmojiData=e.shortcodeToEmojiData;exports.stringToUnicode=e.stringToUnicode;exports.unicodeToString=e.unicodeToString;exports.validateCustomEmojiJson=e.validateCustomEmojiJson;exports.DtEmojiTextWrapper=a;
|
package/dist/emoji.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { h as
|
|
4
|
-
|
|
1
|
+
import { g as o, y as n, F as l, H as m } from "./emoji-ee056efb.js";
|
|
2
|
+
import { z as u, _ as f, E as g, B as S, A as y, a3 as I, N as D, K as T, R as _, P as C, Q as O, O as J, U, J as A, a4 as R, V as x, Z as M, Y as L, X as $, W as F, a0 as z, a2 as W, a1 as b, $ as k } from "./emoji-ee056efb.js";
|
|
3
|
+
import { h as r } from "vue";
|
|
4
|
+
import "./tooltip-02b802bc.js";
|
|
5
|
+
const h = {
|
|
5
6
|
name: "DtEmojiTextWrapper",
|
|
6
7
|
components: {
|
|
7
|
-
DtEmoji:
|
|
8
|
+
DtEmoji: o
|
|
8
9
|
},
|
|
9
10
|
inheritAttrs: !1,
|
|
10
11
|
props: {
|
|
@@ -37,9 +38,9 @@ const d = {
|
|
|
37
38
|
* Replaces the valid codes from the text content with a DtEmoji component.
|
|
38
39
|
* @returns {Array<VNode|string>}
|
|
39
40
|
*/
|
|
40
|
-
replaceDtEmojis(s,
|
|
41
|
-
const
|
|
42
|
-
return
|
|
41
|
+
replaceDtEmojis(s, e) {
|
|
42
|
+
const t = new RegExp(`(${s.join("|")})`, "g");
|
|
43
|
+
return e.split(t).map((i) => s.includes(i) ? r(o, { ...this.$attrs, class: "d-mx4 d-d-inline-block", size: this.size, code: i }) : i);
|
|
43
44
|
},
|
|
44
45
|
/**
|
|
45
46
|
* Recursively search the Vue virtual DOM to find text
|
|
@@ -47,15 +48,15 @@ const d = {
|
|
|
47
48
|
* @returns {VNode|*}
|
|
48
49
|
*/
|
|
49
50
|
searchVNodes(s) {
|
|
50
|
-
var
|
|
51
|
+
var t;
|
|
51
52
|
if (typeof s == "string")
|
|
52
53
|
return this.searchCodes(s);
|
|
53
54
|
if (typeof s.type == "symbol")
|
|
54
55
|
return this.searchCodes(s.children);
|
|
55
|
-
if ((
|
|
56
|
+
if ((t = s.props) != null && t.innerHTML)
|
|
56
57
|
return this.searchVNodes(s.props.innerHTML);
|
|
57
|
-
const
|
|
58
|
-
return
|
|
58
|
+
const e = Array.isArray(s.children) ? s.children : [s.children];
|
|
59
|
+
return r(s.type, s.props, e.map((a) => this.searchVNodes(a)));
|
|
59
60
|
},
|
|
60
61
|
// TODO: Find a way to crawl vue components
|
|
61
62
|
replaceVueComponentVNodeContent(s) {
|
|
@@ -66,49 +67,49 @@ const d = {
|
|
|
66
67
|
* @returns {Array<VNode|string>|string}
|
|
67
68
|
*/
|
|
68
69
|
searchCodes(s) {
|
|
69
|
-
const
|
|
70
|
-
return
|
|
70
|
+
const e = l(s), t = m(s), a = [...e, ...t];
|
|
71
|
+
return a.length === 0 ? s : this.replaceDtEmojis(a, s);
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
74
|
render() {
|
|
74
75
|
const s = this.$slots.default ? this.$slots.default() : [];
|
|
75
|
-
return
|
|
76
|
+
return r(
|
|
76
77
|
this.elementType,
|
|
77
78
|
{
|
|
78
79
|
"data-qa": "emoji-text-wrapper",
|
|
79
80
|
class: this.$attrs.class
|
|
80
81
|
},
|
|
81
|
-
this.loadingEmojiJson ? s : s.map((
|
|
82
|
+
this.loadingEmojiJson ? s : s.map((e) => this.searchVNodes(e))
|
|
82
83
|
);
|
|
83
84
|
}
|
|
84
85
|
};
|
|
85
86
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
87
|
+
u as CDN_URL,
|
|
88
|
+
o as DtEmoji,
|
|
89
|
+
f as DtEmojiPicker,
|
|
90
|
+
h as DtEmojiTextWrapper,
|
|
91
|
+
g as EMOJIS_PER_ROW,
|
|
92
|
+
S as EMOJI_CATEGORIES,
|
|
93
|
+
y as EMOJI_SKIN_TONE_MODIFIERS,
|
|
94
|
+
I as codeToEmojiData,
|
|
95
|
+
D as customEmojiAssetUrl,
|
|
96
|
+
T as defaultEmojiAssetUrl,
|
|
97
|
+
_ as emojiFileExtensionLarge,
|
|
97
98
|
C as emojiFileExtensionSmall,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
O as emojiImageUrlLarge,
|
|
100
|
+
J as emojiImageUrlSmall,
|
|
101
|
+
U as emojiJson,
|
|
102
|
+
A as emojiVersion,
|
|
103
|
+
R as filterValidShortCodes,
|
|
103
104
|
m as findEmojis,
|
|
104
105
|
l as findShortCodes,
|
|
105
106
|
x as getEmojiData,
|
|
106
107
|
M as setCustomEmojiJson,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
L as setCustomEmojiUrl,
|
|
109
|
+
$ as setEmojiAssetUrlLarge,
|
|
110
|
+
F as setEmojiAssetUrlSmall,
|
|
111
|
+
z as shortcodeToEmojiData,
|
|
112
|
+
W as stringToUnicode,
|
|
113
|
+
b as unicodeToString,
|
|
114
|
+
k as validateCustomEmojiJson
|
|
114
115
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { _ as q,
|
|
2
|
-
import { openBlock as w, createElementBlock as B, toDisplayString as Se, createCommentVNode as V, createElementVNode as G, normalizeClass as H, resolveComponent as N, createBlock as F, resolveDynamicComponent as Xe, withCtx as D, mergeProps as St, renderSlot as L, createVNode as _, createTextVNode as Ht, withKeys as Ve, withModifiers as dt, toHandlers as
|
|
1
|
+
import { _ as q, q as nl, g as tr, r as rl, h as hn, u as il, t as sl, d as ol, v as ll, w as al, x as cl, y as pn, z as dl, A as ul, D as fl } from "./tooltip-02b802bc.js";
|
|
2
|
+
import { openBlock as w, createElementBlock as B, toDisplayString as Se, createCommentVNode as V, createElementVNode as G, normalizeClass as H, resolveComponent as N, createBlock as F, resolveDynamicComponent as Xe, withCtx as D, mergeProps as St, renderSlot as L, createVNode as _, createTextVNode as Ht, withKeys as Ve, withModifiers as dt, toHandlers as as, createSlots as hl, renderList as cs, Teleport as ds, defineComponent as xt, ref as mn, onMounted as us, onBeforeUnmount as xr, h as Ke, getCurrentInstance as pl, watchEffect as ml, nextTick as gl, unref as yl, markRaw as gn, reactive as fs, provide as qr, customRef as bl, withDirectives as kl, Fragment as hs, vShow as Sl } from "vue";
|
|
3
|
+
import { a5 as xl, D as nt, y as Cl, b as yn, L as wl, j as vl, g as ps, a6 as El, a0 as Ml, a3 as ms, _ as Ol, f as Tl } from "./emoji-ee056efb.js";
|
|
3
4
|
const Ot = {
|
|
4
5
|
BUSY: "busy",
|
|
5
6
|
AWAY: "away",
|
|
@@ -102,7 +103,7 @@ const Rl = /* @__PURE__ */ q(Al, [["render", Pl]]), In = {
|
|
|
102
103
|
"1800"
|
|
103
104
|
], Wr = (n) => n > 1;
|
|
104
105
|
function zl() {
|
|
105
|
-
return [void 0, ...Object.keys(
|
|
106
|
+
return [void 0, ...Object.keys(xl).map((n) => nl(n))];
|
|
106
107
|
}
|
|
107
108
|
const Vl = (n) => {
|
|
108
109
|
if (typeof n != "string" || !n.trim())
|
|
@@ -249,7 +250,7 @@ const jl = zl(), $l = {
|
|
|
249
250
|
iconSize: {
|
|
250
251
|
type: String,
|
|
251
252
|
default: "",
|
|
252
|
-
validator: (n) => !n || Object.keys(
|
|
253
|
+
validator: (n) => !n || Object.keys(Cl).includes(n)
|
|
253
254
|
},
|
|
254
255
|
/**
|
|
255
256
|
* Full name used to extract initials and set alt attribute.
|
|
@@ -351,7 +352,7 @@ const jl = zl(), $l = {
|
|
|
351
352
|
this.validatedSize === "xs" ? this.formattedInitials = "" : this.validatedSize === "sm" ? this.formattedInitials = e[0] : this.formattedInitials = e;
|
|
352
353
|
},
|
|
353
354
|
getColor() {
|
|
354
|
-
return this.color ??
|
|
355
|
+
return this.color ?? rl(Fl, this.seed);
|
|
355
356
|
},
|
|
356
357
|
_loadedImageEventHandler(n) {
|
|
357
358
|
this.imageLoadedSuccessfully = !0, n.classList.remove("d-d-none");
|
|
@@ -584,7 +585,7 @@ const sa = /* @__PURE__ */ q(ea, [["render", ia]]), wr = {
|
|
|
584
585
|
name: "SrOnlyCloseButton",
|
|
585
586
|
components: {
|
|
586
587
|
DtIcon: nt,
|
|
587
|
-
DtButton:
|
|
588
|
+
DtButton: yn
|
|
588
589
|
},
|
|
589
590
|
props: {
|
|
590
591
|
/**
|
|
@@ -623,7 +624,7 @@ const gs = /* @__PURE__ */ q(oa, [["render", la]]), aa = {
|
|
|
623
624
|
name: "DtNoticeAction",
|
|
624
625
|
components: {
|
|
625
626
|
DtIcon: nt,
|
|
626
|
-
DtButton:
|
|
627
|
+
DtButton: yn,
|
|
627
628
|
SrOnlyCloseButton: gs
|
|
628
629
|
},
|
|
629
630
|
mixins: [wr],
|
|
@@ -777,13 +778,13 @@ const ua = /* @__PURE__ */ q(aa, [["render", da]]), ys = ':not(:disabled):not([a
|
|
|
777
778
|
type: String,
|
|
778
779
|
default: "",
|
|
779
780
|
validator(n) {
|
|
780
|
-
return
|
|
781
|
+
return wl.includes(n);
|
|
781
782
|
}
|
|
782
783
|
}
|
|
783
784
|
},
|
|
784
785
|
data() {
|
|
785
786
|
return {
|
|
786
|
-
LINK_KIND_MODIFIERS:
|
|
787
|
+
LINK_KIND_MODIFIERS: vl
|
|
787
788
|
};
|
|
788
789
|
}
|
|
789
790
|
}, ga = ["href"];
|
|
@@ -893,7 +894,7 @@ const Oa = {
|
|
|
893
894
|
id: {
|
|
894
895
|
type: String,
|
|
895
896
|
default() {
|
|
896
|
-
return
|
|
897
|
+
return il.getUniqueString();
|
|
897
898
|
}
|
|
898
899
|
},
|
|
899
900
|
/**
|
|
@@ -1037,10 +1038,10 @@ function Ta(n, e, t, r, i, s) {
|
|
|
1037
1038
|
tabindex: s.isFocusable ? 0 : -1,
|
|
1038
1039
|
role: t.role,
|
|
1039
1040
|
"aria-selected": s.isHighlighted
|
|
1040
|
-
},
|
|
1041
|
+
}, as(s.listItemListeners)), {
|
|
1041
1042
|
default: D(() => [
|
|
1042
|
-
s.listItemType ? (w(), F(Xe(s.listItemType), { key: 0 },
|
|
1043
|
-
|
|
1043
|
+
s.listItemType ? (w(), F(Xe(s.listItemType), { key: 0 }, hl({ _: 2 }, [
|
|
1044
|
+
cs(n.$slots, (l, a) => ({
|
|
1044
1045
|
name: a,
|
|
1045
1046
|
fn: D(() => [
|
|
1046
1047
|
L(n.$slots, a)
|
|
@@ -1073,11 +1074,11 @@ const Na = /* @__PURE__ */ q(Oa, [["render", Ta]]), Ur = {
|
|
|
1073
1074
|
medium: "d-pl8",
|
|
1074
1075
|
large: "d-pl16"
|
|
1075
1076
|
}, Da = ["dialog", "menu", "listbox", "tree", "grid"], Ia = ["", "anchor"], Pa = ["none", "dialog", "first"], Ra = ["parent", "body"], _a = [
|
|
1076
|
-
...
|
|
1077
|
+
...sl
|
|
1077
1078
|
], Ba = {
|
|
1078
1079
|
name: "PopoverHeaderFooter",
|
|
1079
1080
|
components: {
|
|
1080
|
-
DtButton:
|
|
1081
|
+
DtButton: yn,
|
|
1081
1082
|
DtIcon: nt
|
|
1082
1083
|
},
|
|
1083
1084
|
props: {
|
|
@@ -1180,7 +1181,7 @@ const za = {
|
|
|
1180
1181
|
********************/
|
|
1181
1182
|
components: {
|
|
1182
1183
|
SrOnlyCloseButton: gs,
|
|
1183
|
-
DtLazyShow:
|
|
1184
|
+
DtLazyShow: ol,
|
|
1184
1185
|
PopoverHeaderFooter: Fa
|
|
1185
1186
|
},
|
|
1186
1187
|
mixins: [pa, wr],
|
|
@@ -1624,11 +1625,11 @@ const za = {
|
|
|
1624
1625
|
const e = (r = n == null ? void 0 : n[0]) == null ? void 0 : r.target;
|
|
1625
1626
|
if (!e)
|
|
1626
1627
|
return;
|
|
1627
|
-
const t =
|
|
1628
|
+
const t = ll(e);
|
|
1628
1629
|
this.isOutsideViewport = t.bottom || t.top;
|
|
1629
1630
|
},
|
|
1630
1631
|
popperOptions() {
|
|
1631
|
-
return
|
|
1632
|
+
return al({
|
|
1632
1633
|
fallbackPlacements: this.fallbackPlacements,
|
|
1633
1634
|
tether: this.tether,
|
|
1634
1635
|
hasHideModifierEnabled: !0
|
|
@@ -1743,7 +1744,7 @@ const za = {
|
|
|
1743
1744
|
},
|
|
1744
1745
|
initTippyInstance() {
|
|
1745
1746
|
var n, e;
|
|
1746
|
-
this.tip =
|
|
1747
|
+
this.tip = cl(this.anchorEl, {
|
|
1747
1748
|
popperOptions: this.popperOptions(),
|
|
1748
1749
|
contentElement: this.popoverContentEl,
|
|
1749
1750
|
placement: this.placement,
|
|
@@ -1765,7 +1766,7 @@ const za = {
|
|
|
1765
1766
|
function $a(n, e, t, r, i, s) {
|
|
1766
1767
|
const o = N("popover-header-footer"), l = N("sr-only-close-button"), a = N("dt-lazy-show");
|
|
1767
1768
|
return w(), B("div", null, [
|
|
1768
|
-
t.modal && i.isOpen ? (w(), F(
|
|
1769
|
+
t.modal && i.isOpen ? (w(), F(ds, {
|
|
1769
1770
|
key: 0,
|
|
1770
1771
|
to: "body"
|
|
1771
1772
|
}, [
|
|
@@ -1824,7 +1825,7 @@ function $a(n, e, t, r, i, s) {
|
|
|
1824
1825
|
},
|
|
1825
1826
|
css: n.$attrs.css,
|
|
1826
1827
|
tabindex: t.contentTabindex
|
|
1827
|
-
},
|
|
1828
|
+
}, as(s.popoverListeners)), {
|
|
1828
1829
|
default: D(() => [
|
|
1829
1830
|
i.hasSlotContent(n.$slots.headerContent) || t.showCloseButton ? (w(), F(o, {
|
|
1830
1831
|
key: 0,
|
|
@@ -13448,7 +13449,7 @@ class Yh {
|
|
|
13448
13449
|
}
|
|
13449
13450
|
createTooltip() {
|
|
13450
13451
|
const { element: e } = this.editor.options, t = !!e.parentElement;
|
|
13451
|
-
this.tippy || !t || (this.tippy =
|
|
13452
|
+
this.tippy || !t || (this.tippy = pn(e, {
|
|
13452
13453
|
duration: 0,
|
|
13453
13454
|
getReferenceClientRect: null,
|
|
13454
13455
|
content: this.element,
|
|
@@ -13531,7 +13532,7 @@ class Xh {
|
|
|
13531
13532
|
}
|
|
13532
13533
|
createTooltip() {
|
|
13533
13534
|
const { element: e } = this.editor.options, t = !!e.parentElement;
|
|
13534
|
-
this.tippy || !t || (this.tippy =
|
|
13535
|
+
this.tippy || !t || (this.tippy = pn(e, {
|
|
13535
13536
|
duration: 0,
|
|
13536
13537
|
getReferenceClientRect: null,
|
|
13537
13538
|
content: this.element,
|
|
@@ -13624,8 +13625,8 @@ xt({
|
|
|
13624
13625
|
}
|
|
13625
13626
|
},
|
|
13626
13627
|
setup(n, { slots: e }) {
|
|
13627
|
-
const t =
|
|
13628
|
-
return
|
|
13628
|
+
const t = mn(null);
|
|
13629
|
+
return us(() => {
|
|
13629
13630
|
const { updateDelay: r, editor: i, pluginKey: s, shouldShow: o, tippyOptions: l } = n;
|
|
13630
13631
|
i.registerPlugin(Ko({
|
|
13631
13632
|
updateDelay: r,
|
|
@@ -13645,7 +13646,7 @@ xt({
|
|
|
13645
13646
|
}
|
|
13646
13647
|
});
|
|
13647
13648
|
function rs(n) {
|
|
13648
|
-
return
|
|
13649
|
+
return bl((e, t) => ({
|
|
13649
13650
|
get() {
|
|
13650
13651
|
return e(), n;
|
|
13651
13652
|
},
|
|
@@ -13660,9 +13661,9 @@ function rs(n) {
|
|
|
13660
13661
|
}
|
|
13661
13662
|
class Zh extends Jh {
|
|
13662
13663
|
constructor(e = {}) {
|
|
13663
|
-
return super(e), this.vueRenderers =
|
|
13664
|
+
return super(e), this.vueRenderers = fs(/* @__PURE__ */ new Map()), this.contentComponent = null, this.reactiveState = rs(this.view.state), this.reactiveExtensionStorage = rs(this.extensionStorage), this.on("transaction", () => {
|
|
13664
13665
|
this.reactiveState.value = this.view.state, this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
13665
|
-
}),
|
|
13666
|
+
}), gn(this);
|
|
13666
13667
|
}
|
|
13667
13668
|
get state() {
|
|
13668
13669
|
return this.reactiveState ? this.reactiveState.value : this.view.state;
|
|
@@ -13692,13 +13693,13 @@ const Qh = xt({
|
|
|
13692
13693
|
}
|
|
13693
13694
|
},
|
|
13694
13695
|
setup(n) {
|
|
13695
|
-
const e =
|
|
13696
|
-
return
|
|
13696
|
+
const e = mn(), t = pl();
|
|
13697
|
+
return ml(() => {
|
|
13697
13698
|
const r = n.editor;
|
|
13698
|
-
r && r.options.element && e.value &&
|
|
13699
|
+
r && r.options.element && e.value && gl(() => {
|
|
13699
13700
|
if (!e.value || !r.options.element.firstChild)
|
|
13700
13701
|
return;
|
|
13701
|
-
const i =
|
|
13702
|
+
const i = yl(e.value);
|
|
13702
13703
|
e.value.append(...r.options.element.childNodes), r.contentComponent = t.ctx._, r.setOptions({
|
|
13703
13704
|
element: i
|
|
13704
13705
|
}), r.createNodeViews();
|
|
@@ -13718,7 +13719,7 @@ const Qh = xt({
|
|
|
13718
13719
|
render() {
|
|
13719
13720
|
const n = [];
|
|
13720
13721
|
return this.editor && this.editor.vueRenderers.forEach((e) => {
|
|
13721
|
-
const t = Ke(
|
|
13722
|
+
const t = Ke(ds, {
|
|
13722
13723
|
to: e.teleportElement,
|
|
13723
13724
|
key: e.id
|
|
13724
13725
|
}, Ke(e.component, {
|
|
@@ -13756,8 +13757,8 @@ xt({
|
|
|
13756
13757
|
}
|
|
13757
13758
|
},
|
|
13758
13759
|
setup(n, { slots: e }) {
|
|
13759
|
-
const t =
|
|
13760
|
-
return
|
|
13760
|
+
const t = mn(null);
|
|
13761
|
+
return us(() => {
|
|
13761
13762
|
const { pluginKey: r, editor: i, tippyOptions: s, shouldShow: o } = n;
|
|
13762
13763
|
i.registerPlugin(Wo({
|
|
13763
13764
|
pluginKey: r,
|
|
@@ -13815,7 +13816,7 @@ const Jo = xt({
|
|
|
13815
13816
|
});
|
|
13816
13817
|
class jr {
|
|
13817
13818
|
constructor(e, { props: t = {}, editor: r }) {
|
|
13818
|
-
if (this.id = Math.floor(Math.random() * 4294967295).toString(), this.editor = r, this.component =
|
|
13819
|
+
if (this.id = Math.floor(Math.random() * 4294967295).toString(), this.editor = r, this.component = gn(e), this.teleportElement = document.createElement("div"), this.element = this.teleportElement, this.props = fs(t), this.editor.vueRenderers.set(this.id, this), this.editor.contentComponent) {
|
|
13819
13820
|
if (this.editor.contentComponent.update(), this.teleportElement.children.length !== 1)
|
|
13820
13821
|
throw Error("VueRenderer doesn’t support multiple child elements.");
|
|
13821
13822
|
this.element = this.teleportElement.firstElementChild;
|
|
@@ -13880,7 +13881,7 @@ class ep extends Uh {
|
|
|
13880
13881
|
updateAttributes: (i = {}) => this.updateAttributes(i),
|
|
13881
13882
|
deleteNode: () => this.deleteNode()
|
|
13882
13883
|
}, t = this.onDragStart.bind(this);
|
|
13883
|
-
this.decorationClasses =
|
|
13884
|
+
this.decorationClasses = mn(this.getDecorationClasses());
|
|
13884
13885
|
const r = xt({
|
|
13885
13886
|
extends: { ...this.component },
|
|
13886
13887
|
props: Object.keys(e),
|
|
@@ -14209,7 +14210,7 @@ const tp = /^```([a-z]+)?[\s\n]$/, np = /^~~~([a-z]+)?[\s\n]$/, rp = we.create({
|
|
|
14209
14210
|
name: "EmojiComponent",
|
|
14210
14211
|
components: {
|
|
14211
14212
|
NodeViewWrapper: Jo,
|
|
14212
|
-
DtEmoji:
|
|
14213
|
+
DtEmoji: ps
|
|
14213
14214
|
},
|
|
14214
14215
|
props: Uo
|
|
14215
14216
|
};
|
|
@@ -14419,8 +14420,8 @@ const pp = {
|
|
|
14419
14420
|
function yp(n, e, t, r, i, s) {
|
|
14420
14421
|
const o = N("dt-list-item");
|
|
14421
14422
|
return w(), B("div", mp, [
|
|
14422
|
-
|
|
14423
|
-
(w(!0), B(
|
|
14423
|
+
kl(G("ul", gp, [
|
|
14424
|
+
(w(!0), B(hs, null, cs(t.items, (l, a) => (w(), F(o, {
|
|
14424
14425
|
key: l.id,
|
|
14425
14426
|
class: H([
|
|
14426
14427
|
"dt-suggestion-list--item",
|
|
@@ -14436,14 +14437,14 @@ function yp(n, e, t, r, i, s) {
|
|
|
14436
14437
|
_: 2
|
|
14437
14438
|
}, 1032, ["class", "onClick", "onKeydown"]))), 128))
|
|
14438
14439
|
], 512), [
|
|
14439
|
-
[
|
|
14440
|
+
[Sl, t.items.length]
|
|
14440
14441
|
])
|
|
14441
14442
|
]);
|
|
14442
14443
|
}
|
|
14443
14444
|
const Xo = /* @__PURE__ */ q(pp, [["render", yp]]), bp = {
|
|
14444
14445
|
name: "EmojiSuggestion",
|
|
14445
14446
|
components: {
|
|
14446
|
-
DtEmoji:
|
|
14447
|
+
DtEmoji: ps,
|
|
14447
14448
|
DtStack: ks
|
|
14448
14449
|
},
|
|
14449
14450
|
props: {
|
|
@@ -14470,7 +14471,7 @@ function kp(n, e, t, r, i, s) {
|
|
|
14470
14471
|
});
|
|
14471
14472
|
}
|
|
14472
14473
|
const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
|
|
14473
|
-
items: ({ query: n }) => n.length < 2 ? [] : Object.values(
|
|
14474
|
+
items: ({ query: n }) => n.length < 2 ? [] : Object.values(El).filter(function(r) {
|
|
14474
14475
|
return !!r.shortname.substring(1, r.shortname.length - 1).startsWith(n.toLowerCase());
|
|
14475
14476
|
}).map((r) => ({ id: r.unicode_character, code: r.shortname })),
|
|
14476
14477
|
command: ({ editor: n, range: e, props: t }) => {
|
|
@@ -14493,12 +14494,12 @@ const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
|
|
|
14493
14494
|
onStart: (t) => {
|
|
14494
14495
|
n = new jr(Xo, {
|
|
14495
14496
|
props: {
|
|
14496
|
-
itemComponent:
|
|
14497
|
+
itemComponent: gn(Sp),
|
|
14497
14498
|
itemType: "emoji",
|
|
14498
14499
|
...t
|
|
14499
14500
|
},
|
|
14500
14501
|
editor: t.editor
|
|
14501
|
-
}), t.clientRect && (e =
|
|
14502
|
+
}), t.clientRect && (e = pn("body", {
|
|
14502
14503
|
getReferenceClientRect: t.clientRect,
|
|
14503
14504
|
appendTo: () => document.body,
|
|
14504
14505
|
content: n.element,
|
|
@@ -14525,13 +14526,13 @@ const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
|
|
|
14525
14526
|
};
|
|
14526
14527
|
}
|
|
14527
14528
|
}, Cp = new ae("emoji"), wp = /:\w+:$/, vp = /:\w+:/g, Ep = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/, Mp = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g, is = (n) => {
|
|
14528
|
-
if (n &&
|
|
14529
|
+
if (n && ms(n[0]))
|
|
14529
14530
|
return {
|
|
14530
14531
|
index: n.index,
|
|
14531
14532
|
text: n[0],
|
|
14532
14533
|
match: n
|
|
14533
14534
|
};
|
|
14534
|
-
}, Op = (n) => [...n.matchAll(vp)].filter((t) =>
|
|
14535
|
+
}, Op = (n) => [...n.matchAll(vp)].filter((t) => ms(t[0])).map((t) => ({
|
|
14535
14536
|
index: t.index,
|
|
14536
14537
|
text: t[0],
|
|
14537
14538
|
match: t
|
|
@@ -14597,7 +14598,7 @@ const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
|
|
|
14597
14598
|
},
|
|
14598
14599
|
type: this.type,
|
|
14599
14600
|
getAttributes(n) {
|
|
14600
|
-
const e =
|
|
14601
|
+
const e = Ml(n[0]).unicode_output;
|
|
14601
14602
|
return {
|
|
14602
14603
|
code: String.fromCodePoint(parseInt(e, 16)),
|
|
14603
14604
|
label: "emoji"
|
|
@@ -14687,7 +14688,7 @@ function Pp(n, e, t, r) {
|
|
|
14687
14688
|
for (const l of o)
|
|
14688
14689
|
l.mark.type === r && t.removeMark(l.from, l.to, r);
|
|
14689
14690
|
}
|
|
14690
|
-
const ss =
|
|
14691
|
+
const ss = dl(1, 15);
|
|
14691
14692
|
function ls(n, e, t, r, i, s) {
|
|
14692
14693
|
if (!n)
|
|
14693
14694
|
return;
|
|
@@ -14704,7 +14705,7 @@ function ls(n, e, t, r, i, s) {
|
|
|
14704
14705
|
"right",
|
|
14705
14706
|
ss
|
|
14706
14707
|
), d = n.slice(a.from, c.to);
|
|
14707
|
-
Np(d,
|
|
14708
|
+
Np(d, ul, Ap).forEach((f) => {
|
|
14708
14709
|
const h = Dp(f[0]), p = e + a.from + f.index + 1, m = p + h.length;
|
|
14709
14710
|
i.addMark(p, m, s.create());
|
|
14710
14711
|
});
|
|
@@ -14986,12 +14987,12 @@ const Kp = /* @__PURE__ */ q(Hp, [["render", qp]]), Wp = {
|
|
|
14986
14987
|
// propsData: props,
|
|
14987
14988
|
// using vue 3:
|
|
14988
14989
|
props: {
|
|
14989
|
-
itemComponent:
|
|
14990
|
+
itemComponent: gn(Kp),
|
|
14990
14991
|
itemType: "mention",
|
|
14991
14992
|
...t
|
|
14992
14993
|
},
|
|
14993
14994
|
editor: t.editor
|
|
14994
|
-
}), t.clientRect && (e =
|
|
14995
|
+
}), t.clientRect && (e = pn("body", {
|
|
14995
14996
|
getReferenceClientRect: t.clientRect,
|
|
14996
14997
|
appendTo: () => document.body,
|
|
14997
14998
|
content: n.element,
|
|
@@ -15275,14 +15276,14 @@ const Gp = /* @__PURE__ */ q(Jp, [["render", Up]]);
|
|
|
15275
15276
|
const Yp = {
|
|
15276
15277
|
name: "DtRecipeMessageInput",
|
|
15277
15278
|
components: {
|
|
15278
|
-
DtButton:
|
|
15279
|
-
DtEmojiPicker:
|
|
15279
|
+
DtButton: yn,
|
|
15280
|
+
DtEmojiPicker: Ol,
|
|
15280
15281
|
DtIcon: nt,
|
|
15281
|
-
DtInput:
|
|
15282
|
+
DtInput: Tl,
|
|
15282
15283
|
DtNotice: Wa,
|
|
15283
15284
|
DtPopover: Ha,
|
|
15284
15285
|
DtRichTextEditor: Gp,
|
|
15285
|
-
DtTooltip:
|
|
15286
|
+
DtTooltip: fl
|
|
15286
15287
|
},
|
|
15287
15288
|
mixins: [],
|
|
15288
15289
|
inheritAttrs: !1,
|
|
@@ -15621,7 +15622,7 @@ const Yp = {
|
|
|
15621
15622
|
}, rm = { class: "d-d-flex d-jc-space-between d-h24 d-ai-center" }, im = { "data-qa": "dt-message-input-footer-left" }, sm = { "data-qa": "dt-message-input-footer-right" };
|
|
15622
15623
|
function om(n, e, t, r, i, s) {
|
|
15623
15624
|
const o = N("dt-icon"), l = N("dt-notice"), a = N("dt-rich-text-editor"), c = N("dt-button"), d = N("dt-input"), u = N("dt-tooltip"), f = N("dt-emoji-picker"), h = N("dt-popover");
|
|
15624
|
-
return w(), B(
|
|
15625
|
+
return w(), B(hs, null, [
|
|
15625
15626
|
t.showNotice ? (w(), F(l, {
|
|
15626
15627
|
key: 0,
|
|
15627
15628
|
"data-qa": "dt-message-input-error-notice",
|
|
@@ -15820,7 +15821,7 @@ function om(n, e, t, r, i, s) {
|
|
|
15820
15821
|
])
|
|
15821
15822
|
], 64);
|
|
15822
15823
|
}
|
|
15823
|
-
const
|
|
15824
|
+
const um = /* @__PURE__ */ q(Yp, [["render", om]]);
|
|
15824
15825
|
export {
|
|
15825
15826
|
In as A,
|
|
15826
15827
|
Ql as D,
|
|
@@ -15853,5 +15854,5 @@ export {
|
|
|
15853
15854
|
Ot as v,
|
|
15854
15855
|
Nl as w,
|
|
15855
15856
|
ks as x,
|
|
15856
|
-
|
|
15857
|
+
um as y
|
|
15857
15858
|
};
|