@dialpad/dialtone-vue 3.91.0 → 3.92.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.
- package/CHANGELOG.json +1 -1
- package/CHANGELOG.md +21 -0
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.cjs +5 -5
- package/dist/dialtone-vue.js +277 -274
- package/dist/directives.cjs +1 -0
- package/dist/directives.js +106 -0
- package/dist/emoji-1de73abd.cjs +1 -0
- package/dist/{emoji-131e3eda.js → emoji-8734fb7e.js} +7602 -10061
- package/dist/emoji.cjs +1 -1
- package/dist/emoji.js +40 -39
- package/dist/message_input-15d74c9c.cjs +93 -0
- package/dist/{message_input-4bede2c7.js → message_input-42cfff5f.js} +88 -74
- package/dist/message_input.cjs +1 -1
- package/dist/message_input.js +4 -3
- package/dist/style.css +1 -1
- package/dist/tooltip-5fcb8c80.js +2548 -0
- package/dist/tooltip-a095f59b.cjs +25 -0
- package/dist/types/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.d.ts +2 -2
- package/dist/types/components/rich_text_editor/extensions/emoji/emoji.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts +4 -1
- package/dist/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts +1 -0
- package/dist/types/components/rich_text_editor/mention_suggestion.d.ts +1 -1
- package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +6 -6
- package/dist/types/components/tooltip/tooltip.vue.d.ts +20 -4
- package/dist/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
- package/dist/types/components/tooltip/tooltip_variants.vue.d.ts +1 -0
- 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/package.json +17 -5
- package/dist/emoji-b45991f0.cjs +0 -25
- package/dist/message_input-0c6b468f.cjs +0 -93
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./tooltip-a095f59b.cjs"),r=require("vue"),E={name:"dt-tooltip-directive",install(a){const d=document.createElement("div");document.body.appendChild(d);const u="top",i=r.createApp({name:"DtTooltipDirectiveApp",components:{DtTooltip:n.DtTooltip},data(){return{tooltips:[]}},methods:{addTooltip(t,o,e){this.tooltips.push({id:t,message:o,placement:e,show:!1})},hideTooltip(t){const o=this.tooltips.findIndex(e=>e.id===t);this.tooltips[o].show=!1},removeTooltip(t){this.tooltips=this.tooltips.filter(o=>o.id!==t)},showTooltip(t){const o=this.tooltips.findIndex(e=>e.id===t);this.tooltips[o].show=!0}},render(){return r.h("div",this.tooltips.map(({id:t,message:o,placement:e,show:s})=>r.h(n.DtTooltip,{key:t,message:o,placement:e,show:s,externalAnchor:`[data-dt-tooltip-id="${t}"]`})))}});i.mount(d);const v=t=>typeof t=="string"&&(t==null?void 0:t.trim()),f=t=>t===void 0||n.TOOLTIP_DIRECTIONS.includes(t);function l(t){var e;const o=t.target.getAttribute("data-dt-tooltip-id");(e=i._instance)==null||e.ctx.showTooltip(o)}function p(t){var e;if(t.type==="keydown"&&t.code!=="Escape")return;const o=t.target.getAttribute("data-dt-tooltip-id");(e=i._instance)==null||e.ctx.hideTooltip(o)}function m(t){["focusin","mouseenter"].forEach(o=>{t.addEventListener(o,e=>l(e))}),["focusout","mouseleave","keydown"].forEach(o=>{t.addEventListener(o,e=>p(e))})}function T(t){["focusin","mouseenter"].forEach(o=>{t.removeEventListener(o,e=>l(e))}),["focusout","mouseleave","keydown"].forEach(o=>{t.removeEventListener(o,e=>p(e))})}a.directive("dt-tooltip",{beforeMount(t,o){var c;if(!v(o.value)){console.warn("Missing value for v-dt-tooltip directive on: ",t,"received value: ",o.value);return}if(!f(o.arg)){console.warn("Wrong placement value provided for v-dt-tooltip directive on: ",t,"received value: ",o.arg);return}const e=n.getUniqueString(),s=o.value,h=o.arg||u;t.setAttribute("data-dt-tooltip-id",e),(c=i._instance)==null||c.ctx.addTooltip(e,s,h),m(t)},unmounted(t){var o;T(t),(o=i._instance)==null||o.ctx.removeTooltip(t.getAttribute("data-dt-tooltip-id"))}})}};exports.DtTooltipDirective=E;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { D as p, g as E, T as g } from "./tooltip-5fcb8c80.js";
|
|
2
|
+
import { createApp as A, h as c } from "vue";
|
|
3
|
+
const L = {
|
|
4
|
+
name: "dt-tooltip-directive",
|
|
5
|
+
install(a) {
|
|
6
|
+
const s = document.createElement("div");
|
|
7
|
+
document.body.appendChild(s);
|
|
8
|
+
const u = "top", i = A({
|
|
9
|
+
name: "DtTooltipDirectiveApp",
|
|
10
|
+
components: { DtTooltip: p },
|
|
11
|
+
data() {
|
|
12
|
+
return {
|
|
13
|
+
tooltips: []
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
methods: {
|
|
17
|
+
addTooltip(t, o, e) {
|
|
18
|
+
this.tooltips.push({ id: t, message: o, placement: e, show: !1 });
|
|
19
|
+
},
|
|
20
|
+
hideTooltip(t) {
|
|
21
|
+
const o = this.tooltips.findIndex((e) => e.id === t);
|
|
22
|
+
this.tooltips[o].show = !1;
|
|
23
|
+
},
|
|
24
|
+
removeTooltip(t) {
|
|
25
|
+
this.tooltips = this.tooltips.filter((o) => o.id !== t);
|
|
26
|
+
},
|
|
27
|
+
showTooltip(t) {
|
|
28
|
+
const o = this.tooltips.findIndex((e) => e.id === t);
|
|
29
|
+
this.tooltips[o].show = !0;
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
render() {
|
|
33
|
+
return c(
|
|
34
|
+
"div",
|
|
35
|
+
this.tooltips.map(({ id: t, message: o, placement: e, show: n }) => c(p, {
|
|
36
|
+
key: t,
|
|
37
|
+
message: o,
|
|
38
|
+
placement: e,
|
|
39
|
+
show: n,
|
|
40
|
+
externalAnchor: `[data-dt-tooltip-id="${t}"]`
|
|
41
|
+
}))
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
i.mount(s);
|
|
46
|
+
const m = (t) => typeof t == "string" && (t == null ? void 0 : t.trim()), f = (t) => t === void 0 || g.includes(t);
|
|
47
|
+
function d(t) {
|
|
48
|
+
var e;
|
|
49
|
+
const o = t.target.getAttribute("data-dt-tooltip-id");
|
|
50
|
+
(e = i._instance) == null || e.ctx.showTooltip(o);
|
|
51
|
+
}
|
|
52
|
+
function r(t) {
|
|
53
|
+
var e;
|
|
54
|
+
if (t.type === "keydown" && t.code !== "Escape")
|
|
55
|
+
return;
|
|
56
|
+
const o = t.target.getAttribute("data-dt-tooltip-id");
|
|
57
|
+
(e = i._instance) == null || e.ctx.hideTooltip(o);
|
|
58
|
+
}
|
|
59
|
+
function v(t) {
|
|
60
|
+
["focusin", "mouseenter"].forEach((o) => {
|
|
61
|
+
t.addEventListener(o, (e) => d(e));
|
|
62
|
+
}), ["focusout", "mouseleave", "keydown"].forEach((o) => {
|
|
63
|
+
t.addEventListener(o, (e) => r(e));
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function h(t) {
|
|
67
|
+
["focusin", "mouseenter"].forEach((o) => {
|
|
68
|
+
t.removeEventListener(o, (e) => d(e));
|
|
69
|
+
}), ["focusout", "mouseleave", "keydown"].forEach((o) => {
|
|
70
|
+
t.removeEventListener(o, (e) => r(e));
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
a.directive("dt-tooltip", {
|
|
74
|
+
beforeMount(t, o) {
|
|
75
|
+
var l;
|
|
76
|
+
if (!m(o.value)) {
|
|
77
|
+
console.warn(
|
|
78
|
+
"Missing value for v-dt-tooltip directive on: ",
|
|
79
|
+
t,
|
|
80
|
+
"received value: ",
|
|
81
|
+
o.value
|
|
82
|
+
);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (!f(o.arg)) {
|
|
86
|
+
console.warn(
|
|
87
|
+
"Wrong placement value provided for v-dt-tooltip directive on: ",
|
|
88
|
+
t,
|
|
89
|
+
"received value: ",
|
|
90
|
+
o.arg
|
|
91
|
+
);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const e = E(), n = o.value, T = o.arg || u;
|
|
95
|
+
t.setAttribute("data-dt-tooltip-id", e), (l = i._instance) == null || l.ctx.addTooltip(e, n, T), v(t);
|
|
96
|
+
},
|
|
97
|
+
unmounted(t) {
|
|
98
|
+
var o;
|
|
99
|
+
h(t), (o = i._instance) == null || o.ctx.removeTooltip(t.getAttribute("data-dt-tooltip-id"));
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
export {
|
|
105
|
+
L as DtTooltipDirective
|
|
106
|
+
};
|