@dialpad/dialtone 9.64.1 → 9.65.1
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/chunks/tokens-base-dark--ozK7f0P.js +4 -0
- package/dist/chunks/tokens-base-dark-V8E4WaJI.js +1 -0
- package/dist/chunks/tokens-base-light-LYlvM3eZ.js +1 -0
- package/dist/chunks/tokens-base-light-ljPrpLe2.js +4 -0
- package/dist/css/dialtone-default-theme.css +178 -92
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone.css +129 -43
- package/dist/css/dialtone.min.css +1 -1
- package/dist/css/tokens/tokens-base-dark.css +5 -5
- package/dist/css/tokens/tokens-base-light.css +5 -5
- package/dist/css/tokens/tokens-dp-dark.css +44 -44
- package/dist/css/tokens/tokens-dp-light.css +44 -44
- package/dist/css/tokens/tokens-expressive-dark.css +50 -50
- package/dist/css/tokens/tokens-expressive-light.css +50 -50
- package/dist/css/tokens/tokens-expressive-sm-dark.css +50 -50
- package/dist/css/tokens/tokens-expressive-sm-light.css +50 -50
- package/dist/css/tokens/tokens-tmo-dark.css +44 -44
- package/dist/css/tokens/tokens-tmo-light.css +44 -44
- package/dist/themes/dp-dark.cjs +1 -1
- package/dist/themes/dp-dark.js +2 -2
- package/dist/themes/dp-light.cjs +1 -1
- package/dist/themes/dp-light.js +2 -2
- package/dist/themes/expressive-dark.cjs +1 -1
- package/dist/themes/expressive-dark.js +2 -2
- package/dist/themes/expressive-light.cjs +1 -1
- package/dist/themes/expressive-light.js +2 -2
- package/dist/themes/expressive-sm-dark.cjs +1 -1
- package/dist/themes/expressive-sm-dark.js +2 -2
- package/dist/themes/expressive-sm-light.cjs +1 -1
- package/dist/themes/expressive-sm-light.js +2 -2
- package/dist/themes/tmo-dark.cjs +1 -1
- package/dist/themes/tmo-dark.js +2 -2
- package/dist/themes/tmo-light.cjs +1 -1
- package/dist/themes/tmo-light.js +2 -2
- package/dist/tokens/css/tokens-base-dark.css +5 -5
- package/dist/tokens/css/tokens-base-light.css +5 -5
- package/dist/tokens/css/tokens-dp-dark.css +44 -44
- package/dist/tokens/css/tokens-dp-light.css +44 -44
- package/dist/tokens/css/tokens-expressive-dark.css +50 -50
- package/dist/tokens/css/tokens-expressive-light.css +50 -50
- package/dist/tokens/css/tokens-expressive-sm-dark.css +50 -50
- package/dist/tokens/css/tokens-expressive-sm-light.css +50 -50
- package/dist/tokens/css/tokens-tmo-dark.css +44 -44
- package/dist/tokens/css/tokens-tmo-light.css +44 -44
- package/dist/tokens/doc.json +8314 -8314
- package/dist/tokens/less/tokens-base-dark.less +5 -5
- package/dist/tokens/less/tokens-base-light.less +5 -5
- package/dist/tokens/less/tokens-dp-dark.less +44 -44
- package/dist/tokens/less/tokens-dp-light.less +44 -44
- package/dist/tokens/less/tokens-expressive-dark.less +50 -50
- package/dist/tokens/less/tokens-expressive-light.less +50 -50
- package/dist/tokens/less/tokens-expressive-sm-dark.less +50 -50
- package/dist/tokens/less/tokens-expressive-sm-light.less +50 -50
- package/dist/tokens/less/tokens-tmo-dark.less +44 -44
- package/dist/tokens/less/tokens-tmo-light.less +44 -44
- package/dist/tokens/tokens-base-dark.json +5 -5
- package/dist/tokens/tokens-base-light.json +5 -5
- package/dist/tokens/tokens-dp-dark.json +44 -44
- package/dist/tokens/tokens-dp-light.json +44 -44
- package/dist/tokens/tokens-expressive-dark.json +50 -50
- package/dist/tokens/tokens-expressive-light.json +50 -50
- package/dist/tokens/tokens-expressive-sm-dark.json +50 -50
- package/dist/tokens/tokens-expressive-sm-light.json +50 -50
- package/dist/tokens/tokens-tmo-dark.json +44 -44
- package/dist/tokens/tokens-tmo-light.json +44 -44
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/dialtone-vue.cjs +1 -1
- package/dist/vue2/dialtone-vue.js +1 -1
- package/dist/vue2/lib/contact-centers-row.cjs +17 -9
- package/dist/vue2/lib/contact-centers-row.cjs.map +1 -1
- package/dist/vue2/lib/contact-centers-row.js +17 -9
- package/dist/vue2/lib/contact-centers-row.js.map +1 -1
- package/dist/vue2/lib/message-input.cjs +13 -6
- package/dist/vue2/lib/message-input.cjs.map +1 -1
- package/dist/vue2/lib/message-input.js +13 -6
- package/dist/vue2/lib/message-input.js.map +1 -1
- package/dist/vue2/lib/rich-text-editor.cjs +8 -14
- package/dist/vue2/lib/rich-text-editor.cjs.map +1 -1
- package/dist/vue2/lib/rich-text-editor.js +8 -14
- package/dist/vue2/lib/rich-text-editor.js.map +1 -1
- package/dist/vue2/lib/stack.cjs +51 -14
- package/dist/vue2/lib/stack.cjs.map +1 -1
- package/dist/vue2/lib/stack.js +52 -15
- package/dist/vue2/lib/stack.js.map +1 -1
- package/dist/vue2/style.css +62 -57
- package/dist/vue2/types/components/rich_text_editor/extensions/custom_link/custom_link.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +4 -2
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/stack/utils.d.ts +2 -2
- package/dist/vue2/types/components/stack/utils.d.ts.map +1 -1
- package/dist/vue2/types/components/stack/validators.d.ts +1 -1
- package/dist/vue2/types/components/stack/validators.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +15 -0
- package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/dialtone-vue.cjs +1 -1
- package/dist/vue3/dialtone-vue.js +1 -1
- package/dist/vue3/lib/contact-centers-row.cjs +21 -10
- package/dist/vue3/lib/contact-centers-row.cjs.map +1 -1
- package/dist/vue3/lib/contact-centers-row.js +21 -10
- package/dist/vue3/lib/contact-centers-row.js.map +1 -1
- package/dist/vue3/lib/message-input.cjs +13 -14
- package/dist/vue3/lib/message-input.cjs.map +1 -1
- package/dist/vue3/lib/message-input.js +14 -15
- package/dist/vue3/lib/message-input.js.map +1 -1
- package/dist/vue3/lib/rich-text-editor.cjs +11 -16
- package/dist/vue3/lib/rich-text-editor.cjs.map +1 -1
- package/dist/vue3/lib/rich-text-editor.js +11 -16
- package/dist/vue3/lib/rich-text-editor.js.map +1 -1
- package/dist/vue3/lib/stack.cjs +51 -14
- package/dist/vue3/lib/stack.cjs.map +1 -1
- package/dist/vue3/lib/stack.js +52 -15
- package/dist/vue3/lib/stack.js.map +1 -1
- package/dist/vue3/style.css +62 -57
- package/dist/vue3/types/components/rich_text_editor/extensions/custom_link/custom_link.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +4 -2
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/stack/utils.d.ts +2 -2
- package/dist/vue3/types/components/stack/utils.d.ts.map +1 -1
- package/dist/vue3/types/components/stack/validators.d.ts +1 -1
- package/dist/vue3/types/components/stack/validators.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +15 -0
- package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/chunks/tokens-base-dark-BC3U5KoN.js +0 -4
- package/dist/chunks/tokens-base-dark-zbBpWlfP.js +0 -1
- package/dist/chunks/tokens-base-light-PCrr7t8W.js +0 -4
- package/dist/chunks/tokens-base-light-dvWvBHbM.js +0 -1
|
@@ -128,8 +128,8 @@ require("@tiptap/suggestion");
|
|
|
128
128
|
require("@tiptap/extension-mention");
|
|
129
129
|
require("@dialpad/dialtone-icons/vue2/hash");
|
|
130
130
|
require("@dialpad/dialtone-icons/vue2/lock");
|
|
131
|
-
require("@dialpad/dialtone-icons/vue2/headphones");
|
|
132
131
|
require("@dialpad/dialtone-icons/vue2/chevron-down");
|
|
132
|
+
require("@dialpad/dialtone-icons/vue2/headphones");
|
|
133
133
|
exports.DEFAULT_VALIDATION_MESSAGE_TYPE = common_constants.DEFAULT_VALIDATION_MESSAGE_TYPE;
|
|
134
134
|
exports.DESCRIPTION_SIZE_TYPES = common_constants.DESCRIPTION_SIZE_TYPES;
|
|
135
135
|
exports.VALIDATION_MESSAGE_TYPES = common_constants.VALIDATION_MESSAGE_TYPES;
|
|
@@ -126,8 +126,8 @@ import "@tiptap/suggestion";
|
|
|
126
126
|
import "@tiptap/extension-mention";
|
|
127
127
|
import "@dialpad/dialtone-icons/vue2/hash";
|
|
128
128
|
import "@dialpad/dialtone-icons/vue2/lock";
|
|
129
|
-
import "@dialpad/dialtone-icons/vue2/headphones";
|
|
130
129
|
import "@dialpad/dialtone-icons/vue2/chevron-down";
|
|
130
|
+
import "@dialpad/dialtone-icons/vue2/headphones";
|
|
131
131
|
export {
|
|
132
132
|
AVATAR_COLORS,
|
|
133
133
|
AVATAR_GROUP_VALIDATOR,
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const DtIconHeadphones = require("@dialpad/dialtone-icons/vue2/headphones");
|
|
4
|
-
const DtIconChevronDown = require("@dialpad/dialtone-icons/vue2/chevron-down");
|
|
5
|
-
const lib_emojiTextWrapper = require("./emoji-text-wrapper.cjs");
|
|
6
3
|
const common_utils = require("../common/utils.cjs");
|
|
4
|
+
const lib_emojiTextWrapper = require("./emoji-text-wrapper.cjs");
|
|
5
|
+
const DtIconChevronDown = require("@dialpad/dialtone-icons/vue2/chevron-down");
|
|
6
|
+
const DtIconHeadphones = require("@dialpad/dialtone-icons/vue2/headphones");
|
|
7
7
|
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-1aBeR4AK.js");
|
|
8
8
|
const lib_button = require("./button.cjs");
|
|
9
9
|
const lib_badge = require("./badge.cjs");
|
|
10
|
+
require("../common/constants.cjs");
|
|
11
|
+
require("vue");
|
|
10
12
|
require("../chunks/index-anN_sx1F.js");
|
|
11
13
|
require("emoji-toolkit/emoji_strategy.json");
|
|
12
14
|
require("../chunks/icon_constants-QYpmdE0R.js");
|
|
13
15
|
require("@dialpad/dialtone-icons/icons.json");
|
|
14
16
|
require("./emoji.cjs");
|
|
15
17
|
require("./skeleton.cjs");
|
|
16
|
-
require("../common/constants.cjs");
|
|
17
|
-
require("vue");
|
|
18
18
|
require("../chunks/link_constants-x8NwdqmA.js");
|
|
19
19
|
require("./icon.cjs");
|
|
20
20
|
require("@dialpad/dialtone-icons/vue2");
|
|
21
21
|
const _sfc_main = {
|
|
22
|
-
name: "
|
|
22
|
+
name: "DtRecipeContactCentersRow",
|
|
23
23
|
components: {
|
|
24
24
|
DtButton: lib_button.DtButton,
|
|
25
25
|
DtBadge: lib_badge.DtBadge,
|
|
@@ -50,6 +50,13 @@ const _sfc_main = {
|
|
|
50
50
|
type: Boolean,
|
|
51
51
|
default: false
|
|
52
52
|
},
|
|
53
|
+
/**
|
|
54
|
+
* Making this true will hide the unread count badge, the chevron button, and the right slot
|
|
55
|
+
*/
|
|
56
|
+
hideActions: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false
|
|
59
|
+
},
|
|
53
60
|
/**
|
|
54
61
|
* Number of unread messages
|
|
55
62
|
*/
|
|
@@ -107,7 +114,8 @@ const _sfc_main = {
|
|
|
107
114
|
watch: {
|
|
108
115
|
$props: {
|
|
109
116
|
deep: true,
|
|
110
|
-
handler() {
|
|
117
|
+
async handler() {
|
|
118
|
+
await this.$nextTick();
|
|
111
119
|
this.adjustLabelWidth();
|
|
112
120
|
}
|
|
113
121
|
}
|
|
@@ -136,7 +144,7 @@ var _sfc_render = function render() {
|
|
|
136
144
|
return _c("div", { class: [
|
|
137
145
|
"dt-leftbar-row__container",
|
|
138
146
|
{ "dt-leftbar-row__container--off-duty": _vm.$slots.timer }
|
|
139
|
-
] }, [_c("div", { class: _vm.leftbarContactCentersRowClasses, attrs: { "data-qa": "dt-recipe-contact-centers-row" } }, [_c("a", _vm._g(_vm._b({ staticClass: "dt-leftbar-row__primary", attrs: { "data-qa": _vm.$attrs["data-qa"] ?? "dt-leftbar-row-link", "aria-label": _vm.getAriaLabel, "title": _vm.description, "href": _vm.$attrs.href ?? "javascript:void(0)" } }, "a", _vm.$attrs, false), _vm.$listeners), [_c("div", { staticClass: "dt-leftbar-row__alpha" }, [_c("dt-icon-headphones", { attrs: { "size": "300", "data-qa": "dt-leftbar-row-icon" } })], 1), _c("div", { staticClass: "dt-leftbar-row__label", style: `flex-basis: ${_vm.labelWidth}` }, [_c("dt-emoji-text-wrapper", { staticClass: "dt-leftbar-row__description", attrs: { "data-qa": "dt-leftbar-row-description", "size": "200" } }, [_vm._v(" " + _vm._s(_vm.description) + " ")])], 1)]), _c("div", { staticClass: "dt-leftbar-row__omega" }, [_vm._t("right"), _c("div", { staticClass: "dt-leftbar-row__action-container" }, [_vm.showUnreadCount ? _c("dt-badge", { staticClass: "dt-leftbar-row__unread-badge", attrs: { "data-qa": "dt-leftbar-row-unread-badge", "kind": "count", "type": "bulletin" } }, [_vm._v(" " + _vm._s(_vm.unreadCount) + " ")]) : _vm._e(), _c("dt-button", { staticClass: "dt-leftbar-row__action", attrs: { "data-qa": "dt-leftbar-row-action-button", "aria-label": _vm.menuButtonAriaLabel, "importance": "clear", "size": "xs", "circle": "" }, on: { "click": function($event) {
|
|
147
|
+
] }, [_c("div", { class: _vm.leftbarContactCentersRowClasses, attrs: { "data-qa": "dt-recipe-contact-centers-row" } }, [_c("a", _vm._g(_vm._b({ staticClass: "dt-leftbar-row__primary", attrs: { "data-qa": _vm.$attrs["data-qa"] ?? "dt-leftbar-row-link", "aria-label": _vm.getAriaLabel, "title": _vm.description, "href": _vm.$attrs.href ?? "javascript:void(0)" } }, "a", _vm.$attrs, false), _vm.$listeners), [_c("div", { staticClass: "dt-leftbar-row__alpha" }, [_c("dt-icon-headphones", { attrs: { "size": "300", "data-qa": "dt-leftbar-row-icon" } })], 1), _c("div", { staticClass: "dt-leftbar-row__label", style: `flex-basis: ${_vm.labelWidth}` }, [_c("dt-emoji-text-wrapper", { staticClass: "dt-leftbar-row__description", attrs: { "data-qa": "dt-leftbar-row-description", "size": "200" } }, [_vm._v(" " + _vm._s(_vm.description) + " ")])], 1)]), _c("div", { directives: [{ name: "show", rawName: "v-show", value: !_vm.hideActions, expression: "!hideActions" }], staticClass: "dt-leftbar-row__omega" }, [_vm._t("right"), _c("div", { staticClass: "dt-leftbar-row__action-container" }, [_vm.showUnreadCount ? _c("dt-badge", { staticClass: "dt-leftbar-row__unread-badge", attrs: { "data-qa": "dt-leftbar-row-unread-badge", "kind": "count", "type": "bulletin" } }, [_vm._v(" " + _vm._s(_vm.unreadCount) + " ")]) : _vm._e(), _c("dt-button", { staticClass: "dt-leftbar-row__action", attrs: { "data-qa": "dt-leftbar-row-action-button", "aria-label": _vm.menuButtonAriaLabel, "importance": "clear", "size": "xs", "circle": "" }, on: { "click": function($event) {
|
|
140
148
|
$event.stopPropagation();
|
|
141
149
|
return _vm.$emit("click-menu", $event);
|
|
142
150
|
} }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
@@ -150,7 +158,7 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
|
150
158
|
_sfc_staticRenderFns,
|
|
151
159
|
false,
|
|
152
160
|
null,
|
|
153
|
-
"
|
|
161
|
+
"aeb8c657",
|
|
154
162
|
null,
|
|
155
163
|
null
|
|
156
164
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-centers-row.cjs","sources":["../../recipes/leftbar/contact_centers_row/contact_centers_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'dt-leftbar-row__container',\n { 'dt-leftbar-row__container--off-duty': $slots.timer },\n ]\"\n >\n <div\n :class=\"leftbarContactCentersRowClasses\"\n data-qa=\"dt-recipe-contact-centers-row\"\n >\n <a\n class=\"dt-leftbar-row__primary\"\n :data-qa=\"$attrs['data-qa'] ?? 'dt-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"$attrs.href ?? 'javascript:void(0)'\"\n v-bind=\"$attrs\"\n v-on=\"$listeners\"\n >\n <div class=\"dt-leftbar-row__alpha\">\n <dt-icon-headphones\n size=\"300\"\n data-qa=\"dt-leftbar-row-icon\"\n />\n </div>\n <div\n class=\"dt-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <dt-emoji-text-wrapper\n class=\"dt-leftbar-row__description\"\n data-qa=\"dt-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </div>\n </a>\n <div
|
|
1
|
+
{"version":3,"file":"contact-centers-row.cjs","sources":["../../recipes/leftbar/contact_centers_row/contact_centers_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'dt-leftbar-row__container',\n { 'dt-leftbar-row__container--off-duty': $slots.timer },\n ]\"\n >\n <div\n :class=\"leftbarContactCentersRowClasses\"\n data-qa=\"dt-recipe-contact-centers-row\"\n >\n <a\n class=\"dt-leftbar-row__primary\"\n :data-qa=\"$attrs['data-qa'] ?? 'dt-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"$attrs.href ?? 'javascript:void(0)'\"\n v-bind=\"$attrs\"\n v-on=\"$listeners\"\n >\n <div class=\"dt-leftbar-row__alpha\">\n <dt-icon-headphones\n size=\"300\"\n data-qa=\"dt-leftbar-row-icon\"\n />\n </div>\n <div\n class=\"dt-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <dt-emoji-text-wrapper\n class=\"dt-leftbar-row__description\"\n data-qa=\"dt-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </div>\n </a>\n <div\n v-show=\"!hideActions\"\n class=\"dt-leftbar-row__omega\"\n >\n <slot name=\"right\" />\n <div class=\"dt-leftbar-row__action-container\">\n <dt-badge\n v-if=\"showUnreadCount\"\n class=\"dt-leftbar-row__unread-badge\"\n data-qa=\"dt-leftbar-row-unread-badge\"\n kind=\"count\"\n type=\"bulletin\"\n >\n {{ unreadCount }}\n </dt-badge>\n <dt-button\n class=\"dt-leftbar-row__action\"\n data-qa=\"dt-leftbar-row-action-button\"\n :aria-label=\"menuButtonAriaLabel\"\n importance=\"clear\"\n size=\"xs\"\n circle\n @click.stop=\"$emit('click-menu', $event)\"\n >\n <template #icon>\n <dt-icon-chevron-down size=\"100\" />\n </template>\n </dt-button>\n </div>\n </div>\n </div>\n <div class=\"dt-leftbar-row__bottom\">\n <slot name=\"timer\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { safeConcatStrings } from '@/common/utils';\nimport { DtBadge } from '@/components/badge';\nimport { DtButton } from '@/components/button';\nimport DtEmojiTextWrapper from '@/components/emoji_text_wrapper/emoji_text_wrapper.vue';\nimport DtIconChevronDown from '@dialpad/dialtone-icons/vue2/chevron-down';\nimport DtIconHeadphones from '@dialpad/dialtone-icons/vue2/headphones';\n\nexport default {\n name: 'DtRecipeContactCentersRow',\n\n components: {\n DtButton,\n DtBadge,\n DtEmojiTextWrapper,\n DtIconHeadphones,\n DtIconChevronDown,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Will be read out by a screen reader upon focus of this row. If not defined \"description\" will be read.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Text displayed next to the icon. Required.\n */\n description: {\n type: String,\n required: true,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Making this true will hide the unread count badge, the chevron button, and the right slot\n */\n hideActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages\n */\n unreadCount: {\n type: Number,\n default: 0,\n },\n\n /**\n * Aria label for the menu button.\n */\n menuButtonAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Menu button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click-menu',\n ],\n\n data () {\n return {\n labelWidth: 'auto',\n };\n },\n\n computed: {\n leftbarContactCentersRowClasses () {\n return [\n 'dt-leftbar-row',\n 'dt-leftbar-row--contact-centers',\n {\n 'dt-leftbar-row--unread-count': this.showUnreadCount,\n 'dt-leftbar-row--selected': this.selected,\n },\n ];\n },\n\n getAriaLabel () {\n return this.ariaLabel\n ? this.ariaLabel\n : safeConcatStrings([this.description, this.unreadCountTooltip]);\n },\n\n showUnreadCount () {\n return this.unreadCount > 0;\n },\n },\n\n watch: {\n $props: {\n deep: true,\n async handler () {\n await this.$nextTick();\n this.adjustLabelWidth();\n },\n },\n },\n\n mounted () {\n this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);\n this.resizeObserver.observe(this.$el);\n this.adjustLabelWidth();\n },\n\n beforeDestroy: function () {\n this.resizeObserver.disconnect();\n },\n\n methods: {\n adjustLabelWidth () {\n const labelWidth = this.$el?.querySelector('.dt-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = this.$el?.querySelector('.dt-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = this.$el?.querySelector('.dt-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 12;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n\n<style lang=\"less\" scoped>\n@import \"../style/leftbar_row.less\";\n</style>\n"],"names":["DtButton","DtBadge","DtEmojiTextWrapper","safeConcatStrings"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoFA,MAAA,YAAA;AAAA,EACA,MAAA;AAA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A;AAAA,MACA,MAAA,UAAA;AACA,cAAA,KAAA;AACA,aAAA,iBAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,iBAAA,IAAA,eAAA,KAAA,gBAAA;AACA,SAAA,eAAA,QAAA,KAAA,GAAA;AACA,SAAA,iBAAA;AAAA,EACA;AAAA,EAEA,eAAA,WAAA;AACA,SAAA,eAAA;EACA;AAAA,EAEA,SAAA;AAAA,IACA,mBAAA;;AACA,YAAA,eAAA,gBAAA,QAAA,mBAAA,cAAA,gCAAA,mBAAA,gBAAA;AACA,YAAA,eAAA,gBAAA,QAAA,mBAAA,cAAA,8BAAA,mBAAA,gBAAA;AACA,YAAA,eAAA,gBAAA,QAAA,mBAAA,cAAA,8BAAA,mBAAA,gBAAA;AACA,YAAA,WAAA;AACA,WAAA,aAAA,cAAA,aAAA,aAAA,YAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import DtIconHeadphones from "@dialpad/dialtone-icons/vue2/headphones";
|
|
2
|
-
import DtIconChevronDown from "@dialpad/dialtone-icons/vue2/chevron-down";
|
|
3
|
-
import { DtEmojiTextWrapper } from "./emoji-text-wrapper.js";
|
|
4
1
|
import { safeConcatStrings } from "../common/utils.js";
|
|
2
|
+
import { DtEmojiTextWrapper } from "./emoji-text-wrapper.js";
|
|
3
|
+
import DtIconChevronDown from "@dialpad/dialtone-icons/vue2/chevron-down";
|
|
4
|
+
import DtIconHeadphones from "@dialpad/dialtone-icons/vue2/headphones";
|
|
5
5
|
import { normalizeComponent } from "../chunks/_plugin-vue2_normalizer-sOSkiPF3.js";
|
|
6
6
|
import { DtButton } from "./button.js";
|
|
7
7
|
import { DtBadge } from "./badge.js";
|
|
8
|
+
import "../common/constants.js";
|
|
9
|
+
import "vue";
|
|
8
10
|
import "../chunks/index-ODod4Oj_.js";
|
|
9
11
|
import "emoji-toolkit/emoji_strategy.json";
|
|
10
12
|
import "../chunks/icon_constants-Dy4MEUJL.js";
|
|
11
13
|
import "@dialpad/dialtone-icons/icons.json";
|
|
12
14
|
import "./emoji.js";
|
|
13
15
|
import "./skeleton.js";
|
|
14
|
-
import "../common/constants.js";
|
|
15
|
-
import "vue";
|
|
16
16
|
import "../chunks/link_constants-AfTWrr-n.js";
|
|
17
17
|
import "./icon.js";
|
|
18
18
|
import "@dialpad/dialtone-icons/vue2";
|
|
19
19
|
const _sfc_main = {
|
|
20
|
-
name: "
|
|
20
|
+
name: "DtRecipeContactCentersRow",
|
|
21
21
|
components: {
|
|
22
22
|
DtButton,
|
|
23
23
|
DtBadge,
|
|
@@ -48,6 +48,13 @@ const _sfc_main = {
|
|
|
48
48
|
type: Boolean,
|
|
49
49
|
default: false
|
|
50
50
|
},
|
|
51
|
+
/**
|
|
52
|
+
* Making this true will hide the unread count badge, the chevron button, and the right slot
|
|
53
|
+
*/
|
|
54
|
+
hideActions: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false
|
|
57
|
+
},
|
|
51
58
|
/**
|
|
52
59
|
* Number of unread messages
|
|
53
60
|
*/
|
|
@@ -105,7 +112,8 @@ const _sfc_main = {
|
|
|
105
112
|
watch: {
|
|
106
113
|
$props: {
|
|
107
114
|
deep: true,
|
|
108
|
-
handler() {
|
|
115
|
+
async handler() {
|
|
116
|
+
await this.$nextTick();
|
|
109
117
|
this.adjustLabelWidth();
|
|
110
118
|
}
|
|
111
119
|
}
|
|
@@ -134,7 +142,7 @@ var _sfc_render = function render() {
|
|
|
134
142
|
return _c("div", { class: [
|
|
135
143
|
"dt-leftbar-row__container",
|
|
136
144
|
{ "dt-leftbar-row__container--off-duty": _vm.$slots.timer }
|
|
137
|
-
] }, [_c("div", { class: _vm.leftbarContactCentersRowClasses, attrs: { "data-qa": "dt-recipe-contact-centers-row" } }, [_c("a", _vm._g(_vm._b({ staticClass: "dt-leftbar-row__primary", attrs: { "data-qa": _vm.$attrs["data-qa"] ?? "dt-leftbar-row-link", "aria-label": _vm.getAriaLabel, "title": _vm.description, "href": _vm.$attrs.href ?? "javascript:void(0)" } }, "a", _vm.$attrs, false), _vm.$listeners), [_c("div", { staticClass: "dt-leftbar-row__alpha" }, [_c("dt-icon-headphones", { attrs: { "size": "300", "data-qa": "dt-leftbar-row-icon" } })], 1), _c("div", { staticClass: "dt-leftbar-row__label", style: `flex-basis: ${_vm.labelWidth}` }, [_c("dt-emoji-text-wrapper", { staticClass: "dt-leftbar-row__description", attrs: { "data-qa": "dt-leftbar-row-description", "size": "200" } }, [_vm._v(" " + _vm._s(_vm.description) + " ")])], 1)]), _c("div", { staticClass: "dt-leftbar-row__omega" }, [_vm._t("right"), _c("div", { staticClass: "dt-leftbar-row__action-container" }, [_vm.showUnreadCount ? _c("dt-badge", { staticClass: "dt-leftbar-row__unread-badge", attrs: { "data-qa": "dt-leftbar-row-unread-badge", "kind": "count", "type": "bulletin" } }, [_vm._v(" " + _vm._s(_vm.unreadCount) + " ")]) : _vm._e(), _c("dt-button", { staticClass: "dt-leftbar-row__action", attrs: { "data-qa": "dt-leftbar-row-action-button", "aria-label": _vm.menuButtonAriaLabel, "importance": "clear", "size": "xs", "circle": "" }, on: { "click": function($event) {
|
|
145
|
+
] }, [_c("div", { class: _vm.leftbarContactCentersRowClasses, attrs: { "data-qa": "dt-recipe-contact-centers-row" } }, [_c("a", _vm._g(_vm._b({ staticClass: "dt-leftbar-row__primary", attrs: { "data-qa": _vm.$attrs["data-qa"] ?? "dt-leftbar-row-link", "aria-label": _vm.getAriaLabel, "title": _vm.description, "href": _vm.$attrs.href ?? "javascript:void(0)" } }, "a", _vm.$attrs, false), _vm.$listeners), [_c("div", { staticClass: "dt-leftbar-row__alpha" }, [_c("dt-icon-headphones", { attrs: { "size": "300", "data-qa": "dt-leftbar-row-icon" } })], 1), _c("div", { staticClass: "dt-leftbar-row__label", style: `flex-basis: ${_vm.labelWidth}` }, [_c("dt-emoji-text-wrapper", { staticClass: "dt-leftbar-row__description", attrs: { "data-qa": "dt-leftbar-row-description", "size": "200" } }, [_vm._v(" " + _vm._s(_vm.description) + " ")])], 1)]), _c("div", { directives: [{ name: "show", rawName: "v-show", value: !_vm.hideActions, expression: "!hideActions" }], staticClass: "dt-leftbar-row__omega" }, [_vm._t("right"), _c("div", { staticClass: "dt-leftbar-row__action-container" }, [_vm.showUnreadCount ? _c("dt-badge", { staticClass: "dt-leftbar-row__unread-badge", attrs: { "data-qa": "dt-leftbar-row-unread-badge", "kind": "count", "type": "bulletin" } }, [_vm._v(" " + _vm._s(_vm.unreadCount) + " ")]) : _vm._e(), _c("dt-button", { staticClass: "dt-leftbar-row__action", attrs: { "data-qa": "dt-leftbar-row-action-button", "aria-label": _vm.menuButtonAriaLabel, "importance": "clear", "size": "xs", "circle": "" }, on: { "click": function($event) {
|
|
138
146
|
$event.stopPropagation();
|
|
139
147
|
return _vm.$emit("click-menu", $event);
|
|
140
148
|
} }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
@@ -148,7 +156,7 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
|
148
156
|
_sfc_staticRenderFns,
|
|
149
157
|
false,
|
|
150
158
|
null,
|
|
151
|
-
"
|
|
159
|
+
"aeb8c657",
|
|
152
160
|
null,
|
|
153
161
|
null
|
|
154
162
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-centers-row.js","sources":["../../recipes/leftbar/contact_centers_row/contact_centers_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'dt-leftbar-row__container',\n { 'dt-leftbar-row__container--off-duty': $slots.timer },\n ]\"\n >\n <div\n :class=\"leftbarContactCentersRowClasses\"\n data-qa=\"dt-recipe-contact-centers-row\"\n >\n <a\n class=\"dt-leftbar-row__primary\"\n :data-qa=\"$attrs['data-qa'] ?? 'dt-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"$attrs.href ?? 'javascript:void(0)'\"\n v-bind=\"$attrs\"\n v-on=\"$listeners\"\n >\n <div class=\"dt-leftbar-row__alpha\">\n <dt-icon-headphones\n size=\"300\"\n data-qa=\"dt-leftbar-row-icon\"\n />\n </div>\n <div\n class=\"dt-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <dt-emoji-text-wrapper\n class=\"dt-leftbar-row__description\"\n data-qa=\"dt-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </div>\n </a>\n <div
|
|
1
|
+
{"version":3,"file":"contact-centers-row.js","sources":["../../recipes/leftbar/contact_centers_row/contact_centers_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'dt-leftbar-row__container',\n { 'dt-leftbar-row__container--off-duty': $slots.timer },\n ]\"\n >\n <div\n :class=\"leftbarContactCentersRowClasses\"\n data-qa=\"dt-recipe-contact-centers-row\"\n >\n <a\n class=\"dt-leftbar-row__primary\"\n :data-qa=\"$attrs['data-qa'] ?? 'dt-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"$attrs.href ?? 'javascript:void(0)'\"\n v-bind=\"$attrs\"\n v-on=\"$listeners\"\n >\n <div class=\"dt-leftbar-row__alpha\">\n <dt-icon-headphones\n size=\"300\"\n data-qa=\"dt-leftbar-row-icon\"\n />\n </div>\n <div\n class=\"dt-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <dt-emoji-text-wrapper\n class=\"dt-leftbar-row__description\"\n data-qa=\"dt-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </div>\n </a>\n <div\n v-show=\"!hideActions\"\n class=\"dt-leftbar-row__omega\"\n >\n <slot name=\"right\" />\n <div class=\"dt-leftbar-row__action-container\">\n <dt-badge\n v-if=\"showUnreadCount\"\n class=\"dt-leftbar-row__unread-badge\"\n data-qa=\"dt-leftbar-row-unread-badge\"\n kind=\"count\"\n type=\"bulletin\"\n >\n {{ unreadCount }}\n </dt-badge>\n <dt-button\n class=\"dt-leftbar-row__action\"\n data-qa=\"dt-leftbar-row-action-button\"\n :aria-label=\"menuButtonAriaLabel\"\n importance=\"clear\"\n size=\"xs\"\n circle\n @click.stop=\"$emit('click-menu', $event)\"\n >\n <template #icon>\n <dt-icon-chevron-down size=\"100\" />\n </template>\n </dt-button>\n </div>\n </div>\n </div>\n <div class=\"dt-leftbar-row__bottom\">\n <slot name=\"timer\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { safeConcatStrings } from '@/common/utils';\nimport { DtBadge } from '@/components/badge';\nimport { DtButton } from '@/components/button';\nimport DtEmojiTextWrapper from '@/components/emoji_text_wrapper/emoji_text_wrapper.vue';\nimport DtIconChevronDown from '@dialpad/dialtone-icons/vue2/chevron-down';\nimport DtIconHeadphones from '@dialpad/dialtone-icons/vue2/headphones';\n\nexport default {\n name: 'DtRecipeContactCentersRow',\n\n components: {\n DtButton,\n DtBadge,\n DtEmojiTextWrapper,\n DtIconHeadphones,\n DtIconChevronDown,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Will be read out by a screen reader upon focus of this row. If not defined \"description\" will be read.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Text displayed next to the icon. Required.\n */\n description: {\n type: String,\n required: true,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Making this true will hide the unread count badge, the chevron button, and the right slot\n */\n hideActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages\n */\n unreadCount: {\n type: Number,\n default: 0,\n },\n\n /**\n * Aria label for the menu button.\n */\n menuButtonAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Menu button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click-menu',\n ],\n\n data () {\n return {\n labelWidth: 'auto',\n };\n },\n\n computed: {\n leftbarContactCentersRowClasses () {\n return [\n 'dt-leftbar-row',\n 'dt-leftbar-row--contact-centers',\n {\n 'dt-leftbar-row--unread-count': this.showUnreadCount,\n 'dt-leftbar-row--selected': this.selected,\n },\n ];\n },\n\n getAriaLabel () {\n return this.ariaLabel\n ? this.ariaLabel\n : safeConcatStrings([this.description, this.unreadCountTooltip]);\n },\n\n showUnreadCount () {\n return this.unreadCount > 0;\n },\n },\n\n watch: {\n $props: {\n deep: true,\n async handler () {\n await this.$nextTick();\n this.adjustLabelWidth();\n },\n },\n },\n\n mounted () {\n this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);\n this.resizeObserver.observe(this.$el);\n this.adjustLabelWidth();\n },\n\n beforeDestroy: function () {\n this.resizeObserver.disconnect();\n },\n\n methods: {\n adjustLabelWidth () {\n const labelWidth = this.$el?.querySelector('.dt-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = this.$el?.querySelector('.dt-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = this.$el?.querySelector('.dt-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 12;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n\n<style lang=\"less\" scoped>\n@import \"../style/leftbar_row.less\";\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAoFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;A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A,gBAAA,QAAA,mBAAA,cAAA,8BAAA,mBAAA,gBAAA;AACA,YAAA,eAAA,gBAAA,QAAA,mBAAA,cAAA,8BAAA,mBAAA,gBAAA;AACA,YAAA,WAAA;AACA,WAAA,aAAA,cAAA,aAAA,aAAA,YAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -518,13 +518,15 @@ const _sfc_main = {
|
|
|
518
518
|
}
|
|
519
519
|
},
|
|
520
520
|
methods: {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
521
|
+
// Mousedown instead of click because it fires before the blur event.
|
|
522
|
+
onMousedown(e) {
|
|
523
|
+
const isWithinInput = this.$refs.richTextEditor.$el.querySelector(".tiptap").contains(e.target);
|
|
524
|
+
if (!isWithinInput) {
|
|
525
|
+
e.preventDefault();
|
|
526
|
+
this.$refs.richTextEditor.focusEditor();
|
|
527
|
+
}
|
|
524
528
|
},
|
|
525
529
|
onDrop(e) {
|
|
526
|
-
e.stopPropagation();
|
|
527
|
-
e.preventDefault();
|
|
528
530
|
const dt = e.dataTransfer;
|
|
529
531
|
const files = Array.from(dt.files);
|
|
530
532
|
this.$emit("add-media", files);
|
|
@@ -578,7 +580,12 @@ const _sfc_main = {
|
|
|
578
580
|
var _sfc_render = function render2() {
|
|
579
581
|
var _a;
|
|
580
582
|
var _vm = this, _c = _vm._self._c;
|
|
581
|
-
return _c("div", { class: ["dt-message-input"], attrs: { "data-qa": "dt-message-input", "role": "presentation" }, on: { "
|
|
583
|
+
return _c("div", { class: ["dt-message-input"], attrs: { "data-qa": "dt-message-input", "role": "presentation" }, on: { "dragover": function($event) {
|
|
584
|
+
$event.preventDefault();
|
|
585
|
+
}, "drop": function($event) {
|
|
586
|
+
$event.preventDefault();
|
|
587
|
+
return _vm.onDrop.apply(null, arguments);
|
|
588
|
+
}, "paste": _vm.onPaste, "mousedown": _vm.onMousedown } }, [_vm._t("top"), _c("div", { directives: [{ name: "dt-scrollbar", rawName: "v-dt-scrollbar" }], staticClass: "dt-message-input__editor-wrapper", style: { "max-height": _vm.maxHeight } }, [_c("dt-rich-text-editor", _vm._g(_vm._b({ ref: "richTextEditor", attrs: { "editable": _vm.editable, "input-aria-label": _vm.inputAriaLabel, "input-class": _vm.inputClass, "output-format": _vm.outputFormat, "auto-focus": _vm.autoFocus, "link": _vm.link, "placeholder": _vm.placeholder, "prevent-typing": _vm.preventTyping, "mention-suggestion": _vm.mentionSuggestion, "channel-suggestion": _vm.channelSuggestion, "slash-command-suggestion": _vm.slashCommandSuggestion, "allow-blockquote": _vm.allowBlockquote, "allow-bold": _vm.allowBold, "allow-bullet-list": _vm.allowBulletList, "allow-codeblock": _vm.allowCodeblock, "allow-italic": _vm.allowItalic, "allow-strike": _vm.allowStrike, "allow-underline": _vm.allowUnderline, "additional-extensions": _vm.additionalExtensions }, on: { "input": _vm.onInput, "enter": _vm.onSend }, model: { value: _vm.internalInputValue, callback: function($$v) {
|
|
582
589
|
_vm.internalInputValue = $$v;
|
|
583
590
|
}, expression: "internalInputValue" } }, "dt-rich-text-editor", _vm.$attrs, false), _vm.$listeners))], 1), _vm._t("middle"), _c("section", { staticClass: "dt-message-input__bottom-section" }, [_c("div", { staticClass: "dt-message-input__bottom-section-left" }, [_vm.showImagePicker ? _c("dt-button", { directives: [{ name: "dt-tooltip", rawName: "v-dt-tooltip:top-start", value: (_a = _vm.showImagePicker) == null ? void 0 : _a.tooltipLabel, expression: "showImagePicker?.tooltipLabel", arg: "top-start" }], attrs: { "data-qa": "dt-message-input-image-btn", "size": "sm", "circle": "", "kind": _vm.imagePickerFocus ? "default" : "muted", "importance": "clear", "aria-label": _vm.showImagePicker.ariaLabel }, on: { "click": _vm.onSelectImage, "mouseenter": function($event) {
|
|
584
591
|
_vm.imagePickerFocus = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-input.cjs","sources":["../../recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue","../../recipes/conversation_view/message_input/meeting_pill/meeting_pill.js","../../recipes/conversation_view/message_input/message_input.vue"],"sourcesContent":["<template>\n <node-view-wrapper class=\"dt-message-input-meeting-pill\">\n <dt-item-layout\n class=\"dt-message-input-meeting-pill__layout\"\n unstyled\n >\n <template #left>\n <div class=\"dt-message-input-meeting-pill__icon\">\n <dt-icon\n name=\"video\"\n size=\"400\"\n />\n </div>\n </template>\n {{ node.attrs.text }}\n <template #right>\n <div class=\"dt-message-input-meeting-pill__close\">\n <dt-button\n circle\n :aria-label=\"node.attrs['close-button-aria-label']\"\n size=\"xs\"\n importance=\"clear\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n </template>\n </dt-item-layout>\n </node-view-wrapper>\n</template>\n\n<script>\nimport { NodeViewWrapper, nodeViewProps } from '@tiptap/vue-2';\nimport { DtItemLayout } from '@/components/item_layout';\nimport { DtIcon } from '@/components/icon';\nimport { DtButton } from '@/components/button';\n\nexport default {\n name: 'MeetingPill',\n\n components: {\n NodeViewWrapper,\n DtItemLayout,\n DtIcon,\n DtButton,\n },\n\n props: nodeViewProps,\n\n emits: ['meeting-pill-close'],\n\n methods: {\n close (e) {\n this.$parent.$emit('meeting-pill-close', e);\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-message-input-meeting-pill {\n display: inline-block;\n\n &__layout {\n gap: var(--dt-space-400);\n grid-template-areas: 'left content right';\n grid-template-columns: minmax(0, max-content) 1fr minmax(0, max-content);\n align-items: center;\n max-width: var(--dt-size-905);\n padding-left: var(--dt-space-400);\n padding-right: var(--dt-space-400);\n padding-top: var(--dt-space-200);\n padding-bottom: var(--dt-space-200);\n border: var(--dt-size-border-100) solid var(--dt-color-border-default);\n border-radius: var(--dt-size-radius-300);\n font: var(--dt-typography-headline-md);\n }\n\n &__icon {\n display: flex;\n align-items: center;\n padding: var(--dt-space-350);\n }\n\n &__close {\n display: flex;\n justify-content: flex-end;\n }\n}\n</style>\n","import { mergeAttributes, Node } from '@tiptap/core';\nimport { VueNodeViewRenderer } from '@tiptap/vue-2';\nimport MeetingPill from './MeetingPill.vue';\n\nexport default Node.create({\n\n atom: true,\n group: 'inline',\n inline: true,\n\n addNodeView () {\n return VueNodeViewRenderer(MeetingPill);\n },\n\n addAttributes () {\n return {\n text: {\n default: 'Please pass in \"text\" attribute',\n },\n 'close-button-aria-label': {},\n };\n },\n\n parseHTML () {\n return [\n {\n tag: 'meeting-pill',\n },\n ];\n },\n\n renderText ({ node }) {\n return '/dpm';\n },\n\n renderHTML ({ HTMLAttributes }) {\n return ['meeting-pill', mergeAttributes(HTMLAttributes)];\n },\n});\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <div\n data-qa=\"dt-message-input\"\n role=\"presentation\"\n :class=\"['dt-message-input']\"\n @drag-enter=\"onDrag\"\n @drag-over=\"onDrag\"\n @drop=\"onDrop\"\n @paste=\"onPaste\"\n >\n <!-- @slot Renders above the input, but still within the borders. -->\n <slot name=\"top\" />\n <!-- Some wrapper to restrict the height and show the scrollbar -->\n <div\n v-dt-scrollbar\n class=\"dt-message-input__editor-wrapper\"\n :style=\"{ 'max-height': maxHeight }\"\n >\n <dt-rich-text-editor\n ref=\"richTextEditor\"\n v-model=\"internalInputValue\"\n :editable=\"editable\"\n :input-aria-label=\"inputAriaLabel\"\n :input-class=\"inputClass\"\n :output-format=\"outputFormat\"\n :auto-focus=\"autoFocus\"\n :link=\"link\"\n :placeholder=\"placeholder\"\n :prevent-typing=\"preventTyping\"\n :mention-suggestion=\"mentionSuggestion\"\n :channel-suggestion=\"channelSuggestion\"\n :slash-command-suggestion=\"slashCommandSuggestion\"\n :allow-blockquote=\"allowBlockquote\"\n :allow-bold=\"allowBold\"\n :allow-bullet-list=\"allowBulletList\"\n :allow-codeblock=\"allowCodeblock\"\n :allow-italic=\"allowItalic\"\n :allow-strike=\"allowStrike\"\n :allow-underline=\"allowUnderline\"\n :additional-extensions=\"additionalExtensions\"\n v-bind=\"$attrs\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @input=\"onInput\"\n @enter=\"onSend\"\n v-on=\"$listeners\"\n />\n </div>\n <!-- @slot Slot for attachment carousel -->\n <slot name=\"middle\" />\n <!-- Section for the bottom UI -->\n <section class=\"dt-message-input__bottom-section\">\n <!-- Left content -->\n <div class=\"dt-message-input__bottom-section-left\">\n <dt-button\n v-if=\"showImagePicker\"\n v-dt-tooltip:top-start=\"showImagePicker?.tooltipLabel\"\n data-qa=\"dt-message-input-image-btn\"\n size=\"sm\"\n circle\n :kind=\"imagePickerFocus ? 'default' : 'muted'\"\n importance=\"clear\"\n :aria-label=\"showImagePicker.ariaLabel\"\n @click=\"onSelectImage\"\n @mouseenter=\"imagePickerFocus = true\"\n @mouseleave=\"imagePickerFocus = false\"\n @focus=\"imagePickerFocus = true\"\n @blur=\"imagePickerFocus = false\"\n >\n <template #icon>\n <dt-icon\n name=\"image\"\n size=\"300\"\n />\n </template>\n </dt-button>\n <dt-input\n ref=\"messageInputImageUpload\"\n data-qa=\"dt-message-input-image-input\"\n accept=\"image/*, video/*\"\n type=\"file\"\n class=\"dt-message-input__image-input\"\n multiple\n hidden\n @input=\"onImageUpload\"\n />\n <dt-popover\n v-if=\"showEmojiPicker\"\n data-qa=\"dt-message-input-emoji-picker-popover\"\n :open.sync=\"emojiPickerOpened\"\n initial-focus-element=\"#searchInput\"\n padding=\"none\"\n >\n <template #anchor=\"{ attrs }\">\n <dt-button\n v-dt-tooltip=\"emojiTooltipMessage\"\n v-bind=\"attrs\"\n data-qa=\"dt-message-input-emoji-picker-btn\"\n size=\"sm\"\n circle\n :kind=\"emojiPickerHovered ? 'default' : 'muted'\"\n importance=\"clear\"\n :aria-label=\"emojiButtonAriaLabel\"\n @click=\"toggleEmojiPicker\"\n @mouseenter=\"emojiPickerFocus = true\"\n @mouseleave=\"emojiPickerFocus = false\"\n @focus=\"emojiPickerFocus = true\"\n @blur=\"emojiPickerFocus = false\"\n >\n <template #icon>\n <dt-icon\n :name=\"!emojiPickerHovered ? 'satisfied' : 'very-satisfied'\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </template>\n <template\n #content=\"{ close }\"\n >\n <dt-emoji-picker\n v-bind=\"emojiPickerProps\"\n @skin-tone=\"onSkinTone\"\n @selected-emoji=\"(emoji) => { close(); onSelectEmoji(emoji); }\"\n />\n </template>\n </dt-popover>\n <!-- @slot Slot for emojiGiphy picker -->\n <slot name=\"emojiGiphyPicker\" />\n </div>\n <!-- Right content -->\n <div class=\"dt-message-input__bottom-section-right\">\n <!-- @slot Slot for sms count -->\n <div class=\"d-d-flex d-ai-center\">\n <slot name=\"smsCount\" />\n </div>\n\n <!-- Optionally displayed remaining character counter -->\n <dt-tooltip\n v-if=\"Boolean(showCharacterLimit)\"\n class=\"dt-message-input__remaining-char-tooltip\"\n placement=\"top-end\"\n :enabled=\"characterLimitTooltipEnabled\"\n :message=\"showCharacterLimit.message\"\n :offset=\"[10, 8]\"\n >\n <template #anchor>\n <p\n v-show=\"displayCharacterLimitWarning\"\n class=\"dt-message-input__remaining-char\"\n data-qa=\"dt-message-input-character-limit\"\n >\n {{ showCharacterLimit.count - inputLength }}\n </p>\n </template>\n </dt-tooltip>\n\n <!-- Cancel button for edit mode -->\n <dt-button\n v-if=\"showCancel\"\n data-qa=\"dt-message-input-cancel-button\"\n class=\"dt-message-input__cancel-button\"\n size=\"sm\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"showCancel.ariaLabel\"\n @click=\"onCancel\"\n >\n <p>{{ showCancel.text }}</p>\n </dt-button>\n\n <!-- @slot Slot for sendButton picker -->\n <slot name=\"sendButton\">\n <!-- Send button -->\n <!-- Right positioned UI - send button -->\n <dt-button\n v-if=\"showSend\"\n v-dt-tooltip:top-end=\"showSend?.tooltipLabel\"\n data-qa=\"dt-message-input-send-btn\"\n size=\"sm\"\n kind=\"default\"\n importance=\"primary\"\n :class=\"[\n {\n 'dt-message-input__send-button--disabled': isSendDisabled,\n 'd-btn--circle': showSend.icon,\n },\n ]\"\n :aria-label=\"showSend.ariaLabel\"\n :aria-disabled=\"isSendDisabled\"\n @click=\"onSend\"\n >\n <template\n v-if=\"showSend.icon\"\n #icon\n >\n <dt-icon\n :name=\"showSend.icon\"\n size=\"300\"\n />\n </template>\n <template\n v-if=\"showSend.text\"\n >\n <p>{{ showSend.text }}</p>\n </template>\n </dt-button>\n </slot>\n </div>\n </section>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n DtRichTextEditor,\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n} from '@/components/rich_text_editor';\nimport meetingPill from './meeting_pill/meeting_pill';\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\nimport { DtEmojiPicker } from '@/components/emoji_picker';\nimport { DtPopover } from '@/components/popover';\nimport { DtInput } from '@/components/input';\nimport { DtTooltip } from '@/components/tooltip';\n\nexport default {\n name: 'DtRecipeMessageInput',\n\n components: {\n DtButton,\n DtEmojiPicker,\n DtIcon,\n DtInput,\n DtPopover,\n DtRichTextEditor,\n DtTooltip,\n },\n\n mixins: [],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Value of the input. The object format should match TipTap's JSON\n * document structure: https://tiptap.dev/guide/output#option-1-json\n */\n value: {\n type: [Object, String],\n default: '',\n },\n\n /**\n * Whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Descriptive label for the input element\n */\n inputAriaLabel: {\n type: String,\n required: true,\n default: '',\n },\n\n /**\n * Prevents the user from typing any further. Deleting text will still work.\n */\n preventTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the input element. Only accepts a String value\n * because this is passed to the editor via options. For multiple classes,\n * join them into one string, e.g. \"d-p8 d-hmx96\"\n */\n inputClass: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the input should receive focus after the component has been\n * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n * - `start` Sets the focus to the beginning of the input\n * - `end` Sets the focus to the end of the input\n * - `all` Selects the whole contents of the input\n * - `Number` Sets the focus to a specific position in the input\n * - `true` Defaults to `start`\n * - `false` Disables autofocus\n * @values true, false, start, end, all, number\n */\n autoFocus: {\n type: [Boolean, String, Number],\n default: false,\n validator (autoFocus) {\n if (typeof autoFocus === 'string') {\n return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n }\n return true;\n },\n },\n\n /**\n * The output format that the editor uses when emitting the \"@input\" event.\n * One of `text`, `json`, `html`. See https://tiptap.dev/guide/output for\n * examples.\n * @values text, json, html\n */\n outputFormat: {\n type: String,\n default: 'text',\n validator (outputFormat) {\n return RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);\n },\n },\n\n /**\n * Enables the Link extension and optionally passes configurations to it\n */\n link: {\n type: [Boolean, Object],\n default: true,\n },\n\n /**\n * Placeholder text\n */\n placeholder: {\n type: String,\n default: '',\n },\n\n /**\n * Disable Send Button\n */\n disableSend: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Content area needs to dynamically adjust height based on the conversation area height.\n * can be vh|px|rem|em|%\n */\n maxHeight: {\n type: String,\n default: 'unset',\n },\n\n // Emoji picker props\n showEmojiPicker: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Props to pass into the emoji picker.\n */\n emojiPickerProps: {\n type: Object,\n default: () => ({}),\n validate (emojiPickerProps) {\n return [\n 'searchNoResultsLabel',\n 'searchResultsLabel',\n 'searchPlaceholderLabel',\n 'skinSelectorButtonTooltipLabel',\n 'tabSetLabels',\n ].every(prop => emojiPickerProps[prop] != null);\n },\n },\n\n /**\n * Emoji button tooltip label\n */\n emojiTooltipMessage: {\n type: String,\n default: 'Emoji',\n },\n\n // Aria label for buttons\n /**\n * Emoji button aria label\n */\n emojiButtonAriaLabel: {\n type: String,\n default: 'emoji button',\n },\n\n /**\n * Enable character Limit warning\n */\n showCharacterLimit: {\n type: [Boolean, Object],\n default: () => ({ count: 1500, warning: 500, message: '' }),\n },\n\n showImagePicker: {\n type: [Boolean, Object],\n default: () => ({ tooltipLabel: 'Attach Image', ariaLabel: 'image button' }),\n },\n\n /**\n * Send button defaults.\n */\n showSend: {\n type: [Boolean, Object],\n default: () => ({ icon: 'send' }),\n },\n\n /**\n * Cancel button defaults.\n */\n showCancel: {\n type: [Boolean, Object],\n default: () => ({ text: 'Cancel' }),\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the contacts for suggestion.\n * items({ query }) => { return [ContactObject]; }\n * ContactObject format:\n * { name: string, avatarSrc: string, id: string }\n *\n * When null, it does not add the plugin.\n */\n mentionSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the channels for suggestion.\n * items({ query }) => { return [ChannelObject]; }\n * ChannelObject format:\n * { name: string, id: string, locked: boolean }\n *\n * When null, it does not add the plugin. Setting locked to true will display a lock rather than hash.\n */\n channelSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the slash commands for suggestion.\n * items({ query }) => { return [SlashCommandObject]; }\n * SlashCommandObject format:\n * { command: string, description: string, parametersExample?: string }\n * The \"parametersExample\" parameter is optional, and describes an example\n * of the parameters that command can take.\n *\n * When null, it does not add the plugin.\n */\n slashCommandSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * Whether the input allows for block quote.\n */\n allowBlockquote: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bold to be introduced in the text.\n */\n allowBold: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bullet list to be introduced in the text.\n */\n allowBulletList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for italic to be introduced in the text.\n */\n allowItalic: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for strike to be introduced in the text.\n */\n allowStrike: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for underline to be introduced in the text.\n */\n allowUnderline: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows codeblock to be introduced in the text.\n */\n allowCodeblock: {\n type: Boolean,\n default: true,\n },\n },\n\n emits: [\n /**\n * Fires when send button is clicked\n *\n * @event submit\n * @type {String}\n */\n 'submit',\n\n /**\n * Fires when media is selected from image button\n *\n * @event select-media\n * @type {Array}\n */\n 'select-media',\n\n /**\n * Fires when media is dropped into the message input\n *\n * @event add-media\n * @type {Array}\n */\n 'add-media',\n\n /**\n * Fires when media is pasted into the message input\n *\n * @event paste-media\n * @type {Array}\n */\n 'paste-media',\n\n /**\n * Fires when cancel button is pressed (only on edit mode)\n *\n * @event cancel\n * @type {Boolean}\n */\n 'cancel',\n\n /**\n * Fires when skin tone is selected from the emoji picker\n *\n * @event skin-tone\n * @type {String}\n */\n 'skin-tone',\n\n /**\n * Fires when emoji is selected from the emoji picker\n *\n * @event selected-emoji\n * @type {String}\n */\n 'selected-emoji',\n\n /**\n * Fires when a slash command is selected\n *\n * @event selected-command\n * @type {String}\n */\n 'selected-command',\n\n /**\n * Fires when meeting pill is closed\n *\n * @event meeting-pill-close\n * @type {String}\n */\n 'meeting-pill-close',\n\n /**\n * Event to sync the value with the parent\n * @event update:value\n * @type {String|JSON}\n */\n 'update:value',\n ],\n\n data () {\n return {\n additionalExtensions: [meetingPill],\n internalInputValue: this.value, // internal input content\n imagePickerFocus: false,\n emojiPickerFocus: false,\n emojiPickerOpened: false,\n };\n },\n\n computed: {\n inputLength () {\n return this.internalInputValue.length;\n },\n\n displayCharacterLimitWarning () {\n return Boolean(this.showCharacterLimit) &&\n ((this.showCharacterLimit.count - this.inputLength) <= this.showCharacterLimit.warning);\n },\n\n characterLimitTooltipEnabled () {\n return this.showCharacterLimit.message && (this.showCharacterLimit.count - this.inputLength < 0);\n },\n\n isSendDisabled () {\n return this.disableSend ||\n (this.showCharacterLimit && this.inputLength > this.showCharacterLimit.count);\n },\n\n computedCloseButtonProps () {\n return {\n ariaLabel: 'Close',\n };\n },\n\n emojiPickerHovered () {\n return this.emojiPickerFocus || this.emojiPickerOpened;\n },\n },\n\n watch: {\n value (newValue) {\n this.internalInputValue = newValue;\n },\n\n emojiPickerOpened (newValue) {\n if (!newValue) {\n this.$refs.richTextEditor?.focusEditor();\n }\n },\n },\n\n methods: {\n onDrag (e) {\n e.stopPropagation();\n e.preventDefault();\n },\n\n onDrop (e) {\n e.stopPropagation();\n e.preventDefault();\n\n const dt = e.dataTransfer;\n const files = Array.from(dt.files);\n this.$emit('add-media', files);\n },\n\n onPaste (e) {\n if (e.clipboardData.files.length) {\n e.stopPropagation();\n e.preventDefault();\n const files = [...e.clipboardData.files];\n this.$emit('paste-media', files);\n }\n },\n\n onSkinTone (skinTone) {\n this.$emit('skin-tone', skinTone);\n },\n\n onSelectEmoji (emoji) {\n if (!emoji) {\n return;\n }\n\n // Insert emoji into the editor\n this.$refs.richTextEditor.editor.commands.insertContent({\n type: 'emoji',\n attrs: {\n code: emoji.shortname,\n },\n });\n this.$emit('selected-emoji', emoji);\n },\n\n onSelectImage () {\n this.$refs.messageInputImageUpload.$refs.input.click();\n },\n\n onImageUpload () {\n this.$emit('select-media', this.$refs.messageInputImageUpload.$refs.input.files);\n },\n\n toggleEmojiPicker () {\n this.emojiPickerOpened = !this.emojiPickerOpened;\n },\n\n onSend () {\n if (this.isSendDisabled) {\n return;\n }\n this.$emit('submit', this.internalInputValue);\n },\n\n onCancel () {\n this.$emit('cancel');\n },\n\n onInput (event) {\n this.$emit('update:value', event);\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-message-input {\n display: flex;\n flex-direction: column;\n border-radius: var(--dt-size-radius-400);\n border: var(--dt-size-border-100) solid;\n border-color: var(--dt-color-border-default);\n cursor: text;\n\n &:focus-within {\n border-color: var(--dt-color-border-bold);\n box-shadow: var(--dt-shadow-small);\n }\n\n &__editor-wrapper {\n padding: var(--dt-space-400) var(--dt-space-500) var(--dt-space-300);\n }\n\n &__remaining-char-tooltip {\n margin-top: auto;\n margin-bottom: auto;\n }\n\n &__remaining-char {\n color: var(--dt-color-foreground-critical);\n font-size: var(--dt-font-size-100);\n margin-right: var(--dt-space-500);\n }\n\n &__send-button--disabled {\n background-color: unset;\n color: var(--dt-color-foreground-muted);\n cursor: default;\n }\n\n &__cancel-button {\n margin-right: var(--dt-space-300);\n }\n\n &__bottom-section {\n display: flex;\n justify-content: space-between;\n padding: var(--dt-space-300) var(--dt-space-400);\n }\n\n &__bottom-section-left {\n display: flex;\n }\n\n &__bottom-section-right {\n display: flex;\n }\n\n &__image-input {\n position: absolute;\n }\n}\n</style>\n"],"names":["_sfc_main","NodeViewWrapper","DtItemLayout","DtIcon","DtButton","nodeViewProps","Node","VueNodeViewRenderer","mergeAttributes","DtEmojiPicker","DtInput","DtPopover","DtRichTextEditor","DtTooltip","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","RICH_TEXT_EDITOR_OUTPUT_FORMATS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,iBAAAC,KAAA;AAAA,IACA,cAAAC,eAAA;AAAA,IACA,QAAAC,SAAA;AAAA,IACA,UAAAC,WAAA;AAAA,EACA;AAAA,EAEA,OAAAC,KAAA;AAAA,EAEA,OAAA,CAAA,oBAAA;AAAA,EAEA,SAAA;AAAA,IACA,MAAA,GAAA;AACA,WAAA,QAAA,MAAA,sBAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AC1DA,MAAeC,cAAAA,KAAAA,KAAK,OAAO;AAAA,E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AA,MAAA,gBAAA,KAAA,MAAA,wBAAA,MAAA,MAAA,KAAA;AAAA,IACA;AAAA,IAEA,oBAAA;AACA,WAAA,oBAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,SAAA;AACA,UAAA,KAAA,gBAAA;AACA;AAAA,MACA;AACA,WAAA,MAAA,UAAA,KAAA,kBAAA;AAAA,IACA;AAAA,IAEA,WAAA;AACA,WAAA,MAAA,QAAA;AAAA,IACA;AAAA,IAEA,QAAA,OAAA;AACA,WAAA,MAAA,gBAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"message-input.cjs","sources":["../../recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue","../../recipes/conversation_view/message_input/meeting_pill/meeting_pill.js","../../recipes/conversation_view/message_input/message_input.vue"],"sourcesContent":["<template>\n <node-view-wrapper class=\"dt-message-input-meeting-pill\">\n <dt-item-layout\n class=\"dt-message-input-meeting-pill__layout\"\n unstyled\n >\n <template #left>\n <div class=\"dt-message-input-meeting-pill__icon\">\n <dt-icon\n name=\"video\"\n size=\"400\"\n />\n </div>\n </template>\n {{ node.attrs.text }}\n <template #right>\n <div class=\"dt-message-input-meeting-pill__close\">\n <dt-button\n circle\n :aria-label=\"node.attrs['close-button-aria-label']\"\n size=\"xs\"\n importance=\"clear\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n </template>\n </dt-item-layout>\n </node-view-wrapper>\n</template>\n\n<script>\nimport { NodeViewWrapper, nodeViewProps } from '@tiptap/vue-2';\nimport { DtItemLayout } from '@/components/item_layout';\nimport { DtIcon } from '@/components/icon';\nimport { DtButton } from '@/components/button';\n\nexport default {\n name: 'MeetingPill',\n\n components: {\n NodeViewWrapper,\n DtItemLayout,\n DtIcon,\n DtButton,\n },\n\n props: nodeViewProps,\n\n emits: ['meeting-pill-close'],\n\n methods: {\n close (e) {\n this.$parent.$emit('meeting-pill-close', e);\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-message-input-meeting-pill {\n display: inline-block;\n\n &__layout {\n gap: var(--dt-space-400);\n grid-template-areas: 'left content right';\n grid-template-columns: minmax(0, max-content) 1fr minmax(0, max-content);\n align-items: center;\n max-width: var(--dt-size-905);\n padding-left: var(--dt-space-400);\n padding-right: var(--dt-space-400);\n padding-top: var(--dt-space-200);\n padding-bottom: var(--dt-space-200);\n border: var(--dt-size-border-100) solid var(--dt-color-border-default);\n border-radius: var(--dt-size-radius-300);\n font: var(--dt-typography-headline-md);\n }\n\n &__icon {\n display: flex;\n align-items: center;\n padding: var(--dt-space-350);\n }\n\n &__close {\n display: flex;\n justify-content: flex-end;\n }\n}\n</style>\n","import { mergeAttributes, Node } from '@tiptap/core';\nimport { VueNodeViewRenderer } from '@tiptap/vue-2';\nimport MeetingPill from './MeetingPill.vue';\n\nexport default Node.create({\n\n atom: true,\n group: 'inline',\n inline: true,\n\n addNodeView () {\n return VueNodeViewRenderer(MeetingPill);\n },\n\n addAttributes () {\n return {\n text: {\n default: 'Please pass in \"text\" attribute',\n },\n 'close-button-aria-label': {},\n };\n },\n\n parseHTML () {\n return [\n {\n tag: 'meeting-pill',\n },\n ];\n },\n\n renderText ({ node }) {\n return '/dpm';\n },\n\n renderHTML ({ HTMLAttributes }) {\n return ['meeting-pill', mergeAttributes(HTMLAttributes)];\n },\n});\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <div\n data-qa=\"dt-message-input\"\n role=\"presentation\"\n :class=\"['dt-message-input']\"\n @dragover.prevent\n @drop.prevent=\"onDrop\"\n @paste=\"onPaste\"\n @mousedown=\"onMousedown\"\n >\n <!-- @slot Renders above the input, but still within the borders. -->\n <slot name=\"top\" />\n <!-- Some wrapper to restrict the height and show the scrollbar -->\n <div\n v-dt-scrollbar\n class=\"dt-message-input__editor-wrapper\"\n :style=\"{ 'max-height': maxHeight }\"\n >\n <dt-rich-text-editor\n ref=\"richTextEditor\"\n v-model=\"internalInputValue\"\n :editable=\"editable\"\n :input-aria-label=\"inputAriaLabel\"\n :input-class=\"inputClass\"\n :output-format=\"outputFormat\"\n :auto-focus=\"autoFocus\"\n :link=\"link\"\n :placeholder=\"placeholder\"\n :prevent-typing=\"preventTyping\"\n :mention-suggestion=\"mentionSuggestion\"\n :channel-suggestion=\"channelSuggestion\"\n :slash-command-suggestion=\"slashCommandSuggestion\"\n :allow-blockquote=\"allowBlockquote\"\n :allow-bold=\"allowBold\"\n :allow-bullet-list=\"allowBulletList\"\n :allow-codeblock=\"allowCodeblock\"\n :allow-italic=\"allowItalic\"\n :allow-strike=\"allowStrike\"\n :allow-underline=\"allowUnderline\"\n :additional-extensions=\"additionalExtensions\"\n v-bind=\"$attrs\"\n @input=\"onInput\"\n @enter=\"onSend\"\n v-on=\"$listeners\"\n />\n </div>\n <!-- @slot Slot for attachment carousel -->\n <slot name=\"middle\" />\n <!-- Section for the bottom UI -->\n <section class=\"dt-message-input__bottom-section\">\n <!-- Left content -->\n <div class=\"dt-message-input__bottom-section-left\">\n <dt-button\n v-if=\"showImagePicker\"\n v-dt-tooltip:top-start=\"showImagePicker?.tooltipLabel\"\n data-qa=\"dt-message-input-image-btn\"\n size=\"sm\"\n circle\n :kind=\"imagePickerFocus ? 'default' : 'muted'\"\n importance=\"clear\"\n :aria-label=\"showImagePicker.ariaLabel\"\n @click=\"onSelectImage\"\n @mouseenter=\"imagePickerFocus = true\"\n @mouseleave=\"imagePickerFocus = false\"\n @focus=\"imagePickerFocus = true\"\n @blur=\"imagePickerFocus = false\"\n >\n <template #icon>\n <dt-icon\n name=\"image\"\n size=\"300\"\n />\n </template>\n </dt-button>\n <dt-input\n ref=\"messageInputImageUpload\"\n data-qa=\"dt-message-input-image-input\"\n accept=\"image/*, video/*\"\n type=\"file\"\n class=\"dt-message-input__image-input\"\n multiple\n hidden\n @input=\"onImageUpload\"\n />\n <dt-popover\n v-if=\"showEmojiPicker\"\n data-qa=\"dt-message-input-emoji-picker-popover\"\n :open.sync=\"emojiPickerOpened\"\n initial-focus-element=\"#searchInput\"\n padding=\"none\"\n >\n <template #anchor=\"{ attrs }\">\n <dt-button\n v-dt-tooltip=\"emojiTooltipMessage\"\n v-bind=\"attrs\"\n data-qa=\"dt-message-input-emoji-picker-btn\"\n size=\"sm\"\n circle\n :kind=\"emojiPickerHovered ? 'default' : 'muted'\"\n importance=\"clear\"\n :aria-label=\"emojiButtonAriaLabel\"\n @click=\"toggleEmojiPicker\"\n @mouseenter=\"emojiPickerFocus = true\"\n @mouseleave=\"emojiPickerFocus = false\"\n @focus=\"emojiPickerFocus = true\"\n @blur=\"emojiPickerFocus = false\"\n >\n <template #icon>\n <dt-icon\n :name=\"!emojiPickerHovered ? 'satisfied' : 'very-satisfied'\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </template>\n <template\n #content=\"{ close }\"\n >\n <dt-emoji-picker\n v-bind=\"emojiPickerProps\"\n @skin-tone=\"onSkinTone\"\n @selected-emoji=\"(emoji) => { close(); onSelectEmoji(emoji); }\"\n />\n </template>\n </dt-popover>\n <!-- @slot Slot for emojiGiphy picker -->\n <slot name=\"emojiGiphyPicker\" />\n </div>\n <!-- Right content -->\n <div class=\"dt-message-input__bottom-section-right\">\n <!-- @slot Slot for sms count -->\n <div class=\"d-d-flex d-ai-center\">\n <slot name=\"smsCount\" />\n </div>\n\n <!-- Optionally displayed remaining character counter -->\n <dt-tooltip\n v-if=\"Boolean(showCharacterLimit)\"\n class=\"dt-message-input__remaining-char-tooltip\"\n placement=\"top-end\"\n :enabled=\"characterLimitTooltipEnabled\"\n :message=\"showCharacterLimit.message\"\n :offset=\"[10, 8]\"\n >\n <template #anchor>\n <p\n v-show=\"displayCharacterLimitWarning\"\n class=\"dt-message-input__remaining-char\"\n data-qa=\"dt-message-input-character-limit\"\n >\n {{ showCharacterLimit.count - inputLength }}\n </p>\n </template>\n </dt-tooltip>\n\n <!-- Cancel button for edit mode -->\n <dt-button\n v-if=\"showCancel\"\n data-qa=\"dt-message-input-cancel-button\"\n class=\"dt-message-input__cancel-button\"\n size=\"sm\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"showCancel.ariaLabel\"\n @click=\"onCancel\"\n >\n <p>{{ showCancel.text }}</p>\n </dt-button>\n\n <!-- @slot Slot for sendButton picker -->\n <slot name=\"sendButton\">\n <!-- Send button -->\n <!-- Right positioned UI - send button -->\n <dt-button\n v-if=\"showSend\"\n v-dt-tooltip:top-end=\"showSend?.tooltipLabel\"\n data-qa=\"dt-message-input-send-btn\"\n size=\"sm\"\n kind=\"default\"\n importance=\"primary\"\n :class=\"[\n {\n 'dt-message-input__send-button--disabled': isSendDisabled,\n 'd-btn--circle': showSend.icon,\n },\n ]\"\n :aria-label=\"showSend.ariaLabel\"\n :aria-disabled=\"isSendDisabled\"\n @click=\"onSend\"\n >\n <template\n v-if=\"showSend.icon\"\n #icon\n >\n <dt-icon\n :name=\"showSend.icon\"\n size=\"300\"\n />\n </template>\n <template\n v-if=\"showSend.text\"\n >\n <p>{{ showSend.text }}</p>\n </template>\n </dt-button>\n </slot>\n </div>\n </section>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n DtRichTextEditor,\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n} from '@/components/rich_text_editor';\nimport meetingPill from './meeting_pill/meeting_pill';\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\nimport { DtEmojiPicker } from '@/components/emoji_picker';\nimport { DtPopover } from '@/components/popover';\nimport { DtInput } from '@/components/input';\nimport { DtTooltip } from '@/components/tooltip';\n\nexport default {\n name: 'DtRecipeMessageInput',\n\n components: {\n DtButton,\n DtEmojiPicker,\n DtIcon,\n DtInput,\n DtPopover,\n DtRichTextEditor,\n DtTooltip,\n },\n\n mixins: [],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Value of the input. The object format should match TipTap's JSON\n * document structure: https://tiptap.dev/guide/output#option-1-json\n */\n value: {\n type: [Object, String],\n default: '',\n },\n\n /**\n * Whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Descriptive label for the input element\n */\n inputAriaLabel: {\n type: String,\n required: true,\n default: '',\n },\n\n /**\n * Prevents the user from typing any further. Deleting text will still work.\n */\n preventTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the input element. Only accepts a String value\n * because this is passed to the editor via options. For multiple classes,\n * join them into one string, e.g. \"d-p8 d-hmx96\"\n */\n inputClass: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the input should receive focus after the component has been\n * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n * - `start` Sets the focus to the beginning of the input\n * - `end` Sets the focus to the end of the input\n * - `all` Selects the whole contents of the input\n * - `Number` Sets the focus to a specific position in the input\n * - `true` Defaults to `start`\n * - `false` Disables autofocus\n * @values true, false, start, end, all, number\n */\n autoFocus: {\n type: [Boolean, String, Number],\n default: false,\n validator (autoFocus) {\n if (typeof autoFocus === 'string') {\n return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n }\n return true;\n },\n },\n\n /**\n * The output format that the editor uses when emitting the \"@input\" event.\n * One of `text`, `json`, `html`. See https://tiptap.dev/guide/output for\n * examples.\n * @values text, json, html\n */\n outputFormat: {\n type: String,\n default: 'text',\n validator (outputFormat) {\n return RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);\n },\n },\n\n /**\n * Enables the Link extension and optionally passes configurations to it\n */\n link: {\n type: [Boolean, Object],\n default: true,\n },\n\n /**\n * Placeholder text\n */\n placeholder: {\n type: String,\n default: '',\n },\n\n /**\n * Disable Send Button\n */\n disableSend: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Content area needs to dynamically adjust height based on the conversation area height.\n * can be vh|px|rem|em|%\n */\n maxHeight: {\n type: String,\n default: 'unset',\n },\n\n // Emoji picker props\n showEmojiPicker: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Props to pass into the emoji picker.\n */\n emojiPickerProps: {\n type: Object,\n default: () => ({}),\n validate (emojiPickerProps) {\n return [\n 'searchNoResultsLabel',\n 'searchResultsLabel',\n 'searchPlaceholderLabel',\n 'skinSelectorButtonTooltipLabel',\n 'tabSetLabels',\n ].every(prop => emojiPickerProps[prop] != null);\n },\n },\n\n /**\n * Emoji button tooltip label\n */\n emojiTooltipMessage: {\n type: String,\n default: 'Emoji',\n },\n\n // Aria label for buttons\n /**\n * Emoji button aria label\n */\n emojiButtonAriaLabel: {\n type: String,\n default: 'emoji button',\n },\n\n /**\n * Enable character Limit warning\n */\n showCharacterLimit: {\n type: [Boolean, Object],\n default: () => ({ count: 1500, warning: 500, message: '' }),\n },\n\n showImagePicker: {\n type: [Boolean, Object],\n default: () => ({ tooltipLabel: 'Attach Image', ariaLabel: 'image button' }),\n },\n\n /**\n * Send button defaults.\n */\n showSend: {\n type: [Boolean, Object],\n default: () => ({ icon: 'send' }),\n },\n\n /**\n * Cancel button defaults.\n */\n showCancel: {\n type: [Boolean, Object],\n default: () => ({ text: 'Cancel' }),\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the contacts for suggestion.\n * items({ query }) => { return [ContactObject]; }\n * ContactObject format:\n * { name: string, avatarSrc: string, id: string }\n *\n * When null, it does not add the plugin.\n */\n mentionSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the channels for suggestion.\n * items({ query }) => { return [ChannelObject]; }\n * ChannelObject format:\n * { name: string, id: string, locked: boolean }\n *\n * When null, it does not add the plugin. Setting locked to true will display a lock rather than hash.\n */\n channelSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the slash commands for suggestion.\n * items({ query }) => { return [SlashCommandObject]; }\n * SlashCommandObject format:\n * { command: string, description: string, parametersExample?: string }\n * The \"parametersExample\" parameter is optional, and describes an example\n * of the parameters that command can take.\n *\n * When null, it does not add the plugin.\n */\n slashCommandSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * Whether the input allows for block quote.\n */\n allowBlockquote: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bold to be introduced in the text.\n */\n allowBold: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bullet list to be introduced in the text.\n */\n allowBulletList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for italic to be introduced in the text.\n */\n allowItalic: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for strike to be introduced in the text.\n */\n allowStrike: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for underline to be introduced in the text.\n */\n allowUnderline: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows codeblock to be introduced in the text.\n */\n allowCodeblock: {\n type: Boolean,\n default: true,\n },\n },\n\n emits: [\n /**\n * Fires when send button is clicked\n *\n * @event submit\n * @type {String}\n */\n 'submit',\n\n /**\n * Fires when media is selected from image button\n *\n * @event select-media\n * @type {Array}\n */\n 'select-media',\n\n /**\n * Fires when media is dropped into the message input\n *\n * @event add-media\n * @type {Array}\n */\n 'add-media',\n\n /**\n * Fires when media is pasted into the message input\n *\n * @event paste-media\n * @type {Array}\n */\n 'paste-media',\n\n /**\n * Fires when cancel button is pressed (only on edit mode)\n *\n * @event cancel\n * @type {Boolean}\n */\n 'cancel',\n\n /**\n * Fires when skin tone is selected from the emoji picker\n *\n * @event skin-tone\n * @type {String}\n */\n 'skin-tone',\n\n /**\n * Fires when emoji is selected from the emoji picker\n *\n * @event selected-emoji\n * @type {String}\n */\n 'selected-emoji',\n\n /**\n * Fires when a slash command is selected\n *\n * @event selected-command\n * @type {String}\n */\n 'selected-command',\n\n /**\n * Fires when meeting pill is closed\n *\n * @event meeting-pill-close\n * @type {String}\n */\n 'meeting-pill-close',\n\n /**\n * Event to sync the value with the parent\n * @event update:value\n * @type {String|JSON}\n */\n 'update:value',\n ],\n\n data () {\n return {\n additionalExtensions: [meetingPill],\n internalInputValue: this.value, // internal input content\n imagePickerFocus: false,\n emojiPickerFocus: false,\n emojiPickerOpened: false,\n };\n },\n\n computed: {\n inputLength () {\n return this.internalInputValue.length;\n },\n\n displayCharacterLimitWarning () {\n return Boolean(this.showCharacterLimit) &&\n ((this.showCharacterLimit.count - this.inputLength) <= this.showCharacterLimit.warning);\n },\n\n characterLimitTooltipEnabled () {\n return this.showCharacterLimit.message && (this.showCharacterLimit.count - this.inputLength < 0);\n },\n\n isSendDisabled () {\n return this.disableSend ||\n (this.showCharacterLimit && this.inputLength > this.showCharacterLimit.count);\n },\n\n computedCloseButtonProps () {\n return {\n ariaLabel: 'Close',\n };\n },\n\n emojiPickerHovered () {\n return this.emojiPickerFocus || this.emojiPickerOpened;\n },\n },\n\n watch: {\n value (newValue) {\n this.internalInputValue = newValue;\n },\n\n emojiPickerOpened (newValue) {\n if (!newValue) {\n this.$refs.richTextEditor?.focusEditor();\n }\n },\n },\n\n methods: {\n // Mousedown instead of click because it fires before the blur event.\n onMousedown (e) {\n const isWithinInput = this.$refs.richTextEditor.$el.querySelector('.tiptap').contains(e.target);\n\n // If the click is not within the tiptap rich text editor input itself, but still within the wrapping div,\n // focus the editor.\n if (!isWithinInput) {\n // Prevent default prevents blurring the rich text editor input when it is already focused.\n e.preventDefault();\n this.$refs.richTextEditor.focusEditor();\n }\n },\n\n onDrop (e) {\n const dt = e.dataTransfer;\n const files = Array.from(dt.files);\n this.$emit('add-media', files);\n },\n\n onPaste (e) {\n if (e.clipboardData.files.length) {\n e.stopPropagation();\n e.preventDefault();\n const files = [...e.clipboardData.files];\n this.$emit('paste-media', files);\n }\n },\n\n onSkinTone (skinTone) {\n this.$emit('skin-tone', skinTone);\n },\n\n onSelectEmoji (emoji) {\n if (!emoji) {\n return;\n }\n\n // Insert emoji into the editor\n this.$refs.richTextEditor.editor.commands.insertContent({\n type: 'emoji',\n attrs: {\n code: emoji.shortname,\n },\n });\n this.$emit('selected-emoji', emoji);\n },\n\n onSelectImage () {\n this.$refs.messageInputImageUpload.$refs.input.click();\n },\n\n onImageUpload () {\n this.$emit('select-media', this.$refs.messageInputImageUpload.$refs.input.files);\n },\n\n toggleEmojiPicker () {\n this.emojiPickerOpened = !this.emojiPickerOpened;\n },\n\n onSend () {\n if (this.isSendDisabled) {\n return;\n }\n this.$emit('submit', this.internalInputValue);\n },\n\n onCancel () {\n this.$emit('cancel');\n },\n\n onInput (event) {\n this.$emit('update:value', event);\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-message-input {\n display: flex;\n flex-direction: column;\n border-radius: var(--dt-size-radius-400);\n border: var(--dt-size-border-100) solid;\n border-color: var(--dt-color-border-default);\n cursor: text;\n\n &:focus-within {\n border-color: var(--dt-color-border-bold);\n box-shadow: var(--dt-shadow-small);\n }\n\n &__editor-wrapper {\n padding: var(--dt-space-400) var(--dt-space-500) var(--dt-space-300);\n }\n\n &__remaining-char-tooltip {\n margin-top: auto;\n margin-bottom: auto;\n }\n\n &__remaining-char {\n color: var(--dt-color-foreground-critical);\n font-size: var(--dt-font-size-100);\n margin-right: var(--dt-space-500);\n }\n\n &__send-button--disabled {\n background-color: unset;\n color: var(--dt-color-foreground-muted);\n cursor: default;\n }\n\n &__cancel-button {\n margin-right: var(--dt-space-300);\n }\n\n &__bottom-section {\n display: flex;\n justify-content: space-between;\n padding: var(--dt-space-300) var(--dt-space-400);\n }\n\n &__bottom-section-left {\n display: flex;\n }\n\n &__bottom-section-right {\n display: flex;\n }\n\n &__image-input {\n position: absolute;\n }\n}\n</style>\n"],"names":["_sfc_main","NodeViewWrapper","DtItemLayout","DtIcon","DtButton","nodeViewProps","Node","VueNodeViewRenderer","mergeAttributes","DtEmojiPicker","DtInput","DtPopover","DtRichTextEditor","DtTooltip","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","RICH_TEXT_EDITOR_OUTPUT_FORMATS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,iBAAAC,KAAA;AAAA,IACA,cAAAC,eAAA;AAAA,IACA,QAAAC,SAAA;AAAA,IACA,UAAAC,WAAA;AAAA,EACA;AAAA,EAEA,OAAAC,KAAA;AAAA,EAEA,OAAA,CAAA,oBAAA;AAAA,EAEA,SAAA;AAAA,IACA,MAAA,GAAA;AACA,WAAA,QAAA,MAAA,sBAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AC1DA,MAAeC,cAAAA,KAAAA,KAAK,OAAO;AAAA,EAEzB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EAER,cAAe;AACb,WAAOC,KAAAA,oBAAoB,WAAW;AAAA,EACvC;AAAA,EAED,gBAAiB;AACf,WAAO;AAAA,MACL,MAAM;AAAA,QACJ,SAAS;AAAA,MACV;AAAA,MACD,2BAA2B,CAAE;AAAA,IACnC;AAAA,EACG;AAAA,EAED,YAAa;AACX,WAAO;AAAA,MACL;AAAA,QACE,KAAK;AAAA,MACN;AAAA,IACP;AAAA,EACG;AAAA,EAED,WAAY,EAAE,QAAQ;AACpB,WAAO;AAAA,EACR;AAAA,EAED,WAAY,EAAE,kBAAkB;AAC9B,WAAO,CAAC,gBAAgBC,qBAAgB,cAAc,CAAC;AAAA,EACxD;AACH,CAAC;AC6LD,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAJ,WAAA;AAAA,IACA,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|
|
516
516
|
}
|
|
517
517
|
},
|
|
518
518
|
methods: {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
519
|
+
// Mousedown instead of click because it fires before the blur event.
|
|
520
|
+
onMousedown(e) {
|
|
521
|
+
const isWithinInput = this.$refs.richTextEditor.$el.querySelector(".tiptap").contains(e.target);
|
|
522
|
+
if (!isWithinInput) {
|
|
523
|
+
e.preventDefault();
|
|
524
|
+
this.$refs.richTextEditor.focusEditor();
|
|
525
|
+
}
|
|
522
526
|
},
|
|
523
527
|
onDrop(e) {
|
|
524
|
-
e.stopPropagation();
|
|
525
|
-
e.preventDefault();
|
|
526
528
|
const dt = e.dataTransfer;
|
|
527
529
|
const files = Array.from(dt.files);
|
|
528
530
|
this.$emit("add-media", files);
|
|
@@ -576,7 +578,12 @@ const _sfc_main = {
|
|
|
576
578
|
var _sfc_render = function render2() {
|
|
577
579
|
var _a;
|
|
578
580
|
var _vm = this, _c = _vm._self._c;
|
|
579
|
-
return _c("div", { class: ["dt-message-input"], attrs: { "data-qa": "dt-message-input", "role": "presentation" }, on: { "
|
|
581
|
+
return _c("div", { class: ["dt-message-input"], attrs: { "data-qa": "dt-message-input", "role": "presentation" }, on: { "dragover": function($event) {
|
|
582
|
+
$event.preventDefault();
|
|
583
|
+
}, "drop": function($event) {
|
|
584
|
+
$event.preventDefault();
|
|
585
|
+
return _vm.onDrop.apply(null, arguments);
|
|
586
|
+
}, "paste": _vm.onPaste, "mousedown": _vm.onMousedown } }, [_vm._t("top"), _c("div", { directives: [{ name: "dt-scrollbar", rawName: "v-dt-scrollbar" }], staticClass: "dt-message-input__editor-wrapper", style: { "max-height": _vm.maxHeight } }, [_c("dt-rich-text-editor", _vm._g(_vm._b({ ref: "richTextEditor", attrs: { "editable": _vm.editable, "input-aria-label": _vm.inputAriaLabel, "input-class": _vm.inputClass, "output-format": _vm.outputFormat, "auto-focus": _vm.autoFocus, "link": _vm.link, "placeholder": _vm.placeholder, "prevent-typing": _vm.preventTyping, "mention-suggestion": _vm.mentionSuggestion, "channel-suggestion": _vm.channelSuggestion, "slash-command-suggestion": _vm.slashCommandSuggestion, "allow-blockquote": _vm.allowBlockquote, "allow-bold": _vm.allowBold, "allow-bullet-list": _vm.allowBulletList, "allow-codeblock": _vm.allowCodeblock, "allow-italic": _vm.allowItalic, "allow-strike": _vm.allowStrike, "allow-underline": _vm.allowUnderline, "additional-extensions": _vm.additionalExtensions }, on: { "input": _vm.onInput, "enter": _vm.onSend }, model: { value: _vm.internalInputValue, callback: function($$v) {
|
|
580
587
|
_vm.internalInputValue = $$v;
|
|
581
588
|
}, expression: "internalInputValue" } }, "dt-rich-text-editor", _vm.$attrs, false), _vm.$listeners))], 1), _vm._t("middle"), _c("section", { staticClass: "dt-message-input__bottom-section" }, [_c("div", { staticClass: "dt-message-input__bottom-section-left" }, [_vm.showImagePicker ? _c("dt-button", { directives: [{ name: "dt-tooltip", rawName: "v-dt-tooltip:top-start", value: (_a = _vm.showImagePicker) == null ? void 0 : _a.tooltipLabel, expression: "showImagePicker?.tooltipLabel", arg: "top-start" }], attrs: { "data-qa": "dt-message-input-image-btn", "size": "sm", "circle": "", "kind": _vm.imagePickerFocus ? "default" : "muted", "importance": "clear", "aria-label": _vm.showImagePicker.ariaLabel }, on: { "click": _vm.onSelectImage, "mouseenter": function($event) {
|
|
582
589
|
_vm.imagePickerFocus = true;
|