@dialpad/dialtone-vue 2.126.0 → 2.127.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/chunks/_plugin-vue2_normalizer-ZK80B3OL.js +2 -0
- package/dist/chunks/_plugin-vue2_normalizer-ZK80B3OL.js.map +1 -0
- package/dist/chunks/dropdown-zhMEz3bn.js +2 -0
- package/dist/chunks/dropdown-zhMEz3bn.js.map +1 -0
- package/dist/chunks/dropdown_constants-KHFvVI2L.js +2 -0
- package/dist/chunks/dropdown_constants-KHFvVI2L.js.map +1 -0
- package/dist/chunks/icon_constants-2S_OSQ1t.js +2 -0
- package/dist/chunks/icon_constants-2S_OSQ1t.js.map +1 -0
- package/dist/chunks/index-2jPosQBn.js +3 -0
- package/dist/chunks/index-2jPosQBn.js.map +1 -0
- package/dist/chunks/index-sdfB7Aok.js +2 -0
- package/dist/chunks/index-sdfB7Aok.js.map +1 -0
- package/dist/chunks/input-o-fc1X4b.js +2 -0
- package/dist/chunks/input-o-fc1X4b.js.map +1 -0
- package/dist/chunks/input_group-j2gTtc1C.js +2 -0
- package/dist/chunks/input_group-j2gTtc1C.js.map +1 -0
- package/dist/chunks/keyboard_list_navigation-N74Bpdq7.js +2 -0
- package/dist/chunks/keyboard_list_navigation-N74Bpdq7.js.map +1 -0
- package/dist/chunks/link_constants-Kn6kP4i1.js +2 -0
- package/dist/chunks/link_constants-Kn6kP4i1.js.map +1 -0
- package/dist/chunks/list_item_constants-Tsz5CO1m.js +2 -0
- package/dist/chunks/list_item_constants-Tsz5CO1m.js.map +1 -0
- package/dist/chunks/modal-qEzlo0Sj.js +2 -0
- package/dist/chunks/modal-qEzlo0Sj.js.map +1 -0
- package/dist/chunks/notice_action-u3ZKIhit.js +2 -0
- package/dist/chunks/notice_action-u3ZKIhit.js.map +1 -0
- package/dist/chunks/notice_constants-mC6al2Dm.js +2 -0
- package/dist/chunks/notice_constants-mC6al2Dm.js.map +1 -0
- package/dist/chunks/popover_constants-hOEhklvr.js +2 -0
- package/dist/chunks/popover_constants-hOEhklvr.js.map +1 -0
- package/dist/chunks/sr_only_close_button-ErijKGYR.js +3 -0
- package/dist/chunks/sr_only_close_button-ErijKGYR.js.map +1 -0
- package/dist/chunks/stack_constants-m9Ickqw0.js +2 -0
- package/dist/chunks/stack_constants-m9Ickqw0.js.map +1 -0
- package/dist/chunks/tab-7hJQSLFx.js +2 -0
- package/dist/chunks/tab-7hJQSLFx.js.map +1 -0
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.cjs +2 -0
- package/dist/dialtone-vue.cjs.map +1 -0
- package/dist/lib/attachment-carousel.cjs +2 -0
- package/dist/lib/attachment-carousel.cjs.map +1 -0
- package/dist/lib/attachment-carousel.js +2 -3
- package/dist/lib/attachment-carousel.js.map +1 -1
- package/dist/lib/avatar.cjs +2 -0
- package/dist/lib/avatar.cjs.map +1 -0
- package/dist/lib/avatar.js +2 -3
- package/dist/lib/avatar.js.map +1 -1
- package/dist/lib/badge.cjs +2 -0
- package/dist/lib/badge.cjs.map +1 -0
- package/dist/lib/badge.js +2 -3
- package/dist/lib/badge.js.map +1 -1
- package/dist/lib/banner.cjs +3 -0
- package/dist/lib/banner.cjs.map +1 -0
- package/dist/lib/banner.js +2 -3
- package/dist/lib/banner.js.map +1 -1
- package/dist/lib/breadcrumbs.cjs +2 -0
- package/dist/lib/breadcrumbs.cjs.map +1 -0
- package/dist/lib/button-group.cjs +2 -0
- package/dist/lib/button-group.cjs.map +1 -0
- package/dist/lib/button.cjs +2 -0
- package/dist/lib/button.cjs.map +1 -0
- package/dist/lib/callbar-button-with-popover.cjs +2 -0
- package/dist/lib/callbar-button-with-popover.cjs.map +1 -0
- package/dist/lib/callbar-button-with-popover.js +2 -3
- package/dist/lib/callbar-button-with-popover.js.map +1 -1
- package/dist/lib/callbar-button.cjs +2 -0
- package/dist/lib/callbar-button.cjs.map +1 -0
- package/dist/lib/callbox.cjs +2 -0
- package/dist/lib/callbox.cjs.map +1 -0
- package/dist/lib/callbox.js +2 -3
- package/dist/lib/callbox.js.map +1 -1
- package/dist/lib/card.cjs +2 -0
- package/dist/lib/card.cjs.map +1 -0
- package/dist/lib/checkbox-group.cjs +2 -0
- package/dist/lib/checkbox-group.cjs.map +1 -0
- package/dist/lib/checkbox.cjs +2 -0
- package/dist/lib/checkbox.cjs.map +1 -0
- package/dist/lib/chip.cjs +2 -0
- package/dist/lib/chip.cjs.map +1 -0
- package/dist/lib/chip.js +2 -3
- package/dist/lib/chip.js.map +1 -1
- package/dist/lib/codeblock.cjs +3 -0
- package/dist/lib/codeblock.cjs.map +1 -0
- package/dist/lib/collapsible.cjs +2 -0
- package/dist/lib/collapsible.cjs.map +1 -0
- package/dist/lib/collapsible.js +2 -3
- package/dist/lib/collapsible.js.map +1 -1
- package/dist/lib/combobox-multi-select.cjs +2 -0
- package/dist/lib/combobox-multi-select.cjs.map +1 -0
- package/dist/lib/combobox-with-popover.cjs +2 -0
- package/dist/lib/combobox-with-popover.cjs.map +1 -0
- package/dist/lib/combobox-with-popover.js +1 -1
- package/dist/lib/combobox.cjs +2 -0
- package/dist/lib/combobox.cjs.map +1 -0
- package/dist/lib/constants.cjs +2 -0
- package/dist/lib/constants.cjs.map +1 -0
- package/dist/lib/contact-info.cjs +2 -0
- package/dist/lib/contact-info.cjs.map +1 -0
- package/dist/lib/contact-info.js +2 -3
- package/dist/lib/contact-info.js.map +1 -1
- package/dist/lib/contact-row.cjs +2 -0
- package/dist/lib/contact-row.cjs.map +1 -0
- package/dist/lib/datepicker.cjs +2 -0
- package/dist/lib/datepicker.cjs.map +1 -0
- package/dist/lib/datepicker.js +12 -13
- package/dist/lib/datepicker.js.map +1 -1
- package/dist/lib/dates.cjs +2 -0
- package/dist/lib/dates.cjs.map +1 -0
- package/dist/lib/description-list.cjs +2 -0
- package/dist/lib/description-list.cjs.map +1 -0
- package/dist/lib/dropdown.cjs +2 -0
- package/dist/lib/dropdown.cjs.map +1 -0
- package/dist/lib/dropdown.js +6 -7
- package/dist/lib/dropdown.js.map +1 -1
- package/dist/lib/editor.cjs +2 -0
- package/dist/lib/editor.cjs.map +1 -0
- package/dist/lib/emoji-picker.cjs +2 -0
- package/dist/lib/emoji-picker.cjs.map +1 -0
- package/dist/lib/emoji-picker.js +2 -3
- package/dist/lib/emoji-picker.js.map +1 -1
- package/dist/lib/emoji-row.cjs +2 -0
- package/dist/lib/emoji-row.cjs.map +1 -0
- package/dist/lib/emoji-text-wrapper.cjs +2 -0
- package/dist/lib/emoji-text-wrapper.cjs.map +1 -0
- package/dist/lib/emoji.cjs +2 -0
- package/dist/lib/emoji.cjs.map +1 -0
- package/dist/lib/feed-item-row.cjs +2 -0
- package/dist/lib/feed-item-row.cjs.map +1 -0
- package/dist/lib/feed-item-row.js +2 -3
- package/dist/lib/feed-item-row.js.map +1 -1
- package/dist/lib/feed-pill.cjs +2 -0
- package/dist/lib/feed-pill.cjs.map +1 -0
- package/dist/lib/feed-pill.js +2 -3
- package/dist/lib/feed-pill.js.map +1 -1
- package/dist/lib/general-row.cjs +2 -0
- package/dist/lib/general-row.cjs.map +1 -0
- package/dist/lib/group-row.cjs +2 -0
- package/dist/lib/group-row.cjs.map +1 -0
- package/dist/lib/group-row.js +1 -1
- package/dist/lib/grouped-chip.cjs +2 -0
- package/dist/lib/grouped-chip.cjs.map +1 -0
- package/dist/lib/grouped-chip.js +6 -7
- package/dist/lib/grouped-chip.js.map +1 -1
- package/dist/lib/hovercard.cjs +2 -0
- package/dist/lib/hovercard.cjs.map +1 -0
- package/dist/lib/hovercard.js +6 -7
- package/dist/lib/hovercard.js.map +1 -1
- package/dist/lib/icon.cjs +2 -0
- package/dist/lib/icon.cjs.map +1 -0
- package/dist/lib/icon.js +14 -38
- package/dist/lib/icon.js.map +1 -1
- package/dist/lib/image-viewer.cjs +2 -0
- package/dist/lib/image-viewer.cjs.map +1 -0
- package/dist/lib/image-viewer.js +11 -12
- package/dist/lib/image-viewer.js.map +1 -1
- package/dist/lib/input-group.cjs +2 -0
- package/dist/lib/input-group.cjs.map +1 -0
- package/dist/lib/input.cjs +2 -0
- package/dist/lib/input.cjs.map +1 -0
- package/dist/lib/item-layout.cjs +2 -0
- package/dist/lib/item-layout.cjs.map +1 -0
- package/dist/lib/ivr-node.cjs +2 -0
- package/dist/lib/ivr-node.cjs.map +1 -0
- package/dist/lib/ivr-node.js +4 -5
- package/dist/lib/ivr-node.js.map +1 -1
- package/dist/lib/keyboard-shortcut.cjs +2 -0
- package/dist/lib/keyboard-shortcut.cjs.map +1 -0
- package/dist/lib/keyboard-shortcut.js +4 -5
- package/dist/lib/keyboard-shortcut.js.map +1 -1
- package/dist/lib/lazy-show.cjs +2 -0
- package/dist/lib/lazy-show.cjs.map +1 -0
- package/dist/lib/link.cjs +2 -0
- package/dist/lib/link.cjs.map +1 -0
- package/dist/lib/list-item-group.cjs +2 -0
- package/dist/lib/list-item-group.cjs.map +1 -0
- package/dist/lib/list-item.cjs +2 -0
- package/dist/lib/list-item.cjs.map +1 -0
- package/dist/lib/list-item.js +2 -3
- package/dist/lib/list-item.js.map +1 -1
- package/dist/lib/message-input.cjs +2 -0
- package/dist/lib/message-input.cjs.map +1 -0
- package/dist/lib/message-input.js +89 -47
- package/dist/lib/message-input.js.map +1 -1
- package/dist/lib/mixins.cjs +2 -0
- package/dist/lib/mixins.cjs.map +1 -0
- package/dist/lib/modal.cjs +3 -0
- package/dist/lib/modal.cjs.map +1 -0
- package/dist/lib/modal.js +10 -11
- package/dist/lib/modal.js.map +1 -1
- package/dist/lib/notice.cjs +2 -0
- package/dist/lib/notice.cjs.map +1 -0
- package/dist/lib/notice.js +2 -3
- package/dist/lib/notice.js.map +1 -1
- package/dist/lib/pagination.cjs +2 -0
- package/dist/lib/pagination.cjs.map +1 -0
- package/dist/lib/pagination.js +2 -3
- package/dist/lib/pagination.js.map +1 -1
- package/dist/lib/popover.cjs +2 -0
- package/dist/lib/popover.cjs.map +1 -0
- package/dist/lib/popover.js +4 -5
- package/dist/lib/popover.js.map +1 -1
- package/dist/lib/presence.cjs +2 -0
- package/dist/lib/presence.cjs.map +1 -0
- package/dist/lib/radio-group.cjs +2 -0
- package/dist/lib/radio-group.cjs.map +1 -0
- package/dist/lib/radio.cjs +2 -0
- package/dist/lib/radio.cjs.map +1 -0
- package/dist/lib/rich-text-editor.cjs +2 -0
- package/dist/lib/rich-text-editor.cjs.map +1 -0
- package/dist/lib/rich-text-editor.js +106 -74
- package/dist/lib/rich-text-editor.js.map +1 -1
- package/dist/lib/root-layout.cjs +2 -0
- package/dist/lib/root-layout.cjs.map +1 -0
- package/dist/lib/select-menu.cjs +2 -0
- package/dist/lib/select-menu.cjs.map +1 -0
- package/dist/lib/settings-menu-button.cjs +2 -0
- package/dist/lib/settings-menu-button.cjs.map +1 -0
- package/dist/lib/settings-menu-button.js +2 -3
- package/dist/lib/settings-menu-button.js.map +1 -1
- package/dist/lib/skeleton.cjs +2 -0
- package/dist/lib/skeleton.cjs.map +1 -0
- package/dist/lib/stack.cjs +2 -0
- package/dist/lib/stack.cjs.map +1 -0
- package/dist/lib/tabs.cjs +2 -0
- package/dist/lib/tabs.cjs.map +1 -0
- package/dist/lib/time-pill.cjs +2 -0
- package/dist/lib/time-pill.cjs.map +1 -0
- package/dist/lib/toast.cjs +2 -0
- package/dist/lib/toast.cjs.map +1 -0
- package/dist/lib/toast.js +2 -3
- package/dist/lib/toast.js.map +1 -1
- package/dist/lib/toggle.cjs +2 -0
- package/dist/lib/toggle.cjs.map +1 -0
- package/dist/lib/tooltip-directive.cjs +2 -0
- package/dist/lib/tooltip-directive.cjs.map +1 -0
- package/dist/lib/tooltip.cjs +2 -0
- package/dist/lib/tooltip.cjs.map +1 -0
- package/dist/lib/top-banner-info.cjs +2 -0
- package/dist/lib/top-banner-info.cjs.map +1 -0
- package/dist/lib/unread-pill.cjs +2 -0
- package/dist/lib/unread-pill.cjs.map +1 -0
- package/dist/lib/unread-pill.js +3 -4
- package/dist/lib/unread-pill.js.map +1 -1
- package/dist/lib/utils.cjs +2 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/validation-messages.cjs +2 -0
- package/dist/lib/validation-messages.cjs.map +1 -0
- package/dist/lib/validators.cjs +2 -0
- package/dist/lib/validators.cjs.map +1 -0
- package/dist/style.css +1 -1
- package/dist/types/components/avatar/avatar.vue.d.ts +1 -1
- package/dist/types/components/button/button.vue.d.ts +2 -2
- package/dist/types/components/card/card.vue.d.ts +1 -1
- package/dist/types/components/chip/chip.vue.d.ts +1 -1
- package/dist/types/components/collapsible/collapsible.vue.d.ts +2 -2
- package/dist/types/components/combobox/combobox.vue.d.ts +1 -1
- package/dist/types/components/dropdown/dropdown.vue.d.ts +1 -1
- package/dist/types/components/emoji/emoji.vue.d.ts +1 -1
- package/dist/types/components/icon/icon.vue.d.ts +2 -22
- package/dist/types/components/icon/icon.vue.d.ts.map +1 -1
- package/dist/types/components/list_item_group/list_item_group.vue.d.ts +1 -1
- package/dist/types/components/modal/modal.vue.d.ts +2 -2
- package/dist/types/components/popover/popover_header_footer.vue.d.ts +1 -1
- package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +91 -1
- package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
- package/dist/types/components/skeleton/skeleton-paragraph.vue.d.ts +3 -3
- package/dist/types/components/skeleton/skeleton-shape.vue.d.ts +2 -2
- package/dist/types/components/skeleton/skeleton-text.vue.d.ts +2 -2
- package/dist/types/components/skeleton/skeleton.vue.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.vue.d.ts +2 -2
- package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
- package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
- package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +2 -2
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +90 -0
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
- package/dist/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -1
- package/package.json +10 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-show.cjs","sources":["../../components/lazy_show/lazy_show.vue"],"sourcesContent":["<template>\n <!-- applies the transition on initial render -->\n <transition\n :name=\"transition\"\n :appear=\"appear\"\n :css=\"isCSSEnabled\"\n v-on=\"$listeners\"\n >\n <div\n v-show=\"show\"\n v-on=\"$listeners\"\n >\n <!-- @slot Slot for main content -->\n <slot v-if=\"initialized\" />\n </div>\n </transition>\n</template>\n\n<script>\n/**\n * Lazy Show is a utility component that prevents its children from being rendered until the first time it is shown.\n * @see https://dialtone.dialpad.com/components/lazy_show.html\n */\nexport default {\n name: 'DtLazyShow',\n\n /******************\n * PROPS *\n ******************/\n props: {\n /**\n * Whether the child slot is shown.\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * A valid Vue enter/leave CSS transition name.\n */\n transition: {\n type: String,\n default: null,\n },\n\n /**\n * Enable/Disable transition animation\n * @values true, false\n */\n appear: {\n type: Boolean,\n default: false,\n },\n },\n\n /******************\n * DATA *\n ******************/\n data () {\n return {\n initialized: !!this.show,\n };\n },\n\n computed: {\n /**\n * Set the css property to false when running tests only.\n * Refer to: https://vuejs.org/guide/built-ins/transition.html#javascript-hooks for details about\n * transition `css` property\n * @returns {boolean}\n */\n isCSSEnabled () {\n return process.env.NODE_ENV !== 'test';\n },\n },\n\n /******************\n * WATCH *\n ******************/\n watch: {\n show: function (newValue) {\n if (!newValue || this.initialized) return;\n\n this.initialized = true;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","newValue"],"mappings":"iJAuBAA,EAAA,CACA,KAAA,aAKA,MAAA,CAKA,KAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,WAAA,CACA,KAAA,OACA,QAAA,IACA,EAMA,OAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EAKA,MAAA,CACA,MAAA,CACA,YAAA,CAAA,CAAA,KAAA,IACA,CACA,EAEA,SAAA,CAOA,cAAA,CACA,OAAA,QAAA,IAAA,WAAA,MACA,CACA,EAKA,MAAA,CACA,KAAA,SAAAC,EAAA,CACA,CAAAA,GAAA,KAAA,cAEA,KAAA,YAAA,GACA,CACA,CACA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../chunks/link_constants-Kn6kP4i1.js"),a=require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js"),s={name:"DtLink",props:{kind:{type:String,default:"",validator(e){return n.L.includes(e)}}},emits:["click","focusin","focusout"],data(){return{LINK_KIND_MODIFIERS:n.a}}};var i=function(){var t=this,r=t._self._c;return r("a",t._g({class:["d-link",t.LINK_KIND_MODIFIERS[t.kind]],attrs:{"data-qa":"dt-link",href:"href"in t.$attrs?t.$attrs.href:"javascript:void(0)"}},t.$listeners),[t._t("default")],2)},_=[],l=a.n(s,i,_,!1,null,null,null,null);const c=l.exports;exports.LINK_KIND_MODIFIERS=n.a;exports.LINK_VARIANTS=n.L;exports.DtLink=c;
|
|
2
|
+
//# sourceMappingURL=link.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.cjs","sources":["../../components/link/link.vue"],"sourcesContent":["<template>\n <a\n :class=\"[\n 'd-link',\n LINK_KIND_MODIFIERS[kind],\n ]\"\n data-qa=\"dt-link\"\n :href=\"'href' in $attrs ? $attrs.href : 'javascript:void(0)'\"\n v-on=\"$listeners\"\n >\n <!-- @slot Slot for main content -->\n <slot />\n </a>\n</template>\n\n<script>\nimport { LINK_VARIANTS, LINK_KIND_MODIFIERS } from './link_constants';\n\n/**\n * A link is a navigational element that can be found on its own, within other text, or directly following content.\n * @property {String} href attribute\n * @property {String} rel attribute\n * @see https://dialtone.dialpad.com/components/link.html\n */\nexport default {\n name: 'DtLink',\n\n props: {\n /**\n * Applies the link variant styles\n * @values null, danger, warning, success, muted, inverted, mention\n */\n kind: {\n type: String,\n default: '',\n validator (kind) {\n return LINK_VARIANTS.includes(kind);\n },\n },\n },\n\n emits: [\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Native focus in event\n *\n * @event focusin\n * @type {FocusEvent}\n */\n 'focusin',\n\n /**\n * Native focus out event\n *\n * @event focusout\n * @type {FocusEvent}\n */\n 'focusout',\n ],\n\n data () {\n return {\n LINK_KIND_MODIFIERS,\n };\n },\n};\n</script>\n"],"names":["_sfc_main","kind","LINK_VARIANTS","LINK_KIND_MODIFIERS"],"mappings":"mMAwBAA,EAAA,CACA,KAAA,SAEA,MAAA,CAKA,KAAA,CACA,KAAA,OACA,QAAA,GACA,UAAAC,EAAA,CACA,OAAAC,EAAA,EAAA,SAAAD,CAAA,CACA,CACA,CACA,EAEA,MAAA,CAOA,QAQA,UAQA,UACA,EAEA,MAAA,CACA,MAAA,CACA,oBAAAE,EAAA,CACA,CACA,CACA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./utils.cjs"),i=require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js");require("./constants.cjs");require("vue");const n={name:"DtListItemGroup",props:{id:{type:String,default(){return r.getUniqueString()}},heading:{type:String,default:""},headingClass:{type:[String,Array,Object],default:""},listClass:{type:[String,Array,Object],default:""}}};var a=function(){var e=this,t=e._self._c;return t("ul",{class:["d-list-item-group",e.listClass],attrs:{id:e.id,role:"group","data-qa":"dt-dropdown-list-wrapper","aria-labelledby":`${e.id}-heading`}},[e.heading?t("li",{class:["dt-dropdown-list--header",e.headingClass],attrs:{id:`${e.id}-heading`,role:"presentation","data-qa":"dt-dropdown-list-heading"}},[e._t("headingSlot",function(){return[e._v(" "+e._s(e.heading)+" ")]})],2):e._e(),e._t("default")],2)},l=[],s=i.n(n,a,l,!1,null,null,null,null);const d=s.exports;exports.DtListItemGroup=d;
|
|
2
|
+
//# sourceMappingURL=list-item-group.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-item-group.cjs","sources":["../../components/list_item_group/list_item_group.vue"],"sourcesContent":["<template>\n <ul\n :id=\"id\"\n :class=\"['d-list-item-group', listClass]\"\n role=\"group\"\n data-qa=\"dt-dropdown-list-wrapper\"\n :aria-labelledby=\"`${id}-heading`\"\n >\n <li\n v-if=\"heading\"\n :id=\"`${id}-heading`\"\n role=\"presentation\"\n data-qa=\"dt-dropdown-list-heading\"\n :class=\"['dt-dropdown-list--header', headingClass]\"\n >\n <!-- @slot Slot for heading, will override heading prop. -->\n <slot name=\"headingSlot\">\n {{ heading }}\n </slot>\n </li>\n <!-- @slot Slot for the list component -->\n <slot />\n </ul>\n</template>\n\n<script>\nimport {} from './list_item_group_constants';\nimport { getUniqueString } from '@/common/utils';\n\nexport default {\n name: 'DtListItemGroup',\n\n props: {\n /**\n * Id of the List Item Group\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * List's heading.\n */\n heading: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class to style the heading\n */\n headingClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class for the wrapper list element.\n */\n listClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n};\n</script>\n"],"names":["_sfc_main","getUniqueString"],"mappings":"oNA6BA,MAAAA,EAAA,CACA,KAAA,kBAEA,MAAA,CAIA,GAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAC,EAAA,gBAAA,CAAA,CACA,EAKA,QAAA,CACA,KAAA,OACA,QAAA,EACA,EAKA,aAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAKA,UAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,CACA,CACA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../chunks/list_item_constants-Tsz5CO1m.js"),o=require("./utils.cjs"),r=require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js"),n=require("./item-layout.cjs"),u=require("./icon.cjs");require("./constants.cjs");require("vue");require("@dialpad/dialtone-icons/vue2");require("../chunks/icon_constants-2S_OSQ1t.js");require("@dialpad/dialtone-icons/icons.json");const a=["listitem","menuitem","option"],c={name:"DtListItem",components:{DtItemLayout:n.DtItemLayout,DtIcon:u.DtIcon},inject:{highlightId:{default:null}},props:{id:{type:String,default(){return o.default.getUniqueString()}},role:{type:String,default:"listitem",validator:t=>a.includes(t)},elementType:{type:String,default:"li"},type:{type:String,default:i.L.DEFAULT,validator:t=>Object.values(i.L).includes(t)},navigationType:{type:String,default:i.a.NONE,validator:t=>Object.values(i.a).includes(t)},selected:{type:Boolean,default:!1}},emits:["click","keydown","mousemove","mouseleave"],data(){return{injected:!1,mouseHighlighted:!1}},computed:{listItemType(){switch(this.type){case i.L.DEFAULT:return n.DtItemLayout;default:return null}},listItemListeners(){return{...this.$listeners,keydown:t=>{["enter","space"].includes(t.code.toLowerCase())&&this.onClick(t),this.$emit("keydown",t)},mousemove:t=>{this.onMouseHover(t),this.$emit("mousemove",t)},mouseleave:t=>{this.onMouseLeave(t),this.$emit("mouseleave",t)}}},isHighlighted(){return this.isHoverable?this.highlightId&&this.highlightId()?this.id===this.highlightId():this.mouseHighlighted:!1},isFocusable(){return this.navigationType===i.a.TAB},isHoverable(){return this.navigationType!==i.a.NONE}},methods:{onClick(t){this.$emit("click",t)},onMouseHover(){this.mouseHighlighted=!0},onMouseLeave(){this.mouseHighlighted=!1}}};var d=function(){var e=this,s=e._self._c;return s(e.elementType,e._g({tag:"component",class:["dt-list-item",{"dt-list-item--focusable":e.isFocusable,"dt-list-item--highlighted":e.isHighlighted,"dt-list-item--static":!e.isHoverable}],attrs:{id:e.id,tabindex:e.isFocusable?0:-1,role:e.role,"aria-selected":e.role==="listitem"?void 0:e.isHighlighted}},e.listItemListeners),[e.listItemType?s(e.listItemType,{tag:"component",scopedSlots:e._u([e._l(e.$slots,function(_,l){return{key:l,fn:function(){return[e._t(l)]},proxy:!0}}),e.selected?{key:"selected",fn:function(){return[s("dt-icon",{staticClass:"dt-list-item--selected-icon",attrs:{name:"check",size:"400"}})]},proxy:!0}:null],null,!0)}):e._t("default")],2)},m=[],h=r.n(c,d,m,!1,null,null,null,null);const g=h.exports;exports.LIST_ITEM_NAVIGATION_TYPES=i.a;exports.LIST_ITEM_TYPES=i.L;exports.DtListItem=g;
|
|
2
|
+
//# sourceMappingURL=list-item.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-item.cjs","sources":["../../components/list_item/list_item.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n :id=\"id\"\n :class=\"['dt-list-item', {\n 'dt-list-item--focusable': isFocusable,\n 'dt-list-item--highlighted': isHighlighted,\n 'dt-list-item--static': !isHoverable,\n }]\"\n :tabindex=\"isFocusable ? 0 : -1\"\n :role=\"role\"\n :aria-selected=\"role === 'listitem' ? undefined : isHighlighted\"\n v-on=\"listItemListeners\"\n >\n <component\n :is=\"listItemType\"\n v-if=\"listItemType\"\n >\n <template\n v-for=\"(_, slotName) in $slots\"\n #[slotName]\n >\n <!-- @slot named slots for custom list items -->\n <slot :name=\"slotName\" />\n </template>\n <template\n v-if=\"selected\"\n #selected\n >\n <dt-icon\n name=\"check\"\n size=\"400\"\n class=\"dt-list-item--selected-icon\"\n />\n </template>\n </component>\n <!-- @slot slot for the main content -->\n <slot v-else />\n </component>\n</template>\n\n<script>\nimport {\n LIST_ITEM_TYPES,\n LIST_ITEM_NAVIGATION_TYPES,\n} from './list_item_constants';\nimport utils from '@/common/utils';\nimport { DtIcon } from '@/components/icon';\nimport { DtItemLayout } from '@/components/item_layout';\n\nconst ROLES = ['listitem', 'menuitem', 'option'];\n\n/**\n * A list item is an element that can be used to represent individual items in a list.\n * @see https://dialtone.dialpad.com/components/list_item.html\n */\nexport default {\n name: 'DtListItem',\n\n components: {\n DtItemLayout,\n DtIcon,\n },\n\n /**\n * Value provided from keyboard_list_navigation.js using id prop.\n */\n inject: {\n highlightId: { default: null },\n },\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * String to use for the item's role.\n */\n role: {\n type: String,\n default: 'listitem',\n validator: (role) => (ROLES).includes(role),\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n elementType: {\n type: String,\n default: 'li',\n },\n\n /**\n * The type of child list item to use.\n * @values default, custom\n */\n type: {\n type: String,\n default: LIST_ITEM_TYPES.DEFAULT,\n validator: (t) => Object.values(LIST_ITEM_TYPES).includes(t),\n },\n\n /**\n * The type of navigation that this component should support.\n * - \"arrow-keys\" for items that are navigated with UP/DOWN keys.\n * - \"tab\" for items that are navigated using the TAB key.\n * - \"none\" for static items that are not interactive.\n * @values arrow-keys, tab, none\n */\n navigationType: {\n type: String,\n default: LIST_ITEM_NAVIGATION_TYPES.NONE,\n validator: (t) => Object.values(LIST_ITEM_NAVIGATION_TYPES).includes(t),\n },\n\n /**\n * Applies selected styles to the list item\n */\n selected: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Key down event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Native mouse move event\n *\n * @event mousemove\n * @type {MouseEvent}\n */\n 'mousemove',\n\n /**\n * Native mouse leave event\n *\n * @event mouseleave\n * @type {MouseEvent}\n */\n 'mouseleave',\n ],\n\n data () {\n return {\n injected: false,\n mouseHighlighted: false,\n };\n },\n\n computed: {\n listItemType () {\n switch (this.type) {\n case LIST_ITEM_TYPES.DEFAULT:\n return DtItemLayout;\n default:\n return null;\n }\n },\n\n listItemListeners () {\n return {\n ...this.$listeners,\n keydown: event => {\n if (['enter', 'space'].includes(event.code.toLowerCase())) {\n this.onClick(event);\n }\n this.$emit('keydown', event);\n },\n\n mousemove: event => {\n this.onMouseHover(event);\n this.$emit('mousemove', event);\n },\n\n mouseleave: event => {\n this.onMouseLeave(event);\n this.$emit('mouseleave', event);\n },\n };\n },\n\n /**\n * For keyboard navigation, whether this item is currently highlighted.\n * An injected highlightId will override the default mouseover highlight.\n */\n isHighlighted () {\n if (this.isHoverable) {\n return this.highlightId && this.highlightId() ? this.id === this.highlightId() : this.mouseHighlighted;\n }\n return false;\n },\n\n isFocusable () {\n // Navigation type has to be set to \"tab\".\n return this.navigationType === LIST_ITEM_NAVIGATION_TYPES.TAB;\n },\n\n /**\n * Whether to apply hover styles.\n */\n isHoverable () {\n return this.navigationType !== LIST_ITEM_NAVIGATION_TYPES.NONE;\n },\n },\n\n methods: {\n onClick (e) {\n this.$emit('click', e);\n },\n\n onMouseHover () {\n this.mouseHighlighted = true;\n },\n\n onMouseLeave () {\n this.mouseHighlighted = false;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-list-item {\n list-style: none;\n background-color: var(--dt-action-color-background-muted-default);\n\n &:not(.dt-list-item--static) {\n cursor: pointer;\n border-radius: var(--dt-size-radius-300);\n }\n\n &--focusable:focus,\n &--focusable:focus-within,\n &--highlighted {\n background-color: var(--dt-action-color-background-muted-hover);\n }\n\n &--highlighted:active {\n background-color: var(--dt-action-color-background-muted-active);\n }\n\n &--selected-icon {\n margin-left: var(--dt-space-400);\n }\n\n :focus-visible {\n outline: none;\n box-shadow: var(--dt-shadow-focus);\n }\n}\n</style>\n"],"names":["ROLES","_sfc_main","DtItemLayout","DtIcon","utils","role","LIST_ITEM_TYPES","LIST_ITEM_NAVIGATION_TYPES","event","e"],"mappings":"wcAkDA,MAAAA,EAAA,CAAA,WAAA,WAAA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,EACA,EAEA,aAAA,CAEA,OAAA,KAAA,iBAAAD,EAAA,EAAA,GACA,EAKA,aAAA,CACA,OAAA,KAAA,iBAAAA,EAAA,EAAA,IACA,CACA,EAEA,QAAA,CACA,QAAAE,EAAA,CACA,KAAA,MAAA,QAAAA,CAAA,CACA,EAEA,cAAA,CACA,KAAA,iBAAA,EACA,EAEA,cAAA,CACA,KAAA,iBAAA,EACA,CACA,CACA"}
|
package/dist/lib/list-item.js
CHANGED
|
@@ -8,7 +8,6 @@ import "vue";
|
|
|
8
8
|
import "@dialpad/dialtone-icons/vue2";
|
|
9
9
|
import "../chunks/icon_constants-OpYAAKwF.js";
|
|
10
10
|
import "@dialpad/dialtone-icons/icons.json";
|
|
11
|
-
import "./skeleton.js";
|
|
12
11
|
const m = ["listitem", "menuitem", "option"], d = {
|
|
13
12
|
name: "DtListItem",
|
|
14
13
|
components: {
|
|
@@ -186,9 +185,9 @@ var c = function() {
|
|
|
186
185
|
null,
|
|
187
186
|
null
|
|
188
187
|
);
|
|
189
|
-
const
|
|
188
|
+
const k = p.exports;
|
|
190
189
|
export {
|
|
191
|
-
|
|
190
|
+
k as DtListItem,
|
|
192
191
|
i as LIST_ITEM_NAVIGATION_TYPES,
|
|
193
192
|
l as LIST_ITEM_TYPES
|
|
194
193
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item.js","sources":["../../components/list_item/list_item.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n :id=\"id\"\n :class=\"['dt-list-item', {\n 'dt-list-item--focusable': isFocusable,\n 'dt-list-item--highlighted': isHighlighted,\n 'dt-list-item--static': !isHoverable,\n }]\"\n :tabindex=\"isFocusable ? 0 : -1\"\n :role=\"role\"\n :aria-selected=\"role === 'listitem' ? undefined : isHighlighted\"\n v-on=\"listItemListeners\"\n >\n <component\n :is=\"listItemType\"\n v-if=\"listItemType\"\n >\n <template\n v-for=\"(_, slotName) in $slots\"\n #[slotName]\n >\n <!-- @slot named slots for custom list items -->\n <slot :name=\"slotName\" />\n </template>\n <template\n v-if=\"selected\"\n #selected\n >\n <dt-icon\n name=\"check\"\n size=\"400\"\n class=\"dt-list-item--selected-icon\"\n />\n </template>\n </component>\n <!-- @slot slot for the main content -->\n <slot v-else />\n </component>\n</template>\n\n<script>\nimport {\n LIST_ITEM_TYPES,\n LIST_ITEM_NAVIGATION_TYPES,\n} from './list_item_constants';\nimport utils from '@/common/utils';\nimport { DtIcon } from '@/components/icon';\nimport { DtItemLayout } from '@/components/item_layout';\n\nconst ROLES = ['listitem', 'menuitem', 'option'];\n\n/**\n * A list item is an element that can be used to represent individual items in a list.\n * @see https://dialtone.dialpad.com/components/list_item.html\n */\nexport default {\n name: 'DtListItem',\n\n components: {\n DtItemLayout,\n DtIcon,\n },\n\n /**\n * Value provided from keyboard_list_navigation.js using id prop.\n */\n inject: {\n highlightId: { default: null },\n },\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * String to use for the item's role.\n */\n role: {\n type: String,\n default: 'listitem',\n validator: (role) => (ROLES).includes(role),\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n elementType: {\n type: String,\n default: 'li',\n },\n\n /**\n * The type of child list item to use.\n * @values default, custom\n */\n type: {\n type: String,\n default: LIST_ITEM_TYPES.DEFAULT,\n validator: (t) => Object.values(LIST_ITEM_TYPES).includes(t),\n },\n\n /**\n * The type of navigation that this component should support.\n * - \"arrow-keys\" for items that are navigated with UP/DOWN keys.\n * - \"tab\" for items that are navigated using the TAB key.\n * - \"none\" for static items that are not interactive.\n * @values arrow-keys, tab, none\n */\n navigationType: {\n type: String,\n default: LIST_ITEM_NAVIGATION_TYPES.NONE,\n validator: (t) => Object.values(LIST_ITEM_NAVIGATION_TYPES).includes(t),\n },\n\n /**\n * Applies selected styles to the list item\n */\n selected: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Key down event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Native mouse move event\n *\n * @event mousemove\n * @type {MouseEvent}\n */\n 'mousemove',\n\n /**\n * Native mouse leave event\n *\n * @event mouseleave\n * @type {MouseEvent}\n */\n 'mouseleave',\n ],\n\n data () {\n return {\n injected: false,\n mouseHighlighted: false,\n };\n },\n\n computed: {\n listItemType () {\n switch (this.type) {\n case LIST_ITEM_TYPES.DEFAULT:\n return DtItemLayout;\n default:\n return null;\n }\n },\n\n listItemListeners () {\n return {\n ...this.$listeners,\n keydown: event => {\n if (['enter', 'space'].includes(event.code.toLowerCase())) {\n this.onClick(event);\n }\n this.$emit('keydown', event);\n },\n\n mousemove: event => {\n this.onMouseHover(event);\n this.$emit('mousemove', event);\n },\n\n mouseleave: event => {\n this.onMouseLeave(event);\n this.$emit('mouseleave', event);\n },\n };\n },\n\n /**\n * For keyboard navigation, whether this item is currently highlighted.\n * An injected highlightId will override the default mouseover highlight.\n */\n isHighlighted () {\n if (this.isHoverable) {\n return this.highlightId && this.highlightId() ? this.id === this.highlightId() : this.mouseHighlighted;\n }\n return false;\n },\n\n isFocusable () {\n // Navigation type has to be set to \"tab\".\n return this.navigationType === LIST_ITEM_NAVIGATION_TYPES.TAB;\n },\n\n /**\n * Whether to apply hover styles.\n */\n isHoverable () {\n return this.navigationType !== LIST_ITEM_NAVIGATION_TYPES.NONE;\n },\n },\n\n methods: {\n onClick (e) {\n this.$emit('click', e);\n },\n\n onMouseHover () {\n this.mouseHighlighted = true;\n },\n\n onMouseLeave () {\n this.mouseHighlighted = false;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-list-item {\n list-style: none;\n background-color: var(--dt-action-color-background-muted-default);\n\n &:not(.dt-list-item--static) {\n cursor: pointer;\n border-radius: var(--dt-size-radius-300);\n }\n\n &--focusable:focus,\n &--focusable:focus-within,\n &--highlighted {\n background-color: var(--dt-action-color-background-muted-hover);\n }\n\n &--highlighted:active {\n background-color: var(--dt-action-color-background-muted-active);\n }\n\n &--selected-icon {\n margin-left: var(--dt-space-400);\n }\n\n :focus-visible {\n outline: none;\n box-shadow: var(--dt-shadow-focus);\n }\n}\n</style>\n"],"names":["ROLES","_sfc_main","DtItemLayout","DtIcon","utils","role","LIST_ITEM_TYPES","LIST_ITEM_NAVIGATION_TYPES","event","e"],"mappings":"
|
|
1
|
+
{"version":3,"file":"list-item.js","sources":["../../components/list_item/list_item.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n :id=\"id\"\n :class=\"['dt-list-item', {\n 'dt-list-item--focusable': isFocusable,\n 'dt-list-item--highlighted': isHighlighted,\n 'dt-list-item--static': !isHoverable,\n }]\"\n :tabindex=\"isFocusable ? 0 : -1\"\n :role=\"role\"\n :aria-selected=\"role === 'listitem' ? undefined : isHighlighted\"\n v-on=\"listItemListeners\"\n >\n <component\n :is=\"listItemType\"\n v-if=\"listItemType\"\n >\n <template\n v-for=\"(_, slotName) in $slots\"\n #[slotName]\n >\n <!-- @slot named slots for custom list items -->\n <slot :name=\"slotName\" />\n </template>\n <template\n v-if=\"selected\"\n #selected\n >\n <dt-icon\n name=\"check\"\n size=\"400\"\n class=\"dt-list-item--selected-icon\"\n />\n </template>\n </component>\n <!-- @slot slot for the main content -->\n <slot v-else />\n </component>\n</template>\n\n<script>\nimport {\n LIST_ITEM_TYPES,\n LIST_ITEM_NAVIGATION_TYPES,\n} from './list_item_constants';\nimport utils from '@/common/utils';\nimport { DtIcon } from '@/components/icon';\nimport { DtItemLayout } from '@/components/item_layout';\n\nconst ROLES = ['listitem', 'menuitem', 'option'];\n\n/**\n * A list item is an element that can be used to represent individual items in a list.\n * @see https://dialtone.dialpad.com/components/list_item.html\n */\nexport default {\n name: 'DtListItem',\n\n components: {\n DtItemLayout,\n DtIcon,\n },\n\n /**\n * Value provided from keyboard_list_navigation.js using id prop.\n */\n inject: {\n highlightId: { default: null },\n },\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * String to use for the item's role.\n */\n role: {\n type: String,\n default: 'listitem',\n validator: (role) => (ROLES).includes(role),\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n elementType: {\n type: String,\n default: 'li',\n },\n\n /**\n * The type of child list item to use.\n * @values default, custom\n */\n type: {\n type: String,\n default: LIST_ITEM_TYPES.DEFAULT,\n validator: (t) => Object.values(LIST_ITEM_TYPES).includes(t),\n },\n\n /**\n * The type of navigation that this component should support.\n * - \"arrow-keys\" for items that are navigated with UP/DOWN keys.\n * - \"tab\" for items that are navigated using the TAB key.\n * - \"none\" for static items that are not interactive.\n * @values arrow-keys, tab, none\n */\n navigationType: {\n type: String,\n default: LIST_ITEM_NAVIGATION_TYPES.NONE,\n validator: (t) => Object.values(LIST_ITEM_NAVIGATION_TYPES).includes(t),\n },\n\n /**\n * Applies selected styles to the list item\n */\n selected: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Key down event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Native mouse move event\n *\n * @event mousemove\n * @type {MouseEvent}\n */\n 'mousemove',\n\n /**\n * Native mouse leave event\n *\n * @event mouseleave\n * @type {MouseEvent}\n */\n 'mouseleave',\n ],\n\n data () {\n return {\n injected: false,\n mouseHighlighted: false,\n };\n },\n\n computed: {\n listItemType () {\n switch (this.type) {\n case LIST_ITEM_TYPES.DEFAULT:\n return DtItemLayout;\n default:\n return null;\n }\n },\n\n listItemListeners () {\n return {\n ...this.$listeners,\n keydown: event => {\n if (['enter', 'space'].includes(event.code.toLowerCase())) {\n this.onClick(event);\n }\n this.$emit('keydown', event);\n },\n\n mousemove: event => {\n this.onMouseHover(event);\n this.$emit('mousemove', event);\n },\n\n mouseleave: event => {\n this.onMouseLeave(event);\n this.$emit('mouseleave', event);\n },\n };\n },\n\n /**\n * For keyboard navigation, whether this item is currently highlighted.\n * An injected highlightId will override the default mouseover highlight.\n */\n isHighlighted () {\n if (this.isHoverable) {\n return this.highlightId && this.highlightId() ? this.id === this.highlightId() : this.mouseHighlighted;\n }\n return false;\n },\n\n isFocusable () {\n // Navigation type has to be set to \"tab\".\n return this.navigationType === LIST_ITEM_NAVIGATION_TYPES.TAB;\n },\n\n /**\n * Whether to apply hover styles.\n */\n isHoverable () {\n return this.navigationType !== LIST_ITEM_NAVIGATION_TYPES.NONE;\n },\n },\n\n methods: {\n onClick (e) {\n this.$emit('click', e);\n },\n\n onMouseHover () {\n this.mouseHighlighted = true;\n },\n\n onMouseLeave () {\n this.mouseHighlighted = false;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-list-item {\n list-style: none;\n background-color: var(--dt-action-color-background-muted-default);\n\n &:not(.dt-list-item--static) {\n cursor: pointer;\n border-radius: var(--dt-size-radius-300);\n }\n\n &--focusable:focus,\n &--focusable:focus-within,\n &--highlighted {\n background-color: var(--dt-action-color-background-muted-hover);\n }\n\n &--highlighted:active {\n background-color: var(--dt-action-color-background-muted-active);\n }\n\n &--selected-icon {\n margin-left: var(--dt-space-400);\n }\n\n :focus-visible {\n outline: none;\n box-shadow: var(--dt-shadow-focus);\n }\n}\n</style>\n"],"names":["ROLES","_sfc_main","DtItemLayout","DtIcon","utils","role","LIST_ITEM_TYPES","LIST_ITEM_NAVIGATION_TYPES","event","e"],"mappings":";;;;;;;;;;AAkDA,MAAAA,IAAA,CAAA,YAAA,YAAA,QAAA,GAMAC,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAC;AAAA,IACA,QAAAC;AAAA,EACA;AAAA;AAAA;AAAA;AAAA,EAKA,QAAA;AAAA,IACA,aAAA,EAAA,SAAA,KAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,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AA,CAAAM,MAAA;AACA,UAAA,CAAA,SAAA,OAAA,EAAA,SAAAA,EAAA,KAAA,YAAA,CAAA,KACA,KAAA,QAAAA,CAAA,GAEA,KAAA,MAAA,WAAAA,CAAA;AAAA,QACA;AAAA,QAEA,WAAA,CAAAA,MAAA;AACA,eAAA,aAAAA,CAAA,GACA,KAAA,MAAA,aAAAA,CAAA;AAAA,QACA;AAAA,QAEA,YAAA,CAAAA,MAAA;AACA,eAAA,aAAAA,CAAA,GACA,KAAA,MAAA,cAAAA,CAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,gBAAA;AACA,aAAA,KAAA,cACA,KAAA,eAAA,KAAA,YAAA,IAAA,KAAA,OAAA,KAAA,gBAAA,KAAA,mBAEA;AAAA,IACA;AAAA,IAEA,cAAA;AAEA,aAAA,KAAA,mBAAAD,EAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AACA,aAAA,KAAA,mBAAAA,EAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,QAAAE,GAAA;AACA,WAAA,MAAA,SAAAA,CAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,WAAA,mBAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,WAAA,mBAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js"),s=require("./button.cjs"),l=require("./emoji-picker.cjs"),u=require("./icon.cjs"),c=require("./input.cjs"),d=require("./popover.cjs"),o=require("./rich-text-editor.cjs"),p=require("./tooltip.cjs");require("vue");require("../chunks/link_constants-Kn6kP4i1.js");require("../chunks/tab-7hJQSLFx.js");require("@dialpad/dialtone-emojis");require("@dialpad/dialtone-icons/vue2");require("../chunks/icon_constants-2S_OSQ1t.js");require("@dialpad/dialtone-icons/icons.json");require("./constants.cjs");require("./utils.cjs");require("../chunks/input-o-fc1X4b.js");require("./validators.cjs");require("./validation-messages.cjs");require("../chunks/popover_constants-hOEhklvr.js");require("tippy.js");require("./lazy-show.cjs");require("@linusborg/vue-simple-portal");require("../chunks/modal-qEzlo0Sj.js");require("../chunks/sr_only_close_button-ErijKGYR.js");require("@tiptap/vue-2");require("@tiptap/extension-blockquote");require("@tiptap/extension-code-block");require("@tiptap/extension-document");require("@tiptap/extension-hard-break");require("@tiptap/extension-paragraph");require("@tiptap/extension-placeholder");require("@tiptap/extension-bold");require("@tiptap/extension-bullet-list");require("@tiptap/extension-italic");require("@tiptap/extension-link");require("@tiptap/extension-list-item");require("@tiptap/extension-ordered-list");require("@tiptap/extension-strike");require("@tiptap/extension-underline");require("@tiptap/extension-text");require("@tiptap/extension-text-align");require("@tiptap/core");require("../chunks/index-sdfB7Aok.js");require("emoji-regex");require("emoji-toolkit/emoji_strategy.json");require("./skeleton.cjs");require("@tiptap/pm/state");require("@tiptap/suggestion");require("./list-item.cjs");require("../chunks/list_item_constants-Tsz5CO1m.js");require("./item-layout.cjs");require("./stack.cjs");require("../chunks/stack_constants-m9Ickqw0.js");require("@tiptap/extension-mention");require("./link.cjs");require("./avatar.cjs");require("./presence.cjs");const m={name:"DtRecipeMessageInput",components:{DtButton:s.DtButton,DtEmojiPicker:l.DtEmojiPicker,DtIcon:u.DtIcon,DtInput:c.DtInput,DtPopover:d.DtPopover,DtRichTextEditor:o.DtRichTextEditor,DtTooltip:p.DtTooltip},mixins:[],inheritAttrs:!1,props:{value:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0,default:""},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(t){return typeof t=="string"?o.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(t):!0}},outputFormat:{type:String,default:"text",validator(t){return o.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(t)}},link:{type:[Boolean,Object],default:!1},placeholder:{type:String,default:""},disableSend:{type:Boolean,default:!1},maxHeight:{type:String,default:"unset"},showEmojiPicker:{type:Boolean,default:!0},emojiPickerProps:{type:Object,default:()=>({}),validate(t){return["searchNoResultsLabel","searchResultsLabel","searchPlaceholderLabel","skinSelectorButtonTooltipLabel","tabSetLabels"].every(e=>t[e]!=null)}},emojiTooltipMessage:{type:String,default:"Emoji"},emojiButtonAriaLabel:{type:String,default:"emoji button"},showCharacterLimit:{type:[Boolean,Object],default:()=>({count:1500,warning:500,message:""})},showImagePicker:{type:[Boolean,Object],default:()=>({tooltipLabel:"Attach Image",ariaLabel:"image button"})},showSend:{type:[Boolean,Object],default:()=>({icon:"send"})},showCancel:{type:[Boolean,Object],default:()=>({text:"Cancel"})},mentionSuggestion:{type:Object,default:null},allowBlockquote:{type:Boolean,default:!0},allowBold:{type:Boolean,default:!0},allowBulletList:{type:Boolean,default:!0},allowItalic:{type:Boolean,default:!0},allowStrike:{type:Boolean,default:!0},allowUnderline:{type:Boolean,default:!0}},emits:["submit","select-media","add-media","paste-media","cancel","skin-tone","selected-emoji","focus","blur","input"],data(){return{internalInputValue:this.value,hasFocus:!1,imagePickerFocus:!1,emojiPickerFocus:!1,sendButtonFocus:!1,emojiPickerOpened:!1}},computed:{inputLength(){return this.internalInputValue.length},displayCharacterLimitWarning(){return!!this.showCharacterLimit&&this.showCharacterLimit.count-this.inputLength<=this.showCharacterLimit.warning},characterLimitTooltipEnabled(){return this.showCharacterLimit.message&&this.showCharacterLimit.count-this.inputLength<0},isSendDisabled(){return this.disableSend||this.showCharacterLimit&&this.inputLength>this.showCharacterLimit.count},computedCloseButtonProps(){return{ariaLabel:"Close"}},emojiPickerHovered(){return this.emojiPickerFocus||this.emojiPickerOpened}},watch:{value(t){this.internalInputValue=t}},methods:{onDrag(t){t.stopPropagation(),t.preventDefault()},onDrop(t){t.stopPropagation(),t.preventDefault();const e=t.dataTransfer,r=Array.from(e.files);this.$emit("add-media",r)},onPaste(t){if(t.clipboardData.files.length){t.stopPropagation(),t.preventDefault();const e=[...t.clipboardData.files];this.$emit("paste-media",e)}},onSkinTone(t){this.$emit("skin-tone",t)},onSelectEmoji(t){if(!t){this.emojiPickerOpened=!1;return}this.$refs.richTextEditor.editor.commands.insertContent({type:"emoji",attrs:{code:t.shortname}}),this.emojiPickerOpened=!1,this.$emit("selected-emoji",t)},onSelectImage(){this.$refs.messageInputImageUpload.$refs.input.click()},onImageUpload(){this.$emit("select-media",this.$refs.messageInputImageUpload.$refs.input.files)},toggleEmojiPicker(){this.emojiPickerOpened=!this.emojiPickerOpened},onSend(){this.isSendDisabled||this.$emit("submit",this.internalInputValue)},onCancel(){this.$emit("cancel")},onFocus(t){var e;this.hasFocus=!0,(e=this.$refs.richTextEditor)==null||e.focusEditor(),this.$emit("focus",t)},onBlur(t){this.hasFocus=!1,this.$emit("blur",t)},onInput(t){this.$emit("input",t)}}};var f=function(){var e=this,r=e._self._c;return r("div",{class:["d-d-flex","d-fd-column","d-bar8","d-baw1","d-ba","d-c-text",{"d-bc-bold d-bs-sm":e.hasFocus,"d-bc-default":!e.hasFocus}],attrs:{"data-qa":"dt-message-input",role:"presentation"},on:{click:function(i){var n;(n=e.$refs.richTextEditor)==null||n.focusEditor()},"drag-enter":e.onDrag,"drag-over":e.onDrag,drop:e.onDrop,keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")||i.ctrlKey||i.shiftKey||i.altKey||i.metaKey?null:e.onSend.apply(null,arguments)},paste:e.onPaste}},[r("div",{staticClass:"d-of-auto d-mx16 d-mt8 d-mb4",style:{"max-height":e.maxHeight}},[r("dt-rich-text-editor",e._b({ref:"richTextEditor",attrs:{editable:e.editable,"input-aria-label":e.inputAriaLabel,"input-class":e.inputClass,"output-format":e.outputFormat,"auto-focus":e.autoFocus,link:e.link,placeholder:e.placeholder,"mention-suggestion":e.mentionSuggestion,"allow-blockquote":e.allowBlockquote,"allow-bold":e.allowBold,"allow-bullet-list":e.allowBulletList,"allow-italic":e.allowItalic,"allow-strike":e.allowStrike,"allow-underline":e.allowUnderline},on:{focus:e.onFocus,blur:e.onBlur,input:function(i){return e.onInput(i)}},model:{value:e.internalInputValue,callback:function(i){e.internalInputValue=i},expression:"internalInputValue"}},"dt-rich-text-editor",e.$attrs,!1))],1),e._t("middle"),r("section",{staticClass:"d-d-flex d-jc-space-between d-mx8 d-my4"},[r("div",{staticClass:"d-d-flex"},[e.showImagePicker?r("dt-tooltip",{attrs:{placement:"top-start",message:e.showImagePicker.tooltipLabel,offset:[-4,-4]},scopedSlots:e._u([{key:"anchor",fn:function(){return[r("dt-button",{attrs:{"data-qa":"dt-message-input-image-btn",size:"sm",circle:"",kind:e.imagePickerFocus?"default":"muted",importance:"clear","aria-label":e.showImagePicker.ariaLabel},on:{click:e.onSelectImage,mouseenter:function(i){e.imagePickerFocus=!0},mouseleave:function(i){e.imagePickerFocus=!1},focus:function(i){e.imagePickerFocus=!0},blur:function(i){e.imagePickerFocus=!1}},scopedSlots:e._u([{key:"icon",fn:function(){return[r("dt-icon",{attrs:{name:"image",size:"300"}})]},proxy:!0}],null,!1,2561380377)}),r("dt-input",{ref:"messageInputImageUpload",staticClass:"d-ps-absolute",attrs:{"data-qa":"dt-message-input-image-input",type:"file",multiple:"",hidden:""},on:{input:e.onImageUpload}})]},proxy:!0}],null,!1,3687934814)}):e._e(),e.showEmojiPicker?r("dt-popover",{attrs:{"data-qa":"dt-message-input-emoji-picker-popover",open:e.emojiPickerOpened,"initial-focus-element":"#searchInput",padding:"none"},on:{opened:i=>{e.emojiPickerOpened=i}},scopedSlots:e._u([{key:"anchor",fn:function(){return[r("dt-tooltip",{attrs:{message:e.emojiTooltipMessage,offset:[0,-4]},scopedSlots:e._u([{key:"anchor",fn:function(){return[r("dt-button",{attrs:{"data-qa":"dt-message-input-emoji-picker-btn",size:"sm",circle:"",kind:e.emojiPickerHovered?"default":"muted",importance:"clear","aria-label":e.emojiButtonAriaLabel,offset:[0,0]},on:{click:e.toggleEmojiPicker,mouseenter:function(i){e.emojiPickerFocus=!0},mouseleave:function(i){e.emojiPickerFocus=!1},focus:function(i){e.emojiPickerFocus=!0},blur:function(i){e.emojiPickerFocus=!1}},scopedSlots:e._u([{key:"icon",fn:function(){return[r("dt-icon",{attrs:{name:e.emojiPickerHovered?"very-satisfied":"satisfied",size:"300"}})]},proxy:!0}],null,!1,352772906)})]},proxy:!0}],null,!1,3933528398)})]},proxy:!0},{key:"content",fn:function(){return[r("dt-emoji-picker",e._b({on:{"skin-tone":e.onSkinTone,"selected-emoji":e.onSelectEmoji}},"dt-emoji-picker",e.emojiPickerProps,!1))]},proxy:!0}],null,!1,1278205067)}):e._e()],1),r("div",{staticClass:"d-d-flex"},[e.showCharacterLimit?r("dt-tooltip",{staticClass:"dt-message-input--remaining-char-tooltip",attrs:{placement:"top-end",enabled:e.characterLimitTooltipEnabled,message:e.showCharacterLimit.message,offset:[10,-8]},scopedSlots:e._u([{key:"anchor",fn:function(){return[r("p",{directives:[{name:"show",rawName:"v-show",value:e.displayCharacterLimitWarning,expression:"displayCharacterLimitWarning"}],staticClass:"d-fc-error d-mr16 dt-message-input--remaining-char",attrs:{"data-qa":"dt-message-input-character-limit"}},[e._v(" "+e._s(e.showCharacterLimit.count-e.inputLength)+" ")])]},proxy:!0}],null,!1,2591914334)}):e._e(),e.showCancel?r("dt-button",{staticClass:"dt-message-input--cancel-button",attrs:{"data-qa":"dt-message-input-cancel-button",size:"sm",kind:"muted",importance:"clear","aria-label":e.showCancel.ariaLabel},on:{click:e.onCancel}},[r("p",[e._v(e._s(e.showCancel.text))])]):e._e(),e.showSend?r("dt-tooltip",{attrs:{placement:"top-end",enabled:!e.showSend,message:e.showSend.tooltipLabel,show:!e.isSendDisabled&&e.sendButtonFocus,offset:[6,-8]},scopedSlots:e._u([{key:"anchor",fn:function(){return[r("dt-button",{class:[{"message-input-button__disabled d-fc-muted":e.isSendDisabled,"d-btn--circle":e.showSend.icon}],attrs:{"data-qa":"dt-message-input-send-btn",size:"sm",kind:"default",importance:"primary","aria-label":e.showSend.ariaLabel,"aria-disabled":e.isSendDisabled},on:{click:e.onSend,mouseenter:function(i){e.sendButtonFocus=!0},mouseleave:function(i){e.sendButtonFocus=!1},focus:function(i){e.sendButtonFocus=!0},blur:function(i){e.sendButtonFocus=!1}},scopedSlots:e._u([e.showSend.icon?{key:"icon",fn:function(){return[r("dt-icon",{attrs:{name:e.showSend.icon,size:"300"}})]},proxy:!0}:null],null,!0)},[e.showSend.text?[r("p",[e._v(e._s(e.showSend.text))])]:e._e()],2)]},proxy:!0}],null,!1,2570122596)}):e._e()],1)])],2)},h=[],g=a.n(m,f,h,!1,null,null,null,null);const b=g.exports;exports.DtRecipeMessageInput=b;
|
|
2
|
+
//# sourceMappingURL=message-input.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-input.cjs","sources":["../../recipes/conversation_view/message_input/message_input.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <div\n data-qa=\"dt-message-input\"\n role=\"presentation\"\n :class=\"['d-d-flex', 'd-fd-column', 'd-bar8', 'd-baw1', 'd-ba', 'd-c-text',\n { 'd-bc-bold d-bs-sm': hasFocus, 'd-bc-default': !hasFocus }]\"\n @click=\"$refs.richTextEditor?.focusEditor()\"\n @drag-enter=\"onDrag\"\n @drag-over=\"onDrag\"\n @drop=\"onDrop\"\n @keydown.enter.exact=\"onSend\"\n @paste=\"onPaste\"\n >\n <!-- Some wrapper to restrict the height and show the scrollbar -->\n <div\n class=\"d-of-auto d-mx16 d-mt8 d-mb4\"\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 :mention-suggestion=\"mentionSuggestion\"\n :allow-blockquote=\"allowBlockquote\"\n :allow-bold=\"allowBold\"\n :allow-bullet-list=\"allowBulletList\"\n :allow-italic=\"allowItalic\"\n :allow-strike=\"allowStrike\"\n :allow-underline=\"allowUnderline\"\n v-bind=\"$attrs\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @input=\"onInput($event)\"\n />\n </div>\n <!-- @slot Slot for attachment carousel -->\n <slot name=\"middle\" />\n <!-- Section for the bottom UI -->\n <section class=\"d-d-flex d-jc-space-between d-mx8 d-my4\">\n <!-- Left content -->\n <div class=\"d-d-flex\">\n <dt-tooltip\n v-if=\"showImagePicker\"\n placement=\"top-start\"\n :message=\"showImagePicker.tooltipLabel\"\n :offset=\"[-4, -4]\"\n >\n <template #anchor>\n <dt-button\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 type=\"file\"\n class=\"d-ps-absolute\"\n multiple\n hidden\n @input=\"onImageUpload\"\n />\n </template>\n </dt-tooltip>\n <dt-popover\n v-if=\"showEmojiPicker\"\n data-qa=\"dt-message-input-emoji-picker-popover\"\n :open=\"emojiPickerOpened\"\n initial-focus-element=\"#searchInput\"\n padding=\"none\"\n @opened=\"(open) => { emojiPickerOpened = open }\"\n >\n <template #anchor>\n <dt-tooltip\n :message=\"emojiTooltipMessage\"\n :offset=\"[0, -4]\"\n >\n <template #anchor>\n <dt-button\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 :offset=\"[0, 0]\"\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 </dt-tooltip>\n </template>\n <template #content>\n <dt-emoji-picker\n v-bind=\"emojiPickerProps\"\n @skin-tone=\"onSkinTone\"\n @selected-emoji=\"onSelectEmoji\"\n />\n </template>\n </dt-popover>\n </div>\n <!-- Right content -->\n <div class=\"d-d-flex\">\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=\"d-fc-error d-mr16 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 <!-- Send button -->\n <dt-tooltip\n v-if=\"showSend\"\n placement=\"top-end\"\n :enabled=\"!showSend\"\n :message=\"showSend.tooltipLabel\"\n :show=\"!isSendDisabled && sendButtonFocus\"\n :offset=\"[6, -8]\"\n >\n <template #anchor>\n <!-- Right positioned UI - send button -->\n <dt-button\n data-qa=\"dt-message-input-send-btn\"\n size=\"sm\"\n kind=\"default\"\n importance=\"primary\"\n :class=\"[\n {\n 'message-input-button__disabled d-fc-muted': isSendDisabled,\n 'd-btn--circle': showSend.icon,\n },\n ]\"\n :aria-label=\"showSend.ariaLabel\"\n :aria-disabled=\"isSendDisabled\"\n @click=\"onSend\"\n @mouseenter=\"sendButtonFocus = true\"\n @mouseleave=\"sendButtonFocus = false\"\n @focus=\"sendButtonFocus = true\"\n @blur=\"sendButtonFocus = false\"\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 </template>\n </dt-tooltip>\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 { 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 * 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: false,\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 * 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 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 * Native focus event\n * @event input\n * @type {String|JSON}\n */\n 'focus',\n\n /**\n * Native blur event\n * @event input\n * @type {String|JSON}\n */\n 'blur',\n\n /**\n * Native input event\n * @event input\n * @type {String|JSON}\n */\n 'input',\n ],\n\n data () {\n return {\n internalInputValue: this.value, // internal input content\n hasFocus: false,\n imagePickerFocus: false,\n emojiPickerFocus: false,\n sendButtonFocus: 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\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 this.emojiPickerOpened = false;\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.emojiPickerOpened = false;\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 onFocus (event) {\n this.hasFocus = true;\n this.$refs.richTextEditor?.focusEditor();\n this.$emit('focus', event);\n },\n\n onBlur (event) {\n this.hasFocus = false;\n this.$emit('blur', event);\n },\n\n onInput (event) {\n this.$emit('input', event);\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-message-input--remaining-char-tooltip {\n margin-top: auto;\n margin-bottom: auto;\n}\n.dt-message-input--remaining-char {\n font-size: 1.2rem;\n}\n\n.message-input-button__disabled {\n background-color: unset;\n color: var(--theme-sidebar-icon-color);\n cursor: default;\n}\n\n.dt-message-input--cancel-button {\n margin-right: var(--dt-space-300);\n}\n</style>\n"],"names":["_sfc_main","DtButton","DtEmojiPicker","DtIcon","DtInput","DtPopover","DtRichTextEditor","DtTooltip","autoFocus","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","outputFormat","RICH_TEXT_EDITOR_OUTPUT_FORMATS","emojiPickerProps","prop","newValue","e","dt","files","skinTone","emoji","event","_a"],"mappings":"4lEA2OA,MAA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
2
2
|
import { DtButton as r } from "./button.js";
|
|
3
3
|
import { DtEmojiPicker as s } from "./emoji-picker.js";
|
|
4
4
|
import { DtIcon as l } from "./icon.js";
|
|
@@ -13,7 +13,6 @@ import "@dialpad/dialtone-emojis";
|
|
|
13
13
|
import "@dialpad/dialtone-icons/vue2";
|
|
14
14
|
import "../chunks/icon_constants-OpYAAKwF.js";
|
|
15
15
|
import "@dialpad/dialtone-icons/icons.json";
|
|
16
|
-
import "./skeleton.js";
|
|
17
16
|
import "./constants.js";
|
|
18
17
|
import "./utils.js";
|
|
19
18
|
import "../chunks/input-1tm09l_-.js";
|
|
@@ -46,6 +45,7 @@ import "@tiptap/core";
|
|
|
46
45
|
import "../chunks/index-YkSDT8-g.js";
|
|
47
46
|
import "emoji-regex";
|
|
48
47
|
import "emoji-toolkit/emoji_strategy.json";
|
|
48
|
+
import "./skeleton.js";
|
|
49
49
|
import "@tiptap/pm/state";
|
|
50
50
|
import "@tiptap/suggestion";
|
|
51
51
|
import "./list-item.js";
|
|
@@ -238,6 +238,48 @@ const h = {
|
|
|
238
238
|
mentionSuggestion: {
|
|
239
239
|
type: Object,
|
|
240
240
|
default: null
|
|
241
|
+
},
|
|
242
|
+
/**
|
|
243
|
+
* Whether the input allows for block quote.
|
|
244
|
+
*/
|
|
245
|
+
allowBlockquote: {
|
|
246
|
+
type: Boolean,
|
|
247
|
+
default: !0
|
|
248
|
+
},
|
|
249
|
+
/**
|
|
250
|
+
* Whether the input allows for bold to be introduced in the text.
|
|
251
|
+
*/
|
|
252
|
+
allowBold: {
|
|
253
|
+
type: Boolean,
|
|
254
|
+
default: !0
|
|
255
|
+
},
|
|
256
|
+
/**
|
|
257
|
+
* Whether the input allows for bullet list to be introduced in the text.
|
|
258
|
+
*/
|
|
259
|
+
allowBulletList: {
|
|
260
|
+
type: Boolean,
|
|
261
|
+
default: !0
|
|
262
|
+
},
|
|
263
|
+
/**
|
|
264
|
+
* Whether the input allows for italic to be introduced in the text.
|
|
265
|
+
*/
|
|
266
|
+
allowItalic: {
|
|
267
|
+
type: Boolean,
|
|
268
|
+
default: !0
|
|
269
|
+
},
|
|
270
|
+
/**
|
|
271
|
+
* Whether the input allows for strike to be introduced in the text.
|
|
272
|
+
*/
|
|
273
|
+
allowStrike: {
|
|
274
|
+
type: Boolean,
|
|
275
|
+
default: !0
|
|
276
|
+
},
|
|
277
|
+
/**
|
|
278
|
+
* Whether the input allows for underline to be introduced in the text.
|
|
279
|
+
*/
|
|
280
|
+
allowUnderline: {
|
|
281
|
+
type: Boolean,
|
|
282
|
+
default: !0
|
|
241
283
|
}
|
|
242
284
|
},
|
|
243
285
|
emits: [
|
|
@@ -353,8 +395,8 @@ const h = {
|
|
|
353
395
|
},
|
|
354
396
|
onDrop(t) {
|
|
355
397
|
t.stopPropagation(), t.preventDefault();
|
|
356
|
-
const e = t.dataTransfer,
|
|
357
|
-
this.$emit("add-media",
|
|
398
|
+
const e = t.dataTransfer, i = Array.from(e.files);
|
|
399
|
+
this.$emit("add-media", i);
|
|
358
400
|
},
|
|
359
401
|
onPaste(t) {
|
|
360
402
|
if (t.clipboardData.files.length) {
|
|
@@ -406,8 +448,8 @@ const h = {
|
|
|
406
448
|
}
|
|
407
449
|
};
|
|
408
450
|
var g = function() {
|
|
409
|
-
var e = this,
|
|
410
|
-
return
|
|
451
|
+
var e = this, i = e._self._c;
|
|
452
|
+
return i("div", { class: [
|
|
411
453
|
"d-d-flex",
|
|
412
454
|
"d-fd-column",
|
|
413
455
|
"d-bar8",
|
|
@@ -415,66 +457,66 @@ var g = function() {
|
|
|
415
457
|
"d-ba",
|
|
416
458
|
"d-c-text",
|
|
417
459
|
{ "d-bc-bold d-bs-sm": e.hasFocus, "d-bc-default": !e.hasFocus }
|
|
418
|
-
], attrs: { "data-qa": "dt-message-input", role: "presentation" }, on: { click: function(
|
|
419
|
-
var
|
|
420
|
-
(
|
|
421
|
-
}, "drag-enter": e.onDrag, "drag-over": e.onDrag, drop: e.onDrop, keydown: function(
|
|
422
|
-
return !
|
|
423
|
-
}, paste: e.onPaste } }, [
|
|
424
|
-
return e.onInput(
|
|
425
|
-
} }, model: { value: e.internalInputValue, callback: function(
|
|
426
|
-
e.internalInputValue =
|
|
427
|
-
}, expression: "internalInputValue" } }, "dt-rich-text-editor", e.$attrs, !1))], 1), e._t("middle"),
|
|
428
|
-
return [
|
|
460
|
+
], attrs: { "data-qa": "dt-message-input", role: "presentation" }, on: { click: function(o) {
|
|
461
|
+
var a;
|
|
462
|
+
(a = e.$refs.richTextEditor) == null || a.focusEditor();
|
|
463
|
+
}, "drag-enter": e.onDrag, "drag-over": e.onDrag, drop: e.onDrop, keydown: function(o) {
|
|
464
|
+
return !o.type.indexOf("key") && e._k(o.keyCode, "enter", 13, o.key, "Enter") || o.ctrlKey || o.shiftKey || o.altKey || o.metaKey ? null : e.onSend.apply(null, arguments);
|
|
465
|
+
}, paste: e.onPaste } }, [i("div", { staticClass: "d-of-auto d-mx16 d-mt8 d-mb4", style: { "max-height": e.maxHeight } }, [i("dt-rich-text-editor", e._b({ ref: "richTextEditor", attrs: { editable: e.editable, "input-aria-label": e.inputAriaLabel, "input-class": e.inputClass, "output-format": e.outputFormat, "auto-focus": e.autoFocus, link: e.link, placeholder: e.placeholder, "mention-suggestion": e.mentionSuggestion, "allow-blockquote": e.allowBlockquote, "allow-bold": e.allowBold, "allow-bullet-list": e.allowBulletList, "allow-italic": e.allowItalic, "allow-strike": e.allowStrike, "allow-underline": e.allowUnderline }, on: { focus: e.onFocus, blur: e.onBlur, input: function(o) {
|
|
466
|
+
return e.onInput(o);
|
|
467
|
+
} }, model: { value: e.internalInputValue, callback: function(o) {
|
|
468
|
+
e.internalInputValue = o;
|
|
469
|
+
}, expression: "internalInputValue" } }, "dt-rich-text-editor", e.$attrs, !1))], 1), e._t("middle"), i("section", { staticClass: "d-d-flex d-jc-space-between d-mx8 d-my4" }, [i("div", { staticClass: "d-d-flex" }, [e.showImagePicker ? i("dt-tooltip", { attrs: { placement: "top-start", message: e.showImagePicker.tooltipLabel, offset: [-4, -4] }, scopedSlots: e._u([{ key: "anchor", fn: function() {
|
|
470
|
+
return [i("dt-button", { attrs: { "data-qa": "dt-message-input-image-btn", size: "sm", circle: "", kind: e.imagePickerFocus ? "default" : "muted", importance: "clear", "aria-label": e.showImagePicker.ariaLabel }, on: { click: e.onSelectImage, mouseenter: function(o) {
|
|
429
471
|
e.imagePickerFocus = !0;
|
|
430
|
-
}, mouseleave: function(
|
|
472
|
+
}, mouseleave: function(o) {
|
|
431
473
|
e.imagePickerFocus = !1;
|
|
432
|
-
}, focus: function(
|
|
474
|
+
}, focus: function(o) {
|
|
433
475
|
e.imagePickerFocus = !0;
|
|
434
|
-
}, blur: function(
|
|
476
|
+
}, blur: function(o) {
|
|
435
477
|
e.imagePickerFocus = !1;
|
|
436
478
|
} }, scopedSlots: e._u([{ key: "icon", fn: function() {
|
|
437
|
-
return [
|
|
438
|
-
}, proxy: !0 }], null, !1, 2561380377) }),
|
|
439
|
-
}, proxy: !0 }], null, !1, 3687934814) }) : e._e(), e.showEmojiPicker ?
|
|
440
|
-
e.emojiPickerOpened =
|
|
479
|
+
return [i("dt-icon", { attrs: { name: "image", size: "300" } })];
|
|
480
|
+
}, proxy: !0 }], null, !1, 2561380377) }), i("dt-input", { ref: "messageInputImageUpload", staticClass: "d-ps-absolute", attrs: { "data-qa": "dt-message-input-image-input", type: "file", multiple: "", hidden: "" }, on: { input: e.onImageUpload } })];
|
|
481
|
+
}, proxy: !0 }], null, !1, 3687934814) }) : e._e(), e.showEmojiPicker ? i("dt-popover", { attrs: { "data-qa": "dt-message-input-emoji-picker-popover", open: e.emojiPickerOpened, "initial-focus-element": "#searchInput", padding: "none" }, on: { opened: (o) => {
|
|
482
|
+
e.emojiPickerOpened = o;
|
|
441
483
|
} }, scopedSlots: e._u([{ key: "anchor", fn: function() {
|
|
442
|
-
return [
|
|
443
|
-
return [
|
|
484
|
+
return [i("dt-tooltip", { attrs: { message: e.emojiTooltipMessage, offset: [0, -4] }, scopedSlots: e._u([{ key: "anchor", fn: function() {
|
|
485
|
+
return [i("dt-button", { attrs: { "data-qa": "dt-message-input-emoji-picker-btn", size: "sm", circle: "", kind: e.emojiPickerHovered ? "default" : "muted", importance: "clear", "aria-label": e.emojiButtonAriaLabel, offset: [0, 0] }, on: { click: e.toggleEmojiPicker, mouseenter: function(o) {
|
|
444
486
|
e.emojiPickerFocus = !0;
|
|
445
|
-
}, mouseleave: function(
|
|
487
|
+
}, mouseleave: function(o) {
|
|
446
488
|
e.emojiPickerFocus = !1;
|
|
447
|
-
}, focus: function(
|
|
489
|
+
}, focus: function(o) {
|
|
448
490
|
e.emojiPickerFocus = !0;
|
|
449
|
-
}, blur: function(
|
|
491
|
+
}, blur: function(o) {
|
|
450
492
|
e.emojiPickerFocus = !1;
|
|
451
493
|
} }, scopedSlots: e._u([{ key: "icon", fn: function() {
|
|
452
|
-
return [
|
|
494
|
+
return [i("dt-icon", { attrs: { name: e.emojiPickerHovered ? "very-satisfied" : "satisfied", size: "300" } })];
|
|
453
495
|
}, proxy: !0 }], null, !1, 352772906) })];
|
|
454
496
|
}, proxy: !0 }], null, !1, 3933528398) })];
|
|
455
497
|
}, proxy: !0 }, { key: "content", fn: function() {
|
|
456
|
-
return [
|
|
457
|
-
}, proxy: !0 }], null, !1, 1278205067) }) : e._e()], 1),
|
|
458
|
-
return [
|
|
459
|
-
}, proxy: !0 }], null, !1, 2591914334) }) : e._e(), e.showCancel ?
|
|
460
|
-
return [
|
|
461
|
-
"d-btn--circle",
|
|
498
|
+
return [i("dt-emoji-picker", e._b({ on: { "skin-tone": e.onSkinTone, "selected-emoji": e.onSelectEmoji } }, "dt-emoji-picker", e.emojiPickerProps, !1))];
|
|
499
|
+
}, proxy: !0 }], null, !1, 1278205067) }) : e._e()], 1), i("div", { staticClass: "d-d-flex" }, [e.showCharacterLimit ? i("dt-tooltip", { staticClass: "dt-message-input--remaining-char-tooltip", attrs: { placement: "top-end", enabled: e.characterLimitTooltipEnabled, message: e.showCharacterLimit.message, offset: [10, -8] }, scopedSlots: e._u([{ key: "anchor", fn: function() {
|
|
500
|
+
return [i("p", { directives: [{ name: "show", rawName: "v-show", value: e.displayCharacterLimitWarning, expression: "displayCharacterLimitWarning" }], staticClass: "d-fc-error d-mr16 dt-message-input--remaining-char", attrs: { "data-qa": "dt-message-input-character-limit" } }, [e._v(" " + e._s(e.showCharacterLimit.count - e.inputLength) + " ")])];
|
|
501
|
+
}, proxy: !0 }], null, !1, 2591914334) }) : e._e(), e.showCancel ? i("dt-button", { staticClass: "dt-message-input--cancel-button", attrs: { "data-qa": "dt-message-input-cancel-button", size: "sm", kind: "muted", importance: "clear", "aria-label": e.showCancel.ariaLabel }, on: { click: e.onCancel } }, [i("p", [e._v(e._s(e.showCancel.text))])]) : e._e(), e.showSend ? i("dt-tooltip", { attrs: { placement: "top-end", enabled: !e.showSend, message: e.showSend.tooltipLabel, show: !e.isSendDisabled && e.sendButtonFocus, offset: [6, -8] }, scopedSlots: e._u([{ key: "anchor", fn: function() {
|
|
502
|
+
return [i("dt-button", { class: [
|
|
462
503
|
{
|
|
463
|
-
"message-input-button__disabled d-fc-muted": e.isSendDisabled
|
|
504
|
+
"message-input-button__disabled d-fc-muted": e.isSendDisabled,
|
|
505
|
+
"d-btn--circle": e.showSend.icon
|
|
464
506
|
}
|
|
465
|
-
], attrs: { "data-qa": "dt-message-input-send-btn", size: "sm", kind: "default", importance: "primary", "aria-label": e.showSend.ariaLabel, "aria-disabled": e.isSendDisabled }, on: { click: e.onSend, mouseenter: function(
|
|
507
|
+
], attrs: { "data-qa": "dt-message-input-send-btn", size: "sm", kind: "default", importance: "primary", "aria-label": e.showSend.ariaLabel, "aria-disabled": e.isSendDisabled }, on: { click: e.onSend, mouseenter: function(o) {
|
|
466
508
|
e.sendButtonFocus = !0;
|
|
467
|
-
}, mouseleave: function(
|
|
509
|
+
}, mouseleave: function(o) {
|
|
468
510
|
e.sendButtonFocus = !1;
|
|
469
|
-
}, focus: function(
|
|
511
|
+
}, focus: function(o) {
|
|
470
512
|
e.sendButtonFocus = !0;
|
|
471
|
-
}, blur: function(
|
|
513
|
+
}, blur: function(o) {
|
|
472
514
|
e.sendButtonFocus = !1;
|
|
473
515
|
} }, scopedSlots: e._u([e.showSend.icon ? { key: "icon", fn: function() {
|
|
474
|
-
return [
|
|
475
|
-
}, proxy: !0 } : null], null, !0) }, [e.showSend.text ? [
|
|
476
|
-
}, proxy: !0 }], null, !1,
|
|
477
|
-
}, b = [], k = /* @__PURE__ */
|
|
516
|
+
return [i("dt-icon", { attrs: { name: e.showSend.icon, size: "300" } })];
|
|
517
|
+
}, proxy: !0 } : null], null, !0) }, [e.showSend.text ? [i("p", [e._v(e._s(e.showSend.text))])] : e._e()], 2)];
|
|
518
|
+
}, proxy: !0 }], null, !1, 2570122596) }) : e._e()], 1)])], 2);
|
|
519
|
+
}, b = [], k = /* @__PURE__ */ n(
|
|
478
520
|
h,
|
|
479
521
|
g,
|
|
480
522
|
b,
|
|
@@ -484,8 +526,8 @@ var g = function() {
|
|
|
484
526
|
null,
|
|
485
527
|
null
|
|
486
528
|
);
|
|
487
|
-
const
|
|
529
|
+
const Pe = k.exports;
|
|
488
530
|
export {
|
|
489
|
-
|
|
531
|
+
Pe as DtRecipeMessageInput
|
|
490
532
|
};
|
|
491
533
|
//# sourceMappingURL=message-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-input.js","sources":["../../recipes/conversation_view/message_input/message_input.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <div\n data-qa=\"dt-message-input\"\n role=\"presentation\"\n :class=\"['d-d-flex', 'd-fd-column', 'd-bar8', 'd-baw1', 'd-ba', 'd-c-text',\n { 'd-bc-bold d-bs-sm': hasFocus, 'd-bc-default': !hasFocus }]\"\n @click=\"$refs.richTextEditor?.focusEditor()\"\n @drag-enter=\"onDrag\"\n @drag-over=\"onDrag\"\n @drop=\"onDrop\"\n @keydown.enter.exact=\"onSend\"\n @paste=\"onPaste\"\n >\n <!-- Some wrapper to restrict the height and show the scrollbar -->\n <div\n class=\"d-of-auto d-mx16 d-mt8 d-mb4\"\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 :mention-suggestion=\"mentionSuggestion\"\n v-bind=\"$attrs\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @input=\"onInput($event)\"\n />\n </div>\n <!-- @slot Slot for attachment carousel -->\n <slot name=\"middle\" />\n <!-- Section for the bottom UI -->\n <section class=\"d-d-flex d-jc-space-between d-mx8 d-my4\">\n <!-- Left content -->\n <div class=\"d-d-flex\">\n <dt-tooltip\n v-if=\"showImagePicker\"\n placement=\"top-start\"\n :message=\"showImagePicker.tooltipLabel\"\n :offset=\"[-4, -4]\"\n >\n <template #anchor>\n <dt-button\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 type=\"file\"\n class=\"d-ps-absolute\"\n multiple\n hidden\n @input=\"onImageUpload\"\n />\n </template>\n </dt-tooltip>\n <dt-popover\n v-if=\"showEmojiPicker\"\n data-qa=\"dt-message-input-emoji-picker-popover\"\n :open=\"emojiPickerOpened\"\n initial-focus-element=\"#searchInput\"\n padding=\"none\"\n @opened=\"(open) => { emojiPickerOpened = open }\"\n >\n <template #anchor>\n <dt-tooltip\n :message=\"emojiTooltipMessage\"\n :offset=\"[0, -4]\"\n >\n <template #anchor>\n <dt-button\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 :offset=\"[0, 0]\"\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 </dt-tooltip>\n </template>\n <template #content>\n <dt-emoji-picker\n v-bind=\"emojiPickerProps\"\n @skin-tone=\"onSkinTone\"\n @selected-emoji=\"onSelectEmoji\"\n />\n </template>\n </dt-popover>\n </div>\n <!-- Right content -->\n <div class=\"d-d-flex\">\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=\"d-fc-error d-mr16 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 <!-- Send button -->\n <dt-tooltip\n v-if=\"showSend\"\n placement=\"top-end\"\n :enabled=\"!showSend\"\n :message=\"showSend.tooltipLabel\"\n :show=\"!isSendDisabled && sendButtonFocus\"\n :offset=\"[6, -8]\"\n >\n <template #anchor>\n <!-- Right positioned UI - send button -->\n <dt-button\n data-qa=\"dt-message-input-send-btn\"\n size=\"sm\"\n kind=\"default\"\n importance=\"primary\"\n :class=\"[\n 'd-btn--circle',\n {\n 'message-input-button__disabled d-fc-muted': isSendDisabled,\n },\n ]\"\n :aria-label=\"showSend.ariaLabel\"\n :aria-disabled=\"isSendDisabled\"\n @click=\"onSend\"\n @mouseenter=\"sendButtonFocus = true\"\n @mouseleave=\"sendButtonFocus = false\"\n @focus=\"sendButtonFocus = true\"\n @blur=\"sendButtonFocus = false\"\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 </template>\n </dt-tooltip>\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 { 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 * 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: false,\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 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 * Native focus event\n * @event input\n * @type {String|JSON}\n */\n 'focus',\n\n /**\n * Native blur event\n * @event input\n * @type {String|JSON}\n */\n 'blur',\n\n /**\n * Native input event\n * @event input\n * @type {String|JSON}\n */\n 'input',\n ],\n\n data () {\n return {\n internalInputValue: this.value, // internal input content\n hasFocus: false,\n imagePickerFocus: false,\n emojiPickerFocus: false,\n sendButtonFocus: 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\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 this.emojiPickerOpened = false;\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.emojiPickerOpened = false;\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 onFocus (event) {\n this.hasFocus = true;\n this.$refs.richTextEditor?.focusEditor();\n this.$emit('focus', event);\n },\n\n onBlur (event) {\n this.hasFocus = false;\n this.$emit('blur', event);\n },\n\n onInput (event) {\n this.$emit('input', event);\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-message-input--remaining-char-tooltip {\n margin-top: auto;\n margin-bottom: auto;\n}\n.dt-message-input--remaining-char {\n font-size: 1.2rem;\n}\n\n.message-input-button__disabled {\n background-color: unset;\n color: var(--theme-sidebar-icon-color);\n cursor: default;\n}\n\n.dt-message-input--cancel-button {\n margin-right: var(--dt-space-300);\n}\n</style>\n"],"names":["_sfc_main","DtButton","DtEmojiPicker","DtIcon","DtInput","DtPopover","DtRichTextEditor","DtTooltip","autoFocus","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","outputFormat","RICH_TEXT_EDITOR_OUTPUT_FORMATS","emojiPickerProps","prop","newValue","e","dt","files","skinTone","emoji","event","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqOA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,WAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAA;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AACA,WAAA,MAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"message-input.js","sources":["../../recipes/conversation_view/message_input/message_input.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <div\n data-qa=\"dt-message-input\"\n role=\"presentation\"\n :class=\"['d-d-flex', 'd-fd-column', 'd-bar8', 'd-baw1', 'd-ba', 'd-c-text',\n { 'd-bc-bold d-bs-sm': hasFocus, 'd-bc-default': !hasFocus }]\"\n @click=\"$refs.richTextEditor?.focusEditor()\"\n @drag-enter=\"onDrag\"\n @drag-over=\"onDrag\"\n @drop=\"onDrop\"\n @keydown.enter.exact=\"onSend\"\n @paste=\"onPaste\"\n >\n <!-- Some wrapper to restrict the height and show the scrollbar -->\n <div\n class=\"d-of-auto d-mx16 d-mt8 d-mb4\"\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 :mention-suggestion=\"mentionSuggestion\"\n :allow-blockquote=\"allowBlockquote\"\n :allow-bold=\"allowBold\"\n :allow-bullet-list=\"allowBulletList\"\n :allow-italic=\"allowItalic\"\n :allow-strike=\"allowStrike\"\n :allow-underline=\"allowUnderline\"\n v-bind=\"$attrs\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @input=\"onInput($event)\"\n />\n </div>\n <!-- @slot Slot for attachment carousel -->\n <slot name=\"middle\" />\n <!-- Section for the bottom UI -->\n <section class=\"d-d-flex d-jc-space-between d-mx8 d-my4\">\n <!-- Left content -->\n <div class=\"d-d-flex\">\n <dt-tooltip\n v-if=\"showImagePicker\"\n placement=\"top-start\"\n :message=\"showImagePicker.tooltipLabel\"\n :offset=\"[-4, -4]\"\n >\n <template #anchor>\n <dt-button\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 type=\"file\"\n class=\"d-ps-absolute\"\n multiple\n hidden\n @input=\"onImageUpload\"\n />\n </template>\n </dt-tooltip>\n <dt-popover\n v-if=\"showEmojiPicker\"\n data-qa=\"dt-message-input-emoji-picker-popover\"\n :open=\"emojiPickerOpened\"\n initial-focus-element=\"#searchInput\"\n padding=\"none\"\n @opened=\"(open) => { emojiPickerOpened = open }\"\n >\n <template #anchor>\n <dt-tooltip\n :message=\"emojiTooltipMessage\"\n :offset=\"[0, -4]\"\n >\n <template #anchor>\n <dt-button\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 :offset=\"[0, 0]\"\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 </dt-tooltip>\n </template>\n <template #content>\n <dt-emoji-picker\n v-bind=\"emojiPickerProps\"\n @skin-tone=\"onSkinTone\"\n @selected-emoji=\"onSelectEmoji\"\n />\n </template>\n </dt-popover>\n </div>\n <!-- Right content -->\n <div class=\"d-d-flex\">\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=\"d-fc-error d-mr16 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 <!-- Send button -->\n <dt-tooltip\n v-if=\"showSend\"\n placement=\"top-end\"\n :enabled=\"!showSend\"\n :message=\"showSend.tooltipLabel\"\n :show=\"!isSendDisabled && sendButtonFocus\"\n :offset=\"[6, -8]\"\n >\n <template #anchor>\n <!-- Right positioned UI - send button -->\n <dt-button\n data-qa=\"dt-message-input-send-btn\"\n size=\"sm\"\n kind=\"default\"\n importance=\"primary\"\n :class=\"[\n {\n 'message-input-button__disabled d-fc-muted': isSendDisabled,\n 'd-btn--circle': showSend.icon,\n },\n ]\"\n :aria-label=\"showSend.ariaLabel\"\n :aria-disabled=\"isSendDisabled\"\n @click=\"onSend\"\n @mouseenter=\"sendButtonFocus = true\"\n @mouseleave=\"sendButtonFocus = false\"\n @focus=\"sendButtonFocus = true\"\n @blur=\"sendButtonFocus = false\"\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 </template>\n </dt-tooltip>\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 { 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 * 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: false,\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 * 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 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 * Native focus event\n * @event input\n * @type {String|JSON}\n */\n 'focus',\n\n /**\n * Native blur event\n * @event input\n * @type {String|JSON}\n */\n 'blur',\n\n /**\n * Native input event\n * @event input\n * @type {String|JSON}\n */\n 'input',\n ],\n\n data () {\n return {\n internalInputValue: this.value, // internal input content\n hasFocus: false,\n imagePickerFocus: false,\n emojiPickerFocus: false,\n sendButtonFocus: 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\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 this.emojiPickerOpened = false;\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.emojiPickerOpened = false;\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 onFocus (event) {\n this.hasFocus = true;\n this.$refs.richTextEditor?.focusEditor();\n this.$emit('focus', event);\n },\n\n onBlur (event) {\n this.hasFocus = false;\n this.$emit('blur', event);\n },\n\n onInput (event) {\n this.$emit('input', event);\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-message-input--remaining-char-tooltip {\n margin-top: auto;\n margin-bottom: auto;\n}\n.dt-message-input--remaining-char {\n font-size: 1.2rem;\n}\n\n.message-input-button__disabled {\n background-color: unset;\n color: var(--theme-sidebar-icon-color);\n cursor: default;\n}\n\n.dt-message-input--cancel-button {\n margin-right: var(--dt-space-300);\n}\n</style>\n"],"names":["_sfc_main","DtButton","DtEmojiPicker","DtIcon","DtInput","DtPopover","DtRichTextEditor","DtTooltip","autoFocus","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","outputFormat","RICH_TEXT_EDITOR_OUTPUT_FORMATS","emojiPickerProps","prop","newValue","e","dt","files","skinTone","emoji","event","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2OA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,WAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;A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,KAAA,kBAGA,KAAA,MAAA,UAAA,KAAA,kBAAA;AAAA,IACA;AAAA,IAEA,WAAA;AACA,WAAA,MAAA,QAAA;AAAA,IACA;AAAA,IAEA,QAAAC,GAAA;;AACA,WAAA,WAAA,KACAC,IAAA,KAAA,MAAA,mBAAA,QAAAA,EAAA,eACA,KAAA,MAAA,SAAAD,CAAA;AAAA,IACA;AAAA,IAEA,OAAAA,GAAA;AACA,WAAA,WAAA,IACA,KAAA,MAAA,QAAAA,CAAA;AAAA,IACA;AAAA,IAEA,QAAAA,GAAA;AACA,WAAA,MAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/input-o-fc1X4b.js"),i=require("../chunks/input_group-j2gTtc1C.js"),r=require("../chunks/keyboard_list_navigation-N74Bpdq7.js");require("vue");require("./constants.cjs");require("./validators.cjs");require("./utils.cjs");require("./validation-messages.cjs");require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js");exports.DtCheckableInputMixin=e.C;exports.DtGroupableInputMixin=e.G;exports.DtInputMixin=e.I;exports.DtInputGroupMixin=i.I;exports.DtKeyboardListNavigationMixin=r.K;
|
|
2
|
+
//# sourceMappingURL=mixins.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mixins.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|