@dialpad/dialtone-vue 3.78.1 → 3.79.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 +7 -0
- package/dist/dialtone-vue.cjs +6 -6
- package/dist/dialtone-vue.js +114 -115
- package/dist/{DtEmojiPicker-4a94558f.js → emoji-9832f53e.js} +8067 -7221
- package/dist/emoji-c87c6eec.cjs +25 -0
- package/dist/emoji.cjs +1 -1
- package/dist/emoji.js +29 -29
- package/dist/emoji_text_wrapper-1b7c7824.js +86 -0
- package/dist/emoji_text_wrapper-8f06f55e.cjs +1 -0
- package/dist/message_input.cjs +17 -17
- package/dist/message_input.js +2031 -1664
- package/dist/{notice-8e321352.js → notice-4589fd96.js} +1 -1
- package/dist/{notice-daa0db24.cjs → notice-d6139963.cjs} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/DtEmojiPicker-fef2c039.cjs +0 -25
- package/dist/emoji_text_wrapper-605dbcc4.js +0 -933
- package/dist/emoji_text_wrapper-6e51e012.cjs +0 -1
package/dist/emoji.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./emoji-c87c6eec.cjs"),o=require("./emoji_text_wrapper-8f06f55e.cjs");require("vue");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=o._sfc_main;
|
package/dist/emoji.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a3 as e, r as i, a2 as m, a4 as t, a6 as r, a5 as E, ao as j, a9 as l, a8 as n, ad as d, ab as S, ac as g, aa as I, ae as U, a7 as D, aq as _, ar as c, ap as f, af as C, aj as O, ai as T, ah as p, ag as u, al as J, an as x, am as A, ak as R } from "./emoji-9832f53e.js";
|
|
2
|
+
import { _ as L } from "./emoji_text_wrapper-1b7c7824.js";
|
|
3
3
|
import "vue";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
e as CDN_URL,
|
|
6
|
+
i as DtEmoji,
|
|
7
|
+
m as DtEmojiPicker,
|
|
8
|
+
L as DtEmojiTextWrapper,
|
|
9
|
+
t as EMOJIS_PER_ROW,
|
|
10
|
+
r as EMOJI_CATEGORIES,
|
|
11
|
+
E as EMOJI_SKIN_TONE_MODIFIERS,
|
|
12
|
+
j as codeToEmojiData,
|
|
13
|
+
l as customEmojiAssetUrl,
|
|
14
|
+
n as defaultEmojiAssetUrl,
|
|
15
|
+
d as emojiFileExtensionLarge,
|
|
16
|
+
S as emojiFileExtensionSmall,
|
|
17
|
+
g as emojiImageUrlLarge,
|
|
18
|
+
I as emojiImageUrlSmall,
|
|
19
|
+
U as emojiJson,
|
|
20
|
+
D as emojiVersion,
|
|
21
|
+
_ as filterValidShortCodes,
|
|
22
|
+
c as findEmojis,
|
|
23
|
+
f as findShortCodes,
|
|
24
24
|
C as getEmojiData,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
O as setCustomEmojiJson,
|
|
26
|
+
T as setCustomEmojiUrl,
|
|
27
|
+
p as setEmojiAssetUrlLarge,
|
|
28
|
+
u as setEmojiAssetUrlSmall,
|
|
29
|
+
J as shortcodeToEmojiData,
|
|
30
|
+
x as stringToUnicode,
|
|
31
|
+
A as unicodeToString,
|
|
32
|
+
R as validateCustomEmojiJson
|
|
33
33
|
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { r as a, a1 as o, ap as p, ar as c } from "./emoji-9832f53e.js";
|
|
2
|
+
import { h as n } from "vue";
|
|
3
|
+
const d = {
|
|
4
|
+
name: "DtEmojiTextWrapper",
|
|
5
|
+
components: {
|
|
6
|
+
DtEmoji: a
|
|
7
|
+
},
|
|
8
|
+
inheritAttrs: !1,
|
|
9
|
+
props: {
|
|
10
|
+
/**
|
|
11
|
+
* Element type (tag name) to use for the wrapper.
|
|
12
|
+
*/
|
|
13
|
+
elementType: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "div"
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* The icon size to render the emojis at: 100 to 800
|
|
19
|
+
*/
|
|
20
|
+
size: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "500",
|
|
23
|
+
validator: (s) => Object.keys(o).includes(s)
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
loadingEmojiJson: !0
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
async created() {
|
|
32
|
+
this.loadingEmojiJson = !1;
|
|
33
|
+
},
|
|
34
|
+
methods: {
|
|
35
|
+
/**
|
|
36
|
+
* Replaces the valid codes from the text content with a DtEmoji component.
|
|
37
|
+
* @returns {Array<VNode|string>}
|
|
38
|
+
*/
|
|
39
|
+
replaceDtEmojis(s, e) {
|
|
40
|
+
const t = new RegExp(`(${s.join("|")})`, "g");
|
|
41
|
+
return e.split(t).map((i) => s.includes(i) ? n(a, { ...this.$attrs, class: "d-mx4 d-d-inline-block", size: this.size, code: i }) : i);
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Recursively search the Vue virtual DOM to find text
|
|
45
|
+
* @param VNode
|
|
46
|
+
* @returns {VNode|*}
|
|
47
|
+
*/
|
|
48
|
+
searchVNodes(s) {
|
|
49
|
+
var t;
|
|
50
|
+
if (typeof s == "string")
|
|
51
|
+
return this.searchCodes(s);
|
|
52
|
+
if (typeof s.type == "symbol")
|
|
53
|
+
return this.searchCodes(s.children);
|
|
54
|
+
if ((t = s.props) != null && t.innerHTML)
|
|
55
|
+
return this.searchVNodes(s.props.innerHTML);
|
|
56
|
+
const e = Array.isArray(s.children) ? s.children : [s.children];
|
|
57
|
+
return n(s.type, s.props, e.map((r) => this.searchVNodes(r)));
|
|
58
|
+
},
|
|
59
|
+
// TODO: Find a way to crawl vue components
|
|
60
|
+
replaceVueComponentVNodeContent(s) {
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* Find codes in text.
|
|
64
|
+
* @param textContent string
|
|
65
|
+
* @returns {Array<VNode|string>|string}
|
|
66
|
+
*/
|
|
67
|
+
searchCodes(s) {
|
|
68
|
+
const e = p(s), t = c(s), r = [...e, ...t];
|
|
69
|
+
return r.length === 0 ? s : this.replaceDtEmojis(r, s);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
render() {
|
|
73
|
+
const s = this.$slots.default ? this.$slots.default() : [];
|
|
74
|
+
return n(
|
|
75
|
+
this.elementType,
|
|
76
|
+
{
|
|
77
|
+
"data-qa": "emoji-text-wrapper",
|
|
78
|
+
class: this.$attrs.class
|
|
79
|
+
},
|
|
80
|
+
this.loadingEmojiJson ? s : s.map((e) => this.searchVNodes(e))
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
d as _
|
|
86
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./emoji-c87c6eec.cjs"),o=require("vue"),a={name:"DtEmojiTextWrapper",components:{DtEmoji:i.DtEmoji},inheritAttrs:!1,props:{elementType:{type:String,default:"div"},size:{type:String,default:"500",validator:s=>Object.keys(i.ICON_SIZE_MODIFIERS).includes(s)}},data(){return{loadingEmojiJson:!0}},async created(){this.loadingEmojiJson=!1},methods:{replaceDtEmojis(s,e){const t=new RegExp(`(${s.join("|")})`,"g");return e.split(t).map(n=>s.includes(n)?o.h(i.DtEmoji,{...this.$attrs,class:"d-mx4 d-d-inline-block",size:this.size,code:n}):n)},searchVNodes(s){var t;if(typeof s=="string")return this.searchCodes(s);if(typeof s.type=="symbol")return this.searchCodes(s.children);if((t=s.props)!=null&&t.innerHTML)return this.searchVNodes(s.props.innerHTML);const e=Array.isArray(s.children)?s.children:[s.children];return o.h(s.type,s.props,e.map(r=>this.searchVNodes(r)))},replaceVueComponentVNodeContent(s){},searchCodes(s){const e=i.findShortCodes(s),t=i.findEmojis(s),r=[...e,...t];return r.length===0?s:this.replaceDtEmojis(r,s)}},render(){const s=this.$slots.default?this.$slots.default():[];return o.h(this.elementType,{"data-qa":"emoji-text-wrapper",class:this.$attrs.class},this.loadingEmojiJson?s:s.map(e=>this.searchVNodes(e)))}};exports._sfc_main=a;
|