@dialpad/dialtone-vue 3.222.1 → 3.222.2
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/components/modal/modal.vue.d.ts +1 -0
- package/dist/components/modal/modal.vue.d.ts.map +1 -1
- package/dist/components/popover/popover.vue.d.ts.map +1 -1
- package/dist/dialtone-vue.cjs +1 -1
- package/dist/dialtone-vue.js +2 -2
- package/dist/lib/editor/editor.cjs +1 -1
- package/dist/lib/editor/editor.js +1 -1
- package/dist/lib/message-input/index.cjs +1 -1
- package/dist/lib/message-input/index.js +1 -1
- package/dist/lib/message-input/message-input.cjs +1 -1
- package/dist/lib/message-input/message-input.js +1 -1
- package/dist/lib/modal/modal.cjs +1 -1
- package/dist/lib/modal/modal.cjs.map +1 -1
- package/dist/lib/modal/modal.js +5 -2
- package/dist/lib/modal/modal.js.map +1 -1
- package/dist/lib/popover/popover.cjs +1 -1
- package/dist/lib/popover/popover.cjs.map +1 -1
- package/dist/lib/popover/popover.js +1 -1
- package/dist/lib/popover/popover.js.map +1 -1
- package/dist/lib/rich-text-editor/index.cjs +1 -1
- package/dist/lib/rich-text-editor/index.js +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.cjs +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.js +1 -1
- package/dist/{message_input-B47LB7C8.js → message_input-B2fppje7.js} +2 -2
- package/dist/{message_input-B47LB7C8.js.map → message_input-B2fppje7.js.map} +1 -1
- package/dist/{message_input-BCIq_1AD.cjs → message_input-DmLi63dh.cjs} +2 -2
- package/dist/{message_input-BCIq_1AD.cjs.map → message_input-DmLi63dh.cjs.map} +1 -1
- package/dist/{rich_text_editor-CNFb6tIx.js → rich_text_editor-BhUKyR0E.js} +2 -2
- package/dist/{rich_text_editor-CNFb6tIx.js.map → rich_text_editor-BhUKyR0E.js.map} +1 -1
- package/dist/{rich_text_editor-DRytK1_9.cjs → rich_text_editor-wvONcbYd.cjs} +2 -2
- package/dist/{rich_text_editor-DRytK1_9.cjs.map → rich_text_editor-wvONcbYd.cjs.map} +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","names":[],"sources":["../../../components/popover/popover.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <div>\n <Teleport\n v-if=\"modal && isOpen\"\n to=\"body\"\n >\n <div\n class=\"d-modal--transparent\"\n aria-hidden=\"false\"\n @click.prevent.stop\n />\n </Teleport>\n <component\n :is=\"elementType\"\n ref=\"popover\"\n :class=\"['d-popover', { 'd-popover__anchor--opened': isOpen }]\"\n data-qa=\"dt-popover-container\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"!ariaLabelledby && labelledBy\"\n ref=\"anchor\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-anchor` : 'dt-popover-anchor'\"\n :tabindex=\"openOnContext ? 0 : undefined\"\n @click.capture=\"defaultToggleOpen\"\n @contextmenu=\"onContext\"\n @keydown.up.prevent=\"onArrowKeyPress\"\n @keydown.down.prevent=\"onArrowKeyPress\"\n @keydown.escape.capture=\"closePopover\"\n @keydown.enter=\"$emit('keydown', $event)\"\n @keydown.space=\"$emit('keydown', $event)\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n >\n <!-- @slot Anchor element that activates the popover. Usually a button. -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-expanded': isOpen.toString(),\n 'aria-controls': id,\n 'aria-haspopup': role,\n }\"\n />\n </div>\n <dt-lazy-show\n :id=\"id\"\n ref=\"content\"\n :role=\"role\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}__dialog` : 'dt-popover'\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :aria-modal=\"`${!modal}`\"\n :transition=\"transition\"\n :show=\"isOpen\"\n :appear=\"toAppear\"\n :class=\"['d-popover__dialog', { 'd-popover__dialog--modal': modal }, dialogClass]\"\n :style=\"{\n 'max-height': calculatedMaxHeight,\n 'max-width': maxWidth,\n }\"\n :css=\"$attrs.css\"\n :tabindex=\"contentTabindex\"\n v-on=\"popoverListeners\"\n @mouseenter=\"onMouseEnterAnchor\"\n @mouseleave=\"onMouseLeaveAnchor\"\n >\n <popover-header-footer\n v-if=\"hasSlotContent($slots.headerContent) || showCloseButton\"\n ref=\"popover__header\"\n :class=\"POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding]\"\n :content-class=\"headerClass\"\n type=\"header\"\n :show-close-button=\"showCloseButton\"\n @close=\"closePopover\"\n >\n <template #content>\n <!-- @slot Slot for popover header content -->\n <slot\n name=\"headerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <div\n ref=\"popover__content\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-content` : 'dt-popover-content'\"\n :class=\"[\n 'd-popover__content',\n POPOVER_PADDING_CLASSES[padding],\n contentClass,\n ]\"\n >\n <!-- @slot Slot for the content that is displayed in the popover when it is open. -->\n <slot\n name=\"content\"\n :close=\"closePopover\"\n />\n </div>\n <popover-header-footer\n v-if=\"hasSlotContent($slots.footerContent)\"\n ref=\"popover__footer\"\n type=\"footer\"\n :class=\"POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding]\"\n :content-class=\"footerClass\"\n >\n <template #content>\n <!-- @slot Slot for the footer content. -->\n <slot\n name=\"footerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <sr-only-close-button\n v-if=\"!showCloseButton\"\n @close=\"closePopover\"\n />\n </dt-lazy-show>\n </component>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n POPOVER_APPEND_TO_VALUES,\n POPOVER_CONTENT_WIDTHS,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n POPOVER_INITIAL_FOCUS_STRINGS,\n POPOVER_PADDING_CLASSES,\n POPOVER_ROLES,\n POPOVER_STICKY_VALUES,\n} from './popover_constants';\nimport { getUniqueString, hasSlotContent, isOutOfViewPort, warnIfUnmounted, disableRootScrolling, enableRootScrolling, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport ModalMixin from '@/common/mixins/modal';\nimport { createTippyPopover, getPopperOptions } from './tippy_utils';\nimport PopoverHeaderFooter from './popover_header_footer.vue';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\n\n/**\n * A Popover displays a content overlay when its anchor element is activated.\n * @see https://dialtone.dialpad.com/components/popover.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtPopover',\n\n /********************\n * CHILD COMPONENTS *\n ********************/\n components: {\n SrOnlyCloseButton,\n DtLazyShow,\n PopoverHeaderFooter,\n },\n\n mixins: [ModalMixin],\n\n props: {\n /**\n * Controls whether the popover is shown. Leaving this null will have the popover trigger on click by default.\n * If you set this value, the default trigger behavior will be disabled, and you can control it as you need.\n * Supports v-model\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Opens the popover on right click (context menu). If you set this value to `true`,\n * the default trigger behavior will be disabled.\n * @values true, false\n */\n openOnContext: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * ARIA role for the content of the popover. Defaults to \"dialog\".\n * <a class=\"d-link\" href=\"https://www.w3.org/TR/wai-aria/#aria-haspopup\" target=\"_blank\">aria-haspopup</a>\n */\n role: {\n type: String,\n default: 'dialog',\n validator: (role) => {\n return POPOVER_ROLES.includes(role);\n },\n },\n\n /**\n * ID of the element that serves as the label for the popover content.\n * Defaults to the \"anchor\" element; this exists to provide a different\n * ID of the label element if, for example, the anchor slot contains\n * other items that do not serve as a label. You should provide this\n * or ariaLabel, but not both.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Descriptive label for the popover content. You should provide this\n * or ariaLabelledby, but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n padding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n * @values null, anchor\n */\n contentWidth: {\n type: String,\n default: '',\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * Whether to apply transition on initial render in the content lazy show component.\n */\n contentAppear: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Tabindex value for the content. Passing null, no tabindex attribute will be set.\n */\n contentTabindex: {\n type: Number || null,\n default: -1,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n * @deprecated Use externalAnchorElement instead for Shadow DOM compatibility.\n */\n externalAnchor: {\n type: String,\n default: '',\n },\n\n /**\n * External anchor element reference. Use this instead of externalAnchor when\n * the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.\n */\n externalAnchorElement: {\n type: HTML_ELEMENT_TYPE,\n default: null,\n },\n\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * Determines if the popover hides upon clicking the\n * anchor or outside the content box.\n * @values true, false\n */\n hideOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines modal state. If enabled popover has a modal overlay\n * preventing interaction with elements below it, but it is invisible.\n * @values true, false\n */\n modal: {\n type: Boolean,\n default: true,\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\".\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'bottom-end',\n },\n\n /**\n * If set to false the dialog will display over top of the anchor when there is insufficient space.\n * If set to true it will never move from its position relative to the anchor and will clip instead.\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/prevent-overflow/#tether\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * @values true, false\n */\n tether: {\n type: Boolean,\n default: true,\n },\n\n /**\n * If the popover sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: false,\n validator: (sticky) => {\n return POPOVER_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the header content wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer content wrapper element.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element.\n */\n dialogClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n * @values none, dialog, first\n */\n initialFocusElement: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'first',\n validator: initialFocusElement => {\n return POPOVER_INITIAL_FOCUS_STRINGS.includes(initialFocusElement) ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * If the popover should open pressing up or down arrow key on the anchor element.\n * This can be set when not passing open prop.\n * @values true, false\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * 'root' will try append to the iFrame's parent body if it is contained in an iFrame\n * and has permissions to access it, else, it'd default to 'parent'.\n * @values 'body', 'parent', 'root', HTMLElement\n */\n appendTo: {\n type: [HTML_ELEMENT_TYPE, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n },\n\n emits: [\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n\n /**\n * Emitted when the mouse enters the popover\n *\n * @event mouseenter-popover\n */\n 'mouseenter-popover',\n\n /**\n * Emitted when the mouse leaves the popover\n *\n * @event mouseleave-popover\n */\n 'mouseleave-popover',\n\n /**\n * Emitted when the mouse enters the popover anchor\n *\n * @event mouseenter-popover-anchor\n */\n 'mouseenter-popover-anchor',\n\n /**\n * Emitted when the mouse leaves the popover anchor\n *\n * @event mouseleave-popover-anchor\n */\n 'mouseleave-popover-anchor',\n ],\n\n data () {\n return {\n POPOVER_PADDING_CLASSES,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n intersectionObserver: null,\n mutationObserver: null,\n isOutsideViewport: false,\n isOpen: false,\n toAppear: false,\n anchorEl: null,\n popoverContentEl: null,\n hasSlotContent,\n };\n },\n\n computed: {\n popoverListeners () {\n return {\n keydown: event => {\n this.onKeydown(event);\n },\n\n 'after-leave': () => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': () => {\n this.onEnterTransitionComplete();\n },\n };\n },\n\n calculatedMaxHeight () {\n if (this.isOutsideViewport && this.modal) {\n return `calc(100vh - var(--dt-space-300))`;\n }\n return this.maxHeight;\n },\n\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor.\n return this.ariaLabelledby || (!this.ariaLabel && getUniqueString('DtPopover__anchor'));\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n deep: true,\n handler () {\n this.validateProps();\n },\n },\n\n modal (modal) {\n this.tip?.setProps({\n zIndex: modal ? 650 : this.calculateAnchorZindex(),\n });\n },\n\n offset (offset) {\n this.tip?.setProps({\n offset,\n });\n },\n\n sticky (sticky) {\n this.tip?.setProps({\n sticky,\n });\n },\n\n fallbackPlacements () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n tether () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n externalAnchorElement () {\n this.updateAnchorEl();\n },\n\n placement (placement) {\n this.tip?.setProps({\n placement,\n });\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n if (open === true) {\n this.toAppear = true;\n }\n },\n\n immediate: true,\n },\n\n contentAppear: {\n handler: function (contentAppear) {\n if (contentAppear !== null) {\n this.toAppear = contentAppear;\n }\n },\n },\n\n isOpen (isOpen, isPrev) {\n if (isOpen) {\n this.initTippyInstance();\n this.tip?.show();\n } else if (!isOpen && isPrev !== isOpen) {\n this.removeEventListeners();\n this.tip?.hide();\n }\n },\n },\n\n mounted () {\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n\n this.popoverContentEl = returnFirstEl(this.$refs.content?.$el);\n this.updateAnchorEl();\n\n this.mutationObserver = new MutationObserver(this.updateAnchorEl);\n this.mutationObserver.observe(this.$refs.anchor, {childList: true});\n\n // rootMargin here must be greater than the margin of the height we are setting in calculatedMaxHeight which\n // currently is var(--dt-space-300) (4px). If not the intersectionObserver will continually trigger in an infinite\n // loop.\n // threshold 1.0 makes this trigger every time the dialog \"touches\" the edge of the viewport.\n this.intersectionObserver = new IntersectionObserver(this.hasIntersectedViewport);\n this.intersectionObserver.observe(this.popoverContentEl);\n },\n\n beforeUnmount () {\n this._isUnmounting = true;\n // Cancel any in-progress CSS transitions so transitionend cannot fire\n // after this component is torn down and call into dead lifecycle methods.\n if (this.popoverContentEl) {\n this.popoverContentEl.style.transition = 'none';\n }\n this.tip?.destroy();\n this.intersectionObserver?.disconnect();\n this.mutationObserver?.disconnect();\n this.removeReferences();\n this.removeEventListeners();\n },\n\n /******************\n * METHODS *\n ******************/\n methods: {\n\n hasIntersectedViewport (entries) {\n const dialog = entries?.[0]?.target;\n if (!dialog) return;\n const isOut = isOutOfViewPort(dialog);\n this.isOutsideViewport = isOut.bottom || isOut.top;\n },\n\n updateAnchorEl () {\n const externalAnchorEl = this.externalAnchorElement ||\n (this.externalAnchor\n ? this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`)\n : null);\n const anchorEl = externalAnchorEl ?? this.$refs.anchor.children[0];\n if (anchorEl === this.anchorEl) {\n return;\n }\n this.anchorEl = anchorEl;\n\n this.tip?.destroy();\n delete this.tip;\n\n if (!this.anchorEl) {\n console.warn('No anchor found for popover');\n return;\n }\n\n if (this.isOpen) {\n this.initTippyInstance();\n this.tip?.show();\n }\n },\n\n popperOptions () {\n return getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n tether: this.tether,\n hasHideModifierEnabled: true,\n });\n },\n\n validateProps () {\n if (this.modal && this.initialFocusElement === 'none') {\n console.error('If the popover is modal you must set the ' +\n 'initialFocusElement prop. Possible values: \"dialog\", \"first\", HTMLElement');\n }\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at popover z-index\n if (returnFirstEl(this.$el).getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 650 when\n // anchor of popover is within a drawer.\n this.anchorEl?.closest('.d-zi-drawer')) {\n return 650;\n } else {\n return 300;\n }\n },\n\n defaultToggleOpen (e) {\n if (this.openOnContext) { return; }\n\n // Only use default toggle behaviour if the user has not set the open prop.\n // Check that the anchor element specifically was clicked.\n if (this.open === null || this.open === undefined) {\n if ((!this.anchorEl?.contains(e.target) && !this.anchorEl?.isEqualNode(e.target)) || this.anchorEl?.disabled) {\n return;\n }\n\n this.toggleOpen();\n }\n },\n\n async onContext (event) {\n if (!this.openOnContext) { return; }\n\n event.preventDefault();\n\n this.isOpen = true;\n await this.$nextTick();\n this.tip?.setProps({\n placement: 'right-start',\n getReferenceClientRect: () => ({\n width: 0,\n height: 0,\n top: event.clientY,\n bottom: event.clientY,\n left: event.clientX,\n right: event.clientX,\n }),\n });\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n onArrowKeyPress (e) {\n if (this.open !== null) { return; }\n if (this.openWithArrowKeys && this.anchorEl?.contains(e.target)) {\n if (!this.isOpen) {\n this.isOpen = true;\n }\n }\n\n this.$emit('keydown', e);\n },\n\n addEventListeners () {\n window.addEventListener('dt-popover-close', this.closePopover);\n // align popover content width when contentWidth is 'anchor'\n if (this.contentWidth === 'anchor') {\n window.addEventListener('resize', this.onResize);\n }\n },\n\n removeEventListeners () {\n window.removeEventListener('dt-popover-close', this.closePopover);\n if (this.contentWidth === 'anchor') {\n window.removeEventListener('resize', this.onResize);\n }\n },\n\n closePopover () {\n this.isOpen = false;\n },\n\n /*\n * Prevents scrolling outside of the currently opened modal popover by:\n * - when anchor is not within another popover: setting the body to overflow: hidden\n * - when anchor is within another popover: set the popover dialog container to it's non-modal z-index\n * since it is no longer the active modal. This puts it underneath the overlay and prevents scrolling.\n **/\n preventScrolling () {\n if (this.modal) {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n disableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip?.setProps({ offset: this.offset });\n } else {\n element.classList.add('d-zi-popover');\n }\n }\n },\n\n /*\n * Resets the prevent scrolling properties set in preventScrolling() back to normal.\n **/\n enableScrolling () {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n enableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip?.setProps({ offset: this.offset });\n } else {\n element.classList.remove('d-zi-popover');\n }\n },\n\n removeReferences () {\n this.anchorEl = null;\n this.popoverContentEl = null;\n this.tip = null;\n },\n\n async onShow () {\n if (this.contentWidth === 'anchor') {\n await this.setPopoverContentAnchorWidth();\n }\n\n if (this.contentWidth === null) {\n this.popoverContentEl.style.width = 'auto';\n }\n\n this.addEventListeners();\n },\n\n async onLeaveTransitionComplete () {\n if (this._isUnmounting) return;\n if (this.modal) {\n await this.focusFirstElement(this.$refs.anchor);\n if (this._isUnmounting) return;\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\n this.enableScrolling();\n }\n if (this._isUnmounting) return;\n this.tip?.unmount();\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n async onEnterTransitionComplete () {\n if (this._isUnmounting) return;\n this.focusInitialElement();\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\n this.preventScrolling();\n this.$emit('opened', true, this.$refs.popover__content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n focusInitialElement () {\n if (this.initialFocusElement === 'dialog') {\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n // find by ID\n if (this.initialFocusElement.startsWith('#')) {\n this.focusInitialElementById();\n }\n if (this.initialFocusElement === 'first') {\n this.focusFirstElementIfNeeded(this.$refs.popover__content);\n }\n if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n\n focusInitialElementById () {\n const result = returnFirstEl(this.$refs.content?.$el)?.querySelector(this.initialFocusElement);\n if (result) {\n result.focus();\n } else {\n console.warn('Could not find the element specified in dt-popover prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the dialog.');\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n },\n\n onResize () {\n this.closePopover();\n },\n\n onClickOutside () {\n if (!this.hideOnClick) return;\n // If a popover is opened inside of this one, do not hide on click out\n const innerModals = this.popoverContentEl?.querySelector('.d-popover__anchor--opened');\n if (!innerModals) {\n this.closePopover();\n }\n },\n\n onKeydown (e) {\n if (e.key === 'Tab') {\n if (this.modal) {\n this.focusTrappedTabPress(e, this.popoverContentEl);\n }\n }\n if (e.key === 'Escape') {\n this.closePopover();\n }\n\n this.$emit('keydown', e);\n },\n\n async setPopoverContentAnchorWidth () {\n await this.$nextTick();\n this.popoverContentEl.style.width = `${this.anchorEl?.clientWidth}px`;\n },\n\n focusFirstElementIfNeeded (domEl) {\n const focusableElements = this._getFocusableElements(domEl, true);\n if (focusableElements.length !== 0) {\n this.focusFirstElement(domEl);\n } else if (this.showCloseButton) {\n this.$refs.popover__header?.focusCloseButton();\n } else {\n // if there are no focusable elements at all focus the dialog itself\n returnFirstEl(this.$refs.content?.$el).focus();\n }\n },\n\n /**\n * Return's the anchor ClientRect object relative to the window.\n * Refer to: https://atomiks.github.io/tippyjs/v6/all-props/#getreferenceclientrect for more information\n * @param error\n */\n getReferenceClientRect (error) {\n const anchorReferenceRect = this.anchorEl?.getBoundingClientRect();\n\n if (this.appendTo !== 'root' || error) return anchorReferenceRect;\n\n const anchorOwnerDocument = this.anchorEl?.ownerDocument;\n const anchorParentWindow = anchorOwnerDocument?.defaultView || anchorOwnerDocument?.parentWindow;\n const anchorIframe = anchorParentWindow?.frameElement;\n\n if (!anchorIframe) return anchorReferenceRect;\n\n const iframeReferenceRect = anchorIframe.getBoundingClientRect();\n\n return {\n width: anchorReferenceRect?.width,\n height: anchorReferenceRect?.height,\n top: iframeReferenceRect?.top + anchorReferenceRect?.top,\n left: iframeReferenceRect?.left + anchorReferenceRect?.left,\n right: iframeReferenceRect?.right + anchorReferenceRect?.right,\n bottom: iframeReferenceRect?.bottom + anchorReferenceRect?.bottom,\n };\n },\n\n initTippyInstance () {\n let internalAppendTo = null;\n let iFrameError = false;\n\n switch (this.appendTo) {\n case 'body':\n internalAppendTo = this.anchorEl?.getRootNode()?.querySelector('body');\n break;\n\n case 'root':\n // Try to attach the popover to root document, fallback to parent is fail\n try {\n internalAppendTo = window.parent.document.body;\n } catch (err) {\n console.error('Could not attach the popover to iframe parent window: ', err);\n internalAppendTo = 'parent';\n iFrameError = true;\n }\n break;\n\n default:\n internalAppendTo = this.appendTo;\n break;\n }\n\n this.tip?.destroy();\n\n this.tip = createTippyPopover(this.anchorEl, {\n popperOptions: this.popperOptions(),\n contentElement: this.popoverContentEl,\n placement: this.placement,\n offset: this.offset,\n sticky: this.sticky,\n appendTo: internalAppendTo,\n interactive: true,\n trigger: 'manual',\n getReferenceClientRect: () => this.getReferenceClientRect(iFrameError),\n // We have to manage hideOnClick functionality manually to handle\n // popover within popover situations.\n hideOnClick: false,\n zIndex: this.modal ? 650 : this.calculateAnchorZindex(),\n onClickOutside: this.onClickOutside,\n onShow: this.onShow,\n });\n },\n\n onMouseEnter () {\n this.$emit('mouseenter-popover');\n },\n\n onMouseLeave () {\n this.$emit('mouseleave-popover');\n },\n\n onMouseEnterAnchor () {\n this.$emit('mouseenter-popover-anchor');\n },\n\n onMouseLeaveAnchor () {\n this.$emit('mouseleave-popover-anchor');\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;AAmJA,IAAK,IAAU;CACb,cAAc,EAAE,MAAM,GAAG;CACzB,MAAM;CAKN,YAAY;EACV,mBAAA;EACA,YAAA;EACA,qBAAA;EACD;CAED,QAAQ,CAAC,EAAW;CAEpB,OAAO;EAOL,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAOD,eAAe;GACb,MAAM;GACN,SAAS;GACV;EAKD,aAAa;GACX,MAAM;GACN,SAAS;GACV;EAMD,YAAY;GACV,MAAM;GACN,SAAS;GACV;EAMD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MACH,EAAc,SAAS,EAAK;GAEtC;EASD,gBAAgB;GACd,MAAM;GACN,SAAS;GACV;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,SAAS;GACP,MAAM;GACN,SAAS;GACT,YAAY,MACH,OAAO,KAAK,EAAwB,CAAC,MAAM,MAAS,MAAS,EAAQ;GAE/E;EAKD,cAAc;GACZ,MAAM;IAAC;IAAQ;IAAO;IAAO;GAC7B,SAAS;GACV;EAOD,cAAc;GACZ,MAAM;GACN,SAAS;GACT,YAAW,MAAgB,EAAuB,SAAS,EAAa;GACzE;EAKD,eAAe;GACb,MAAM;GACN,SAAS;GACV;EAKD,iBAAiB;GACf,MA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,QAAA,iBAAA,EADC,OAAO,EAAA,cAAY,CAAA,CAAA,CAAA;;;IAKjB,EAAA,+BAAA,GAAA,EADT,EAGE,GAAA;;KADC,SAAO,EAAA"}
|
|
1
|
+
{"version":3,"file":"popover.js","names":[],"sources":["../../../components/popover/popover.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <div>\n <Teleport\n v-if=\"modal && isOpen\"\n to=\"body\"\n >\n <div\n class=\"d-modal--transparent\"\n aria-hidden=\"false\"\n @click.prevent.stop\n />\n </Teleport>\n <component\n :is=\"elementType\"\n ref=\"popover\"\n :class=\"['d-popover', { 'd-popover__anchor--opened': isOpen }]\"\n data-qa=\"dt-popover-container\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"!ariaLabelledby && labelledBy\"\n ref=\"anchor\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-anchor` : 'dt-popover-anchor'\"\n :tabindex=\"openOnContext ? 0 : undefined\"\n @click.capture=\"defaultToggleOpen\"\n @contextmenu=\"onContext\"\n @keydown.up.prevent=\"onArrowKeyPress\"\n @keydown.down.prevent=\"onArrowKeyPress\"\n @keydown.escape.capture=\"closePopover\"\n @keydown.enter=\"$emit('keydown', $event)\"\n @keydown.space=\"$emit('keydown', $event)\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n >\n <!-- @slot Anchor element that activates the popover. Usually a button. -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-expanded': isOpen.toString(),\n 'aria-controls': id,\n 'aria-haspopup': role,\n }\"\n />\n </div>\n <dt-lazy-show\n :id=\"id\"\n ref=\"content\"\n :role=\"role\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}__dialog` : 'dt-popover'\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :aria-modal=\"`${!modal}`\"\n :transition=\"transition\"\n :show=\"isOpen\"\n :appear=\"toAppear\"\n :class=\"['d-popover__dialog', { 'd-popover__dialog--modal': modal }, dialogClass]\"\n :style=\"{\n 'max-height': calculatedMaxHeight,\n 'max-width': maxWidth,\n }\"\n :css=\"$attrs.css\"\n :tabindex=\"contentTabindex\"\n v-on=\"popoverListeners\"\n @mouseenter=\"onMouseEnterAnchor\"\n @mouseleave=\"onMouseLeaveAnchor\"\n >\n <popover-header-footer\n v-if=\"hasSlotContent($slots.headerContent) || showCloseButton\"\n ref=\"popover__header\"\n :class=\"POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding]\"\n :content-class=\"headerClass\"\n type=\"header\"\n :show-close-button=\"showCloseButton\"\n @close=\"closePopover\"\n >\n <template #content>\n <!-- @slot Slot for popover header content -->\n <slot\n name=\"headerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <div\n ref=\"popover__content\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-content` : 'dt-popover-content'\"\n :class=\"[\n 'd-popover__content',\n POPOVER_PADDING_CLASSES[padding],\n contentClass,\n ]\"\n >\n <!-- @slot Slot for the content that is displayed in the popover when it is open. -->\n <slot\n name=\"content\"\n :close=\"closePopover\"\n />\n </div>\n <popover-header-footer\n v-if=\"hasSlotContent($slots.footerContent)\"\n ref=\"popover__footer\"\n type=\"footer\"\n :class=\"POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding]\"\n :content-class=\"footerClass\"\n >\n <template #content>\n <!-- @slot Slot for the footer content. -->\n <slot\n name=\"footerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <sr-only-close-button\n v-if=\"!showCloseButton\"\n @close=\"closePopover\"\n />\n </dt-lazy-show>\n </component>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n POPOVER_APPEND_TO_VALUES,\n POPOVER_CONTENT_WIDTHS,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n POPOVER_INITIAL_FOCUS_STRINGS,\n POPOVER_PADDING_CLASSES,\n POPOVER_ROLES,\n POPOVER_STICKY_VALUES,\n} from './popover_constants';\nimport { getUniqueString, hasSlotContent, isOutOfViewPort, warnIfUnmounted, disableRootScrolling, enableRootScrolling, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport ModalMixin from '@/common/mixins/modal';\nimport { createTippyPopover, getPopperOptions } from './tippy_utils';\nimport PopoverHeaderFooter from './popover_header_footer.vue';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\n\n/**\n * A Popover displays a content overlay when its anchor element is activated.\n * @see https://dialtone.dialpad.com/components/popover.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtPopover',\n\n /********************\n * CHILD COMPONENTS *\n ********************/\n components: {\n SrOnlyCloseButton,\n DtLazyShow,\n PopoverHeaderFooter,\n },\n\n mixins: [ModalMixin],\n\n props: {\n /**\n * Controls whether the popover is shown. Leaving this null will have the popover trigger on click by default.\n * If you set this value, the default trigger behavior will be disabled, and you can control it as you need.\n * Supports v-model\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Opens the popover on right click (context menu). If you set this value to `true`,\n * the default trigger behavior will be disabled.\n * @values true, false\n */\n openOnContext: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * ARIA role for the content of the popover. Defaults to \"dialog\".\n * <a class=\"d-link\" href=\"https://www.w3.org/TR/wai-aria/#aria-haspopup\" target=\"_blank\">aria-haspopup</a>\n */\n role: {\n type: String,\n default: 'dialog',\n validator: (role) => {\n return POPOVER_ROLES.includes(role);\n },\n },\n\n /**\n * ID of the element that serves as the label for the popover content.\n * Defaults to the \"anchor\" element; this exists to provide a different\n * ID of the label element if, for example, the anchor slot contains\n * other items that do not serve as a label. You should provide this\n * or ariaLabel, but not both.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Descriptive label for the popover content. You should provide this\n * or ariaLabelledby, but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n padding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n * @values null, anchor\n */\n contentWidth: {\n type: String,\n default: '',\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * Whether to apply transition on initial render in the content lazy show component.\n */\n contentAppear: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Tabindex value for the content. Passing null, no tabindex attribute will be set.\n */\n contentTabindex: {\n type: Number || null,\n default: -1,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n * @deprecated Use externalAnchorElement instead for Shadow DOM compatibility.\n */\n externalAnchor: {\n type: String,\n default: '',\n },\n\n /**\n * External anchor element reference. Use this instead of externalAnchor when\n * the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.\n */\n externalAnchorElement: {\n type: HTML_ELEMENT_TYPE,\n default: null,\n },\n\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * Determines if the popover hides upon clicking the\n * anchor or outside the content box.\n * @values true, false\n */\n hideOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines modal state. If enabled popover has a modal overlay\n * preventing interaction with elements below it, but it is invisible.\n * @values true, false\n */\n modal: {\n type: Boolean,\n default: true,\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\".\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'bottom-end',\n },\n\n /**\n * If set to false the dialog will display over top of the anchor when there is insufficient space.\n * If set to true it will never move from its position relative to the anchor and will clip instead.\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/prevent-overflow/#tether\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * @values true, false\n */\n tether: {\n type: Boolean,\n default: true,\n },\n\n /**\n * If the popover sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: false,\n validator: (sticky) => {\n return POPOVER_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the header content wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer content wrapper element.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element.\n */\n dialogClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n * @values none, dialog, first\n */\n initialFocusElement: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'first',\n validator: initialFocusElement => {\n return POPOVER_INITIAL_FOCUS_STRINGS.includes(initialFocusElement) ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * If the popover should open pressing up or down arrow key on the anchor element.\n * This can be set when not passing open prop.\n * @values true, false\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * 'root' will try append to the iFrame's parent body if it is contained in an iFrame\n * and has permissions to access it, else, it'd default to 'parent'.\n * @values 'body', 'parent', 'root', HTMLElement\n */\n appendTo: {\n type: [HTML_ELEMENT_TYPE, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n },\n\n emits: [\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n\n /**\n * Emitted when the mouse enters the popover\n *\n * @event mouseenter-popover\n */\n 'mouseenter-popover',\n\n /**\n * Emitted when the mouse leaves the popover\n *\n * @event mouseleave-popover\n */\n 'mouseleave-popover',\n\n /**\n * Emitted when the mouse enters the popover anchor\n *\n * @event mouseenter-popover-anchor\n */\n 'mouseenter-popover-anchor',\n\n /**\n * Emitted when the mouse leaves the popover anchor\n *\n * @event mouseleave-popover-anchor\n */\n 'mouseleave-popover-anchor',\n ],\n\n data () {\n return {\n POPOVER_PADDING_CLASSES,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n intersectionObserver: null,\n mutationObserver: null,\n isOutsideViewport: false,\n isOpen: false,\n toAppear: false,\n anchorEl: null,\n popoverContentEl: null,\n hasSlotContent,\n };\n },\n\n computed: {\n popoverListeners () {\n return {\n keydown: event => {\n this.onKeydown(event);\n },\n\n 'after-leave': () => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': () => {\n this.onEnterTransitionComplete();\n },\n };\n },\n\n calculatedMaxHeight () {\n if (this.isOutsideViewport && this.modal) {\n return `calc(100vh - var(--dt-space-300))`;\n }\n return this.maxHeight;\n },\n\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor.\n return this.ariaLabelledby || (!this.ariaLabel && getUniqueString('DtPopover__anchor'));\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n deep: true,\n handler () {\n this.validateProps();\n },\n },\n\n modal (modal) {\n this.tip?.setProps({\n zIndex: modal ? 650 : this.calculateAnchorZindex(),\n });\n },\n\n offset (offset) {\n this.tip?.setProps({\n offset,\n });\n },\n\n sticky (sticky) {\n this.tip?.setProps({\n sticky,\n });\n },\n\n fallbackPlacements () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n tether () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n externalAnchorElement () {\n this.updateAnchorEl();\n },\n\n placement (placement) {\n this.tip?.setProps({\n placement,\n });\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n if (open === true) {\n this.toAppear = true;\n }\n },\n\n immediate: true,\n },\n\n contentAppear: {\n handler: function (contentAppear) {\n if (contentAppear !== null) {\n this.toAppear = contentAppear;\n }\n },\n },\n\n isOpen (isOpen, isPrev) {\n if (isOpen) {\n this.initTippyInstance();\n this.tip?.show();\n } else if (!isOpen && isPrev !== isOpen) {\n this.removeEventListeners();\n this.tip?.hide();\n }\n },\n },\n\n mounted () {\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n\n this.popoverContentEl = returnFirstEl(this.$refs.content?.$el);\n this.updateAnchorEl();\n\n this.mutationObserver = new MutationObserver(this.updateAnchorEl);\n this.mutationObserver.observe(this.$refs.anchor, {childList: true});\n\n // rootMargin here must be greater than the margin of the height we are setting in calculatedMaxHeight which\n // currently is var(--dt-space-300) (4px). If not the intersectionObserver will continually trigger in an infinite\n // loop.\n // threshold 1.0 makes this trigger every time the dialog \"touches\" the edge of the viewport.\n this.intersectionObserver = new IntersectionObserver(this.hasIntersectedViewport);\n this.intersectionObserver.observe(this.popoverContentEl);\n },\n\n beforeUnmount () {\n this._isUnmounting = true;\n // Cancel any in-progress CSS transitions so transitionend cannot fire\n // after this component is torn down and call into dead lifecycle methods.\n if (this.popoverContentEl) {\n this.popoverContentEl.style.transition = 'none';\n }\n this.tip?.destroy();\n this.intersectionObserver?.disconnect();\n this.mutationObserver?.disconnect();\n this.removeReferences();\n this.removeEventListeners();\n },\n\n /******************\n * METHODS *\n ******************/\n methods: {\n\n hasIntersectedViewport (entries) {\n const dialog = entries?.[0]?.target;\n if (!dialog) return;\n const isOut = isOutOfViewPort(dialog);\n this.isOutsideViewport = isOut.bottom || isOut.top;\n },\n\n updateAnchorEl () {\n const externalAnchorEl = this.externalAnchorElement ||\n (this.externalAnchor\n ? this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`)\n : null);\n const anchorEl = externalAnchorEl ?? this.$refs.anchor.children[0];\n if (anchorEl === this.anchorEl) {\n return;\n }\n this.anchorEl = anchorEl;\n\n this.tip?.destroy();\n delete this.tip;\n\n if (!this.anchorEl) {\n console.warn('No anchor found for popover');\n return;\n }\n\n if (this.isOpen) {\n this.initTippyInstance();\n this.tip?.show();\n }\n },\n\n popperOptions () {\n return getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n tether: this.tether,\n hasHideModifierEnabled: true,\n });\n },\n\n validateProps () {\n if (this.modal && this.initialFocusElement === 'none') {\n console.error('If the popover is modal you must set the ' +\n 'initialFocusElement prop. Possible values: \"dialog\", \"first\", HTMLElement');\n }\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at popover z-index\n if (returnFirstEl(this.$el).getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 650 when\n // anchor of popover is within a drawer.\n this.anchorEl?.closest('.d-zi-drawer')) {\n return 650;\n } else {\n return 300;\n }\n },\n\n defaultToggleOpen (e) {\n if (this.openOnContext) { return; }\n\n // Only use default toggle behaviour if the user has not set the open prop.\n // Check that the anchor element specifically was clicked.\n if (this.open === null || this.open === undefined) {\n if ((!this.anchorEl?.contains(e.target) && !this.anchorEl?.isEqualNode(e.target)) || this.anchorEl?.disabled) {\n return;\n }\n\n this.toggleOpen();\n }\n },\n\n async onContext (event) {\n if (!this.openOnContext) { return; }\n\n event.preventDefault();\n\n this.isOpen = true;\n await this.$nextTick();\n this.tip?.setProps({\n placement: 'right-start',\n getReferenceClientRect: () => ({\n width: 0,\n height: 0,\n top: event.clientY,\n bottom: event.clientY,\n left: event.clientX,\n right: event.clientX,\n }),\n });\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n onArrowKeyPress (e) {\n if (this.open !== null) { return; }\n if (this.openWithArrowKeys && this.anchorEl?.contains(e.target)) {\n if (!this.isOpen) {\n this.isOpen = true;\n }\n }\n\n this.$emit('keydown', e);\n },\n\n addEventListeners () {\n window.addEventListener('dt-popover-close', this.closePopover);\n // align popover content width when contentWidth is 'anchor'\n if (this.contentWidth === 'anchor') {\n window.addEventListener('resize', this.onResize);\n }\n },\n\n removeEventListeners () {\n window.removeEventListener('dt-popover-close', this.closePopover);\n if (this.contentWidth === 'anchor') {\n window.removeEventListener('resize', this.onResize);\n }\n },\n\n closePopover () {\n this.isOpen = false;\n },\n\n /*\n * Prevents scrolling outside of the currently opened modal popover by:\n * - when anchor is not within another popover: setting the body to overflow: hidden\n * - when anchor is within another popover: set the popover dialog container to it's non-modal z-index\n * since it is no longer the active modal. This puts it underneath the overlay and prevents scrolling.\n **/\n preventScrolling () {\n if (this.modal) {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n disableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip?.setProps({ offset: this.offset });\n } else {\n element.classList.add('d-zi-popover');\n }\n }\n },\n\n /*\n * Resets the prevent scrolling properties set in preventScrolling() back to normal.\n **/\n enableScrolling () {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n enableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip?.setProps({ offset: this.offset });\n } else {\n element.classList.remove('d-zi-popover');\n }\n },\n\n removeReferences () {\n this.anchorEl = null;\n this.popoverContentEl = null;\n this.tip = null;\n },\n\n async onShow () {\n if (this.contentWidth === 'anchor') {\n await this.setPopoverContentAnchorWidth();\n if (this._isUnmounting) return;\n }\n\n if (this.contentWidth === null) {\n this.popoverContentEl.style.width = 'auto';\n }\n\n this.addEventListeners();\n },\n\n async onLeaveTransitionComplete () {\n if (this._isUnmounting) return;\n if (this.modal) {\n await this.focusFirstElement(this.$refs.anchor);\n if (this._isUnmounting) return;\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\n this.enableScrolling();\n }\n if (this._isUnmounting) return;\n this.tip?.unmount();\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n async onEnterTransitionComplete () {\n if (this._isUnmounting) return;\n this.focusInitialElement();\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\n this.preventScrolling();\n this.$emit('opened', true, this.$refs.popover__content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n focusInitialElement () {\n if (this.initialFocusElement === 'dialog') {\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n // find by ID\n if (this.initialFocusElement.startsWith('#')) {\n this.focusInitialElementById();\n }\n if (this.initialFocusElement === 'first') {\n this.focusFirstElementIfNeeded(this.$refs.popover__content);\n }\n if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n\n focusInitialElementById () {\n const result = returnFirstEl(this.$refs.content?.$el)?.querySelector(this.initialFocusElement);\n if (result) {\n result.focus();\n } else {\n console.warn('Could not find the element specified in dt-popover prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the dialog.');\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n },\n\n onResize () {\n this.closePopover();\n },\n\n onClickOutside () {\n if (!this.hideOnClick) return;\n // If a popover is opened inside of this one, do not hide on click out\n const innerModals = this.popoverContentEl?.querySelector('.d-popover__anchor--opened');\n if (!innerModals) {\n this.closePopover();\n }\n },\n\n onKeydown (e) {\n if (e.key === 'Tab') {\n if (this.modal) {\n this.focusTrappedTabPress(e, this.popoverContentEl);\n }\n }\n if (e.key === 'Escape') {\n this.closePopover();\n }\n\n this.$emit('keydown', e);\n },\n\n async setPopoverContentAnchorWidth () {\n await this.$nextTick();\n this.popoverContentEl.style.width = `${this.anchorEl?.clientWidth}px`;\n },\n\n focusFirstElementIfNeeded (domEl) {\n const focusableElements = this._getFocusableElements(domEl, true);\n if (focusableElements.length !== 0) {\n this.focusFirstElement(domEl);\n } else if (this.showCloseButton) {\n this.$refs.popover__header?.focusCloseButton();\n } else {\n // if there are no focusable elements at all focus the dialog itself\n returnFirstEl(this.$refs.content?.$el).focus();\n }\n },\n\n /**\n * Return's the anchor ClientRect object relative to the window.\n * Refer to: https://atomiks.github.io/tippyjs/v6/all-props/#getreferenceclientrect for more information\n * @param error\n */\n getReferenceClientRect (error) {\n const anchorReferenceRect = this.anchorEl?.getBoundingClientRect();\n\n if (this.appendTo !== 'root' || error) return anchorReferenceRect;\n\n const anchorOwnerDocument = this.anchorEl?.ownerDocument;\n const anchorParentWindow = anchorOwnerDocument?.defaultView || anchorOwnerDocument?.parentWindow;\n const anchorIframe = anchorParentWindow?.frameElement;\n\n if (!anchorIframe) return anchorReferenceRect;\n\n const iframeReferenceRect = anchorIframe.getBoundingClientRect();\n\n return {\n width: anchorReferenceRect?.width,\n height: anchorReferenceRect?.height,\n top: iframeReferenceRect?.top + anchorReferenceRect?.top,\n left: iframeReferenceRect?.left + anchorReferenceRect?.left,\n right: iframeReferenceRect?.right + anchorReferenceRect?.right,\n bottom: iframeReferenceRect?.bottom + anchorReferenceRect?.bottom,\n };\n },\n\n initTippyInstance () {\n let internalAppendTo = null;\n let iFrameError = false;\n\n switch (this.appendTo) {\n case 'body':\n internalAppendTo = this.anchorEl?.getRootNode()?.querySelector('body');\n break;\n\n case 'root':\n // Try to attach the popover to root document, fallback to parent is fail\n try {\n internalAppendTo = window.parent.document.body;\n } catch (err) {\n console.error('Could not attach the popover to iframe parent window: ', err);\n internalAppendTo = 'parent';\n iFrameError = true;\n }\n break;\n\n default:\n internalAppendTo = this.appendTo;\n break;\n }\n\n this.tip?.destroy();\n\n this.tip = createTippyPopover(this.anchorEl, {\n popperOptions: this.popperOptions(),\n contentElement: this.popoverContentEl,\n placement: this.placement,\n offset: this.offset,\n sticky: this.sticky,\n appendTo: internalAppendTo,\n interactive: true,\n trigger: 'manual',\n getReferenceClientRect: () => this.getReferenceClientRect(iFrameError),\n // We have to manage hideOnClick functionality manually to handle\n // popover within popover situations.\n hideOnClick: false,\n zIndex: this.modal ? 650 : this.calculateAnchorZindex(),\n onClickOutside: this.onClickOutside,\n onShow: this.onShow,\n });\n },\n\n onMouseEnter () {\n this.$emit('mouseenter-popover');\n },\n\n onMouseLeave () {\n this.$emit('mouseleave-popover');\n },\n\n onMouseEnterAnchor () {\n this.$emit('mouseenter-popover-anchor');\n },\n\n onMouseLeaveAnchor () {\n this.$emit('mouseleave-popover-anchor');\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;AAmJA,IAAK,IAAU;CACb,cAAc,EAAE,MAAM,GAAG;CACzB,MAAM;CAKN,YAAY;EACV,mBAAA;EACA,YAAA;EACA,qBAAA;EACD;CAED,QAAQ,CAAC,EAAW;CAEpB,OAAO;EAOL,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAOD,eAAe;GACb,MAAM;GACN,SAAS;GACV;EAKD,aAAa;GACX,MAAM;GACN,SAAS;GACV;EAMD,YAAY;GACV,MAAM;GACN,SAAS;GACV;EAMD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MACH,EAAc,SAAS,EAAK;GAEtC;EASD,gBAAgB;GACd,MAAM;GACN,SAAS;GACV;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,SAAS;GACP,MAAM;GACN,SAAS;GACT,YAAY,MACH,OAAO,KAAK,EAAwB,CAAC,MAAM,MAAS,MAAS,EAAQ;GAE/E;EAKD,cAAc;GACZ,MAAM;IAAC;IAAQ;IAAO;IAAO;GAC7B,SAAS;GACV;EAOD,cAAc;GACZ,MAAM;GACN,SAAS;GACT,YAAW,MAAgB,EAAuB,SAAS,EAAa;GACzE;EAKD,eAAe;GACb,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,iBAAe,EAAA;;KAEL,SAAO,QAKd,CAHF,EAGE,EAAA,QAAA,iBAAA,EADC,OAAO,EAAA,cAAY,CAAA,CAAA,CAAA;;;IAKjB,EAAA,+BAAA,GAAA,EADT,EAGE,GAAA;;KADC,SAAO,EAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../rich_text_editor-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../rich_text_editor-wvONcbYd.cjs`),t=require(`./rich-text-editor-constants.cjs`);exports.DtRichTextEditor=e.t,exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=t.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=t.RICH_TEXT_EDITOR_OUTPUT_FORMATS;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as e } from "../../rich_text_editor-
|
|
1
|
+
import { t as e } from "../../rich_text_editor-BhUKyR0E.js";
|
|
2
2
|
import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as t, RICH_TEXT_EDITOR_OUTPUT_FORMATS as n } from "./rich-text-editor-constants.js";
|
|
3
3
|
export { e as DtRichTextEditor, t as RICH_TEXT_EDITOR_AUTOFOCUS_TYPES, n as RICH_TEXT_EDITOR_OUTPUT_FORMATS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../rich_text_editor-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../rich_text_editor-wvONcbYd.cjs`);exports.default=e.t;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../rich_text_editor-
|
|
1
|
+
import { t as e } from "../../rich_text_editor-BhUKyR0E.js";
|
|
2
2
|
export { e as default };
|
|
@@ -9,7 +9,7 @@ import l from "./lib/popover/popover.js";
|
|
|
9
9
|
import u from "./lib/input/input.js";
|
|
10
10
|
import { t as d } from "./emoji_picker-tVHfpHDk.js";
|
|
11
11
|
import { NodeViewWrapper as f, VueNodeViewRenderer as p, nodeViewProps as m } from "./node_modules/@tiptap/vue-3.js";
|
|
12
|
-
import { t as h } from "./rich_text_editor-
|
|
12
|
+
import { t as h } from "./rich_text_editor-BhUKyR0E.js";
|
|
13
13
|
import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as g, RICH_TEXT_EDITOR_OUTPUT_FORMATS as _ } from "./lib/rich-text-editor/rich-text-editor-constants.js";
|
|
14
14
|
import { EDITOR_DEFAULT_LINK_PREFIX as v, EDITOR_SUPPORTED_LINK_PROTOCOLS as y } from "./lib/editor/editor-constants.js";
|
|
15
15
|
import b from "./lib/message-input/last-active-nodes.js";
|
|
@@ -665,4 +665,4 @@ var ue = /* @__PURE__ */ r(ne, [["render", le]]);
|
|
|
665
665
|
//#endregion
|
|
666
666
|
export { ue as t };
|
|
667
667
|
|
|
668
|
-
//# sourceMappingURL=message_input-
|
|
668
|
+
//# sourceMappingURL=message_input-B2fppje7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_input-B47LB7C8.js","names":["MeetingPill"],"sources":["../recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue","../recipes/conversation_view/message_input/extensions/meeting_pill/meeting_pill.js","../recipes/conversation_view/message_input/message_input.vue"],"sourcesContent":["<template>\n <node-view-wrapper class=\"d-recipe-message-input-meeting-pill\">\n <dt-item-layout\n class=\"d-recipe-message-input-meeting-pill__layout\"\n unstyled\n >\n <template #left>\n <div class=\"d-recipe-message-input-meeting-pill__icon\">\n <dt-icon-video\n size=\"400\"\n />\n </div>\n </template>\n {{ node.attrs.text }}\n <template #right>\n <div class=\"d-recipe-message-input-meeting-pill__close\">\n <dt-button\n circle\n importance=\"clear\"\n size=\"xs\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon-close\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n </template>\n </dt-item-layout>\n </node-view-wrapper>\n</template>\n\n<script>\nimport { NodeViewWrapper, nodeViewProps } from '@tiptap/vue-3';\nimport { DtItemLayout } from '@/components/item_layout';\nimport { DtIconClose, DtIconVideo } from '@dialpad/dialtone-icons/vue3';\nimport { DtButton } from '@/components/button';\nimport { DialtoneLocalization } from '@/localization';\n\nexport default {\n name: 'MeetingPill',\n\n components: {\n NodeViewWrapper,\n DtItemLayout,\n DtIconClose,\n DtButton,\n DtIconVideo,\n },\n\n props: nodeViewProps,\n\n emits: ['meeting-pill-close'],\n\n data () {\n return {\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n methods: {\n close (e) {\n // Get the callback from extension storage\n const onCloseCallback = this.editor?.storage?.meetingPill?.onClose;\n\n if (onCloseCallback && typeof onCloseCallback === 'function') {\n onCloseCallback(e);\n }\n },\n },\n};\n</script>\n","import { mergeAttributes, Node } from '@tiptap/core';\nimport { VueNodeViewRenderer } from '@tiptap/vue-3';\nimport MeetingPill from './MeetingPill.vue';\n\nexport default Node.create({\n name: 'meetingPill',\n\n atom: true,\n group: 'inline',\n inline: true,\n\n addOptions () {\n return {\n onClose: () => {},\n };\n },\n\n addStorage () {\n return {\n onClose: this.options.onClose,\n };\n },\n\n addNodeView () {\n return VueNodeViewRenderer(MeetingPill);\n },\n\n addAttributes () {\n return {\n text: {\n default: 'Please pass in \"text\" attribute',\n },\n };\n },\n\n parseHTML () {\n return [\n {\n tag: 'meeting-pill',\n },\n ];\n },\n\n renderText () {\n return '/dpm';\n },\n\n renderHTML ({ HTMLAttributes }) {\n return ['meeting-pill', mergeAttributes(HTMLAttributes)];\n },\n});\n","<!-- eslint-disable max-lines -->\n<template>\n <div\n data-qa=\"dt-recipe-message-input\"\n role=\"presentation\"\n class=\"d-recipe-message-input\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n @dragover.prevent\n @drop.prevent=\"onDrop\"\n @paste=\"onPaste\"\n @mousedown=\"onMousedown\"\n >\n <!-- @slot Renders above the input, but still within the borders. -->\n <slot name=\"top\" />\n\n <dt-recipe-message-input-topbar\n v-if=\"richText\"\n :bold-button-options=\"boldButtonOptions\"\n :italic-button-options=\"italicButtonOptions\"\n :strike-button-options=\"strikeButtonOptions\"\n :bullet-list-button-options=\"bulletListButtonOptions\"\n :ordered-list-button-options=\"orderedListButtonOptions\"\n :block-quote-button-options=\"blockQuoteButtonOptions\"\n :code-button-options=\"codeButtonOptions\"\n :code-block-button-options=\"codeBlockButtonOptions\"\n :is-selection-active=\"isSelectionActive\"\n @click=\"handleTopbarClick\"\n >\n <template #link>\n <dt-recipe-message-input-link\n ref=\"link\"\n :open=\"linkDialogOpen\"\n :link-button-options=\"linkButtonOptions\"\n :is-selection-active=\"isSelectionActive\"\n @opened=\"linkDialogOpened\"\n @set-link=\"setLink\"\n @remove-link=\"removeLink\"\n />\n </template>\n </dt-recipe-message-input-topbar>\n <!-- Some wrapper to restrict the height and show the scrollbar -->\n <div\n v-dt-scrollbar\n class=\"d-recipe-message-input__editor-wrapper\"\n :style=\"{ 'max-height': maxHeight }\"\n >\n <dt-rich-text-editor\n ref=\"richTextEditor\"\n v-model=\"internalInputValue\"\n :allow-blockquote=\"richText\"\n :allow-bold=\"richText\"\n :allow-bullet-list=\"richText\"\n :allow-code=\"richText\"\n :allow-codeblock=\"richText\"\n :allow-italic=\"richText\"\n :allow-strike=\"richText\"\n :allow-underline=\"richText\"\n :paste-rich-text=\"richText\"\n :editable=\"editable\"\n :input-aria-label=\"inputAriaLabel\"\n :input-class=\"inputClass\"\n :output-format=\"outputFormat\"\n :auto-focus=\"autoFocus\"\n :link=\"richText\"\n :placeholder=\"placeholder\"\n :prevent-typing=\"preventTyping\"\n :mention-suggestion=\"mentionSuggestion\"\n :channel-suggestion=\"channelSuggestion\"\n :slash-command-suggestion=\"slashCommandSuggestion\"\n :additional-extensions=\"additionalExtensions\"\n :hide-link-bubble-menu=\"hideLinkBubbleMenu\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n @input=\"onInput\"\n @text-input=\"onTextInput\"\n @markdown-input=\"onMarkdownInput\"\n @enter=\"onSend\"\n @selected=\"selectedText = $event\"\n @selected-command=\"$emit('selected-command', $event)\"\n @edit-link=\"initLinkDialog\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n />\n </div>\n <!-- @slot Slot for attachment carousel -->\n <slot name=\"middle\" />\n <!-- Section for the bottom UI -->\n <section class=\"d-recipe-message-input__bottom-section\">\n <!-- Left content -->\n <div class=\"d-recipe-message-input__bottom-section-left\">\n <dt-stack\n gap=\"200\"\n direction=\"row\"\n class=\"d-recipe-message-input__bottom-section-left-stack\"\n >\n <dt-button\n v-if=\"showImagePicker\"\n v-dt-tooltip:top-start=\"imagePickerButtonLabel\"\n data-qa=\"dt-recipe-message-input-image-btn\"\n size=\"sm\"\n class=\"d-recipe-message-input__button\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"imagePickerButtonLabel\"\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-image size=\"300\" />\n </template>\n </dt-button>\n <dt-input\n ref=\"messageInputImageUpload\"\n data-qa=\"dt-recipe-message-input-image-input\"\n accept=\"image/*, video/*\"\n type=\"file\"\n class=\"d-recipe-message-input__image-input\"\n multiple\n hidden\n @input=\"onImageUpload\"\n />\n <dt-popover\n v-if=\"showEmojiPicker\"\n v-model:open=\"emojiPickerOpened\"\n data-qa=\"dt-recipe-message-input-emoji-picker-popover\"\n initial-focus-element=\"#searchInput\"\n padding=\"none\"\n >\n <template #anchor=\"{ attrs }\">\n <dt-button\n v-dt-tooltip=\"emojiPickerButtonLabel\"\n v-bind=\"attrs\"\n data-qa=\"dt-recipe-message-input-emoji-picker-btn\"\n size=\"sm\"\n class=\"d-recipe-message-input__button\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"emojiPickerButtonLabel\"\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-very-satisfied\n v-if=\"emojiPickerHovered\"\n size=\"300\"\n />\n <dt-icon-satisfied\n v-else\n size=\"300\"\n />\n </template>\n </dt-button>\n </template>\n <template #content=\"{ close }\">\n <dt-emoji-picker\n v-bind=\"emojiPickerProps\"\n @add-emoji=\"$emit('add-emoji')\"\n @skin-tone=\"onSkinTone\"\n @selected-emoji=\"(emoji) => onSelectEmoji(emoji, close)\"\n @scroll-bottom-reached=\"$emit('emoji-scroll-bottom-reached')\"\n />\n </template>\n </dt-popover>\n <!-- @slot Slot for emojiGiphy picker -->\n <slot name=\"emojiGiphyPicker\" />\n <!-- @slot Slot to add extra action icons next to default ones -->\n <slot name=\"customActionIcons\" />\n <!-- @slot Slot for message polish -->\n <slot name=\"messagePolish\" />\n </dt-stack>\n </div>\n <!-- Right content -->\n <div class=\"d-recipe-message-input__bottom-section-right\">\n <dt-stack\n direction=\"row\"\n gap=\"300\"\n >\n <!-- @slot Slot for schedule message -->\n <div class=\"d-recipe-message-input__schedule-message\">\n <slot name=\"scheduleMessage\" />\n </div>\n\n <!-- @slot Slot for sms count -->\n <div class=\"d-recipe-message-input__sms-count\">\n <slot name=\"smsCount\" />\n </div>\n\n <!-- Optionally displayed remaining character counter -->\n <dt-tooltip\n v-if=\"Boolean(showCharacterLimit)\"\n class=\"d-recipe-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-recipe-message-input__remaining-char\"\n data-qa=\"dt-recipe-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 v-dt-tooltip=\"cancelButtonLabel\"\n data-qa=\"dt-recipe-message-input-cancel-button\"\n class=\"d-recipe-message-input__button d-recipe-message-input__cancel-button\"\n size=\"sm\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"cancelButtonLabel\"\n @click=\"onCancel\"\n >\n <p>{{ cancelButtonLabel }}</p>\n </dt-button>\n\n <!-- @slot Slot for sendButton picker -->\n <slot name=\"sendButton\">\n <!-- Send button -->\n <!-- Right positioned UI - send button -->\n <dt-button\n v-if=\"showSend\"\n v-dt-tooltip:top-end=\"sendButtonLabel\"\n data-qa=\"dt-recipe-message-input-send-btn\"\n size=\"sm\"\n kind=\"default\"\n importance=\"primary\"\n :class=\"[\n 'd-recipe-message-input__button d-recipe-message-input__send-button',\n {\n 'd-recipe-message-input__send-button--disabled': isSendDisabled,\n 'd-btn--icon-only': showSendIcon,\n },\n ]\"\n :aria-label=\"sendButtonLabel\"\n :aria-disabled=\"isSendDisabled\"\n @click=\"onSend\"\n >\n <template\n v-if=\"showSendIcon\"\n #icon\n >\n <!-- @slot Slot for send button icon -->\n <slot\n name=\"sendIcon\"\n :icon-size=\"sendIconSize\"\n >\n <dt-icon-send :size=\"sendIconSize\" />\n </slot>\n </template>\n <template v-if=\"showSend.text\">\n <p>{{ showSend.text }}</p>\n </template>\n </dt-button>\n </slot>\n </dt-stack>\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 lastActiveNodes from './last_active_nodes';\nimport { removeClassStyleAttrs, returnFirstEl, addClassStyleAttrs } from '@/common/utils';\nimport MeetingPill from './extensions/meeting_pill/meeting_pill';\nimport { DtButton } from '@/components/button';\nimport { DtEmojiPicker } from '@/components/emoji_picker';\nimport { DtPopover } from '@/components/popover';\nimport { DtInput } from '@/components/input';\nimport { DtTooltip } from '@/components/tooltip';\nimport { DtStack } from '@/components/stack';\nimport {\n DtIconImage, DtIconVerySatisfied, DtIconSatisfied, DtIconSend,\n} from '@dialpad/dialtone-icons/vue3';\nimport DtRecipeMessageInputTopbar from './message_input_topbar.vue';\nimport DtRecipeMessageInputLink from './message_input_link.vue';\nimport { DialtoneLocalization } from '@/localization';\n\nimport {\n EDITOR_SUPPORTED_LINK_PROTOCOLS,\n EDITOR_DEFAULT_LINK_PREFIX,\n} from '../editor/editor_constants.js';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeMessageInput',\n\n components: {\n DtButton,\n DtEmojiPicker,\n DtInput,\n DtPopover,\n DtRecipeMessageInputTopbar,\n DtRecipeMessageInputLink,\n DtRichTextEditor,\n DtTooltip,\n DtStack,\n DtIconImage,\n DtIconVerySatisfied,\n DtIconSatisfied,\n DtIconSend,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Displays all the buttons for rich text formatting above the message input, and enables it within the editor.\n * Rich text formatting for the purposes of this component is defined as:\n *\n * bold, italic, strikethrough, lists, blockquotes, inline code tags, and code blocks.\n *\n * If you are sending a message to a phone rather than a Dialpad to Dialpad message, you should have this as false.\n */\n richText: {\n type: Boolean,\n default: true,\n },\n\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 modelValue: {\n type: [Object, String],\n default: '',\n },\n\n /**\n * Whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Descriptive label for the input element\n */\n inputAriaLabel: {\n type: String,\n required: true,\n default: '',\n },\n\n /**\n * Prevents the user from typing any further. Deleting text will still work.\n */\n preventTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the input element. Only accepts a String value\n * because this is passed to the editor via options. For multiple classes,\n * join them into one string, e.g. \"d-p8 d-hmx96\"\n */\n inputClass: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the input should receive focus after the component has been\n * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n * - `start` Sets the focus to the beginning of the input\n * - `end` Sets the focus to the end of the input\n * - `all` Selects the whole contents of the input\n * - `Number` Sets the focus to a specific position in the input\n * - `true` Defaults to `start`\n * - `false` Disables autofocus\n * @values true, false, start, end, all, number\n */\n autoFocus: {\n type: [Boolean, String, Number],\n default: false,\n validator (autoFocus) {\n if (typeof autoFocus === 'string') {\n return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n }\n return true;\n },\n },\n\n /**\n * The output format that the editor uses when emitting the \"@input\" event.\n * One of `text`, `json`, `html`, `markdown`. See https://tiptap.dev/guide/output for\n * examples.\n * @values text, json, html, markdown\n */\n outputFormat: {\n type: String,\n default: 'json',\n validator (outputFormat) {\n return RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);\n },\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 },\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: () => ({}),\n },\n\n /**\n * Send button defaults.\n * TODO (Dialtone 10):\n * - Change to `showSendButton`, boolean only.\n */\n showSend: {\n type: [Boolean, Object],\n default: () => ({}),\n },\n\n /**\n * TODO (Dialtone 10):\n * - Add a prop `iconOnly` default: true to control if localized send button text should be shown\n */\n\n /**\n * Cancel button defaults.\n * TODO (Dialtone 10): Change to `showCancelButton`, boolean only.\n */\n showCancel: {\n type: [Boolean, Object],\n default: () => ({}),\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the contacts for suggestion.\n * items({ query }) => { return [ContactObject]; }\n * ContactObject format:\n * { name: string, avatarSrc: string, id: string }\n *\n * When null, it does not add the plugin.\n */\n mentionSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the channels for suggestion.\n * items({ query }) => { return [ChannelObject]; }\n * ChannelObject format:\n * { name: string, id: string, locked: boolean }\n *\n * When null, it does not add the plugin. Setting locked to true will display a lock rather than hash.\n */\n channelSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the slash commands for suggestion.\n * items({ query }) => { return [SlashCommandObject]; }\n * SlashCommandObject format:\n * { command: string, description: string, parametersExample?: string }\n * The \"parametersExample\" parameter is optional, and describes an example\n * of the parameters that command can take.\n *\n * When null, it does not add the plugin.\n */\n slashCommandSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * descriptive text fields for the bold button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n boldButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + B',\n }),\n },\n\n /**\n * descriptive text fields for the italic button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n italicButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + I',\n }),\n },\n\n /**\n * descriptive text fields for the strikethrough button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n strikeButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + Shift + S',\n }),\n },\n\n /**\n * descriptive text fields for the link button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n linkButtonOptions: {\n type: Object,\n default: () => ({\n // TODO: implement mod k\n keyboardShortcutText: 'Mod + K',\n linkPlaceholder: 'e.g. https://www.dialpad.com',\n }),\n },\n\n /**\n * descriptive text fields for the bullet list button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n bulletListButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + Shift + 8',\n }),\n },\n\n /**\n * descriptive text fields for the ordered list button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n orderedListButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + Shift + 7',\n }),\n },\n\n /**\n * descriptive text fields for the italic button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n blockQuoteButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + Shift + B',\n }),\n },\n\n /**\n * descriptive text fields for the code button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n codeButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + E',\n }),\n },\n\n /**\n * descriptive text fields for the code block button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n codeBlockButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + Alt + C',\n }),\n },\n },\n\n emits: [\n /**\n * Fires when send button is clicked\n *\n * @event submit\n * @type {String}\n */\n 'submit',\n\n /**\n * Fires when media is selected from image button\n *\n * @event select-media\n * @type {Array}\n */\n 'select-media',\n\n /**\n * Fires when media is dropped into the message input\n *\n * @event add-media\n * @type {Array}\n */\n 'add-media',\n\n /**\n * Fires when media is pasted into the message input\n *\n * @event paste-media\n * @type {Array}\n */\n 'paste-media',\n\n /**\n * Fires when cancel button is pressed (only on edit mode)\n *\n * @event cancel\n * @type {Boolean}\n */\n 'cancel',\n\n /**\n * Fires when skin tone is selected from the emoji picker\n *\n * @event skin-tone\n * @type {String}\n */\n 'skin-tone',\n\n /**\n * Fires when emoji is selected from the emoji picker\n *\n * @event selected-emoji\n * @type {String}\n */\n 'selected-emoji',\n\n /**\n * Fires when a slash command is selected\n *\n * @event selected-command\n * @type {String}\n */\n 'selected-command',\n\n /**\n * Fires when meeting pill is closed\n *\n * @event meeting-pill-close\n * @type {String}\n */\n 'meeting-pill-close',\n\n /**\n * Event to sync the value with the parent\n * @event update:modelValue\n * @type {String|JSON}\n */\n 'update:modelValue',\n\n /**\n * Emitted when input changes, returns text content only\n * @event text-input\n * @type {String}\n */\n 'text-input',\n\n /**\n * Emitted when input changes, returns markdown content only\n * @event markdown-input\n * @type {String}\n */\n 'markdown-input',\n\n /**\n * Emitted when the 'Add emoji' button is clicked\n * @event add-emoji\n * @type {Boolean}\n */\n 'add-emoji',\n\n /**\n * Emitted when the emoji picker scroll reaches the bottom\n * @event emoji-scroll-bottom-reached\n */\n 'emoji-scroll-bottom-reached',\n ],\n\n data () {\n return {\n // If an ordered list is nested within an unordered list, we only want to show the currently selected list as\n // active. This function performs the logic to determine the farthest active node from the root.\n lastActiveNodes,\n additionalExtensions: [\n MeetingPill.configure({\n onClose: (event) => {\n this.$emit('meeting-pill-close', event);\n },\n }),\n ],\n\n internalInputValue: this.modelValue, // internal input content\n imagePickerFocus: false,\n emojiPickerFocus: false,\n emojiPickerOpened: false,\n isFocused: false,\n linkOptions: {\n class: 'd-link d-c-text d-d-inline-block',\n },\n\n linkDialogOpen: false,\n selectedText: '',\n text: '',\n hideLinkBubbleMenu: false,\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n showSendIcon () {\n return !this.showSend.text;\n },\n\n inputLength () {\n return this.text.length;\n },\n\n displayCharacterLimitWarning () {\n return (\n Boolean(this.showCharacterLimit) &&\n this.showCharacterLimit.count - this.inputLength <=\n this.showCharacterLimit.warning\n );\n },\n\n characterLimitTooltipEnabled () {\n return (\n this.showCharacterLimit.message &&\n this.showCharacterLimit.count - this.inputLength < 0\n );\n },\n\n // Returns a new function reference when selectedText changes, which causes the topbar\n // to re-render (prop update) without destroying/recreating it (no key change).\n isSelectionActive () {\n // eslint-disable-next-line no-unused-vars\n const _dep = this.selectedText;\n return (type) => {\n if (['bulletList', 'orderedList'].includes(type)) {\n if (!this.richText) return false;\n return this.lastActiveNodes(this.$refs.richTextEditor?.editor?.state, [{ type: 'bulletList' }, { type: 'orderedList' }]).includes(type) && this.isFocused;\n }\n return this.$refs.richTextEditor?.editor?.isActive(type) && this.isFocused;\n };\n },\n\n isSendDisabled () {\n return (\n this.disableSend ||\n (this.showCharacterLimit &&\n this.inputLength > this.showCharacterLimit.count)\n );\n },\n\n emojiPickerHovered () {\n return this.emojiPickerFocus || this.emojiPickerOpened;\n },\n\n sendIconSize () {\n return '300';\n },\n\n sendButtonLabel () {\n return this.i18n.$t('DIALTONE_MESSAGE_INPUT_SEND_BUTTON_ARIA_LABEL');\n },\n\n imagePickerButtonLabel () {\n return this.i18n.$t('DIALTONE_MESSAGE_INPUT_IMAGE_PICKER_BUTTON_ARIA_LABEL');\n },\n\n emojiPickerButtonLabel () {\n return this.i18n.$t('DIALTONE_MESSAGE_INPUT_EMOJI_PICKER_BUTTON_ARIA_LABEL');\n },\n\n cancelButtonLabel () {\n return this.i18n.$t('DIALTONE_MESSAGE_INPUT_CANCEL_BUTTON_ARIA_LABEL');\n },\n },\n\n watch: {\n modelValue (newValue) {\n this.internalInputValue = newValue;\n },\n\n emojiPickerOpened (newValue) {\n if (!newValue) {\n this.$refs.richTextEditor?.focusEditor();\n }\n },\n },\n\n created () {\n if (this.modelValue && this.outputFormat === 'text') {\n this.internalInputValue = this.modelValue.replace(/\\n/g, '<br>');\n } else {\n this.internalInputValue = this.modelValue;\n }\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\n\n linkDialogOpened (value) {\n this.linkDialogOpen = value;\n if (value === true) {\n this.initLinkDialog();\n } else {\n this.hideLinkBubbleMenu = false;\n this.$refs.richTextEditor?.focusEditor();\n }\n },\n\n handleTopbarClick (type) {\n const editor = this.$refs.richTextEditor?.editor;\n // Key is the name returned in the event, value is the name of the TipTap command function to run.\n const typeToCommandMap = {\n bold: () => editor?.chain().focus().toggleBold().run(),\n italic: () => editor?.chain().focus().toggleItalic().run(),\n strike: () => editor?.chain().focus().toggleStrike().run(),\n bulletList: () => editor?.chain().focus().toggleBulletList().run(),\n orderedList: () => editor?.chain().focus().toggleOrderedList().run(),\n blockquote: () => editor?.chain().focus().toggleBlockquote().run(),\n code: () => editor?.chain().focus().toggleCode().run(),\n codeBlock: () => editor?.chain().focus().toggleCodeBlock().run(),\n };\n\n if (editor && typeToCommandMap[type]) {\n typeToCommandMap[type]();\n }\n },\n\n initLinkDialog () {\n this.$refs.link.setInitialValues(this.selectedText, this.$refs.richTextEditor?.editor?.getAttributes('link')?.href);\n this.hideLinkBubbleMenu = true;\n this.linkDialogOpen = true;\n },\n\n removeLink () {\n this.$refs.richTextEditor?.removeLink();\n this.linkDialogOpen = false;\n },\n\n setLink (linkText, linkInput) {\n this.$refs.richTextEditor.setLink(\n linkInput, linkText, this.linkOptions, EDITOR_SUPPORTED_LINK_PROTOCOLS, EDITOR_DEFAULT_LINK_PREFIX,\n );\n this.linkDialogOpen = false;\n },\n\n // Mousedown instead of click because it fires before the blur event.\n onMousedown (e) {\n const isWithinInput = returnFirstEl(this.$refs.richTextEditor.$el)\n .querySelector('.tiptap')\n .contains(e.target);\n\n // If the click is not within the tiptap rich text editor input itself, but still within the wrapping div,\n // focus the editor.\n if (!isWithinInput) {\n // Prevent default prevents blurring the rich text editor input when it is already focused.\n e.preventDefault();\n this.$refs.richTextEditor.focusEditor();\n }\n },\n\n onDrop (e) {\n const dt = e.dataTransfer;\n const files = Array.from(dt.files);\n this.$emit('add-media', files);\n },\n\n onPaste (e) {\n if (e.clipboardData.files.length) {\n e.stopPropagation();\n e.preventDefault();\n const files = [...e.clipboardData.files];\n this.$emit('paste-media', files);\n }\n },\n\n onSkinTone (skinTone) {\n this.$emit('skin-tone', skinTone);\n },\n\n onSelectEmoji (emoji, close) {\n if (!emoji) {\n return;\n }\n\n if (!emoji.shift_key) {\n close();\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 image: emoji.image,\n name: emoji.name,\n },\n });\n this.$emit('selected-emoji', emoji);\n },\n\n onSelectImage () {\n this.$refs.messageInputImageUpload.$refs.input.click();\n },\n\n onImageUpload () {\n this.$emit(\n 'select-media',\n this.$refs.messageInputImageUpload.$refs.input.files,\n );\n },\n\n toggleEmojiPicker () {\n this.emojiPickerOpened = !this.emojiPickerOpened;\n },\n\n onSend () {\n if (this.isSendDisabled) {\n return;\n }\n this.$emit('submit', this.internalInputValue);\n },\n\n onCancel () {\n this.$emit('cancel');\n },\n\n onInput (event) {\n this.$emit('update:modelValue', event);\n },\n\n onTextInput (event) {\n this.text = event;\n this.$emit('text-input', event);\n },\n\n onMarkdownInput (event) {\n this.$emit('markdown-input', event);\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2CA,IAAK,IAAU;CACb,MAAM;CAEN,YAAY;EACV;EACA,cAAA;EACA;EACA,UAAA;EACA;EACD;CAED,OAAO;CAEP,OAAO,CAAC,qBAAqB;CAE7B,OAAQ;AACN,SAAO,EACL,MAAM,IAAI,GAAsB,EACjC;;CAGH,UAAU,EACR,mBAAoB;AAClB,SAAO,KAAK,KAAK,GAAG,wBAAwB;IAE/C;CAED,SAAS,EACP,MAAO,GAAG;EAER,IAAM,IAAkB,KAAK,QAAQ,SAAS,aAAa;AAE3D,EAAI,KAAmB,OAAO,KAAoB,cAChD,EAAgB,EAAE;IAGvB;CACF,QAzEY,OAAM,6CAA2C,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ions/meeting_pill/MeetingPill.vue","../recipes/conversation_view/message_input/extensions/meeting_pill/meeting_pill.js","../recipes/conversation_view/message_input/message_input.vue"],"sourcesContent":["<template>\n <node-view-wrapper class=\"d-recipe-message-input-meeting-pill\">\n <dt-item-layout\n class=\"d-recipe-message-input-meeting-pill__layout\"\n unstyled\n >\n <template #left>\n <div class=\"d-recipe-message-input-meeting-pill__icon\">\n <dt-icon-video\n size=\"400\"\n />\n </div>\n </template>\n {{ node.attrs.text }}\n <template #right>\n <div class=\"d-recipe-message-input-meeting-pill__close\">\n <dt-button\n circle\n importance=\"clear\"\n size=\"xs\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon-close\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n </template>\n </dt-item-layout>\n </node-view-wrapper>\n</template>\n\n<script>\nimport { NodeViewWrapper, nodeViewProps } from '@tiptap/vue-3';\nimport { DtItemLayout } from '@/components/item_layout';\nimport { DtIconClose, DtIconVideo } from '@dialpad/dialtone-icons/vue3';\nimport { DtButton } from '@/components/button';\nimport { DialtoneLocalization } from '@/localization';\n\nexport default {\n name: 'MeetingPill',\n\n components: {\n NodeViewWrapper,\n DtItemLayout,\n DtIconClose,\n DtButton,\n DtIconVideo,\n },\n\n props: nodeViewProps,\n\n emits: ['meeting-pill-close'],\n\n data () {\n return {\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n methods: {\n close (e) {\n // Get the callback from extension storage\n const onCloseCallback = this.editor?.storage?.meetingPill?.onClose;\n\n if (onCloseCallback && typeof onCloseCallback === 'function') {\n onCloseCallback(e);\n }\n },\n },\n};\n</script>\n","import { mergeAttributes, Node } from '@tiptap/core';\nimport { VueNodeViewRenderer } from '@tiptap/vue-3';\nimport MeetingPill from './MeetingPill.vue';\n\nexport default Node.create({\n name: 'meetingPill',\n\n atom: true,\n group: 'inline',\n inline: true,\n\n addOptions () {\n return {\n onClose: () => {},\n };\n },\n\n addStorage () {\n return {\n onClose: this.options.onClose,\n };\n },\n\n addNodeView () {\n return VueNodeViewRenderer(MeetingPill);\n },\n\n addAttributes () {\n return {\n text: {\n default: 'Please pass in \"text\" attribute',\n },\n };\n },\n\n parseHTML () {\n return [\n {\n tag: 'meeting-pill',\n },\n ];\n },\n\n renderText () {\n return '/dpm';\n },\n\n renderHTML ({ HTMLAttributes }) {\n return ['meeting-pill', mergeAttributes(HTMLAttributes)];\n },\n});\n","<!-- eslint-disable max-lines -->\n<template>\n <div\n data-qa=\"dt-recipe-message-input\"\n role=\"presentation\"\n class=\"d-recipe-message-input\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n @dragover.prevent\n @drop.prevent=\"onDrop\"\n @paste=\"onPaste\"\n @mousedown=\"onMousedown\"\n >\n <!-- @slot Renders above the input, but still within the borders. -->\n <slot name=\"top\" />\n\n <dt-recipe-message-input-topbar\n v-if=\"richText\"\n :bold-button-options=\"boldButtonOptions\"\n :italic-button-options=\"italicButtonOptions\"\n :strike-button-options=\"strikeButtonOptions\"\n :bullet-list-button-options=\"bulletListButtonOptions\"\n :ordered-list-button-options=\"orderedListButtonOptions\"\n :block-quote-button-options=\"blockQuoteButtonOptions\"\n :code-button-options=\"codeButtonOptions\"\n :code-block-button-options=\"codeBlockButtonOptions\"\n :is-selection-active=\"isSelectionActive\"\n @click=\"handleTopbarClick\"\n >\n <template #link>\n <dt-recipe-message-input-link\n ref=\"link\"\n :open=\"linkDialogOpen\"\n :link-button-options=\"linkButtonOptions\"\n :is-selection-active=\"isSelectionActive\"\n @opened=\"linkDialogOpened\"\n @set-link=\"setLink\"\n @remove-link=\"removeLink\"\n />\n </template>\n </dt-recipe-message-input-topbar>\n <!-- Some wrapper to restrict the height and show the scrollbar -->\n <div\n v-dt-scrollbar\n class=\"d-recipe-message-input__editor-wrapper\"\n :style=\"{ 'max-height': maxHeight }\"\n >\n <dt-rich-text-editor\n ref=\"richTextEditor\"\n v-model=\"internalInputValue\"\n :allow-blockquote=\"richText\"\n :allow-bold=\"richText\"\n :allow-bullet-list=\"richText\"\n :allow-code=\"richText\"\n :allow-codeblock=\"richText\"\n :allow-italic=\"richText\"\n :allow-strike=\"richText\"\n :allow-underline=\"richText\"\n :paste-rich-text=\"richText\"\n :editable=\"editable\"\n :input-aria-label=\"inputAriaLabel\"\n :input-class=\"inputClass\"\n :output-format=\"outputFormat\"\n :auto-focus=\"autoFocus\"\n :link=\"richText\"\n :placeholder=\"placeholder\"\n :prevent-typing=\"preventTyping\"\n :mention-suggestion=\"mentionSuggestion\"\n :channel-suggestion=\"channelSuggestion\"\n :slash-command-suggestion=\"slashCommandSuggestion\"\n :additional-extensions=\"additionalExtensions\"\n :hide-link-bubble-menu=\"hideLinkBubbleMenu\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n @input=\"onInput\"\n @text-input=\"onTextInput\"\n @markdown-input=\"onMarkdownInput\"\n @enter=\"onSend\"\n @selected=\"selectedText = $event\"\n @selected-command=\"$emit('selected-command', $event)\"\n @edit-link=\"initLinkDialog\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n />\n </div>\n <!-- @slot Slot for attachment carousel -->\n <slot name=\"middle\" />\n <!-- Section for the bottom UI -->\n <section class=\"d-recipe-message-input__bottom-section\">\n <!-- Left content -->\n <div class=\"d-recipe-message-input__bottom-section-left\">\n <dt-stack\n gap=\"200\"\n direction=\"row\"\n class=\"d-recipe-message-input__bottom-section-left-stack\"\n >\n <dt-button\n v-if=\"showImagePicker\"\n v-dt-tooltip:top-start=\"imagePickerButtonLabel\"\n data-qa=\"dt-recipe-message-input-image-btn\"\n size=\"sm\"\n class=\"d-recipe-message-input__button\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"imagePickerButtonLabel\"\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-image size=\"300\" />\n </template>\n </dt-button>\n <dt-input\n ref=\"messageInputImageUpload\"\n data-qa=\"dt-recipe-message-input-image-input\"\n accept=\"image/*, video/*\"\n type=\"file\"\n class=\"d-recipe-message-input__image-input\"\n multiple\n hidden\n @input=\"onImageUpload\"\n />\n <dt-popover\n v-if=\"showEmojiPicker\"\n v-model:open=\"emojiPickerOpened\"\n data-qa=\"dt-recipe-message-input-emoji-picker-popover\"\n initial-focus-element=\"#searchInput\"\n padding=\"none\"\n >\n <template #anchor=\"{ attrs }\">\n <dt-button\n v-dt-tooltip=\"emojiPickerButtonLabel\"\n v-bind=\"attrs\"\n data-qa=\"dt-recipe-message-input-emoji-picker-btn\"\n size=\"sm\"\n class=\"d-recipe-message-input__button\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"emojiPickerButtonLabel\"\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-very-satisfied\n v-if=\"emojiPickerHovered\"\n size=\"300\"\n />\n <dt-icon-satisfied\n v-else\n size=\"300\"\n />\n </template>\n </dt-button>\n </template>\n <template #content=\"{ close }\">\n <dt-emoji-picker\n v-bind=\"emojiPickerProps\"\n @add-emoji=\"$emit('add-emoji')\"\n @skin-tone=\"onSkinTone\"\n @selected-emoji=\"(emoji) => onSelectEmoji(emoji, close)\"\n @scroll-bottom-reached=\"$emit('emoji-scroll-bottom-reached')\"\n />\n </template>\n </dt-popover>\n <!-- @slot Slot for emojiGiphy picker -->\n <slot name=\"emojiGiphyPicker\" />\n <!-- @slot Slot to add extra action icons next to default ones -->\n <slot name=\"customActionIcons\" />\n <!-- @slot Slot for message polish -->\n <slot name=\"messagePolish\" />\n </dt-stack>\n </div>\n <!-- Right content -->\n <div class=\"d-recipe-message-input__bottom-section-right\">\n <dt-stack\n direction=\"row\"\n gap=\"300\"\n >\n <!-- @slot Slot for schedule message -->\n <div class=\"d-recipe-message-input__schedule-message\">\n <slot name=\"scheduleMessage\" />\n </div>\n\n <!-- @slot Slot for sms count -->\n <div class=\"d-recipe-message-input__sms-count\">\n <slot name=\"smsCount\" />\n </div>\n\n <!-- Optionally displayed remaining character counter -->\n <dt-tooltip\n v-if=\"Boolean(showCharacterLimit)\"\n class=\"d-recipe-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-recipe-message-input__remaining-char\"\n data-qa=\"dt-recipe-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 v-dt-tooltip=\"cancelButtonLabel\"\n data-qa=\"dt-recipe-message-input-cancel-button\"\n class=\"d-recipe-message-input__button d-recipe-message-input__cancel-button\"\n size=\"sm\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"cancelButtonLabel\"\n @click=\"onCancel\"\n >\n <p>{{ cancelButtonLabel }}</p>\n </dt-button>\n\n <!-- @slot Slot for sendButton picker -->\n <slot name=\"sendButton\">\n <!-- Send button -->\n <!-- Right positioned UI - send button -->\n <dt-button\n v-if=\"showSend\"\n v-dt-tooltip:top-end=\"sendButtonLabel\"\n data-qa=\"dt-recipe-message-input-send-btn\"\n size=\"sm\"\n kind=\"default\"\n importance=\"primary\"\n :class=\"[\n 'd-recipe-message-input__button d-recipe-message-input__send-button',\n {\n 'd-recipe-message-input__send-button--disabled': isSendDisabled,\n 'd-btn--icon-only': showSendIcon,\n },\n ]\"\n :aria-label=\"sendButtonLabel\"\n :aria-disabled=\"isSendDisabled\"\n @click=\"onSend\"\n >\n <template\n v-if=\"showSendIcon\"\n #icon\n >\n <!-- @slot Slot for send button icon -->\n <slot\n name=\"sendIcon\"\n :icon-size=\"sendIconSize\"\n >\n <dt-icon-send :size=\"sendIconSize\" />\n </slot>\n </template>\n <template v-if=\"showSend.text\">\n <p>{{ showSend.text }}</p>\n </template>\n </dt-button>\n </slot>\n </dt-stack>\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 lastActiveNodes from './last_active_nodes';\nimport { removeClassStyleAttrs, returnFirstEl, addClassStyleAttrs } from '@/common/utils';\nimport MeetingPill from './extensions/meeting_pill/meeting_pill';\nimport { DtButton } from '@/components/button';\nimport { DtEmojiPicker } from '@/components/emoji_picker';\nimport { DtPopover } from '@/components/popover';\nimport { DtInput } from '@/components/input';\nimport { DtTooltip } from '@/components/tooltip';\nimport { DtStack } from '@/components/stack';\nimport {\n DtIconImage, DtIconVerySatisfied, DtIconSatisfied, DtIconSend,\n} from '@dialpad/dialtone-icons/vue3';\nimport DtRecipeMessageInputTopbar from './message_input_topbar.vue';\nimport DtRecipeMessageInputLink from './message_input_link.vue';\nimport { DialtoneLocalization } from '@/localization';\n\nimport {\n EDITOR_SUPPORTED_LINK_PROTOCOLS,\n EDITOR_DEFAULT_LINK_PREFIX,\n} from '../editor/editor_constants.js';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeMessageInput',\n\n components: {\n DtButton,\n DtEmojiPicker,\n DtInput,\n DtPopover,\n DtRecipeMessageInputTopbar,\n DtRecipeMessageInputLink,\n DtRichTextEditor,\n DtTooltip,\n DtStack,\n DtIconImage,\n DtIconVerySatisfied,\n DtIconSatisfied,\n DtIconSend,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Displays all the buttons for rich text formatting above the message input, and enables it within the editor.\n * Rich text formatting for the purposes of this component is defined as:\n *\n * bold, italic, strikethrough, lists, blockquotes, inline code tags, and code blocks.\n *\n * If you are sending a message to a phone rather than a Dialpad to Dialpad message, you should have this as false.\n */\n richText: {\n type: Boolean,\n default: true,\n },\n\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 modelValue: {\n type: [Object, String],\n default: '',\n },\n\n /**\n * Whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Descriptive label for the input element\n */\n inputAriaLabel: {\n type: String,\n required: true,\n default: '',\n },\n\n /**\n * Prevents the user from typing any further. Deleting text will still work.\n */\n preventTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the input element. Only accepts a String value\n * because this is passed to the editor via options. For multiple classes,\n * join them into one string, e.g. \"d-p8 d-hmx96\"\n */\n inputClass: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the input should receive focus after the component has been\n * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n * - `start` Sets the focus to the beginning of the input\n * - `end` Sets the focus to the end of the input\n * - `all` Selects the whole contents of the input\n * - `Number` Sets the focus to a specific position in the input\n * - `true` Defaults to `start`\n * - `false` Disables autofocus\n * @values true, false, start, end, all, number\n */\n autoFocus: {\n type: [Boolean, String, Number],\n default: false,\n validator (autoFocus) {\n if (typeof autoFocus === 'string') {\n return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n }\n return true;\n },\n },\n\n /**\n * The output format that the editor uses when emitting the \"@input\" event.\n * One of `text`, `json`, `html`, `markdown`. See https://tiptap.dev/guide/output for\n * examples.\n * @values text, json, html, markdown\n */\n outputFormat: {\n type: String,\n default: 'json',\n validator (outputFormat) {\n return RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);\n },\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 },\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: () => ({}),\n },\n\n /**\n * Send button defaults.\n * TODO (Dialtone 10):\n * - Change to `showSendButton`, boolean only.\n */\n showSend: {\n type: [Boolean, Object],\n default: () => ({}),\n },\n\n /**\n * TODO (Dialtone 10):\n * - Add a prop `iconOnly` default: true to control if localized send button text should be shown\n */\n\n /**\n * Cancel button defaults.\n * TODO (Dialtone 10): Change to `showCancelButton`, boolean only.\n */\n showCancel: {\n type: [Boolean, Object],\n default: () => ({}),\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the contacts for suggestion.\n * items({ query }) => { return [ContactObject]; }\n * ContactObject format:\n * { name: string, avatarSrc: string, id: string }\n *\n * When null, it does not add the plugin.\n */\n mentionSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the channels for suggestion.\n * items({ query }) => { return [ChannelObject]; }\n * ChannelObject format:\n * { name: string, id: string, locked: boolean }\n *\n * When null, it does not add the plugin. Setting locked to true will display a lock rather than hash.\n */\n channelSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the slash commands for suggestion.\n * items({ query }) => { return [SlashCommandObject]; }\n * SlashCommandObject format:\n * { command: string, description: string, parametersExample?: string }\n * The \"parametersExample\" parameter is optional, and describes an example\n * of the parameters that command can take.\n *\n * When null, it does not add the plugin.\n */\n slashCommandSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * descriptive text fields for the bold button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n boldButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + B',\n }),\n },\n\n /**\n * descriptive text fields for the italic button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n italicButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + I',\n }),\n },\n\n /**\n * descriptive text fields for the strikethrough button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n strikeButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + Shift + S',\n }),\n },\n\n /**\n * descriptive text fields for the link button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n linkButtonOptions: {\n type: Object,\n default: () => ({\n // TODO: implement mod k\n keyboardShortcutText: 'Mod + K',\n linkPlaceholder: 'e.g. https://www.dialpad.com',\n }),\n },\n\n /**\n * descriptive text fields for the bullet list button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n bulletListButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + Shift + 8',\n }),\n },\n\n /**\n * descriptive text fields for the ordered list button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n orderedListButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + Shift + 7',\n }),\n },\n\n /**\n * descriptive text fields for the italic button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n blockQuoteButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + Shift + B',\n }),\n },\n\n /**\n * descriptive text fields for the code button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n codeButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + E',\n }),\n },\n\n /**\n * descriptive text fields for the code block button\n *\n * object format:\n * { keyboardShortcutText: string }\n */\n codeBlockButtonOptions: {\n type: Object,\n default: () => ({\n keyboardShortcutText: 'Mod + Alt + C',\n }),\n },\n },\n\n emits: [\n /**\n * Fires when send button is clicked\n *\n * @event submit\n * @type {String}\n */\n 'submit',\n\n /**\n * Fires when media is selected from image button\n *\n * @event select-media\n * @type {Array}\n */\n 'select-media',\n\n /**\n * Fires when media is dropped into the message input\n *\n * @event add-media\n * @type {Array}\n */\n 'add-media',\n\n /**\n * Fires when media is pasted into the message input\n *\n * @event paste-media\n * @type {Array}\n */\n 'paste-media',\n\n /**\n * Fires when cancel button is pressed (only on edit mode)\n *\n * @event cancel\n * @type {Boolean}\n */\n 'cancel',\n\n /**\n * Fires when skin tone is selected from the emoji picker\n *\n * @event skin-tone\n * @type {String}\n */\n 'skin-tone',\n\n /**\n * Fires when emoji is selected from the emoji picker\n *\n * @event selected-emoji\n * @type {String}\n */\n 'selected-emoji',\n\n /**\n * Fires when a slash command is selected\n *\n * @event selected-command\n * @type {String}\n */\n 'selected-command',\n\n /**\n * Fires when meeting pill is closed\n *\n * @event meeting-pill-close\n * @type {String}\n */\n 'meeting-pill-close',\n\n /**\n * Event to sync the value with the parent\n * @event update:modelValue\n * @type {String|JSON}\n */\n 'update:modelValue',\n\n /**\n * Emitted when input changes, returns text content only\n * @event text-input\n * @type {String}\n */\n 'text-input',\n\n /**\n * Emitted when input changes, returns markdown content only\n * @event markdown-input\n * @type {String}\n */\n 'markdown-input',\n\n /**\n * Emitted when the 'Add emoji' button is clicked\n * @event add-emoji\n * @type {Boolean}\n */\n 'add-emoji',\n\n /**\n * Emitted when the emoji picker scroll reaches the bottom\n * @event emoji-scroll-bottom-reached\n */\n 'emoji-scroll-bottom-reached',\n ],\n\n data () {\n return {\n // If an ordered list is nested within an unordered list, we only want to show the currently selected list as\n // active. This function performs the logic to determine the farthest active node from the root.\n lastActiveNodes,\n additionalExtensions: [\n MeetingPill.configure({\n onClose: (event) => {\n this.$emit('meeting-pill-close', event);\n },\n }),\n ],\n\n internalInputValue: this.modelValue, // internal input content\n imagePickerFocus: false,\n emojiPickerFocus: false,\n emojiPickerOpened: false,\n isFocused: false,\n linkOptions: {\n class: 'd-link d-c-text d-d-inline-block',\n },\n\n linkDialogOpen: false,\n selectedText: '',\n text: '',\n hideLinkBubbleMenu: false,\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n showSendIcon () {\n return !this.showSend.text;\n },\n\n inputLength () {\n return this.text.length;\n },\n\n displayCharacterLimitWarning () {\n return (\n Boolean(this.showCharacterLimit) &&\n this.showCharacterLimit.count - this.inputLength <=\n this.showCharacterLimit.warning\n );\n },\n\n characterLimitTooltipEnabled () {\n return (\n this.showCharacterLimit.message &&\n this.showCharacterLimit.count - this.inputLength < 0\n );\n },\n\n // Returns a new function reference when selectedText changes, which causes the topbar\n // to re-render (prop update) without destroying/recreating it (no key change).\n isSelectionActive () {\n // eslint-disable-next-line no-unused-vars\n const _dep = this.selectedText;\n return (type) => {\n if (['bulletList', 'orderedList'].includes(type)) {\n if (!this.richText) return false;\n return this.lastActiveNodes(this.$refs.richTextEditor?.editor?.state, [{ type: 'bulletList' }, { type: 'orderedList' }]).includes(type) && this.isFocused;\n }\n return this.$refs.richTextEditor?.editor?.isActive(type) && this.isFocused;\n };\n },\n\n isSendDisabled () {\n return (\n this.disableSend ||\n (this.showCharacterLimit &&\n this.inputLength > this.showCharacterLimit.count)\n );\n },\n\n emojiPickerHovered () {\n return this.emojiPickerFocus || this.emojiPickerOpened;\n },\n\n sendIconSize () {\n return '300';\n },\n\n sendButtonLabel () {\n return this.i18n.$t('DIALTONE_MESSAGE_INPUT_SEND_BUTTON_ARIA_LABEL');\n },\n\n imagePickerButtonLabel () {\n return this.i18n.$t('DIALTONE_MESSAGE_INPUT_IMAGE_PICKER_BUTTON_ARIA_LABEL');\n },\n\n emojiPickerButtonLabel () {\n return this.i18n.$t('DIALTONE_MESSAGE_INPUT_EMOJI_PICKER_BUTTON_ARIA_LABEL');\n },\n\n cancelButtonLabel () {\n return this.i18n.$t('DIALTONE_MESSAGE_INPUT_CANCEL_BUTTON_ARIA_LABEL');\n },\n },\n\n watch: {\n modelValue (newValue) {\n this.internalInputValue = newValue;\n },\n\n emojiPickerOpened (newValue) {\n if (!newValue) {\n this.$refs.richTextEditor?.focusEditor();\n }\n },\n },\n\n created () {\n if (this.modelValue && this.outputFormat === 'text') {\n this.internalInputValue = this.modelValue.replace(/\\n/g, '<br>');\n } else {\n this.internalInputValue = this.modelValue;\n }\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\n\n linkDialogOpened (value) {\n this.linkDialogOpen = value;\n if (value === true) {\n this.initLinkDialog();\n } else {\n this.hideLinkBubbleMenu = false;\n this.$refs.richTextEditor?.focusEditor();\n }\n },\n\n handleTopbarClick (type) {\n const editor = this.$refs.richTextEditor?.editor;\n // Key is the name returned in the event, value is the name of the TipTap command function to run.\n const typeToCommandMap = {\n bold: () => editor?.chain().focus().toggleBold().run(),\n italic: () => editor?.chain().focus().toggleItalic().run(),\n strike: () => editor?.chain().focus().toggleStrike().run(),\n bulletList: () => editor?.chain().focus().toggleBulletList().run(),\n orderedList: () => editor?.chain().focus().toggleOrderedList().run(),\n blockquote: () => editor?.chain().focus().toggleBlockquote().run(),\n code: () => editor?.chain().focus().toggleCode().run(),\n codeBlock: () => editor?.chain().focus().toggleCodeBlock().run(),\n };\n\n if (editor && typeToCommandMap[type]) {\n typeToCommandMap[type]();\n }\n },\n\n initLinkDialog () {\n this.$refs.link.setInitialValues(this.selectedText, this.$refs.richTextEditor?.editor?.getAttributes('link')?.href);\n this.hideLinkBubbleMenu = true;\n this.linkDialogOpen = true;\n },\n\n removeLink () {\n this.$refs.richTextEditor?.removeLink();\n this.linkDialogOpen = false;\n },\n\n setLink (linkText, linkInput) {\n this.$refs.richTextEditor.setLink(\n linkInput, linkText, this.linkOptions, EDITOR_SUPPORTED_LINK_PROTOCOLS, EDITOR_DEFAULT_LINK_PREFIX,\n );\n this.linkDialogOpen = false;\n },\n\n // Mousedown instead of click because it fires before the blur event.\n onMousedown (e) {\n const isWithinInput = returnFirstEl(this.$refs.richTextEditor.$el)\n .querySelector('.tiptap')\n .contains(e.target);\n\n // If the click is not within the tiptap rich text editor input itself, but still within the wrapping div,\n // focus the editor.\n if (!isWithinInput) {\n // Prevent default prevents blurring the rich text editor input when it is already focused.\n e.preventDefault();\n this.$refs.richTextEditor.focusEditor();\n }\n },\n\n onDrop (e) {\n const dt = e.dataTransfer;\n const files = Array.from(dt.files);\n this.$emit('add-media', files);\n },\n\n onPaste (e) {\n if (e.clipboardData.files.length) {\n e.stopPropagation();\n e.preventDefault();\n const files = [...e.clipboardData.files];\n this.$emit('paste-media', files);\n }\n },\n\n onSkinTone (skinTone) {\n this.$emit('skin-tone', skinTone);\n },\n\n onSelectEmoji (emoji, close) {\n if (!emoji) {\n return;\n }\n\n if (!emoji.shift_key) {\n close();\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 image: emoji.image,\n name: emoji.name,\n },\n });\n this.$emit('selected-emoji', emoji);\n },\n\n onSelectImage () {\n this.$refs.messageInputImageUpload.$refs.input.click();\n },\n\n onImageUpload () {\n this.$emit(\n 'select-media',\n this.$refs.messageInputImageUpload.$refs.input.files,\n );\n },\n\n toggleEmojiPicker () {\n this.emojiPickerOpened = !this.emojiPickerOpened;\n },\n\n onSend () {\n if (this.isSendDisabled) {\n return;\n }\n this.$emit('submit', this.internalInputValue);\n },\n\n onCancel () {\n this.$emit('cancel');\n },\n\n onInput (event) {\n this.$emit('update:modelValue', event);\n },\n\n onTextInput (event) {\n this.text = event;\n this.$emit('text-input', event);\n },\n\n onMarkdownInput (event) {\n this.$emit('markdown-input', event);\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2CA,IA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AAA,EAAA,IAAA,GAAA,CAAA,CAAA;;QAZb,EAAA,eAAA;WACL;iBAQM,CALP,EAKO,EAAA,QAAA,YAAA,EAHJ,UAAW,EAAA,cAAY,QAGnB,CADL,EAAqC,GAAA,EAAtB,MAAM,EAAA,cAAY,EAAA,MAAA,GAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;KAzBf,EAAA;KAAT;KAAO,CAAA,CAAA,GAAA,EAAA,IAAA,GAAA,CAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./common/utils/index.cjs`),t=require(`./_plugin-vue_export-helper-D8jCH6HB.cjs`),n=require(`./localization/index.cjs`),r=require(`./lib/button/button.cjs`),i=require(`./lib/item-layout/item-layout.cjs`),a=require(`./lib/stack/stack.cjs`),o=require(`./lib/tooltip/tooltip.cjs`),s=require(`./lib/popover/popover.cjs`),c=require(`./lib/input/input.cjs`),l=require(`./emoji_picker-Cl-T4BXK.cjs`),u=require(`./node_modules/@tiptap/vue-3.cjs`),d=require(`./rich_text_editor-DRytK1_9.cjs`),f=require(`./lib/rich-text-editor/rich-text-editor-constants.cjs`),p=require(`./lib/editor/editor-constants.cjs`),m=require(`./lib/message-input/last-active-nodes.cjs`),h=require(`./lib/message-input/message-input-topbar.cjs`),g=require(`./lib/message-input/message-input-link.cjs`);let _=require(`vue`),v=require(`@dialpad/dialtone-icons/vue3`),y=require(`@tiptap/core`);var b={name:`MeetingPill`,components:{NodeViewWrapper:u.NodeViewWrapper,DtItemLayout:i.default,DtIconClose:v.DtIconClose,DtButton:r.default,DtIconVideo:v.DtIconVideo},props:u.nodeViewProps,emits:[`meeting-pill-close`],data(){return{i18n:new n.DialtoneLocalization}},computed:{closeButtonTitle(){return this.i18n.$t(`DIALTONE_CLOSE_BUTTON`)}},methods:{close(e){let t=this.editor?.storage?.meetingPill?.onClose;t&&typeof t==`function`&&t(e)}}},x={class:`d-recipe-message-input-meeting-pill__icon`},S={class:`d-recipe-message-input-meeting-pill__close`};function C(e,t,n,r,i,a){let o=(0,_.resolveComponent)(`dt-icon-video`),s=(0,_.resolveComponent)(`dt-icon-close`),c=(0,_.resolveComponent)(`dt-button`),l=(0,_.resolveComponent)(`dt-item-layout`),u=(0,_.resolveComponent)(`node-view-wrapper`);return(0,_.openBlock)(),(0,_.createBlock)(u,{class:`d-recipe-message-input-meeting-pill`},{default:(0,_.withCtx)(()=>[(0,_.createVNode)(l,{class:`d-recipe-message-input-meeting-pill__layout`,unstyled:``},{left:(0,_.withCtx)(()=>[(0,_.createElementVNode)(`div`,x,[(0,_.createVNode)(o,{size:`400`})])]),right:(0,_.withCtx)(()=>[(0,_.createElementVNode)(`div`,S,[(0,_.createVNode)(c,{circle:``,importance:`clear`,size:`xs`,"aria-label":a.closeButtonTitle,title:a.closeButtonTitle,onClick:a.close},{icon:(0,_.withCtx)(()=>[(0,_.createVNode)(s,{size:`300`})]),_:1},8,[`aria-label`,`title`,`onClick`])])]),default:(0,_.withCtx)(()=>[(0,_.createTextVNode)(` `+(0,_.toDisplayString)(e.node.attrs.text)+` `,1)]),_:1})]),_:1})}var w=t.t(b,[[`render`,C]]),T=y.Node.create({name:`meetingPill`,atom:!0,group:`inline`,inline:!0,addOptions(){return{onClose:()=>{}}},addStorage(){return{onClose:this.options.onClose}},addNodeView(){return u.VueNodeViewRenderer(w)},addAttributes(){return{text:{default:`Please pass in "text" attribute`}}},parseHTML(){return[{tag:`meeting-pill`}]},renderText(){return`/dpm`},renderHTML({HTMLAttributes:e}){return[`meeting-pill`,(0,y.mergeAttributes)(e)]}}),E={compatConfig:{MODE:3},name:`DtRecipeMessageInput`,components:{DtButton:r.default,DtEmojiPicker:l.t,DtInput:c.default,DtPopover:s.default,DtRecipeMessageInputTopbar:h.default,DtRecipeMessageInputLink:g.default,DtRichTextEditor:d.t,DtTooltip:o.default,DtStack:a.default,DtIconImage:v.DtIconImage,DtIconVerySatisfied:v.DtIconVerySatisfied,DtIconSatisfied:v.DtIconSatisfied,DtIconSend:v.DtIconSend},inheritAttrs:!1,props:{richText:{type:Boolean,default:!0},modelValue:{type:[Object,String],default:``},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0,default:``},preventTyping:{type:Boolean,default:!1},inputClass:{type:String,default:``},autoFocus:{type:[Boolean,String,Number],default:!1,validator(e){return typeof e==`string`?f.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(e):!0}},outputFormat:{type:String,default:`json`,validator(e){return f.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(e)}},placeholder:{type:String,default:``},disableSend:{type:Boolean,default:!1},maxHeight:{type:String,default:`unset`},showEmojiPicker:{type:Boolean,default:!0},emojiPickerProps:{type:Object,default:()=>({})},showCharacterLimit:{type:[Boolean,Object],default:()=>({count:1500,warning:500,message:``})},showImagePicker:{type:[Boolean,Object],default:()=>({})},showSend:{type:[Boolean,Object],default:()=>({})},showCancel:{type:[Boolean,Object],default:()=>({})},mentionSuggestion:{type:Object,default:null},channelSuggestion:{type:Object,default:null},slashCommandSuggestion:{type:Object,default:null},boldButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + B`})},italicButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + I`})},strikeButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + Shift + S`})},linkButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + K`,linkPlaceholder:`e.g. https://www.dialpad.com`})},bulletListButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + Shift + 8`})},orderedListButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + Shift + 7`})},blockQuoteButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + Shift + B`})},codeButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + E`})},codeBlockButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + Alt + C`})}},emits:[`submit`,`select-media`,`add-media`,`paste-media`,`cancel`,`skin-tone`,`selected-emoji`,`selected-command`,`meeting-pill-close`,`update:modelValue`,`text-input`,`markdown-input`,`add-emoji`,`emoji-scroll-bottom-reached`],data(){return{lastActiveNodes:m.default,additionalExtensions:[T.configure({onClose:e=>{this.$emit(`meeting-pill-close`,e)}})],internalInputValue:this.modelValue,imagePickerFocus:!1,emojiPickerFocus:!1,emojiPickerOpened:!1,isFocused:!1,linkOptions:{class:`d-link d-c-text d-d-inline-block`},linkDialogOpen:!1,selectedText:``,text:``,hideLinkBubbleMenu:!1,i18n:new n.DialtoneLocalization}},computed:{showSendIcon(){return!this.showSend.text},inputLength(){return this.text.length},displayCharacterLimitWarning(){return!!this.showCharacterLimit&&this.showCharacterLimit.count-this.inputLength<=this.showCharacterLimit.warning},characterLimitTooltipEnabled(){return this.showCharacterLimit.message&&this.showCharacterLimit.count-this.inputLength<0},isSelectionActive(){return this.selectedText,e=>[`bulletList`,`orderedList`].includes(e)?this.richText?this.lastActiveNodes(this.$refs.richTextEditor?.editor?.state,[{type:`bulletList`},{type:`orderedList`}]).includes(e)&&this.isFocused:!1:this.$refs.richTextEditor?.editor?.isActive(e)&&this.isFocused},isSendDisabled(){return this.disableSend||this.showCharacterLimit&&this.inputLength>this.showCharacterLimit.count},emojiPickerHovered(){return this.emojiPickerFocus||this.emojiPickerOpened},sendIconSize(){return`300`},sendButtonLabel(){return this.i18n.$t(`DIALTONE_MESSAGE_INPUT_SEND_BUTTON_ARIA_LABEL`)},imagePickerButtonLabel(){return this.i18n.$t(`DIALTONE_MESSAGE_INPUT_IMAGE_PICKER_BUTTON_ARIA_LABEL`)},emojiPickerButtonLabel(){return this.i18n.$t(`DIALTONE_MESSAGE_INPUT_EMOJI_PICKER_BUTTON_ARIA_LABEL`)},cancelButtonLabel(){return this.i18n.$t(`DIALTONE_MESSAGE_INPUT_CANCEL_BUTTON_ARIA_LABEL`)}},watch:{modelValue(e){this.internalInputValue=e},emojiPickerOpened(e){e||this.$refs.richTextEditor?.focusEditor()}},created(){this.modelValue&&this.outputFormat===`text`?this.internalInputValue=this.modelValue.replace(/\n/g,`<br>`):this.internalInputValue=this.modelValue},methods:{removeClassStyleAttrs:e.removeClassStyleAttrs,addClassStyleAttrs:e.addClassStyleAttrs,linkDialogOpened(e){this.linkDialogOpen=e,e===!0?this.initLinkDialog():(this.hideLinkBubbleMenu=!1,this.$refs.richTextEditor?.focusEditor())},handleTopbarClick(e){let t=this.$refs.richTextEditor?.editor,n={bold:()=>t?.chain().focus().toggleBold().run(),italic:()=>t?.chain().focus().toggleItalic().run(),strike:()=>t?.chain().focus().toggleStrike().run(),bulletList:()=>t?.chain().focus().toggleBulletList().run(),orderedList:()=>t?.chain().focus().toggleOrderedList().run(),blockquote:()=>t?.chain().focus().toggleBlockquote().run(),code:()=>t?.chain().focus().toggleCode().run(),codeBlock:()=>t?.chain().focus().toggleCodeBlock().run()};t&&n[e]&&n[e]()},initLinkDialog(){this.$refs.link.setInitialValues(this.selectedText,this.$refs.richTextEditor?.editor?.getAttributes(`link`)?.href),this.hideLinkBubbleMenu=!0,this.linkDialogOpen=!0},removeLink(){this.$refs.richTextEditor?.removeLink(),this.linkDialogOpen=!1},setLink(e,t){this.$refs.richTextEditor.setLink(t,e,this.linkOptions,p.EDITOR_SUPPORTED_LINK_PROTOCOLS,p.EDITOR_DEFAULT_LINK_PREFIX),this.linkDialogOpen=!1},onMousedown(t){e.returnFirstEl(this.$refs.richTextEditor.$el).querySelector(`.tiptap`).contains(t.target)||(t.preventDefault(),this.$refs.richTextEditor.focusEditor())},onDrop(e){let t=e.dataTransfer,n=Array.from(t.files);this.$emit(`add-media`,n)},onPaste(e){if(e.clipboardData.files.length){e.stopPropagation(),e.preventDefault();let t=[...e.clipboardData.files];this.$emit(`paste-media`,t)}},onSkinTone(e){this.$emit(`skin-tone`,e)},onSelectEmoji(e,t){e&&(e.shift_key||t(),this.$refs.richTextEditor.editor.commands.insertContent({type:`emoji`,attrs:{code:e.shortname,image:e.image,name:e.name}}),this.$emit(`selected-emoji`,e))},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`)},onInput(e){this.$emit(`update:modelValue`,e)},onTextInput(e){this.text=e,this.$emit(`text-input`,e)},onMarkdownInput(e){this.$emit(`markdown-input`,e)}}},D={class:`d-recipe-message-input__bottom-section`},O={class:`d-recipe-message-input__bottom-section-left`},k={class:`d-recipe-message-input__bottom-section-right`},A={class:`d-recipe-message-input__schedule-message`},j={class:`d-recipe-message-input__sms-count`},M={key:0};function N(e,t,n,r,i,a){let o=(0,_.resolveComponent)(`dt-recipe-message-input-link`),s=(0,_.resolveComponent)(`dt-recipe-message-input-topbar`),c=(0,_.resolveComponent)(`dt-rich-text-editor`),l=(0,_.resolveComponent)(`dt-icon-image`),u=(0,_.resolveComponent)(`dt-button`),d=(0,_.resolveComponent)(`dt-input`),f=(0,_.resolveComponent)(`dt-icon-very-satisfied`),p=(0,_.resolveComponent)(`dt-icon-satisfied`),m=(0,_.resolveComponent)(`dt-emoji-picker`),h=(0,_.resolveComponent)(`dt-popover`),g=(0,_.resolveComponent)(`dt-stack`),v=(0,_.resolveComponent)(`dt-tooltip`),y=(0,_.resolveComponent)(`dt-icon-send`),b=(0,_.resolveDirective)(`dt-scrollbar`),x=(0,_.resolveDirective)(`dt-tooltip`);return(0,_.openBlock)(),(0,_.createElementBlock)(`div`,(0,_.mergeProps)({"data-qa":`dt-recipe-message-input`,role:`presentation`,class:`d-recipe-message-input`},a.addClassStyleAttrs(e.$attrs),{onDragover:t[16]||(t[16]=(0,_.withModifiers)(()=>{},[`prevent`])),onDrop:t[17]||(t[17]=(0,_.withModifiers)((...e)=>a.onDrop&&a.onDrop(...e),[`prevent`])),onPaste:t[18]||(t[18]=(...e)=>a.onPaste&&a.onPaste(...e)),onMousedown:t[19]||(t[19]=(...e)=>a.onMousedown&&a.onMousedown(...e))}),[(0,_.renderSlot)(e.$slots,`top`),n.richText?((0,_.openBlock)(),(0,_.createBlock)(s,{key:0,"bold-button-options":n.boldButtonOptions,"italic-button-options":n.italicButtonOptions,"strike-button-options":n.strikeButtonOptions,"bullet-list-button-options":n.bulletListButtonOptions,"ordered-list-button-options":n.orderedListButtonOptions,"block-quote-button-options":n.blockQuoteButtonOptions,"code-button-options":n.codeButtonOptions,"code-block-button-options":n.codeBlockButtonOptions,"is-selection-active":a.isSelectionActive,onClick:a.handleTopbarClick},{link:(0,_.withCtx)(()=>[(0,_.createVNode)(o,{ref:`link`,open:i.linkDialogOpen,"link-button-options":n.linkButtonOptions,"is-selection-active":a.isSelectionActive,onOpened:a.linkDialogOpened,onSetLink:a.setLink,onRemoveLink:a.removeLink},null,8,[`open`,`link-button-options`,`is-selection-active`,`onOpened`,`onSetLink`,`onRemoveLink`])]),_:1},8,[`bold-button-options`,`italic-button-options`,`strike-button-options`,`bullet-list-button-options`,`ordered-list-button-options`,`block-quote-button-options`,`code-button-options`,`code-block-button-options`,`is-selection-active`,`onClick`])):(0,_.createCommentVNode)(``,!0),(0,_.withDirectives)(((0,_.openBlock)(),(0,_.createElementBlock)(`div`,{class:`d-recipe-message-input__editor-wrapper`,style:(0,_.normalizeStyle)({"max-height":n.maxHeight})},[(0,_.createVNode)(c,(0,_.mergeProps)({ref:`richTextEditor`,modelValue:i.internalInputValue,"onUpdate:modelValue":t[0]||(t[0]=e=>i.internalInputValue=e),"allow-blockquote":n.richText,"allow-bold":n.richText,"allow-bullet-list":n.richText,"allow-code":n.richText,"allow-codeblock":n.richText,"allow-italic":n.richText,"allow-strike":n.richText,"allow-underline":n.richText,"paste-rich-text":n.richText,editable:n.editable,"input-aria-label":n.inputAriaLabel,"input-class":n.inputClass,"output-format":n.outputFormat,"auto-focus":n.autoFocus,link:n.richText,placeholder:n.placeholder,"prevent-typing":n.preventTyping,"mention-suggestion":n.mentionSuggestion,"channel-suggestion":n.channelSuggestion,"slash-command-suggestion":n.slashCommandSuggestion,"additional-extensions":i.additionalExtensions,"hide-link-bubble-menu":i.hideLinkBubbleMenu},a.removeClassStyleAttrs(e.$attrs),{onInput:a.onInput,onTextInput:a.onTextInput,onMarkdownInput:a.onMarkdownInput,onEnter:a.onSend,onSelected:t[1]||(t[1]=e=>i.selectedText=e),onSelectedCommand:t[2]||(t[2]=t=>e.$emit(`selected-command`,t)),onEditLink:a.initLinkDialog,onFocus:t[3]||(t[3]=e=>i.isFocused=!0),onBlur:t[4]||(t[4]=e=>i.isFocused=!1)}),null,16,`modelValue.allow-blockquote.allow-bold.allow-bullet-list.allow-code.allow-codeblock.allow-italic.allow-strike.allow-underline.paste-rich-text.editable.input-aria-label.input-class.output-format.auto-focus.link.placeholder.prevent-typing.mention-suggestion.channel-suggestion.slash-command-suggestion.additional-extensions.hide-link-bubble-menu.onInput.onTextInput.onMarkdownInput.onEnter.onEditLink`.split(`.`))],4)),[[b]]),(0,_.renderSlot)(e.$slots,`middle`),(0,_.createElementVNode)(`section`,D,[(0,_.createElementVNode)(`div`,O,[(0,_.createVNode)(g,{gap:`200`,direction:`row`,class:`d-recipe-message-input__bottom-section-left-stack`},{default:(0,_.withCtx)(()=>[n.showImagePicker?(0,_.withDirectives)(((0,_.openBlock)(),(0,_.createBlock)(u,{key:0,"data-qa":`dt-recipe-message-input-image-btn`,size:`sm`,class:`d-recipe-message-input__button`,kind:`muted`,importance:`clear`,"aria-label":a.imagePickerButtonLabel,onClick:a.onSelectImage,onMouseenter:t[5]||(t[5]=e=>i.imagePickerFocus=!0),onMouseleave:t[6]||(t[6]=e=>i.imagePickerFocus=!1),onFocus:t[7]||(t[7]=e=>i.imagePickerFocus=!0),onBlur:t[8]||(t[8]=e=>i.imagePickerFocus=!1)},{icon:(0,_.withCtx)(()=>[(0,_.createVNode)(l,{size:`300`})]),_:1},8,[`aria-label`,`onClick`])),[[x,a.imagePickerButtonLabel,`top-start`]]):(0,_.createCommentVNode)(``,!0),(0,_.createVNode)(d,{ref:`messageInputImageUpload`,"data-qa":`dt-recipe-message-input-image-input`,accept:`image/*, video/*`,type:`file`,class:`d-recipe-message-input__image-input`,multiple:``,hidden:``,onInput:a.onImageUpload},null,8,[`onInput`]),n.showEmojiPicker?((0,_.openBlock)(),(0,_.createBlock)(h,{key:1,open:i.emojiPickerOpened,"onUpdate:open":t[15]||(t[15]=e=>i.emojiPickerOpened=e),"data-qa":`dt-recipe-message-input-emoji-picker-popover`,"initial-focus-element":`#searchInput`,padding:`none`},{anchor:(0,_.withCtx)(({attrs:e})=>[(0,_.withDirectives)(((0,_.openBlock)(),(0,_.createBlock)(u,(0,_.mergeProps)(e,{"data-qa":`dt-recipe-message-input-emoji-picker-btn`,size:`sm`,class:`d-recipe-message-input__button`,kind:`muted`,importance:`clear`,"aria-label":a.emojiPickerButtonLabel,onClick:a.toggleEmojiPicker,onMouseenter:t[9]||(t[9]=e=>i.emojiPickerFocus=!0),onMouseleave:t[10]||(t[10]=e=>i.emojiPickerFocus=!1),onFocus:t[11]||(t[11]=e=>i.emojiPickerFocus=!0),onBlur:t[12]||(t[12]=e=>i.emojiPickerFocus=!1)}),{icon:(0,_.withCtx)(()=>[a.emojiPickerHovered?((0,_.openBlock)(),(0,_.createBlock)(f,{key:0,size:`300`})):((0,_.openBlock)(),(0,_.createBlock)(p,{key:1,size:`300`}))]),_:1},16,[`aria-label`,`onClick`])),[[x,a.emojiPickerButtonLabel]])]),content:(0,_.withCtx)(({close:r})=>[(0,_.createVNode)(m,(0,_.mergeProps)(n.emojiPickerProps,{onAddEmoji:t[13]||(t[13]=t=>e.$emit(`add-emoji`)),onSkinTone:a.onSkinTone,onSelectedEmoji:e=>a.onSelectEmoji(e,r),onScrollBottomReached:t[14]||(t[14]=t=>e.$emit(`emoji-scroll-bottom-reached`))}),null,16,[`onSkinTone`,`onSelectedEmoji`])]),_:1},8,[`open`])):(0,_.createCommentVNode)(``,!0),(0,_.renderSlot)(e.$slots,`emojiGiphyPicker`),(0,_.renderSlot)(e.$slots,`customActionIcons`),(0,_.renderSlot)(e.$slots,`messagePolish`)]),_:3})]),(0,_.createElementVNode)(`div`,k,[(0,_.createVNode)(g,{direction:`row`,gap:`300`},{default:(0,_.withCtx)(()=>[(0,_.createElementVNode)(`div`,A,[(0,_.renderSlot)(e.$slots,`scheduleMessage`)]),(0,_.createElementVNode)(`div`,j,[(0,_.renderSlot)(e.$slots,`smsCount`)]),n.showCharacterLimit?((0,_.openBlock)(),(0,_.createBlock)(v,{key:0,class:`d-recipe-message-input__remaining-char-tooltip`,placement:`top-end`,enabled:a.characterLimitTooltipEnabled,message:n.showCharacterLimit.message,offset:[10,8]},{anchor:(0,_.withCtx)(()=>[(0,_.withDirectives)((0,_.createElementVNode)(`p`,{class:`d-recipe-message-input__remaining-char`,"data-qa":`dt-recipe-message-input-character-limit`},(0,_.toDisplayString)(n.showCharacterLimit.count-a.inputLength),513),[[_.vShow,a.displayCharacterLimitWarning]])]),_:1},8,[`enabled`,`message`])):(0,_.createCommentVNode)(``,!0),n.showCancel?(0,_.withDirectives)(((0,_.openBlock)(),(0,_.createBlock)(u,{key:1,"data-qa":`dt-recipe-message-input-cancel-button`,class:`d-recipe-message-input__button d-recipe-message-input__cancel-button`,size:`sm`,kind:`muted`,importance:`clear`,"aria-label":a.cancelButtonLabel,onClick:a.onCancel},{default:(0,_.withCtx)(()=>[(0,_.createElementVNode)(`p`,null,(0,_.toDisplayString)(a.cancelButtonLabel),1)]),_:1},8,[`aria-label`,`onClick`])),[[x,a.cancelButtonLabel]]):(0,_.createCommentVNode)(``,!0),(0,_.renderSlot)(e.$slots,`sendButton`,{},()=>[n.showSend?(0,_.withDirectives)(((0,_.openBlock)(),(0,_.createBlock)(u,{key:0,"data-qa":`dt-recipe-message-input-send-btn`,size:`sm`,kind:`default`,importance:`primary`,class:(0,_.normalizeClass)([`d-recipe-message-input__button d-recipe-message-input__send-button`,{"d-recipe-message-input__send-button--disabled":a.isSendDisabled,"d-btn--icon-only":a.showSendIcon}]),"aria-label":a.sendButtonLabel,"aria-disabled":a.isSendDisabled,onClick:a.onSend},(0,_.createSlots)({default:(0,_.withCtx)(()=>[n.showSend.text?((0,_.openBlock)(),(0,_.createElementBlock)(`p`,M,(0,_.toDisplayString)(n.showSend.text),1)):(0,_.createCommentVNode)(``,!0)]),_:2},[a.showSendIcon?{name:`icon`,fn:(0,_.withCtx)(()=>[(0,_.renderSlot)(e.$slots,`sendIcon`,{iconSize:a.sendIconSize},()=>[(0,_.createVNode)(y,{size:a.sendIconSize},null,8,[`size`])])]),key:`0`}:void 0]),1032,[`class`,`aria-label`,`aria-disabled`,`onClick`])),[[x,a.sendButtonLabel,`top-end`]]):(0,_.createCommentVNode)(``,!0)])]),_:3})])])],16)}var P=t.t(E,[[`render`,N]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return P}});
|
|
2
|
-
//# sourceMappingURL=message_input-
|
|
1
|
+
require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./common/utils/index.cjs`),t=require(`./_plugin-vue_export-helper-D8jCH6HB.cjs`),n=require(`./localization/index.cjs`),r=require(`./lib/button/button.cjs`),i=require(`./lib/item-layout/item-layout.cjs`),a=require(`./lib/stack/stack.cjs`),o=require(`./lib/tooltip/tooltip.cjs`),s=require(`./lib/popover/popover.cjs`),c=require(`./lib/input/input.cjs`),l=require(`./emoji_picker-Cl-T4BXK.cjs`),u=require(`./node_modules/@tiptap/vue-3.cjs`),d=require(`./rich_text_editor-wvONcbYd.cjs`),f=require(`./lib/rich-text-editor/rich-text-editor-constants.cjs`),p=require(`./lib/editor/editor-constants.cjs`),m=require(`./lib/message-input/last-active-nodes.cjs`),h=require(`./lib/message-input/message-input-topbar.cjs`),g=require(`./lib/message-input/message-input-link.cjs`);let _=require(`vue`),v=require(`@dialpad/dialtone-icons/vue3`),y=require(`@tiptap/core`);var b={name:`MeetingPill`,components:{NodeViewWrapper:u.NodeViewWrapper,DtItemLayout:i.default,DtIconClose:v.DtIconClose,DtButton:r.default,DtIconVideo:v.DtIconVideo},props:u.nodeViewProps,emits:[`meeting-pill-close`],data(){return{i18n:new n.DialtoneLocalization}},computed:{closeButtonTitle(){return this.i18n.$t(`DIALTONE_CLOSE_BUTTON`)}},methods:{close(e){let t=this.editor?.storage?.meetingPill?.onClose;t&&typeof t==`function`&&t(e)}}},x={class:`d-recipe-message-input-meeting-pill__icon`},S={class:`d-recipe-message-input-meeting-pill__close`};function C(e,t,n,r,i,a){let o=(0,_.resolveComponent)(`dt-icon-video`),s=(0,_.resolveComponent)(`dt-icon-close`),c=(0,_.resolveComponent)(`dt-button`),l=(0,_.resolveComponent)(`dt-item-layout`),u=(0,_.resolveComponent)(`node-view-wrapper`);return(0,_.openBlock)(),(0,_.createBlock)(u,{class:`d-recipe-message-input-meeting-pill`},{default:(0,_.withCtx)(()=>[(0,_.createVNode)(l,{class:`d-recipe-message-input-meeting-pill__layout`,unstyled:``},{left:(0,_.withCtx)(()=>[(0,_.createElementVNode)(`div`,x,[(0,_.createVNode)(o,{size:`400`})])]),right:(0,_.withCtx)(()=>[(0,_.createElementVNode)(`div`,S,[(0,_.createVNode)(c,{circle:``,importance:`clear`,size:`xs`,"aria-label":a.closeButtonTitle,title:a.closeButtonTitle,onClick:a.close},{icon:(0,_.withCtx)(()=>[(0,_.createVNode)(s,{size:`300`})]),_:1},8,[`aria-label`,`title`,`onClick`])])]),default:(0,_.withCtx)(()=>[(0,_.createTextVNode)(` `+(0,_.toDisplayString)(e.node.attrs.text)+` `,1)]),_:1})]),_:1})}var w=t.t(b,[[`render`,C]]),T=y.Node.create({name:`meetingPill`,atom:!0,group:`inline`,inline:!0,addOptions(){return{onClose:()=>{}}},addStorage(){return{onClose:this.options.onClose}},addNodeView(){return u.VueNodeViewRenderer(w)},addAttributes(){return{text:{default:`Please pass in "text" attribute`}}},parseHTML(){return[{tag:`meeting-pill`}]},renderText(){return`/dpm`},renderHTML({HTMLAttributes:e}){return[`meeting-pill`,(0,y.mergeAttributes)(e)]}}),E={compatConfig:{MODE:3},name:`DtRecipeMessageInput`,components:{DtButton:r.default,DtEmojiPicker:l.t,DtInput:c.default,DtPopover:s.default,DtRecipeMessageInputTopbar:h.default,DtRecipeMessageInputLink:g.default,DtRichTextEditor:d.t,DtTooltip:o.default,DtStack:a.default,DtIconImage:v.DtIconImage,DtIconVerySatisfied:v.DtIconVerySatisfied,DtIconSatisfied:v.DtIconSatisfied,DtIconSend:v.DtIconSend},inheritAttrs:!1,props:{richText:{type:Boolean,default:!0},modelValue:{type:[Object,String],default:``},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0,default:``},preventTyping:{type:Boolean,default:!1},inputClass:{type:String,default:``},autoFocus:{type:[Boolean,String,Number],default:!1,validator(e){return typeof e==`string`?f.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(e):!0}},outputFormat:{type:String,default:`json`,validator(e){return f.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(e)}},placeholder:{type:String,default:``},disableSend:{type:Boolean,default:!1},maxHeight:{type:String,default:`unset`},showEmojiPicker:{type:Boolean,default:!0},emojiPickerProps:{type:Object,default:()=>({})},showCharacterLimit:{type:[Boolean,Object],default:()=>({count:1500,warning:500,message:``})},showImagePicker:{type:[Boolean,Object],default:()=>({})},showSend:{type:[Boolean,Object],default:()=>({})},showCancel:{type:[Boolean,Object],default:()=>({})},mentionSuggestion:{type:Object,default:null},channelSuggestion:{type:Object,default:null},slashCommandSuggestion:{type:Object,default:null},boldButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + B`})},italicButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + I`})},strikeButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + Shift + S`})},linkButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + K`,linkPlaceholder:`e.g. https://www.dialpad.com`})},bulletListButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + Shift + 8`})},orderedListButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + Shift + 7`})},blockQuoteButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + Shift + B`})},codeButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + E`})},codeBlockButtonOptions:{type:Object,default:()=>({keyboardShortcutText:`Mod + Alt + C`})}},emits:[`submit`,`select-media`,`add-media`,`paste-media`,`cancel`,`skin-tone`,`selected-emoji`,`selected-command`,`meeting-pill-close`,`update:modelValue`,`text-input`,`markdown-input`,`add-emoji`,`emoji-scroll-bottom-reached`],data(){return{lastActiveNodes:m.default,additionalExtensions:[T.configure({onClose:e=>{this.$emit(`meeting-pill-close`,e)}})],internalInputValue:this.modelValue,imagePickerFocus:!1,emojiPickerFocus:!1,emojiPickerOpened:!1,isFocused:!1,linkOptions:{class:`d-link d-c-text d-d-inline-block`},linkDialogOpen:!1,selectedText:``,text:``,hideLinkBubbleMenu:!1,i18n:new n.DialtoneLocalization}},computed:{showSendIcon(){return!this.showSend.text},inputLength(){return this.text.length},displayCharacterLimitWarning(){return!!this.showCharacterLimit&&this.showCharacterLimit.count-this.inputLength<=this.showCharacterLimit.warning},characterLimitTooltipEnabled(){return this.showCharacterLimit.message&&this.showCharacterLimit.count-this.inputLength<0},isSelectionActive(){return this.selectedText,e=>[`bulletList`,`orderedList`].includes(e)?this.richText?this.lastActiveNodes(this.$refs.richTextEditor?.editor?.state,[{type:`bulletList`},{type:`orderedList`}]).includes(e)&&this.isFocused:!1:this.$refs.richTextEditor?.editor?.isActive(e)&&this.isFocused},isSendDisabled(){return this.disableSend||this.showCharacterLimit&&this.inputLength>this.showCharacterLimit.count},emojiPickerHovered(){return this.emojiPickerFocus||this.emojiPickerOpened},sendIconSize(){return`300`},sendButtonLabel(){return this.i18n.$t(`DIALTONE_MESSAGE_INPUT_SEND_BUTTON_ARIA_LABEL`)},imagePickerButtonLabel(){return this.i18n.$t(`DIALTONE_MESSAGE_INPUT_IMAGE_PICKER_BUTTON_ARIA_LABEL`)},emojiPickerButtonLabel(){return this.i18n.$t(`DIALTONE_MESSAGE_INPUT_EMOJI_PICKER_BUTTON_ARIA_LABEL`)},cancelButtonLabel(){return this.i18n.$t(`DIALTONE_MESSAGE_INPUT_CANCEL_BUTTON_ARIA_LABEL`)}},watch:{modelValue(e){this.internalInputValue=e},emojiPickerOpened(e){e||this.$refs.richTextEditor?.focusEditor()}},created(){this.modelValue&&this.outputFormat===`text`?this.internalInputValue=this.modelValue.replace(/\n/g,`<br>`):this.internalInputValue=this.modelValue},methods:{removeClassStyleAttrs:e.removeClassStyleAttrs,addClassStyleAttrs:e.addClassStyleAttrs,linkDialogOpened(e){this.linkDialogOpen=e,e===!0?this.initLinkDialog():(this.hideLinkBubbleMenu=!1,this.$refs.richTextEditor?.focusEditor())},handleTopbarClick(e){let t=this.$refs.richTextEditor?.editor,n={bold:()=>t?.chain().focus().toggleBold().run(),italic:()=>t?.chain().focus().toggleItalic().run(),strike:()=>t?.chain().focus().toggleStrike().run(),bulletList:()=>t?.chain().focus().toggleBulletList().run(),orderedList:()=>t?.chain().focus().toggleOrderedList().run(),blockquote:()=>t?.chain().focus().toggleBlockquote().run(),code:()=>t?.chain().focus().toggleCode().run(),codeBlock:()=>t?.chain().focus().toggleCodeBlock().run()};t&&n[e]&&n[e]()},initLinkDialog(){this.$refs.link.setInitialValues(this.selectedText,this.$refs.richTextEditor?.editor?.getAttributes(`link`)?.href),this.hideLinkBubbleMenu=!0,this.linkDialogOpen=!0},removeLink(){this.$refs.richTextEditor?.removeLink(),this.linkDialogOpen=!1},setLink(e,t){this.$refs.richTextEditor.setLink(t,e,this.linkOptions,p.EDITOR_SUPPORTED_LINK_PROTOCOLS,p.EDITOR_DEFAULT_LINK_PREFIX),this.linkDialogOpen=!1},onMousedown(t){e.returnFirstEl(this.$refs.richTextEditor.$el).querySelector(`.tiptap`).contains(t.target)||(t.preventDefault(),this.$refs.richTextEditor.focusEditor())},onDrop(e){let t=e.dataTransfer,n=Array.from(t.files);this.$emit(`add-media`,n)},onPaste(e){if(e.clipboardData.files.length){e.stopPropagation(),e.preventDefault();let t=[...e.clipboardData.files];this.$emit(`paste-media`,t)}},onSkinTone(e){this.$emit(`skin-tone`,e)},onSelectEmoji(e,t){e&&(e.shift_key||t(),this.$refs.richTextEditor.editor.commands.insertContent({type:`emoji`,attrs:{code:e.shortname,image:e.image,name:e.name}}),this.$emit(`selected-emoji`,e))},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`)},onInput(e){this.$emit(`update:modelValue`,e)},onTextInput(e){this.text=e,this.$emit(`text-input`,e)},onMarkdownInput(e){this.$emit(`markdown-input`,e)}}},D={class:`d-recipe-message-input__bottom-section`},O={class:`d-recipe-message-input__bottom-section-left`},k={class:`d-recipe-message-input__bottom-section-right`},A={class:`d-recipe-message-input__schedule-message`},j={class:`d-recipe-message-input__sms-count`},M={key:0};function N(e,t,n,r,i,a){let o=(0,_.resolveComponent)(`dt-recipe-message-input-link`),s=(0,_.resolveComponent)(`dt-recipe-message-input-topbar`),c=(0,_.resolveComponent)(`dt-rich-text-editor`),l=(0,_.resolveComponent)(`dt-icon-image`),u=(0,_.resolveComponent)(`dt-button`),d=(0,_.resolveComponent)(`dt-input`),f=(0,_.resolveComponent)(`dt-icon-very-satisfied`),p=(0,_.resolveComponent)(`dt-icon-satisfied`),m=(0,_.resolveComponent)(`dt-emoji-picker`),h=(0,_.resolveComponent)(`dt-popover`),g=(0,_.resolveComponent)(`dt-stack`),v=(0,_.resolveComponent)(`dt-tooltip`),y=(0,_.resolveComponent)(`dt-icon-send`),b=(0,_.resolveDirective)(`dt-scrollbar`),x=(0,_.resolveDirective)(`dt-tooltip`);return(0,_.openBlock)(),(0,_.createElementBlock)(`div`,(0,_.mergeProps)({"data-qa":`dt-recipe-message-input`,role:`presentation`,class:`d-recipe-message-input`},a.addClassStyleAttrs(e.$attrs),{onDragover:t[16]||(t[16]=(0,_.withModifiers)(()=>{},[`prevent`])),onDrop:t[17]||(t[17]=(0,_.withModifiers)((...e)=>a.onDrop&&a.onDrop(...e),[`prevent`])),onPaste:t[18]||(t[18]=(...e)=>a.onPaste&&a.onPaste(...e)),onMousedown:t[19]||(t[19]=(...e)=>a.onMousedown&&a.onMousedown(...e))}),[(0,_.renderSlot)(e.$slots,`top`),n.richText?((0,_.openBlock)(),(0,_.createBlock)(s,{key:0,"bold-button-options":n.boldButtonOptions,"italic-button-options":n.italicButtonOptions,"strike-button-options":n.strikeButtonOptions,"bullet-list-button-options":n.bulletListButtonOptions,"ordered-list-button-options":n.orderedListButtonOptions,"block-quote-button-options":n.blockQuoteButtonOptions,"code-button-options":n.codeButtonOptions,"code-block-button-options":n.codeBlockButtonOptions,"is-selection-active":a.isSelectionActive,onClick:a.handleTopbarClick},{link:(0,_.withCtx)(()=>[(0,_.createVNode)(o,{ref:`link`,open:i.linkDialogOpen,"link-button-options":n.linkButtonOptions,"is-selection-active":a.isSelectionActive,onOpened:a.linkDialogOpened,onSetLink:a.setLink,onRemoveLink:a.removeLink},null,8,[`open`,`link-button-options`,`is-selection-active`,`onOpened`,`onSetLink`,`onRemoveLink`])]),_:1},8,[`bold-button-options`,`italic-button-options`,`strike-button-options`,`bullet-list-button-options`,`ordered-list-button-options`,`block-quote-button-options`,`code-button-options`,`code-block-button-options`,`is-selection-active`,`onClick`])):(0,_.createCommentVNode)(``,!0),(0,_.withDirectives)(((0,_.openBlock)(),(0,_.createElementBlock)(`div`,{class:`d-recipe-message-input__editor-wrapper`,style:(0,_.normalizeStyle)({"max-height":n.maxHeight})},[(0,_.createVNode)(c,(0,_.mergeProps)({ref:`richTextEditor`,modelValue:i.internalInputValue,"onUpdate:modelValue":t[0]||(t[0]=e=>i.internalInputValue=e),"allow-blockquote":n.richText,"allow-bold":n.richText,"allow-bullet-list":n.richText,"allow-code":n.richText,"allow-codeblock":n.richText,"allow-italic":n.richText,"allow-strike":n.richText,"allow-underline":n.richText,"paste-rich-text":n.richText,editable:n.editable,"input-aria-label":n.inputAriaLabel,"input-class":n.inputClass,"output-format":n.outputFormat,"auto-focus":n.autoFocus,link:n.richText,placeholder:n.placeholder,"prevent-typing":n.preventTyping,"mention-suggestion":n.mentionSuggestion,"channel-suggestion":n.channelSuggestion,"slash-command-suggestion":n.slashCommandSuggestion,"additional-extensions":i.additionalExtensions,"hide-link-bubble-menu":i.hideLinkBubbleMenu},a.removeClassStyleAttrs(e.$attrs),{onInput:a.onInput,onTextInput:a.onTextInput,onMarkdownInput:a.onMarkdownInput,onEnter:a.onSend,onSelected:t[1]||(t[1]=e=>i.selectedText=e),onSelectedCommand:t[2]||(t[2]=t=>e.$emit(`selected-command`,t)),onEditLink:a.initLinkDialog,onFocus:t[3]||(t[3]=e=>i.isFocused=!0),onBlur:t[4]||(t[4]=e=>i.isFocused=!1)}),null,16,`modelValue.allow-blockquote.allow-bold.allow-bullet-list.allow-code.allow-codeblock.allow-italic.allow-strike.allow-underline.paste-rich-text.editable.input-aria-label.input-class.output-format.auto-focus.link.placeholder.prevent-typing.mention-suggestion.channel-suggestion.slash-command-suggestion.additional-extensions.hide-link-bubble-menu.onInput.onTextInput.onMarkdownInput.onEnter.onEditLink`.split(`.`))],4)),[[b]]),(0,_.renderSlot)(e.$slots,`middle`),(0,_.createElementVNode)(`section`,D,[(0,_.createElementVNode)(`div`,O,[(0,_.createVNode)(g,{gap:`200`,direction:`row`,class:`d-recipe-message-input__bottom-section-left-stack`},{default:(0,_.withCtx)(()=>[n.showImagePicker?(0,_.withDirectives)(((0,_.openBlock)(),(0,_.createBlock)(u,{key:0,"data-qa":`dt-recipe-message-input-image-btn`,size:`sm`,class:`d-recipe-message-input__button`,kind:`muted`,importance:`clear`,"aria-label":a.imagePickerButtonLabel,onClick:a.onSelectImage,onMouseenter:t[5]||(t[5]=e=>i.imagePickerFocus=!0),onMouseleave:t[6]||(t[6]=e=>i.imagePickerFocus=!1),onFocus:t[7]||(t[7]=e=>i.imagePickerFocus=!0),onBlur:t[8]||(t[8]=e=>i.imagePickerFocus=!1)},{icon:(0,_.withCtx)(()=>[(0,_.createVNode)(l,{size:`300`})]),_:1},8,[`aria-label`,`onClick`])),[[x,a.imagePickerButtonLabel,`top-start`]]):(0,_.createCommentVNode)(``,!0),(0,_.createVNode)(d,{ref:`messageInputImageUpload`,"data-qa":`dt-recipe-message-input-image-input`,accept:`image/*, video/*`,type:`file`,class:`d-recipe-message-input__image-input`,multiple:``,hidden:``,onInput:a.onImageUpload},null,8,[`onInput`]),n.showEmojiPicker?((0,_.openBlock)(),(0,_.createBlock)(h,{key:1,open:i.emojiPickerOpened,"onUpdate:open":t[15]||(t[15]=e=>i.emojiPickerOpened=e),"data-qa":`dt-recipe-message-input-emoji-picker-popover`,"initial-focus-element":`#searchInput`,padding:`none`},{anchor:(0,_.withCtx)(({attrs:e})=>[(0,_.withDirectives)(((0,_.openBlock)(),(0,_.createBlock)(u,(0,_.mergeProps)(e,{"data-qa":`dt-recipe-message-input-emoji-picker-btn`,size:`sm`,class:`d-recipe-message-input__button`,kind:`muted`,importance:`clear`,"aria-label":a.emojiPickerButtonLabel,onClick:a.toggleEmojiPicker,onMouseenter:t[9]||(t[9]=e=>i.emojiPickerFocus=!0),onMouseleave:t[10]||(t[10]=e=>i.emojiPickerFocus=!1),onFocus:t[11]||(t[11]=e=>i.emojiPickerFocus=!0),onBlur:t[12]||(t[12]=e=>i.emojiPickerFocus=!1)}),{icon:(0,_.withCtx)(()=>[a.emojiPickerHovered?((0,_.openBlock)(),(0,_.createBlock)(f,{key:0,size:`300`})):((0,_.openBlock)(),(0,_.createBlock)(p,{key:1,size:`300`}))]),_:1},16,[`aria-label`,`onClick`])),[[x,a.emojiPickerButtonLabel]])]),content:(0,_.withCtx)(({close:r})=>[(0,_.createVNode)(m,(0,_.mergeProps)(n.emojiPickerProps,{onAddEmoji:t[13]||(t[13]=t=>e.$emit(`add-emoji`)),onSkinTone:a.onSkinTone,onSelectedEmoji:e=>a.onSelectEmoji(e,r),onScrollBottomReached:t[14]||(t[14]=t=>e.$emit(`emoji-scroll-bottom-reached`))}),null,16,[`onSkinTone`,`onSelectedEmoji`])]),_:1},8,[`open`])):(0,_.createCommentVNode)(``,!0),(0,_.renderSlot)(e.$slots,`emojiGiphyPicker`),(0,_.renderSlot)(e.$slots,`customActionIcons`),(0,_.renderSlot)(e.$slots,`messagePolish`)]),_:3})]),(0,_.createElementVNode)(`div`,k,[(0,_.createVNode)(g,{direction:`row`,gap:`300`},{default:(0,_.withCtx)(()=>[(0,_.createElementVNode)(`div`,A,[(0,_.renderSlot)(e.$slots,`scheduleMessage`)]),(0,_.createElementVNode)(`div`,j,[(0,_.renderSlot)(e.$slots,`smsCount`)]),n.showCharacterLimit?((0,_.openBlock)(),(0,_.createBlock)(v,{key:0,class:`d-recipe-message-input__remaining-char-tooltip`,placement:`top-end`,enabled:a.characterLimitTooltipEnabled,message:n.showCharacterLimit.message,offset:[10,8]},{anchor:(0,_.withCtx)(()=>[(0,_.withDirectives)((0,_.createElementVNode)(`p`,{class:`d-recipe-message-input__remaining-char`,"data-qa":`dt-recipe-message-input-character-limit`},(0,_.toDisplayString)(n.showCharacterLimit.count-a.inputLength),513),[[_.vShow,a.displayCharacterLimitWarning]])]),_:1},8,[`enabled`,`message`])):(0,_.createCommentVNode)(``,!0),n.showCancel?(0,_.withDirectives)(((0,_.openBlock)(),(0,_.createBlock)(u,{key:1,"data-qa":`dt-recipe-message-input-cancel-button`,class:`d-recipe-message-input__button d-recipe-message-input__cancel-button`,size:`sm`,kind:`muted`,importance:`clear`,"aria-label":a.cancelButtonLabel,onClick:a.onCancel},{default:(0,_.withCtx)(()=>[(0,_.createElementVNode)(`p`,null,(0,_.toDisplayString)(a.cancelButtonLabel),1)]),_:1},8,[`aria-label`,`onClick`])),[[x,a.cancelButtonLabel]]):(0,_.createCommentVNode)(``,!0),(0,_.renderSlot)(e.$slots,`sendButton`,{},()=>[n.showSend?(0,_.withDirectives)(((0,_.openBlock)(),(0,_.createBlock)(u,{key:0,"data-qa":`dt-recipe-message-input-send-btn`,size:`sm`,kind:`default`,importance:`primary`,class:(0,_.normalizeClass)([`d-recipe-message-input__button d-recipe-message-input__send-button`,{"d-recipe-message-input__send-button--disabled":a.isSendDisabled,"d-btn--icon-only":a.showSendIcon}]),"aria-label":a.sendButtonLabel,"aria-disabled":a.isSendDisabled,onClick:a.onSend},(0,_.createSlots)({default:(0,_.withCtx)(()=>[n.showSend.text?((0,_.openBlock)(),(0,_.createElementBlock)(`p`,M,(0,_.toDisplayString)(n.showSend.text),1)):(0,_.createCommentVNode)(``,!0)]),_:2},[a.showSendIcon?{name:`icon`,fn:(0,_.withCtx)(()=>[(0,_.renderSlot)(e.$slots,`sendIcon`,{iconSize:a.sendIconSize},()=>[(0,_.createVNode)(y,{size:a.sendIconSize},null,8,[`size`])])]),key:`0`}:void 0]),1032,[`class`,`aria-label`,`aria-disabled`,`onClick`])),[[x,a.sendButtonLabel,`top-end`]]):(0,_.createCommentVNode)(``,!0)])]),_:3})])])],16)}var P=t.t(E,[[`render`,N]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return P}});
|
|
2
|
+
//# sourceMappingURL=message_input-DmLi63dh.cjs.map
|