@dialpad/dialtone-vue 2.126.0 → 2.127.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/_plugin-vue2_normalizer-1aBeR4AK.js +59 -0
- package/dist/chunks/_plugin-vue2_normalizer-1aBeR4AK.js.map +1 -0
- package/dist/chunks/_plugin-vue2_normalizer-sOSkiPF3.js +60 -0
- package/dist/chunks/_plugin-vue2_normalizer-sOSkiPF3.js.map +1 -0
- package/dist/chunks/{dropdown-SMWaTWyF.js → dropdown-DTtcQEFC.js} +131 -84
- package/dist/chunks/{dropdown-SMWaTWyF.js.map → dropdown-DTtcQEFC.js.map} +1 -1
- package/dist/chunks/dropdown-IaLNHmVd.js +403 -0
- package/dist/chunks/dropdown-IaLNHmVd.js.map +1 -0
- package/dist/chunks/dropdown_constants-2pGCXy7m.js +8 -0
- package/dist/chunks/dropdown_constants-2pGCXy7m.js.map +1 -0
- package/dist/chunks/dropdown_constants-w1MXGC3Z.js +9 -0
- package/dist/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -0
- package/dist/chunks/{icon_constants-OpYAAKwF.js → icon_constants-Dy4MEUJL.js} +7 -6
- package/dist/chunks/{icon_constants-OpYAAKwF.js.map → icon_constants-Dy4MEUJL.js.map} +1 -1
- package/dist/chunks/icon_constants-QYpmdE0R.js +16 -0
- package/dist/chunks/icon_constants-QYpmdE0R.js.map +1 -0
- package/dist/chunks/index-DUr1xHR0.js +442 -0
- package/dist/chunks/{index-nIyl_PL6.js.map → index-DUr1xHR0.js.map} +1 -1
- package/dist/chunks/index-IA-Z8fgm.js +441 -0
- package/dist/chunks/index-IA-Z8fgm.js.map +1 -0
- package/dist/chunks/{input-1tm09l_-.js → input-6kbd8Pju.js} +83 -60
- package/dist/chunks/{input-1tm09l_-.js.map → input-6kbd8Pju.js.map} +1 -1
- package/dist/chunks/input-Axw-wFj2.js +295 -0
- package/dist/chunks/input-Axw-wFj2.js.map +1 -0
- package/dist/chunks/input_group-m3cWYUfI.js +143 -0
- package/dist/chunks/{input_group-zcAq3DQl.js.map → input_group-m3cWYUfI.js.map} +1 -1
- package/dist/chunks/{input_group-zcAq3DQl.js → input_group-qVZaS5Bb.js} +27 -24
- package/dist/chunks/input_group-qVZaS5Bb.js.map +1 -0
- package/dist/chunks/keyboard_list_navigation-ScXhrxya.js +284 -0
- package/dist/chunks/{keyboard_list_navigation-F0O8nht0.js.map → keyboard_list_navigation-ScXhrxya.js.map} +1 -1
- package/dist/chunks/keyboard_list_navigation-fJnl_Iox.js +283 -0
- package/dist/chunks/keyboard_list_navigation-fJnl_Iox.js.map +1 -0
- package/dist/chunks/link_constants-Huj7D_hm.js +22 -0
- package/dist/chunks/{link_constants-vIUB92L4.js.map → link_constants-Huj7D_hm.js.map} +1 -1
- package/dist/chunks/link_constants-nWVlXQBs.js +23 -0
- package/dist/chunks/link_constants-nWVlXQBs.js.map +1 -0
- package/dist/chunks/list_item_constants-EiqkqZvP.js +13 -0
- package/dist/chunks/{list_item_constants-LTUc74pD.js.map → list_item_constants-EiqkqZvP.js.map} +1 -1
- package/dist/chunks/list_item_constants-u1xcN9Dd.js +14 -0
- package/dist/chunks/list_item_constants-u1xcN9Dd.js.map +1 -0
- package/dist/chunks/modal-VgxXAQFP.js +105 -0
- package/dist/chunks/{modal-VuMFkZFH.js.map → modal-VgxXAQFP.js.map} +1 -1
- package/dist/chunks/modal-XOr4kiNZ.js +106 -0
- package/dist/chunks/modal-XOr4kiNZ.js.map +1 -0
- package/dist/chunks/notice_action-IRUoLX2d.js +196 -0
- package/dist/chunks/{notice_action-9NmtQRai.js.map → notice_action-IRUoLX2d.js.map} +1 -1
- package/dist/chunks/notice_action-P6uDyE9x.js +195 -0
- package/dist/chunks/notice_action-P6uDyE9x.js.map +1 -0
- package/dist/chunks/notice_constants-7Qt2CQEY.js +7 -0
- package/dist/chunks/{notice_constants-c--hBFQw.js.map → notice_constants-7Qt2CQEY.js.map} +1 -1
- package/dist/chunks/notice_constants-UXo9e3bS.js +6 -0
- package/dist/chunks/notice_constants-UXo9e3bS.js.map +1 -0
- package/dist/chunks/popover_constants-JwBF9h1Z.js +143 -0
- package/dist/chunks/{popover_constants-qjlEkroB.js.map → popover_constants-JwBF9h1Z.js.map} +1 -1
- package/dist/chunks/popover_constants-Qkpb0yh2.js +144 -0
- package/dist/chunks/popover_constants-Qkpb0yh2.js.map +1 -0
- package/dist/chunks/sr_only_close_button-81bHIpPu.js +95 -0
- package/dist/chunks/{sr_only_close_button-JGole5Xi.js.map → sr_only_close_button-81bHIpPu.js.map} +1 -1
- package/dist/chunks/sr_only_close_button-ZaGdAHz7.js +94 -0
- package/dist/chunks/sr_only_close_button-ZaGdAHz7.js.map +1 -0
- package/dist/chunks/stack_constants-HraCekPm.js +15 -0
- package/dist/chunks/{stack_constants-u7tNqGtc.js.map → stack_constants-HraCekPm.js.map} +1 -1
- package/dist/chunks/stack_constants-SMzMWnAQ.js +14 -0
- package/dist/chunks/stack_constants-SMzMWnAQ.js.map +1 -0
- package/dist/chunks/tab-FcsV5VmK.js +386 -0
- package/dist/chunks/tab-FcsV5VmK.js.map +1 -0
- package/dist/chunks/tab-V4cb44Ry.js +387 -0
- package/dist/chunks/{tab-Qm9LVkYj.js.map → tab-V4cb44Ry.js.map} +1 -1
- package/dist/common/constants.cjs +60 -0
- package/dist/common/constants.cjs.map +1 -0
- package/dist/{lib → common}/constants.js +25 -18
- package/dist/{lib → common}/constants.js.map +1 -1
- package/dist/common/dates.cjs +72 -0
- package/dist/common/dates.cjs.map +1 -0
- package/dist/common/dates.js +72 -0
- package/dist/{lib → common}/dates.js.map +1 -1
- package/dist/common/emoji.cjs +163 -0
- package/dist/common/emoji.cjs.map +1 -0
- package/dist/common/emoji.js +168 -0
- package/dist/common/emoji.js.map +1 -0
- package/dist/common/mixins.cjs +17 -0
- package/dist/common/mixins.cjs.map +1 -0
- package/dist/common/mixins.js +17 -0
- package/dist/common/utils.cjs +237 -0
- package/dist/common/utils.cjs.map +1 -0
- package/dist/common/utils.js +237 -0
- package/dist/{lib → common}/utils.js.map +1 -1
- package/dist/common/validators.cjs +23 -0
- package/dist/common/validators.cjs.map +1 -0
- package/dist/common/validators.js +23 -0
- package/dist/{lib → common}/validators.js.map +1 -1
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.cjs +373 -0
- package/dist/dialtone-vue.cjs.map +1 -0
- package/dist/dialtone-vue.js +325 -324
- package/dist/dialtone-vue.js.map +1 -1
- package/dist/lib/attachment-carousel.cjs +261 -0
- package/dist/lib/attachment-carousel.cjs.map +1 -0
- package/dist/lib/attachment-carousel.js +96 -85
- package/dist/lib/attachment-carousel.js.map +1 -1
- package/dist/lib/avatar.cjs +400 -0
- package/dist/lib/avatar.cjs.map +1 -0
- package/dist/lib/avatar.js +111 -80
- package/dist/lib/avatar.js.map +1 -1
- package/dist/lib/badge.cjs +183 -0
- package/dist/lib/badge.cjs.map +1 -0
- package/dist/lib/badge.js +53 -39
- package/dist/lib/badge.js.map +1 -1
- package/dist/lib/banner.cjs +210 -0
- package/dist/lib/banner.cjs.map +1 -0
- package/dist/lib/banner.js +58 -48
- package/dist/lib/banner.js.map +1 -1
- package/dist/lib/breadcrumbs.cjs +147 -0
- package/dist/lib/breadcrumbs.cjs.map +1 -0
- package/dist/lib/breadcrumbs.js +57 -48
- package/dist/lib/breadcrumbs.js.map +1 -1
- package/dist/lib/button-group.cjs +48 -0
- package/dist/lib/button-group.cjs.map +1 -0
- package/dist/lib/button-group.js +21 -18
- package/dist/lib/button-group.js.map +1 -1
- package/dist/lib/button.cjs +350 -0
- package/dist/lib/button.cjs.map +1 -0
- package/dist/lib/button.js +98 -76
- package/dist/lib/button.js.map +1 -1
- package/dist/lib/callbar-button-with-popover.cjs +250 -0
- package/dist/lib/callbar-button-with-popover.cjs.map +1 -0
- package/dist/lib/callbar-button-with-popover.js +66 -51
- package/dist/lib/callbar-button-with-popover.js.map +1 -1
- package/dist/lib/callbar-button.cjs +183 -0
- package/dist/lib/callbar-button.cjs.map +1 -0
- package/dist/lib/callbar-button.js +42 -34
- package/dist/lib/callbar-button.js.map +1 -1
- package/dist/lib/callbox.cjs +147 -0
- package/dist/lib/callbox.cjs.map +1 -0
- package/dist/lib/callbox.js +38 -33
- package/dist/lib/callbox.js.map +1 -1
- package/dist/lib/card.cjs +74 -0
- package/dist/lib/card.cjs.map +1 -0
- package/dist/lib/card.js +22 -20
- package/dist/lib/card.js.map +1 -1
- package/dist/lib/checkbox-group.cjs +130 -0
- package/dist/lib/checkbox-group.cjs.map +1 -0
- package/dist/lib/checkbox-group.js +42 -29
- package/dist/lib/checkbox-group.js.map +1 -1
- package/dist/lib/checkbox.cjs +128 -0
- package/dist/lib/checkbox.cjs.map +1 -0
- package/dist/lib/checkbox.js +46 -35
- package/dist/lib/checkbox.js.map +1 -1
- package/dist/lib/chip.cjs +199 -0
- package/dist/lib/chip.cjs.map +1 -0
- package/dist/lib/chip.js +59 -46
- package/dist/lib/chip.js.map +1 -1
- package/dist/lib/codeblock.cjs +30 -0
- package/dist/lib/codeblock.cjs.map +1 -0
- package/dist/lib/codeblock.js +15 -14
- package/dist/lib/codeblock.js.map +1 -1
- package/dist/lib/collapsible.cjs +335 -0
- package/dist/lib/collapsible.cjs.map +1 -0
- package/dist/lib/collapsible.js +91 -69
- package/dist/lib/collapsible.js.map +1 -1
- package/dist/lib/combobox-multi-select.cjs +520 -0
- package/dist/lib/combobox-multi-select.cjs.map +1 -0
- package/dist/lib/combobox-multi-select.js +223 -136
- package/dist/lib/combobox-multi-select.js.map +1 -1
- package/dist/lib/combobox-with-popover.cjs +385 -0
- package/dist/lib/combobox-with-popover.cjs.map +1 -0
- package/dist/lib/combobox-with-popover.js +131 -87
- package/dist/lib/combobox-with-popover.js.map +1 -1
- package/dist/lib/combobox.cjs +19 -0
- package/dist/lib/combobox.cjs.map +1 -0
- package/dist/lib/combobox.js +9 -9
- package/dist/lib/contact-info.cjs +146 -0
- package/dist/lib/contact-info.cjs.map +1 -0
- package/dist/lib/contact-info.js +34 -33
- package/dist/lib/contact-info.js.map +1 -1
- package/dist/lib/contact-row.cjs +206 -0
- package/dist/lib/contact-row.cjs.map +1 -0
- package/dist/lib/contact-row.js +42 -39
- package/dist/lib/contact-row.js.map +1 -1
- package/dist/lib/datepicker.cjs +663 -0
- package/dist/lib/datepicker.cjs.map +1 -0
- package/dist/lib/datepicker.js +330 -219
- package/dist/lib/datepicker.js.map +1 -1
- package/dist/lib/description-list.cjs +115 -0
- package/dist/lib/description-list.cjs.map +1 -0
- package/dist/lib/description-list.js +51 -19
- package/dist/lib/description-list.js.map +1 -1
- package/dist/lib/dropdown.cjs +46 -0
- package/dist/lib/dropdown.cjs.map +1 -0
- package/dist/lib/dropdown.js +27 -26
- package/dist/lib/dropdown.js.map +1 -1
- package/dist/lib/editor.cjs +556 -0
- package/dist/lib/editor.cjs.map +1 -0
- package/dist/lib/editor.js +191 -162
- package/dist/lib/editor.js.map +1 -1
- package/dist/lib/emoji-picker.cjs +1064 -0
- package/dist/lib/emoji-picker.cjs.map +1 -0
- package/dist/lib/emoji-picker.js +638 -375
- package/dist/lib/emoji-picker.js.map +1 -1
- package/dist/lib/emoji-row.cjs +89 -0
- package/dist/lib/emoji-row.cjs.map +1 -0
- package/dist/lib/emoji-row.js +46 -40
- package/dist/lib/emoji-row.js.map +1 -1
- package/dist/lib/emoji-text-wrapper.cjs +110 -0
- package/dist/lib/emoji-text-wrapper.cjs.map +1 -0
- package/dist/lib/emoji-text-wrapper.js +49 -35
- package/dist/lib/emoji-text-wrapper.js.map +1 -1
- package/dist/lib/emoji.cjs +146 -0
- package/dist/lib/emoji.cjs.map +1 -0
- package/dist/lib/emoji.js +140 -5
- package/dist/lib/emoji.js.map +1 -1
- package/dist/lib/feed-item-row.cjs +214 -0
- package/dist/lib/feed-item-row.cjs.map +1 -0
- package/dist/lib/feed-item-row.js +71 -64
- package/dist/lib/feed-item-row.js.map +1 -1
- package/dist/lib/feed-pill.cjs +150 -0
- package/dist/lib/feed-pill.cjs.map +1 -0
- package/dist/lib/feed-pill.js +60 -52
- package/dist/lib/feed-pill.js.map +1 -1
- package/dist/lib/general-row.cjs +406 -0
- package/dist/lib/general-row.cjs.map +1 -0
- package/dist/lib/general-row.js +133 -106
- package/dist/lib/general-row.js.map +1 -1
- package/dist/lib/group-row.cjs +118 -0
- package/dist/lib/group-row.cjs.map +1 -0
- package/dist/lib/group-row.js +34 -31
- package/dist/lib/group-row.js.map +1 -1
- package/dist/lib/grouped-chip.cjs +46 -0
- package/dist/lib/grouped-chip.cjs.map +1 -0
- package/dist/lib/grouped-chip.js +28 -27
- package/dist/lib/grouped-chip.js.map +1 -1
- package/dist/lib/hovercard.cjs +228 -0
- package/dist/lib/hovercard.cjs.map +1 -0
- package/dist/lib/hovercard.js +98 -64
- package/dist/lib/hovercard.js.map +1 -1
- package/dist/lib/icon.cjs +60 -0
- package/dist/lib/icon.cjs.map +1 -0
- package/dist/lib/icon.js +22 -44
- package/dist/lib/icon.js.map +1 -1
- package/dist/lib/image-viewer.cjs +191 -0
- package/dist/lib/image-viewer.cjs.map +1 -0
- package/dist/lib/image-viewer.js +83 -63
- package/dist/lib/image-viewer.js.map +1 -1
- package/dist/lib/input-group.cjs +92 -0
- package/dist/lib/input-group.cjs.map +1 -0
- package/dist/lib/input-group.js +29 -27
- package/dist/lib/input-group.js.map +1 -1
- package/dist/lib/input.cjs +493 -0
- package/dist/lib/input.cjs.map +1 -0
- package/dist/lib/input.js +127 -89
- package/dist/lib/input.js.map +1 -1
- package/dist/lib/item-layout.cjs +41 -0
- package/dist/lib/item-layout.cjs.map +1 -0
- package/dist/lib/item-layout.js +15 -13
- package/dist/lib/item-layout.js.map +1 -1
- package/dist/lib/ivr-node.cjs +210 -0
- package/dist/lib/ivr-node.cjs.map +1 -0
- package/dist/lib/ivr-node.js +115 -100
- package/dist/lib/ivr-node.js.map +1 -1
- package/dist/lib/keyboard-shortcut.cjs +107 -0
- package/dist/lib/keyboard-shortcut.cjs.map +1 -0
- package/dist/lib/keyboard-shortcut.js +42 -35
- package/dist/lib/keyboard-shortcut.js.map +1 -1
- package/dist/lib/lazy-show.cjs +81 -0
- package/dist/lib/lazy-show.cjs.map +1 -0
- package/dist/lib/lazy-show.js +20 -16
- package/dist/lib/lazy-show.js.map +1 -1
- package/dist/lib/link.cjs +71 -0
- package/dist/lib/link.cjs.map +1 -0
- package/dist/lib/link.js +22 -20
- package/dist/lib/link.js.map +1 -1
- package/dist/lib/list-item-group.cjs +61 -0
- package/dist/lib/list-item-group.cjs.map +1 -0
- package/dist/lib/list-item-group.js +19 -17
- package/dist/lib/list-item-group.js.map +1 -1
- package/dist/lib/list-item.cjs +205 -0
- package/dist/lib/list-item.cjs.map +1 -0
- package/dist/lib/list-item.js +67 -57
- package/dist/lib/list-item.js.map +1 -1
- package/dist/lib/message-input.cjs +555 -0
- package/dist/lib/message-input.cjs.map +1 -0
- package/dist/lib/message-input.js +211 -147
- package/dist/lib/message-input.js.map +1 -1
- package/dist/lib/modal.cjs +351 -0
- package/dist/lib/modal.cjs.map +1 -0
- package/dist/lib/modal.js +118 -91
- package/dist/lib/modal.js.map +1 -1
- package/dist/lib/notice.cjs +160 -0
- package/dist/lib/notice.cjs.map +1 -0
- package/dist/lib/notice.js +46 -44
- package/dist/lib/notice.js.map +1 -1
- package/dist/lib/pagination.cjs +153 -0
- package/dist/lib/pagination.cjs.map +1 -0
- package/dist/lib/pagination.js +60 -49
- package/dist/lib/pagination.js.map +1 -1
- package/dist/lib/popover.cjs +957 -0
- package/dist/lib/popover.cjs.map +1 -0
- package/dist/lib/popover.js +401 -222
- package/dist/lib/popover.js.map +1 -1
- package/dist/lib/presence.cjs +66 -0
- package/dist/lib/presence.cjs.map +1 -0
- package/dist/lib/presence.js +32 -26
- package/dist/lib/presence.js.map +1 -1
- package/dist/lib/radio-group.cjs +99 -0
- package/dist/lib/radio-group.cjs.map +1 -0
- package/dist/lib/radio-group.js +24 -22
- package/dist/lib/radio-group.js.map +1 -1
- package/dist/lib/radio.cjs +119 -0
- package/dist/lib/radio.cjs.map +1 -0
- package/dist/lib/radio.js +43 -35
- package/dist/lib/radio.js.map +1 -1
- package/dist/lib/rich-text-editor.cjs +1139 -0
- package/dist/lib/rich-text-editor.cjs.map +1 -0
- package/dist/lib/rich-text-editor.js +611 -392
- package/dist/lib/rich-text-editor.js.map +1 -1
- package/dist/lib/root-layout.cjs +131 -0
- package/dist/lib/root-layout.cjs.map +1 -0
- package/dist/lib/root-layout.js +28 -24
- package/dist/lib/root-layout.js.map +1 -1
- package/dist/lib/select-menu.cjs +283 -0
- package/dist/lib/select-menu.cjs.map +1 -0
- package/dist/lib/select-menu.js +101 -61
- package/dist/lib/select-menu.js.map +1 -1
- package/dist/lib/settings-menu-button.cjs +66 -0
- package/dist/lib/settings-menu-button.cjs.map +1 -0
- package/dist/lib/settings-menu-button.js +26 -25
- package/dist/lib/settings-menu-button.js.map +1 -1
- package/dist/lib/skeleton.cjs +613 -0
- package/dist/lib/skeleton.cjs.map +1 -0
- package/dist/lib/skeleton.js +174 -135
- package/dist/lib/skeleton.js.map +1 -1
- package/dist/lib/stack.cjs +128 -0
- package/dist/lib/stack.cjs.map +1 -0
- package/dist/lib/stack.js +66 -56
- package/dist/lib/stack.js.map +1 -1
- package/dist/lib/tabs.cjs +100 -0
- package/dist/lib/tabs.cjs.map +1 -0
- package/dist/lib/tabs.js +42 -35
- package/dist/lib/tabs.js.map +1 -1
- package/dist/lib/time-pill.cjs +48 -0
- package/dist/lib/time-pill.cjs.map +1 -0
- package/dist/lib/time-pill.js +21 -16
- package/dist/lib/time-pill.js.map +1 -1
- package/dist/lib/toast.cjs +248 -0
- package/dist/lib/toast.cjs.map +1 -0
- package/dist/lib/toast.js +78 -56
- package/dist/lib/toast.js.map +1 -1
- package/dist/lib/toggle.cjs +178 -0
- package/dist/lib/toggle.cjs.map +1 -0
- package/dist/lib/toggle.js +46 -37
- package/dist/lib/toggle.js.map +1 -1
- package/dist/lib/tooltip-directive.cjs +88 -0
- package/dist/lib/tooltip-directive.cjs.map +1 -0
- package/dist/lib/tooltip-directive.js +55 -41
- package/dist/lib/tooltip-directive.js.map +1 -1
- package/dist/lib/tooltip.cjs +437 -0
- package/dist/lib/tooltip.cjs.map +1 -0
- package/dist/lib/tooltip.js +152 -90
- package/dist/lib/tooltip.js.map +1 -1
- package/dist/lib/top-banner-info.cjs +64 -0
- package/dist/lib/top-banner-info.cjs.map +1 -0
- package/dist/lib/top-banner-info.js +22 -18
- package/dist/lib/top-banner-info.js.map +1 -1
- package/dist/lib/unread-pill.cjs +64 -0
- package/dist/lib/unread-pill.cjs.map +1 -0
- package/dist/lib/unread-pill.js +25 -22
- package/dist/lib/unread-pill.js.map +1 -1
- package/dist/lib/validation-messages.cjs +86 -0
- package/dist/lib/validation-messages.cjs.map +1 -0
- package/dist/lib/validation-messages.js +32 -29
- package/dist/lib/validation-messages.js.map +1 -1
- package/dist/style.css +1214 -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/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
- package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
- 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 +37 -35
- package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js +0 -33
- package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js.map +0 -1
- package/dist/chunks/dropdown_constants-EUcDxBrX.js +0 -9
- package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
- package/dist/chunks/index-YkSDT8-g.js +0 -244
- package/dist/chunks/index-YkSDT8-g.js.map +0 -1
- package/dist/chunks/index-nIyl_PL6.js +0 -372
- package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +0 -197
- package/dist/chunks/link_constants-vIUB92L4.js +0 -16
- package/dist/chunks/list_item_constants-LTUc74pD.js +0 -13
- package/dist/chunks/modal-VuMFkZFH.js +0 -82
- package/dist/chunks/notice_action-9NmtQRai.js +0 -182
- package/dist/chunks/notice_constants-c--hBFQw.js +0 -6
- package/dist/chunks/popover_constants-qjlEkroB.js +0 -114
- package/dist/chunks/sr_only_close_button-JGole5Xi.js +0 -86
- package/dist/chunks/stack_constants-u7tNqGtc.js +0 -13
- package/dist/chunks/tab-Qm9LVkYj.js +0 -346
- package/dist/lib/dates.js +0 -57
- package/dist/lib/mixins.js +0 -17
- package/dist/lib/utils.js +0 -175
- package/dist/lib/validators.js +0 -12
- /package/dist/{lib → common}/mixins.js.map +0 -0
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-1aBeR4AK.js");
|
|
4
|
+
const lib_button = require("./button.cjs");
|
|
5
|
+
const lib_emojiPicker = require("./emoji-picker.cjs");
|
|
6
|
+
const lib_icon = require("./icon.cjs");
|
|
7
|
+
const lib_input = require("./input.cjs");
|
|
8
|
+
const lib_popover = require("./popover.cjs");
|
|
9
|
+
const lib_richTextEditor = require("./rich-text-editor.cjs");
|
|
10
|
+
const lib_tooltip = require("./tooltip.cjs");
|
|
11
|
+
require("vue");
|
|
12
|
+
require("../chunks/link_constants-Huj7D_hm.js");
|
|
13
|
+
require("../chunks/tab-FcsV5VmK.js");
|
|
14
|
+
require("@dialpad/dialtone-emojis");
|
|
15
|
+
require("@dialpad/dialtone-icons/vue2");
|
|
16
|
+
require("../chunks/icon_constants-QYpmdE0R.js");
|
|
17
|
+
require("@dialpad/dialtone-icons/icons.json");
|
|
18
|
+
require("../common/constants.cjs");
|
|
19
|
+
require("../common/utils.cjs");
|
|
20
|
+
require("../chunks/input-Axw-wFj2.js");
|
|
21
|
+
require("../common/validators.cjs");
|
|
22
|
+
require("./validation-messages.cjs");
|
|
23
|
+
require("../chunks/popover_constants-JwBF9h1Z.js");
|
|
24
|
+
require("tippy.js");
|
|
25
|
+
require("./lazy-show.cjs");
|
|
26
|
+
require("@linusborg/vue-simple-portal");
|
|
27
|
+
require("../chunks/modal-VgxXAQFP.js");
|
|
28
|
+
require("../chunks/sr_only_close_button-ZaGdAHz7.js");
|
|
29
|
+
require("@tiptap/vue-2");
|
|
30
|
+
require("@tiptap/extension-blockquote");
|
|
31
|
+
require("@tiptap/extension-code-block");
|
|
32
|
+
require("@tiptap/extension-document");
|
|
33
|
+
require("@tiptap/extension-hard-break");
|
|
34
|
+
require("@tiptap/extension-paragraph");
|
|
35
|
+
require("@tiptap/extension-placeholder");
|
|
36
|
+
require("@tiptap/extension-bold");
|
|
37
|
+
require("@tiptap/extension-bullet-list");
|
|
38
|
+
require("@tiptap/extension-italic");
|
|
39
|
+
require("@tiptap/extension-link");
|
|
40
|
+
require("@tiptap/extension-list-item");
|
|
41
|
+
require("@tiptap/extension-ordered-list");
|
|
42
|
+
require("@tiptap/extension-strike");
|
|
43
|
+
require("@tiptap/extension-underline");
|
|
44
|
+
require("@tiptap/extension-text");
|
|
45
|
+
require("@tiptap/extension-text-align");
|
|
46
|
+
require("@tiptap/core");
|
|
47
|
+
require("./emoji.cjs");
|
|
48
|
+
require("../common/emoji.cjs");
|
|
49
|
+
require("emoji-regex");
|
|
50
|
+
require("emoji-toolkit/emoji_strategy.json");
|
|
51
|
+
require("./skeleton.cjs");
|
|
52
|
+
require("@tiptap/pm/state");
|
|
53
|
+
require("@tiptap/suggestion");
|
|
54
|
+
require("./list-item.cjs");
|
|
55
|
+
require("../chunks/list_item_constants-EiqkqZvP.js");
|
|
56
|
+
require("./item-layout.cjs");
|
|
57
|
+
require("./stack.cjs");
|
|
58
|
+
require("../chunks/stack_constants-SMzMWnAQ.js");
|
|
59
|
+
require("@tiptap/extension-mention");
|
|
60
|
+
require("./link.cjs");
|
|
61
|
+
require("./avatar.cjs");
|
|
62
|
+
require("./presence.cjs");
|
|
63
|
+
const _sfc_main = {
|
|
64
|
+
name: "DtRecipeMessageInput",
|
|
65
|
+
components: {
|
|
66
|
+
DtButton: lib_button.DtButton,
|
|
67
|
+
DtEmojiPicker: lib_emojiPicker.DtEmojiPicker,
|
|
68
|
+
DtIcon: lib_icon.DtIcon,
|
|
69
|
+
DtInput: lib_input.DtInput,
|
|
70
|
+
DtPopover: lib_popover.DtPopover,
|
|
71
|
+
DtRichTextEditor: lib_richTextEditor.DtRichTextEditor,
|
|
72
|
+
DtTooltip: lib_tooltip.DtTooltip
|
|
73
|
+
},
|
|
74
|
+
mixins: [],
|
|
75
|
+
inheritAttrs: false,
|
|
76
|
+
props: {
|
|
77
|
+
/**
|
|
78
|
+
* Value of the input. The object format should match TipTap's JSON
|
|
79
|
+
* document structure: https://tiptap.dev/guide/output#option-1-json
|
|
80
|
+
*/
|
|
81
|
+
value: {
|
|
82
|
+
type: [Object, String],
|
|
83
|
+
default: ""
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* Whether the input is editable
|
|
87
|
+
*/
|
|
88
|
+
editable: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: true
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* Descriptive label for the input element
|
|
94
|
+
*/
|
|
95
|
+
inputAriaLabel: {
|
|
96
|
+
type: String,
|
|
97
|
+
required: true,
|
|
98
|
+
default: ""
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* Additional class name for the input element. Only accepts a String value
|
|
102
|
+
* because this is passed to the editor via options. For multiple classes,
|
|
103
|
+
* join them into one string, e.g. "d-p8 d-hmx96"
|
|
104
|
+
*/
|
|
105
|
+
inputClass: {
|
|
106
|
+
type: String,
|
|
107
|
+
default: ""
|
|
108
|
+
},
|
|
109
|
+
/**
|
|
110
|
+
* Whether the input should receive focus after the component has been
|
|
111
|
+
* mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.
|
|
112
|
+
* - `start` Sets the focus to the beginning of the input
|
|
113
|
+
* - `end` Sets the focus to the end of the input
|
|
114
|
+
* - `all` Selects the whole contents of the input
|
|
115
|
+
* - `Number` Sets the focus to a specific position in the input
|
|
116
|
+
* - `true` Defaults to `start`
|
|
117
|
+
* - `false` Disables autofocus
|
|
118
|
+
* @values true, false, start, end, all, number
|
|
119
|
+
*/
|
|
120
|
+
autoFocus: {
|
|
121
|
+
type: [Boolean, String, Number],
|
|
122
|
+
default: false,
|
|
123
|
+
validator(autoFocus) {
|
|
124
|
+
if (typeof autoFocus === "string") {
|
|
125
|
+
return lib_richTextEditor.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);
|
|
126
|
+
}
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
/**
|
|
131
|
+
* The output format that the editor uses when emitting the "@input" event.
|
|
132
|
+
* One of `text`, `json`, `html`. See https://tiptap.dev/guide/output for
|
|
133
|
+
* examples.
|
|
134
|
+
* @values text, json, html
|
|
135
|
+
*/
|
|
136
|
+
outputFormat: {
|
|
137
|
+
type: String,
|
|
138
|
+
default: "text",
|
|
139
|
+
validator(outputFormat) {
|
|
140
|
+
return lib_richTextEditor.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
/**
|
|
144
|
+
* Enables the Link extension and optionally passes configurations to it
|
|
145
|
+
*/
|
|
146
|
+
link: {
|
|
147
|
+
type: [Boolean, Object],
|
|
148
|
+
default: false
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* Placeholder text
|
|
152
|
+
*/
|
|
153
|
+
placeholder: {
|
|
154
|
+
type: String,
|
|
155
|
+
default: ""
|
|
156
|
+
},
|
|
157
|
+
/**
|
|
158
|
+
* Disable Send Button
|
|
159
|
+
*/
|
|
160
|
+
disableSend: {
|
|
161
|
+
type: Boolean,
|
|
162
|
+
default: false
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* Content area needs to dynamically adjust height based on the conversation area height.
|
|
166
|
+
* can be vh|px|rem|em|%
|
|
167
|
+
*/
|
|
168
|
+
maxHeight: {
|
|
169
|
+
type: String,
|
|
170
|
+
default: "unset"
|
|
171
|
+
},
|
|
172
|
+
// Emoji picker props
|
|
173
|
+
showEmojiPicker: {
|
|
174
|
+
type: Boolean,
|
|
175
|
+
default: true
|
|
176
|
+
},
|
|
177
|
+
/**
|
|
178
|
+
* Props to pass into the emoji picker.
|
|
179
|
+
*/
|
|
180
|
+
emojiPickerProps: {
|
|
181
|
+
type: Object,
|
|
182
|
+
default: () => ({}),
|
|
183
|
+
validate(emojiPickerProps) {
|
|
184
|
+
return [
|
|
185
|
+
"searchNoResultsLabel",
|
|
186
|
+
"searchResultsLabel",
|
|
187
|
+
"searchPlaceholderLabel",
|
|
188
|
+
"skinSelectorButtonTooltipLabel",
|
|
189
|
+
"tabSetLabels"
|
|
190
|
+
].every((prop) => emojiPickerProps[prop] != null);
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
/**
|
|
194
|
+
* Emoji button tooltip label
|
|
195
|
+
*/
|
|
196
|
+
emojiTooltipMessage: {
|
|
197
|
+
type: String,
|
|
198
|
+
default: "Emoji"
|
|
199
|
+
},
|
|
200
|
+
// Aria label for buttons
|
|
201
|
+
/**
|
|
202
|
+
* Emoji button aria label
|
|
203
|
+
*/
|
|
204
|
+
emojiButtonAriaLabel: {
|
|
205
|
+
type: String,
|
|
206
|
+
default: "emoji button"
|
|
207
|
+
},
|
|
208
|
+
/**
|
|
209
|
+
* Enable character Limit warning
|
|
210
|
+
*/
|
|
211
|
+
showCharacterLimit: {
|
|
212
|
+
type: [Boolean, Object],
|
|
213
|
+
default: () => ({ count: 1500, warning: 500, message: "" })
|
|
214
|
+
},
|
|
215
|
+
showImagePicker: {
|
|
216
|
+
type: [Boolean, Object],
|
|
217
|
+
default: () => ({ tooltipLabel: "Attach Image", ariaLabel: "image button" })
|
|
218
|
+
},
|
|
219
|
+
/**
|
|
220
|
+
* Send button defaults.
|
|
221
|
+
*/
|
|
222
|
+
showSend: {
|
|
223
|
+
type: [Boolean, Object],
|
|
224
|
+
default: () => ({ icon: "send" })
|
|
225
|
+
},
|
|
226
|
+
/**
|
|
227
|
+
* Cancel button defaults.
|
|
228
|
+
*/
|
|
229
|
+
showCancel: {
|
|
230
|
+
type: [Boolean, Object],
|
|
231
|
+
default: () => ({ text: "Cancel" })
|
|
232
|
+
},
|
|
233
|
+
/**
|
|
234
|
+
* suggestion object containing the items query function.
|
|
235
|
+
* The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion
|
|
236
|
+
*
|
|
237
|
+
* The only required key is the items function which is used to query the contacts for suggestion.
|
|
238
|
+
* items({ query }) => { return [ContactObject]; }
|
|
239
|
+
* ContactObject format:
|
|
240
|
+
* { name: string, avatarSrc: string, id: string }
|
|
241
|
+
*
|
|
242
|
+
* When null, it does not add the plugin.
|
|
243
|
+
*/
|
|
244
|
+
mentionSuggestion: {
|
|
245
|
+
type: Object,
|
|
246
|
+
default: null
|
|
247
|
+
},
|
|
248
|
+
/**
|
|
249
|
+
* Whether the input allows for block quote.
|
|
250
|
+
*/
|
|
251
|
+
allowBlockquote: {
|
|
252
|
+
type: Boolean,
|
|
253
|
+
default: true
|
|
254
|
+
},
|
|
255
|
+
/**
|
|
256
|
+
* Whether the input allows for bold to be introduced in the text.
|
|
257
|
+
*/
|
|
258
|
+
allowBold: {
|
|
259
|
+
type: Boolean,
|
|
260
|
+
default: true
|
|
261
|
+
},
|
|
262
|
+
/**
|
|
263
|
+
* Whether the input allows for bullet list to be introduced in the text.
|
|
264
|
+
*/
|
|
265
|
+
allowBulletList: {
|
|
266
|
+
type: Boolean,
|
|
267
|
+
default: true
|
|
268
|
+
},
|
|
269
|
+
/**
|
|
270
|
+
* Whether the input allows for italic to be introduced in the text.
|
|
271
|
+
*/
|
|
272
|
+
allowItalic: {
|
|
273
|
+
type: Boolean,
|
|
274
|
+
default: true
|
|
275
|
+
},
|
|
276
|
+
/**
|
|
277
|
+
* Whether the input allows for strike to be introduced in the text.
|
|
278
|
+
*/
|
|
279
|
+
allowStrike: {
|
|
280
|
+
type: Boolean,
|
|
281
|
+
default: true
|
|
282
|
+
},
|
|
283
|
+
/**
|
|
284
|
+
* Whether the input allows for underline to be introduced in the text.
|
|
285
|
+
*/
|
|
286
|
+
allowUnderline: {
|
|
287
|
+
type: Boolean,
|
|
288
|
+
default: true
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
emits: [
|
|
292
|
+
/**
|
|
293
|
+
* Fires when send button is clicked
|
|
294
|
+
*
|
|
295
|
+
* @event submit
|
|
296
|
+
* @type {String}
|
|
297
|
+
*/
|
|
298
|
+
"submit",
|
|
299
|
+
/**
|
|
300
|
+
* Fires when media is selected from image button
|
|
301
|
+
*
|
|
302
|
+
* @event select-media
|
|
303
|
+
* @type {Array}
|
|
304
|
+
*/
|
|
305
|
+
"select-media",
|
|
306
|
+
/**
|
|
307
|
+
* Fires when media is dropped into the message input
|
|
308
|
+
*
|
|
309
|
+
* @event add-media
|
|
310
|
+
* @type {Array}
|
|
311
|
+
*/
|
|
312
|
+
"add-media",
|
|
313
|
+
/**
|
|
314
|
+
* Fires when media is pasted into the message input
|
|
315
|
+
*
|
|
316
|
+
* @event paste-media
|
|
317
|
+
* @type {Array}
|
|
318
|
+
*/
|
|
319
|
+
"paste-media",
|
|
320
|
+
/**
|
|
321
|
+
* Fires when cancel button is pressed (only on edit mode)
|
|
322
|
+
*
|
|
323
|
+
* @event cancel
|
|
324
|
+
* @type {Boolean}
|
|
325
|
+
*/
|
|
326
|
+
"cancel",
|
|
327
|
+
/**
|
|
328
|
+
* Fires when skin tone is selected from the emoji picker
|
|
329
|
+
*
|
|
330
|
+
* @event skin-tone
|
|
331
|
+
* @type {String}
|
|
332
|
+
*/
|
|
333
|
+
"skin-tone",
|
|
334
|
+
/**
|
|
335
|
+
* Fires when emoji is selected from the emoji picker
|
|
336
|
+
*
|
|
337
|
+
* @event selected-emoji
|
|
338
|
+
* @type {String}
|
|
339
|
+
*/
|
|
340
|
+
"selected-emoji",
|
|
341
|
+
/**
|
|
342
|
+
* Native focus event
|
|
343
|
+
* @event input
|
|
344
|
+
* @type {String|JSON}
|
|
345
|
+
*/
|
|
346
|
+
"focus",
|
|
347
|
+
/**
|
|
348
|
+
* Native blur event
|
|
349
|
+
* @event input
|
|
350
|
+
* @type {String|JSON}
|
|
351
|
+
*/
|
|
352
|
+
"blur",
|
|
353
|
+
/**
|
|
354
|
+
* Native input event
|
|
355
|
+
* @event input
|
|
356
|
+
* @type {String|JSON}
|
|
357
|
+
*/
|
|
358
|
+
"input"
|
|
359
|
+
],
|
|
360
|
+
data() {
|
|
361
|
+
return {
|
|
362
|
+
internalInputValue: this.value,
|
|
363
|
+
// internal input content
|
|
364
|
+
hasFocus: false,
|
|
365
|
+
imagePickerFocus: false,
|
|
366
|
+
emojiPickerFocus: false,
|
|
367
|
+
sendButtonFocus: false,
|
|
368
|
+
emojiPickerOpened: false
|
|
369
|
+
};
|
|
370
|
+
},
|
|
371
|
+
computed: {
|
|
372
|
+
inputLength() {
|
|
373
|
+
return this.internalInputValue.length;
|
|
374
|
+
},
|
|
375
|
+
displayCharacterLimitWarning() {
|
|
376
|
+
return Boolean(this.showCharacterLimit) && this.showCharacterLimit.count - this.inputLength <= this.showCharacterLimit.warning;
|
|
377
|
+
},
|
|
378
|
+
characterLimitTooltipEnabled() {
|
|
379
|
+
return this.showCharacterLimit.message && this.showCharacterLimit.count - this.inputLength < 0;
|
|
380
|
+
},
|
|
381
|
+
isSendDisabled() {
|
|
382
|
+
return this.disableSend || this.showCharacterLimit && this.inputLength > this.showCharacterLimit.count;
|
|
383
|
+
},
|
|
384
|
+
computedCloseButtonProps() {
|
|
385
|
+
return {
|
|
386
|
+
ariaLabel: "Close"
|
|
387
|
+
};
|
|
388
|
+
},
|
|
389
|
+
emojiPickerHovered() {
|
|
390
|
+
return this.emojiPickerFocus || this.emojiPickerOpened;
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
watch: {
|
|
394
|
+
value(newValue) {
|
|
395
|
+
this.internalInputValue = newValue;
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
methods: {
|
|
399
|
+
onDrag(e) {
|
|
400
|
+
e.stopPropagation();
|
|
401
|
+
e.preventDefault();
|
|
402
|
+
},
|
|
403
|
+
onDrop(e) {
|
|
404
|
+
e.stopPropagation();
|
|
405
|
+
e.preventDefault();
|
|
406
|
+
const dt = e.dataTransfer;
|
|
407
|
+
const files = Array.from(dt.files);
|
|
408
|
+
this.$emit("add-media", files);
|
|
409
|
+
},
|
|
410
|
+
onPaste(e) {
|
|
411
|
+
if (e.clipboardData.files.length) {
|
|
412
|
+
e.stopPropagation();
|
|
413
|
+
e.preventDefault();
|
|
414
|
+
const files = [...e.clipboardData.files];
|
|
415
|
+
this.$emit("paste-media", files);
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
onSkinTone(skinTone) {
|
|
419
|
+
this.$emit("skin-tone", skinTone);
|
|
420
|
+
},
|
|
421
|
+
onSelectEmoji(emoji) {
|
|
422
|
+
if (!emoji) {
|
|
423
|
+
this.emojiPickerOpened = false;
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
this.$refs.richTextEditor.editor.commands.insertContent({
|
|
427
|
+
type: "emoji",
|
|
428
|
+
attrs: {
|
|
429
|
+
code: emoji.shortname
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
this.emojiPickerOpened = false;
|
|
433
|
+
this.$emit("selected-emoji", emoji);
|
|
434
|
+
},
|
|
435
|
+
onSelectImage() {
|
|
436
|
+
this.$refs.messageInputImageUpload.$refs.input.click();
|
|
437
|
+
},
|
|
438
|
+
onImageUpload() {
|
|
439
|
+
this.$emit("select-media", this.$refs.messageInputImageUpload.$refs.input.files);
|
|
440
|
+
},
|
|
441
|
+
toggleEmojiPicker() {
|
|
442
|
+
this.emojiPickerOpened = !this.emojiPickerOpened;
|
|
443
|
+
},
|
|
444
|
+
onSend() {
|
|
445
|
+
if (this.isSendDisabled) {
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
this.$emit("submit", this.internalInputValue);
|
|
449
|
+
},
|
|
450
|
+
onCancel() {
|
|
451
|
+
this.$emit("cancel");
|
|
452
|
+
},
|
|
453
|
+
onFocus(event) {
|
|
454
|
+
var _a;
|
|
455
|
+
this.hasFocus = true;
|
|
456
|
+
(_a = this.$refs.richTextEditor) == null ? void 0 : _a.focusEditor();
|
|
457
|
+
this.$emit("focus", event);
|
|
458
|
+
},
|
|
459
|
+
onBlur(event) {
|
|
460
|
+
this.hasFocus = false;
|
|
461
|
+
this.$emit("blur", event);
|
|
462
|
+
},
|
|
463
|
+
onInput(event) {
|
|
464
|
+
this.$emit("input", event);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
var _sfc_render = function render() {
|
|
469
|
+
var _vm = this, _c = _vm._self._c;
|
|
470
|
+
return _c("div", { class: [
|
|
471
|
+
"d-d-flex",
|
|
472
|
+
"d-fd-column",
|
|
473
|
+
"d-bar8",
|
|
474
|
+
"d-baw1",
|
|
475
|
+
"d-ba",
|
|
476
|
+
"d-c-text",
|
|
477
|
+
{ "d-bc-bold d-bs-sm": _vm.hasFocus, "d-bc-default": !_vm.hasFocus }
|
|
478
|
+
], attrs: { "data-qa": "dt-message-input", "role": "presentation" }, on: { "click": function($event) {
|
|
479
|
+
var _a;
|
|
480
|
+
(_a = _vm.$refs.richTextEditor) == null ? void 0 : _a.focusEditor();
|
|
481
|
+
}, "drag-enter": _vm.onDrag, "drag-over": _vm.onDrag, "drop": _vm.onDrop, "keydown": function($event) {
|
|
482
|
+
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter"))
|
|
483
|
+
return null;
|
|
484
|
+
if ($event.ctrlKey || $event.shiftKey || $event.altKey || $event.metaKey)
|
|
485
|
+
return null;
|
|
486
|
+
return _vm.onSend.apply(null, arguments);
|
|
487
|
+
}, "paste": _vm.onPaste } }, [_c("div", { staticClass: "d-of-auto d-mx16 d-mt8 d-mb4", style: { "max-height": _vm.maxHeight } }, [_c("dt-rich-text-editor", _vm._b({ ref: "richTextEditor", attrs: { "editable": _vm.editable, "input-aria-label": _vm.inputAriaLabel, "input-class": _vm.inputClass, "output-format": _vm.outputFormat, "auto-focus": _vm.autoFocus, "link": _vm.link, "placeholder": _vm.placeholder, "mention-suggestion": _vm.mentionSuggestion, "allow-blockquote": _vm.allowBlockquote, "allow-bold": _vm.allowBold, "allow-bullet-list": _vm.allowBulletList, "allow-italic": _vm.allowItalic, "allow-strike": _vm.allowStrike, "allow-underline": _vm.allowUnderline }, on: { "focus": _vm.onFocus, "blur": _vm.onBlur, "input": function($event) {
|
|
488
|
+
return _vm.onInput($event);
|
|
489
|
+
} }, model: { value: _vm.internalInputValue, callback: function($$v) {
|
|
490
|
+
_vm.internalInputValue = $$v;
|
|
491
|
+
}, expression: "internalInputValue" } }, "dt-rich-text-editor", _vm.$attrs, false))], 1), _vm._t("middle"), _c("section", { staticClass: "d-d-flex d-jc-space-between d-mx8 d-my4" }, [_c("div", { staticClass: "d-d-flex" }, [_vm.showImagePicker ? _c("dt-tooltip", { attrs: { "placement": "top-start", "message": _vm.showImagePicker.tooltipLabel, "offset": [-4, -4] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
|
|
492
|
+
return [_c("dt-button", { attrs: { "data-qa": "dt-message-input-image-btn", "size": "sm", "circle": "", "kind": _vm.imagePickerFocus ? "default" : "muted", "importance": "clear", "aria-label": _vm.showImagePicker.ariaLabel }, on: { "click": _vm.onSelectImage, "mouseenter": function($event) {
|
|
493
|
+
_vm.imagePickerFocus = true;
|
|
494
|
+
}, "mouseleave": function($event) {
|
|
495
|
+
_vm.imagePickerFocus = false;
|
|
496
|
+
}, "focus": function($event) {
|
|
497
|
+
_vm.imagePickerFocus = true;
|
|
498
|
+
}, "blur": function($event) {
|
|
499
|
+
_vm.imagePickerFocus = false;
|
|
500
|
+
} }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
501
|
+
return [_c("dt-icon", { attrs: { "name": "image", "size": "300" } })];
|
|
502
|
+
}, proxy: true }], null, false, 2561380377) }), _c("dt-input", { ref: "messageInputImageUpload", staticClass: "d-ps-absolute", attrs: { "data-qa": "dt-message-input-image-input", "type": "file", "multiple": "", "hidden": "" }, on: { "input": _vm.onImageUpload } })];
|
|
503
|
+
}, proxy: true }], null, false, 3687934814) }) : _vm._e(), _vm.showEmojiPicker ? _c("dt-popover", { attrs: { "data-qa": "dt-message-input-emoji-picker-popover", "open": _vm.emojiPickerOpened, "initial-focus-element": "#searchInput", "padding": "none" }, on: { "opened": (open) => {
|
|
504
|
+
_vm.emojiPickerOpened = open;
|
|
505
|
+
} }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
|
|
506
|
+
return [_c("dt-tooltip", { attrs: { "message": _vm.emojiTooltipMessage, "offset": [0, -4] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
|
|
507
|
+
return [_c("dt-button", { attrs: { "data-qa": "dt-message-input-emoji-picker-btn", "size": "sm", "circle": "", "kind": _vm.emojiPickerHovered ? "default" : "muted", "importance": "clear", "aria-label": _vm.emojiButtonAriaLabel, "offset": [0, 0] }, on: { "click": _vm.toggleEmojiPicker, "mouseenter": function($event) {
|
|
508
|
+
_vm.emojiPickerFocus = true;
|
|
509
|
+
}, "mouseleave": function($event) {
|
|
510
|
+
_vm.emojiPickerFocus = false;
|
|
511
|
+
}, "focus": function($event) {
|
|
512
|
+
_vm.emojiPickerFocus = true;
|
|
513
|
+
}, "blur": function($event) {
|
|
514
|
+
_vm.emojiPickerFocus = false;
|
|
515
|
+
} }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
516
|
+
return [_c("dt-icon", { attrs: { "name": !_vm.emojiPickerHovered ? "satisfied" : "very-satisfied", "size": "300" } })];
|
|
517
|
+
}, proxy: true }], null, false, 352772906) })];
|
|
518
|
+
}, proxy: true }], null, false, 3933528398) })];
|
|
519
|
+
}, proxy: true }, { key: "content", fn: function() {
|
|
520
|
+
return [_c("dt-emoji-picker", _vm._b({ on: { "skin-tone": _vm.onSkinTone, "selected-emoji": _vm.onSelectEmoji } }, "dt-emoji-picker", _vm.emojiPickerProps, false))];
|
|
521
|
+
}, proxy: true }], null, false, 1278205067) }) : _vm._e()], 1), _c("div", { staticClass: "d-d-flex" }, [Boolean(_vm.showCharacterLimit) ? _c("dt-tooltip", { staticClass: "dt-message-input--remaining-char-tooltip", attrs: { "placement": "top-end", "enabled": _vm.characterLimitTooltipEnabled, "message": _vm.showCharacterLimit.message, "offset": [10, -8] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
|
|
522
|
+
return [_c("p", { directives: [{ name: "show", rawName: "v-show", value: _vm.displayCharacterLimitWarning, expression: "displayCharacterLimitWarning" }], staticClass: "d-fc-error d-mr16 dt-message-input--remaining-char", attrs: { "data-qa": "dt-message-input-character-limit" } }, [_vm._v(" " + _vm._s(_vm.showCharacterLimit.count - _vm.inputLength) + " ")])];
|
|
523
|
+
}, proxy: true }], null, false, 2591914334) }) : _vm._e(), _vm.showCancel ? _c("dt-button", { staticClass: "dt-message-input--cancel-button", attrs: { "data-qa": "dt-message-input-cancel-button", "size": "sm", "kind": "muted", "importance": "clear", "aria-label": _vm.showCancel.ariaLabel }, on: { "click": _vm.onCancel } }, [_c("p", [_vm._v(_vm._s(_vm.showCancel.text))])]) : _vm._e(), _vm.showSend ? _c("dt-tooltip", { attrs: { "placement": "top-end", "enabled": !_vm.showSend, "message": _vm.showSend.tooltipLabel, "show": !_vm.isSendDisabled && _vm.sendButtonFocus, "offset": [6, -8] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
|
|
524
|
+
return [_c("dt-button", { class: [
|
|
525
|
+
{
|
|
526
|
+
"message-input-button__disabled d-fc-muted": _vm.isSendDisabled,
|
|
527
|
+
"d-btn--circle": _vm.showSend.icon
|
|
528
|
+
}
|
|
529
|
+
], attrs: { "data-qa": "dt-message-input-send-btn", "size": "sm", "kind": "default", "importance": "primary", "aria-label": _vm.showSend.ariaLabel, "aria-disabled": _vm.isSendDisabled }, on: { "click": _vm.onSend, "mouseenter": function($event) {
|
|
530
|
+
_vm.sendButtonFocus = true;
|
|
531
|
+
}, "mouseleave": function($event) {
|
|
532
|
+
_vm.sendButtonFocus = false;
|
|
533
|
+
}, "focus": function($event) {
|
|
534
|
+
_vm.sendButtonFocus = true;
|
|
535
|
+
}, "blur": function($event) {
|
|
536
|
+
_vm.sendButtonFocus = false;
|
|
537
|
+
} }, scopedSlots: _vm._u([_vm.showSend.icon ? { key: "icon", fn: function() {
|
|
538
|
+
return [_c("dt-icon", { attrs: { "name": _vm.showSend.icon, "size": "300" } })];
|
|
539
|
+
}, proxy: true } : null], null, true) }, [_vm.showSend.text ? [_c("p", [_vm._v(_vm._s(_vm.showSend.text))])] : _vm._e()], 2)];
|
|
540
|
+
}, proxy: true }], null, false, 2570122596) }) : _vm._e()], 1)])], 2);
|
|
541
|
+
};
|
|
542
|
+
var _sfc_staticRenderFns = [];
|
|
543
|
+
var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
|
|
544
|
+
_sfc_main,
|
|
545
|
+
_sfc_render,
|
|
546
|
+
_sfc_staticRenderFns,
|
|
547
|
+
false,
|
|
548
|
+
null,
|
|
549
|
+
null,
|
|
550
|
+
null,
|
|
551
|
+
null
|
|
552
|
+
);
|
|
553
|
+
const message_input = __component__.exports;
|
|
554
|
+
exports.DtRecipeMessageInput = message_input;
|
|
555
|
+
//# 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":["DtButton","DtEmojiPicker","DtIcon","DtInput","DtPopover","DtRichTextEditor","DtTooltip","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","RICH_TEXT_EDITOR_OUTPUT_FORMATS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2OA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA,WAAA;AAAA,IACA,eAAAC,gBAAA;AAAA,IACA,QAAAC,SAAA;AAAA,IACA,SAAAC,UAAA;AAAA,IACA,WAAAC,YAAA;AAAA,IACA,kBAAAC,mBAAA;AAAA,IACA,WAAAC,YAAA;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;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,WAAA;AAAA,MACA,MAAA,CAAA,SAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,WAAA;AACA,YAAA,OAAA,cAAA,UAAA;AACA,iBAAAC,mBAAA,iCAAA,SAAA,SAAA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