@dialpad/dialtone 9.19.0 → 9.20.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/dist/css/dialtone.css +2 -2
- 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 +73 -73
- package/dist/vue2/message_input.cjs +1 -1
- package/dist/vue2/message_input.js +3 -3
- package/dist/vue2/{rich_text_editor-TX19t44m.cjs → rich_text_editor-OOdKm54S.cjs} +2 -2
- package/dist/vue2/{rich_text_editor-AZuWkf9m.js → rich_text_editor-QsHU2mru.js} +860 -861
- package/dist/vue2/style.css +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
- package/dist/vue3/dialtone-vue.cjs +2 -2
- package/dist/vue3/dialtone-vue.js +244 -233
- package/dist/vue3/message_input.cjs +1 -1
- package/dist/vue3/message_input.js +76 -76
- package/dist/vue3/{rich_text_editor-S31F6RAP.js → rich_text_editor-PlDAAo2K.js} +2 -2
- package/dist/vue3/{rich_text_editor-fciM1V1t.cjs → rich_text_editor-m8DM-vOU.cjs} +2 -2
- package/dist/vue3/style.css +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
- package/package.json +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./rich_text_editor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./rich_text_editor-m8DM-vOU.cjs"),c=require("./emoji-q4ZpxDOX.cjs"),b=require("./emoji_picker-i3y8jyyY.cjs"),h=require("./tooltip-px-Nxl4C.cjs"),e=require("vue"),C={name:"DtRecipeMessageInput",components:{DtButton:c.DtButton,DtEmojiPicker:b._sfc_main,DtIcon:c.DtIcon,DtInput:c.DtInput,DtPopover:l.DtPopover,DtRichTextEditor:l.DtRichTextEditor,DtTooltip:h.DtTooltip},mixins:[],inheritAttrs:!1,props:{modelValue:{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(o){return typeof o=="string"?l.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(o):!0}},outputFormat:{type:String,default:"text",validator(o){return l.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(o)}},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(o){return["searchNoResultsLabel","searchResultsLabel","searchPlaceholderLabel","skinSelectorButtonTooltipLabel","tabSetLabels"].every(t=>o[t]!=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"})},mentionSuggestion:{type:Object,default:null}},emits:["submit","select-media","add-media","cancel","skin-tone","selected-emoji","focus","blur","input"],data(){return{internalInputValue:this.modelValue,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:{modelValue(o){this.internalInputValue=o}},methods:{onDrag(o){o.stopPropagation(),o.preventDefault()},onDrop(o){o.stopPropagation(),o.preventDefault();const t=o.dataTransfer,m=Array.from(t.files).map(s=>s.name);this.$emit("add-media",m)},onSkinTone(o){this.$emit("skin-tone",o)},onSelectEmoji(o){if(!o){this.emojiPickerOpened=!1;return}this.$refs.richTextEditor.editor.commands.insertContent({type:"emoji",attrs:{code:o.shortname}}),this.emojiPickerOpened=!1,this.$emit("selected-emoji",o)},onSelectImage(){this.$refs.messageInputImageUpload.$refs.input.click()},onImageUpload(){this.$emit("select-media",this.$refs.messageInputImageUpload.$refs.input.files)},toggleEmojiPicker(){this.emojiPickerOpened=!this.emojiPickerOpened},onSend(){this.isSendDisabled||this.$emit("submit",this.internalInputValue)},onCancel(){this.$emit("cancel")},onFocus(o){this.hasFocus=!0,this.$refs.richTextEditor.focusEditor(),this.$emit("focus",o)},onBlur(o){this.hasFocus=!1,this.$emit("blur",o)},onInput(o){this.$emit("input",o)}}},S={class:"d-d-flex d-jc-space-between d-mx8 d-my4"},w={class:"d-d-flex"},T={class:"d-d-flex"},j={key:0};function P(o,t,n,m,s,i){const p=e.resolveComponent("dt-rich-text-editor"),u=e.resolveComponent("dt-icon"),r=e.resolveComponent("dt-button"),g=e.resolveComponent("dt-input"),d=e.resolveComponent("dt-tooltip"),f=e.resolveComponent("dt-emoji-picker"),k=e.resolveComponent("dt-popover");return e.openBlock(),e.createElementBlock("div",{"data-qa":"dt-message-input",role:"presentation",class:e.normalizeClass(["d-d-flex","d-fd-column","d-bar8","d-baw1","d-ba","d-c-text",{"d-bc-bold d-bs-sm":s.hasFocus,"d-bc-default":!s.hasFocus}]),onClick:t[15]||(t[15]=a=>o.$refs.richTextEditor.focusEditor()),onDragEnter:t[16]||(t[16]=(...a)=>i.onDrag&&i.onDrag(...a)),onDragOver:t[17]||(t[17]=(...a)=>i.onDrag&&i.onDrag(...a)),onDrop:t[18]||(t[18]=(...a)=>i.onDrop&&i.onDrop(...a)),onKeydown:t[19]||(t[19]=e.withKeys(e.withModifiers((...a)=>i.onSend&&i.onSend(...a),["exact"]),["enter"]))},[e.createElementVNode("div",{class:"d-of-auto d-mx16 d-mt8 d-mb4",style:e.normalizeStyle({"max-height":n.maxHeight})},[e.createVNode(p,e.mergeProps({ref:"richTextEditor",modelValue:s.internalInputValue,"onUpdate:modelValue":t[0]||(t[0]=a=>s.internalInputValue=a),editable:n.editable,"input-aria-label":n.inputAriaLabel,"input-class":n.inputClass,"output-format":n.outputFormat,"auto-focus":n.autoFocus,link:n.link,placeholder:n.placeholder,"mention-suggestion":n.mentionSuggestion},o.$attrs,{onFocus:i.onFocus,onBlur:i.onBlur,onInput:t[1]||(t[1]=a=>i.onInput(a))}),null,16,["modelValue","editable","input-aria-label","input-class","output-format","auto-focus","link","placeholder","mention-suggestion","onFocus","onBlur"])],4),e.renderSlot(o.$slots,"middle"),e.createElementVNode("section",S,[e.createElementVNode("div",w,[n.showImagePicker?(e.openBlock(),e.createBlock(d,{key:0,placement:"top-start",message:n.showImagePicker.tooltipLabel,offset:[-4,-4]},{anchor:e.withCtx(()=>[e.createVNode(r,{"data-qa":"dt-message-input-image-btn",size:"sm",circle:"",kind:s.imagePickerFocus?"default":"muted",importance:"clear","aria-label":n.showImagePicker.ariaLabel,onClick:i.onSelectImage,onMouseenter:t[2]||(t[2]=a=>s.imagePickerFocus=!0),onMouseleave:t[3]||(t[3]=a=>s.imagePickerFocus=!1),onFocus:t[4]||(t[4]=a=>s.imagePickerFocus=!0),onBlur:t[5]||(t[5]=a=>s.imagePickerFocus=!1)},{icon:e.withCtx(()=>[e.createVNode(u,{name:"image",size:"300"})]),_:1},8,["kind","aria-label","onClick"]),e.createVNode(g,{ref:"messageInputImageUpload","data-qa":"dt-message-input-image-input",type:"file",class:"d-ps-absolute",multiple:"",hidden:"",onInput:i.onImageUpload},null,8,["onInput"])]),_:1},8,["message"])):e.createCommentVNode("",!0),n.showEmojiPicker?(e.openBlock(),e.createBlock(k,{key:1,"data-qa":"dt-message-input-emoji-picker-popover",open:s.emojiPickerOpened,"initial-focus-element":"#searchInput",padding:"none",onOpened:t[10]||(t[10]=a=>{s.emojiPickerOpened=a})},{anchor:e.withCtx(()=>[e.createVNode(d,{message:n.emojiTooltipMessage,offset:[0,-4]},{anchor:e.withCtx(()=>[e.createVNode(r,{"data-qa":"dt-message-input-emoji-picker-btn",size:"sm",circle:"",kind:i.emojiPickerHovered?"default":"muted",importance:"clear","aria-label":n.emojiButtonAriaLabel,offset:[0,0],onClick:i.toggleEmojiPicker,onMouseenter:t[6]||(t[6]=a=>s.emojiPickerFocus=!0),onMouseleave:t[7]||(t[7]=a=>s.emojiPickerFocus=!1),onFocus:t[8]||(t[8]=a=>s.emojiPickerFocus=!0),onBlur:t[9]||(t[9]=a=>s.emojiPickerFocus=!1)},{icon:e.withCtx(()=>[e.createVNode(u,{name:i.emojiPickerHovered?"very-satisfied":"satisfied",size:"300"},null,8,["name"])]),_:1},8,["kind","aria-label","onClick"])]),_:1},8,["message"])]),content:e.withCtx(()=>[e.createVNode(f,e.mergeProps(n.emojiPickerProps,{onSkinTone:i.onSkinTone,onSelectedEmoji:i.onSelectEmoji}),null,16,["onSkinTone","onSelectedEmoji"])]),_:1},8,["open"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",T,[n.showCharacterLimit?(e.openBlock(),e.createBlock(d,{key:0,class:"dt-message-input--remaining-char-tooltip",placement:"top-end",enabled:i.characterLimitTooltipEnabled,message:n.showCharacterLimit.message,offset:[10,-8]},{anchor:e.withCtx(()=>[e.withDirectives(e.createElementVNode("p",{class:"d-fc-error d-mr16 dt-message-input--remaining-char","data-qa":"dt-message-input-character-limit"},e.toDisplayString(n.showCharacterLimit.count-i.inputLength),513),[[e.vShow,i.displayCharacterLimitWarning]])]),_:1},8,["enabled","message"])):e.createCommentVNode("",!0),n.showCancel?(e.openBlock(),e.createBlock(r,{key:1,"data-qa":"dt-message-input-cancel-button",class:"dt-message-input--cancel-button",size:"sm",kind:"muted",importance:"clear","aria-label":n.showCancel.ariaLabel,onClick:i.onCancel},{default:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(n.showCancel.text),1)]),_:1},8,["aria-label","onClick"])):e.createCommentVNode("",!0),n.showSend?(e.openBlock(),e.createBlock(d,{key:2,placement:"top-end",enabled:!n.showSend,message:n.showSend.tooltipLabel,show:!i.isSendDisabled&&s.sendButtonFocus,offset:[6,-8]},{anchor:e.withCtx(()=>[e.createVNode(r,{"data-qa":"dt-message-input-send-btn",size:"sm",kind:i.sendButtonKind,circle:!!n.showSend.icon,importance:"primary",class:e.normalizeClass({"message-input-button__disabled d-fc-muted":i.isSendDisabled}),"aria-label":n.showSend.ariaLabel,"aria-disabled":i.isSendDisabled,onClick:i.onSend,onMouseenter:t[11]||(t[11]=a=>s.sendButtonFocus=!0),onMouseleave:t[12]||(t[12]=a=>s.sendButtonFocus=!1),onFocus:t[13]||(t[13]=a=>s.sendButtonFocus=!0),onBlur:t[14]||(t[14]=a=>s.sendButtonFocus=!1)},e.createSlots({default:e.withCtx(()=>[n.showSend.text?(e.openBlock(),e.createElementBlock("p",j,e.toDisplayString(n.showSend.text),1)):e.createCommentVNode("",!0)]),_:2},[n.showSend.icon?{name:"icon",fn:e.withCtx(()=>[e.createVNode(u,{name:n.showSend.icon,size:"300"},null,8,["name"])]),key:"0"}:void 0]),1032,["kind","circle","class","aria-label","aria-disabled","onClick"])]),_:1},8,["enabled","message","show"])):e.createCommentVNode("",!0)])])],34)}const v=h._export_sfc(C,[["render",P]]);exports.DtRichTextEditor=l.DtRichTextEditor;exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=l.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES;exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=l.RICH_TEXT_EDITOR_OUTPUT_FORMATS;exports.DtRecipeMessageInput=v;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { D as v, a as L, R as B, b as F } from "./rich_text_editor-
|
|
2
|
-
import { t as
|
|
1
|
+
import { D as v, a as L, R as B, b as F } from "./rich_text_editor-PlDAAo2K.js";
|
|
2
|
+
import { t as I, w as D, x as E } from "./emoji-ifbDMGtx.js";
|
|
3
3
|
import { _ as T } from "./emoji_picker-G6QLC4uN.js";
|
|
4
4
|
import { _ as x, D as O } from "./tooltip-FcHJcgMd.js";
|
|
5
|
-
import { resolveComponent as r, openBlock as u, createElementBlock as k, normalizeClass as S, withKeys as _, withModifiers as V, createElementVNode as d, normalizeStyle as M, createVNode as l, mergeProps as j, renderSlot as R, createBlock as c, withCtx as s, createCommentVNode as m, withDirectives as
|
|
6
|
-
const
|
|
5
|
+
import { resolveComponent as r, openBlock as u, createElementBlock as k, normalizeClass as S, withKeys as _, withModifiers as V, createElementVNode as d, normalizeStyle as M, createVNode as l, mergeProps as j, renderSlot as R, createBlock as c, withCtx as s, createCommentVNode as m, withDirectives as U, toDisplayString as p, vShow as q, createSlots as z } from "vue";
|
|
6
|
+
const A = {
|
|
7
7
|
name: "DtRecipeMessageInput",
|
|
8
8
|
components: {
|
|
9
|
-
DtButton:
|
|
9
|
+
DtButton: I,
|
|
10
10
|
DtEmojiPicker: T,
|
|
11
|
-
DtIcon:
|
|
11
|
+
DtIcon: D,
|
|
12
12
|
DtInput: E,
|
|
13
13
|
DtPopover: v,
|
|
14
14
|
DtRichTextEditor: L,
|
|
@@ -63,8 +63,8 @@ const U = {
|
|
|
63
63
|
autoFocus: {
|
|
64
64
|
type: [Boolean, String, Number],
|
|
65
65
|
default: !1,
|
|
66
|
-
validator(
|
|
67
|
-
return typeof
|
|
66
|
+
validator(n) {
|
|
67
|
+
return typeof n == "string" ? B.includes(n) : !0;
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
/**
|
|
@@ -76,8 +76,8 @@ const U = {
|
|
|
76
76
|
outputFormat: {
|
|
77
77
|
type: String,
|
|
78
78
|
default: "text",
|
|
79
|
-
validator(
|
|
80
|
-
return F.includes(
|
|
79
|
+
validator(n) {
|
|
80
|
+
return F.includes(n);
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
/**
|
|
@@ -120,14 +120,14 @@ const U = {
|
|
|
120
120
|
emojiPickerProps: {
|
|
121
121
|
type: Object,
|
|
122
122
|
default: () => ({}),
|
|
123
|
-
validate(
|
|
123
|
+
validate(n) {
|
|
124
124
|
return [
|
|
125
125
|
"searchNoResultsLabel",
|
|
126
126
|
"searchResultsLabel",
|
|
127
127
|
"searchPlaceholderLabel",
|
|
128
128
|
"skinSelectorButtonTooltipLabel",
|
|
129
129
|
"tabSetLabels"
|
|
130
|
-
].every((e) =>
|
|
130
|
+
].every((e) => n[e] != null);
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
/**
|
|
@@ -285,39 +285,39 @@ const U = {
|
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
287
|
watch: {
|
|
288
|
-
modelValue(
|
|
289
|
-
this.internalInputValue =
|
|
288
|
+
modelValue(n) {
|
|
289
|
+
this.internalInputValue = n;
|
|
290
290
|
}
|
|
291
291
|
},
|
|
292
292
|
methods: {
|
|
293
|
-
onDrag(
|
|
294
|
-
|
|
293
|
+
onDrag(n) {
|
|
294
|
+
n.stopPropagation(), n.preventDefault();
|
|
295
295
|
},
|
|
296
|
-
onDrop(
|
|
297
|
-
|
|
298
|
-
const e =
|
|
296
|
+
onDrop(n) {
|
|
297
|
+
n.stopPropagation(), n.preventDefault();
|
|
298
|
+
const e = n.dataTransfer, b = Array.from(e.files).map((a) => a.name);
|
|
299
299
|
this.$emit("add-media", b);
|
|
300
300
|
},
|
|
301
|
-
onSkinTone(
|
|
302
|
-
this.$emit("skin-tone",
|
|
301
|
+
onSkinTone(n) {
|
|
302
|
+
this.$emit("skin-tone", n);
|
|
303
303
|
},
|
|
304
|
-
onSelectEmoji(
|
|
305
|
-
if (!
|
|
304
|
+
onSelectEmoji(n) {
|
|
305
|
+
if (!n) {
|
|
306
306
|
this.emojiPickerOpened = !1;
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
309
309
|
this.$refs.richTextEditor.editor.commands.insertContent({
|
|
310
310
|
type: "emoji",
|
|
311
311
|
attrs: {
|
|
312
|
-
code:
|
|
312
|
+
code: n.shortname
|
|
313
313
|
}
|
|
314
|
-
}), this.emojiPickerOpened = !1, this.$emit("selected-emoji",
|
|
314
|
+
}), this.emojiPickerOpened = !1, this.$emit("selected-emoji", n);
|
|
315
315
|
},
|
|
316
316
|
onSelectImage() {
|
|
317
317
|
this.$refs.messageInputImageUpload.$refs.input.click();
|
|
318
318
|
},
|
|
319
|
-
onImageUpload(
|
|
320
|
-
this.$emit("select-media",
|
|
319
|
+
onImageUpload() {
|
|
320
|
+
this.$emit("select-media", this.$refs.messageInputImageUpload.$refs.input.files);
|
|
321
321
|
},
|
|
322
322
|
toggleEmojiPicker() {
|
|
323
323
|
this.emojiPickerOpened = !this.emojiPickerOpened;
|
|
@@ -328,19 +328,19 @@ const U = {
|
|
|
328
328
|
onCancel() {
|
|
329
329
|
this.$emit("cancel");
|
|
330
330
|
},
|
|
331
|
-
onFocus(
|
|
332
|
-
this.hasFocus = !0, this.$refs.richTextEditor.focusEditor(), this.$emit("focus",
|
|
331
|
+
onFocus(n) {
|
|
332
|
+
this.hasFocus = !0, this.$refs.richTextEditor.focusEditor(), this.$emit("focus", n);
|
|
333
333
|
},
|
|
334
|
-
onBlur(
|
|
335
|
-
this.hasFocus = !1, this.$emit("blur",
|
|
334
|
+
onBlur(n) {
|
|
335
|
+
this.hasFocus = !1, this.$emit("blur", n);
|
|
336
336
|
},
|
|
337
|
-
onInput(
|
|
338
|
-
this.$emit("input",
|
|
337
|
+
onInput(n) {
|
|
338
|
+
this.$emit("input", n);
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
}, H = { class: "d-d-flex d-jc-space-between d-mx8 d-my4" }, N = { class: "d-d-flex" }, K = { class: "d-d-flex" }, W = { key: 0 };
|
|
342
|
-
function X(
|
|
343
|
-
const w = r("dt-rich-text-editor"),
|
|
342
|
+
function X(n, e, t, b, a, i) {
|
|
343
|
+
const w = r("dt-rich-text-editor"), h = r("dt-icon"), f = r("dt-button"), P = r("dt-input"), g = r("dt-tooltip"), y = r("dt-emoji-picker"), C = r("dt-popover");
|
|
344
344
|
return u(), k("div", {
|
|
345
345
|
"data-qa": "dt-message-input",
|
|
346
346
|
role: "presentation",
|
|
@@ -353,7 +353,7 @@ function X(t, e, n, b, a, i) {
|
|
|
353
353
|
"d-c-text",
|
|
354
354
|
{ "d-bc-bold d-bs-sm": a.hasFocus, "d-bc-default": !a.hasFocus }
|
|
355
355
|
]),
|
|
356
|
-
onClick: e[15] || (e[15] = (o) =>
|
|
356
|
+
onClick: e[15] || (e[15] = (o) => n.$refs.richTextEditor.focusEditor()),
|
|
357
357
|
onDragEnter: e[16] || (e[16] = (...o) => i.onDrag && i.onDrag(...o)),
|
|
358
358
|
onDragOver: e[17] || (e[17] = (...o) => i.onDrag && i.onDrag(...o)),
|
|
359
359
|
onDrop: e[18] || (e[18] = (...o) => i.onDrop && i.onDrop(...o)),
|
|
@@ -361,33 +361,33 @@ function X(t, e, n, b, a, i) {
|
|
|
361
361
|
}, [
|
|
362
362
|
d("div", {
|
|
363
363
|
class: "d-of-auto d-mx16 d-mt8 d-mb4",
|
|
364
|
-
style: M({ "max-height":
|
|
364
|
+
style: M({ "max-height": t.maxHeight })
|
|
365
365
|
}, [
|
|
366
366
|
l(w, j({
|
|
367
367
|
ref: "richTextEditor",
|
|
368
368
|
modelValue: a.internalInputValue,
|
|
369
369
|
"onUpdate:modelValue": e[0] || (e[0] = (o) => a.internalInputValue = o),
|
|
370
|
-
editable:
|
|
371
|
-
"input-aria-label":
|
|
372
|
-
"input-class":
|
|
373
|
-
"output-format":
|
|
374
|
-
"auto-focus":
|
|
375
|
-
link:
|
|
376
|
-
placeholder:
|
|
377
|
-
"mention-suggestion":
|
|
378
|
-
},
|
|
370
|
+
editable: t.editable,
|
|
371
|
+
"input-aria-label": t.inputAriaLabel,
|
|
372
|
+
"input-class": t.inputClass,
|
|
373
|
+
"output-format": t.outputFormat,
|
|
374
|
+
"auto-focus": t.autoFocus,
|
|
375
|
+
link: t.link,
|
|
376
|
+
placeholder: t.placeholder,
|
|
377
|
+
"mention-suggestion": t.mentionSuggestion
|
|
378
|
+
}, n.$attrs, {
|
|
379
379
|
onFocus: i.onFocus,
|
|
380
380
|
onBlur: i.onBlur,
|
|
381
381
|
onInput: e[1] || (e[1] = (o) => i.onInput(o))
|
|
382
382
|
}), null, 16, ["modelValue", "editable", "input-aria-label", "input-class", "output-format", "auto-focus", "link", "placeholder", "mention-suggestion", "onFocus", "onBlur"])
|
|
383
383
|
], 4),
|
|
384
|
-
R(
|
|
384
|
+
R(n.$slots, "middle"),
|
|
385
385
|
d("section", H, [
|
|
386
386
|
d("div", N, [
|
|
387
|
-
|
|
387
|
+
t.showImagePicker ? (u(), c(g, {
|
|
388
388
|
key: 0,
|
|
389
389
|
placement: "top-start",
|
|
390
|
-
message:
|
|
390
|
+
message: t.showImagePicker.tooltipLabel,
|
|
391
391
|
offset: [-4, -4]
|
|
392
392
|
}, {
|
|
393
393
|
anchor: s(() => [
|
|
@@ -397,7 +397,7 @@ function X(t, e, n, b, a, i) {
|
|
|
397
397
|
circle: "",
|
|
398
398
|
kind: a.imagePickerFocus ? "default" : "muted",
|
|
399
399
|
importance: "clear",
|
|
400
|
-
"aria-label":
|
|
400
|
+
"aria-label": t.showImagePicker.ariaLabel,
|
|
401
401
|
onClick: i.onSelectImage,
|
|
402
402
|
onMouseenter: e[2] || (e[2] = (o) => a.imagePickerFocus = !0),
|
|
403
403
|
onMouseleave: e[3] || (e[3] = (o) => a.imagePickerFocus = !1),
|
|
@@ -405,7 +405,7 @@ function X(t, e, n, b, a, i) {
|
|
|
405
405
|
onBlur: e[5] || (e[5] = (o) => a.imagePickerFocus = !1)
|
|
406
406
|
}, {
|
|
407
407
|
icon: s(() => [
|
|
408
|
-
l(
|
|
408
|
+
l(h, {
|
|
409
409
|
name: "image",
|
|
410
410
|
size: "300"
|
|
411
411
|
})
|
|
@@ -424,7 +424,7 @@ function X(t, e, n, b, a, i) {
|
|
|
424
424
|
]),
|
|
425
425
|
_: 1
|
|
426
426
|
}, 8, ["message"])) : m("", !0),
|
|
427
|
-
|
|
427
|
+
t.showEmojiPicker ? (u(), c(C, {
|
|
428
428
|
key: 1,
|
|
429
429
|
"data-qa": "dt-message-input-emoji-picker-popover",
|
|
430
430
|
open: a.emojiPickerOpened,
|
|
@@ -435,8 +435,8 @@ function X(t, e, n, b, a, i) {
|
|
|
435
435
|
})
|
|
436
436
|
}, {
|
|
437
437
|
anchor: s(() => [
|
|
438
|
-
l(
|
|
439
|
-
message:
|
|
438
|
+
l(g, {
|
|
439
|
+
message: t.emojiTooltipMessage,
|
|
440
440
|
offset: [0, -4]
|
|
441
441
|
}, {
|
|
442
442
|
anchor: s(() => [
|
|
@@ -446,7 +446,7 @@ function X(t, e, n, b, a, i) {
|
|
|
446
446
|
circle: "",
|
|
447
447
|
kind: i.emojiPickerHovered ? "default" : "muted",
|
|
448
448
|
importance: "clear",
|
|
449
|
-
"aria-label":
|
|
449
|
+
"aria-label": t.emojiButtonAriaLabel,
|
|
450
450
|
offset: [0, 0],
|
|
451
451
|
onClick: i.toggleEmojiPicker,
|
|
452
452
|
onMouseenter: e[6] || (e[6] = (o) => a.emojiPickerFocus = !0),
|
|
@@ -455,7 +455,7 @@ function X(t, e, n, b, a, i) {
|
|
|
455
455
|
onBlur: e[9] || (e[9] = (o) => a.emojiPickerFocus = !1)
|
|
456
456
|
}, {
|
|
457
457
|
icon: s(() => [
|
|
458
|
-
l(
|
|
458
|
+
l(h, {
|
|
459
459
|
name: i.emojiPickerHovered ? "very-satisfied" : "satisfied",
|
|
460
460
|
size: "300"
|
|
461
461
|
}, null, 8, ["name"])
|
|
@@ -467,7 +467,7 @@ function X(t, e, n, b, a, i) {
|
|
|
467
467
|
}, 8, ["message"])
|
|
468
468
|
]),
|
|
469
469
|
content: s(() => [
|
|
470
|
-
l(y, j(
|
|
470
|
+
l(y, j(t.emojiPickerProps, {
|
|
471
471
|
onSkinTone: i.onSkinTone,
|
|
472
472
|
onSelectedEmoji: i.onSelectEmoji
|
|
473
473
|
}), null, 16, ["onSkinTone", "onSelectedEmoji"])
|
|
@@ -476,44 +476,44 @@ function X(t, e, n, b, a, i) {
|
|
|
476
476
|
}, 8, ["open"])) : m("", !0)
|
|
477
477
|
]),
|
|
478
478
|
d("div", K, [
|
|
479
|
-
|
|
479
|
+
t.showCharacterLimit ? (u(), c(g, {
|
|
480
480
|
key: 0,
|
|
481
481
|
class: "dt-message-input--remaining-char-tooltip",
|
|
482
482
|
placement: "top-end",
|
|
483
483
|
enabled: i.characterLimitTooltipEnabled,
|
|
484
|
-
message:
|
|
484
|
+
message: t.showCharacterLimit.message,
|
|
485
485
|
offset: [10, -8]
|
|
486
486
|
}, {
|
|
487
487
|
anchor: s(() => [
|
|
488
|
-
|
|
488
|
+
U(d("p", {
|
|
489
489
|
class: "d-fc-error d-mr16 dt-message-input--remaining-char",
|
|
490
490
|
"data-qa": "dt-message-input-character-limit"
|
|
491
|
-
}, p(
|
|
492
|
-
[
|
|
491
|
+
}, p(t.showCharacterLimit.count - i.inputLength), 513), [
|
|
492
|
+
[q, i.displayCharacterLimitWarning]
|
|
493
493
|
])
|
|
494
494
|
]),
|
|
495
495
|
_: 1
|
|
496
496
|
}, 8, ["enabled", "message"])) : m("", !0),
|
|
497
|
-
|
|
497
|
+
t.showCancel ? (u(), c(f, {
|
|
498
498
|
key: 1,
|
|
499
499
|
"data-qa": "dt-message-input-cancel-button",
|
|
500
500
|
class: "dt-message-input--cancel-button",
|
|
501
501
|
size: "sm",
|
|
502
502
|
kind: "muted",
|
|
503
503
|
importance: "clear",
|
|
504
|
-
"aria-label":
|
|
504
|
+
"aria-label": t.showCancel.ariaLabel,
|
|
505
505
|
onClick: i.onCancel
|
|
506
506
|
}, {
|
|
507
507
|
default: s(() => [
|
|
508
|
-
d("p", null, p(
|
|
508
|
+
d("p", null, p(t.showCancel.text), 1)
|
|
509
509
|
]),
|
|
510
510
|
_: 1
|
|
511
511
|
}, 8, ["aria-label", "onClick"])) : m("", !0),
|
|
512
|
-
|
|
512
|
+
t.showSend ? (u(), c(g, {
|
|
513
513
|
key: 2,
|
|
514
514
|
placement: "top-end",
|
|
515
|
-
enabled: !
|
|
516
|
-
message:
|
|
515
|
+
enabled: !t.showSend,
|
|
516
|
+
message: t.showSend.tooltipLabel,
|
|
517
517
|
show: !i.isSendDisabled && a.sendButtonFocus,
|
|
518
518
|
offset: [6, -8]
|
|
519
519
|
}, {
|
|
@@ -522,29 +522,29 @@ function X(t, e, n, b, a, i) {
|
|
|
522
522
|
"data-qa": "dt-message-input-send-btn",
|
|
523
523
|
size: "sm",
|
|
524
524
|
kind: i.sendButtonKind,
|
|
525
|
-
circle: !!
|
|
525
|
+
circle: !!t.showSend.icon,
|
|
526
526
|
importance: "primary",
|
|
527
527
|
class: S({
|
|
528
528
|
"message-input-button__disabled d-fc-muted": i.isSendDisabled
|
|
529
529
|
}),
|
|
530
|
-
"aria-label":
|
|
530
|
+
"aria-label": t.showSend.ariaLabel,
|
|
531
531
|
"aria-disabled": i.isSendDisabled,
|
|
532
532
|
onClick: i.onSend,
|
|
533
533
|
onMouseenter: e[11] || (e[11] = (o) => a.sendButtonFocus = !0),
|
|
534
534
|
onMouseleave: e[12] || (e[12] = (o) => a.sendButtonFocus = !1),
|
|
535
535
|
onFocus: e[13] || (e[13] = (o) => a.sendButtonFocus = !0),
|
|
536
536
|
onBlur: e[14] || (e[14] = (o) => a.sendButtonFocus = !1)
|
|
537
|
-
},
|
|
537
|
+
}, z({
|
|
538
538
|
default: s(() => [
|
|
539
|
-
|
|
539
|
+
t.showSend.text ? (u(), k("p", W, p(t.showSend.text), 1)) : m("", !0)
|
|
540
540
|
]),
|
|
541
541
|
_: 2
|
|
542
542
|
}, [
|
|
543
|
-
|
|
543
|
+
t.showSend.icon ? {
|
|
544
544
|
name: "icon",
|
|
545
545
|
fn: s(() => [
|
|
546
|
-
l(
|
|
547
|
-
name:
|
|
546
|
+
l(h, {
|
|
547
|
+
name: t.showSend.icon,
|
|
548
548
|
size: "300"
|
|
549
549
|
}, null, 8, ["name"])
|
|
550
550
|
]),
|
|
@@ -558,7 +558,7 @@ function X(t, e, n, b, a, i) {
|
|
|
558
558
|
])
|
|
559
559
|
], 34);
|
|
560
560
|
}
|
|
561
|
-
const $ = /* @__PURE__ */ x(
|
|
561
|
+
const $ = /* @__PURE__ */ x(A, [["render", X]]);
|
|
562
562
|
export {
|
|
563
563
|
$ as DtRecipeMessageInput,
|
|
564
564
|
L as DtRichTextEditor,
|
|
@@ -377,8 +377,7 @@ const Lc = (n) => {
|
|
|
377
377
|
this.imageLoadedSuccessfully = !1, n.classList.add("d-d-none");
|
|
378
378
|
},
|
|
379
379
|
validateProps() {
|
|
380
|
-
|
|
381
|
-
throw new Error("full-name or image-alt must be set if image-src is provided");
|
|
380
|
+
this.imageSrc && this.imageAlt === void 0 && console.error('image-alt required if image-src is provided. Can be set to "" (empty string) if the image is described in text nearby');
|
|
382
381
|
},
|
|
383
382
|
handleClick(n) {
|
|
384
383
|
this.clickable && this.$emit("click", n);
|
|
@@ -16312,6 +16311,7 @@ function oy(n, e, t, r, i, s) {
|
|
|
16312
16311
|
nt(o, {
|
|
16313
16312
|
"full-name": s.name,
|
|
16314
16313
|
"image-src": s.avatarSrc,
|
|
16314
|
+
"image-alt": "",
|
|
16315
16315
|
size: "xs"
|
|
16316
16316
|
}, null, 8, ["full-name", "image-src"]),
|
|
16317
16317
|
Wi(" " + ut(s.name), 1)
|