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