@dialpad/dialtone-vue 3.92.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 +7 -0
- package/dist/dialtone-vue.cjs +5 -5
- package/dist/dialtone-vue.js +270 -268
- package/dist/directives.cjs +1 -0
- package/dist/directives.js +106 -0
- package/dist/emoji-1de73abd.cjs +1 -0
- package/dist/{emoji-83163b7b.js → emoji-8734fb7e.js} +7556 -10098
- package/dist/emoji.cjs +1 -1
- package/dist/emoji.js +40 -39
- package/dist/message_input-15d74c9c.cjs +93 -0
- package/dist/{message_input-46ebe433.js → message_input-42cfff5f.js} +60 -59
- 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/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 +1 -1
- 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-1de73abd.cjs"),n=require("vue");require("./tooltip-a095f59b.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-8734fb7e.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-8734fb7e.js";
|
|
3
|
+
import { h as r } from "vue";
|
|
4
|
+
import "./tooltip-5fcb8c80.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
|
};
|