@dialpad/dialtone 9.84.2 → 9.86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/dist/css/dialtone-default-theme.css +280 -34
  2. package/dist/css/dialtone-default-theme.min.css +1 -1
  3. package/dist/css/dialtone.css +280 -34
  4. package/dist/css/dialtone.min.css +1 -1
  5. package/dist/css/tokens/tokens-dp-dark.css +7 -7
  6. package/dist/css/tokens/tokens-expressive-dark.css +7 -7
  7. package/dist/css/tokens/tokens-expressive-sm-dark.css +7 -7
  8. package/dist/css/tokens/tokens-tmo-dark.css +7 -7
  9. package/dist/tokens/css/tokens-dp-dark.css +7 -7
  10. package/dist/tokens/css/tokens-expressive-dark.css +7 -7
  11. package/dist/tokens/css/tokens-expressive-sm-dark.css +7 -7
  12. package/dist/tokens/css/tokens-tmo-dark.css +7 -7
  13. package/dist/tokens/doc.json +16191 -16191
  14. package/dist/tokens/less/tokens-dp-dark.less +1 -1
  15. package/dist/tokens/less/tokens-expressive-dark.less +1 -1
  16. package/dist/tokens/less/tokens-expressive-sm-dark.less +1 -1
  17. package/dist/tokens/less/tokens-tmo-dark.less +1 -1
  18. package/dist/tokens/themes/dp-dark.cjs +1 -1
  19. package/dist/tokens/themes/dp-dark.js +1 -1
  20. package/dist/tokens/themes/expressive-dark.cjs +1 -1
  21. package/dist/tokens/themes/expressive-dark.js +1 -1
  22. package/dist/tokens/themes/expressive-sm-dark.cjs +1 -1
  23. package/dist/tokens/themes/expressive-sm-dark.js +1 -1
  24. package/dist/tokens/themes/tmo-dark.cjs +1 -1
  25. package/dist/tokens/themes/tmo-dark.js +1 -1
  26. package/dist/tokens/tokens-dp-dark.json +1 -1
  27. package/dist/tokens/tokens-expressive-dark.json +1 -1
  28. package/dist/tokens/tokens-expressive-sm-dark.json +1 -1
  29. package/dist/tokens/tokens-tmo-dark.json +1 -1
  30. package/dist/vue2/component-documentation.json +1 -1
  31. package/dist/vue2/components/avatar/avatar.vue.cjs +0 -1
  32. package/dist/vue2/components/avatar/avatar.vue.cjs.map +1 -1
  33. package/dist/vue2/components/avatar/avatar.vue.js +0 -1
  34. package/dist/vue2/components/avatar/avatar.vue.js.map +1 -1
  35. package/dist/vue2/components/collapsible/collapsible_lazy_show.vue.cjs +1 -2
  36. package/dist/vue2/components/collapsible/collapsible_lazy_show.vue.cjs.map +1 -1
  37. package/dist/vue2/components/collapsible/collapsible_lazy_show.vue.js +1 -2
  38. package/dist/vue2/components/collapsible/collapsible_lazy_show.vue.js.map +1 -1
  39. package/dist/vue2/components/combobox/combobox_empty-list.vue.cjs +1 -2
  40. package/dist/vue2/components/combobox/combobox_empty-list.vue.cjs.map +1 -1
  41. package/dist/vue2/components/combobox/combobox_empty-list.vue.js +1 -2
  42. package/dist/vue2/components/combobox/combobox_empty-list.vue.js.map +1 -1
  43. package/dist/vue2/components/description_list/description_list.vue.cjs +5 -6
  44. package/dist/vue2/components/description_list/description_list.vue.cjs.map +1 -1
  45. package/dist/vue2/components/description_list/description_list.vue.js +5 -6
  46. package/dist/vue2/components/description_list/description_list.vue.js.map +1 -1
  47. package/dist/vue2/components/dropdown/dropdown.vue.cjs +0 -1
  48. package/dist/vue2/components/dropdown/dropdown.vue.cjs.map +1 -1
  49. package/dist/vue2/components/dropdown/dropdown.vue.js +0 -1
  50. package/dist/vue2/components/dropdown/dropdown.vue.js.map +1 -1
  51. package/dist/vue2/components/dropdown/dropdown_separator.vue.cjs +1 -2
  52. package/dist/vue2/components/dropdown/dropdown_separator.vue.cjs.map +1 -1
  53. package/dist/vue2/components/dropdown/dropdown_separator.vue.js +1 -2
  54. package/dist/vue2/components/dropdown/dropdown_separator.vue.js.map +1 -1
  55. package/dist/vue2/components/item_layout/item_layout.vue.cjs +1 -1
  56. package/dist/vue2/components/item_layout/item_layout.vue.cjs.map +1 -1
  57. package/dist/vue2/components/item_layout/item_layout.vue.js +1 -1
  58. package/dist/vue2/components/item_layout/item_layout.vue.js.map +1 -1
  59. package/dist/vue2/components/list_item/list_item.vue.cjs +5 -6
  60. package/dist/vue2/components/list_item/list_item.vue.cjs.map +1 -1
  61. package/dist/vue2/components/list_item/list_item.vue.js +5 -6
  62. package/dist/vue2/components/list_item/list_item.vue.js.map +1 -1
  63. package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.cjs +2 -3
  64. package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.cjs.map +1 -1
  65. package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.js +2 -3
  66. package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.js.map +1 -1
  67. package/dist/vue2/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.cjs +4 -5
  68. package/dist/vue2/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.cjs.map +1 -1
  69. package/dist/vue2/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.js +4 -5
  70. package/dist/vue2/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.js.map +1 -1
  71. package/dist/vue2/components/rich_text_editor/rich_text_editor.vue.cjs +13 -48
  72. package/dist/vue2/components/rich_text_editor/rich_text_editor.vue.cjs.map +1 -1
  73. package/dist/vue2/components/rich_text_editor/rich_text_editor.vue.js +13 -48
  74. package/dist/vue2/components/rich_text_editor/rich_text_editor.vue.js.map +1 -1
  75. package/dist/vue2/components/skeleton/skeleton-shape.vue.cjs +2 -2
  76. package/dist/vue2/components/skeleton/skeleton-shape.vue.cjs.map +1 -1
  77. package/dist/vue2/components/skeleton/skeleton-shape.vue.js +2 -2
  78. package/dist/vue2/components/skeleton/skeleton-shape.vue.js.map +1 -1
  79. package/dist/vue2/components/skeleton/skeleton-text.vue.cjs +4 -4
  80. package/dist/vue2/components/skeleton/skeleton-text.vue.cjs.map +1 -1
  81. package/dist/vue2/components/skeleton/skeleton-text.vue.js +4 -4
  82. package/dist/vue2/components/skeleton/skeleton-text.vue.js.map +1 -1
  83. package/dist/vue2/components/skeleton/skeleton.vue.cjs +0 -1
  84. package/dist/vue2/components/skeleton/skeleton.vue.cjs.map +1 -1
  85. package/dist/vue2/components/skeleton/skeleton.vue.js +0 -1
  86. package/dist/vue2/components/skeleton/skeleton.vue.js.map +1 -1
  87. package/dist/vue2/components/tooltip/tooltip.vue.cjs +0 -1
  88. package/dist/vue2/components/tooltip/tooltip.vue.cjs.map +1 -1
  89. package/dist/vue2/components/tooltip/tooltip.vue.js +0 -1
  90. package/dist/vue2/components/tooltip/tooltip.vue.js.map +1 -1
  91. package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs +1 -8
  92. package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  93. package/dist/vue2/recipes/conversation_view/editor/editor.vue.js +1 -8
  94. package/dist/vue2/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  95. package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs +1 -1
  96. package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs.map +1 -1
  97. package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js +1 -1
  98. package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js.map +1 -1
  99. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +1 -1
  100. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
  101. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +1 -1
  102. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
  103. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs +6 -6
  104. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
  105. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js +6 -6
  106. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
  107. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs +1 -1
  108. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
  109. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js +1 -1
  110. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
  111. package/dist/vue2/style.css +44 -277
  112. package/dist/vue2/types/components/collapsible/collapsible_lazy_show.vue.d.ts.map +1 -1
  113. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +0 -10
  114. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  115. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +0 -9
  116. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  117. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  118. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  119. package/dist/vue3/component-documentation.json +1 -1
  120. package/dist/vue3/components/avatar/avatar.vue.cjs +0 -1
  121. package/dist/vue3/components/avatar/avatar.vue.cjs.map +1 -1
  122. package/dist/vue3/components/avatar/avatar.vue.js +0 -1
  123. package/dist/vue3/components/avatar/avatar.vue.js.map +1 -1
  124. package/dist/vue3/components/collapsible/collapsible_lazy_show.vue.cjs +2 -3
  125. package/dist/vue3/components/collapsible/collapsible_lazy_show.vue.cjs.map +1 -1
  126. package/dist/vue3/components/collapsible/collapsible_lazy_show.vue.js +2 -3
  127. package/dist/vue3/components/collapsible/collapsible_lazy_show.vue.js.map +1 -1
  128. package/dist/vue3/components/combobox/combobox_empty-list.vue.cjs +1 -2
  129. package/dist/vue3/components/combobox/combobox_empty-list.vue.cjs.map +1 -1
  130. package/dist/vue3/components/combobox/combobox_empty-list.vue.js +1 -2
  131. package/dist/vue3/components/combobox/combobox_empty-list.vue.js.map +1 -1
  132. package/dist/vue3/components/description_list/description_list.vue.cjs +5 -6
  133. package/dist/vue3/components/description_list/description_list.vue.cjs.map +1 -1
  134. package/dist/vue3/components/description_list/description_list.vue.js +5 -6
  135. package/dist/vue3/components/description_list/description_list.vue.js.map +1 -1
  136. package/dist/vue3/components/dropdown/dropdown.vue.cjs +0 -1
  137. package/dist/vue3/components/dropdown/dropdown.vue.cjs.map +1 -1
  138. package/dist/vue3/components/dropdown/dropdown.vue.js +0 -1
  139. package/dist/vue3/components/dropdown/dropdown.vue.js.map +1 -1
  140. package/dist/vue3/components/dropdown/dropdown_separator.vue.cjs +1 -2
  141. package/dist/vue3/components/dropdown/dropdown_separator.vue.cjs.map +1 -1
  142. package/dist/vue3/components/dropdown/dropdown_separator.vue.js +1 -2
  143. package/dist/vue3/components/dropdown/dropdown_separator.vue.js.map +1 -1
  144. package/dist/vue3/components/item_layout/item_layout.vue.cjs +16 -16
  145. package/dist/vue3/components/item_layout/item_layout.vue.cjs.map +1 -1
  146. package/dist/vue3/components/item_layout/item_layout.vue.js +16 -16
  147. package/dist/vue3/components/item_layout/item_layout.vue.js.map +1 -1
  148. package/dist/vue3/components/list_item/list_item.vue.cjs +5 -6
  149. package/dist/vue3/components/list_item/list_item.vue.cjs.map +1 -1
  150. package/dist/vue3/components/list_item/list_item.vue.js +5 -6
  151. package/dist/vue3/components/list_item/list_item.vue.js.map +1 -1
  152. package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.cjs +2 -3
  153. package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.cjs.map +1 -1
  154. package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.js +2 -3
  155. package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.js.map +1 -1
  156. package/dist/vue3/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.cjs +5 -6
  157. package/dist/vue3/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.cjs.map +1 -1
  158. package/dist/vue3/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.js +5 -6
  159. package/dist/vue3/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.js.map +1 -1
  160. package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.cjs +14 -49
  161. package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.cjs.map +1 -1
  162. package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.js +14 -49
  163. package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.js.map +1 -1
  164. package/dist/vue3/components/scroller/modules/core_scroller.vue.cjs +0 -1
  165. package/dist/vue3/components/scroller/modules/core_scroller.vue.cjs.map +1 -1
  166. package/dist/vue3/components/scroller/modules/core_scroller.vue.js +0 -1
  167. package/dist/vue3/components/scroller/modules/core_scroller.vue.js.map +1 -1
  168. package/dist/vue3/components/skeleton/skeleton-shape.vue.cjs +2 -2
  169. package/dist/vue3/components/skeleton/skeleton-shape.vue.cjs.map +1 -1
  170. package/dist/vue3/components/skeleton/skeleton-shape.vue.js +2 -2
  171. package/dist/vue3/components/skeleton/skeleton-shape.vue.js.map +1 -1
  172. package/dist/vue3/components/skeleton/skeleton-text.vue.cjs +4 -4
  173. package/dist/vue3/components/skeleton/skeleton-text.vue.cjs.map +1 -1
  174. package/dist/vue3/components/skeleton/skeleton-text.vue.js +4 -4
  175. package/dist/vue3/components/skeleton/skeleton-text.vue.js.map +1 -1
  176. package/dist/vue3/components/skeleton/skeleton.vue.cjs +0 -1
  177. package/dist/vue3/components/skeleton/skeleton.vue.cjs.map +1 -1
  178. package/dist/vue3/components/skeleton/skeleton.vue.js +0 -1
  179. package/dist/vue3/components/skeleton/skeleton.vue.js.map +1 -1
  180. package/dist/vue3/components/tooltip/tooltip.vue.cjs +0 -1
  181. package/dist/vue3/components/tooltip/tooltip.vue.cjs.map +1 -1
  182. package/dist/vue3/components/tooltip/tooltip.vue.js +0 -1
  183. package/dist/vue3/components/tooltip/tooltip.vue.js.map +1 -1
  184. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs +1 -9
  185. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  186. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js +1 -9
  187. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  188. package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs +1 -1
  189. package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs.map +1 -1
  190. package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js +1 -1
  191. package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js.map +1 -1
  192. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +1 -1
  193. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
  194. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +1 -1
  195. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
  196. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs +5 -5
  197. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
  198. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js +5 -5
  199. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
  200. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs +1 -1
  201. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
  202. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js +1 -1
  203. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
  204. package/dist/vue3/style.css +45 -318
  205. package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
  206. package/dist/vue3/types/components/collapsible/collapsible_lazy_show.vue.d.ts.map +1 -1
  207. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +0 -10
  208. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  209. package/dist/vue3/types/components/scroller/modules/core_scroller.vue.d.ts.map +1 -1
  210. package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
  211. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +0 -9
  212. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  213. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  214. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  215. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"list_item.vue.js","sources":["../../../components/list_item/list_item.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <component\n :is=\"elementType\"\n :id=\"id\"\n :class=\"['dt-list-item', {\n 'dt-list-item--focusable': isFocusable,\n 'dt-list-item--highlighted': isHighlighted,\n 'dt-list-item--static': !isHoverable,\n }]\"\n :tabindex=\"isFocusable ? 0 : -1\"\n :role=\"role\"\n :aria-selected=\"role === 'listitem' ? undefined : isHighlighted\"\n v-on=\"listItemListeners\"\n >\n <component\n :is=\"listItemType\"\n v-if=\"listItemType\"\n >\n <template\n v-for=\"(_, slotName) in $slots\"\n #[slotName]\n >\n <!-- @slot named slots for custom list items -->\n <slot :name=\"slotName\" />\n </template>\n <template\n v-if=\"selected\"\n #selected\n >\n <dt-icon-check\n size=\"400\"\n class=\"dt-list-item--selected-icon\"\n />\n </template>\n </component>\n <!-- @slot slot for the main content -->\n <slot v-else />\n </component>\n</template>\n\n<script>\nimport {\n LIST_ITEM_TYPES,\n LIST_ITEM_NAVIGATION_TYPES,\n} from './list_item_constants';\nimport utils from '@/common/utils';\nimport { DtIconCheck } from '@dialpad/dialtone-icons/vue3';\nimport { DtItemLayout } from '@/components/item_layout';\n\nconst ROLES = ['listitem', 'menuitem', 'option'];\n\n/**\n * A list item is an element that can be used to represent individual items in a list.\n * @see https://dialtone.dialpad.com/components/list_item.html\n */\nexport default {\n name: 'DtListItem',\n\n components: {\n DtItemLayout,\n DtIconCheck,\n },\n\n /**\n * Value provided from keyboard_list_navigation.js using id prop.\n */\n inject: {\n highlightId: { default: null },\n },\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * String to use for the item's role.\n */\n role: {\n type: String,\n default: 'listitem',\n validator: (role) => (ROLES).includes(role),\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n elementType: {\n type: String,\n default: 'li',\n },\n\n /**\n * The type of child list item to use.\n * @values default, custom\n */\n type: {\n type: String,\n default: LIST_ITEM_TYPES.DEFAULT,\n validator: (t) => Object.values(LIST_ITEM_TYPES).includes(t),\n },\n\n /**\n * The type of navigation that this component should support.\n * - \"arrow-keys\" for items that are navigated with UP/DOWN keys.\n * - \"tab\" for items that are navigated using the TAB key.\n * - \"none\" for static items that are not interactive.\n * @values arrow-keys, tab, none\n */\n navigationType: {\n type: String,\n default: LIST_ITEM_NAVIGATION_TYPES.NONE,\n validator: (t) => Object.values(LIST_ITEM_NAVIGATION_TYPES).includes(t),\n },\n\n /**\n * Applies selected styles to the list item\n */\n selected: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Key down event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Native mouse move event\n *\n * @event mousemove\n * @type {MouseEvent}\n */\n 'mousemove',\n\n /**\n * Native mouse leave event\n *\n * @event mouseleave\n * @type {MouseEvent}\n */\n 'mouseleave',\n\n /**\n * Mouse down event\n *\n * @event mousedown\n */\n 'mousedown',\n ],\n\n data () {\n return {\n injected: false,\n mouseHighlighted: false,\n };\n },\n\n computed: {\n listItemType () {\n switch (this.type) {\n case LIST_ITEM_TYPES.DEFAULT:\n return DtItemLayout;\n default:\n return null;\n }\n },\n\n listItemListeners () {\n return {\n keydown: event => {\n if (['enter', 'space'].includes(event.code.toLowerCase())) {\n this.onClick(event);\n }\n this.$emit('keydown', event);\n },\n\n mousemove: event => {\n this.onMouseHover(event);\n this.$emit('mousemove', event);\n },\n\n mouseleave: event => {\n this.onMouseLeave(event);\n this.$emit('mouseleave', event);\n },\n };\n },\n\n /**\n * For keyboard navigation, whether this item is currently highlighted.\n * An injected highlightId will override the default mouseover highlight.\n */\n isHighlighted () {\n if (this.isHoverable) {\n return this.highlightId && this.highlightId() ? this.id === this.highlightId() : this.mouseHighlighted;\n }\n return false;\n },\n\n isFocusable () {\n // Navigation type has to be set to \"tab\".\n return this.navigationType === LIST_ITEM_NAVIGATION_TYPES.TAB;\n },\n\n /**\n * Whether to apply hover styles.\n */\n isHoverable () {\n return this.navigationType !== LIST_ITEM_NAVIGATION_TYPES.NONE;\n },\n },\n\n methods: {\n onClick (e) {\n // disabled as we do not want to override native click\n // eslint-disable-next-line vue/require-explicit-emits\n this.$emit('click', e);\n },\n\n onMouseHover () {\n this.mouseHighlighted = true;\n },\n\n onMouseLeave () {\n this.mouseHighlighted = false;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-list-item {\n list-style: none;\n background-color: var(--dt-action-color-background-muted-default);\n\n &:not(.dt-list-item--static) {\n cursor: pointer;\n border-radius: var(--dt-size-radius-300);\n }\n\n &--focusable:focus,\n &--focusable:focus-within,\n &--highlighted {\n background-color: var(--dt-action-color-background-muted-hover);\n }\n\n &--highlighted:active {\n background-color: var(--dt-action-color-background-muted-active);\n }\n\n &--selected-icon {\n margin-left: var(--dt-space-400);\n }\n\n :focus-visible {\n outline: none;\n box-shadow: var(--dt-shadow-focus);\n }\n}\n</style>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_withCtx","_createSlots","_renderList","_renderSlot","_createVNode"],"mappings":";;;;;;;AAkDA,MAAM,QAAQ,CAAC,YAAY,YAAY,QAAQ;AAM/C,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA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AA,IAAA;AAAA,IACrB,MAAM,OAAI;AAAA,IACV,iBAAe,OAAA,SAAsB,aAAA,SAAY,SAAa;AAAA,EAC/D,GAAAC,WAAwB,SAAD,iBAAA,CAAA,GAAA;AAAA,IAb3B,SAAAC,QAeI,MAoBY;AAAA,MAlBJ,SAAY,gBAFpBL,UAAA,GAAAC,YAoBYC,wBAnBL,SAAA,YAAY,KAhBvB,KAAA,EAAA,GAAAI,cAAA,GAAA,EAAA,GAAA;AAAA,QAAAC,WAoBgC,KAAM,QApBtC,CAoBgB,GAAG,aAAQ;;YApB3B,MAqBS;AAAA,YArBT,IAAAF,QAwBQ,MAAyB;AAAA,cAAzBG,WAAyB,aAAZ,QAAQ;AAAA;;;QAGf,OAAQ;UA3BtB,MA4BS;AAAA,UA5BT,IAAAH,QA8BQ,MAGE;AAAA,YAHFI,YAGE,0BAAA;AAAA,cAFA,MAAK;AAAA,cACL,OAAM;AAAA;;UAhChB,KAAA;AAAA,YAAA;AAAA,mBAqCID,WAAe,0BArCnB,KAAA,GAAA;AAAA;IAAA,GAAA;AAAA;;;"}
1
+ {"version":3,"file":"list_item.vue.js","sources":["../../../components/list_item/list_item.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <component\n :is=\"elementType\"\n :id=\"id\"\n :class=\"['d-list-item', {\n 'd-list-item--focusable': isFocusable,\n 'd-list-item--highlighted': isHighlighted,\n 'd-list-item--static': !isHoverable,\n }]\"\n :tabindex=\"isFocusable ? 0 : -1\"\n :role=\"role\"\n :aria-selected=\"role === 'listitem' ? undefined : isHighlighted\"\n v-on=\"listItemListeners\"\n >\n <component\n :is=\"listItemType\"\n v-if=\"listItemType\"\n >\n <template\n v-for=\"(_, slotName) in $slots\"\n #[slotName]\n >\n <!-- @slot named slots for custom list items -->\n <slot :name=\"slotName\" />\n </template>\n <template\n v-if=\"selected\"\n #selected\n >\n <dt-icon-check\n size=\"400\"\n class=\"d-list-item--selected-icon\"\n />\n </template>\n </component>\n <!-- @slot slot for the main content -->\n <slot v-else />\n </component>\n</template>\n\n<script>\nimport {\n LIST_ITEM_TYPES,\n LIST_ITEM_NAVIGATION_TYPES,\n} from './list_item_constants';\nimport utils from '@/common/utils';\nimport { DtIconCheck } from '@dialpad/dialtone-icons/vue3';\nimport { DtItemLayout } from '@/components/item_layout';\n\nconst ROLES = ['listitem', 'menuitem', 'option'];\n\n/**\n * A list item is an element that can be used to represent individual items in a list.\n * @see https://dialtone.dialpad.com/components/list_item.html\n */\nexport default {\n name: 'DtListItem',\n\n components: {\n DtItemLayout,\n DtIconCheck,\n },\n\n /**\n * Value provided from keyboard_list_navigation.js using id prop.\n */\n inject: {\n highlightId: { default: null },\n },\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * String to use for the item's role.\n */\n role: {\n type: String,\n default: 'listitem',\n validator: (role) => (ROLES).includes(role),\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n elementType: {\n type: String,\n default: 'li',\n },\n\n /**\n * The type of child list item to use.\n * @values default, custom\n */\n type: {\n type: String,\n default: LIST_ITEM_TYPES.DEFAULT,\n validator: (t) => Object.values(LIST_ITEM_TYPES).includes(t),\n },\n\n /**\n * The type of navigation that this component should support.\n * - \"arrow-keys\" for items that are navigated with UP/DOWN keys.\n * - \"tab\" for items that are navigated using the TAB key.\n * - \"none\" for static items that are not interactive.\n * @values arrow-keys, tab, none\n */\n navigationType: {\n type: String,\n default: LIST_ITEM_NAVIGATION_TYPES.NONE,\n validator: (t) => Object.values(LIST_ITEM_NAVIGATION_TYPES).includes(t),\n },\n\n /**\n * Applies selected styles to the list item\n */\n selected: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Key down event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Native mouse move event\n *\n * @event mousemove\n * @type {MouseEvent}\n */\n 'mousemove',\n\n /**\n * Native mouse leave event\n *\n * @event mouseleave\n * @type {MouseEvent}\n */\n 'mouseleave',\n\n /**\n * Mouse down event\n *\n * @event mousedown\n */\n 'mousedown',\n ],\n\n data () {\n return {\n injected: false,\n mouseHighlighted: false,\n };\n },\n\n computed: {\n listItemType () {\n switch (this.type) {\n case LIST_ITEM_TYPES.DEFAULT:\n return DtItemLayout;\n default:\n return null;\n }\n },\n\n listItemListeners () {\n return {\n keydown: event => {\n if (['enter', 'space'].includes(event.code.toLowerCase())) {\n this.onClick(event);\n }\n this.$emit('keydown', event);\n },\n\n mousemove: event => {\n this.onMouseHover(event);\n this.$emit('mousemove', event);\n },\n\n mouseleave: event => {\n this.onMouseLeave(event);\n this.$emit('mouseleave', event);\n },\n };\n },\n\n /**\n * For keyboard navigation, whether this item is currently highlighted.\n * An injected highlightId will override the default mouseover highlight.\n */\n isHighlighted () {\n if (this.isHoverable) {\n return this.highlightId && this.highlightId() ? this.id === this.highlightId() : this.mouseHighlighted;\n }\n return false;\n },\n\n isFocusable () {\n // Navigation type has to be set to \"tab\".\n return this.navigationType === LIST_ITEM_NAVIGATION_TYPES.TAB;\n },\n\n /**\n * Whether to apply hover styles.\n */\n isHoverable () {\n return this.navigationType !== LIST_ITEM_NAVIGATION_TYPES.NONE;\n },\n },\n\n methods: {\n onClick (e) {\n // disabled as we do not want to override native click\n // eslint-disable-next-line vue/require-explicit-emits\n this.$emit('click', e);\n },\n\n onMouseHover () {\n this.mouseHighlighted = true;\n },\n\n onMouseLeave () {\n this.mouseHighlighted = false;\n },\n },\n};\n</script>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_withCtx","_createSlots","_renderList","_renderSlot","_createVNode"],"mappings":";;;;;;AAkDA,MAAM,QAAQ,CAAC,YAAY,YAAY,QAAQ;AAM/C,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA;AAAA;AAAA;AAAA,EAKD,QAAQ;AA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AAe,OAAA,SAAsB,aAAA,SAAY,SAAa;AAAA,EAC/D,GAAAC,WAAwB,SAAD,iBAAA,CAAA,GAAA;AAAA,IAb3B,SAAAC,QAeI,MAoBY;AAAA,MAlBJ,SAAY,gBAFpBL,UAAA,GAAAC,YAoBYC,wBAnBL,SAAA,YAAY,KAhBvB,KAAA,EAAA,GAAAI,cAAA,GAAA,EAAA,GAAA;AAAA,QAAAC,WAoBgC,KAAM,QApBtC,CAoBgB,GAAG,aAAQ;;YApB3B,MAqBS;AAAA,YArBT,IAAAF,QAwBQ,MAAyB;AAAA,cAAzBG,WAAyB,aAAZ,QAAQ;AAAA;;;QAGf,OAAQ;UA3BtB,MA4BS;AAAA,UA5BT,IAAAH,QA8BQ,MAGE;AAAA,YAHFI,YAGE,0BAAA;AAAA,cAFA,MAAK;AAAA,cACL,OAAM;AAAA;;UAhChB,KAAA;AAAA,YAAA;AAAA,mBAqCID,WAAe,0BArCnB,KAAA,GAAA;AAAA;IAAA,GAAA;AAAA;;;"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- ;/* empty css */
5
4
  const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.cjs");
6
5
  const avatar = require("../../../avatar/avatar.vue.cjs");
7
6
  const stack = require("../../../stack/stack.vue.cjs");
@@ -26,7 +25,7 @@ const _sfc_main = {
26
25
  }
27
26
  }
28
27
  };
29
- const _hoisted_1 = { class: "mention-suggestion-name" };
28
+ const _hoisted_1 = { class: "d-mention-suggestion__name" };
30
29
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
31
30
  const _component_dt_avatar = vue.resolveComponent("dt-avatar");
32
31
  const _component_dt_stack = vue.resolveComponent("dt-stack");
@@ -46,6 +45,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
46
45
  _: 1
47
46
  });
48
47
  }
49
- const MentionSuggestion = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-65bcbd51"]]);
48
+ const MentionSuggestion = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
50
49
  exports.default = MentionSuggestion;
51
50
  //# sourceMappingURL=MentionSuggestion.vue.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MentionSuggestion.vue.cjs","sources":["../../../../../components/rich_text_editor/extensions/mentions/MentionSuggestion.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n gap=\"400\"\n >\n <dt-avatar\n :full-name=\"name\"\n :image-src=\"avatarSrc\"\n :image-alt=\"name\"\n size=\"xs\"\n />\n <span class=\"mention-suggestion-name\">\n {{ name }}\n </span>\n </dt-stack>\n</template>\n\n<script>\nimport { DtAvatar } from '@/components/avatar';\nimport { DtStack } from '@/components/stack';\n\nexport default {\n name: 'MentionSuggestion',\n components: {\n DtAvatar,\n DtStack,\n },\n\n props: {\n item: {\n type: Object,\n required: true,\n },\n },\n\n computed: {\n name () {\n return this.item.name;\n },\n\n avatarSrc () {\n return this.item.avatarSrc;\n },\n },\n};\n</script>\n\n<style lang=\"less\" scoped>\n.mention-suggestion-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n</style>\n"],"names":["DtAvatar","DtStack","_createBlock","_withCtx","_createVNode","_createElementVNode","_toDisplayString"],"mappings":";;;;;;;AAqBA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,UAAAA,OAAQ;AAAA,IACR,SAAAC,MAAO;AAAA,EACR;AAAA,EAED,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,OAAQ;AACN,aAAO,KAAK,KAAK;AAAA,IAClB;AAAA,IAED,YAAa;AACX,aAAO,KAAK,KAAK;AAAA,IAClB;AAAA,EACF;AACH;AAjCU,MAAA,aAAA,EAAA,OAAM,0BAAyB;;;;0BAVvCC,IAaW,YAAA,qBAAA;AAAA,IAZT,WAAU;AAAA,IACV,KAAI;AAAA;IAHR,SAAAC,IAAA,QAKI,MAKE;AAAA,MALFC,IAAAA,YAKE,sBAAA;AAAA,QAJC,aAAW,SAAI;AAAA,QACf,aAAW,SAAS;AAAA,QACpB,aAAW,SAAI;AAAA,QAChB,MAAK;AAAA;MAEPC,IAEO,mBAAA,QAFP,YAEOC,IAAAA,gBADF,SAAI,IAAA,GAAA,CAAA;AAAA;IAZb,GAAA;AAAA;;;;"}
1
+ {"version":3,"file":"MentionSuggestion.vue.cjs","sources":["../../../../../components/rich_text_editor/extensions/mentions/MentionSuggestion.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n gap=\"400\"\n >\n <dt-avatar\n :full-name=\"name\"\n :image-src=\"avatarSrc\"\n :image-alt=\"name\"\n size=\"xs\"\n />\n <span class=\"d-mention-suggestion__name\">\n {{ name }}\n </span>\n </dt-stack>\n</template>\n\n<script>\nimport { DtAvatar } from '@/components/avatar';\nimport { DtStack } from '@/components/stack';\n\nexport default {\n name: 'MentionSuggestion',\n components: {\n DtAvatar,\n DtStack,\n },\n\n props: {\n item: {\n type: Object,\n required: true,\n },\n },\n\n computed: {\n name () {\n return this.item.name;\n },\n\n avatarSrc () {\n return this.item.avatarSrc;\n },\n },\n};\n</script>\n"],"names":["DtAvatar","DtStack","_createBlock","_withCtx","_createVNode","_createElementVNode","_toDisplayString"],"mappings":";;;;;;AAqBA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,UAAAA,OAAQ;AAAA,IACR,SAAAC,MAAO;AAAA,EACR;AAAA,EAED,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,OAAQ;AACN,aAAO,KAAK,KAAK;AAAA,IAClB;AAAA,IAED,YAAa;AACX,aAAO,KAAK,KAAK;AAAA,IAClB;AAAA,EACF;AACH;AAjCU,MAAA,aAAA,EAAA,OAAM,6BAA4B;;;;0BAV1CC,IAaW,YAAA,qBAAA;AAAA,IAZT,WAAU;AAAA,IACV,KAAI;AAAA;IAHR,SAAAC,IAAA,QAKI,MAKE;AAAA,MALFC,IAAAA,YAKE,sBAAA;AAAA,QAJC,aAAW,SAAI;AAAA,QACf,aAAW,SAAS;AAAA,QACpB,aAAW,SAAI;AAAA,QAChB,MAAK;AAAA;MAEPC,IAEO,mBAAA,QAFP,YAEOC,IAAAA,gBADF,SAAI,IAAA,GAAA,CAAA;AAAA;IAZb,GAAA;AAAA;;;;"}
@@ -1,5 +1,4 @@
1
1
  import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, toDisplayString } from "vue";
2
- /* empty css */
3
2
  import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
4
3
  import DtAvatar from "../../../avatar/avatar.vue.js";
5
4
  import DtStack from "../../../stack/stack.vue.js";
@@ -24,7 +23,7 @@ const _sfc_main = {
24
23
  }
25
24
  }
26
25
  };
27
- const _hoisted_1 = { class: "mention-suggestion-name" };
26
+ const _hoisted_1 = { class: "d-mention-suggestion__name" };
28
27
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
29
28
  const _component_dt_avatar = resolveComponent("dt-avatar");
30
29
  const _component_dt_stack = resolveComponent("dt-stack");
@@ -44,7 +43,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
44
43
  _: 1
45
44
  });
46
45
  }
47
- const MentionSuggestion = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-65bcbd51"]]);
46
+ const MentionSuggestion = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
48
47
  export {
49
48
  MentionSuggestion as default
50
49
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MentionSuggestion.vue.js","sources":["../../../../../components/rich_text_editor/extensions/mentions/MentionSuggestion.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n gap=\"400\"\n >\n <dt-avatar\n :full-name=\"name\"\n :image-src=\"avatarSrc\"\n :image-alt=\"name\"\n size=\"xs\"\n />\n <span class=\"mention-suggestion-name\">\n {{ name }}\n </span>\n </dt-stack>\n</template>\n\n<script>\nimport { DtAvatar } from '@/components/avatar';\nimport { DtStack } from '@/components/stack';\n\nexport default {\n name: 'MentionSuggestion',\n components: {\n DtAvatar,\n DtStack,\n },\n\n props: {\n item: {\n type: Object,\n required: true,\n },\n },\n\n computed: {\n name () {\n return this.item.name;\n },\n\n avatarSrc () {\n return this.item.avatarSrc;\n },\n },\n};\n</script>\n\n<style lang=\"less\" scoped>\n.mention-suggestion-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n</style>\n"],"names":["_createBlock","_withCtx","_createVNode","_createElementVNode","_toDisplayString"],"mappings":";;;;;AAqBA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,OAAQ;AACN,aAAO,KAAK,KAAK;AAAA,IAClB;AAAA,IAED,YAAa;AACX,aAAO,KAAK,KAAK;AAAA,IAClB;AAAA,EACF;AACH;AAjCU,MAAA,aAAA,EAAA,OAAM,0BAAyB;;;;sBAVvCA,YAaW,qBAAA;AAAA,IAZT,WAAU;AAAA,IACV,KAAI;AAAA;IAHR,SAAAC,QAKI,MAKE;AAAA,MALFC,YAKE,sBAAA;AAAA,QAJC,aAAW,SAAI;AAAA,QACf,aAAW,SAAS;AAAA,QACpB,aAAW,SAAI;AAAA,QAChB,MAAK;AAAA;MAEPC,mBAEO,QAFP,YAEOC,gBADF,SAAI,IAAA,GAAA,CAAA;AAAA;IAZb,GAAA;AAAA;;;"}
1
+ {"version":3,"file":"MentionSuggestion.vue.js","sources":["../../../../../components/rich_text_editor/extensions/mentions/MentionSuggestion.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n gap=\"400\"\n >\n <dt-avatar\n :full-name=\"name\"\n :image-src=\"avatarSrc\"\n :image-alt=\"name\"\n size=\"xs\"\n />\n <span class=\"d-mention-suggestion__name\">\n {{ name }}\n </span>\n </dt-stack>\n</template>\n\n<script>\nimport { DtAvatar } from '@/components/avatar';\nimport { DtStack } from '@/components/stack';\n\nexport default {\n name: 'MentionSuggestion',\n components: {\n DtAvatar,\n DtStack,\n },\n\n props: {\n item: {\n type: Object,\n required: true,\n },\n },\n\n computed: {\n name () {\n return this.item.name;\n },\n\n avatarSrc () {\n return this.item.avatarSrc;\n },\n },\n};\n</script>\n"],"names":["_createBlock","_withCtx","_createVNode","_createElementVNode","_toDisplayString"],"mappings":";;;;AAqBA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,OAAQ;AACN,aAAO,KAAK,KAAK;AAAA,IAClB;AAAA,IAED,YAAa;AACX,aAAO,KAAK,KAAK;AAAA,IAClB;AAAA,EACF;AACH;AAjCU,MAAA,aAAA,EAAA,OAAM,6BAA4B;;;;sBAV1CA,YAaW,qBAAA;AAAA,IAZT,WAAU;AAAA,IACV,KAAI;AAAA;IAHR,SAAAC,QAKI,MAKE;AAAA,MALFC,YAKE,sBAAA;AAAA,QAJC,aAAW,SAAI;AAAA,QACf,aAAW,SAAS;AAAA,QACpB,aAAW,SAAI;AAAA,QAChB,MAAK;AAAA;MAEPC,mBAEO,QAFP,YAEOC,gBADF,SAAI,IAAA,GAAA,CAAA;AAAA;IAZb,GAAA;AAAA;;;"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- ;/* empty css */
5
4
  const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.cjs");
6
5
  const list_item = require("../../../list_item/list_item.vue.cjs");
7
6
  const _sfc_main = {
@@ -63,7 +62,7 @@ const _sfc_main = {
63
62
  },
64
63
  async scrollActiveElementIntoView() {
65
64
  await this.$nextTick();
66
- const activeElement = this.$refs.suggestionList.querySelector(".dt-list-item--highlighted");
65
+ const activeElement = this.$refs.suggestionList.querySelector(".d-list-item--highlighted");
67
66
  if (activeElement) {
68
67
  activeElement.scrollIntoView({
69
68
  behaviour: "smooth",
@@ -93,10 +92,10 @@ const _sfc_main = {
93
92
  }
94
93
  }
95
94
  };
96
- const _hoisted_1 = { class: "d-popover__dialog dt-suggestion-list__container" };
95
+ const _hoisted_1 = { class: "d-popover__dialog d-suggestion-list__container" };
97
96
  const _hoisted_2 = {
98
97
  ref: "suggestionList",
99
- class: "dt-suggestion-list"
98
+ class: "d-suggestion-list"
100
99
  };
101
100
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
102
101
  const _component_dt_list_item = vue.resolveComponent("dt-list-item");
@@ -106,8 +105,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
106
105
  return vue.openBlock(), vue.createBlock(_component_dt_list_item, {
107
106
  key: item.id,
108
107
  class: vue.normalizeClass([
109
- "dt-suggestion-list--item",
110
- { "dt-list-item--highlighted": index === $data.selectedIndex }
108
+ "d-suggestion-list__item",
109
+ { "d-list-item--highlighted": index === $data.selectedIndex }
111
110
  ]),
112
111
  "navigation-type": "arrow-keys",
113
112
  onClick: ($event) => $options.selectItem(index),
@@ -1 +1 @@
1
- {"version":3,"file":"SuggestionList.vue.cjs","sources":["../../../../../components/rich_text_editor/extensions/suggestion/SuggestionList.vue"],"sourcesContent":["<template>\n <div class=\"d-popover__dialog dt-suggestion-list__container\">\n <ul\n v-show=\"items.length\"\n ref=\"suggestionList\"\n class=\"dt-suggestion-list\"\n >\n <dt-list-item\n v-for=\"(item, index) in items\"\n :key=\"item.id\"\n :class=\"[\n 'dt-suggestion-list--item',\n { 'dt-list-item--highlighted': index === selectedIndex },\n ]\"\n navigation-type=\"arrow-keys\"\n @click=\"selectItem(index)\"\n @keydown.prevent=\"onKeyDown\"\n >\n <component\n :is=\"itemComponent\"\n :item=\"item\"\n />\n </dt-list-item>\n </ul>\n </div>\n</template>\n\n<script>\nimport { DtListItem } from '@/components/list_item';\n\nexport default {\n name: 'SuggestionList',\n components: {\n DtListItem,\n },\n\n props: {\n items: {\n type: Array,\n required: true,\n },\n\n command: {\n type: Function,\n required: true,\n },\n\n itemComponent: {\n type: Object,\n required: true,\n },\n\n itemType: {\n type: String,\n required: true,\n },\n },\n\n data () {\n return {\n selectedIndex: 0,\n };\n },\n\n watch: {\n items () {\n this.selectedIndex = 0;\n },\n },\n\n methods: {\n onKeyDown ({ event }) {\n if (event.key === 'ArrowUp') {\n this.upHandler();\n return true;\n }\n\n if (event.key === 'ArrowDown') {\n this.downHandler();\n return true;\n }\n\n if (event.key === 'Enter' || event.key === 'Tab') {\n this.selectHandler();\n return true;\n }\n\n return false;\n },\n\n upHandler () {\n this.selectedIndex = ((this.selectedIndex + this.items.length) - 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n downHandler () {\n this.selectedIndex = (this.selectedIndex + 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n async scrollActiveElementIntoView () {\n await this.$nextTick();\n const activeElement = this.$refs.suggestionList.querySelector('.dt-list-item--highlighted');\n if (activeElement) {\n activeElement.scrollIntoView({\n behaviour: 'smooth',\n block: 'center',\n });\n }\n },\n\n selectHandler () {\n this.selectItem(this.selectedIndex);\n },\n\n selectItem (index) {\n const item = this.items[index];\n\n switch (this.itemType) {\n case 'emoji':\n this.command(item);\n return;\n case 'mention':\n this.command({ name: item.name, id: item.id, avatarSrc: item.avatarSrc });\n break;\n case 'channel':\n this.command({ name: item.name, id: item.id });\n break;\n case 'slash-command':\n this.command({ command: item.command });\n break;\n }\n },\n },\n};\n</script>\n\n<style>\n.dt-suggestion-list__container {\n max-height: var(--dt-size-875);\n}\n\n.dt-suggestion-list {\n position: relative;\n padding: var(--dt-size-300);\n min-width: var(--dt-size-925);\n max-width: var(--dt-size-975);\n}\n\n.dt-suggestion-list--item {\n border: var(--dt-size-100) solid transparent;\n}\n</style>\n"],"names":["DtListItem","_openBlock","_createElementBlock","_withDirectives","_createElementVNode","_Fragment","_renderList","_createBlock","_normalizeClass","_withModifiers","_withCtx","_resolveDynamicComponent","_vShow"],"mappings":";;;;;;AA8BA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,gBACVA,UAAU;AAAA,EACX;AAAA,EAED,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,eAAe;AAAA,MACb,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,UAAU;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,eAAe;AAAA;EAElB;AAAA,EAED,OAAO;AAAA,IACL,QAAS;AACP,WAAK,gBAAgB;AAAA,IACtB;AAAA,EACF;AAAA,EAED,SAAS;AAAA,IACP,UAAW,EAAE,SAAS;AACpB,UAAI,MAAM,QAAQ,WAAW;AAC3B,aAAK,UAAS;AACd,eAAO;AAAA,MACT;AAEA,UAAI,MAAM,QAAQ,aAAa;AAC7B,aAAK,YAAW;AAChB,eAAO;AAAA,MACT;AAEA,UAAI,MAAM,QAAQ,WAAW,MAAM,QAAQ,OAAO;AAChD,aAAK,cAAa;A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,OAAA,OARhC,CAQgB,MAAM,UAAK;gCADrBC,IAee,YAAA,yBAAA;AAAA,UAbZ,KAAK,KAAK;AAAA,UACV,OAVTC,IAAAA,eAAA;AAAA;YAUiG,EAAA,6BAAA,UAAU,MAAa,cAAA;AAAA;UAIhH,mBAAgB;AAAA,UACf,SAAK,YAAE,SAAU,WAAC,KAAK;AAAA,UACvB,WAhBTC,IAAAA,cAgB0B,SAAS,WAAA,CAAA,SAAA,CAAA;AAAA;UAhBnC,SAAAC,IAAA,QAkBQ,MAGE;AAAA,aAHFT,IAAAA,UAAA,GAAAM,IAAA,YAGEI,4BAFK,OAAA,aAAa,GACjB,EAAA,KAAU,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA;AAAA;UApBrB,GAAA;AAAA;;;MAGc,CAAAC,WAAA,OAAA,MAAM,MAAM;AAAA;;;;;"}
1
+ {"version":3,"file":"SuggestionList.vue.cjs","sources":["../../../../../components/rich_text_editor/extensions/suggestion/SuggestionList.vue"],"sourcesContent":["<template>\n <div class=\"d-popover__dialog d-suggestion-list__container\">\n <ul\n v-show=\"items.length\"\n ref=\"suggestionList\"\n class=\"d-suggestion-list\"\n >\n <dt-list-item\n v-for=\"(item, index) in items\"\n :key=\"item.id\"\n :class=\"[\n 'd-suggestion-list__item',\n { 'd-list-item--highlighted': index === selectedIndex },\n ]\"\n navigation-type=\"arrow-keys\"\n @click=\"selectItem(index)\"\n @keydown.prevent=\"onKeyDown\"\n >\n <component\n :is=\"itemComponent\"\n :item=\"item\"\n />\n </dt-list-item>\n </ul>\n </div>\n</template>\n\n<script>\nimport { DtListItem } from '@/components/list_item';\n\nexport default {\n name: 'SuggestionList',\n components: {\n DtListItem,\n },\n\n props: {\n items: {\n type: Array,\n required: true,\n },\n\n command: {\n type: Function,\n required: true,\n },\n\n itemComponent: {\n type: Object,\n required: true,\n },\n\n itemType: {\n type: String,\n required: true,\n },\n },\n\n data () {\n return {\n selectedIndex: 0,\n };\n },\n\n watch: {\n items () {\n this.selectedIndex = 0;\n },\n },\n\n methods: {\n onKeyDown ({ event }) {\n if (event.key === 'ArrowUp') {\n this.upHandler();\n return true;\n }\n\n if (event.key === 'ArrowDown') {\n this.downHandler();\n return true;\n }\n\n if (event.key === 'Enter' || event.key === 'Tab') {\n this.selectHandler();\n return true;\n }\n\n return false;\n },\n\n upHandler () {\n this.selectedIndex = ((this.selectedIndex + this.items.length) - 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n downHandler () {\n this.selectedIndex = (this.selectedIndex + 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n async scrollActiveElementIntoView () {\n await this.$nextTick();\n const activeElement = this.$refs.suggestionList.querySelector('.d-list-item--highlighted');\n if (activeElement) {\n activeElement.scrollIntoView({\n behaviour: 'smooth',\n block: 'center',\n });\n }\n },\n\n selectHandler () {\n this.selectItem(this.selectedIndex);\n },\n\n selectItem (index) {\n const item = this.items[index];\n\n switch (this.itemType) {\n case 'emoji':\n this.command(item);\n return;\n case 'mention':\n this.command({ name: item.name, id: item.id, avatarSrc: item.avatarSrc });\n break;\n case 'channel':\n this.command({ name: item.name, id: item.id });\n break;\n case 'slash-command':\n this.command({ command: item.command });\n break;\n }\n },\n },\n};\n</script>\n"],"names":["DtListItem","_openBlock","_createElementBlock","_withDirectives","_createElementVNode","_Fragment","_renderList","_createBlock","_normalizeClass","_withModifiers","_withCtx","_resolveDynamicComponent","_vShow"],"mappings":";;;;;AA8BA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,gBACVA,UAAU;AAAA,EACX;AAAA,EAED,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,eAAe;AAAA,MACb,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,UAAU;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA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M,KAAK,MAAM,IAAI,KAAK,GAAC,CAAG;AAC7C;AAAA,QACF,KAAK;AACH,eAAK,QAAQ,EAAE,SAAS,KAAK,QAAS,CAAA;AACtC;AAAA,MACJ;AAAA,IACD;AAAA,EACF;AACH;AAvIO,MAAA,aAAA,EAAA,OAAM,iDAAgD;;EAGvD,KAAI;AAAA,EACJ,OAAM;;;;AAJV,SAAAC,cAAA,GAAAC,uBAuBM,OAvBN,YAuBM;AAAA,IAtBJC,mBAAAC,IAAAA,mBAqBK,MArBL,YAqBK;AAAA,OAhBHH,IAAAA,UAAA,IAAA,GAAAC,IAAA,mBAeeG,oBAtBrBC,IAQgC,WAAA,OAAA,OARhC,CAQgB,MAAM,UAAK;gCADrBC,IAee,YAAA,yBAAA;AAAA,UAbZ,KAAK,KAAK;AAAA,UACV,OAVTC,IAAAA,eAAA;AAAA;YAU+F,EAAA,4BAAA,UAAU,MAAa,cAAA;AAAA;UAI9G,mBAAgB;AAAA,UACf,SAAK,YAAE,SAAU,WAAC,KAAK;AAAA,UACvB,WAhBTC,IAAAA,cAgB0B,SAAS,WAAA,CAAA,SAAA,CAAA;AAAA;UAhBnC,SAAAC,IAAA,QAkBQ,MAGE;AAAA,aAHFT,IAAAA,UAAA,GAAAM,IAAA,YAGEI,4BAFK,OAAA,aAAa,GACjB,EAAA,KAAU,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA;AAAA;UApBrB,GAAA;AAAA;;;MAGc,CAAAC,WAAA,OAAA,MAAM,MAAM;AAAA;;;;;"}
@@ -1,5 +1,4 @@
1
1
  import { resolveComponent, openBlock, createElementBlock, withDirectives, createElementVNode, Fragment, renderList, createBlock, normalizeClass, withModifiers, withCtx, resolveDynamicComponent, vShow } from "vue";
2
- /* empty css */
3
2
  import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
4
3
  import DtListItem from "../../../list_item/list_item.vue.js";
5
4
  const _sfc_main = {
@@ -61,7 +60,7 @@ const _sfc_main = {
61
60
  },
62
61
  async scrollActiveElementIntoView() {
63
62
  await this.$nextTick();
64
- const activeElement = this.$refs.suggestionList.querySelector(".dt-list-item--highlighted");
63
+ const activeElement = this.$refs.suggestionList.querySelector(".d-list-item--highlighted");
65
64
  if (activeElement) {
66
65
  activeElement.scrollIntoView({
67
66
  behaviour: "smooth",
@@ -91,10 +90,10 @@ const _sfc_main = {
91
90
  }
92
91
  }
93
92
  };
94
- const _hoisted_1 = { class: "d-popover__dialog dt-suggestion-list__container" };
93
+ const _hoisted_1 = { class: "d-popover__dialog d-suggestion-list__container" };
95
94
  const _hoisted_2 = {
96
95
  ref: "suggestionList",
97
- class: "dt-suggestion-list"
96
+ class: "d-suggestion-list"
98
97
  };
99
98
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
100
99
  const _component_dt_list_item = resolveComponent("dt-list-item");
@@ -104,8 +103,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
104
103
  return openBlock(), createBlock(_component_dt_list_item, {
105
104
  key: item.id,
106
105
  class: normalizeClass([
107
- "dt-suggestion-list--item",
108
- { "dt-list-item--highlighted": index === $data.selectedIndex }
106
+ "d-suggestion-list__item",
107
+ { "d-list-item--highlighted": index === $data.selectedIndex }
109
108
  ]),
110
109
  "navigation-type": "arrow-keys",
111
110
  onClick: ($event) => $options.selectItem(index),
@@ -1 +1 @@
1
- {"version":3,"file":"SuggestionList.vue.js","sources":["../../../../../components/rich_text_editor/extensions/suggestion/SuggestionList.vue"],"sourcesContent":["<template>\n <div class=\"d-popover__dialog dt-suggestion-list__container\">\n <ul\n v-show=\"items.length\"\n ref=\"suggestionList\"\n class=\"dt-suggestion-list\"\n >\n <dt-list-item\n v-for=\"(item, index) in items\"\n :key=\"item.id\"\n :class=\"[\n 'dt-suggestion-list--item',\n { 'dt-list-item--highlighted': index === selectedIndex },\n ]\"\n navigation-type=\"arrow-keys\"\n @click=\"selectItem(index)\"\n @keydown.prevent=\"onKeyDown\"\n >\n <component\n :is=\"itemComponent\"\n :item=\"item\"\n />\n </dt-list-item>\n </ul>\n </div>\n</template>\n\n<script>\nimport { DtListItem } from '@/components/list_item';\n\nexport default {\n name: 'SuggestionList',\n components: {\n DtListItem,\n },\n\n props: {\n items: {\n type: Array,\n required: true,\n },\n\n command: {\n type: Function,\n required: true,\n },\n\n itemComponent: {\n type: Object,\n required: true,\n },\n\n itemType: {\n type: String,\n required: true,\n },\n },\n\n data () {\n return {\n selectedIndex: 0,\n };\n },\n\n watch: {\n items () {\n this.selectedIndex = 0;\n },\n },\n\n methods: {\n onKeyDown ({ event }) {\n if (event.key === 'ArrowUp') {\n this.upHandler();\n return true;\n }\n\n if (event.key === 'ArrowDown') {\n this.downHandler();\n return true;\n }\n\n if (event.key === 'Enter' || event.key === 'Tab') {\n this.selectHandler();\n return true;\n }\n\n return false;\n },\n\n upHandler () {\n this.selectedIndex = ((this.selectedIndex + this.items.length) - 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n downHandler () {\n this.selectedIndex = (this.selectedIndex + 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n async scrollActiveElementIntoView () {\n await this.$nextTick();\n const activeElement = this.$refs.suggestionList.querySelector('.dt-list-item--highlighted');\n if (activeElement) {\n activeElement.scrollIntoView({\n behaviour: 'smooth',\n block: 'center',\n });\n }\n },\n\n selectHandler () {\n this.selectItem(this.selectedIndex);\n },\n\n selectItem (index) {\n const item = this.items[index];\n\n switch (this.itemType) {\n case 'emoji':\n this.command(item);\n return;\n case 'mention':\n this.command({ name: item.name, id: item.id, avatarSrc: item.avatarSrc });\n break;\n case 'channel':\n this.command({ name: item.name, id: item.id });\n break;\n case 'slash-command':\n this.command({ command: item.command });\n break;\n }\n },\n },\n};\n</script>\n\n<style>\n.dt-suggestion-list__container {\n max-height: var(--dt-size-875);\n}\n\n.dt-suggestion-list {\n position: relative;\n padding: var(--dt-size-300);\n min-width: var(--dt-size-925);\n max-width: var(--dt-size-975);\n}\n\n.dt-suggestion-list--item {\n border: var(--dt-size-100) solid transparent;\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_withDirectives","_createElementVNode","_Fragment","_renderList","_createBlock","_normalizeClass","_withModifiers","_withCtx","_resolveDynamicComponent","_vShow"],"mappings":";;;;AA8BA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,EACD;AAAA,EAED,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,eAAe;AAAA,MACb,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,UAAU;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,eAAe;AAAA;EAElB;AAAA,EAED,OAAO;AAAA,IACL,QAAS;AACP,WAAK,gBAAgB;AAAA,IACtB;AAAA,EACF;AAAA,EAED,SAAS;AAAA,IACP,UAAW,EAAE,SAAS;AACpB,UAAI,MAAM,QAAQ,WAAW;AAC3B,aAAK,UAAS;AACd,eAAO;AAAA,MACT;AAEA,UAAI,MAAM,QAAQ,aAAa;AAC7B,aAAK,YAAW;AAChB,eAAO;AAAA,MACT;AAEA,UAAI,MAAM,QAAQ,WAAW,MAAM,QAAQ,OAAO;AAChD,aAAK,cAAa;AAClB,eAAO;AAAA,MACT;AAEA,aAAO;AAAA,IACR;AAAA,IAED,YAAa;AACX,WAAK,iBAAkB,KAAK,gBAAgB,KAAK,MAAM,SAAU,KAAK,KAAK,MAAM;AAEjF,WAAK,4BAA2B;AAAA,IACjC;AAAA,IAED,cAAe;AACb,WAAK,iBAAiB,KAAK,gBAAgB,KAAK,KAAK,MAAM;AAE3D,WAAK,4BAA2B;AAAA,IACjC;AAAA,IAED,MAAM,8BAA+B;AACnC,YAAM,KAAK;AACX,YAAM,gBAAgB,KAAK,MAAM,eAA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U,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA;AAAA;UApBrB,GAAA;AAAA;;;MAGc,CAAAC,OAAA,OAAA,MAAM,MAAM;AAAA;;;;"}
1
+ {"version":3,"file":"SuggestionList.vue.js","sources":["../../../../../components/rich_text_editor/extensions/suggestion/SuggestionList.vue"],"sourcesContent":["<template>\n <div class=\"d-popover__dialog d-suggestion-list__container\">\n <ul\n v-show=\"items.length\"\n ref=\"suggestionList\"\n class=\"d-suggestion-list\"\n >\n <dt-list-item\n v-for=\"(item, index) in items\"\n :key=\"item.id\"\n :class=\"[\n 'd-suggestion-list__item',\n { 'd-list-item--highlighted': index === selectedIndex },\n ]\"\n navigation-type=\"arrow-keys\"\n @click=\"selectItem(index)\"\n @keydown.prevent=\"onKeyDown\"\n >\n <component\n :is=\"itemComponent\"\n :item=\"item\"\n />\n </dt-list-item>\n </ul>\n </div>\n</template>\n\n<script>\nimport { DtListItem } from '@/components/list_item';\n\nexport default {\n name: 'SuggestionList',\n components: {\n DtListItem,\n },\n\n props: {\n items: {\n type: Array,\n required: true,\n },\n\n command: {\n type: Function,\n required: true,\n },\n\n itemComponent: {\n type: Object,\n required: true,\n },\n\n itemType: {\n type: String,\n required: true,\n },\n },\n\n data () {\n return {\n selectedIndex: 0,\n };\n },\n\n watch: {\n items () {\n this.selectedIndex = 0;\n },\n },\n\n methods: {\n onKeyDown ({ event }) {\n if (event.key === 'ArrowUp') {\n this.upHandler();\n return true;\n }\n\n if (event.key === 'ArrowDown') {\n this.downHandler();\n return true;\n }\n\n if (event.key === 'Enter' || event.key === 'Tab') {\n this.selectHandler();\n return true;\n }\n\n return false;\n },\n\n upHandler () {\n this.selectedIndex = ((this.selectedIndex + this.items.length) - 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n downHandler () {\n this.selectedIndex = (this.selectedIndex + 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n async scrollActiveElementIntoView () {\n await this.$nextTick();\n const activeElement = this.$refs.suggestionList.querySelector('.d-list-item--highlighted');\n if (activeElement) {\n activeElement.scrollIntoView({\n behaviour: 'smooth',\n block: 'center',\n });\n }\n },\n\n selectHandler () {\n this.selectItem(this.selectedIndex);\n },\n\n selectItem (index) {\n const item = this.items[index];\n\n switch (this.itemType) {\n case 'emoji':\n this.command(item);\n return;\n case 'mention':\n this.command({ name: item.name, id: item.id, avatarSrc: item.avatarSrc });\n break;\n case 'channel':\n this.command({ name: item.name, id: item.id });\n break;\n case 'slash-command':\n this.command({ command: item.command });\n break;\n }\n },\n },\n};\n</script>\n"],"names":["_openBlock","_createElementBlock","_withDirectives","_createElementVNode","_Fragment","_renderList","_createBlock","_normalizeClass","_withModifiers","_withCtx","_resolveDynamicComponent","_vShow"],"mappings":";;;AA8BA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,EACD;AAAA,EAED,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,eAAe;AAAA,MACb,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,UAAU;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,eAAe;AAAA;EAElB;AAAA,EAED,OAAO;AAAA,IACL,QAAS;AACP,WAAK,gBAAgB;AAAA,IACtB;AAAA,EACF;AAAA,EAED,SAAS;AAAA,IACP,UAAW,EAAE,SAAS;AACpB,UAAI,MAAM,QAAQ,WAAW;AAC3B,aAAK,UAAS;AACd,eAAO;AAAA,MACT;AAEA,UAAI,MAAM,QAAQ,aAAa;AAC7B,aAAK,YAAW;AAChB,eAAO;AAAA,MACT;AAEA,UAAI,MAAM,QAAQ,WAAW,MAAM,QAAQ,OAAO;AAChD,aAAK,cAAa;AAClB,eAAO;AAAA,MACT;A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;AAAA,UAbZ,KAAK,KAAK;AAAA,UACV,OAVTC,eAAA;AAAA;YAU+F,EAAA,4BAAA,UAAU,MAAa,cAAA;AAAA;UAI9G,mBAAgB;AAAA,UACf,SAAK,YAAE,SAAU,WAAC,KAAK;AAAA,UACvB,WAhBTC,cAgB0B,SAAS,WAAA,CAAA,SAAA,CAAA;AAAA;UAhBnC,SAAAC,QAkBQ,MAGE;AAAA,aAHFT,UAAA,GAAAM,YAGEI,wBAFK,OAAA,aAAa,GACjB,EAAA,KAAU,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA;AAAA;UApBrB,GAAA;AAAA;;;MAGc,CAAAC,OAAA,OAAA,MAAM,MAAM;AAAA;;;;"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue3 = require("@tiptap/vue-3");
4
- const model = require("@tiptap/pm/model");
5
4
  const Blockquote = require("@tiptap/extension-blockquote");
6
5
  const CodeBlock = require("@tiptap/extension-code-block");
7
6
  const Document = require("@tiptap/extension-document");
@@ -31,7 +30,6 @@ const suggestion$1 = require("./extensions/channels/suggestion.cjs");
31
30
  const suggestion$2 = require("./extensions/slash_command/suggestion.cjs");
32
31
  const common_utils = require("../../common/utils.cjs");
33
32
  const vue = require("vue");
34
- ;/* empty css */
35
33
  const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
36
34
  const _sfc_main = {
37
35
  name: "DtRichTextEditor",
@@ -214,7 +212,7 @@ const _sfc_main = {
214
212
  },
215
213
  /**
216
214
  * Whether the input allows for bullet list to be introduced in the text.
217
- */
215
+ */
218
216
  allowBulletList: {
219
217
  type: Boolean,
220
218
  default: true
@@ -253,13 +251,6 @@ const _sfc_main = {
253
251
  additionalExtensions: {
254
252
  type: Array,
255
253
  default: () => []
256
- },
257
- /**
258
- * Use default paste handler.
259
- */
260
- useDefaultPasteHandler: {
261
- type: Boolean,
262
- default: false
263
254
  }
264
255
  },
265
256
  emits: [
@@ -392,7 +383,7 @@ const _sfc_main = {
392
383
  if (this.allowCodeblock) {
393
384
  extensions.push(CodeBlock.configure({
394
385
  HTMLAttributes: {
395
- class: "dt-rich-text-editor--code-block"
386
+ class: "d-rich-text-editor__code-block"
396
387
  }
397
388
  }));
398
389
  }
@@ -414,10 +405,10 @@ const _sfc_main = {
414
405
  }
415
406
  },
416
407
  /**
417
- * Because the Editor instance is initialized when mounted it does not get
418
- * updated props automatically, so the ones that can change after mount have
419
- * to be hooked up to the Editor's own API.
420
- */
408
+ * Because the Editor instance is initialized when mounted it does not get
409
+ * updated props automatically, so the ones that can change after mount have
410
+ * to be hooked up to the Editor's own API.
411
+ */
421
412
  watch: {
422
413
  editable(isEditable) {
423
414
  this.editor.setEditable(isEditable);
@@ -459,41 +450,15 @@ const _sfc_main = {
459
450
  ...this.inputAttrs,
460
451
  class: this.inputClass
461
452
  },
462
- /* Absolutely crazy that this is what's needed to paste line breaks properly in prosemirror, but it does seem
463
- to fix our issue of line breaks outputting as paragraphs. Code taken from this thread:
464
- https://discuss.prosemirror.net/t/how-to-preserve-hard-breaks-when-pasting-html-into-a-plain-text-schema/4202/4
465
- */
466
- ...!this.useDefaultPasteHandler && { handlePaste: this.handlerPreserveBreaksOnPaste }
453
+ // Moves the <br /> tags inside the previous closing tag to avoid
454
+ // Prosemirror wrapping them within another </p> tag.
455
+ transformPastedHTML(html) {
456
+ return html.replace(/(<\/\w+>)((<br \/>)+)/g, "$2$3$1");
457
+ }
467
458
  }
468
459
  });
469
460
  this.addEditorListeners();
470
461
  },
471
- handlerPreserveBreaksOnPaste(view, event, slice) {
472
- var _a;
473
- const { state } = view;
474
- const { tr } = state;
475
- if (!state.schema.nodes.hardBreak) {
476
- return false;
477
- }
478
- const clipboardText = (_a = event.clipboardData) == null ? void 0 : _a.getData("text/plain").trim();
479
- if (!clipboardText) {
480
- return false;
481
- }
482
- const textLines = clipboardText.split(/(?:\r\n|\r|\n)/g);
483
- const nodes = textLines.reduce((nodes2, line, index) => {
484
- if (line.length > 0) {
485
- nodes2.push(state.schema.text(line));
486
- }
487
- if (index < textLines.length - 1) {
488
- nodes2.push(state.schema.nodes.hardBreak.create());
489
- }
490
- return nodes2;
491
- }, []);
492
- view.dispatch(
493
- tr.replaceSelection(model.Slice.maxOpen(model.Fragment.fromArray(nodes))).scrollIntoView()
494
- );
495
- return true;
496
- },
497
462
  processValue(newValue, returnIfEqual = true) {
498
463
  let currentValue = this.getOutput();
499
464
  if (this.outputFormat === "json") {
@@ -540,7 +505,7 @@ const _sfc_main = {
540
505
  return this.editor.getHTML();
541
506
  case "text":
542
507
  default:
543
- return this.editor.getText();
508
+ return this.editor.getText({ blockSeparator: "\n" });
544
509
  }
545
510
  },
546
511
  getExtension(extension, options) {
@@ -570,8 +535,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
570
535
  const _component_editor_content = vue.resolveComponent("editor-content");
571
536
  return vue.openBlock(), vue.createBlock(_component_editor_content, vue.mergeProps({
572
537
  editor: $data.editor,
573
- "data-qa": "dt-rich-text-editor",
574
- class: "dt-rich-text-editor"
538
+ class: "d-rich-text-editor",
539
+ "data-qa": "dt-rich-text-editor"
575
540
  }, $options.attrs), null, 16, ["editor"]);
576
541
  }
577
542
  const DtRichTextEditor = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
@@ -1 +1 @@
1
- {"version":3,"file":"rich_text_editor.vue.cjs","sources":["../../../components/rich_text_editor/rich_text_editor.vue"],"sourcesContent":["<template>\n <editor-content\n :editor=\"editor\"\n data-qa=\"dt-rich-text-editor\"\n class=\"dt-rich-text-editor\"\n v-bind=\"attrs\"\n />\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { Editor, EditorContent } from '@tiptap/vue-3';\nimport { Slice, Fragment } from '@tiptap/pm/model';\nimport Blockquote from '@tiptap/extension-blockquote';\nimport CodeBlock from '@tiptap/extension-code-block';\nimport Document from '@tiptap/extension-document';\nimport HardBreak from '@tiptap/extension-hard-break';\nimport Paragraph from '@tiptap/extension-paragraph';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport Bold from '@tiptap/extension-bold';\nimport BulletList from '@tiptap/extension-bullet-list';\nimport Italic from '@tiptap/extension-italic';\nimport TipTapLink from '@tiptap/extension-link';\nimport ListItem from '@tiptap/extension-list-item';\nimport OrderedList from '@tiptap/extension-ordered-list';\nimport Strike from '@tiptap/extension-strike';\nimport Underline from '@tiptap/extension-underline';\nimport Text from '@tiptap/extension-text';\nimport TextAlign from '@tiptap/extension-text-align';\nimport History from '@tiptap/extension-history';\nimport Emoji from './extensions/emoji';\nimport CustomLink from './extensions/custom_link';\nimport { MentionPlugin } from './extensions/mentions/mention';\nimport { ChannelPlugin } from './extensions/channels/channel';\nimport { SlashCommandPlugin } from './extensions/slash_command/slash_command';\nimport {\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n} from './rich_text_editor_constants';\nimport { emojiPattern } from 'regex-combined-emojis';\n\nimport mentionSuggestion from './extensions/mentions/suggestion';\nimport channelSuggestion from './extensions/channels/suggestion';\nimport slashCommandSuggestion from './extensions/slash_command/suggestion';\nimport { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n name: 'DtRichTextEditor',\n\n components: {\n EditorContent,\n },\n\n props: {\n /**\n * Value of the input. The object format should match TipTap's JSON\n * document structure: https://tiptap.dev/guide/output#option-1-json\n */\n 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 * 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 * Whether the input allows for line breaks to be introduced in the text by pressing enter. If this is disabled,\n * line breaks can still be entered by pressing shift+enter.\n */\n allowLineBreaks: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Descriptive label for the input element\n */\n inputAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Additional class name for the input element. Only accepts a String value\n * because this is passed to the editor via options. For multiple classes,\n * join them into one string, e.g. \"d-p8 d-hmx96\"\n */\n inputClass: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the input should receive focus after the component has been\n * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n * - `start` Sets the focus to the beginning of the input\n * - `end` Sets the focus to the end of the input\n * - `all` Selects the whole contents of the input\n * - `Number` Sets the focus to a specific position in the input\n * - `true` Defaults to `start`\n * - `false` Disables autofocus\n * @values true, false, start, end, all, number\n */\n autoFocus: {\n type: [Boolean, String, Number],\n default: false,\n validator (autoFocus) {\n if (typeof autoFocus === 'string') {\n return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n }\n return true;\n },\n },\n\n /**\n * The output format that the editor uses when emitting the \"@input\" event.\n * One of `text`, `json`, `html`. See https://tiptap.dev/guide/output for\n * examples.\n * @values text, json, html\n */\n outputFormat: {\n type: String,\n default: 'html',\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 * Enables the TipTap Link extension and optionally passes configurations to it\n *\n * It is not recommended to use this and the custom link extension at the same time.\n */\n link: {\n type: [Boolean, Object],\n default: false,\n },\n\n /**\n * Enables the Custom Link extension and optionally passes configurations to it\n *\n * It is not recommended to use this and the built in TipTap link extension at the same time.\n *\n * The custom link does some additional things on top of the built in TipTap link\n * extension such as styling phone numbers and IP adresses as links, and allows you\n * to linkify text without having to type a space after the link. Currently it is missing some\n * functionality such as editing links and will likely require more work to be fully usable,\n * so it is recommended to use the built in TipTap link for now.\n */\n customLink: {\n type: [Boolean, Object],\n default: false,\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 * Note that slash commands only work when they are the first word in the input.\n */\n slashCommandSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * Whether the input allows for block quote.\n */\n allowBlockquote: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bold to be introduced in the text.\n */\n allowBold: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bullet list to be introduced in the text.\n */\n allowBulletList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for italic to be introduced in the text.\n */\n allowItalic: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for strike to be introduced in the text.\n */\n allowStrike: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for underline to be introduced in the text.\n */\n allowUnderline: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows codeblock to be introduced in the text.\n */\n allowCodeblock: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional TipTap extensions to be added to the editor.\n */\n additionalExtensions: {\n type: Array,\n default: () => [],\n },\n\n /**\n * Use default paste handler.\n */\n useDefaultPasteHandler: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Editor input event\n * @event input\n * @type {String|JSON}\n */\n 'input',\n\n /**\n * Event to sync the value with the parent\n * @event update:value\n * @type {String|JSON}\n */\n 'update:modelValue',\n\n /**\n * Editor blur event\n * @event blur\n * @type {FocusEvent}\n */\n 'blur',\n\n /**\n * Editor focus event\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Enter was pressed. Note that shift enter must be pressed to line break the input.\n * @event enter\n * @type {String}\n */\n 'enter',\n ],\n\n data () {\n return {\n editor: null,\n };\n },\n\n computed: {\n attrs () {\n return {\n ...this.$attrs,\n onInput: () => {},\n onFocus: () => {},\n onBlur: () => {},\n };\n },\n\n // eslint-disable-next-line complexity\n extensions () {\n // These are the default extensions needed just for plain text.\n const extensions = [Document, Paragraph, Text, History];\n if (this.link) {\n extensions.push(TipTapLink.extend({ inclusive: false }).configure({\n HTMLAttributes: {\n class: 'd-link d-wb-break-all',\n },\n autolink: true,\n protocols: RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n }));\n }\n if (this.customLink) {\n extensions.push(this.getExtension(CustomLink, this.customLink));\n }\n if (this.allowBlockquote) {\n extensions.push(Blockquote);\n }\n if (this.allowBold) {\n extensions.push(Bold);\n }\n if (this.allowBulletList) {\n extensions.push(BulletList);\n extensions.push(ListItem);\n extensions.push(OrderedList);\n }\n if (this.allowItalic) {\n extensions.push(Italic);\n }\n if (this.allowStrike) {\n extensions.push(Strike);\n }\n if (this.allowUnderline) {\n extensions.push(Underline);\n }\n\n // Enable placeholderText\n if (this.placeholder) {\n extensions.push(\n Placeholder.configure({ placeholder: this.placeholder }),\n );\n }\n\n // make sure that this is defined before any other extensions\n // where Enter and Shift+Enter should have its own interaction. otherwise it will be ignored\n if (!this.allowLineBreaks) {\n const self = this;\n extensions.push(\n HardBreak.extend({\n addKeyboardShortcuts () {\n return {\n Enter: () => {\n self.$emit('enter');\n return true;\n },\n 'Shift-Enter': () => {\n this.editor.commands.setHardBreak();\n return true;\n },\n };\n },\n }),\n );\n } else {\n extensions.push(HardBreak);\n }\n\n if (this.mentionSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.mentionSuggestion, ...mentionSuggestion };\n extensions.push(MentionPlugin.configure({ suggestion: suggestionObject }));\n }\n\n if (this.channelSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.channelSuggestion, ...channelSuggestion };\n extensions.push(ChannelPlugin.configure({ suggestion: suggestionObject }));\n }\n\n if (this.slashCommandSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.slashCommandSuggestion, ...slashCommandSuggestion };\n extensions.push(SlashCommandPlugin.configure({ suggestion: suggestionObject }));\n }\n\n // Emoji has some interactions with Enter key\n // hence this should be done last otherwise the enter wont add a emoji.\n extensions.push(Emoji);\n\n extensions.push(TextAlign.configure({\n types: ['paragraph'],\n defaultAlignment: 'left',\n }));\n\n if (this.allowCodeblock) {\n extensions.push(CodeBlock.configure({\n HTMLAttributes: {\n class: 'dt-rich-text-editor--code-block',\n },\n }));\n }\n\n if (this.additionalExtensions.length) {\n extensions.push(...this.additionalExtensions);\n }\n\n return extensions;\n },\n\n inputAttrs () {\n const attrs = {\n 'aria-label': this.inputAriaLabel,\n 'aria-multiline': true,\n role: 'textbox',\n };\n if (!this.editable) {\n attrs['aria-readonly'] = true;\n }\n return attrs;\n },\n },\n\n /**\n * Because the Editor instance is initialized when mounted it does not get\n * updated props automatically, so the ones that can change after mount have\n * to be hooked up to the Editor's own API.\n */\n watch: {\n editable (isEditable) {\n this.editor.setEditable(isEditable);\n this.updateEditorAttributes({ 'aria-readonly': !isEditable });\n },\n\n inputClass (newClass) {\n this.updateEditorAttributes({ class: newClass });\n },\n\n inputAriaLabel (newLabel) {\n this.updateEditorAttributes({ 'aria-label': newLabel });\n },\n\n extensions () {\n // Extensions can't be registered on the fly, so just recreate the editor.\n // https://github.com/ueberdosis/tiptap/issues/1044\n this.destroyEditor();\n this.createEditor();\n },\n\n modelValue (newValue) {\n this.processValue(newValue);\n },\n },\n\n created () {\n this.createEditor();\n },\n\n beforeUnmount () {\n this.destroyEditor();\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n this.processValue(this.modelValue, false);\n },\n\n methods: {\n\n createEditor () {\n // For all available options, see https://tiptap.dev/api/editor#settings\n this.editor = new Editor({\n autofocus: this.autoFocus,\n content: this.modelValue,\n editable: this.editable,\n extensions: this.extensions,\n editorProps: {\n attributes: {\n ...this.inputAttrs,\n class: this.inputClass,\n },\n\n /* Absolutely crazy that this is what's needed to paste line breaks properly in prosemirror, but it does seem\n to fix our issue of line breaks outputting as paragraphs. Code taken from this thread:\n https://discuss.prosemirror.net/t/how-to-preserve-hard-breaks-when-pasting-html-into-a-plain-text-schema/4202/4\n */\n ...(!this.useDefaultPasteHandler && { handlePaste: this.handlerPreserveBreaksOnPaste }),\n },\n });\n this.addEditorListeners();\n },\n\n handlerPreserveBreaksOnPaste (view, event, slice) {\n const { state } = view;\n const { tr } = state;\n\n if (!state.schema.nodes.hardBreak) {\n return false;\n }\n\n const clipboardText = event.clipboardData?.getData('text/plain').trim();\n\n if (!clipboardText) {\n return false;\n }\n\n const textLines = clipboardText.split(/(?:\\r\\n|\\r|\\n)/g);\n\n const nodes = textLines.reduce((nodes, line, index) => {\n if (line.length > 0) {\n nodes.push(state.schema.text(line));\n }\n\n if (index < textLines.length - 1) {\n nodes.push(state.schema.nodes.hardBreak.create());\n }\n\n return nodes;\n }, []);\n\n view.dispatch(\n tr.replaceSelection(Slice.maxOpen(Fragment.fromArray(nodes))).scrollIntoView(),\n );\n\n return true;\n },\n\n processValue (newValue, returnIfEqual = true) {\n let currentValue = this.getOutput();\n if (this.outputFormat === 'json') {\n newValue = JSON.stringify(newValue);\n currentValue = JSON.stringify(currentValue);\n }\n if (returnIfEqual && newValue === currentValue) {\n // The new value came from this component and was passed back down\n // through the parent, so don't do anything here.\n return;\n }\n\n const inputUnicodeRegex = new RegExp(`(${emojiPattern})`, 'g');\n\n // If the text contains emoji characters convert them to emoji component tags\n newValue = newValue.replace(inputUnicodeRegex, '<emoji-component code=\"$1\"></emoji-component>');\n\n // Otherwise replace the content (resets the cursor position).\n this.editor.commands.setContent(newValue, false);\n },\n\n destroyEditor () {\n this.editor.destroy();\n },\n\n /**\n * The Editor exposes event hooks that we have to map our emits into. See\n * https://tiptap.dev/api/events for all events.\n */\n addEditorListeners () {\n // The content has changed.\n this.editor.on('update', () => {\n const value = this.getOutput();\n // When preventTyping is true and user wants to type, we revert to last value\n // If Backspace (keyCode = 8) is pressed, we allow updating the text\n if (this.preventTyping && this.editor.view?.input?.lastKeyCode !== 8) {\n this.editor.commands.setContent(this.value, false);\n return;\n }\n this.$emit('input', value);\n this.$emit('update:modelValue', value);\n });\n\n // The editor is focused.\n this.editor.on('focus', ({ event }) => {\n this.$emit('focus', event);\n });\n\n // The editor isn’t focused anymore.\n this.editor.on('blur', ({ event }) => {\n this.$emit('blur', event);\n });\n },\n\n getOutput () {\n switch (this.outputFormat) {\n case 'json':\n return this.editor.getJSON();\n case 'html':\n return this.editor.getHTML();\n case 'text':\n default:\n return this.editor.getText();\n }\n },\n\n getExtension (extension, options) {\n if (typeof options === 'boolean') {\n return extension;\n }\n return extension.configure?.(options);\n },\n\n updateEditorAttributes (attributes) {\n this.editor.setOptions({\n editorProps: {\n attributes: {\n ...this.inputAttrs,\n class: this.inputClass,\n ...attributes,\n },\n },\n });\n },\n\n focusEditor () {\n this.editor.commands.focus();\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n .dt-rich-text-editor {\n &--code-block {\n background: var(--dt-color-surface-secondary);\n padding: var(--dt-space-400);\n }\n\n > .ProseMirror {\n box-shadow: none;\n\n p.is-editor-empty:first-child::before {\n content: attr(data-placeholder);\n float: left;\n color: var(--dt-color-foreground-placeholder);\n pointer-events: none;\n height: 0;\n }\n\n ul, ol {\n padding-left: var(--dt-space-525);\n }\n\n ul > li {\n list-style-type: disc;\n }\n\n ol > li {\n list-style-type: decimal;\n }\n\n blockquote {\n padding-left: var(--dt-space-400);\n border-left: var(--dt-size-border-300) solid var(--dt-color-foreground-muted-inverted);\n margin-left: 0;\n }\n }\n }\n</style>\n"],"names":["EditorContent","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","RICH_TEXT_EDITOR_OUTPUT_FORMATS","RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS","CustomLink","mentionSuggestion","MentionPlugin","channelSuggestion","ChannelPlugin","slashCommandSuggestion","SlashCommandPlugin","Emoji","warnIfUnmounted","Editor","nodes","Slice","Fragment","emojiPattern","_openBlock","_createBlock","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,mBACVA,KAAa;AAAA,EACd;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,YAAY;AAAA,MACV,MAAM;AA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qBAAqB,KAAK;AAAA,MACvC,CAAC;AAGD,WAAK,OAAO,GAAG,SAAS,CAAC,EAAE,MAAI,MAAQ;AACrC,aAAK,MAAM,SAAS,KAAK;AAAA,MAC3B,CAAC;AAGD,WAAK,OAAO,GAAG,QAAQ,CAAC,EAAE,MAAI,MAAQ;AACpC,aAAK,MAAM,QAAQ,KAAK;AAAA,MAC1B,CAAC;AAAA,IACF;AAAA,IAED,YAAa;AACX,cAAQ,KAAK,cAAY;AAAA,QACvB,KAAK;AACH,iBAAO,KAAK,OAAO;QACrB,KAAK;AACH,iBAAO,KAAK,OAAO;QACrB,KAAK;AAAA,QACL;AACE,iBAAO,KAAK,OAAO;MACvB;AAAA,IACD;AAAA,IAED,aAAc,WAAW,SAAS;;AAChC,UAAI,OAAO,YAAY,WAAW;AAChC,eAAO;AAAA,MACT;AACA,cAAO,eAAU,cAAV,mCAAsB;AAAA,IAC9B;AAAA,IAED,uBAAwB,YAAY;AAClC,WAAK,OAAO,WAAW;AAAA,QACrB,aAAa;AAAA,UACX,YAAY;AAAA,YACV,GAAG,KAAK;AAAA,YACR,OAAO,KAAK;AAAA,YACZ,GAAG;AAAA,UACJ;AAAA,QACF;AAAA,MACH,CAAC;AAAA,IACF;AAAA,IAED,cAAe;AACb,WAAK,OAAO,SAAS;IACtB;AAAA,EACF;AACH;;;AA7pBE,SAAAC,cAAA,GAAAC,gBAKE,2BALFC,IAAAA,WAKE;AAAA,IAJC,QAAQ,MAAM;AAAA,IACf,WAAQ;AAAA,IACR,OAAM;AAAA,KACE,SAAK,KAAA,GAAA,MAAA,IAAA,CAAA,QAAA,CAAA;;;;"}
1
+ {"version":3,"file":"rich_text_editor.vue.cjs","sources":["../../../components/rich_text_editor/rich_text_editor.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <editor-content\n :editor=\"editor\"\n class=\"d-rich-text-editor\"\n data-qa=\"dt-rich-text-editor\"\n v-bind=\"attrs\"\n />\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { Editor, EditorContent } from '@tiptap/vue-3';\nimport Blockquote from '@tiptap/extension-blockquote';\nimport CodeBlock from '@tiptap/extension-code-block';\nimport Document from '@tiptap/extension-document';\nimport HardBreak from '@tiptap/extension-hard-break';\nimport Paragraph from '@tiptap/extension-paragraph';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport Bold from '@tiptap/extension-bold';\nimport BulletList from '@tiptap/extension-bullet-list';\nimport Italic from '@tiptap/extension-italic';\nimport TipTapLink from '@tiptap/extension-link';\nimport ListItem from '@tiptap/extension-list-item';\nimport OrderedList from '@tiptap/extension-ordered-list';\nimport Strike from '@tiptap/extension-strike';\nimport Underline from '@tiptap/extension-underline';\nimport Text from '@tiptap/extension-text';\nimport TextAlign from '@tiptap/extension-text-align';\nimport History from '@tiptap/extension-history';\nimport Emoji from './extensions/emoji';\nimport CustomLink from './extensions/custom_link';\nimport { MentionPlugin } from './extensions/mentions/mention';\nimport { ChannelPlugin } from './extensions/channels/channel';\nimport { SlashCommandPlugin } from './extensions/slash_command/slash_command';\nimport {\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n} from './rich_text_editor_constants';\nimport { emojiPattern } from 'regex-combined-emojis';\n\nimport mentionSuggestion from './extensions/mentions/suggestion';\nimport channelSuggestion from './extensions/channels/suggestion';\nimport slashCommandSuggestion from './extensions/slash_command/suggestion';\nimport { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n name: 'DtRichTextEditor',\n\n components: {\n EditorContent,\n },\n\n props: {\n /**\n * Value of the input. The object format should match TipTap's JSON\n * document structure: https://tiptap.dev/guide/output#option-1-json\n */\n 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 * 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 * Whether the input allows for line breaks to be introduced in the text by pressing enter. If this is disabled,\n * line breaks can still be entered by pressing shift+enter.\n */\n allowLineBreaks: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Descriptive label for the input element\n */\n inputAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Additional class name for the input element. Only accepts a String value\n * because this is passed to the editor via options. For multiple classes,\n * join them into one string, e.g. \"d-p8 d-hmx96\"\n */\n inputClass: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the input should receive focus after the component has been\n * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n * - `start` Sets the focus to the beginning of the input\n * - `end` Sets the focus to the end of the input\n * - `all` Selects the whole contents of the input\n * - `Number` Sets the focus to a specific position in the input\n * - `true` Defaults to `start`\n * - `false` Disables autofocus\n * @values true, false, start, end, all, number\n */\n autoFocus: {\n type: [Boolean, String, Number],\n default: false,\n validator (autoFocus) {\n if (typeof autoFocus === 'string') {\n return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n }\n return true;\n },\n },\n\n /**\n * The output format that the editor uses when emitting the \"@input\" event.\n * One of `text`, `json`, `html`. See https://tiptap.dev/guide/output for\n * examples.\n * @values text, json, html\n */\n outputFormat: {\n type: String,\n default: 'html',\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 * Enables the TipTap Link extension and optionally passes configurations to it\n *\n * It is not recommended to use this and the custom link extension at the same time.\n */\n link: {\n type: [Boolean, Object],\n default: false,\n },\n\n /**\n * Enables the Custom Link extension and optionally passes configurations to it\n *\n * It is not recommended to use this and the built in TipTap link extension at the same time.\n *\n * The custom link does some additional things on top of the built in TipTap link\n * extension such as styling phone numbers and IP adresses as links, and allows you\n * to linkify text without having to type a space after the link. Currently it is missing some\n * functionality such as editing links and will likely require more work to be fully usable,\n * so it is recommended to use the built in TipTap link for now.\n */\n customLink: {\n type: [Boolean, Object],\n default: false,\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 * Note that slash commands only work when they are the first word in the input.\n */\n slashCommandSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * Whether the input allows for block quote.\n */\n allowBlockquote: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bold to be introduced in the text.\n */\n allowBold: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bullet list to be introduced in the text.\n */\n allowBulletList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for italic to be introduced in the text.\n */\n allowItalic: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for strike to be introduced in the text.\n */\n allowStrike: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for underline to be introduced in the text.\n */\n allowUnderline: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows codeblock to be introduced in the text.\n */\n allowCodeblock: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional TipTap extensions to be added to the editor.\n */\n additionalExtensions: {\n type: Array,\n default: () => [],\n },\n },\n\n emits: [\n /**\n * Editor input event\n * @event input\n * @type {String|JSON}\n */\n 'input',\n\n /**\n * Event to sync the value with the parent\n * @event update:value\n * @type {String|JSON}\n */\n 'update:modelValue',\n\n /**\n * Editor blur event\n * @event blur\n * @type {FocusEvent}\n */\n 'blur',\n\n /**\n * Editor focus event\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Enter was pressed. Note that shift enter must be pressed to line break the input.\n * @event enter\n * @type {String}\n */\n 'enter',\n ],\n\n data () {\n return {\n editor: null,\n };\n },\n\n computed: {\n attrs () {\n return {\n ...this.$attrs,\n onInput: () => {},\n onFocus: () => {},\n onBlur: () => {},\n };\n },\n\n // eslint-disable-next-line complexity\n extensions () {\n // These are the default extensions needed just for plain text.\n const extensions = [Document, Paragraph, Text, History];\n if (this.link) {\n extensions.push(TipTapLink.extend({ inclusive: false }).configure({\n HTMLAttributes: {\n class: 'd-link d-wb-break-all',\n },\n autolink: true,\n protocols: RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n }));\n }\n if (this.customLink) {\n extensions.push(this.getExtension(CustomLink, this.customLink));\n }\n if (this.allowBlockquote) {\n extensions.push(Blockquote);\n }\n if (this.allowBold) {\n extensions.push(Bold);\n }\n if (this.allowBulletList) {\n extensions.push(BulletList);\n extensions.push(ListItem);\n extensions.push(OrderedList);\n }\n if (this.allowItalic) {\n extensions.push(Italic);\n }\n if (this.allowStrike) {\n extensions.push(Strike);\n }\n if (this.allowUnderline) {\n extensions.push(Underline);\n }\n\n // Enable placeholderText\n if (this.placeholder) {\n extensions.push(\n Placeholder.configure({ placeholder: this.placeholder }),\n );\n }\n\n // make sure that this is defined before any other extensions\n // where Enter and Shift+Enter should have its own interaction. otherwise it will be ignored\n if (!this.allowLineBreaks) {\n const self = this;\n extensions.push(\n HardBreak.extend({\n addKeyboardShortcuts () {\n return {\n Enter: () => {\n self.$emit('enter');\n return true;\n },\n 'Shift-Enter': () => {\n this.editor.commands.setHardBreak();\n return true;\n },\n };\n },\n }),\n );\n } else {\n extensions.push(HardBreak);\n }\n\n if (this.mentionSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.mentionSuggestion, ...mentionSuggestion };\n extensions.push(MentionPlugin.configure({ suggestion: suggestionObject }));\n }\n\n if (this.channelSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.channelSuggestion, ...channelSuggestion };\n extensions.push(ChannelPlugin.configure({ suggestion: suggestionObject }));\n }\n\n if (this.slashCommandSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.slashCommandSuggestion, ...slashCommandSuggestion };\n extensions.push(SlashCommandPlugin.configure({ suggestion: suggestionObject }));\n }\n\n // Emoji has some interactions with Enter key\n // hence this should be done last otherwise the enter wont add a emoji.\n extensions.push(Emoji);\n\n extensions.push(TextAlign.configure({\n types: ['paragraph'],\n defaultAlignment: 'left',\n }));\n\n if (this.allowCodeblock) {\n extensions.push(CodeBlock.configure({\n HTMLAttributes: {\n class: 'd-rich-text-editor__code-block',\n },\n }));\n }\n\n if (this.additionalExtensions.length) {\n extensions.push(...this.additionalExtensions);\n }\n\n return extensions;\n },\n\n inputAttrs () {\n const attrs = {\n 'aria-label': this.inputAriaLabel,\n 'aria-multiline': true,\n role: 'textbox',\n };\n if (!this.editable) {\n attrs['aria-readonly'] = true;\n }\n return attrs;\n },\n },\n\n /**\n * Because the Editor instance is initialized when mounted it does not get\n * updated props automatically, so the ones that can change after mount have\n * to be hooked up to the Editor's own API.\n */\n watch: {\n editable (isEditable) {\n this.editor.setEditable(isEditable);\n this.updateEditorAttributes({ 'aria-readonly': !isEditable });\n },\n\n inputClass (newClass) {\n this.updateEditorAttributes({ class: newClass });\n },\n\n inputAriaLabel (newLabel) {\n this.updateEditorAttributes({ 'aria-label': newLabel });\n },\n\n extensions () {\n // Extensions can't be registered on the fly, so just recreate the editor.\n // https://github.com/ueberdosis/tiptap/issues/1044\n this.destroyEditor();\n this.createEditor();\n },\n\n modelValue (newValue) {\n this.processValue(newValue);\n },\n },\n\n created () {\n this.createEditor();\n },\n\n beforeUnmount () {\n this.destroyEditor();\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n this.processValue(this.modelValue, false);\n },\n\n methods: {\n\n createEditor () {\n // For all available options, see https://tiptap.dev/api/editor#settings\n this.editor = new Editor({\n autofocus: this.autoFocus,\n content: this.modelValue,\n editable: this.editable,\n extensions: this.extensions,\n editorProps: {\n attributes: {\n ...this.inputAttrs,\n class: this.inputClass,\n },\n\n // Moves the <br /> tags inside the previous closing tag to avoid\n // Prosemirror wrapping them within another </p> tag.\n transformPastedHTML (html) {\n return html.replace(/(<\\/\\w+>)((<br \\/>)+)/g, '$2$3$1');\n },\n },\n });\n this.addEditorListeners();\n },\n\n processValue (newValue, returnIfEqual = true) {\n let currentValue = this.getOutput();\n if (this.outputFormat === 'json') {\n newValue = JSON.stringify(newValue);\n currentValue = JSON.stringify(currentValue);\n }\n\n if (returnIfEqual && newValue === currentValue) {\n // The new value came from this component and was passed back down\n // through the parent, so don't do anything here.\n return;\n }\n\n const inputUnicodeRegex = new RegExp(`(${emojiPattern})`, 'g');\n\n // If the text contains emoji characters convert them to emoji component tags\n newValue = newValue.replace(inputUnicodeRegex, '<emoji-component code=\"$1\"></emoji-component>');\n\n // Otherwise replace the content (resets the cursor position).\n this.editor.commands.setContent(newValue, false);\n },\n\n destroyEditor () {\n this.editor.destroy();\n },\n\n /**\n * The Editor exposes event hooks that we have to map our emits into. See\n * https://tiptap.dev/api/events for all events.\n */\n addEditorListeners () {\n // The content has changed.\n this.editor.on('update', () => {\n const value = this.getOutput();\n // When preventTyping is true and user wants to type, we revert to last value\n // If Backspace (keyCode = 8) is pressed, we allow updating the text\n if (this.preventTyping && this.editor.view?.input?.lastKeyCode !== 8) {\n this.editor.commands.setContent(this.value, false);\n return;\n }\n this.$emit('input', value);\n this.$emit('update:modelValue', value);\n });\n\n // The editor is focused.\n this.editor.on('focus', ({ event }) => {\n this.$emit('focus', event);\n });\n\n // The editor isn’t focused anymore.\n this.editor.on('blur', ({ event }) => {\n this.$emit('blur', event);\n });\n },\n\n getOutput () {\n switch (this.outputFormat) {\n case 'json':\n return this.editor.getJSON();\n case 'html':\n return this.editor.getHTML();\n case 'text':\n default:\n return this.editor.getText({ blockSeparator: '\\n' });\n }\n },\n\n getExtension (extension, options) {\n if (typeof options === 'boolean') {\n return extension;\n }\n return extension.configure?.(options);\n },\n\n updateEditorAttributes (attributes) {\n this.editor.setOptions({\n editorProps: {\n attributes: {\n ...this.inputAttrs,\n class: this.inputClass,\n ...attributes,\n },\n },\n });\n },\n\n focusEditor () {\n this.editor.commands.focus();\n },\n },\n};\n</script>\n"],"names":["EditorContent","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","RICH_TEXT_EDITOR_OUTPUT_FORMATS","RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS","CustomLink","mentionSuggestion","MentionPlugin","channelSuggestion","ChannelPlugin","slashCommandSuggestion","SlashCommandPlugin","Emoji","warnIfUnmounted","Editor","emojiPattern","_openBlock","_createBlock","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,mBACVA,KAAa;AAAA,EACd;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,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