@dialpad/dialtone-vue 2.129.0 → 2.130.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.
Files changed (38) hide show
  1. package/dist/common/utils.cjs +8 -1
  2. package/dist/common/utils.cjs.map +1 -1
  3. package/dist/common/utils.js +8 -1
  4. package/dist/common/utils.js.map +1 -1
  5. package/dist/lib/message-input.cjs +63 -24
  6. package/dist/lib/message-input.cjs.map +1 -1
  7. package/dist/lib/message-input.js +63 -24
  8. package/dist/lib/message-input.js.map +1 -1
  9. package/dist/lib/rich-text-editor.cjs +463 -67
  10. package/dist/lib/rich-text-editor.cjs.map +1 -1
  11. package/dist/lib/rich-text-editor.js +464 -68
  12. package/dist/lib/rich-text-editor.js.map +1 -1
  13. package/dist/lib/tooltip.cjs +5 -4
  14. package/dist/lib/tooltip.cjs.map +1 -1
  15. package/dist/lib/tooltip.js +5 -4
  16. package/dist/lib/tooltip.js.map +1 -1
  17. package/dist/types/common/utils/index.d.ts.map +1 -1
  18. package/dist/types/components/rich_text_editor/extensions/channels/channel.d.ts +2 -1
  19. package/dist/types/components/rich_text_editor/extensions/channels/channel.d.ts.map +1 -1
  20. package/dist/types/components/rich_text_editor/extensions/emoji/emoji.d.ts +1 -0
  21. package/dist/types/components/rich_text_editor/extensions/emoji/emoji.d.ts.map +1 -1
  22. package/dist/types/components/rich_text_editor/extensions/mentions/mention.d.ts +2 -1
  23. package/dist/types/components/rich_text_editor/extensions/mentions/mention.d.ts.map +1 -1
  24. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +47 -0
  25. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts.map +1 -0
  26. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.d.ts +17 -0
  27. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.d.ts.map +1 -0
  28. package/dist/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts +2 -0
  29. package/dist/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts.map +1 -0
  30. package/dist/types/components/rich_text_editor/extensions/slash_command/suggestion.d.ts +12 -0
  31. package/dist/types/components/rich_text_editor/extensions/slash_command/suggestion.d.ts.map +1 -0
  32. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +48 -1
  33. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  34. package/dist/types/components/rich_text_editor/slash_command_suggestion.d.ts +15 -0
  35. package/dist/types/components/rich_text_editor/slash_command_suggestion.d.ts.map +1 -0
  36. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +38 -2
  37. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  38. package/package.json +26 -26
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sources":["../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n @touchstart=\"onTouchStart\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <dt-lazy-show\n :id=\"id\"\n ref=\"content\"\n :show=\"isVisible\"\n role=\"tooltip\"\n aria-hidden=\"false\"\n data-qa=\"dt-tooltip\"\n appear\n :transition=\"transition\"\n :class=\"[\n 'd-tooltip',\n `d-tooltip__arrow-tippy--${currentPlacement}`,\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-on=\"tooltipListeners\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </dt-lazy-show>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { getUniqueString } from '@/common/utils';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n components: {\n DtLazyShow,\n },\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\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 * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\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: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\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 * The direction the popover displays relative to the anchor. See\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: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip 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. See\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 TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\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 * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\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 */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n isShown: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n\n // flag check touch based device\n isTouchDevice: false,\n };\n },\n\n computed: {\n // whether the tooltip is visible or not.\n isVisible () {\n const hasMessage = !!this.message?.trim();\n const hasDefaultSlot = !!this.$slots?.default;\n const isDeviceCompatible = !this.isTouchDevice;\n\n const shouldBeVisible = this.isShown && this.enabled && (hasMessage || hasDefaultSlot);\n\n return shouldBeVisible && isDeviceCompatible;\n },\n\n tooltipListeners () {\n return {\n ...this.$listeners,\n\n 'after-leave': () => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': () => {\n this.onEnterTransitionComplete();\n },\n };\n },\n\n tippyProps () {\n return {\n offset: this.offset,\n interactive: false,\n trigger: 'manual',\n placement: this.placement,\n sticky: this.sticky,\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null) {\n this.isShown = show;\n }\n },\n\n immediate: true,\n },\n\n isShown (isShown) {\n if (isShown) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n this.externalAnchor && this.addExternalAnchorEventListeners();\n this.tip = createTippy(this.anchor, this.initOptions());\n\n // immediate watcher fires before mounted, so have this here in case\n // show prop was initially set to true.\n if (this.isShown) {\n this.tip.show();\n }\n },\n\n beforeDestroy () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.tip) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (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 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n // Note: This is to stop the call of mouseenter event when touchstart event is triggered,\n // as when triggered by click or touch, the relatedTarget property of MouseEvent is null\n if (this.isTouchDevice && !e.relatedTarget) return;\n\n if (this.delay) {\n this.inTimer = setTimeout(function (event) {\n this.triggerShow(event);\n }.bind(this, e), TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n\n // since this method will be trigger by mouse event, updating the flag is non-touch device\n this.isTouchDevice = false;\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.isShown = true;\n }\n } else {\n if (this.show === null) this.isShown = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.isShown = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onLeaveTransitionComplete () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n zIndex: this.calculateAnchorZindex(),\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n initOptions () {\n return {\n contentElement: this.$refs.content.$el,\n allowHTML: true,\n zIndex: this.calculateAnchorZindex(),\n onMount: this.onMount,\n ...this.tippyProps,\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n onTouchStart () {\n this.isTouchDevice = true;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.tippy-box[data-popper-reference-hidden] {\n .d-tooltip {\n visibility: hidden;\n pointer-events: none;\n }\n}\n</style>\n"],"names":[],"mappings":";;;;;;;;AA0EA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAeA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,GAAA,EAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiBA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,WAAA;AACA,eAAA,mBAAA,SAAA,SAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiBA,QAAA;AAAA,MACA,MAAA,CAAA,SAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,WAAA;AACA,eAAA,sBAAA,SAAA,MA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OAAA,oBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA,CAAA;AAAA,MACA,CAAA;AACA,OAAA,YAAA,cAAA,SAAA,EAAA,QAAA,cAAA;AACA,aAAA,OAAA,oBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA,CAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,WAAA,gBAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"tooltip.js","sources":["../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n @touchstart=\"onTouchStart\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <dt-lazy-show\n :id=\"id\"\n ref=\"content\"\n :show=\"isVisible\"\n role=\"tooltip\"\n aria-hidden=\"false\"\n data-qa=\"dt-tooltip\"\n appear\n :transition=\"transition\"\n :class=\"[\n 'd-tooltip',\n `d-tooltip__arrow-tippy--${currentPlacement}`,\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-on=\"tooltipListeners\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </dt-lazy-show>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { getUniqueString } from '@/common/utils';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n components: {\n DtLazyShow,\n },\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\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 * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\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: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\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 * The direction the popover displays relative to the anchor. See\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: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip 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. See\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 TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\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 * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\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 */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n isShown: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n\n // flag check touch based device\n isTouchDevice: false,\n };\n },\n\n computed: {\n // whether the tooltip is visible or not.\n isVisible () {\n const hasMessage = !!this.message?.trim();\n const hasDefaultSlot = !!this.$slots?.default;\n const isDeviceCompatible = !this.isTouchDevice;\n\n const shouldBeVisible = this.isShown && this.enabled && (hasMessage || hasDefaultSlot);\n\n return shouldBeVisible && isDeviceCompatible;\n },\n\n tooltipListeners () {\n return {\n ...this.$listeners,\n\n 'after-leave': () => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': () => {\n this.onEnterTransitionComplete();\n },\n };\n },\n\n tippyProps () {\n return {\n offset: this.offset,\n interactive: false,\n trigger: 'manual',\n placement: this.placement,\n sticky: this.sticky,\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null) {\n this.isShown = show;\n }\n },\n\n immediate: true,\n },\n\n isShown (isShown) {\n if (isShown) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n this.externalAnchor && this.addExternalAnchorEventListeners();\n this.tip = createTippy(this.anchor, this.initOptions());\n\n // immediate watcher fires before mounted, so have this here in case\n // show prop was initially set to true.\n if (this.isShown) {\n this.tip.show();\n }\n },\n\n beforeDestroy () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.tip) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (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 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n // Note: This is to stop the call of mouseenter event when touchstart event is triggered,\n // as when triggered by click or touch, the relatedTarget property of MouseEvent is null\n if (this.isTouchDevice && !e.relatedTarget) return;\n\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n\n // since this method will be trigger by mouse event, updating the flag is non-touch device\n this.isTouchDevice = false;\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.isShown = true;\n }\n } else {\n if (this.show === null) this.isShown = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.isShown = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onLeaveTransitionComplete () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n zIndex: this.calculateAnchorZindex(),\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n initOptions () {\n return {\n contentElement: this.$refs.content.$el,\n allowHTML: true,\n zIndex: this.calculateAnchorZindex(),\n onMount: this.onMount,\n ...this.tippyProps,\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n onTouchStart () {\n this.isTouchDevice = true;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.tippy-box[data-popper-reference-hidden] {\n .d-tooltip {\n visibility: hidden;\n pointer-events: none;\n }\n}\n</style>\n"],"names":[],"mappings":";;;;;;;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AA,MACA,CAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,WAAA,gBAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../common/utils/index.js"],"names":[],"mappings":"AAqBA,yDAEC;AAED;;;;;;GAMG;AACH,mDAJW,MAAM,OAWhB;AAED;;;;;;;;;;;;;;GAcG;AACH,kCAHW,MAAM,GACL,MAAM,CASjB;AAED;;;;GAIG;AACH,kCAHW,MAAM,GACJ,MAAM,CAIlB;AAED,mDAeC;AAED,qEAQC;AAOD,0EAgBC;AAED,yFAMC;AAED,0DAEC;AAsDD,4DAGC;AAED;;;;;GAKG;AAEH,yCAJY,WAAW,GACX,MAAM,CAejB;AAoED;;;;;GAKG;AACH,gDAJW,MAAM,cACN,MAAM,GACJ,MAAM,CAmBlB;AAeD;;;;GAIG;AACH,qCAHW,MAAM,GAAC,MAAM,GACX,OAAO,CAMnB;AAED;;;;GAIG;AACH,6BAHW,MAAM,GACJ,OAAO,CAMnB;AAED;;;;GAIG;AACH,sCAHW,MAAM,GACJ,OAAO,CAKnB;AAED;;;;;GAKG;AACH,2DAEC;AAED;;;;;GAKG;AACH,2CAJW,MAAM,WACN,MAAM,UAKhB;;;;;IAhOC,uCAOC;;AAGI,8CAIN;AAOM,oDAFM,MAAM,CAOlB;AAOM,oDAFM,MAAM,CAMlB;AA+HD,+BAQE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../common/utils/index.js"],"names":[],"mappings":"AAqBA,yDAEC;AAED;;;;;;GAMG;AACH,mDAJW,MAAM,OAWhB;AAED;;;;;;;;;;;;;;GAcG;AACH,kCAHW,MAAM,GACL,MAAM,CASjB;AAED;;;;GAIG;AACH,kCAHW,MAAM,GACJ,MAAM,CAIlB;AAED,mDAeC;AAED,qEAQC;AAOD,0EAgBC;AAED,yFAMC;AAED,0DAEC;AAsDD,4DAGC;AAED;;;;;GAKG;AAEH,yCAJY,WAAW,GACX,MAAM,CAejB;AAoED;;;;;GAKG;AACH,gDAJW,MAAM,cACN,MAAM,GACJ,MAAM,CAuBlB;AAeD;;;;GAIG;AACH,qCAHW,MAAM,GAAC,MAAM,GACX,OAAO,CAMnB;AAED;;;;GAIG;AACH,6BAHW,MAAM,GACJ,OAAO,CAMnB;AAED;;;;GAIG;AACH,sCAHW,MAAM,GACJ,OAAO,CAKnB;AAED;;;;;GAKG;AACH,2DAEC;AAED;;;;;GAKG;AACH,2CAJW,MAAM,WACN,MAAM,UAKhB;;;;;IApOC,uCAOC;;AAGI,8CAIN;AAOM,oDAFM,MAAM,CAOlB;AAOM,oDAFM,MAAM,CAMlB;AAmID,+BAQE"}
@@ -1,2 +1,3 @@
1
- export const ChannelPlugin: import("@tiptap/vue-2").Node<import("@tiptap/extension-mention").MentionOptions, any>;
1
+ export const channelRegex: RegExp;
2
+ export const ChannelPlugin: import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions, any>;
2
3
  //# sourceMappingURL=channel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/channels/channel.js"],"names":[],"mappings":"AAQA,kHA0CG"}
1
+ {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/channels/channel.js"],"names":[],"mappings":"AAQA,kCAAgD;AA6BhD,iHAqEG"}
@@ -1,4 +1,5 @@
1
1
  export const EmojiPluginKey: PluginKey<any>;
2
+ export const emojiShortCodeRegex: RegExp;
2
3
  export const Emoji: Node<any, any>;
3
4
  import { PluginKey } from '@tiptap/pm/state';
4
5
  import { Node } from '@tiptap/core';
@@ -1 +1 @@
1
- {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/emoji.js"],"names":[],"mappings":"AASA,4CAAqD;AAkCrD,mCAiHG;0BAxJuB,kBAAkB;qBAJwB,cAAc"}
1
+ {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/emoji.js"],"names":[],"mappings":"AASA,4CAAqD;AAGrD,yCAA4C;AA+B5C,mCAiHG;0BAxJuB,kBAAkB;qBAJwB,cAAc"}
@@ -1,2 +1,3 @@
1
- export const MentionPlugin: import("@tiptap/vue-2").Node<import("@tiptap/extension-mention").MentionOptions, any>;
1
+ export const mentionRegex: RegExp;
2
+ export const MentionPlugin: import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions, any>;
2
3
  //# sourceMappingURL=mention.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mention.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/mentions/mention.js"],"names":[],"mappings":"AAOA,kHAmCG"}
1
+ {"version":3,"file":"mention.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/mentions/mention.js"],"names":[],"mappings":"AAQA,kCAAkD;AA6BlD,iHAqEG"}
@@ -0,0 +1,47 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ editor: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").RequiredPropOptions<import("@tiptap/core").Editor>;
3
+ node: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").RequiredPropOptions<import(".pnpm/prosemirror-model@1.20.0/node_modules/prosemirror-model").Node>;
4
+ decorations: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").RequiredPropOptions<import("@tiptap/vue-2").DecorationWithType[]>;
5
+ selected: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").RequiredPropOptions<boolean>;
6
+ extension: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").RequiredPropOptions<import("@tiptap/vue-2").Node<any, any>>;
7
+ getPos: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").PropOptions<() => number> & {
8
+ required: true;
9
+ } & {
10
+ default?: (() => () => number) | undefined;
11
+ };
12
+ updateAttributes: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").PropOptions<(attributes: Record<string, any>) => void> & {
13
+ required: true;
14
+ } & {
15
+ default?: (() => (attributes: Record<string, any>) => void) | undefined;
16
+ };
17
+ deleteNode: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").PropOptions<() => void> & {
18
+ required: true;
19
+ } & {
20
+ default?: (() => () => void) | undefined;
21
+ };
22
+ }, {}, {}, {
23
+ text(): string;
24
+ }, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, "selected-command"[], string, Readonly<import("vue").ExtractPropTypes<{
25
+ editor: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").RequiredPropOptions<import("@tiptap/core").Editor>;
26
+ node: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").RequiredPropOptions<import(".pnpm/prosemirror-model@1.20.0/node_modules/prosemirror-model").Node>;
27
+ decorations: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").RequiredPropOptions<import("@tiptap/vue-2").DecorationWithType[]>;
28
+ selected: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").RequiredPropOptions<boolean>;
29
+ extension: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").RequiredPropOptions<import("@tiptap/vue-2").Node<any, any>>;
30
+ getPos: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").PropOptions<() => number> & {
31
+ required: true;
32
+ } & {
33
+ default?: (() => () => number) | undefined;
34
+ };
35
+ updateAttributes: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").PropOptions<(attributes: Record<string, any>) => void> & {
36
+ required: true;
37
+ } & {
38
+ default?: (() => (attributes: Record<string, any>) => void) | undefined;
39
+ };
40
+ deleteNode: import(".pnpm/vue-ts-types@1.6.1_vue@2.7.15/node_modules/vue-ts-types/dist/types").PropOptions<() => void> & {
41
+ required: true;
42
+ } & {
43
+ default?: (() => () => void) | undefined;
44
+ };
45
+ }>>, {}>;
46
+ export default _default;
47
+ //# sourceMappingURL=SlashCommandComponent.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandComponent.vue.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.js"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ item: {
3
+ type: ObjectConstructor;
4
+ required: true;
5
+ };
6
+ }, {}, {}, {
7
+ command(): any;
8
+ description(): any;
9
+ parametersExample(): any;
10
+ }, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
11
+ item: {
12
+ type: ObjectConstructor;
13
+ required: true;
14
+ };
15
+ }>>, {}>;
16
+ export default _default;
17
+ //# sourceMappingURL=SlashCommandSuggestion.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandSuggestion.vue.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export const SlashCommandPlugin: import("@tiptap/vue-2").Node<import("@tiptap/extension-mention").MentionOptions, any>;
2
+ //# sourceMappingURL=slash_command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slash_command.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/slash_command/slash_command.js"],"names":[],"mappings":"AAuBA,uHAuEG"}
@@ -0,0 +1,12 @@
1
+ declare namespace _default {
2
+ let allowSpaces: boolean;
3
+ let startOfLine: boolean;
4
+ function render(): {
5
+ onStart: (props: any) => void;
6
+ onUpdate(props: any): void;
7
+ onKeyDown(props: any): any;
8
+ onExit(): void;
9
+ };
10
+ }
11
+ export default _default;
12
+ //# sourceMappingURL=suggestion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/slash_command/suggestion.js"],"names":[],"mappings":";;;IAeU;;;;;MA0DP"}
@@ -108,6 +108,23 @@ declare const _default: import("vue").DefineComponent<{
108
108
  type: ObjectConstructor;
109
109
  default: null;
110
110
  };
111
+ /**
112
+ * suggestion object containing the items query function.
113
+ * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion
114
+ *
115
+ * The only required key is the items function which is used to query the slash commands for suggestion.
116
+ * items({ query }) => { return [SlashCommandObject]; }
117
+ * SlashCommandObject format:
118
+ * { command: string, description: string, parametersExample?: string }
119
+ * The "parametersExample" parameter is optional, and describes an example
120
+ * of the parameters that command can take.
121
+ *
122
+ * When null, it does not add the plugin.
123
+ */
124
+ slashCommandSuggestion: {
125
+ type: ObjectConstructor;
126
+ default: null;
127
+ };
111
128
  /**
112
129
  * Whether the input allows for block quote.
113
130
  */
@@ -153,6 +170,7 @@ declare const _default: import("vue").DefineComponent<{
153
170
  }, {}, {
154
171
  editor: null;
155
172
  popoverOpened: boolean;
173
+ internalValue: any;
156
174
  }, {
157
175
  extensions(): import("@tiptap/vue-2").Node<any, any>[];
158
176
  inputAttrs(): {
@@ -161,7 +179,18 @@ declare const _default: import("vue").DefineComponent<{
161
179
  role: string;
162
180
  };
163
181
  }, {
182
+ onSelectedCommand(command: any): void;
164
183
  createEditor(): void;
184
+ /**
185
+ * This function is necessary as tiptap doesn't render the content passed
186
+ * directly through `editor.commands.setContent` the content passed down to it
187
+ * should be already parsed. So We're parsing the elements into it's corresponding
188
+ * HTML version before setting it.
189
+ */
190
+ insertContent(): void;
191
+ parseEmojis(): void;
192
+ parseChannels(): void;
193
+ parseMentions(): void;
165
194
  destroyEditor(): void;
166
195
  /**
167
196
  * The Editor exposes event hooks that we have to map our emits into. See
@@ -282,6 +311,23 @@ declare const _default: import("vue").DefineComponent<{
282
311
  type: ObjectConstructor;
283
312
  default: null;
284
313
  };
314
+ /**
315
+ * suggestion object containing the items query function.
316
+ * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion
317
+ *
318
+ * The only required key is the items function which is used to query the slash commands for suggestion.
319
+ * items({ query }) => { return [SlashCommandObject]; }
320
+ * SlashCommandObject format:
321
+ * { command: string, description: string, parametersExample?: string }
322
+ * The "parametersExample" parameter is optional, and describes an example
323
+ * of the parameters that command can take.
324
+ *
325
+ * When null, it does not add the plugin.
326
+ */
327
+ slashCommandSuggestion: {
328
+ type: ObjectConstructor;
329
+ default: null;
330
+ };
285
331
  /**
286
332
  * Whether the input allows for block quote.
287
333
  */
@@ -329,12 +375,13 @@ declare const _default: import("vue").DefineComponent<{
329
375
  value: string | Record<string, any>;
330
376
  inputClass: string;
331
377
  placeholder: string;
378
+ mentionSuggestion: Record<string, any>;
332
379
  channelSuggestion: Record<string, any>;
380
+ slashCommandSuggestion: Record<string, any>;
333
381
  editable: boolean;
334
382
  allowLineBreaks: boolean;
335
383
  autoFocus: string | number | boolean;
336
384
  outputFormat: string;
337
- mentionSuggestion: Record<string, any>;
338
385
  allowBlockquote: boolean;
339
386
  allowBold: boolean;
340
387
  allowBulletList: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"rich_text_editor.vue.d.ts","sourceRoot":"","sources":["../../../../components/rich_text_editor/rich_text_editor.vue.js"],"names":[],"mappings":";IAyCI;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IA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OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAYH;;;;;OAKG;;;;;;IASH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;;;OAYG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;MAEE;;;;;IAMF;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG"}
@@ -0,0 +1,15 @@
1
+ declare namespace _default {
2
+ function items({ query }: {
3
+ query: any;
4
+ }): ({
5
+ command: string;
6
+ description: string;
7
+ parametersExample?: undefined;
8
+ } | {
9
+ command: string;
10
+ parametersExample: string;
11
+ description: string;
12
+ })[];
13
+ }
14
+ export default _default;
15
+ //# sourceMappingURL=slash_command_suggestion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slash_command_suggestion.d.ts","sourceRoot":"","sources":["../../../../components/rich_text_editor/slash_command_suggestion.js"],"names":[],"mappings":";IACE;;;;;;;;;;SAwBC"}
@@ -179,6 +179,23 @@ declare const _default: import("vue").DefineComponent<{
179
179
  type: ObjectConstructor;
180
180
  default: null;
181
181
  };
182
+ /**
183
+ * suggestion object containing the items query function.
184
+ * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion
185
+ *
186
+ * The only required key is the items function which is used to query the slash commands for suggestion.
187
+ * items({ query }) => { return [SlashCommandObject]; }
188
+ * SlashCommandObject format:
189
+ * { command: string, description: string, parametersExample?: string }
190
+ * The "parametersExample" parameter is optional, and describes an example
191
+ * of the parameters that command can take.
192
+ *
193
+ * When null, it does not add the plugin.
194
+ */
195
+ slashCommandSuggestion: {
196
+ type: ObjectConstructor;
197
+ default: null;
198
+ };
182
199
  /**
183
200
  * Whether the input allows for block quote.
184
201
  */
@@ -243,6 +260,7 @@ declare const _default: import("vue").DefineComponent<{
243
260
  onPaste(e: any): void;
244
261
  onSkinTone(skinTone: any): void;
245
262
  onSelectEmoji(emoji: any): void;
263
+ onSelectedCommand(command: any): void;
246
264
  onSelectImage(): void;
247
265
  onImageUpload(): void;
248
266
  toggleEmojiPicker(): void;
@@ -251,7 +269,7 @@ declare const _default: import("vue").DefineComponent<{
251
269
  onFocus(event: any): void;
252
270
  onBlur(event: any): void;
253
271
  onInput(event: any): void;
254
- }, never, import("vue/types/v3-component-options.js").ComponentOptionsMixin, ("input" | "focus" | "submit" | "blur" | "cancel" | "selected-emoji" | "skin-tone" | "select-media" | "add-media" | "paste-media")[], string, Readonly<import("vue").ExtractPropTypes<{
272
+ }, never, import("vue/types/v3-component-options.js").ComponentOptionsMixin, ("input" | "focus" | "submit" | "blur" | "cancel" | "selected-emoji" | "skin-tone" | "selected-command" | "update:value" | "select-media" | "add-media" | "paste-media")[], string, Readonly<import("vue").ExtractPropTypes<{
255
273
  /**
256
274
  * Value of the input. The object format should match TipTap's JSON
257
275
  * document structure: https://tiptap.dev/guide/output#option-1-json
@@ -432,6 +450,23 @@ declare const _default: import("vue").DefineComponent<{
432
450
  type: ObjectConstructor;
433
451
  default: null;
434
452
  };
453
+ /**
454
+ * suggestion object containing the items query function.
455
+ * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion
456
+ *
457
+ * The only required key is the items function which is used to query the slash commands for suggestion.
458
+ * items({ query }) => { return [SlashCommandObject]; }
459
+ * SlashCommandObject format:
460
+ * { command: string, description: string, parametersExample?: string }
461
+ * The "parametersExample" parameter is optional, and describes an example
462
+ * of the parameters that command can take.
463
+ *
464
+ * When null, it does not add the plugin.
465
+ */
466
+ slashCommandSuggestion: {
467
+ type: ObjectConstructor;
468
+ default: null;
469
+ };
435
470
  /**
436
471
  * Whether the input allows for block quote.
437
472
  */
@@ -480,12 +515,13 @@ declare const _default: import("vue").DefineComponent<{
480
515
  maxHeight: string;
481
516
  inputClass: string;
482
517
  placeholder: string;
518
+ mentionSuggestion: Record<string, any>;
483
519
  channelSuggestion: Record<string, any>;
520
+ slashCommandSuggestion: Record<string, any>;
484
521
  editable: boolean;
485
522
  inputAriaLabel: string;
486
523
  autoFocus: string | number | boolean;
487
524
  outputFormat: string;
488
- mentionSuggestion: Record<string, any>;
489
525
  allowBlockquote: boolean;
490
526
  allowBold: boolean;
491
527
  allowBulletList: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"message_input.vue.d.ts","sourceRoot":"","sources":["../../../../../recipes/conversation_view/message_input/message_input.vue.js"],"names":[],"mappings":";IAiCI;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;IAOH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAYH;;;;;OAKG;;;;;;IASH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;;;;;IAYH;;OAEG;;;;;;IAeH;;OAEG;;;;;IAOH;;OAEG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;IAWH;;OAEG;;;;;;;IAMH;;OAEG;;;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;MAEE;;;;;IAMF;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAxPH;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;IAOH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAYH;;;;;OAKG;;;;;;IASH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;;;;;IAYH;;OAEG;;;;;;IAeH;;OAEG;;;;;IAOH;;OAEG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;IAWH;;OAEG;;;;;;;IAMH;;OAEG;;;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;OA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IAMH;;MAEE;;;;;IAMF;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG"}
package/package.json CHANGED
@@ -1,39 +1,39 @@
1
1
  {
2
2
  "name": "@dialpad/dialtone-vue",
3
- "version": "2.129.0",
3
+ "version": "2.130.2",
4
4
  "description": "Vue component library for Dialpad's design system Dialtone",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
8
8
  "dependencies": {
9
9
  "@linusborg/vue-simple-portal": "0.1.5",
10
- "@tiptap/core": "2.2.6",
11
- "@tiptap/extension-blockquote": "2.2.6",
12
- "@tiptap/extension-bold": "2.2.6",
13
- "@tiptap/extension-bullet-list": "2.2.6",
14
- "@tiptap/extension-code-block": "2.2.6",
15
- "@tiptap/extension-document": "2.2.6",
16
- "@tiptap/extension-hard-break": "2.2.6",
17
- "@tiptap/extension-italic": "2.2.6",
18
- "@tiptap/extension-link": "2.2.6",
19
- "@tiptap/extension-list-item": "2.2.6",
20
- "@tiptap/extension-mention": "2.2.6",
21
- "@tiptap/extension-ordered-list": "2.2.6",
22
- "@tiptap/extension-paragraph": "2.1.16",
23
- "@tiptap/extension-placeholder": "2.2.6",
24
- "@tiptap/extension-strike": "2.2.6",
25
- "@tiptap/extension-text": "2.2.6",
26
- "@tiptap/extension-text-align": "2.2.6",
27
- "@tiptap/extension-underline": "2.2.6",
28
- "@tiptap/pm": "2.2.6",
29
- "@tiptap/suggestion": "2.2.6",
30
- "@tiptap/vue-2": "2.2.6",
10
+ "@tiptap/core": "2.3.0",
11
+ "@tiptap/extension-blockquote": "2.3.0",
12
+ "@tiptap/extension-bold": "2.3.0",
13
+ "@tiptap/extension-bullet-list": "2.3.0",
14
+ "@tiptap/extension-code-block": "2.3.0",
15
+ "@tiptap/extension-document": "2.3.0",
16
+ "@tiptap/extension-hard-break": "2.3.0",
17
+ "@tiptap/extension-italic": "2.3.0",
18
+ "@tiptap/extension-link": "2.3.0",
19
+ "@tiptap/extension-list-item": "2.3.0",
20
+ "@tiptap/extension-mention": "2.3.0",
21
+ "@tiptap/extension-ordered-list": "2.3.0",
22
+ "@tiptap/extension-paragraph": "2.3.0",
23
+ "@tiptap/extension-placeholder": "2.3.0",
24
+ "@tiptap/extension-strike": "2.3.0",
25
+ "@tiptap/extension-text": "2.3.0",
26
+ "@tiptap/extension-text-align": "2.3.0",
27
+ "@tiptap/extension-underline": "2.3.0",
28
+ "@tiptap/pm": "2.3.0",
29
+ "@tiptap/suggestion": "2.3.0",
30
+ "@tiptap/vue-2": "2.3.0",
31
31
  "date-fns": "2.30.0",
32
32
  "emoji-regex": "10.3.0",
33
33
  "emoji-toolkit": "8.0.0",
34
34
  "tippy.js": "6.3.7",
35
- "@dialpad/dialtone-emojis": "1.0.2",
36
- "@dialpad/dialtone-icons": "4.14.0"
35
+ "@dialpad/dialtone-emojis": "1.0.4",
36
+ "@dialpad/dialtone-icons": "4.15.1-alpha.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@percy/cli": "1.28.2",
@@ -81,8 +81,8 @@
81
81
  "vue-tsc": "^1.8.25",
82
82
  "yo": "^5.0.0",
83
83
  "yorkie": "^2.0.0",
84
- "@dialpad/dialtone-css": "8.31.0",
85
- "@dialpad/generator-dialtone": "0.1.0"
84
+ "@dialpad/generator-dialtone": "0.1.0",
85
+ "@dialpad/dialtone-css": "8.31.0"
86
86
  },
87
87
  "peerDependencies": {
88
88
  "vue": ">=2.6",