@dialpad/dialtone 9.139.0 → 9.140.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 (97) hide show
  1. package/dist/tokens/doc.json +59091 -59091
  2. package/dist/vue2/component-documentation.json +1 -1
  3. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  4. package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
  5. package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
  6. package/dist/vue2/lib/emoji-row/emoji-row.cjs.map +1 -1
  7. package/dist/vue2/lib/emoji-row/emoji-row.js +1 -1
  8. package/dist/vue2/lib/emoji-row/emoji-row.js.map +1 -1
  9. package/dist/vue2/lib/message-input/message-input.cjs +1 -1
  10. package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
  11. package/dist/vue2/lib/message-input/message-input.js +26 -18
  12. package/dist/vue2/lib/message-input/message-input.js.map +1 -1
  13. package/dist/vue2/lib/pagination/pagination.cjs +1 -1
  14. package/dist/vue2/lib/pagination/pagination.cjs.map +1 -1
  15. package/dist/vue2/lib/pagination/pagination.js +6 -3
  16. package/dist/vue2/lib/pagination/pagination.js.map +1 -1
  17. package/dist/vue2/lib/rich-text-editor/channel-suggestion.cjs.map +1 -1
  18. package/dist/vue2/lib/rich-text-editor/channel-suggestion.js.map +1 -1
  19. package/dist/vue2/lib/rich-text-editor/rich-text-editor-constants.cjs +1 -1
  20. package/dist/vue2/lib/rich-text-editor/rich-text-editor-constants.cjs.map +1 -1
  21. package/dist/vue2/lib/rich-text-editor/rich-text-editor-constants.js +2 -1
  22. package/dist/vue2/lib/rich-text-editor/rich-text-editor-constants.js.map +1 -1
  23. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +13 -4
  24. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  25. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +356 -225
  26. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  27. package/dist/vue2/lib/tooltip/tooltip.cjs +1 -1
  28. package/dist/vue2/lib/tooltip/tooltip.cjs.map +1 -1
  29. package/dist/vue2/lib/tooltip/tooltip.js +1 -1
  30. package/dist/vue2/lib/tooltip/tooltip.js.map +1 -1
  31. package/dist/vue2/lib/tooltip-directive/tooltip.cjs +1 -1
  32. package/dist/vue2/lib/tooltip-directive/tooltip.cjs.map +1 -1
  33. package/dist/vue2/lib/tooltip-directive/tooltip.js +19 -14
  34. package/dist/vue2/lib/tooltip-directive/tooltip.js.map +1 -1
  35. package/dist/vue2/localization/ja-JP.cjs +2 -0
  36. package/dist/vue2/localization/ja-JP.cjs.map +1 -1
  37. package/dist/vue2/localization/ja-JP.js +2 -0
  38. package/dist/vue2/localization/ja-JP.js.map +1 -1
  39. package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
  40. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/mention.d.ts.map +1 -1
  41. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +21 -1
  42. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  43. package/dist/vue2/types/components/rich_text_editor/rich_text_editor_constants.d.ts.map +1 -1
  44. package/dist/vue2/types/directives/tooltip_directive/tooltip.d.ts.map +1 -1
  45. package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
  46. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +2 -1
  47. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  48. package/dist/vue3/component-documentation.json +1 -1
  49. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  50. package/dist/vue3/lib/emoji-picker/emoji-picker.js.map +1 -1
  51. package/dist/vue3/lib/emoji-row/emoji-row.cjs +1 -1
  52. package/dist/vue3/lib/emoji-row/emoji-row.cjs.map +1 -1
  53. package/dist/vue3/lib/emoji-row/emoji-row.js +5 -4
  54. package/dist/vue3/lib/emoji-row/emoji-row.js.map +1 -1
  55. package/dist/vue3/lib/message-input/message-input.cjs +1 -1
  56. package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
  57. package/dist/vue3/lib/message-input/message-input.js +37 -28
  58. package/dist/vue3/lib/message-input/message-input.js.map +1 -1
  59. package/dist/vue3/lib/pagination/pagination.cjs +1 -1
  60. package/dist/vue3/lib/pagination/pagination.cjs.map +1 -1
  61. package/dist/vue3/lib/pagination/pagination.js +37 -32
  62. package/dist/vue3/lib/pagination/pagination.js.map +1 -1
  63. package/dist/vue3/lib/rich-text-editor/channel-suggestion.cjs.map +1 -1
  64. package/dist/vue3/lib/rich-text-editor/channel-suggestion.js.map +1 -1
  65. package/dist/vue3/lib/rich-text-editor/rich-text-editor-constants.cjs +1 -1
  66. package/dist/vue3/lib/rich-text-editor/rich-text-editor-constants.cjs.map +1 -1
  67. package/dist/vue3/lib/rich-text-editor/rich-text-editor-constants.js +2 -1
  68. package/dist/vue3/lib/rich-text-editor/rich-text-editor-constants.js.map +1 -1
  69. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +15 -6
  70. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  71. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +421 -278
  72. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  73. package/dist/vue3/lib/tooltip/tooltip.cjs +1 -1
  74. package/dist/vue3/lib/tooltip/tooltip.cjs.map +1 -1
  75. package/dist/vue3/lib/tooltip/tooltip.js +1 -1
  76. package/dist/vue3/lib/tooltip/tooltip.js.map +1 -1
  77. package/dist/vue3/lib/tooltip-directive/tooltip.cjs +1 -1
  78. package/dist/vue3/lib/tooltip-directive/tooltip.cjs.map +1 -1
  79. package/dist/vue3/lib/tooltip-directive/tooltip.js +19 -14
  80. package/dist/vue3/lib/tooltip-directive/tooltip.js.map +1 -1
  81. package/dist/vue3/localization/ja-JP.cjs +2 -0
  82. package/dist/vue3/localization/ja-JP.cjs.map +1 -1
  83. package/dist/vue3/localization/ja-JP.js +2 -0
  84. package/dist/vue3/localization/ja-JP.js.map +1 -1
  85. package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
  86. package/dist/vue3/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +1 -1
  87. package/dist/vue3/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts.map +1 -1
  88. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/mention.d.ts.map +1 -1
  89. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +22 -1
  90. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  91. package/dist/vue3/types/components/rich_text_editor/rich_text_editor_constants.d.ts.map +1 -1
  92. package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
  93. package/dist/vue3/types/directives/tooltip_directive/tooltip.d.ts.map +1 -1
  94. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
  95. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +3 -1
  96. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  97. package/package.json +3 -7
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.cjs","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"isFirstPage\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n importance=\"clear\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue2';\nimport { DialtoneLocalization } from '@/localization';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n\n /**\n * Sometimes you may need to hide start and end page number buttons when moving in between.\n * This prop will be used to hide the first and last page buttons when not near the edges.\n * This is useful when your backend does not support offset and you can only use cursor based pagination.\n */\n hideEdges: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n // eslint-disable-next-line complexity\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n let start = this.maxVisible - 1;\n let end = this.totalPages - start + 1;\n\n // if hideEdges is true, modify the start and\n // end to account for the hidden pages\n if (this.hideEdges) {\n start = start + 1;\n end = end - 1;\n }\n\n if (this.currentPage < start) {\n const pages = [...this.range(1, start), '...'];\n if (!this.hideEdges) {\n // add last page to the end\n pages.push(this.totalPages);\n }\n return pages;\n }\n\n if (this.currentPage > end) {\n const pages = ['...', ...this.range(end, this.totalPages)];\n if (!this.hideEdges) {\n // add first page to the beginning\n pages.unshift(1);\n }\n return pages;\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n let left = this.currentPage - centerIndex;\n let right = this.currentPage + centerIndex;\n\n // if hideEdge is true, modify the left and right to account for the hidden pages\n if (this.hideEdges) {\n left = left - 1;\n right = right + 1;\n }\n\n const pages = ['...', ...this.range(left, right), '...'];\n if (!this.hideEdges) {\n return [1, ...pages, this.totalPages];\n }\n return pages;\n },\n\n prevAriaLabel () {\n return this.isFirstPage ? this.i18n.$t('DIALTONE_PAGINATION_FIRST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_PREVIOUS_PAGE');\n },\n\n nextAriaLabel () {\n return this.isLastPage ? this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_NEXT_PAGE');\n },\n\n pageNumberAriaLabel () {\n return (page) => {\n return page === this.totalPages ? `${this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE')} ${page}` : `${this.i18n.$t('DIALTONE_PAGINATION_PAGE_NUMBER', { page })}`;\n };\n },\n },\n\n watch: {\n activePage () {\n this.currentPage = this.activePage;\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal","DialtoneLocalization","start","end","pages","total","centerIndex","left","right","page","from","to","range","i"],"mappings":"gSA0EAA,EAAA,CACA,KAAA,eAEA,WAAA,CACA,SAAAC,EAAAA,QACA,kBAAAC,EAAAA,kBACA,mBAAAC,EAAAA,mBACA,qBAAAC,EAAAA,oBACA,EAEA,MAAA,CAIA,UAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,WAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,WAAA,CACA,KAAA,OACA,QAAA,CACA,EAOA,WAAA,CACA,KAAA,OACA,QAAA,CACA,EAOA,UAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EAEA,MAAA,CAOA,QACA,EAEA,MAAA,CACA,MAAA,CACA,YAAA,KAAA,WACA,KAAA,IAAAC,EAAAA,oBACA,CACA,EAEA,SAAA,CACA,aAAA,CACA,OAAA,KAAA,cAAA,CACA,EAEA,YAAA,CACA,OAAA,KAAA,cAAA,KAAA,UACA,EAGA,OAAA,CACA,GAAA,KAAA,aAAA,EACA,MAAA,CAAA,EAEA,GAAA,KAAA,YAAA,KAAA,WACA,OAAA,KAAA,MAAA,EAAA,KAAA,UAAA,EAGA,IAAAC,EAAA,KAAA,WAAA,EACAC,EAAA,KAAA,WAAAD,EAAA,EASA,GALA,KAAA,YACAA,EAAAA,EAAA,EACAC,EAAAA,EAAA,GAGA,KAAA,YAAAD,EAAA,CACA,MAAAE,EAAA,CAAA,GAAA,KAAA,MAAA,EAAAF,CAAA,EAAA,KAAA,EACA,OAAA,KAAA,WAEAE,EAAA,KAAA,KAAA,UAAA,EAEAA,CACA,CAEA,GAAA,KAAA,YAAAD,EAAA,CACA,MAAAC,EAAA,CAAA,MAAA,GAAA,KAAA,MAAAD,EAAA,KAAA,UAAA,CAAA,EACA,OAAA,KAAA,WAEAC,EAAA,QAAA,CAAA,EAEAA,CACA,CAGA,MAAAC,EAAA,KAAA,YAAA,EAAA,KAAA,WAAA,GACAC,EAAA,KAAA,MAAAD,EAAA,CAAA,EACA,IAAAE,EAAA,KAAA,YAAAD,EACAE,EAAA,KAAA,YAAAF,EAGA,KAAA,YACAC,EAAAA,EAAA,EACAC,EAAAA,EAAA,GAGA,MAAAJ,EAAA,CAAA,MAAA,GAAA,KAAA,MAAAG,EAAAC,CAAA,EAAA,KAAA,EACA,OAAA,KAAA,UAGAJ,EAFA,CAAA,EAAA,GAAAA,EAAA,KAAA,UAAA,CAGA,EAEA,eAAA,CACA,OAAA,KAAA,YAAA,KAAA,KAAA,GAAA,gCAAA,EAAA,KAAA,KAAA,GAAA,mCAAA,CACA,EAEA,eAAA,CACA,OAAA,KAAA,WAAA,KAAA,KAAA,GAAA,+BAAA,EAAA,KAAA,KAAA,GAAA,+BAAA,CACA,EAEA,qBAAA,CACA,OAAAK,GACAA,IAAA,KAAA,WAAA,GAAA,KAAA,KAAA,GAAA,+BAAA,CAAA,IAAAA,CAAA,GAAA,GAAA,KAAA,KAAA,GAAA,kCAAA,CAAA,KAAAA,CAAA,CAAA,CAAA,EAEA,CACA,EAEA,MAAA,CACA,YAAA,CACA,KAAA,YAAA,KAAA,UACA,CACA,EAEA,QAAA,CACA,MAAAC,EAAAC,EAAA,CACA,MAAAC,EAAA,CAAA,EACAF,EAAAA,EAAA,EAAAA,EAAA,EACA,QAAAG,EAAAH,EAAAG,GAAAF,EAAAE,IACAD,EAAA,KAAAC,CAAA,EAEA,OAAAD,CACA,EAEA,WAAAH,EAAA,CACA,KAAA,YAAAA,EACA,KAAA,MAAA,SAAA,KAAA,WAAA,CACA,CACA,CACA"}
1
+ {"version":3,"file":"pagination.cjs","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n v-show=\"totalPages > 0\"\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"isFirstPage\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n importance=\"clear\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue2';\nimport { DialtoneLocalization } from '@/localization';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n\n /**\n * Sometimes you may need to hide start and end page number buttons when moving in between.\n * This prop will be used to hide the first and last page buttons when not near the edges.\n * This is useful when your backend does not support offset and you can only use cursor based pagination.\n */\n hideEdges: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n // eslint-disable-next-line complexity\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n let start = this.maxVisible - 1;\n let end = this.totalPages - start + 1;\n\n // if hideEdges is true, modify the start and\n // end to account for the hidden pages\n if (this.hideEdges) {\n start = start + 1;\n end = end - 1;\n }\n\n if (this.currentPage < start) {\n const pages = [...this.range(1, start), '...'];\n if (!this.hideEdges) {\n // add last page to the end\n pages.push(this.totalPages);\n }\n return pages;\n }\n\n if (this.currentPage > end) {\n const pages = ['...', ...this.range(end, this.totalPages)];\n if (!this.hideEdges) {\n // add first page to the beginning\n pages.unshift(1);\n }\n return pages;\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n let left = this.currentPage - centerIndex;\n let right = this.currentPage + centerIndex;\n\n // if hideEdge is true, modify the left and right to account for the hidden pages\n if (this.hideEdges) {\n left = left - 1;\n right = right + 1;\n }\n\n const pages = ['...', ...this.range(left, right), '...'];\n if (!this.hideEdges) {\n return [1, ...pages, this.totalPages];\n }\n return pages;\n },\n\n prevAriaLabel () {\n return this.isFirstPage ? this.i18n.$t('DIALTONE_PAGINATION_FIRST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_PREVIOUS_PAGE');\n },\n\n nextAriaLabel () {\n return this.isLastPage ? this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_NEXT_PAGE');\n },\n\n pageNumberAriaLabel () {\n return (page) => {\n return page === this.totalPages ? `${this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE')} ${page}` : `${this.i18n.$t('DIALTONE_PAGINATION_PAGE_NUMBER', { page })}`;\n };\n },\n },\n\n watch: {\n activePage () {\n this.currentPage = this.activePage;\n },\n\n totalPages (pages) {\n if (this.currentPage > pages || this.currentPage <= 0){\n this.currentPage = pages;\n }\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal","DialtoneLocalization","start","end","pages","total","centerIndex","left","right","page","from","to","range","i"],"mappings":"gSA2EAA,EAAA,CACA,KAAA,eAEA,WAAA,CACA,SAAAC,EAAAA,QACA,kBAAAC,EAAAA,kBACA,mBAAAC,EAAAA,mBACA,qBAAAC,EAAAA,oBACA,EAEA,MAAA,CAIA,UAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,WAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,WAAA,CACA,KAAA,OACA,QAAA,CACA,EAOA,WAAA,CACA,KAAA,OACA,QAAA,CACA,EAOA,UAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EAEA,MAAA,CAOA,QACA,EAEA,MAAA,CACA,MAAA,CACA,YAAA,KAAA,WACA,KAAA,IAAAC,EAAAA,oBACA,CACA,EAEA,SAAA,CACA,aAAA,CACA,OAAA,KAAA,cAAA,CACA,EAEA,YAAA,CACA,OAAA,KAAA,cAAA,KAAA,UACA,EAGA,OAAA,CACA,GAAA,KAAA,aAAA,EACA,MAAA,CAAA,EAEA,GAAA,KAAA,YAAA,KAAA,WACA,OAAA,KAAA,MAAA,EAAA,KAAA,UAAA,EAGA,IAAAC,EAAA,KAAA,WAAA,EACAC,EAAA,KAAA,WAAAD,EAAA,EASA,GALA,KAAA,YACAA,EAAAA,EAAA,EACAC,EAAAA,EAAA,GAGA,KAAA,YAAAD,EAAA,CACA,MAAAE,EAAA,CAAA,GAAA,KAAA,MAAA,EAAAF,CAAA,EAAA,KAAA,EACA,OAAA,KAAA,WAEAE,EAAA,KAAA,KAAA,UAAA,EAEAA,CACA,CAEA,GAAA,KAAA,YAAAD,EAAA,CACA,MAAAC,EAAA,CAAA,MAAA,GAAA,KAAA,MAAAD,EAAA,KAAA,UAAA,CAAA,EACA,OAAA,KAAA,WAEAC,EAAA,QAAA,CAAA,EAEAA,CACA,CAGA,MAAAC,EAAA,KAAA,YAAA,EAAA,KAAA,WAAA,GACAC,EAAA,KAAA,MAAAD,EAAA,CAAA,EACA,IAAAE,EAAA,KAAA,YAAAD,EACAE,EAAA,KAAA,YAAAF,EAGA,KAAA,YACAC,EAAAA,EAAA,EACAC,EAAAA,EAAA,GAGA,MAAAJ,EAAA,CAAA,MAAA,GAAA,KAAA,MAAAG,EAAAC,CAAA,EAAA,KAAA,EACA,OAAA,KAAA,UAGAJ,EAFA,CAAA,EAAA,GAAAA,EAAA,KAAA,UAAA,CAGA,EAEA,eAAA,CACA,OAAA,KAAA,YAAA,KAAA,KAAA,GAAA,gCAAA,EAAA,KAAA,KAAA,GAAA,mCAAA,CACA,EAEA,eAAA,CACA,OAAA,KAAA,WAAA,KAAA,KAAA,GAAA,+BAAA,EAAA,KAAA,KAAA,GAAA,+BAAA,CACA,EAEA,qBAAA,CACA,OAAAK,GACAA,IAAA,KAAA,WAAA,GAAA,KAAA,KAAA,GAAA,+BAAA,CAAA,IAAAA,CAAA,GAAA,GAAA,KAAA,KAAA,GAAA,kCAAA,CAAA,KAAAA,CAAA,CAAA,CAAA,EAEA,CACA,EAEA,MAAA,CACA,YAAA,CACA,KAAA,YAAA,KAAA,UACA,EAEA,WAAAL,EAAA,EACA,KAAA,YAAAA,GAAA,KAAA,aAAA,KACA,KAAA,YAAAA,EAEA,CACA,EAEA,QAAA,CACA,MAAAM,EAAAC,EAAA,CACA,MAAAC,EAAA,CAAA,EACAF,EAAAA,EAAA,EAAAA,EAAA,EACA,QAAAG,EAAAH,EAAAG,GAAAF,EAAAE,IACAD,EAAA,KAAAC,CAAA,EAEA,OAAAD,CACA,EAEA,WAAAH,EAAA,CACA,KAAA,YAAAA,EACA,KAAA,MAAA,SAAA,KAAA,WAAA,CACA,CACA,CACA"}
@@ -107,6 +107,9 @@ const P = {
107
107
  watch: {
108
108
  activePage() {
109
109
  this.currentPage = this.activePage;
110
+ },
111
+ totalPages(e) {
112
+ (this.currentPage > e || this.currentPage <= 0) && (this.currentPage = e);
110
113
  }
111
114
  },
112
115
  methods: {
@@ -124,7 +127,7 @@ const P = {
124
127
  };
125
128
  var _ = function() {
126
129
  var t = this, i = t._self._c;
127
- return i("nav", { staticClass: "d-pagination", attrs: { "aria-label": t.ariaLabel } }, [i("dt-button", { staticClass: "d-pagination__button", attrs: { "data-qa": "dt-pagination-prev", "aria-label": t.prevAriaLabel, kind: "muted", importance: "clear", disabled: t.isFirstPage }, on: { click: function(a) {
130
+ return i("nav", { directives: [{ name: "show", rawName: "v-show", value: t.totalPages > 0, expression: "totalPages > 0" }], staticClass: "d-pagination", attrs: { "aria-label": t.ariaLabel } }, [i("dt-button", { staticClass: "d-pagination__button", attrs: { "data-qa": "dt-pagination-prev", "aria-label": t.prevAriaLabel, kind: "muted", importance: "clear", disabled: t.isFirstPage }, on: { click: function(a) {
128
131
  return t.changePage(t.currentPage - 1);
129
132
  } }, scopedSlots: t._u([{ key: "icon", fn: function() {
130
133
  return [i("dt-icon-chevron-left", { attrs: { size: "300" } })];
@@ -142,8 +145,8 @@ var _ = function() {
142
145
  _,
143
146
  p
144
147
  );
145
- const I = m.exports;
148
+ const v = m.exports;
146
149
  export {
147
- I as default
150
+ v as default
148
151
  };
149
152
  //# sourceMappingURL=pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.js","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"isFirstPage\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n importance=\"clear\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue2';\nimport { DialtoneLocalization } from '@/localization';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n\n /**\n * Sometimes you may need to hide start and end page number buttons when moving in between.\n * This prop will be used to hide the first and last page buttons when not near the edges.\n * This is useful when your backend does not support offset and you can only use cursor based pagination.\n */\n hideEdges: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n // eslint-disable-next-line complexity\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n let start = this.maxVisible - 1;\n let end = this.totalPages - start + 1;\n\n // if hideEdges is true, modify the start and\n // end to account for the hidden pages\n if (this.hideEdges) {\n start = start + 1;\n end = end - 1;\n }\n\n if (this.currentPage < start) {\n const pages = [...this.range(1, start), '...'];\n if (!this.hideEdges) {\n // add last page to the end\n pages.push(this.totalPages);\n }\n return pages;\n }\n\n if (this.currentPage > end) {\n const pages = ['...', ...this.range(end, this.totalPages)];\n if (!this.hideEdges) {\n // add first page to the beginning\n pages.unshift(1);\n }\n return pages;\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n let left = this.currentPage - centerIndex;\n let right = this.currentPage + centerIndex;\n\n // if hideEdge is true, modify the left and right to account for the hidden pages\n if (this.hideEdges) {\n left = left - 1;\n right = right + 1;\n }\n\n const pages = ['...', ...this.range(left, right), '...'];\n if (!this.hideEdges) {\n return [1, ...pages, this.totalPages];\n }\n return pages;\n },\n\n prevAriaLabel () {\n return this.isFirstPage ? this.i18n.$t('DIALTONE_PAGINATION_FIRST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_PREVIOUS_PAGE');\n },\n\n nextAriaLabel () {\n return this.isLastPage ? this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_NEXT_PAGE');\n },\n\n pageNumberAriaLabel () {\n return (page) => {\n return page === this.totalPages ? `${this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE')} ${page}` : `${this.i18n.$t('DIALTONE_PAGINATION_PAGE_NUMBER', { page })}`;\n };\n },\n },\n\n watch: {\n activePage () {\n this.currentPage = this.activePage;\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal","DialtoneLocalization","start","end","pages","total","centerIndex","left","right","page","from","to","range","i"],"mappings":"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"}
1
+ {"version":3,"file":"pagination.js","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n v-show=\"totalPages > 0\"\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"isFirstPage\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n importance=\"clear\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue2';\nimport { DialtoneLocalization } from '@/localization';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n\n /**\n * Sometimes you may need to hide start and end page number buttons when moving in between.\n * This prop will be used to hide the first and last page buttons when not near the edges.\n * This is useful when your backend does not support offset and you can only use cursor based pagination.\n */\n hideEdges: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n // eslint-disable-next-line complexity\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n let start = this.maxVisible - 1;\n let end = this.totalPages - start + 1;\n\n // if hideEdges is true, modify the start and\n // end to account for the hidden pages\n if (this.hideEdges) {\n start = start + 1;\n end = end - 1;\n }\n\n if (this.currentPage < start) {\n const pages = [...this.range(1, start), '...'];\n if (!this.hideEdges) {\n // add last page to the end\n pages.push(this.totalPages);\n }\n return pages;\n }\n\n if (this.currentPage > end) {\n const pages = ['...', ...this.range(end, this.totalPages)];\n if (!this.hideEdges) {\n // add first page to the beginning\n pages.unshift(1);\n }\n return pages;\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n let left = this.currentPage - centerIndex;\n let right = this.currentPage + centerIndex;\n\n // if hideEdge is true, modify the left and right to account for the hidden pages\n if (this.hideEdges) {\n left = left - 1;\n right = right + 1;\n }\n\n const pages = ['...', ...this.range(left, right), '...'];\n if (!this.hideEdges) {\n return [1, ...pages, this.totalPages];\n }\n return pages;\n },\n\n prevAriaLabel () {\n return this.isFirstPage ? this.i18n.$t('DIALTONE_PAGINATION_FIRST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_PREVIOUS_PAGE');\n },\n\n nextAriaLabel () {\n return this.isLastPage ? this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_NEXT_PAGE');\n },\n\n pageNumberAriaLabel () {\n return (page) => {\n return page === this.totalPages ? `${this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE')} ${page}` : `${this.i18n.$t('DIALTONE_PAGINATION_PAGE_NUMBER', { page })}`;\n };\n },\n },\n\n watch: {\n activePage () {\n this.currentPage = this.activePage;\n },\n\n totalPages (pages) {\n if (this.currentPage > pages || this.currentPage <= 0){\n this.currentPage = pages;\n }\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal","DialtoneLocalization","start","end","pages","total","centerIndex","left","right","page","from","to","range","i"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"channel-suggestion.cjs","sources":["../../../components/rich_text_editor/channel_suggestion.js"],"sourcesContent":["/* eslint-disable max-len */\nexport default {\n items ({ query }) {\n const CHANNEL_LIST = [\n {\n id: 'dialpad',\n name: 'dialpad',\n },\n {\n id: 'dialtone',\n name: 'dialtone',\n },\n {\n id: 'dialtone-vue',\n name: 'dialtone-vue',\n },\n {\n id: 'dialtone-internal',\n name: 'dialtone-internal',\n locked: true,\n },\n ];\n\n if (query.length === 0) return CHANNEL_LIST;\n\n return CHANNEL_LIST.filter((channel) => { return channel.name.toLowerCase().startsWith(query.toLowerCase()); });\n },\n};\n"],"names":["channel_suggestion","query","CHANNEL_LIST","channel"],"mappings":"4GACA,MAAAA,EAAe,CACb,MAAO,CAAE,MAAAC,GAAS,CAChB,MAAMC,EAAe,CACnB,CACE,GAAI,UACJ,KAAM,SACd,EACM,CACE,GAAI,WACJ,KAAM,UACd,EACM,CACE,GAAI,eACJ,KAAM,cACd,EACM,CACE,GAAI,oBACJ,KAAM,oBACN,OAAQ,EAChB,CACA,EAEI,OAAID,EAAM,SAAW,EAAUC,EAExBA,EAAa,OAAQC,GAAqBA,EAAQ,KAAK,YAAW,EAAG,WAAWF,EAAM,YAAW,CAAE,CAAI,CAChH,CACF"}
1
+ {"version":3,"file":"channel-suggestion.cjs","sources":["../../../components/rich_text_editor/channel_suggestion.js"],"sourcesContent":["\nexport default {\n items ({ query }) {\n const CHANNEL_LIST = [\n {\n id: 'dialpad',\n name: 'dialpad',\n },\n {\n id: 'dialtone',\n name: 'dialtone',\n },\n {\n id: 'dialtone-vue',\n name: 'dialtone-vue',\n },\n {\n id: 'dialtone-internal',\n name: 'dialtone-internal',\n locked: true,\n },\n ];\n\n if (query.length === 0) return CHANNEL_LIST;\n\n return CHANNEL_LIST.filter((channel) => { return channel.name.toLowerCase().startsWith(query.toLowerCase()); });\n },\n};\n"],"names":["channel_suggestion","query","CHANNEL_LIST","channel"],"mappings":"4GACA,MAAAA,EAAe,CACb,MAAO,CAAE,MAAAC,GAAS,CAChB,MAAMC,EAAe,CACnB,CACE,GAAI,UACJ,KAAM,SACd,EACM,CACE,GAAI,WACJ,KAAM,UACd,EACM,CACE,GAAI,eACJ,KAAM,cACd,EACM,CACE,GAAI,oBACJ,KAAM,oBACN,OAAQ,EAChB,CACA,EAEI,OAAID,EAAM,SAAW,EAAUC,EAExBA,EAAa,OAAQC,GAAqBA,EAAQ,KAAK,YAAW,EAAG,WAAWF,EAAM,YAAW,CAAE,CAAI,CAChH,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"channel-suggestion.js","sources":["../../../components/rich_text_editor/channel_suggestion.js"],"sourcesContent":["/* eslint-disable max-len */\nexport default {\n items ({ query }) {\n const CHANNEL_LIST = [\n {\n id: 'dialpad',\n name: 'dialpad',\n },\n {\n id: 'dialtone',\n name: 'dialtone',\n },\n {\n id: 'dialtone-vue',\n name: 'dialtone-vue',\n },\n {\n id: 'dialtone-internal',\n name: 'dialtone-internal',\n locked: true,\n },\n ];\n\n if (query.length === 0) return CHANNEL_LIST;\n\n return CHANNEL_LIST.filter((channel) => { return channel.name.toLowerCase().startsWith(query.toLowerCase()); });\n },\n};\n"],"names":["channel_suggestion","query","CHANNEL_LIST","channel"],"mappings":"AACA,MAAAA,IAAe;AAAA,EACb,MAAO,EAAE,OAAAC,KAAS;AAChB,UAAMC,IAAe;AAAA,MACnB;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,MACd;AAAA,MACM;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,MACd;AAAA,MACM;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,MACd;AAAA,MACM;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,MAChB;AAAA,IACA;AAEI,WAAID,EAAM,WAAW,IAAUC,IAExBA,EAAa,OAAO,CAACC,MAAqBA,EAAQ,KAAK,YAAW,EAAG,WAAWF,EAAM,YAAW,CAAE,CAAI;AAAA,EAChH;AACF;"}
1
+ {"version":3,"file":"channel-suggestion.js","sources":["../../../components/rich_text_editor/channel_suggestion.js"],"sourcesContent":["\nexport default {\n items ({ query }) {\n const CHANNEL_LIST = [\n {\n id: 'dialpad',\n name: 'dialpad',\n },\n {\n id: 'dialtone',\n name: 'dialtone',\n },\n {\n id: 'dialtone-vue',\n name: 'dialtone-vue',\n },\n {\n id: 'dialtone-internal',\n name: 'dialtone-internal',\n locked: true,\n },\n ];\n\n if (query.length === 0) return CHANNEL_LIST;\n\n return CHANNEL_LIST.filter((channel) => { return channel.name.toLowerCase().startsWith(query.toLowerCase()); });\n },\n};\n"],"names":["channel_suggestion","query","CHANNEL_LIST","channel"],"mappings":"AACA,MAAAA,IAAe;AAAA,EACb,MAAO,EAAE,OAAAC,KAAS;AAChB,UAAMC,IAAe;AAAA,MACnB;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,MACd;AAAA,MACM;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,MACd;AAAA,MACM;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,MACd;AAAA,MACM;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,MAChB;AAAA,IACA;AAEI,WAAID,EAAM,WAAW,IAAUC,IAExBA,EAAa,OAAO,CAACC,MAAqBA,EAAQ,KAAK,YAAW,EAAG,WAAWF,EAAM,YAAW,CAAE,CAAI;AAAA,EAChH;AACF;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=["text","json","html"],_=["start","end","all"],t=["https","http","ftp","ftps","sftp","mailto"],O={RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS:t,RICH_TEXT_EDITOR_OUTPUT_FORMATS:T,RICH_TEXT_EDITOR_AUTOFOCUS_TYPES:_};exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=_;exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=T;exports.RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS=t;exports.default=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=["text","json","html","markdown"],_=["start","end","all"],t=["https","http","ftp","ftps","sftp","mailto"],O={RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS:t,RICH_TEXT_EDITOR_OUTPUT_FORMATS:T,RICH_TEXT_EDITOR_AUTOFOCUS_TYPES:_};exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=_;exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=T;exports.RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS=t;exports.default=O;
2
2
  //# sourceMappingURL=rich-text-editor-constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text-editor-constants.cjs","sources":["../../../components/rich_text_editor/rich_text_editor_constants.js"],"sourcesContent":["export const RICH_TEXT_EDITOR_OUTPUT_FORMATS = [\n 'text',\n 'json',\n 'html',\n];\n\nexport const RICH_TEXT_EDITOR_AUTOFOCUS_TYPES = [\n 'start',\n 'end',\n 'all',\n];\n\nexport const RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS = [\n 'https',\n 'http',\n 'ftp',\n 'ftps',\n 'sftp',\n 'mailto',\n];\n\nexport default {\n RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n};\n"],"names":["RICH_TEXT_EDITOR_OUTPUT_FORMATS","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS","rich_text_editor_constants"],"mappings":"4GAAY,MAACA,EAAkC,CAC7C,OACA,OACA,MACF,EAEaC,EAAmC,CAC9C,QACA,MACA,KACF,EAEaC,EAA4C,CACvD,QACA,OACA,MACA,OACA,OACA,QACF,EAEAC,EAAe,CACb,0CAAAD,EACA,gCAAAF,EACA,iCAAAC,CACF"}
1
+ {"version":3,"file":"rich-text-editor-constants.cjs","sources":["../../../components/rich_text_editor/rich_text_editor_constants.js"],"sourcesContent":["export const RICH_TEXT_EDITOR_OUTPUT_FORMATS = [\n 'text',\n 'json',\n 'html',\n 'markdown',\n];\n\nexport const RICH_TEXT_EDITOR_AUTOFOCUS_TYPES = [\n 'start',\n 'end',\n 'all',\n];\n\nexport const RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS = [\n 'https',\n 'http',\n 'ftp',\n 'ftps',\n 'sftp',\n 'mailto',\n];\n\nexport default {\n RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n};\n"],"names":["RICH_TEXT_EDITOR_OUTPUT_FORMATS","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS","rich_text_editor_constants"],"mappings":"4GAAY,MAACA,EAAkC,CAC7C,OACA,OACA,OACA,UACF,EAEaC,EAAmC,CAC9C,QACA,MACA,KACF,EAEaC,EAA4C,CACvD,QACA,OACA,MACA,OACA,OACA,QACF,EAEAC,EAAe,CACb,0CAAAD,EACA,gCAAAF,EACA,iCAAAC,CACF"}
@@ -1,7 +1,8 @@
1
1
  const t = [
2
2
  "text",
3
3
  "json",
4
- "html"
4
+ "html",
5
+ "markdown"
5
6
  ], T = [
6
7
  "start",
7
8
  "end",
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text-editor-constants.js","sources":["../../../components/rich_text_editor/rich_text_editor_constants.js"],"sourcesContent":["export const RICH_TEXT_EDITOR_OUTPUT_FORMATS = [\n 'text',\n 'json',\n 'html',\n];\n\nexport const RICH_TEXT_EDITOR_AUTOFOCUS_TYPES = [\n 'start',\n 'end',\n 'all',\n];\n\nexport const RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS = [\n 'https',\n 'http',\n 'ftp',\n 'ftps',\n 'sftp',\n 'mailto',\n];\n\nexport default {\n RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n};\n"],"names":["RICH_TEXT_EDITOR_OUTPUT_FORMATS","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS","rich_text_editor_constants"],"mappings":"AAAY,MAACA,IAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAAmC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAA4C;AAAA,EACvD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEAC,IAAe;AAAA,EACb,2CAAAD;AAAA,EACA,iCAAAF;AAAA,EACA,kCAAAC;AACF;"}
1
+ {"version":3,"file":"rich-text-editor-constants.js","sources":["../../../components/rich_text_editor/rich_text_editor_constants.js"],"sourcesContent":["export const RICH_TEXT_EDITOR_OUTPUT_FORMATS = [\n 'text',\n 'json',\n 'html',\n 'markdown',\n];\n\nexport const RICH_TEXT_EDITOR_AUTOFOCUS_TYPES = [\n 'start',\n 'end',\n 'all',\n];\n\nexport const RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS = [\n 'https',\n 'http',\n 'ftp',\n 'ftps',\n 'sftp',\n 'mailto',\n];\n\nexport default {\n RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n};\n"],"names":["RICH_TEXT_EDITOR_OUTPUT_FORMATS","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS","rich_text_editor_constants"],"mappings":"AAAY,MAACA,IAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAAmC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAA4C;AAAA,EACvD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEAC,IAAe;AAAA,EACb,2CAAAD;AAAA,EACA,iCAAAF;AAAA,EACA,kCAAAC;AACF;"}
@@ -1,10 +1,19 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("../../node_modules/@tiptap/vue-2.cjs"),l=require("@tiptap/core"),D=require("@tiptap/extension-blockquote"),B=require("@tiptap/extension-code-block"),q=require("@tiptap/extension-code"),j=require("@tiptap/extension-document"),$=require("@tiptap/extension-paragraph"),M=require("@tiptap/extension-placeholder"),H=require("@tiptap/extension-hard-break"),N=require("@tiptap/extension-bold"),V=require("@tiptap/extension-bullet-list"),F=require("@tiptap/extension-italic"),K=require("@tiptap/extension-link"),W=require("@tiptap/extension-list-item"),U=require("@tiptap/extension-ordered-list"),z=require("@tiptap/extension-strike"),X=require("@tiptap/extension-underline"),J=require("@tiptap/extension-text"),Y=require("@tiptap/extension-text-align"),G=require("@tiptap/extension-history"),Q=require("@tiptap/extension-text-style"),Z=require("@tiptap/extension-color"),ee=require("@tiptap/extension-font-family"),p=require("@tiptap/pm/state"),te=require("@tiptap/suggestion"),I=require("regex-combined-emojis"),u=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),P=require("../emoji/emoji.cjs"),f=require("../../common/emoji/index.cjs"),ne=require("../list-item/list-item.cjs"),b=require("../stack/stack.cjs"),v=require("tippy.js"),E=require("../../common/utils/index.cjs"),re=require("@tiptap/extension-image"),S=require("@tiptap/extension-mention"),A=require("../link/link.cjs"),w=require("./rich-text-editor-constants.cjs"),se=require("../avatar/avatar.cjs"),ie=require("@dialpad/dialtone-icons/vue2/hash"),oe=require("@dialpad/dialtone-icons/vue2/lock"),ae=require("deep-equal"),ce=require("../../localization/index.cjs"),le=require("../button/button.cjs"),de={name:"EmojiComponent",components:{NodeViewWrapper:c.NodeViewWrapper,DtEmoji:P.default},props:c.nodeViewProps};var ue=function(){var t=this,n=t._self._c;return n("node-view-wrapper",{staticClass:"d-d-inline-block d-va-bottom d-lh0"},[n("dt-emoji",{attrs:{size:"500",code:t.node.attrs.code}})],1)},me=[],he=u.n(de,ue,me);const fe=he.exports,pe={name:"SuggestionList",components:{DtListItem:ne.default},props:{items:{type:Array,required:!0},command:{type:Function,required:!0},itemComponent:{type:Object,required:!0},itemType:{type:String,required:!0}},data(){return{selectedIndex:0}},watch:{items(){this.selectedIndex=0}},methods:{onKeyDown({event:e}){return e.key==="ArrowUp"?(this.upHandler(),!0):e.key==="ArrowDown"?(this.downHandler(),!0):e.key==="Enter"||e.key==="Tab"?(this.selectHandler(),!0):!1},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length,this.scrollActiveElementIntoView()},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length,this.scrollActiveElementIntoView()},async scrollActiveElementIntoView(){await this.$nextTick();const e=this.$refs.suggestionList.querySelector(".d-list-item--highlighted");e&&e.scrollIntoView({behaviour:"smooth",block:"center"})},selectHandler(){this.selectItem(this.selectedIndex)},selectItem(e){const t=this.items[e];switch(this.itemType){case"emoji":this.command(t);return;case"mention":this.command({name:t.name,id:t.id,avatarSrc:t.avatarSrc});break;case"channel":this.command({name:t.name,id:t.id});break;case"slash-command":this.command({command:t.command});break}}}};var ge=function(){var t=this,n=t._self._c;return n("div",{staticClass:"d-popover__dialog d-suggestion-list__container"},[n("ul",{directives:[{name:"show",rawName:"v-show",value:t.items.length,expression:"items.length"}],ref:"suggestionList",staticClass:"d-suggestion-list"},t._l(t.items,function(r,s){return n("dt-list-item",{key:r.id,class:["d-suggestion-list__item",{"d-list-item--highlighted":s===t.selectedIndex}],attrs:{"navigation-type":"arrow-keys"},on:{click:function(i){return t.selectItem(s)},keydown:function(i){return i.preventDefault(),t.onKeyDown.apply(null,arguments)}}},[n(t.itemComponent,{tag:"component",attrs:{item:r}})],1)}),1)])},_e=[],ye=u.n(pe,ge,_e);const x=ye.exports,we={name:"EmojiSuggestion",components:{DtEmoji:P.default,DtStack:b.default},props:{item:{type:Object,required:!0}}};var be=function(){var t=this,n=t._self._c;return n("dt-stack",{attrs:{direction:"row",gap:"400"}},[n("dt-emoji",{attrs:{size:"200",code:t.item.code}}),t._v(" "+t._s(t.item.code)+" ")],1)},ve=[],xe=u.n(we,be,ve);const ke=xe.exports,k={name:"hideOnEsc",defaultValue:!0,fn({hide:e}){function t(n){n.keyCode===27&&e()}return{onShow(){document.addEventListener("keydown",t)},onHide(){document.removeEventListener("keydown",t)}}}},Te=20,Ce=(e,t,n)=>{var a,d;const r=(a=e.shortname)==null?void 0:a.replaceAll(":",""),s=(d=t.shortname)==null?void 0:d.replaceAll(":",""),i=r.startsWith(n),o=s.startsWith(n);return i&&!o?-1:!i&&o?1:r.localeCompare(s)},Ee={items:({query:e})=>{if(e.length<2)return[];const t=Object.values(f.getEmojiData());return e=e.toLowerCase(),t.filter(r=>{var s;return[r.name,(s=r.shortname)==null?void 0:s.replaceAll(":",""),...r.keywords||[]].some(i=>i&&i.startsWith(e))}).splice(0,Te).sort((r,s)=>Ce(r,s,e)).map(r=>({code:r.shortname}))},command:({editor:e,range:t,props:n})=>{var i,o;const r=e.view.state.selection.$to.nodeAfter;((i=r==null?void 0:r.text)==null?void 0:i.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:"emoji",attrs:n}]).run(),(o=window.getSelection())==null||o.collapseToEnd()},render:()=>{let e,t,n=!1;return{onStart:r=>{e=new c.VueRenderer(x,{parent:void 0,propsData:{itemComponent:ke,itemType:"emoji",...r},editor:r.editor}),r.clientRect&&(t=v("body",{getReferenceClientRect:r.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{n=!0},onHidden:()=>{n=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[k]}),r.items.length>0&&(t==null||t[0].show()))},onUpdate(r){e==null||e.updateProps(r),r.items.length>0?t==null||t[0].show():t==null||t[0].hide(),t==null||t[0].setProps({getReferenceClientRect:r.clientRect})},onKeyDown(r){var s;if(n)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(r)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},Se=/(:\w+:)$/,Re=new RegExp(I.emojiPattern+"$"),Le=e=>{if(e&&f.codeToEmojiData(e[0]))return{text:e[2]||e[0]}},$e=e=>[...e.matchAll(f.emojiShortCodeRegex)].filter(n=>f.codeToEmojiData(n[0])).map(n=>({index:n.index,text:n[0],match:n})),Ie=l.Node.create({name:"emoji",addOptions(){return{HTMLAttributes:{}}},group:"inline",inline:!0,selectable:!1,atom:!0,addNodeView(){return c.VueNodeViewRenderer(fe)},addAttributes(){return{code:{default:null},image:{default:null},name:{default:null}}},parseHTML(){return[{tag:"emoji-component"}]},renderText({node:e}){return f.stringToUnicode(f.codeToEmojiData(e.attrs.code).unicode_output)},renderHTML({HTMLAttributes:e}){return["emoji-component",l.mergeAttributes(this.options.HTMLAttributes,e)]},addInputRules(){return[new l.InputRule({find:e=>{const t=e.match(Se)||e.match(Re);if(t)return Le(t)},handler:({state:e,range:t,match:n})=>{const{tr:r}=e,s=t.from,i=t.to;r.replaceWith(s,i,this.type.create({code:n[0]}))}})]},addPasteRules(){return[l.nodePasteRule({find:$e,type:this.type,getAttributes(e){return{code:e[0],image:e[1],name:e[2]}}}),l.nodePasteRule({find:f.emojiRegex,type:this.type,getAttributes(e){return{code:e[0],image:e[1],name:e[2]}}})]},addProseMirrorPlugins(){return[te({char:":",pluginKey:new p.PluginKey("emoji"),editor:this.editor,...this.options.suggestion,...Ee})]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let n=!1;const{selection:r}=t,{empty:s,anchor:i}=r;return s?(t.doc.nodesBetween(i-1,i,(o,a)=>{if(o.type.name===this.name)return n=!0,e.insertText("",a,a+o.nodeSize),!1}),n):!1})}}});function Pe(e,t,n=()=>!0){const r=[];t.lastIndex=0;let s;for(;s=t.exec(e);)n(e,s)&&r.push(s);return r}function Ae(e,t){return!["#","@"].includes(e.charAt(t.index))&&!["#","@"].includes(e.charAt(t.index-1))}function Oe(e){const t=new RegExp("(?:"+[`[!?.,:;'"]`,"(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"].join("|"),"g");return e.replace(t,"")}function De(e,t){const n=e.slice(0,t+1).search(/\S+\s*$/),r=e.slice(t).search(/\s/);if(r<0){const s=e.slice(n);return{text:s,from:n,to:n+s.length}}return{text:e.slice(n,r+t),from:n,to:r+t}}function C(e,t,n,r){const s=De(e,t);if(r.lastIndex=0,!r.test(s.text))return s;const i=n==="left"?s.from-1:s.to+1;return i<=0||i>=e.length||i===t?s:C(e,i,n,r)}function Be(e,t,n,r){const s=Math.max(e.from-1,0),i=Math.min(e.to+1,t.content.size),o=l.getMarksBetween(s,i,t);for(const a of o)a.mark.type===r&&n.removeMark(a.from,a.to,r)}const R=E.getPhoneNumberRegex(1,15);function L(e,t,n,r,s,i){if(!e)return;let o=n-t-1;o=o<0?0:o;const a=r-t,d=C(e,o,"left",R),m=C(e,a,"right",R),h=e.slice(d.from,m.to);Pe(h,E.linkRegex,Ae).forEach(T=>{const g=Oe(T[0]),y=t+d.from+T.index+1,O=y+g.length;s.addMark(y,O,i.create())})}function qe(e){let t=!1;return new p.Plugin({key:new p.PluginKey("autolink"),appendTransaction:(n,r,s)=>{const i=n.some(h=>h.docChanged)&&!r.doc.eq(s.doc);if(t&&!i)return;const{tr:o}=s,{textContent:a}=s.doc;t||L(a,0,0,a.length,o,e.type),t=!0;const d=l.combineTransactionSteps(r.doc,[...n]);return l.getChangedRanges(d).forEach(({oldRange:h,newRange:_})=>{Be(_,s.doc,o,e.type),l.findChildrenInRange(s.doc,_,g=>g.isTextblock).forEach(({node:g,pos:y})=>{L(g.textContent,y,h.from,_.to,o,e.type)})}),o}})}const je={class:"d-link d-c-text d-d-inline-block d-wb-break-all",rel:"noopener noreferrer nofollow"},Me=l.Mark.create({name:"CustomLink",renderHTML({HTMLAttributes:e}){return["a",l.mergeAttributes(this.options.HTMLAttributes,e,je)]},renderText({node:e}){return e.attrs.text},addProseMirrorPlugins(){return[qe({type:this.type})]}}),He=re.extend({name:"ConfigurableImage",addAttributes(){return{src:{default:""},alt:{default:void 0},title:{default:void 0},width:{default:void 0},height:{default:void 0},style:{default:void 0}}}}).configure({inline:!0,allowBase64:!0}),Ne=$.extend({parseHTML(){return[{tag:"div"}]},renderHTML({HTMLAttributes:e}){return["div",l.mergeAttributes(this.options.HTMLAttributes,e),0]}}),Ve={name:"MentionComponent",components:{NodeViewWrapper:c.NodeViewWrapper,DtLink:A.default},props:c.nodeViewProps,computed:{text(){return"@"+this.$props.node.attrs.name}}};var Fe=function(){var t=this,n=t._self._c;return n("node-view-wrapper",{staticClass:"d-d-inline-block"},[n("dt-link",{attrs:{kind:"mention"}},[t._v(" "+t._s(t.text)+" ")])],1)},Ke=[],We=u.n(Ve,Fe,Ke);const Ue=We.exports,ze=S.extend({addNodeView(){return c.VueNodeViewRenderer(Ue)},parseHTML(){return[{tag:"mention-component"}]},addAttributes(){return{name:{default:""},avatarSrc:{default:""},id:{default:""}}},renderText({node:e}){return`@${e.attrs.id}`},renderHTML({HTMLAttributes:e}){return["mention-component",l.mergeAttributes(this.options.HTMLAttributes,e)]}}).configure({suggestion:{char:"@",pluginKey:new p.PluginKey("mentionSuggestion")}}),Xe={name:"ChannelComponent",components:{NodeViewWrapper:c.NodeViewWrapper,DtLink:A.default},props:c.nodeViewProps,computed:{text(){return"#"+this.$props.node.attrs.name}}};var Je=function(){var t=this,n=t._self._c;return n("node-view-wrapper",{staticClass:"d-d-inline-block"},[n("dt-link",{attrs:{kind:"mention"}},[t._v(" "+t._s(t.text)+" ")])],1)},Ye=[],Ge=u.n(Xe,Je,Ye);const Qe=Ge.exports,Ze=S.extend({name:"channel",addNodeView(){return c.VueNodeViewRenderer(Qe)},parseHTML(){return[{tag:"channel-component"}]},addAttributes(){return{name:{default:""},id:{default:""},locked:{default:!1}}},renderText({node:e}){return`#${e.attrs.id}`},renderHTML({HTMLAttributes:e}){return["channel-component",l.mergeAttributes(this.options.HTMLAttributes,e)]}}).configure({suggestion:{char:"#",pluginKey:new p.PluginKey("channelSuggestion")}}),et={name:"SlashCommandsComponent",components:{NodeViewWrapper:c.NodeViewWrapper},props:{...c.nodeViewProps},emits:["selected-command"],computed:{text(){return"/"+this.$props.node.attrs.command}},created(){var n,r,s;const e=this.$props.node.attrs.command;this.$emit("selected-command",e);const t=(s=(r=(n=this.editor)==null?void 0:n.storage)==null?void 0:r["slash-commands"])==null?void 0:s.onSelectedCommand;t&&typeof t=="function"&&t(e)}};var tt=function(){var t=this,n=t._self._c;return n("node-view-wrapper",{staticClass:"d-d-inline-block"},[t._v(" "+t._s(t.text)+" ")])},nt=[],rt=u.n(et,tt,nt);const st=rt.exports,it=(e,t)=>[...e.matchAll(t)].map(r=>{let s=r[2];return s.endsWith(" ")||(s+=" "),{index:r.index,text:s,match:r}}),ot=S.extend({name:"slash-commands",group:"inline",inline:!0,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),onSelectedCommand:null}},addStorage(){return{onSelectedCommand:this.options.onSelectedCommand}},addNodeView(){return c.VueNodeViewRenderer(st)},parseHTML(){return[{tag:"command-component"}]},addAttributes(){return{command:{default:""},parametersExample:{default:""},description:{default:""}}},renderText({node:e}){return`/${e.attrs.command}`},renderHTML({HTMLAttributes:e}){return["command-component",l.mergeAttributes(this.options.HTMLAttributes,e)]},addInputRules(){var n;const e=(n=this.options.suggestion)==null?void 0:n.items({query:""}).map(r=>r.command),t=new RegExp(`^((?:\\/)(${e.join("|")})) $`);return[l.nodeInputRule({find:t,type:this.type,getAttributes(r){return{command:r[2]}}})]},addPasteRules(){var n;const e=(n=this.options.suggestion)==null?void 0:n.items({query:""}).map(r=>r.command),t=new RegExp(`^((?:\\/)(${e.join("|")})) ?$`,"g");return[l.nodePasteRule({find:r=>it(r,t),type:this.type,getAttributes(r){return{command:r[0].trim()}}})]}}).configure({suggestion:{char:"/",pluginKey:new p.PluginKey("slashCommandSuggestion")}}),at={name:"MentionSuggestion",components:{DtAvatar:se.default,DtStack:b.default},props:{item:{type:Object,required:!0}},computed:{name(){return this.item.name},avatarSrc(){return this.item.avatarSrc},presence(){return this.item.presence},status(){return this.item.status},presenceText(){return this.item.presenceText},presenceFontColorClass(){return{active:"d-recipe-contact-row--active",busy:"d-recipe-contact-row--busy",away:"d-recipe-contact-row--away",offline:"d-recipe-contact-row--busy"}[this.presence]},showDetails(){return this.item.showDetails}}};var ct=function(){var t=this,n=t._self._c;return n("dt-stack",{staticClass:"d-mention-suggestion__container",attrs:{direction:"row",gap:"400"}},[n("dt-avatar",{attrs:{"full-name":t.name,"image-src":t.avatarSrc,"image-alt":t.name,"show-presence":t.showDetails,presence:t.presence,size:"sm"}}),n("dt-stack",{staticClass:"d-mention-suggestion__details-container",attrs:{gap:"100"}},[n("span",{staticClass:"d-mention-suggestion__name"},[t._v(" "+t._s(t.name)+" ")]),t.showDetails?n("dt-stack",{staticClass:"d-label--sm-plain",attrs:{direction:"row",gap:"300"}},[t.presenceText?n("span",{staticClass:"d-mention-suggestion__presence",class:[t.presenceFontColorClass]},[t._v(" "+t._s(t.presenceText)+" ")]):t._e(),t.status&&t.presenceText?n("div",{staticClass:"d-mention-suggestion__divider"},[t._v(" • ")]):t._e(),t.status?n("div",{staticClass:"d-mention-suggestion__status"},[t._v(" "+t._s(t.status)+" ")]):t._e()]):t._e()],1)],1)},lt=[],dt=u.n(at,ct,lt);const ut=dt.exports,mt={allowSpaces:!0,render:()=>{let e,t,n=!1;return{onStart:r=>{e=new c.VueRenderer(x,{parent:void 0,propsData:{itemComponent:ut,itemType:"mention",...r},editor:r.editor}),r.clientRect&&(t=v("body",{getReferenceClientRect:r.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{n=!0},onHidden:()=>{n=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[k]}),r.items.length>0&&(t==null||t[0].show()))},onUpdate(r){e==null||e.updateProps(r),r.items.length>0?t==null||t[0].show():t==null||t[0].hide(),r.clientRect&&(t==null||t[0].setProps({getReferenceClientRect:r.clientRect}))},onKeyDown(r){var s;if(n)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(r)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},ht={name:"ChannelSuggestion",components:{DtStack:b.default,DtIconHash:ie,DtIconLock:oe},props:{item:{type:Object,required:!0}},computed:{name(){return this.item.name}}};var ft=function(){var t=this,n=t._self._c;return n("dt-stack",{attrs:{direction:"row",gap:"400"}},[t.item.locked?n("dt-icon-lock",{attrs:{size:"300"}}):n("dt-icon-hash",{attrs:{size:"300"}}),n("span",[t._v(t._s(t.name))])],1)},pt=[],gt=u.n(ht,ft,pt);const _t=gt.exports,yt={allowSpaces:!0,render:()=>{let e,t,n=!1;return{onStart:r=>{e=new c.VueRenderer(x,{parent:void 0,propsData:{itemComponent:_t,itemType:"channel",...r},editor:r.editor}),r.clientRect&&(t=v("body",{getReferenceClientRect:r.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{n=!0},onHidden:()=>{n=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[k]}),r.items.length>0&&(t==null||t[0].show()))},onUpdate(r){e==null||e.updateProps(r),r.items.length>0?t==null||t[0].show():t==null||t[0].hide(),r.clientRect&&(t==null||t[0].setProps({getReferenceClientRect:r.clientRect}))},onKeyDown(r){var s;if(n)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(r)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},wt={name:"SlashCommandSuggestion",props:{item:{type:Object,required:!0}},computed:{command(){return this.item.command},description(){return this.item.description},parametersExample(){return this.item.parametersExample}}};var bt=function(){var t=this,n=t._self._c;return n("div",[n("div",{staticClass:"d-body--md-compact"},[n("span",[t._v("/"+t._s(t.command))]),t.parametersExample?n("span",[t._v(" "+t._s(t.parametersExample))]):t._e()]),n("div",{staticClass:"d-body--sm d-fc-tertiary"},[t._v(" "+t._s(t.description)+" ")])])},vt=[],xt=u.n(wt,bt,vt);const kt=xt.exports,Tt={allowSpaces:!0,startOfLine:!0,render:()=>{let e,t,n=!1;return{onStart:r=>{e=new c.VueRenderer(x,{parent:void 0,propsData:{itemComponent:kt,itemType:"slash-command",...r},editor:r.editor}),r.clientRect&&(t=v("body",{getReferenceClientRect:r.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{n=!0},onHidden:()=>{n=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[k]}),r.items.length>0&&(t==null||t[0].show()))},onUpdate(r){e==null||e.updateProps(r),r.items.length>0?t==null||t[0].show():t==null||t[0].hide(),r.clientRect&&(t==null||t[0].setProps({getReferenceClientRect:r.clientRect}))},onKeyDown(r){var s;if(n)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(r)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},Ct={name:"DtRichTextEditor",components:{EditorContent:c.EditorContent,BubbleMenu:c.BubbleMenu,DtButton:le.default,DtStack:b.default},props:{value:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},preventTyping:{type:Boolean,default:!1},pasteRichText:{type:Boolean,default:!0},allowLineBreaks:{type:Boolean,default:!1},inputAriaLabel:{type:String,required:!0},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(e){return typeof e=="string"?w.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(e):!0}},outputFormat:{type:String,default:"html",validator(e){return w.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(e)}},placeholder:{type:String,default:""},link:{type:[Boolean,Object],default:!1},customLink:{type:[Boolean,Object],default:!1},mentionSuggestion:{type:Object,default:null},channelSuggestion:{type:Object,default:null},slashCommandSuggestion:{type:Object,default:null},allowBlockquote:{type:Boolean,default:!0},allowBold:{type:Boolean,default:!0},allowBulletList:{type:Boolean,default:!0},allowItalic:{type:Boolean,default:!0},allowStrike:{type:Boolean,default:!0},allowUnderline:{type:Boolean,default:!0},allowCode:{type:Boolean,default:!0},allowCodeblock:{type:Boolean,default:!0},allowInlineImages:{type:Boolean,default:!1},allowFontColor:{type:Boolean,default:!1},allowFontFamily:{type:Boolean,default:!1},additionalExtensions:{type:Array,default:()=>[]},hideLinkBubbleMenu:{type:Boolean,default:!1},useDivTags:{type:Boolean,default:!1}},emits:["input","json-input","html-input","text-input","update:value","blur","focus","enter","edit-link","selected","selected-command"],data(){return{editor:null,tippyOptions:{appendTo:()=>{var e;return(e=this.$refs.editor.$el.getRootNode())==null?void 0:e.querySelector("body")},placement:"top-start"},i18n:new ce.DialtoneLocalization}},computed:{editorListeners(){return{...this.$listeners,input:()=>{},focus:()=>{},blur:()=>{}}},extensions(){const e=[j,J,G,H];e.push(this.useDivTags?Ne:$),this.allowBold&&e.push(N),this.allowBlockquote&&e.push(D),this.allowBulletList&&(e.push(V),e.push(W.extend({renderText({node:r}){return r.textContent}})),e.push(U)),this.allowItalic&&e.push(F),this.allowStrike&&e.push(z),this.allowUnderline&&e.push(X),this.placeholder&&e.push(M.configure({placeholder:this.placeholder}));const t=this,n=l.Extension.create({addKeyboardShortcuts(){return{"Shift-Enter":({editor:r})=>t.allowLineBreaks?!1:(r.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>t.allowBulletList&&s.splitListItem("listItem"),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),!0),Enter:()=>t.allowLineBreaks?!1:(t.$emit("enter"),!0)}}});if(e.push(n),this.link&&e.push(K.extend({inclusive:!1,addKeyboardShortcuts(){return{"Mod-k":()=>(t.$emit("edit-link"),!0)}}}).configure({HTMLAttributes:{class:"d-link d-wb-break-all"},openOnClick:!1,autolink:!0,protocols:w.RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS})),this.customLink&&e.push(this.getExtension(Me,this.customLink)),this.mentionSuggestion){const r={...this.mentionSuggestion,...mt};e.push(ze.configure({suggestion:r}))}if(this.channelSuggestion){const r={...this.channelSuggestion,...yt};e.push(Ze.configure({suggestion:r}))}if(this.slashCommandSuggestion){const r={...this.slashCommandSuggestion,...Tt};e.push(ot.configure({suggestion:r,onSelectedCommand:s=>{this.$emit("selected-command",s)}}))}return e.push(Ie),e.push(Y.configure({types:["paragraph"]})),this.allowCode&&e.push(q),this.allowCodeblock&&e.push(B.extend({renderText({node:r}){return`\`\`\`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("../../node_modules/@tiptap/vue-2.cjs"),d=require("@tiptap/core"),M=require("@tiptap/extension-blockquote"),O=require("@tiptap/extension-code-block"),A=require("@tiptap/extension-code"),D=require("@tiptap/extension-document"),$=require("@tiptap/extension-paragraph"),j=require("@tiptap/extension-placeholder"),q=require("@tiptap/extension-hard-break"),H=require("@tiptap/extension-bold"),V=require("@tiptap/extension-bullet-list"),F=require("@tiptap/extension-italic"),K=require("@tiptap/extension-link"),W=require("@tiptap/extension-list-item"),U=require("@tiptap/extension-ordered-list"),z=require("@tiptap/extension-strike"),X=require("@tiptap/extension-underline"),J=require("@tiptap/extension-text"),Y=require("@tiptap/extension-text-align"),G=require("@tiptap/extension-history"),Q=require("@tiptap/extension-text-style"),Z=require("@tiptap/extension-color"),ee=require("@tiptap/extension-font-family"),f=require("@tiptap/pm/state"),te=require("@tiptap/suggestion"),I=require("regex-combined-emojis"),u=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),N=require("../emoji/emoji.cjs"),p=require("../../common/emoji/index.cjs"),ne=require("../list-item/list-item.cjs"),_=require("../stack/stack.cjs"),b=require("tippy.js"),E=require("../../common/utils/index.cjs"),re=require("@tiptap/extension-image"),S=require("@tiptap/extension-mention"),P=require("../link/link.cjs"),se=require("@dialpad/dialtone-icons/vue2"),y=require("./rich-text-editor-constants.cjs"),oe=require("../avatar/avatar.cjs"),ie=require("@dialpad/dialtone-icons/vue2/hash"),ae=require("@dialpad/dialtone-icons/vue2/lock"),ce=require("deep-equal"),de=require("../../localization/index.cjs"),le=require("../button/button.cjs"),ue={name:"EmojiComponent",components:{NodeViewWrapper:c.NodeViewWrapper,DtEmoji:N.default},props:c.nodeViewProps};var me=function(){var t=this,n=t._self._c;return n("node-view-wrapper",{staticClass:"d-d-inline-block d-va-bottom d-lh0"},[n("dt-emoji",{attrs:{size:"500",code:t.node.attrs.code}})],1)},he=[],pe=u.n(ue,me,he);const fe=pe.exports,ge={name:"SuggestionList",components:{DtListItem:ne.default},props:{items:{type:Array,required:!0},command:{type:Function,required:!0},itemComponent:{type:Object,required:!0},itemType:{type:String,required:!0}},data(){return{selectedIndex:0}},watch:{items(){this.selectedIndex=0}},methods:{onKeyDown({event:e}){return e.key==="ArrowUp"?(this.upHandler(),!0):e.key==="ArrowDown"?(this.downHandler(),!0):e.key==="Enter"||e.key==="Tab"?(this.selectHandler(),!0):!1},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length,this.scrollActiveElementIntoView()},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length,this.scrollActiveElementIntoView()},async scrollActiveElementIntoView(){await this.$nextTick();const e=this.$refs.suggestionList.querySelector(".d-list-item--highlighted");e&&e.scrollIntoView({behaviour:"smooth",block:"center"})},selectHandler(){this.selectItem(this.selectedIndex)},selectItem(e){const t=this.items[e];switch(this.itemType){case"emoji":this.command(t);return;case"mention":this.command({name:t.name,id:t.id,avatarSrc:t.avatarSrc});break;case"channel":this.command({name:t.name,id:t.id,locked:t.locked});break;case"slash-command":this.command({command:t.command});break}}}};var _e=function(){var t=this,n=t._self._c;return n("div",{staticClass:"d-popover__dialog d-suggestion-list__container"},[n("ul",{directives:[{name:"show",rawName:"v-show",value:t.items.length,expression:"items.length"}],ref:"suggestionList",staticClass:"d-suggestion-list"},t._l(t.items,function(r,s){return n("dt-list-item",{key:r.id,class:["d-suggestion-list__item",{"d-list-item--highlighted":s===t.selectedIndex}],attrs:{"navigation-type":"arrow-keys"},on:{click:function(o){return t.selectItem(s)},keydown:function(o){return o.preventDefault(),t.onKeyDown.apply(null,arguments)}}},[n(t.itemComponent,{tag:"component",attrs:{item:r}})],1)}),1)])},ke=[],we=u.n(ge,_e,ke);const C=we.exports,ye={name:"EmojiSuggestion",components:{DtEmoji:N.default,DtStack:_.default},props:{item:{type:Object,required:!0}}};var be=function(){var t=this,n=t._self._c;return n("dt-stack",{attrs:{direction:"row",gap:"400"}},[n("dt-emoji",{attrs:{size:"200",code:t.item.code}}),t._v(" "+t._s(t.item.code)+" ")],1)},Ce=[],ve=u.n(ye,be,Ce);const xe=ve.exports,v={name:"hideOnEsc",defaultValue:!0,fn({hide:e}){function t(n){n.keyCode===27&&e()}return{onShow(){document.addEventListener("keydown",t)},onHide(){document.removeEventListener("keydown",t)}}}},Te=20,Ee=(e,t,n)=>{var a,l;const r=(a=e.shortname)==null?void 0:a.replaceAll(":",""),s=(l=t.shortname)==null?void 0:l.replaceAll(":",""),o=r.startsWith(n),i=s.startsWith(n);return o&&!i?-1:!o&&i?1:r.localeCompare(s)},Se={items:({query:e})=>{if(e.length<2)return[];const t=Object.values(p.getEmojiData());return e=e.toLowerCase(),t.filter(r=>{var s;return[r.name,(s=r.shortname)==null?void 0:s.replaceAll(":",""),...r.keywords||[]].some(o=>o&&o.startsWith(e))}).splice(0,Te).sort((r,s)=>Ee(r,s,e)).map(r=>({code:r.shortname}))},command:({editor:e,range:t,props:n})=>{var o,i;const r=e.view.state.selection.$to.nodeAfter;((o=r==null?void 0:r.text)==null?void 0:o.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:"emoji",attrs:n}]).run(),(i=window.getSelection())==null||i.collapseToEnd()},render:()=>{let e,t,n=!1;return{onStart:r=>{e=new c.VueRenderer(C,{parent:void 0,propsData:{itemComponent:xe,itemType:"emoji",...r},editor:r.editor}),r.clientRect&&(t=b("body",{getReferenceClientRect:r.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{n=!0},onHidden:()=>{n=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[v]}),r.items.length>0&&(t==null||t[0].show()))},onUpdate(r){e==null||e.updateProps(r),r.items.length>0?t==null||t[0].show():t==null||t[0].hide(),t==null||t[0].setProps({getReferenceClientRect:r.clientRect})},onKeyDown(r){var s;if(n)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(r)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},Le=/(:\w+:)$/,Re=new RegExp(I.emojiPattern+"$"),$e=e=>{if(e&&p.codeToEmojiData(e[0]))return{text:e[2]||e[0]}},Ie=e=>[...e.matchAll(p.emojiShortCodeRegex)].filter(n=>p.codeToEmojiData(n[0])).map(n=>({index:n.index,text:n[0],match:n})),Ne=d.Node.create({name:"emoji",addOptions(){return{HTMLAttributes:{}}},group:"inline",inline:!0,selectable:!1,atom:!0,addNodeView(){return c.VueNodeViewRenderer(fe)},addAttributes(){return{code:{default:null},image:{default:null},name:{default:null}}},parseHTML(){return[{tag:"emoji-component"}]},renderText({node:e}){return p.stringToUnicode(p.codeToEmojiData(e.attrs.code).unicode_output)},renderHTML({HTMLAttributes:e}){return["emoji-component",d.mergeAttributes(this.options.HTMLAttributes,e)]},addInputRules(){return[new d.InputRule({find:e=>{const t=e.match(Le)||e.match(Re);if(t)return $e(t)},handler:({state:e,range:t,match:n})=>{const{tr:r}=e,s=t.from,o=t.to;r.replaceWith(s,o,this.type.create({code:n[0]}))}})]},addPasteRules(){return[d.nodePasteRule({find:Ie,type:this.type,getAttributes(e){return{code:e[0],image:e[1],name:e[2]}}}),d.nodePasteRule({find:p.emojiRegex,type:this.type,getAttributes(e){return{code:e[0],image:e[1],name:e[2]}}})]},addProseMirrorPlugins(){return[te({char:":",pluginKey:new f.PluginKey("emoji"),editor:this.editor,...this.options.suggestion,...Se})]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let n=!1;const{selection:r}=t,{empty:s,anchor:o}=r;return s?(t.doc.nodesBetween(o-1,o,(i,a)=>{if(i.type.name===this.name)return n=!0,e.insertText("",a,a+i.nodeSize),!1}),n):!1})}}});function Pe(e,t,n=()=>!0){const r=[];t.lastIndex=0;let s;for(;s=t.exec(e);)n(e,s)&&r.push(s);return r}function Be(e,t){return!["#","@"].includes(e.charAt(t.index))&&!["#","@"].includes(e.charAt(t.index-1))}function Me(e){const t=new RegExp("(?:"+[`[!?.,:;'"]`,"(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"].join("|"),"g");return e.replace(t,"")}function Oe(e,t){const n=e.slice(0,t+1).search(/\S+\s*$/),r=e.slice(t).search(/\s/);if(r<0){const s=e.slice(n);return{text:s,from:n,to:n+s.length}}return{text:e.slice(n,r+t),from:n,to:r+t}}function T(e,t,n,r){const s=Oe(e,t);if(r.lastIndex=0,!r.test(s.text))return s;const o=n==="left"?s.from-1:s.to+1;return o<=0||o>=e.length||o===t?s:T(e,o,n,r)}function Ae(e,t,n,r){const s=Math.max(e.from-1,0),o=Math.min(e.to+1,t.content.size),i=d.getMarksBetween(s,o,t);for(const a of i)a.mark.type===r&&n.removeMark(a.from,a.to,r)}const L=E.getPhoneNumberRegex(1,15);function R(e,t,n,r,s,o){if(!e)return;let i=n-t-1;i=i<0?0:i;const a=r-t,l=T(e,i,"left",L),m=T(e,a,"right",L),h=e.slice(l.from,m.to);Pe(h,E.linkRegex,Be).forEach(x=>{const g=Me(x[0]),w=t+l.from+x.index+1,B=w+g.length;s.addMark(w,B,o.create())})}function De(e){let t=!1;return new f.Plugin({key:new f.PluginKey("autolink"),appendTransaction:(n,r,s)=>{const o=n.some(h=>h.docChanged)&&!r.doc.eq(s.doc);if(t&&!o)return;const{tr:i}=s,{textContent:a}=s.doc;t||R(a,0,0,a.length,i,e.type),t=!0;const l=d.combineTransactionSteps(r.doc,[...n]);return d.getChangedRanges(l).forEach(({oldRange:h,newRange:k})=>{Ae(k,s.doc,i,e.type),d.findChildrenInRange(s.doc,k,g=>g.isTextblock).forEach(({node:g,pos:w})=>{R(g.textContent,w,h.from,k.to,i,e.type)})}),i}})}const je={class:"d-link d-c-text d-d-inline-block d-wb-break-all",rel:"noopener noreferrer nofollow"},qe=d.Mark.create({name:"CustomLink",renderHTML({HTMLAttributes:e}){return["a",d.mergeAttributes(this.options.HTMLAttributes,e,je)]},renderText({node:e}){return e.attrs.text},addProseMirrorPlugins(){return[De({type:this.type})]}}),He=re.extend({name:"ConfigurableImage",addAttributes(){return{src:{default:""},alt:{default:void 0},title:{default:void 0},width:{default:void 0},height:{default:void 0},style:{default:void 0}}}}).configure({inline:!0,allowBase64:!0}),Ve=$.extend({parseHTML(){return[{tag:"div"}]},renderHTML({HTMLAttributes:e}){return["div",d.mergeAttributes(this.options.HTMLAttributes,e),0]}}),Fe={name:"MentionComponent",components:{NodeViewWrapper:c.NodeViewWrapper,DtLink:P.default},props:c.nodeViewProps,computed:{text(){return"@"+this.$props.node.attrs.name}}};var Ke=function(){var t=this,n=t._self._c;return n("node-view-wrapper",{staticClass:"d-d-inline-block"},[n("dt-link",{attrs:{kind:"mention"}},[t._v(" "+t._s(t.text)+" ")])],1)},We=[],Ue=u.n(Fe,Ke,We);const ze=Ue.exports,Xe=S.extend({addNodeView(){return c.VueNodeViewRenderer(ze)},parseHTML(){return[{tag:"mention-component"}]},addAttributes(){return{name:{default:""},avatarSrc:{default:""},id:{default:""},contactKey:{default:""}}},renderText({node:e}){return`@${e.attrs.id}`},renderHTML({HTMLAttributes:e}){return["mention-component",d.mergeAttributes(this.options.HTMLAttributes,e)]}}).configure({suggestion:{char:"@",pluginKey:new f.PluginKey("mentionSuggestion")}}),Je={name:"ChannelComponent",components:{NodeViewWrapper:c.NodeViewWrapper,DtLink:P.default,DtIconLock:se.DtIconLock,DtStack:_.default},props:c.nodeViewProps,computed:{text(){return this.$props.node.attrs.locked?this.$props.node.attrs.name:"#"+this.$props.node.attrs.name}}};var Ye=function(){var t=this,n=t._self._c;return n("node-view-wrapper",{staticClass:"d-d-inline-block"},[n("dt-link",{attrs:{kind:"mention"}},[n("dt-stack",{attrs:{direction:"row",gap:"0"}},[t.$props.node.attrs.locked?n("dt-icon-lock",{attrs:{size:"200"}}):t._e(),n("span",[t._v(t._s(t.text))])],1)],1)],1)},Ge=[],Qe=u.n(Je,Ye,Ge);const Ze=Qe.exports,et=S.extend({name:"channel",addNodeView(){return c.VueNodeViewRenderer(Ze)},parseHTML(){return[{tag:"channel-component"}]},addAttributes(){return{name:{default:""},id:{default:""},locked:{default:!1}}},renderText({node:e}){return`#${e.attrs.id}`},renderHTML({HTMLAttributes:e}){return["channel-component",d.mergeAttributes(this.options.HTMLAttributes,e)]}}).configure({suggestion:{char:"#",pluginKey:new f.PluginKey("channelSuggestion")}}),tt={name:"SlashCommandsComponent",components:{NodeViewWrapper:c.NodeViewWrapper},props:{...c.nodeViewProps},emits:["selected-command"],computed:{text(){return"/"+this.$props.node.attrs.command}},created(){var n,r,s;const e=this.$props.node.attrs.command;this.$emit("selected-command",e);const t=(s=(r=(n=this.editor)==null?void 0:n.storage)==null?void 0:r["slash-commands"])==null?void 0:s.onSelectedCommand;t&&typeof t=="function"&&t(e)}};var nt=function(){var t=this,n=t._self._c;return n("node-view-wrapper",{staticClass:"d-d-inline-block"},[t._v(" "+t._s(t.text)+" ")])},rt=[],st=u.n(tt,nt,rt);const ot=st.exports,it=(e,t)=>[...e.matchAll(t)].map(r=>{let s=r[2];return s.endsWith(" ")||(s+=" "),{index:r.index,text:s,match:r}}),at=S.extend({name:"slash-commands",group:"inline",inline:!0,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),onSelectedCommand:null}},addStorage(){return{onSelectedCommand:this.options.onSelectedCommand}},addNodeView(){return c.VueNodeViewRenderer(ot)},parseHTML(){return[{tag:"command-component"}]},addAttributes(){return{command:{default:""},parametersExample:{default:""},description:{default:""}}},renderText({node:e}){return`/${e.attrs.command}`},renderHTML({HTMLAttributes:e}){return["command-component",d.mergeAttributes(this.options.HTMLAttributes,e)]},addInputRules(){var n;const e=(n=this.options.suggestion)==null?void 0:n.items({query:""}).map(r=>r.command),t=new RegExp(`^((?:\\/)(${e.join("|")})) $`);return[d.nodeInputRule({find:t,type:this.type,getAttributes(r){return{command:r[2]}}})]},addPasteRules(){var n;const e=(n=this.options.suggestion)==null?void 0:n.items({query:""}).map(r=>r.command),t=new RegExp(`^((?:\\/)(${e.join("|")})) ?$`,"g");return[d.nodePasteRule({find:r=>it(r,t),type:this.type,getAttributes(r){return{command:r[0].trim()}}})]}}).configure({suggestion:{char:"/",pluginKey:new f.PluginKey("slashCommandSuggestion")}}),ct={name:"MentionSuggestion",components:{DtAvatar:oe.default,DtStack:_.default},props:{item:{type:Object,required:!0}},computed:{name(){return this.item.name},avatarSrc(){return this.item.avatarSrc},presence(){return this.item.presence},status(){return this.item.status},presenceText(){return this.item.presenceText},presenceFontColorClass(){return{active:"d-recipe-contact-row--active",busy:"d-recipe-contact-row--busy",away:"d-recipe-contact-row--away",offline:"d-recipe-contact-row--busy"}[this.presence]},showDetails(){return this.item.showDetails}}};var dt=function(){var t=this,n=t._self._c;return n("dt-stack",{staticClass:"d-mention-suggestion__container",attrs:{direction:"row",gap:"400"}},[n("dt-avatar",{attrs:{"full-name":t.name,"image-src":t.avatarSrc,"image-alt":t.name,"show-presence":t.showDetails,presence:t.presence,size:"sm"}}),n("dt-stack",{staticClass:"d-mention-suggestion__details-container",attrs:{gap:"100"}},[n("span",{staticClass:"d-mention-suggestion__name"},[t._v(" "+t._s(t.name)+" ")]),t.showDetails?n("dt-stack",{staticClass:"d-label--sm-plain",attrs:{direction:"row",gap:"300"}},[t.presenceText?n("span",{staticClass:"d-mention-suggestion__presence",class:[t.presenceFontColorClass]},[t._v(" "+t._s(t.presenceText)+" ")]):t._e(),t.status&&t.presenceText?n("div",{staticClass:"d-mention-suggestion__divider"},[t._v(" • ")]):t._e(),t.status?n("div",{staticClass:"d-mention-suggestion__status"},[t._v(" "+t._s(t.status)+" ")]):t._e()]):t._e()],1)],1)},lt=[],ut=u.n(ct,dt,lt);const mt=ut.exports,ht={allowSpaces:!0,render:()=>{let e,t,n=!1;return{onStart:r=>{e=new c.VueRenderer(C,{parent:void 0,propsData:{itemComponent:mt,itemType:"mention",...r},editor:r.editor}),r.clientRect&&(t=b("body",{getReferenceClientRect:r.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{n=!0},onHidden:()=>{n=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[v]}),r.items.length>0&&(t==null||t[0].show()))},onUpdate(r){e==null||e.updateProps(r),r.items.length>0?t==null||t[0].show():t==null||t[0].hide(),r.clientRect&&(t==null||t[0].setProps({getReferenceClientRect:r.clientRect}))},onKeyDown(r){var s;if(n)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(r)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},pt={name:"ChannelSuggestion",components:{DtStack:_.default,DtIconHash:ie,DtIconLock:ae},props:{item:{type:Object,required:!0}},computed:{name(){return this.item.name}}};var ft=function(){var t=this,n=t._self._c;return n("dt-stack",{attrs:{direction:"row",gap:"400"}},[t.item.locked?n("dt-icon-lock",{attrs:{size:"300"}}):n("dt-icon-hash",{attrs:{size:"300"}}),n("span",[t._v(t._s(t.name))])],1)},gt=[],_t=u.n(pt,ft,gt);const kt=_t.exports,wt={allowSpaces:!0,render:()=>{let e,t,n=!1;return{onStart:r=>{e=new c.VueRenderer(C,{parent:void 0,propsData:{itemComponent:kt,itemType:"channel",...r},editor:r.editor}),r.clientRect&&(t=b("body",{getReferenceClientRect:r.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{n=!0},onHidden:()=>{n=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[v]}),r.items.length>0&&(t==null||t[0].show()))},onUpdate(r){e==null||e.updateProps(r),r.items.length>0?t==null||t[0].show():t==null||t[0].hide(),r.clientRect&&(t==null||t[0].setProps({getReferenceClientRect:r.clientRect}))},onKeyDown(r){var s;if(n)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(r)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},yt={name:"SlashCommandSuggestion",props:{item:{type:Object,required:!0}},computed:{command(){return this.item.command},description(){return this.item.description},parametersExample(){return this.item.parametersExample}}};var bt=function(){var t=this,n=t._self._c;return n("div",[n("div",{staticClass:"d-body--md-compact"},[n("span",[t._v("/"+t._s(t.command))]),t.parametersExample?n("span",[t._v(" "+t._s(t.parametersExample))]):t._e()]),n("div",{staticClass:"d-body--sm d-fc-tertiary"},[t._v(" "+t._s(t.description)+" ")])])},Ct=[],vt=u.n(yt,bt,Ct);const xt=vt.exports,Tt={allowSpaces:!0,startOfLine:!0,render:()=>{let e,t,n=!1;return{onStart:r=>{e=new c.VueRenderer(C,{parent:void 0,propsData:{itemComponent:xt,itemType:"slash-command",...r},editor:r.editor}),r.clientRect&&(t=b("body",{getReferenceClientRect:r.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!1,onShow:()=>{n=!0},onHidden:()=>{n=!1},interactive:!0,trigger:"manual",placement:"top-start",zIndex:650,plugins:[v]}),r.items.length>0&&(t==null||t[0].show()))},onUpdate(r){e==null||e.updateProps(r),r.items.length>0?t==null||t[0].show():t==null||t[0].hide(),r.clientRect&&(t==null||t[0].setProps({getReferenceClientRect:r.clientRect}))},onKeyDown(r){var s;if(n)return(s=e==null?void 0:e.ref)==null?void 0:s.onKeyDown(r)},onExit(){t==null||t[0].destroy(),t=null,e==null||e.destroy(),e=null}}}},Et={name:"DtRichTextEditor",components:{EditorContent:c.EditorContent,BubbleMenu:c.BubbleMenu,DtButton:le.default,DtStack:_.default},props:{value:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},preventTyping:{type:Boolean,default:!1},pasteRichText:{type:Boolean,default:!0},allowLineBreaks:{type:Boolean,default:!1},inputAriaLabel:{type:String,required:!0},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(e){return typeof e=="string"?y.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(e):!0}},outputFormat:{type:String,default:"html",validator(e){return y.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(e)}},placeholder:{type:String,default:""},link:{type:[Boolean,Object],default:!1},customLink:{type:[Boolean,Object],default:!1},mentionSuggestion:{type:Object,default:null},channelSuggestion:{type:Object,default:null},slashCommandSuggestion:{type:Object,default:null},allowBlockquote:{type:Boolean,default:!0},allowBold:{type:Boolean,default:!0},allowBulletList:{type:Boolean,default:!0},allowItalic:{type:Boolean,default:!0},allowStrike:{type:Boolean,default:!0},allowUnderline:{type:Boolean,default:!0},allowCode:{type:Boolean,default:!0},allowCodeblock:{type:Boolean,default:!0},allowInlineImages:{type:Boolean,default:!1},allowFontColor:{type:Boolean,default:!1},allowFontFamily:{type:Boolean,default:!1},additionalExtensions:{type:Array,default:()=>[]},hideLinkBubbleMenu:{type:Boolean,default:!1},useDivTags:{type:Boolean,default:!1}},emits:["input","json-input","html-input","text-input","markdown-input","update:value","blur","focus","enter","edit-link","selected","selected-command"],data(){return{editor:null,tippyOptions:{appendTo:()=>{var e;return(e=this.$refs.editor.$el.getRootNode())==null?void 0:e.querySelector("body")},placement:"top-start"},i18n:new de.DialtoneLocalization,jsonToMarkdownConverter:{convertToMarkdown(e){return this.processNode(e)},processNodeContent(e){return e.content?e.content.map(t=>this.processNode(t)).join(""):""},processNode(e){if(!e)return"";const n={doc:r=>this.processDocNode(r),paragraph:r=>this.processParagraphNode(r),text:r=>this.processTextNode(r),hardBreak:()=>this.processHardBreakNode(),blockquote:r=>this.processBlockquoteNode(r),bulletList:r=>this.processBulletListNode(r),orderedList:r=>this.processOrderedListNode(r),listItem:r=>this.processListItemNode(r),codeBlock:r=>this.processCodeBlockNode(r),mention:r=>this.processMentionNode(r),channel:r=>this.processChannelNode(r),"slash-commands":r=>this.processSlashCommandsNode(r),emoji:r=>this.processEmojiNode(r)}[e.type];return n?n(e):this.processUnknownNode(e)},processDocNode(e){return this.processNodeContent(e)},processParagraphNode(e){const t=this.processNodeContent(e);return t?t+`
2
+ `:`
3
+ `},processTextNode(e){let t=e.text||"";return e.marks&&(t=this.applyMarks(t,e.marks)),t},processHardBreakNode(){return`
4
+ `},processBlockquoteNode(e){return this.processNodeContent(e).split(`
5
+ `).map(n=>n?`> ${n}`:">").join(`
6
+ `)+`
7
+ `},processBulletListNode(e){return this.processNodeContent(e)},processOrderedListNode(e){return e.content?e.content.map((t,n)=>this.processNode(t).replace(/^- /,`${n+1}. `)).join(""):""},processListItemNode(e){const t=this.processNodeContent(e);return t?`- ${t.replace(/\n$/,"")}
8
+ `:""},processCodeBlockNode(e){return`\`\`\`
9
+ ${this.processNodeContent(e)}
10
+ \`\`\``},processMentionNode(e){var s,o,i;const t=((s=e.attrs)==null?void 0:s.name)||"",n=((o=e.attrs)==null?void 0:o.id)||"",r=((i=e.attrs)==null?void 0:i.contactKey)||"";return`<!-- @mention: {"id": "${n}", "contactKey": "${r}", "name": "${t}"} -->`},processChannelNode(e){var s,o,i;const t=((s=e.attrs)==null?void 0:s.name)||"",n=((o=e.attrs)==null?void 0:o.id)||"",r=((i=e.attrs)==null?void 0:i.locked.toString())||"";return`<!-- @channel: {"id": "${n}", "name": "${t}", "locked": "${r}"} -->`},processSlashCommandsNode(e){var r,s;const t=((r=e.attrs)==null?void 0:r.command)||"",n=((s=e.attrs)==null?void 0:s.parameters)||"";return`/${t}${n?` ${n}`:""}`},processEmojiNode(e){var t;return((t=e.attrs)==null?void 0:t.code)||""},processUnknownNode(e){return this.processNodeContent(e)},applyMarks(e,t){let n=e;return[...t].sort((s,o)=>{const i={link:0,bold:1,italic:2,strike:3,code:4};return(i[s.type]||5)-(i[o.type]||5)}).forEach(s=>{var o;switch(s.type){case"bold":n=`**${n}**`;break;case"italic":n=`*${n}*`;break;case"strike":n=`~~${n}~~`;break;case"code":n=`\`${n}\``;break;case"link":{const i=((o=s.attrs)==null?void 0:o.href)||"";n=`[${n}](${i})`;break}}}),n}}}},computed:{editorListeners(){return{...this.$listeners,input:()=>{},focus:()=>{},blur:()=>{}}},extensions(){const e=[D,J,G,q];e.push(this.useDivTags?Ve:$),this.allowBold&&e.push(H),this.allowBlockquote&&e.push(M),this.allowBulletList&&(e.push(V),e.push(W.extend({renderText({node:r}){return r.textContent}})),e.push(U)),this.allowItalic&&e.push(F),this.allowStrike&&e.push(z),this.allowUnderline&&e.push(X),this.placeholder&&e.push(j.configure({placeholder:this.placeholder}));const t=this,n=d.Extension.create({addKeyboardShortcuts(){return{"Shift-Enter":({editor:r})=>t.allowLineBreaks?!1:(r.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>t.allowBulletList&&s.splitListItem("listItem"),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),!0),Enter:()=>t.allowLineBreaks?!1:(t.$emit("enter"),!0)}}});if(e.push(n),this.link&&e.push(K.extend({inclusive:!1,addKeyboardShortcuts(){return{"Mod-k":()=>(t.$emit("edit-link"),!0)}}}).configure({HTMLAttributes:{class:"d-link d-wb-break-all"},openOnClick:!1,autolink:!0,protocols:y.RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS})),this.customLink&&e.push(this.getExtension(qe,this.customLink)),this.mentionSuggestion){const r={...this.mentionSuggestion,...ht};e.push(Xe.configure({suggestion:r}))}if(this.channelSuggestion){const r={...this.channelSuggestion,...wt};e.push(et.configure({suggestion:r}))}if(this.slashCommandSuggestion){const r={...this.slashCommandSuggestion,...Tt};e.push(at.configure({suggestion:r,onSelectedCommand:s=>{this.$emit("selected-command",s)}}))}return e.push(Ne),e.push(Y.configure({types:["paragraph"]})),this.allowCode&&e.push(A),this.allowCodeblock&&e.push(O.extend({renderText({node:r}){return`\`\`\`
2
11
  ${r.textContent}
3
- \`\`\``}}).configure({HTMLAttributes:{class:"d-rich-text-editor__code-block"}})),this.allowInlineImages&&e.push(He),(this.allowFontFamily||this.allowFontColor)&&(e.push(Q),this.allowFontColor&&e.push(Z),this.allowFontFamily&&e.push(ee)),this.additionalExtensions.length&&e.push(...this.additionalExtensions),e},inputAttrs(){const e={"aria-label":this.inputAriaLabel,"aria-multiline":!0,role:"textbox"};return this.editable||(e["aria-readonly"]=!0),e}},watch:{editable(e){this.editor.setEditable(e),this.updateEditorAttributes({"aria-readonly":!e})},inputClass(e){this.updateEditorAttributes({class:e})},inputAriaLabel(e){this.updateEditorAttributes({"aria-label":e})},extensions(){this.destroyEditor(),this.createEditor()},value(e){this.processValue(e)}},created(){this.createEditor()},beforeDestroy(){this.destroyEditor()},mounted(){E.warnIfUnmounted(this.$el,this.$options.name),this.processValue(this.value,!1)},methods:{createEditor(){this.editor=new c.Editor({autofocus:this.autoFocus,content:this.value,editable:this.editable,extensions:this.extensions,parseOptions:{preserveWhitespace:"full"},editorProps:{attributes:{...this.inputAttrs,class:this.inputClass},handleKeyDown:(e,t)=>{if(!this.preventTyping)return!1;const n=["Backspace"];return!this.allowLineBreaks&&!t.shiftKey&&n.push("Enter"),!n.includes(t.key)},handlePaste:(e,t)=>{const n=t.clipboardData||window.clipboardData,r=n.getData("text/plain"),s=n.getData("text/html");return this.processPasteData(e,r,s)},transformPastedHTML(e){return e.replace(/(<\/\w+>)((<br \/>)+)/g,"$2$3$1")}}}),this.addEditorListeners()},bubbleMenuShouldShow({editor:e}){return e.isActive("link")},getSelectedLinkText(e){var a,d,m;const{view:t,state:n}=e,{from:r,to:s}=t.state.selection,i=n.doc.textBetween(r,s,""),o=this.editor.state.doc.nodeAt(r);return o&&((m=(d=(a=o.marks)==null?void 0:a.at(0))==null?void 0:d.type)==null?void 0:m.name)==="link"?o.textContent:i},editLink(){const e=this.getSelectedLinkText(this.editor),t={href:this.editor.getAttributes("link").href,text:e};this.$emit("edit-link",t)},removeLink(){var e,t,n,r;(r=(n=(t=(e=this.editor)==null?void 0:e.chain())==null?void 0:t.focus())==null?void 0:n.unsetLink())==null||r.run()},openLink(){var t,n;(n=(t=this.editor)==null?void 0:t.chain())==null||n.focus();const e=this.editor.getAttributes("link").href;window.open(e,"_blank")},setLink(e,t,n,r=w.RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,s){var a,d,m;if(!e){this.removeLink();return}r.find(h=>h.test(e))||(e=`${s}${e}`),this.editor.chain().focus().extendMarkRange("link").run();const o=(m=(d=(a=this.editor)==null?void 0:a.view)==null?void 0:d.state)==null?void 0:m.selection;this.editor.chain().focus().insertContent(t).setTextSelection({from:o.from,to:o.from+t.length}).setLink({href:e,class:n.class}).run()},processValue(e,t=!0){const n=this.getOutput();if(!(t&&ae(e,n))){if(typeof e=="string"&&this.outputFormat==="text"){const r=new RegExp(`(${I.emojiPattern})`,"g");e=e==null?void 0:e.replace(r,'<emoji-component code="$1"></emoji-component>')}this.editor.commands.setContent(e,!1,{preserveWhitespace:"full"})}},destroyEditor(){this.editor.destroy()},insertPlainTextWithHardBreaks(e,t){const{tr:n}=e.state,{from:r,to:s}=e.state.selection;n.deleteRange(r,s);const i=t.split(/\r?\n/);let o=r;for(let a=0;a<i.length;a++)a>0&&(n.insert(o,e.state.schema.nodes.hardBreak.create()),o++),n.insertText(i[a],o),o+=i[a].length;e.dispatch(n)},shouldPreserveLineBreaks(e,t){return this.pasteRichText?!t&&e&&this.hasBlankLines(e):!!e},processPasteData(e,t,n){if(this.shouldPreserveLineBreaks(t,n))return this.insertPlainTextWithHardBreaks(e,t),!0;if(this.shouldHandlePreformattedHTML(n)){const r=this.extractPreformattedText(n);if(r&&r.includes(`
12
+ \`\`\``}}).configure({HTMLAttributes:{class:"d-rich-text-editor__code-block"}})),this.allowInlineImages&&e.push(He),(this.allowFontFamily||this.allowFontColor)&&(e.push(Q),this.allowFontColor&&e.push(Z),this.allowFontFamily&&e.push(ee)),this.additionalExtensions.length&&e.push(...this.additionalExtensions),e},inputAttrs(){const e={"aria-label":this.inputAriaLabel,"aria-multiline":!0,role:"textbox"};return this.editable||(e["aria-readonly"]=!0),e}},watch:{editable(e){this.editor.setEditable(e),this.updateEditorAttributes({"aria-readonly":!e})},inputClass(e){this.updateEditorAttributes({class:e})},inputAriaLabel(e){this.updateEditorAttributes({"aria-label":e})},extensions(){this.destroyEditor(),this.createEditor()},value(e){this.processValue(e)}},created(){this.createEditor()},beforeDestroy(){this.destroyEditor()},mounted(){E.warnIfUnmounted(this.$el,this.$options.name),this.processValue(this.value,!1)},methods:{createEditor(){this.editor=new c.Editor({autofocus:this.autoFocus,content:this.value,editable:this.editable,extensions:this.extensions,parseOptions:{preserveWhitespace:"full"},editorProps:{attributes:{...this.inputAttrs,class:this.inputClass},handleKeyDown:(e,t)=>{if(!this.preventTyping)return!1;const n=["Backspace"];return!this.allowLineBreaks&&!t.shiftKey&&n.push("Enter"),!n.includes(t.key)},handlePaste:(e,t)=>{const n=t.clipboardData||window.clipboardData,r=n.getData("text/plain"),s=n.getData("text/html");return this.processPasteData(e,r,s)},transformPastedHTML(e){return e.replace(/(<\/\w+>)((<br \/>)+)/g,"$2$3$1")}}}),this.addEditorListeners()},bubbleMenuShouldShow({editor:e}){return e.isActive("link")},getSelectedLinkText(e){var a,l,m;const{view:t,state:n}=e,{from:r,to:s}=t.state.selection,o=n.doc.textBetween(r,s,""),i=this.editor.state.doc.nodeAt(r);return i&&((m=(l=(a=i.marks)==null?void 0:a.at(0))==null?void 0:l.type)==null?void 0:m.name)==="link"?i.textContent:o},editLink(){const e=this.getSelectedLinkText(this.editor),t={href:this.editor.getAttributes("link").href,text:e};this.$emit("edit-link",t)},removeLink(){var e,t,n,r;(r=(n=(t=(e=this.editor)==null?void 0:e.chain())==null?void 0:t.focus())==null?void 0:n.unsetLink())==null||r.run()},openLink(){var t,n;(n=(t=this.editor)==null?void 0:t.chain())==null||n.focus();const e=this.editor.getAttributes("link").href;window.open(e,"_blank")},setLink(e,t,n,r=y.RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,s){var a,l,m;if(!e){this.removeLink();return}r.find(h=>h.test(e))||(e=`${s}${e}`),this.editor.chain().focus().extendMarkRange("link").run();const i=(m=(l=(a=this.editor)==null?void 0:a.view)==null?void 0:l.state)==null?void 0:m.selection;this.editor.chain().focus().insertContent(t).setTextSelection({from:i.from,to:i.from+t.length}).setLink({href:e,class:n.class}).run()},processValue(e,t=!0){const n=this.getOutput();if(!(t&&ce(e,n))){if(typeof e=="string"&&this.outputFormat==="text"){const r=new RegExp(`(${I.emojiPattern})`,"g");e=e==null?void 0:e.replace(r,'<emoji-component code="$1"></emoji-component>')}this.editor.commands.setContent(e,!1,{preserveWhitespace:"full"})}},destroyEditor(){this.editor.destroy()},insertPlainTextWithHardBreaks(e,t){const{tr:n}=e.state,{from:r,to:s}=e.state.selection;n.deleteRange(r,s);const o=t.split(/\r?\n/);let i=r;for(let a=0;a<o.length;a++)a>0&&(n.insert(i,e.state.schema.nodes.hardBreak.create()),i++),n.insertText(o[a],i),i+=o[a].length;e.dispatch(n)},shouldPreserveLineBreaks(e,t){return this.pasteRichText?!t&&e&&this.hasBlankLines(e):!!e},processPasteData(e,t,n){if(this.shouldPreserveLineBreaks(t,n))return this.insertPlainTextWithHardBreaks(e,t),!0;if(this.shouldHandlePreformattedHTML(n)){const r=this.extractPreformattedText(n);if(r&&r.includes(`
4
13
  `))return this.insertPlainTextWithHardBreaks(e,r),!0}return!1},shouldHandlePreformattedHTML(e){return this.pasteRichText&&e&&this.containsPreformattedContent(e)},containsPreformattedContent(e){const t=document.createElement("div");t.innerHTML=e;const n=t.querySelectorAll("*");for(const r of n)if(this.hasPreWhitespace(r)&&this.hasLineBreaks(r))return!0;return!1},hasPreWhitespace(e){const t=e.getAttribute("style")||"",n=e.style.whiteSpace||"",r=n==="pre"||n==="pre-wrap",s=t.includes("white-space: pre");return r||s},hasLineBreaks(e){return e.textContent&&e.textContent.includes(`
5
14
  `)},hasBlankLines(e){return e.includes(`
6
15
 
7
16
  `)||/\n\s*\n/.test(e)},extractPreformattedText(e){const t=document.createElement("div");return t.innerHTML=e,this.walkAndExtractText(t)},walkAndExtractText(e){let t="";if(e.nodeType===Node.TEXT_NODE)t+=e.textContent;else if(e.nodeType===Node.ELEMENT_NODE)if(this.hasPreWhitespace(e))t+=e.textContent;else for(const n of e.childNodes)t+=this.walkAndExtractText(n);return t},triggerInputChangeEvents(){const e=this.getOutput();this.$emit("input",e),this.$emit("update:value",e);const t=this.editor.getJSON();this.$emit("json-input",t);const n=this.editor.getHTML();this.$emit("html-input",n);const r=this.editor.getText({blockSeparator:`
8
- `});this.$emit("text-input",r)},addEditorListeners(){this.editor.on("create",()=>{this.triggerInputChangeEvents()}),this.editor.on("update",()=>{this.triggerInputChangeEvents()}),this.editor.on("selectionUpdate",({editor:e})=>{this.$emit("selected",this.getSelectedLinkText(e))}),this.editor.on("focus",({event:e})=>{this.$emit("focus",e)}),this.editor.on("blur",({event:e})=>{this.$emit("blur",e)})},getOutput(){switch(this.outputFormat){case"json":return this.editor.getJSON();case"html":return this.editor.getHTML();case"text":default:return this.editor.getText({blockSeparator:`
9
- `})}},getExtension(e,t){var n;return typeof t=="boolean"?e:(n=e.configure)==null?void 0:n.call(e,t)},updateEditorAttributes(e){this.editor.setOptions({editorProps:{attributes:{...this.inputAttrs,class:this.inputClass,...e}}})},focusEditor(){this.editor.commands.focus()}}};var Et=function(){var t=this,n=t._self._c;return n("div",[t.editor&&t.link&&!t.hideLinkBubbleMenu?n("bubble-menu",{staticStyle:{visibility:"visible"},attrs:{editor:t.editor,"should-show":t.bubbleMenuShouldShow,"tippy-options":t.tippyOptions}},[n("div",{staticClass:"d-popover__dialog"},[n("dt-stack",{staticClass:"d-rich-text-editor-bubble-menu__button-stack",attrs:{direction:"row",gap:"0"}},[n("dt-button",{attrs:{kind:"muted",importance:"clear"},on:{click:t.editLink}},[t._v(" "+t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL"))+" ")]),n("dt-button",{attrs:{kind:"muted",importance:"clear"},on:{click:t.openLink}},[t._v(" "+t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL"))+" ")]),n("dt-button",{attrs:{kind:"danger",importance:"clear"},on:{click:t.removeLink}},[t._v(" "+t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL"))+" ")])],1)],1)]):t._e(),n("editor-content",t._g({ref:"editor",staticClass:"d-rich-text-editor",attrs:{editor:t.editor,"data-qa":"dt-rich-text-editor"}},t.editorListeners))],1)},St=[],Rt=u.n(Ct,Et,St);const Lt=Rt.exports;exports.default=Lt;
17
+ `});this.$emit("text-input",r);const s=this.jsonToMarkdownConverter.convertToMarkdown(t);this.$emit("markdown-input",s)},addEditorListeners(){this.editor.on("create",()=>{this.triggerInputChangeEvents()}),this.editor.on("update",()=>{this.triggerInputChangeEvents()}),this.editor.on("selectionUpdate",({editor:e})=>{this.$emit("selected",this.getSelectedLinkText(e))}),this.editor.on("focus",({event:e})=>{this.$emit("focus",e)}),this.editor.on("blur",({event:e})=>{this.$emit("blur",e)})},getOutput(){switch(this.outputFormat){case"json":return this.editor.getJSON();case"html":return this.editor.getHTML();case"markdown":return this.jsonToMarkdownConverter.convertToMarkdown(this.editor.getJSON());case"text":default:return this.editor.getText({blockSeparator:`
18
+ `})}},getExtension(e,t){var n;return typeof t=="boolean"?e:(n=e.configure)==null?void 0:n.call(e,t)},updateEditorAttributes(e){this.editor.setOptions({editorProps:{attributes:{...this.inputAttrs,class:this.inputClass,...e}}})},focusEditor(){this.editor.commands.focus()}}};var St=function(){var t=this,n=t._self._c;return n("div",[t.editor&&t.link&&!t.hideLinkBubbleMenu?n("bubble-menu",{staticStyle:{visibility:"visible"},attrs:{editor:t.editor,"should-show":t.bubbleMenuShouldShow,"tippy-options":t.tippyOptions}},[n("div",{staticClass:"d-popover__dialog"},[n("dt-stack",{staticClass:"d-rich-text-editor-bubble-menu__button-stack",attrs:{direction:"row",gap:"0"}},[n("dt-button",{attrs:{kind:"muted",importance:"clear"},on:{click:t.editLink}},[t._v(" "+t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL"))+" ")]),n("dt-button",{attrs:{kind:"muted",importance:"clear"},on:{click:t.openLink}},[t._v(" "+t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL"))+" ")]),n("dt-button",{attrs:{kind:"danger",importance:"clear"},on:{click:t.removeLink}},[t._v(" "+t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL"))+" ")])],1)],1)]):t._e(),n("editor-content",t._g({ref:"editor",staticClass:"d-rich-text-editor",attrs:{editor:t.editor,"data-qa":"dt-rich-text-editor"}},t.editorListeners))],1)},Lt=[],Rt=u.n(Et,St,Lt);const $t=Rt.exports;exports.default=$t;
10
19
  //# sourceMappingURL=rich-text-editor.cjs.map