@dialpad/dialtone 9.10.1 → 9.11.2
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 +92 -20
- package/dist/css/CHANGELOG.json +1 -1
- package/dist/css/dialtone.css +28 -4
- package/dist/css/dialtone.min.css +1 -1
- package/dist/icons/icons.json +1 -1
- package/dist/icons/keywords.json +1 -1
- package/dist/icons/svg/circle-slashed.svg +1 -1
- package/dist/icons/svg/code-block.svg +1 -0
- package/dist/tokens/android/java/tokens-dark.kt +1 -1
- package/dist/tokens/android/java/tokens-light.kt +1 -1
- package/dist/tokens/android/res/values/colors-dark.xml +1 -1
- package/dist/tokens/android/res/values/colors-light.xml +1 -1
- package/dist/tokens/android/res/values/dimens.xml +1 -1
- package/dist/tokens/css/variables-dark.css +1 -1
- package/dist/tokens/css/variables-light.css +1 -1
- package/dist/tokens/ios/tokens-dark.swift +1 -1
- package/dist/tokens/ios/tokens-light.swift +1 -1
- package/dist/tokens/less/variables-dark.less +1 -1
- package/dist/tokens/less/variables-light.less +1 -1
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/dialtone-vue.cjs +1 -1
- package/dist/vue2/dialtone-vue.js +7 -7
- package/dist/vue2/directives.cjs +1 -1
- package/dist/vue2/directives.js +1 -1
- package/dist/vue2/emoji.cjs +1 -1
- package/dist/vue2/emoji.js +4 -4
- package/dist/vue2/{emoji_picker-50hU6Bus.cjs → emoji_picker-G_dpCtLb.cjs} +1 -1
- package/dist/vue2/{emoji_picker-3cVhhlbr.js → emoji_picker-H4Qp2wF5.js} +2 -2
- package/dist/vue2/{emoji_text_wrapper-45075bUQ.js → emoji_text_wrapper-B6LYaq-4.js} +6 -7
- package/dist/vue2/emoji_text_wrapper-HXzlY5eZ.cjs +1 -0
- package/dist/vue2/{index-NG2T0qK1.js → index-ASOzBdZi.js} +1009 -997
- package/dist/vue2/index-Fi4GXrPf.cjs +1 -0
- package/dist/vue2/message_input.cjs +1 -1
- package/dist/vue2/message_input.js +4 -4
- package/dist/vue2/{rich_text_editor-E7mcsC-J.cjs → rich_text_editor-HGWAxljc.cjs} +2 -2
- package/dist/vue2/{rich_text_editor-sxTdV897.js → rich_text_editor-hvsobGV1.js} +3 -3
- package/dist/vue2/style.css +1 -1
- package/dist/vue2/{tooltip-RmgCyjmY.cjs → tooltip-R7LTeOZf.cjs} +5 -5
- package/dist/vue2/{tooltip-UOWkfPpb.js → tooltip-vREVnN_1.js} +282 -263
- package/dist/vue2/types/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts +33 -1
- package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/tooltip/tooltip_constants.d.ts +2 -0
- package/dist/vue2/types/components/tooltip/tooltip_constants.d.ts.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/dialtone-vue.cjs +1 -1
- package/dist/vue3/dialtone-vue.js +7 -7
- package/dist/vue3/directives.cjs +1 -1
- package/dist/vue3/directives.js +1 -1
- package/dist/vue3/{emoji-RvO57rkW.js → emoji-BTNutvt9.js} +5140 -5126
- package/dist/vue3/emoji-rlL92lZG.cjs +1 -0
- package/dist/vue3/emoji.cjs +1 -1
- package/dist/vue3/emoji.js +4 -4
- package/dist/vue3/{emoji_picker-ZDMH1VIY.js → emoji_picker-nmJ2h6aY.js} +2 -2
- package/dist/vue3/{emoji_picker-EYanEJrn.cjs → emoji_picker-yry3pYOn.cjs} +1 -1
- package/dist/vue3/emoji_text_wrapper--VteZTud.js +85 -0
- package/dist/vue3/emoji_text_wrapper-c3aPthCy.cjs +1 -0
- package/dist/vue3/message_input.cjs +1 -1
- package/dist/vue3/message_input.js +4 -4
- package/dist/vue3/{rich_text_editor-o1bRsprW.js → rich_text_editor-2sh3YgmO.js} +4 -4
- package/dist/vue3/{rich_text_editor-VFx2M8I2.cjs → rich_text_editor-rl8EpCt1.cjs} +2 -2
- package/dist/vue3/style.css +1 -1
- package/dist/vue3/{tooltip-Cr_G7ib3.js → tooltip-3O-FaSCC.js} +167 -148
- package/dist/vue3/{tooltip-gZ2LW6l0.cjs → tooltip-POX7tOJg.cjs} +5 -5
- package/dist/vue3/types/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts +33 -1
- package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/tooltip/tooltip_constants.d.ts +2 -0
- package/dist/vue3/types/components/tooltip/tooltip_constants.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/vue2/emoji_text_wrapper-dc6a_C0K.cjs +0 -1
- package/dist/vue2/index-8ytmeBCH.cjs +0 -1
- package/dist/vue3/emoji-3sZLmJtM.cjs +0 -1
- package/dist/vue3/emoji_text_wrapper-p2pyEE4j.cjs +0 -1
- package/dist/vue3/emoji_text_wrapper-zvhbHADN.js +0 -86
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./emoji-3sZLmJtM.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;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { D as o, I as a, p, r as c } from "./emoji-RvO57rkW.js";
|
|
2
|
-
import { h as n } from "vue";
|
|
3
|
-
const d = {
|
|
4
|
-
name: "DtEmojiTextWrapper",
|
|
5
|
-
components: {
|
|
6
|
-
DtEmoji: o
|
|
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(a).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(o, { ...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
|
-
};
|