@dialpad/dialtone 9.14.1 → 9.14.3
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/dist/css/CHANGELOG.json +1 -1
- package/dist/css/dialtone.css +6 -6
- package/dist/css/dialtone.min.css +1 -1
- 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/dialtone-vue.cjs +2 -2
- package/dist/vue2/dialtone-vue.js +3 -3
- package/dist/vue2/directives.cjs +1 -1
- package/dist/vue2/directives.js +23 -16
- package/dist/vue2/message_input.cjs +1 -1
- package/dist/vue2/message_input.js +1 -1
- package/dist/vue2/{rich_text_editor-Clr7o_AW.cjs → rich_text_editor-DhEmmg9W.cjs} +1 -1
- package/dist/vue2/{rich_text_editor-a7U8J5Ft.js → rich_text_editor-WaW2IVbb.js} +4 -2
- package/dist/vue2/style.css +1 -1
- package/dist/vue2/types/directives/tooltip/tooltip.d.ts.map +1 -1
- package/dist/vue3/dialtone-vue.cjs +2 -2
- package/dist/vue3/dialtone-vue.js +3 -3
- package/dist/vue3/directives.cjs +1 -1
- package/dist/vue3/directives.js +30 -23
- package/dist/vue3/message_input.cjs +1 -1
- package/dist/vue3/message_input.js +1 -1
- package/dist/vue3/{rich_text_editor-0vqsSbEc.cjs → rich_text_editor-CkZ82uQY.cjs} +1 -1
- package/dist/vue3/{rich_text_editor-j80_b13f.js → rich_text_editor-G1GLwWlk.js} +4 -2
- package/dist/vue3/style.css +1 -1
- package/dist/vue3/types/directives/tooltip/tooltip.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as De, c as A, M as Z, d as Xt, e as fe, f as Zt, D as J, L as we, P as he, g as Jt, h as ea, i as Oe, j as ta, k as pe, l as aa, a as na, R as ra, b as sa } from "./rich_text_editor-
|
|
2
|
-
import { q as tu, r as au, p as nu, m as ru, n as su, o as iu, A as ou, C as lu, E as du, y as cu, s as uu, x as fu, t as hu, v as pu, u as mu, w as gu, z as _u, B as bu } from "./rich_text_editor-
|
|
1
|
+
import { S as De, c as A, M as Z, d as Xt, e as fe, f as Zt, D as J, L as we, P as he, g as Jt, h as ea, i as Oe, j as ta, k as pe, l as aa, a as na, R as ra, b as sa } from "./rich_text_editor-WaW2IVbb.js";
|
|
2
|
+
import { q as tu, r as au, p as nu, m as ru, n as su, o as iu, A as ou, C as lu, E as du, y as cu, s as uu, x as fu, t as hu, v as pu, u as mu, w as gu, z as _u, B as bu } from "./rich_text_editor-WaW2IVbb.js";
|
|
3
3
|
import { w as y, t as S, F as ia, M as oa, G as la, H as W, J as Ct, K as St, N as kt, O as It, P as Le, x as xt, D as da } from "./index-EEKICgH6.js";
|
|
4
4
|
import { W as yu, S as wu, R as Cu, Q as Su, T as ku, a1 as Iu, a4 as xu, a3 as Tu, a2 as Du, z as Ou, y as Lu, U as $u, I as Eu, Y as Au, X as Mu, V as Ru, C as Bu, L as Pu, a9 as Nu, a5 as Fu, a6 as qu, a8 as Hu, a7 as Wu, a0 as Vu, $ as Uu, Z as ju, _ as Yu } from "./index-EEKICgH6.js";
|
|
5
5
|
import { n as c, u as O, g as T, h as $e, E as C, l as Qe, T as ca, b as Xe, a as ke, L as ua, p as fa, D as ee, s as Ee, q as ha } from "./tooltip-s5-t4SPy.js";
|
|
@@ -9040,7 +9040,7 @@ var ld = function() {
|
|
|
9040
9040
|
dd,
|
|
9041
9041
|
!1,
|
|
9042
9042
|
null,
|
|
9043
|
-
"
|
|
9043
|
+
"266b4474",
|
|
9044
9044
|
null,
|
|
9045
9045
|
null
|
|
9046
9046
|
);
|
package/dist/vue2/directives.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./tooltip-6msmWvq0.cjs");require("vue");const v={name:"dt-tooltip-directive",install(r){const s=document.createElement("div");document.body.appendChild(s);const a="top",p=new r({name:"DtTooltipDirectiveApp",components:{DtTooltip:l.DtTooltip},data(){return{tooltips:[]}},methods:{addOrUpdateTooltip(t,o,e){const i=this.tooltips.findIndex(d=>d.id===t);i!==-1?(this.tooltips[i].message=o,this.tooltips[i].placement=e):this.tooltips.push({id:t,message:o,placement:e})},removeTooltip(t){this.tooltips=this.tooltips.filter(o=>o.id!==t)}},render(t){return t("div",{domProps:{id:"dt-tooltip-directive-app"}},[this.tooltips.map(({id:o,message:e,placement:i})=>t(l.DtTooltip,{key:o,props:{message:e,placement:i,delay:process.env.NODE_ENV!=="test",externalAnchor:`[data-dt-tooltip-id="${o}"]`}}))])}});p.$mount(s);const c=t=>typeof t=="string"&&(t==null?void 0:t.trim()),u=t=>t===void 0||l.TOOLTIP_DIRECTIONS.includes(t);r.directive("dt-tooltip",{bind(t,o){if(!c(o.value)){console.warn("Missing value for v-dt-tooltip directive on: ",t,"received value: ",o.value);return}if(!u(o.arg)){console.warn("Wrong placement value provided for v-dt-tooltip directive on: ",t,"received value: ",o.arg);return}n(t,o)},update(t,o){o.value!==o.oldValue&&n(t,o)},unbind(t){p.removeTooltip(t.getAttribute("data-dt-tooltip-id"))}});function n(t,o){const e=t.getAttribute("data-dt-tooltip-id")||l.getUniqueString(),i=o.value,d=o.arg||a;t.setAttribute("data-dt-tooltip-id",e),p.addOrUpdateTooltip(e,i,d)}}};exports.DtTooltipDirective=v;
|
package/dist/vue2/directives.js
CHANGED
|
@@ -2,10 +2,10 @@ import { D as n, g as m, T as v } from "./tooltip-s5-t4SPy.js";
|
|
|
2
2
|
import "vue";
|
|
3
3
|
const D = {
|
|
4
4
|
name: "dt-tooltip-directive",
|
|
5
|
-
install(
|
|
6
|
-
const
|
|
7
|
-
document.body.appendChild(
|
|
8
|
-
const
|
|
5
|
+
install(s) {
|
|
6
|
+
const l = document.createElement("div");
|
|
7
|
+
document.body.appendChild(l);
|
|
8
|
+
const a = "top", p = new s({
|
|
9
9
|
name: "DtTooltipDirectiveApp",
|
|
10
10
|
components: { DtTooltip: n },
|
|
11
11
|
data() {
|
|
@@ -14,8 +14,9 @@ const D = {
|
|
|
14
14
|
};
|
|
15
15
|
},
|
|
16
16
|
methods: {
|
|
17
|
-
|
|
18
|
-
this.tooltips.
|
|
17
|
+
addOrUpdateTooltip(t, o, e) {
|
|
18
|
+
const i = this.tooltips.findIndex((d) => d.id === t);
|
|
19
|
+
i !== -1 ? (this.tooltips[i].message = o, this.tooltips[i].placement = e) : this.tooltips.push({ id: t, message: o, placement: e });
|
|
19
20
|
},
|
|
20
21
|
removeTooltip(t) {
|
|
21
22
|
this.tooltips = this.tooltips.filter((o) => o.id !== t);
|
|
@@ -28,11 +29,11 @@ const D = {
|
|
|
28
29
|
domProps: { id: "dt-tooltip-directive-app" }
|
|
29
30
|
},
|
|
30
31
|
[
|
|
31
|
-
this.tooltips.map(({ id: o, message: e, placement:
|
|
32
|
+
this.tooltips.map(({ id: o, message: e, placement: i }) => t(n, {
|
|
32
33
|
key: o,
|
|
33
34
|
props: {
|
|
34
35
|
message: e,
|
|
35
|
-
placement:
|
|
36
|
+
placement: i,
|
|
36
37
|
/**
|
|
37
38
|
* Set the delay to false when running tests only.
|
|
38
39
|
*/
|
|
@@ -44,11 +45,11 @@ const D = {
|
|
|
44
45
|
);
|
|
45
46
|
}
|
|
46
47
|
});
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
48
|
+
p.$mount(l);
|
|
49
|
+
const c = (t) => typeof t == "string" && (t == null ? void 0 : t.trim()), u = (t) => t === void 0 || v.includes(t);
|
|
50
|
+
s.directive("dt-tooltip", {
|
|
50
51
|
bind(t, o) {
|
|
51
|
-
if (!
|
|
52
|
+
if (!c(o.value)) {
|
|
52
53
|
console.warn(
|
|
53
54
|
"Missing value for v-dt-tooltip directive on: ",
|
|
54
55
|
t,
|
|
@@ -57,7 +58,7 @@ const D = {
|
|
|
57
58
|
);
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
|
-
if (!
|
|
61
|
+
if (!u(o.arg)) {
|
|
61
62
|
console.warn(
|
|
62
63
|
"Wrong placement value provided for v-dt-tooltip directive on: ",
|
|
63
64
|
t,
|
|
@@ -66,13 +67,19 @@ const D = {
|
|
|
66
67
|
);
|
|
67
68
|
return;
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
r(t, o);
|
|
71
|
+
},
|
|
72
|
+
update(t, o) {
|
|
73
|
+
o.value !== o.oldValue && r(t, o);
|
|
71
74
|
},
|
|
72
75
|
unbind(t) {
|
|
73
|
-
|
|
76
|
+
p.removeTooltip(t.getAttribute("data-dt-tooltip-id"));
|
|
74
77
|
}
|
|
75
78
|
});
|
|
79
|
+
function r(t, o) {
|
|
80
|
+
const e = t.getAttribute("data-dt-tooltip-id") || m(), i = o.value, d = o.arg || a;
|
|
81
|
+
t.setAttribute("data-dt-tooltip-id", e), p.addOrUpdateTooltip(e, i, d);
|
|
82
|
+
}
|
|
76
83
|
}
|
|
77
84
|
};
|
|
78
85
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./rich_text_editor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./rich_text_editor-DhEmmg9W.cjs"),a=require("./index-vDKY4OP8.cjs"),l=require("./emoji_picker-PV3E1ESP.cjs"),s=require("./tooltip-6msmWvq0.cjs");require("vue");const u={name:"DtRecipeMessageInput",components:{DtButton:a.DtButton,DtEmojiPicker:l.DtEmojiPicker,DtIcon:a.DtIcon,DtInput:a.DtInput,DtPopover:o.DtPopover,DtRichTextEditor:o.DtRichTextEditor,DtTooltip:s.DtTooltip},mixins:[],inheritAttrs:!1,props:{value:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0,default:""},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(t){return typeof t=="string"?o.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(t):!0}},outputFormat:{type:String,default:"text",validator(t){return o.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(t)}},link:{type:[Boolean,Object],default:!1},placeholder:{type:String,default:""},disableSend:{type:Boolean,default:!1},maxHeight:{type:String,default:"unset"},showEmojiPicker:{type:Boolean,default:!0},emojiPickerProps:{type:Object,default:()=>({}),validate(t){return["searchNoResultsLabel","searchResultsLabel","searchPlaceholderLabel","skinSelectorButtonTooltipLabel","tabSetLabels"].every(e=>t[e]!=null)}},emojiTooltipMessage:{type:String,default:"Emoji"},emojiButtonAriaLabel:{type:String,default:"emoji button"},showCharacterLimit:{type:[Boolean,Object],default:()=>({count:1500,warning:500,message:""})},showImagePicker:{type:[Boolean,Object],default:()=>({tooltipLabel:"Attach Image",ariaLabel:"image button"})},showSend:{type:[Boolean,Object],default:()=>({icon:"send"})},showCancel:{type:[Boolean,Object],default:()=>({text:"Cancel"})}},emits:["submit","select-media","add-media","cancel","skin-tone","selected-emoji","focus","blur","input"],data(){return{internalInputValue:this.value,hasFocus:!1,imagePickerFocus:!1,emojiPickerFocus:!1,sendButtonFocus:!1,emojiPickerOpened:!1}},computed:{inputLength(){return this.internalInputValue.length},displayCharacterLimitWarning(){return!!this.showCharacterLimit&&this.showCharacterLimit.count-this.inputLength<=this.showCharacterLimit.warning},characterLimitTooltipEnabled(){return this.showCharacterLimit.message&&this.showCharacterLimit.count-this.inputLength<0},isSendDisabled(){return this.inputLength===0||this.disableSend||this.showCharacterLimit&&this.inputLength>this.showCharacterLimit.count},computedCloseButtonProps(){return{ariaLabel:"Close"}},emojiPickerHovered(){return this.emojiPickerFocus||this.emojiPickerOpened},sendButtonKind(){return this.isSendDisabled?"muted":"default"}},watch:{value(t){this.internalInputValue=t}},methods:{onDrag(t){t.stopPropagation(),t.preventDefault()},onDrop(t){t.stopPropagation(),t.preventDefault();const e=t.dataTransfer,i=Array.from(e.files).map(r=>r.name);this.$emit("add-media",i)},onSkinTone(t){this.$emit("skin-tone",t)},onSelectEmoji(t){if(!t){this.emojiPickerOpened=!1;return}this.$refs.richTextEditor.editor.commands.insertContent({type:"emoji",attrs:{code:t.shortname}}),this.emojiPickerOpened=!1,this.$emit("selected-emoji",t)},onSelectImage(){this.$refs.messageInputImageUpload.$refs.input.click()},onImageUpload(t){this.$emit("select-media",t)},toggleEmojiPicker(){this.emojiPickerOpened=!this.emojiPickerOpened},onSend(){this.isSendDisabled||this.$emit("submit",this.internalInputValue)},onCancel(){this.$emit("cancel")},onFocus(t){this.hasFocus=!0,console.log("B",this.hasFocus),this.$refs.richTextEditor.focusEditor(),console.log("A",this.hasFocus),this.$emit("focus",t)},onBlur(t){this.hasFocus=!1,this.$emit("blur",t)},onInput(t){this.$emit("input",t)}}};var c=function(){var e=this,n=e._self._c;return n("div",{class:["d-d-flex","d-fd-column","d-bar8","d-baw1","d-ba","d-c-text",{"d-bc-black-500 d-bs-sm":e.hasFocus,"d-bc-default":!e.hasFocus}],attrs:{"data-qa":"dt-message-input",role:"presentation"},on:{click:function(i){return e.$refs.richTextEditor.focusEditor()},"drag-enter":e.onDrag,"drag-over":e.onDrag,drop:e.onDrop,keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")||i.ctrlKey||i.shiftKey||i.altKey||i.metaKey?null:e.onSend.apply(null,arguments)}}},[n("div",{staticClass:"d-of-auto d-mx16 d-mt8 d-mb4",style:{"max-height":e.maxHeight}},[n("dt-rich-text-editor",e._b({ref:"richTextEditor",attrs:{editable:e.editable,"input-aria-label":e.inputAriaLabel,"input-class":e.inputClass,"output-format":e.outputFormat,"auto-focus":e.autoFocus,link:e.link,placeholder:e.placeholder},on:{focus:e.onFocus,blur:e.onBlur,input:function(i){return e.onInput(i)}},model:{value:e.internalInputValue,callback:function(i){e.internalInputValue=i},expression:"internalInputValue"}},"dt-rich-text-editor",e.$attrs,!1))],1),e._t("middle"),n("section",{staticClass:"d-d-flex d-jc-space-between d-mx8 d-my4"},[n("div",{staticClass:"d-d-flex"},[e.showImagePicker?n("dt-tooltip",{attrs:{placement:"top-start",message:e.showImagePicker.tooltipLabel,offset:[-4,-4]},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("dt-button",{attrs:{"data-qa":"dt-message-input-image-btn",size:"sm",circle:"",kind:e.imagePickerFocus?"default":"muted",importance:"clear","aria-label":e.showImagePicker.ariaLabel},on:{click:e.onSelectImage,mouseenter:function(i){e.imagePickerFocus=!0},mouseleave:function(i){e.imagePickerFocus=!1},focus:function(i){e.imagePickerFocus=!0},blur:function(i){e.imagePickerFocus=!1}},scopedSlots:e._u([{key:"icon",fn:function(){return[n("dt-icon",{attrs:{name:"image",size:"300"}})]},proxy:!0}],null,!1,2561380377)}),n("dt-input",{ref:"messageInputImageUpload",staticClass:"d-ps-absolute",attrs:{"data-qa":"dt-message-input-image-input",type:"file",multiple:"",hidden:""},on:{input:e.onImageUpload}})]},proxy:!0}],null,!1,3687934814)}):e._e(),e.showEmojiPicker?n("dt-popover",{attrs:{"data-qa":"dt-message-input-emoji-picker-popover",open:e.emojiPickerOpened,"initial-focus-element":"#searchInput",padding:"none"},on:{opened:i=>{e.emojiPickerOpened=i}},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("dt-tooltip",{attrs:{message:e.emojiTooltipMessage,offset:[0,-4]},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("dt-button",{attrs:{"data-qa":"dt-message-input-emoji-picker-btn",size:"sm",circle:"",kind:e.emojiPickerHovered?"default":"muted",importance:"clear","aria-label":e.emojiButtonAriaLabel,offset:[0,0]},on:{click:e.toggleEmojiPicker,mouseenter:function(i){e.emojiPickerFocus=!0},mouseleave:function(i){e.emojiPickerFocus=!1},focus:function(i){e.emojiPickerFocus=!0},blur:function(i){e.emojiPickerFocus=!1}},scopedSlots:e._u([{key:"icon",fn:function(){return[n("dt-icon",{attrs:{name:e.emojiPickerHovered?"very-satisfied":"satisfied",size:"300"}})]},proxy:!0}],null,!1,352772906)})]},proxy:!0}],null,!1,3933528398)})]},proxy:!0},{key:"content",fn:function(){return[n("dt-emoji-picker",e._b({on:{"skin-tone":e.onSkinTone,"selected-emoji":e.onSelectEmoji}},"dt-emoji-picker",e.emojiPickerProps,!1))]},proxy:!0}],null,!1,1278205067)}):e._e()],1),n("div",{staticClass:"d-d-flex"},[e.showCharacterLimit?n("dt-tooltip",{staticClass:"dt-message-input--remaining-char-tooltip",attrs:{placement:"top-end",enabled:e.characterLimitTooltipEnabled,message:e.showCharacterLimit.message,offset:[10,-8]},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("p",{directives:[{name:"show",rawName:"v-show",value:e.displayCharacterLimitWarning,expression:"displayCharacterLimitWarning"}],staticClass:"d-fc-error d-mr16 dt-message-input--remaining-char",attrs:{"data-qa":"dt-message-input-character-limit"}},[e._v(" "+e._s(e.showCharacterLimit.count-e.inputLength)+" ")])]},proxy:!0}],null,!1,2591914334)}):e._e(),e.showCancel?n("dt-button",{staticClass:"dt-message-input--cancel-button",attrs:{"data-qa":"dt-message-input-cancel-button",size:"sm",kind:"muted",importance:"clear","aria-label":e.showCancel.ariaLabel},on:{click:e.onCancel}},[n("p",[e._v(e._s(e.showCancel.text))])]):e._e(),e.showSend?n("dt-tooltip",{attrs:{placement:"top-end",enabled:!e.showSend,message:e.showSend.tooltipLabel,show:!e.isSendDisabled&&e.sendButtonFocus,offset:[6,-8]},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("dt-button",{class:{"message-input-button__disabled d-fc-muted":e.isSendDisabled},attrs:{"data-qa":"dt-message-input-send-btn",size:"sm",kind:e.sendButtonKind,circle:!!e.showSend.icon,importance:"primary","aria-label":e.showSend.ariaLabel,"aria-disabled":e.isSendDisabled},on:{click:e.onSend,mouseenter:function(i){e.sendButtonFocus=!0},mouseleave:function(i){e.sendButtonFocus=!1},focus:function(i){e.sendButtonFocus=!0},blur:function(i){e.sendButtonFocus=!1}},scopedSlots:e._u([e.showSend.icon?{key:"icon",fn:function(){return[n("dt-icon",{attrs:{name:e.showSend.icon,size:"300"}})]},proxy:!0}:null],null,!0)},[e.showSend.text?[n("p",[e._v(e._s(e.showSend.text))])]:e._e()],2)]},proxy:!0}],null,!1,370079737)}):e._e()],1)])],2)},d=[],m=s.normalizeComponent(u,c,d,!1,null,null,null,null);const p=m.exports;exports.DtRichTextEditor=o.DtRichTextEditor;exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=o.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES;exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=o.RICH_TEXT_EDITOR_OUTPUT_FORMATS;exports.DtRecipeMessageInput=p;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as o, a as s, R as r, b as l } from "./rich_text_editor-
|
|
1
|
+
import { D as o, a as s, R as r, b as l } from "./rich_text_editor-WaW2IVbb.js";
|
|
2
2
|
import { t as u, w as c, x as d } from "./index-EEKICgH6.js";
|
|
3
3
|
import { D as m } from "./emoji_picker-xC7uJDCX.js";
|
|
4
4
|
import { n as p, D as f } from "./tooltip-s5-t4SPy.js";
|