@dialpad/dialtone-vue 3.131.0 → 3.132.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/lib/input.cjs +2 -0
- package/dist/lib/input.cjs.map +1 -1
- package/dist/lib/input.js +2 -0
- package/dist/lib/input.js.map +1 -1
- package/dist/lib/message-input.cjs +200 -148
- package/dist/lib/message-input.cjs.map +1 -1
- package/dist/lib/message-input.js +203 -151
- package/dist/lib/message-input.js.map +1 -1
- package/dist/lib/rich-text-editor.cjs +39 -17
- package/dist/lib/rich-text-editor.cjs.map +1 -1
- package/dist/lib/rich-text-editor.js +40 -18
- package/dist/lib/rich-text-editor.js.map +1 -1
- package/dist/style.css +64 -6
- package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +39 -5
- package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.d.ts +73 -0
- package/dist/types/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.d.ts.map +1 -0
- package/dist/types/recipes/conversation_view/message_input/meeting_pill/meeting_pill.d.ts +4 -0
- package/dist/types/recipes/conversation_view/message_input/meeting_pill/meeting_pill.d.ts.map +1 -0
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +17 -6
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Node, mergeAttributes } from "@tiptap/core";
|
|
2
|
+
import { NodeViewWrapper, nodeViewProps, VueNodeViewRenderer } from "@tiptap/vue-3";
|
|
3
|
+
import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, createTextVNode, toDisplayString, resolveDirective, createElementBlock, normalizeClass, withKeys, withModifiers, normalizeStyle, mergeProps, renderSlot, withDirectives, createCommentVNode, vShow, createSlots } from "vue";
|
|
2
4
|
import { _export_sfc } from "../chunks/_plugin-vue_export-helper-caHeSgYY.js";
|
|
3
|
-
import {
|
|
4
|
-
import { DtEmojiPicker as _sfc_main$1 } from "./emoji-picker.js";
|
|
5
|
+
import { DtItemLayout } from "./item-layout.js";
|
|
5
6
|
import { DtIcon } from "./icon.js";
|
|
7
|
+
import { DtButton } from "./button.js";
|
|
8
|
+
import { DtEmojiPicker as _sfc_main$2 } from "./emoji-picker.js";
|
|
6
9
|
import { DtInput } from "./input.js";
|
|
7
10
|
import { DtPopover } from "./popover.js";
|
|
8
11
|
import { DtRichTextEditor, RICH_TEXT_EDITOR_AUTOFOCUS_TYPES, RICH_TEXT_EDITOR_OUTPUT_FORMATS } from "./rich-text-editor.js";
|
|
9
12
|
import { DtTooltip } from "./tooltip.js";
|
|
10
13
|
import "../common/utils.js";
|
|
11
14
|
import "../common/constants.js";
|
|
15
|
+
import "@dialpad/dialtone-icons/vue3";
|
|
16
|
+
import "../chunks/icon_constants-Dy4MEUJL.js";
|
|
17
|
+
import "@dialpad/dialtone-icons/icons.json";
|
|
12
18
|
import "../chunks/link_constants-AfTWrr-n.js";
|
|
13
19
|
import "../chunks/tab-RTDgnD9-.js";
|
|
14
20
|
import "@dialpad/dialtone-emojis";
|
|
15
21
|
import "../chunks/input-NmYDD5bn.js";
|
|
16
22
|
import "../common/validators.js";
|
|
17
23
|
import "./validation-messages.js";
|
|
18
|
-
import "@dialpad/dialtone-icons/vue3";
|
|
19
|
-
import "../chunks/icon_constants-Dy4MEUJL.js";
|
|
20
|
-
import "@dialpad/dialtone-icons/icons.json";
|
|
21
24
|
import "../chunks/popover_constants-kQaX7G4a.js";
|
|
22
25
|
import "tippy.js";
|
|
23
26
|
import "../chunks/modal-XOr4kiNZ.js";
|
|
24
27
|
import "../chunks/sr_only_close_button-3EdsV-dH.js";
|
|
25
28
|
import "./lazy-show.js";
|
|
26
|
-
import "@tiptap/vue-3";
|
|
27
29
|
import "@tiptap/extension-blockquote";
|
|
28
30
|
import "@tiptap/extension-code-block";
|
|
29
31
|
import "@tiptap/extension-document";
|
|
@@ -40,7 +42,6 @@ import "@tiptap/extension-strike";
|
|
|
40
42
|
import "@tiptap/extension-underline";
|
|
41
43
|
import "@tiptap/extension-text";
|
|
42
44
|
import "@tiptap/extension-text-align";
|
|
43
|
-
import "@tiptap/core";
|
|
44
45
|
import "./emoji.js";
|
|
45
46
|
import "../chunks/index-GVD15GIB.js";
|
|
46
47
|
import "./skeleton.js";
|
|
@@ -48,7 +49,6 @@ import "@tiptap/pm/state";
|
|
|
48
49
|
import "@tiptap/suggestion";
|
|
49
50
|
import "./list-item.js";
|
|
50
51
|
import "../chunks/list_item_constants-u1xcN9Dd.js";
|
|
51
|
-
import "./item-layout.js";
|
|
52
52
|
import "./stack.js";
|
|
53
53
|
import "../chunks/stack_constants-HraCekPm.js";
|
|
54
54
|
import "@tiptap/extension-mention";
|
|
@@ -57,11 +57,106 @@ import "./avatar.js";
|
|
|
57
57
|
import "./presence.js";
|
|
58
58
|
import "@dialpad/dialtone-icons/vue3/hash";
|
|
59
59
|
import "@dialpad/dialtone-icons/vue3/lock";
|
|
60
|
+
const _sfc_main$1 = {
|
|
61
|
+
name: "MeetingPill",
|
|
62
|
+
components: {
|
|
63
|
+
NodeViewWrapper,
|
|
64
|
+
DtItemLayout,
|
|
65
|
+
DtIcon,
|
|
66
|
+
DtButton
|
|
67
|
+
},
|
|
68
|
+
props: nodeViewProps,
|
|
69
|
+
emits: ["meeting-pill-close"],
|
|
70
|
+
methods: {
|
|
71
|
+
close(e) {
|
|
72
|
+
this.$parent.$emit("meeting-pill-close", e);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const _hoisted_1$1 = { class: "dt-message-input-meeting-pill__icon" };
|
|
77
|
+
const _hoisted_2$1 = { class: "dt-message-input-meeting-pill__close" };
|
|
78
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
79
|
+
const _component_dt_icon = resolveComponent("dt-icon");
|
|
80
|
+
const _component_dt_button = resolveComponent("dt-button");
|
|
81
|
+
const _component_dt_item_layout = resolveComponent("dt-item-layout");
|
|
82
|
+
const _component_node_view_wrapper = resolveComponent("node-view-wrapper");
|
|
83
|
+
return openBlock(), createBlock(_component_node_view_wrapper, { class: "dt-message-input-meeting-pill" }, {
|
|
84
|
+
default: withCtx(() => [
|
|
85
|
+
createVNode(_component_dt_item_layout, {
|
|
86
|
+
class: "dt-message-input-meeting-pill__layout",
|
|
87
|
+
unstyled: ""
|
|
88
|
+
}, {
|
|
89
|
+
left: withCtx(() => [
|
|
90
|
+
createElementVNode("div", _hoisted_1$1, [
|
|
91
|
+
createVNode(_component_dt_icon, {
|
|
92
|
+
name: "video",
|
|
93
|
+
size: "400"
|
|
94
|
+
})
|
|
95
|
+
])
|
|
96
|
+
]),
|
|
97
|
+
right: withCtx(() => [
|
|
98
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
99
|
+
createVNode(_component_dt_button, {
|
|
100
|
+
circle: "",
|
|
101
|
+
"aria-label": _ctx.node.attrs["close-button-aria-label"],
|
|
102
|
+
size: "xs",
|
|
103
|
+
importance: "clear",
|
|
104
|
+
onClick: $options.close
|
|
105
|
+
}, {
|
|
106
|
+
icon: withCtx(() => [
|
|
107
|
+
createVNode(_component_dt_icon, {
|
|
108
|
+
name: "close",
|
|
109
|
+
size: "300"
|
|
110
|
+
})
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
}, 8, ["aria-label", "onClick"])
|
|
114
|
+
])
|
|
115
|
+
]),
|
|
116
|
+
default: withCtx(() => [
|
|
117
|
+
createTextVNode(" " + toDisplayString(_ctx.node.attrs.text) + " ", 1)
|
|
118
|
+
]),
|
|
119
|
+
_: 1
|
|
120
|
+
})
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
const MeetingPill = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
126
|
+
const meetingPill = Node.create({
|
|
127
|
+
atom: true,
|
|
128
|
+
group: "inline",
|
|
129
|
+
inline: true,
|
|
130
|
+
addNodeView() {
|
|
131
|
+
return VueNodeViewRenderer(MeetingPill);
|
|
132
|
+
},
|
|
133
|
+
addAttributes() {
|
|
134
|
+
return {
|
|
135
|
+
text: {
|
|
136
|
+
default: 'Please pass in "text" attribute'
|
|
137
|
+
},
|
|
138
|
+
"close-button-aria-label": {}
|
|
139
|
+
};
|
|
140
|
+
},
|
|
141
|
+
parseHTML() {
|
|
142
|
+
return [
|
|
143
|
+
{
|
|
144
|
+
tag: "meeting-pill"
|
|
145
|
+
}
|
|
146
|
+
];
|
|
147
|
+
},
|
|
148
|
+
renderText({ node }) {
|
|
149
|
+
return "/dpm";
|
|
150
|
+
},
|
|
151
|
+
renderHTML({ HTMLAttributes }) {
|
|
152
|
+
return ["meeting-pill", mergeAttributes(HTMLAttributes)];
|
|
153
|
+
}
|
|
154
|
+
});
|
|
60
155
|
const _sfc_main = {
|
|
61
156
|
name: "DtRecipeMessageInput",
|
|
62
157
|
components: {
|
|
63
158
|
DtButton,
|
|
64
|
-
DtEmojiPicker: _sfc_main$
|
|
159
|
+
DtEmojiPicker: _sfc_main$2,
|
|
65
160
|
DtIcon,
|
|
66
161
|
DtInput,
|
|
67
162
|
DtPopover,
|
|
@@ -94,6 +189,13 @@ const _sfc_main = {
|
|
|
94
189
|
required: true,
|
|
95
190
|
default: ""
|
|
96
191
|
},
|
|
192
|
+
/**
|
|
193
|
+
* Prevents the user from typing any further. Deleting text will still work.
|
|
194
|
+
*/
|
|
195
|
+
preventTyping: {
|
|
196
|
+
type: Boolean,
|
|
197
|
+
default: false
|
|
198
|
+
},
|
|
97
199
|
/**
|
|
98
200
|
* Additional class name for the input element. Only accepts a String value
|
|
99
201
|
* because this is passed to the editor via options. For multiple classes,
|
|
@@ -381,24 +483,6 @@ const _sfc_main = {
|
|
|
381
483
|
* @type {String}
|
|
382
484
|
*/
|
|
383
485
|
"selected-command",
|
|
384
|
-
/**
|
|
385
|
-
* Native focus event
|
|
386
|
-
* @event input
|
|
387
|
-
* @type {String|JSON}
|
|
388
|
-
*/
|
|
389
|
-
"focus",
|
|
390
|
-
/**
|
|
391
|
-
* Native blur event
|
|
392
|
-
* @event input
|
|
393
|
-
* @type {String|JSON}
|
|
394
|
-
*/
|
|
395
|
-
"blur",
|
|
396
|
-
/**
|
|
397
|
-
* Native input event
|
|
398
|
-
* @event input
|
|
399
|
-
* @type {String|JSON}
|
|
400
|
-
*/
|
|
401
|
-
"input",
|
|
402
486
|
/**
|
|
403
487
|
* Event to sync the value with the parent
|
|
404
488
|
* @event update:modelValue
|
|
@@ -408,12 +492,12 @@ const _sfc_main = {
|
|
|
408
492
|
],
|
|
409
493
|
data() {
|
|
410
494
|
return {
|
|
495
|
+
additionalExtensions: [meetingPill],
|
|
411
496
|
internalInputValue: this.modelValue,
|
|
412
497
|
// internal input content
|
|
413
498
|
hasFocus: false,
|
|
414
499
|
imagePickerFocus: false,
|
|
415
500
|
emojiPickerFocus: false,
|
|
416
|
-
sendButtonFocus: false,
|
|
417
501
|
emojiPickerOpened: false
|
|
418
502
|
};
|
|
419
503
|
},
|
|
@@ -485,9 +569,6 @@ const _sfc_main = {
|
|
|
485
569
|
});
|
|
486
570
|
this.$emit("selected-emoji", emoji);
|
|
487
571
|
},
|
|
488
|
-
onSelectedCommand(command) {
|
|
489
|
-
this.$emit("selected-command", command);
|
|
490
|
-
},
|
|
491
572
|
onSelectImage() {
|
|
492
573
|
this.$refs.messageInputImageUpload.$refs.input.click();
|
|
493
574
|
},
|
|
@@ -510,55 +591,45 @@ const _sfc_main = {
|
|
|
510
591
|
var _a;
|
|
511
592
|
this.hasFocus = true;
|
|
512
593
|
(_a = this.$refs.richTextEditor) == null ? void 0 : _a.focusEditor();
|
|
513
|
-
this.$emit("focus", event);
|
|
514
594
|
},
|
|
515
595
|
onBlur(event) {
|
|
516
596
|
this.hasFocus = false;
|
|
517
|
-
this.$emit("blur", event);
|
|
518
597
|
},
|
|
519
598
|
onInput(event) {
|
|
520
|
-
this.$emit("input", event);
|
|
521
599
|
this.$emit("update:modelValue", event);
|
|
522
600
|
}
|
|
523
601
|
}
|
|
524
602
|
};
|
|
525
|
-
const _hoisted_1 = { class: "
|
|
526
|
-
const _hoisted_2 = { class: "
|
|
527
|
-
const _hoisted_3 = { class: "
|
|
603
|
+
const _hoisted_1 = { class: "dt-message-input__bottom-section" };
|
|
604
|
+
const _hoisted_2 = { class: "dt-message-input__bottom-section-left" };
|
|
605
|
+
const _hoisted_3 = { class: "dt-message-input__bottom-section-right" };
|
|
528
606
|
const _hoisted_4 = { key: 0 };
|
|
529
607
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
608
|
+
var _a, _b;
|
|
530
609
|
const _component_dt_rich_text_editor = resolveComponent("dt-rich-text-editor");
|
|
531
610
|
const _component_dt_icon = resolveComponent("dt-icon");
|
|
532
611
|
const _component_dt_button = resolveComponent("dt-button");
|
|
533
612
|
const _component_dt_input = resolveComponent("dt-input");
|
|
534
|
-
const _component_dt_tooltip = resolveComponent("dt-tooltip");
|
|
535
613
|
const _component_dt_emoji_picker = resolveComponent("dt-emoji-picker");
|
|
536
614
|
const _component_dt_popover = resolveComponent("dt-popover");
|
|
615
|
+
const _component_dt_tooltip = resolveComponent("dt-tooltip");
|
|
537
616
|
const _directive_dt_tooltip = resolveDirective("dt-tooltip");
|
|
538
617
|
return openBlock(), createElementBlock("div", {
|
|
539
618
|
"data-qa": "dt-message-input",
|
|
540
619
|
role: "presentation",
|
|
541
|
-
class: normalizeClass([
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
"d-baw1",
|
|
546
|
-
"d-ba",
|
|
547
|
-
"d-c-text",
|
|
548
|
-
{ "d-bc-bold d-bs-sm": $data.hasFocus, "d-bc-default": !$data.hasFocus }
|
|
549
|
-
]),
|
|
550
|
-
onClick: _cache[15] || (_cache[15] = ($event) => {
|
|
551
|
-
var _a;
|
|
552
|
-
return (_a = _ctx.$refs.richTextEditor) == null ? void 0 : _a.focusEditor();
|
|
620
|
+
class: normalizeClass(["dt-message-input", { "dt-message-input--focused": $data.hasFocus }]),
|
|
621
|
+
onClick: _cache[10] || (_cache[10] = ($event) => {
|
|
622
|
+
var _a2;
|
|
623
|
+
return (_a2 = _ctx.$refs.richTextEditor) == null ? void 0 : _a2.focusEditor();
|
|
553
624
|
}),
|
|
554
|
-
onDragEnter: _cache[
|
|
555
|
-
onDragOver: _cache[
|
|
556
|
-
onDrop: _cache[
|
|
557
|
-
onKeydown: _cache[
|
|
558
|
-
onPaste: _cache[
|
|
625
|
+
onDragEnter: _cache[11] || (_cache[11] = (...args) => $options.onDrag && $options.onDrag(...args)),
|
|
626
|
+
onDragOver: _cache[12] || (_cache[12] = (...args) => $options.onDrag && $options.onDrag(...args)),
|
|
627
|
+
onDrop: _cache[13] || (_cache[13] = (...args) => $options.onDrop && $options.onDrop(...args)),
|
|
628
|
+
onKeydown: _cache[14] || (_cache[14] = withKeys(withModifiers((...args) => $options.onSend && $options.onSend(...args), ["exact"]), ["enter"])),
|
|
629
|
+
onPaste: _cache[15] || (_cache[15] = (...args) => $options.onPaste && $options.onPaste(...args))
|
|
559
630
|
}, [
|
|
560
631
|
createElementVNode("div", {
|
|
561
|
-
class: "
|
|
632
|
+
class: "dt-message-input__editor-wrapper",
|
|
562
633
|
style: normalizeStyle({ "max-height": $props.maxHeight })
|
|
563
634
|
}, [
|
|
564
635
|
createVNode(_component_dt_rich_text_editor, mergeProps({
|
|
@@ -579,64 +650,58 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
579
650
|
"auto-focus": $props.autoFocus,
|
|
580
651
|
link: $props.link,
|
|
581
652
|
placeholder: $props.placeholder,
|
|
653
|
+
"prevent-typing": $props.preventTyping,
|
|
582
654
|
"mention-suggestion": $props.mentionSuggestion,
|
|
583
655
|
"channel-suggestion": $props.channelSuggestion,
|
|
584
|
-
"slash-command-suggestion": $props.slashCommandSuggestion
|
|
656
|
+
"slash-command-suggestion": $props.slashCommandSuggestion,
|
|
657
|
+
"additional-extensions": $data.additionalExtensions
|
|
585
658
|
}, _ctx.$attrs, {
|
|
586
659
|
onFocus: $options.onFocus,
|
|
587
660
|
onBlur: $options.onBlur,
|
|
588
|
-
onInput:
|
|
589
|
-
|
|
590
|
-
}), null, 16, ["modelValue", "allow-blockquote", "allow-bold", "allow-bullet-list", "allow-codeblock", "allow-italic", "allow-strike", "allow-underline", "editable", "input-aria-label", "input-class", "output-format", "auto-focus", "link", "placeholder", "mention-suggestion", "channel-suggestion", "slash-command-suggestion", "onFocus", "onBlur", "onSelectedCommand"])
|
|
661
|
+
onInput: $options.onInput
|
|
662
|
+
}), null, 16, ["modelValue", "allow-blockquote", "allow-bold", "allow-bullet-list", "allow-codeblock", "allow-italic", "allow-strike", "allow-underline", "editable", "input-aria-label", "input-class", "output-format", "auto-focus", "link", "placeholder", "prevent-typing", "mention-suggestion", "channel-suggestion", "slash-command-suggestion", "additional-extensions", "onFocus", "onBlur", "onInput"])
|
|
591
663
|
], 4),
|
|
592
664
|
renderSlot(_ctx.$slots, "middle"),
|
|
593
665
|
createElementVNode("section", _hoisted_1, [
|
|
594
666
|
createElementVNode("div", _hoisted_2, [
|
|
595
|
-
$props.showImagePicker ? (openBlock(), createBlock(
|
|
667
|
+
$props.showImagePicker ? withDirectives((openBlock(), createBlock(_component_dt_button, {
|
|
596
668
|
key: 0,
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
669
|
+
"data-qa": "dt-message-input-image-btn",
|
|
670
|
+
size: "sm",
|
|
671
|
+
circle: "",
|
|
672
|
+
kind: $data.imagePickerFocus ? "default" : "muted",
|
|
673
|
+
importance: "clear",
|
|
674
|
+
"aria-label": $props.showImagePicker.ariaLabel,
|
|
675
|
+
onClick: $options.onSelectImage,
|
|
676
|
+
onMouseenter: _cache[1] || (_cache[1] = ($event) => $data.imagePickerFocus = true),
|
|
677
|
+
onMouseleave: _cache[2] || (_cache[2] = ($event) => $data.imagePickerFocus = false),
|
|
678
|
+
onFocus: _cache[3] || (_cache[3] = ($event) => $data.imagePickerFocus = true),
|
|
679
|
+
onBlur: _cache[4] || (_cache[4] = ($event) => $data.imagePickerFocus = false)
|
|
600
680
|
}, {
|
|
601
|
-
|
|
602
|
-
createVNode(
|
|
603
|
-
|
|
604
|
-
size: "
|
|
605
|
-
|
|
606
|
-
kind: $data.imagePickerFocus ? "default" : "muted",
|
|
607
|
-
importance: "clear",
|
|
608
|
-
"aria-label": $props.showImagePicker.ariaLabel,
|
|
609
|
-
onClick: $options.onSelectImage,
|
|
610
|
-
onMouseenter: _cache[2] || (_cache[2] = ($event) => $data.imagePickerFocus = true),
|
|
611
|
-
onMouseleave: _cache[3] || (_cache[3] = ($event) => $data.imagePickerFocus = false),
|
|
612
|
-
onFocus: _cache[4] || (_cache[4] = ($event) => $data.imagePickerFocus = true),
|
|
613
|
-
onBlur: _cache[5] || (_cache[5] = ($event) => $data.imagePickerFocus = false)
|
|
614
|
-
}, {
|
|
615
|
-
icon: withCtx(() => [
|
|
616
|
-
createVNode(_component_dt_icon, {
|
|
617
|
-
name: "image",
|
|
618
|
-
size: "300"
|
|
619
|
-
})
|
|
620
|
-
]),
|
|
621
|
-
_: 1
|
|
622
|
-
}, 8, ["kind", "aria-label", "onClick"]),
|
|
623
|
-
createVNode(_component_dt_input, {
|
|
624
|
-
ref: "messageInputImageUpload",
|
|
625
|
-
"data-qa": "dt-message-input-image-input",
|
|
626
|
-
accept: "image/*, video/*",
|
|
627
|
-
type: "file",
|
|
628
|
-
class: "d-ps-absolute",
|
|
629
|
-
multiple: "",
|
|
630
|
-
hidden: "",
|
|
631
|
-
onInput: $options.onImageUpload
|
|
632
|
-
}, null, 8, ["onInput"])
|
|
681
|
+
icon: withCtx(() => [
|
|
682
|
+
createVNode(_component_dt_icon, {
|
|
683
|
+
name: "image",
|
|
684
|
+
size: "300"
|
|
685
|
+
})
|
|
633
686
|
]),
|
|
634
687
|
_: 1
|
|
635
|
-
}, 8, ["
|
|
688
|
+
}, 8, ["kind", "aria-label", "onClick"])), [
|
|
689
|
+
[_directive_dt_tooltip, (_a = $props.showImagePicker) == null ? void 0 : _a.tooltipLabel, "top-start"]
|
|
690
|
+
]) : createCommentVNode("", true),
|
|
691
|
+
createVNode(_component_dt_input, {
|
|
692
|
+
ref: "messageInputImageUpload",
|
|
693
|
+
"data-qa": "dt-message-input-image-input",
|
|
694
|
+
accept: "image/*, video/*",
|
|
695
|
+
type: "file",
|
|
696
|
+
class: "dt-message-input__image-input",
|
|
697
|
+
multiple: "",
|
|
698
|
+
hidden: "",
|
|
699
|
+
onInput: $options.onImageUpload
|
|
700
|
+
}, null, 8, ["onInput"]),
|
|
636
701
|
$props.showEmojiPicker ? (openBlock(), createBlock(_component_dt_popover, {
|
|
637
702
|
key: 1,
|
|
638
703
|
open: $data.emojiPickerOpened,
|
|
639
|
-
"onUpdate:open": _cache[
|
|
704
|
+
"onUpdate:open": _cache[9] || (_cache[9] = ($event) => $data.emojiPickerOpened = $event),
|
|
640
705
|
"data-qa": "dt-message-input-emoji-picker-popover",
|
|
641
706
|
"initial-focus-element": "#searchInput",
|
|
642
707
|
padding: "none"
|
|
@@ -650,10 +715,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
650
715
|
importance: "clear",
|
|
651
716
|
"aria-label": $props.emojiButtonAriaLabel,
|
|
652
717
|
onClick: $options.toggleEmojiPicker,
|
|
653
|
-
onMouseenter: _cache[
|
|
654
|
-
onMouseleave: _cache[
|
|
655
|
-
onFocus: _cache[
|
|
656
|
-
onBlur: _cache[
|
|
718
|
+
onMouseenter: _cache[5] || (_cache[5] = ($event) => $data.emojiPickerFocus = true),
|
|
719
|
+
onMouseleave: _cache[6] || (_cache[6] = ($event) => $data.emojiPickerFocus = false),
|
|
720
|
+
onFocus: _cache[7] || (_cache[7] = ($event) => $data.emojiPickerFocus = true),
|
|
721
|
+
onBlur: _cache[8] || (_cache[8] = ($event) => $data.emojiPickerFocus = false)
|
|
657
722
|
}), {
|
|
658
723
|
icon: withCtx(() => [
|
|
659
724
|
createVNode(_component_dt_icon, {
|
|
@@ -682,7 +747,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
682
747
|
createElementVNode("div", _hoisted_3, [
|
|
683
748
|
Boolean($props.showCharacterLimit) ? (openBlock(), createBlock(_component_dt_tooltip, {
|
|
684
749
|
key: 0,
|
|
685
|
-
class: "dt-message-
|
|
750
|
+
class: "dt-message-input__remaining-char-tooltip",
|
|
686
751
|
placement: "top-end",
|
|
687
752
|
enabled: $options.characterLimitTooltipEnabled,
|
|
688
753
|
message: $props.showCharacterLimit.message,
|
|
@@ -690,7 +755,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
690
755
|
}, {
|
|
691
756
|
anchor: withCtx(() => [
|
|
692
757
|
withDirectives(createElementVNode("p", {
|
|
693
|
-
class: "
|
|
758
|
+
class: "dt-message-input__remaining-char",
|
|
694
759
|
"data-qa": "dt-message-input-character-limit"
|
|
695
760
|
}, toDisplayString($props.showCharacterLimit.count - $options.inputLength), 513), [
|
|
696
761
|
[vShow, $options.displayCharacterLimitWarning]
|
|
@@ -701,7 +766,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
701
766
|
$props.showCancel ? (openBlock(), createBlock(_component_dt_button, {
|
|
702
767
|
key: 1,
|
|
703
768
|
"data-qa": "dt-message-input-cancel-button",
|
|
704
|
-
class: "dt-message-
|
|
769
|
+
class: "dt-message-input__cancel-button",
|
|
705
770
|
size: "sm",
|
|
706
771
|
kind: "muted",
|
|
707
772
|
importance: "clear",
|
|
@@ -713,53 +778,40 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
713
778
|
]),
|
|
714
779
|
_: 1
|
|
715
780
|
}, 8, ["aria-label", "onClick"])) : createCommentVNode("", true),
|
|
716
|
-
$props.showSend ? (openBlock(), createBlock(
|
|
781
|
+
$props.showSend ? withDirectives((openBlock(), createBlock(_component_dt_button, {
|
|
717
782
|
key: 2,
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
size: "sm",
|
|
728
|
-
kind: "default",
|
|
729
|
-
importance: "primary",
|
|
730
|
-
class: normalizeClass([
|
|
731
|
-
{
|
|
732
|
-
"message-input-button__disabled d-fc-muted": $options.isSendDisabled,
|
|
733
|
-
"d-btn--circle": $props.showSend.icon
|
|
734
|
-
}
|
|
735
|
-
]),
|
|
736
|
-
"aria-label": $props.showSend.ariaLabel,
|
|
737
|
-
"aria-disabled": $options.isSendDisabled,
|
|
738
|
-
onClick: $options.onSend,
|
|
739
|
-
onMouseenter: _cache[11] || (_cache[11] = ($event) => $data.sendButtonFocus = true),
|
|
740
|
-
onMouseleave: _cache[12] || (_cache[12] = ($event) => $data.sendButtonFocus = false),
|
|
741
|
-
onFocus: _cache[13] || (_cache[13] = ($event) => $data.sendButtonFocus = true),
|
|
742
|
-
onBlur: _cache[14] || (_cache[14] = ($event) => $data.sendButtonFocus = false)
|
|
743
|
-
}, createSlots({
|
|
744
|
-
default: withCtx(() => [
|
|
745
|
-
$props.showSend.text ? (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString($props.showSend.text), 1)) : createCommentVNode("", true)
|
|
746
|
-
]),
|
|
747
|
-
_: 2
|
|
748
|
-
}, [
|
|
749
|
-
$props.showSend.icon ? {
|
|
750
|
-
name: "icon",
|
|
751
|
-
fn: withCtx(() => [
|
|
752
|
-
createVNode(_component_dt_icon, {
|
|
753
|
-
name: $props.showSend.icon,
|
|
754
|
-
size: "300"
|
|
755
|
-
}, null, 8, ["name"])
|
|
756
|
-
]),
|
|
757
|
-
key: "0"
|
|
758
|
-
} : void 0
|
|
759
|
-
]), 1032, ["class", "aria-label", "aria-disabled", "onClick"])
|
|
783
|
+
"data-qa": "dt-message-input-send-btn",
|
|
784
|
+
size: "sm",
|
|
785
|
+
kind: "default",
|
|
786
|
+
importance: "primary",
|
|
787
|
+
class: normalizeClass([
|
|
788
|
+
{
|
|
789
|
+
"dt-message-input__send-button--disabled": $options.isSendDisabled,
|
|
790
|
+
"d-btn--circle": $props.showSend.icon
|
|
791
|
+
}
|
|
760
792
|
]),
|
|
761
|
-
|
|
762
|
-
|
|
793
|
+
"aria-label": $props.showSend.ariaLabel,
|
|
794
|
+
"aria-disabled": $options.isSendDisabled,
|
|
795
|
+
onClick: $options.onSend
|
|
796
|
+
}, createSlots({
|
|
797
|
+
default: withCtx(() => [
|
|
798
|
+
$props.showSend.text ? (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString($props.showSend.text), 1)) : createCommentVNode("", true)
|
|
799
|
+
]),
|
|
800
|
+
_: 2
|
|
801
|
+
}, [
|
|
802
|
+
$props.showSend.icon ? {
|
|
803
|
+
name: "icon",
|
|
804
|
+
fn: withCtx(() => [
|
|
805
|
+
createVNode(_component_dt_icon, {
|
|
806
|
+
name: $props.showSend.icon,
|
|
807
|
+
size: "300"
|
|
808
|
+
}, null, 8, ["name"])
|
|
809
|
+
]),
|
|
810
|
+
key: "0"
|
|
811
|
+
} : void 0
|
|
812
|
+
]), 1032, ["class", "aria-label", "aria-disabled", "onClick"])), [
|
|
813
|
+
[_directive_dt_tooltip, (_b = $props.showSend) == null ? void 0 : _b.tooltipLabel, "top-end"]
|
|
814
|
+
]) : createCommentVNode("", true)
|
|
763
815
|
])
|
|
764
816
|
])
|
|
765
817
|
], 34);
|