@dialpad/dialtone 9.39.0 → 9.41.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/README.md +19 -1
- package/dist/css/dialtone.css +15 -2
- package/dist/css/dialtone.min.css +1 -1
- package/dist/tokens/css/variables-dark.css +1 -1
- package/dist/tokens/css/variables-expressive-dark.css +1 -1
- package/dist/tokens/css/variables-expressive-light.css +1 -1
- package/dist/tokens/css/variables-expressive-sm-dark.css +1 -1
- package/dist/tokens/css/variables-expressive-sm-light.css +1 -1
- package/dist/tokens/css/variables-light.css +1 -1
- package/dist/tokens/css/variables-tmo-dark.css +1 -1
- package/dist/tokens/css/variables-tmo-light.css +1 -1
- package/dist/tokens/less/variables-dark.less +1 -1
- package/dist/tokens/less/variables-expressive-dark.less +1 -1
- package/dist/tokens/less/variables-expressive-light.less +1 -1
- package/dist/tokens/less/variables-expressive-sm-dark.less +1 -1
- package/dist/tokens/less/variables-expressive-sm-light.less +1 -1
- package/dist/tokens/less/variables-light.less +1 -1
- package/dist/tokens/less/variables-tmo-dark.less +1 -1
- package/dist/tokens/less/variables-tmo-light.less +1 -1
- package/dist/vue2/chunks/index-ODod4Oj_.js +175 -0
- package/dist/vue2/chunks/index-ODod4Oj_.js.map +1 -0
- package/dist/vue2/chunks/index-anN_sx1F.js +169 -0
- package/dist/vue2/chunks/index-anN_sx1F.js.map +1 -0
- package/dist/vue2/common/emoji.cjs +40 -163
- package/dist/vue2/common/emoji.cjs.map +1 -1
- package/dist/vue2/common/emoji.js +3 -146
- package/dist/vue2/common/emoji.js.map +1 -1
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/dialtone-vue.cjs +2 -2
- package/dist/vue2/dialtone-vue.js +2 -2
- package/dist/vue2/dialtone-vue.js.map +1 -1
- package/dist/vue2/lib/badge.cjs +21 -1
- package/dist/vue2/lib/badge.cjs.map +1 -1
- package/dist/vue2/lib/badge.js +21 -1
- package/dist/vue2/lib/badge.js.map +1 -1
- package/dist/vue2/lib/contact-centers-row.cjs +1 -2
- package/dist/vue2/lib/contact-centers-row.cjs.map +1 -1
- package/dist/vue2/lib/contact-centers-row.js +1 -2
- package/dist/vue2/lib/contact-centers-row.js.map +1 -1
- package/dist/vue2/lib/contact-row.cjs +1 -2
- package/dist/vue2/lib/contact-row.cjs.map +1 -1
- package/dist/vue2/lib/contact-row.js +1 -2
- package/dist/vue2/lib/contact-row.js.map +1 -1
- package/dist/vue2/lib/editor.cjs +1 -2
- package/dist/vue2/lib/editor.cjs.map +1 -1
- package/dist/vue2/lib/editor.js +1 -2
- package/dist/vue2/lib/editor.js.map +1 -1
- package/dist/vue2/lib/emoji-row.cjs +1 -2
- package/dist/vue2/lib/emoji-row.cjs.map +1 -1
- package/dist/vue2/lib/emoji-row.js +1 -2
- package/dist/vue2/lib/emoji-row.js.map +1 -1
- package/dist/vue2/lib/emoji-text-wrapper.cjs +1 -2
- package/dist/vue2/lib/emoji-text-wrapper.cjs.map +1 -1
- package/dist/vue2/lib/emoji-text-wrapper.js +1 -2
- package/dist/vue2/lib/emoji-text-wrapper.js.map +1 -1
- package/dist/vue2/lib/emoji.cjs +1 -2
- package/dist/vue2/lib/emoji.cjs.map +1 -1
- package/dist/vue2/lib/emoji.js +1 -2
- package/dist/vue2/lib/emoji.js.map +1 -1
- package/dist/vue2/lib/general-row.cjs +3 -4
- package/dist/vue2/lib/general-row.cjs.map +1 -1
- package/dist/vue2/lib/general-row.js +3 -4
- package/dist/vue2/lib/general-row.js.map +1 -1
- package/dist/vue2/lib/group-row.cjs +1 -2
- package/dist/vue2/lib/group-row.cjs.map +1 -1
- package/dist/vue2/lib/group-row.js +1 -2
- package/dist/vue2/lib/group-row.js.map +1 -1
- package/dist/vue2/lib/message-input.cjs +1 -2
- package/dist/vue2/lib/message-input.cjs.map +1 -1
- package/dist/vue2/lib/message-input.js +1 -2
- package/dist/vue2/lib/message-input.js.map +1 -1
- package/dist/vue2/lib/rich-text-editor.cjs +11 -180
- package/dist/vue2/lib/rich-text-editor.cjs.map +1 -1
- package/dist/vue2/lib/rich-text-editor.js +11 -180
- package/dist/vue2/lib/rich-text-editor.js.map +1 -1
- package/dist/vue2/lib/tooltip.cjs +8 -7
- package/dist/vue2/lib/tooltip.cjs.map +1 -1
- package/dist/vue2/lib/tooltip.js +8 -7
- package/dist/vue2/lib/tooltip.js.map +1 -1
- package/dist/vue2/types/common/emoji/index.d.ts +3 -10
- package/dist/vue2/types/common/emoji/index.d.ts.map +1 -1
- package/dist/vue2/types/components/badge/badge.vue.d.ts +32 -0
- package/dist/vue2/types/components/badge/badge.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/channels/channel.d.ts +0 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/channels/channel.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/emoji.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts +0 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/mentions/mention.d.ts +0 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/mentions/mention.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/mention_suggestion.d.ts +2 -2
- package/dist/vue2/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +0 -10
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts +4 -2
- package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts +1 -1
- package/dist/vue3/chunks/index-GVD15GIB.js +175 -0
- package/dist/vue3/chunks/index-GVD15GIB.js.map +1 -0
- package/dist/vue3/chunks/index-lu2o2f4r.js +169 -0
- package/dist/vue3/chunks/index-lu2o2f4r.js.map +1 -0
- package/dist/vue3/common/emoji.cjs +40 -163
- package/dist/vue3/common/emoji.cjs.map +1 -1
- package/dist/vue3/common/emoji.js +3 -146
- package/dist/vue3/common/emoji.js.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/dialtone-vue.cjs +2 -2
- package/dist/vue3/dialtone-vue.js +2 -2
- package/dist/vue3/dialtone-vue.js.map +1 -1
- package/dist/vue3/lib/badge.cjs +21 -1
- package/dist/vue3/lib/badge.cjs.map +1 -1
- package/dist/vue3/lib/badge.js +21 -1
- package/dist/vue3/lib/badge.js.map +1 -1
- package/dist/vue3/lib/contact-centers-row.cjs +1 -2
- package/dist/vue3/lib/contact-centers-row.cjs.map +1 -1
- package/dist/vue3/lib/contact-centers-row.js +1 -2
- package/dist/vue3/lib/contact-centers-row.js.map +1 -1
- package/dist/vue3/lib/contact-row.cjs +1 -2
- package/dist/vue3/lib/contact-row.cjs.map +1 -1
- package/dist/vue3/lib/contact-row.js +1 -2
- package/dist/vue3/lib/contact-row.js.map +1 -1
- package/dist/vue3/lib/editor.cjs +1 -2
- package/dist/vue3/lib/editor.cjs.map +1 -1
- package/dist/vue3/lib/editor.js +1 -2
- package/dist/vue3/lib/editor.js.map +1 -1
- package/dist/vue3/lib/emoji-row.cjs +1 -2
- package/dist/vue3/lib/emoji-row.cjs.map +1 -1
- package/dist/vue3/lib/emoji-row.js +1 -2
- package/dist/vue3/lib/emoji-row.js.map +1 -1
- package/dist/vue3/lib/emoji-text-wrapper.cjs +1 -2
- package/dist/vue3/lib/emoji-text-wrapper.cjs.map +1 -1
- package/dist/vue3/lib/emoji-text-wrapper.js +1 -2
- package/dist/vue3/lib/emoji-text-wrapper.js.map +1 -1
- package/dist/vue3/lib/emoji.cjs +1 -2
- package/dist/vue3/lib/emoji.cjs.map +1 -1
- package/dist/vue3/lib/emoji.js +1 -2
- package/dist/vue3/lib/emoji.js.map +1 -1
- package/dist/vue3/lib/general-row.cjs +3 -4
- package/dist/vue3/lib/general-row.cjs.map +1 -1
- package/dist/vue3/lib/general-row.js +3 -4
- package/dist/vue3/lib/general-row.js.map +1 -1
- package/dist/vue3/lib/group-row.cjs +1 -2
- package/dist/vue3/lib/group-row.cjs.map +1 -1
- package/dist/vue3/lib/group-row.js +1 -2
- package/dist/vue3/lib/group-row.js.map +1 -1
- package/dist/vue3/lib/message-input.cjs +1 -2
- package/dist/vue3/lib/message-input.cjs.map +1 -1
- package/dist/vue3/lib/message-input.js +1 -2
- package/dist/vue3/lib/message-input.js.map +1 -1
- package/dist/vue3/lib/rich-text-editor.cjs +11 -177
- package/dist/vue3/lib/rich-text-editor.cjs.map +1 -1
- package/dist/vue3/lib/rich-text-editor.js +11 -177
- package/dist/vue3/lib/rich-text-editor.js.map +1 -1
- package/dist/vue3/lib/tooltip.cjs +12 -15
- package/dist/vue3/lib/tooltip.cjs.map +1 -1
- package/dist/vue3/lib/tooltip.js +13 -16
- package/dist/vue3/lib/tooltip.js.map +1 -1
- package/dist/vue3/types/common/emoji/index.d.ts +1 -0
- package/dist/vue3/types/common/emoji/index.d.ts.map +1 -1
- package/dist/vue3/types/components/badge/badge.vue.d.ts +32 -0
- package/dist/vue3/types/components/badge/badge.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/channels/channel.d.ts +0 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/channels/channel.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/emoji.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts +0 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/mentions/mention.d.ts +0 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/mentions/mention.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/mention_suggestion.d.ts +2 -2
- package/dist/vue3/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +0 -10
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts +3 -4
- package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,149 +1,5 @@
|
|
|
1
|
-
import emojiRegex from "
|
|
2
|
-
import
|
|
3
|
-
const emojiVersion = "8.0";
|
|
4
|
-
const defaultEmojiAssetUrl = "https://cdn.jsdelivr.net/joypixels/assets/" + emojiVersion + "/png/unicode/32/";
|
|
5
|
-
let customEmojiAssetUrl = null;
|
|
6
|
-
let emojiImageUrlSmall = defaultEmojiAssetUrl;
|
|
7
|
-
let emojiFileExtensionSmall = ".png";
|
|
8
|
-
let emojiImageUrlLarge = defaultEmojiAssetUrl;
|
|
9
|
-
let emojiFileExtensionLarge = ".png";
|
|
10
|
-
const emojiJson = emojiJsonLocal;
|
|
11
|
-
const emojiShortCodeRegex = new RegExp("(^| |(?<=:))(:\\w+:)", "g");
|
|
12
|
-
function getEmojiData() {
|
|
13
|
-
return emojiJson;
|
|
14
|
-
}
|
|
15
|
-
function setEmojiAssetUrlSmall(url, fileExtension = ".png") {
|
|
16
|
-
if (!url.endsWith("/")) {
|
|
17
|
-
url = url + "/";
|
|
18
|
-
}
|
|
19
|
-
emojiImageUrlSmall = url;
|
|
20
|
-
emojiFileExtensionSmall = fileExtension;
|
|
21
|
-
}
|
|
22
|
-
function setEmojiAssetUrlLarge(url, fileExtension = ".svg") {
|
|
23
|
-
if (!url.endsWith("/")) {
|
|
24
|
-
url = url + "/";
|
|
25
|
-
}
|
|
26
|
-
emojiImageUrlLarge = url;
|
|
27
|
-
emojiFileExtensionLarge = fileExtension;
|
|
28
|
-
}
|
|
29
|
-
function setCustomEmojiUrl(url) {
|
|
30
|
-
customEmojiAssetUrl = url;
|
|
31
|
-
}
|
|
32
|
-
function setCustomEmojiJson(json) {
|
|
33
|
-
validateCustomEmojiJson(json);
|
|
34
|
-
}
|
|
35
|
-
function validateCustomEmojiJson(json) {
|
|
36
|
-
const customEmojiProps = ["extension", "custom"];
|
|
37
|
-
const customEmojiRequiredProps = [
|
|
38
|
-
"name",
|
|
39
|
-
"category",
|
|
40
|
-
"shortname",
|
|
41
|
-
"extension",
|
|
42
|
-
"custom"
|
|
43
|
-
];
|
|
44
|
-
const _updateNativeEmojiData = (emojiData, propName, propValue) => {
|
|
45
|
-
if (emojiData[propName] === void 0) {
|
|
46
|
-
if (!customEmojiProps.includes(propName)) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
emojiData[propName] = propValue;
|
|
50
|
-
} else {
|
|
51
|
-
if (Array.isArray(emojiData[propName])) {
|
|
52
|
-
emojiData[propName] = emojiData[propName].concat(propValue);
|
|
53
|
-
} else {
|
|
54
|
-
emojiData[propName] = propValue;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
Object.entries(json).forEach((item) => {
|
|
59
|
-
const [customEmojiKey, customEmojiValue] = item;
|
|
60
|
-
if (customEmojiKey in emojiJson) {
|
|
61
|
-
const emojiData = emojiJson[customEmojiKey];
|
|
62
|
-
for (const customEmojiPropertyName in customEmojiValue) {
|
|
63
|
-
const customEmojiPropertyValue = customEmojiValue[customEmojiPropertyName];
|
|
64
|
-
_updateNativeEmojiData(emojiData, customEmojiPropertyName, customEmojiPropertyValue);
|
|
65
|
-
}
|
|
66
|
-
} else {
|
|
67
|
-
const _validateRequiredProps = () => customEmojiRequiredProps.every((val) => {
|
|
68
|
-
return customEmojiValue[val] !== void 0;
|
|
69
|
-
});
|
|
70
|
-
if (_validateRequiredProps()) {
|
|
71
|
-
emojiJson[customEmojiKey] = customEmojiValue;
|
|
72
|
-
} else {
|
|
73
|
-
console.error(
|
|
74
|
-
"The following custom emoji doesn't contain the required properties:",
|
|
75
|
-
customEmojiValue
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function shortcodeToEmojiData(shortcode) {
|
|
82
|
-
function f(o, key) {
|
|
83
|
-
if (!o || typeof o !== "object") {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if ("shortname" in o) {
|
|
87
|
-
if (o.shortname === shortcode || o.shortname_alternates.includes(shortcode)) {
|
|
88
|
-
o.key = key;
|
|
89
|
-
reference = o;
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
Object.keys(o).some(function(k) {
|
|
94
|
-
return f(o[k], k);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
let reference;
|
|
98
|
-
f(getEmojiData(), null);
|
|
99
|
-
return reference;
|
|
100
|
-
}
|
|
101
|
-
function unicodeToString(emoji) {
|
|
102
|
-
let key = "";
|
|
103
|
-
for (const codePoint of emoji) {
|
|
104
|
-
const codepoint = codePoint.codePointAt(0).toString(16).padStart(4, "0");
|
|
105
|
-
if (["200d", "fe0f"].includes(codepoint))
|
|
106
|
-
continue;
|
|
107
|
-
if (key !== "") {
|
|
108
|
-
key = key + "-";
|
|
109
|
-
}
|
|
110
|
-
key = key + codepoint;
|
|
111
|
-
}
|
|
112
|
-
return key;
|
|
113
|
-
}
|
|
114
|
-
function stringToUnicode(str) {
|
|
115
|
-
const uChars = str.split("-");
|
|
116
|
-
let result = "";
|
|
117
|
-
uChars.forEach((uChar) => {
|
|
118
|
-
result = result + String.fromCodePoint(parseInt(uChar, 16));
|
|
119
|
-
});
|
|
120
|
-
return result;
|
|
121
|
-
}
|
|
122
|
-
function codeToEmojiData(code) {
|
|
123
|
-
code = code == null ? void 0 : code.trim();
|
|
124
|
-
if (code.startsWith(":") && code.endsWith(":")) {
|
|
125
|
-
return shortcodeToEmojiData(code);
|
|
126
|
-
} else {
|
|
127
|
-
const unicodeString = unicodeToString(code);
|
|
128
|
-
const result = emojiJson[unicodeString];
|
|
129
|
-
if (result)
|
|
130
|
-
result.key = unicodeString;
|
|
131
|
-
return result;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
function findShortCodes(textContent) {
|
|
135
|
-
const shortcodes = (textContent.match(emojiShortCodeRegex) || []).map((code) => code.trim());
|
|
136
|
-
return filterValidShortCodes(shortcodes);
|
|
137
|
-
}
|
|
138
|
-
function filterValidShortCodes(shortcodes) {
|
|
139
|
-
const filtered = shortcodes ? shortcodes.filter((code) => shortcodeToEmojiData(code)) : [];
|
|
140
|
-
return new Set(filtered);
|
|
141
|
-
}
|
|
142
|
-
function findEmojis(textContent) {
|
|
143
|
-
const matches = [...textContent.matchAll(emojiRegex())];
|
|
144
|
-
const emojis = matches.length ? matches.map((match) => match[0]) : [];
|
|
145
|
-
return new Set(emojis);
|
|
146
|
-
}
|
|
1
|
+
import { codeToEmojiData, customEmojiAssetUrl, defaultEmojiAssetUrl, emojiFileExtensionLarge, emojiFileExtensionSmall, emojiImageUrlLarge, emojiImageUrlSmall, emojiJson, emojiRegex, emojiShortCodeRegex, emojiVersion, filterValidShortCodes, findEmojis, findShortCodes, getEmojiData, setCustomEmojiJson, setCustomEmojiUrl, setEmojiAssetUrlLarge, setEmojiAssetUrlSmall, shortcodeToEmojiData, stringToUnicode, unicodeToString, validateCustomEmojiJson } from "../chunks/index-ODod4Oj_.js";
|
|
2
|
+
import "emoji-toolkit/emoji_strategy.json";
|
|
147
3
|
export {
|
|
148
4
|
codeToEmojiData,
|
|
149
5
|
customEmojiAssetUrl,
|
|
@@ -153,6 +9,7 @@ export {
|
|
|
153
9
|
emojiImageUrlLarge,
|
|
154
10
|
emojiImageUrlSmall,
|
|
155
11
|
emojiJson,
|
|
12
|
+
emojiRegex,
|
|
156
13
|
emojiShortCodeRegex,
|
|
157
14
|
emojiVersion,
|
|
158
15
|
filterValidShortCodes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji.js","sources":[
|
|
1
|
+
{"version":3,"file":"emoji.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|