@dialpad/dialtone 9.96.0 → 9.98.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.
- package/dist/css/dialtone-default-theme.css +45 -1
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone.css +45 -1
- package/dist/css/dialtone.min.css +1 -1
- package/dist/css/tokens/tokens-base-deca-dark.css +293 -391
- package/dist/css/tokens/tokens-base-deca-light.css +284 -382
- package/dist/css/tokens/tokens-deca-dark.css +1001 -966
- package/dist/css/tokens/tokens-deca-light.css +731 -696
- package/dist/tokens/css/tokens-base-deca-dark.css +293 -391
- package/dist/tokens/css/tokens-base-deca-light.css +284 -382
- package/dist/tokens/css/tokens-deca-dark.css +1001 -966
- package/dist/tokens/css/tokens-deca-light.css +731 -696
- package/dist/tokens/doc.json +31965 -32211
- package/dist/tokens/less/tokens-base-deca-dark.less +77 -91
- package/dist/tokens/less/tokens-base-deca-light.less +75 -89
- package/dist/tokens/less/tokens-deca-dark.less +225 -220
- package/dist/tokens/less/tokens-deca-light.less +229 -224
- package/dist/tokens/themes/dp-deca-dark.cjs +1 -1
- package/dist/tokens/themes/dp-deca-dark.js +1 -1
- package/dist/tokens/themes/dp-deca-light.cjs +1 -1
- package/dist/tokens/themes/dp-deca-light.js +1 -1
- package/dist/tokens/tokens-base-deca-dark.json +77 -91
- package/dist/tokens/tokens-base-deca-light.json +75 -89
- package/dist/tokens/tokens-deca-dark.json +224 -219
- package/dist/tokens/tokens-deca-light.json +229 -224
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +2 -2
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js +2 -2
- package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.js.map +1 -1
- package/dist/vue2/components/rich_text_editor/rich_text_editor.vue.cjs +160 -17
- package/dist/vue2/components/rich_text_editor/rich_text_editor.vue.cjs.map +1 -1
- package/dist/vue2/components/rich_text_editor/rich_text_editor.vue.js +161 -18
- package/dist/vue2/components/rich_text_editor/rich_text_editor.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs +1 -1
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.js +1 -1
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/last_active_nodes.cjs +87 -0
- package/dist/vue2/recipes/conversation_view/message_input/last_active_nodes.cjs.map +1 -0
- package/dist/vue2/recipes/conversation_view/message_input/last_active_nodes.js +87 -0
- package/dist/vue2/recipes/conversation_view/message_input/last_active_nodes.js.map +1 -0
- package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs +229 -46
- package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js +229 -46
- package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/message_input_button.vue.cjs +58 -0
- package/dist/vue2/recipes/conversation_view/message_input/message_input_button.vue.cjs.map +1 -0
- package/dist/vue2/recipes/conversation_view/message_input/message_input_button.vue.js +58 -0
- package/dist/vue2/recipes/conversation_view/message_input/message_input_button.vue.js.map +1 -0
- package/dist/vue2/recipes/conversation_view/message_input/message_input_link.vue.cjs +108 -0
- package/dist/vue2/recipes/conversation_view/message_input/message_input_link.vue.cjs.map +1 -0
- package/dist/vue2/recipes/conversation_view/message_input/message_input_link.vue.js +108 -0
- package/dist/vue2/recipes/conversation_view/message_input/message_input_link.vue.js.map +1 -0
- package/dist/vue2/recipes/conversation_view/message_input/message_input_topbar.vue.cjs +106 -0
- package/dist/vue2/recipes/conversation_view/message_input/message_input_topbar.vue.cjs.map +1 -0
- package/dist/vue2/recipes/conversation_view/message_input/message_input_topbar.vue.js +106 -0
- package/dist/vue2/recipes/conversation_view/message_input/message_input_topbar.vue.js.map +1 -0
- package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +37 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/last_active_nodes.d.ts +3 -0
- package/dist/vue2/types/recipes/conversation_view/message_input/last_active_nodes.d.ts.map +1 -0
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +183 -60
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts +48 -0
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts.map +1 -0
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +38 -0
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -0
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +87 -0
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -0
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +2 -2
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js +2 -2
- package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.cjs +223 -21
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.js +225 -23
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs +1 -0
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.js +1 -0
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/last_active_nodes.cjs +87 -0
- package/dist/vue3/recipes/conversation_view/message_input/last_active_nodes.cjs.map +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/last_active_nodes.js +87 -0
- package/dist/vue3/recipes/conversation_view/message_input/last_active_nodes.js.map +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs +279 -65
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js +280 -66
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input_button.vue.cjs +81 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_button.vue.cjs.map +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_button.vue.js +81 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_button.vue.js.map +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_link.vue.cjs +193 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_link.vue.cjs.map +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_link.vue.js +193 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_link.vue.js.map +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_topbar.vue.cjs +223 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_topbar.vue.cjs.map +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_topbar.vue.js +223 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_topbar.vue.js.map +1 -0
- package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +42 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/last_active_nodes.d.ts +3 -0
- package/dist/vue3/types/recipes/conversation_view/message_input/last_active_nodes.d.ts.map +1 -0
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +185 -61
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts +50 -0
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts.map +1 -0
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +42 -0
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -0
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +89 -0
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -0
- package/package.json +7 -4
|
@@ -111,6 +111,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
111
111
|
}), 256))
|
|
112
112
|
], 2);
|
|
113
113
|
}
|
|
114
|
-
const
|
|
115
|
-
exports.default =
|
|
114
|
+
const DtKeyboardShortcut = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
|
|
115
|
+
exports.default = DtKeyboardShortcut;
|
|
116
116
|
//# sourceMappingURL=keyboard_shortcut.vue.cjs.map
|
|
@@ -109,8 +109,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
109
109
|
}), 256))
|
|
110
110
|
], 2);
|
|
111
111
|
}
|
|
112
|
-
const
|
|
112
|
+
const DtKeyboardShortcut = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
113
113
|
export {
|
|
114
|
-
|
|
114
|
+
DtKeyboardShortcut as default
|
|
115
115
|
};
|
|
116
116
|
//# sourceMappingURL=keyboard_shortcut.vue.js.map
|
package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentionSuggestion.vue.cjs","sources":["../../../../../components/rich_text_editor/extensions/mentions/MentionSuggestion.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n gap=\"400\"\n >\n <dt-avatar\n :full-name=\"name\"\n :image-src=\"avatarSrc\"\n :image-alt=\"name\"\n size=\"xs\"\n />\n <span class=\"d-mention-suggestion__name\">\n {{ name }}\n </span>\n </dt-stack>\n</template>\n\n<script>\nimport { DtAvatar } from '@/components/avatar';\nimport { DtStack } from '@/components/stack';\n\nexport default {\n name: 'MentionSuggestion',\n components: {\n DtAvatar,\n DtStack,\n },\n\n props: {\n item: {\n type: Object,\n required: true,\n },\n },\n\n computed: {\n name () {\n return this.item.name;\n },\n\n avatarSrc () {\n return this.item.avatarSrc;\n },\n },\n};\n</script>\n"],"names":["DtAvatar","DtStack","_createBlock","_withCtx","_createVNode","_createElementVNode","_toDisplayString"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"MentionSuggestion.vue.cjs","sources":["../../../../../components/rich_text_editor/extensions/mentions/MentionSuggestion.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n gap=\"400\"\n >\n <dt-avatar\n :full-name=\"name\"\n :image-src=\"avatarSrc\"\n :image-alt=\"name\"\n size=\"xs\"\n />\n <!-- eslint-disable-next-line vue/no-restricted-class -->\n <span class=\"d-mention-suggestion__name\">\n {{ name }}\n </span>\n </dt-stack>\n</template>\n\n<script>\nimport { DtAvatar } from '@/components/avatar';\nimport { DtStack } from '@/components/stack';\n\nexport default {\n name: 'MentionSuggestion',\n components: {\n DtAvatar,\n DtStack,\n },\n\n props: {\n item: {\n type: Object,\n required: true,\n },\n },\n\n computed: {\n name () {\n return this.item.name;\n },\n\n avatarSrc () {\n return this.item.avatarSrc;\n },\n },\n};\n</script>\n"],"names":["DtAvatar","DtStack","_createBlock","_withCtx","_createVNode","_createElementVNode","_toDisplayString"],"mappings":";;;;;;AAsBA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,UAAAA,OAAQ;AAAA,IACR,SAAAC,MAAO;AAAA,EACR;AAAA,EAED,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,OAAQ;AACN,aAAO,KAAK,KAAK;AAAA,IAClB;AAAA,IAED,YAAa;AACX,aAAO,KAAK,KAAK;AAAA,IAClB;AAAA,EACF;AACH;AAjCU,MAAA,aAAA,EAAA,OAAM,6BAA4B;;;;0BAX1CC,IAcW,YAAA,qBAAA;AAAA,IAbT,WAAU;AAAA,IACV,KAAI;AAAA;IAHR,SAAAC,IAAA,QAKI,MAKE;AAAA,MALFC,IAAAA,YAKE,sBAAA;AAAA,QAJC,aAAW,SAAI;AAAA,QACf,aAAW,SAAS;AAAA,QACpB,aAAW,SAAI;AAAA,QAChB,MAAK;AAAA;MAGPC,IAEO,mBAAA,QAFP,YAEOC,IAAAA,gBADF,SAAI,IAAA,GAAA,CAAA;AAAA;IAbb,GAAA;AAAA;;;;"}
|
package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentionSuggestion.vue.js","sources":["../../../../../components/rich_text_editor/extensions/mentions/MentionSuggestion.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n gap=\"400\"\n >\n <dt-avatar\n :full-name=\"name\"\n :image-src=\"avatarSrc\"\n :image-alt=\"name\"\n size=\"xs\"\n />\n <span class=\"d-mention-suggestion__name\">\n {{ name }}\n </span>\n </dt-stack>\n</template>\n\n<script>\nimport { DtAvatar } from '@/components/avatar';\nimport { DtStack } from '@/components/stack';\n\nexport default {\n name: 'MentionSuggestion',\n components: {\n DtAvatar,\n DtStack,\n },\n\n props: {\n item: {\n type: Object,\n required: true,\n },\n },\n\n computed: {\n name () {\n return this.item.name;\n },\n\n avatarSrc () {\n return this.item.avatarSrc;\n },\n },\n};\n</script>\n"],"names":["_createBlock","_withCtx","_createVNode","_createElementVNode","_toDisplayString"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"MentionSuggestion.vue.js","sources":["../../../../../components/rich_text_editor/extensions/mentions/MentionSuggestion.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n gap=\"400\"\n >\n <dt-avatar\n :full-name=\"name\"\n :image-src=\"avatarSrc\"\n :image-alt=\"name\"\n size=\"xs\"\n />\n <!-- eslint-disable-next-line vue/no-restricted-class -->\n <span class=\"d-mention-suggestion__name\">\n {{ name }}\n </span>\n </dt-stack>\n</template>\n\n<script>\nimport { DtAvatar } from '@/components/avatar';\nimport { DtStack } from '@/components/stack';\n\nexport default {\n name: 'MentionSuggestion',\n components: {\n DtAvatar,\n DtStack,\n },\n\n props: {\n item: {\n type: Object,\n required: true,\n },\n },\n\n computed: {\n name () {\n return this.item.name;\n },\n\n avatarSrc () {\n return this.item.avatarSrc;\n },\n },\n};\n</script>\n"],"names":["_createBlock","_withCtx","_createVNode","_createElementVNode","_toDisplayString"],"mappings":";;;;AAsBA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,OAAQ;AACN,aAAO,KAAK,KAAK;AAAA,IAClB;AAAA,IAED,YAAa;AACX,aAAO,KAAK,KAAK;AAAA,IAClB;AAAA,EACF;AACH;AAjCU,MAAA,aAAA,EAAA,OAAM,6BAA4B;;;;sBAX1CA,YAcW,qBAAA;AAAA,IAbT,WAAU;AAAA,IACV,KAAI;AAAA;IAHR,SAAAC,QAKI,MAKE;AAAA,MALFC,YAKE,sBAAA;AAAA,QAJC,aAAW,SAAI;AAAA,QACf,aAAW,SAAS;AAAA,QACpB,aAAW,SAAI;AAAA,QAChB,MAAK;AAAA;MAGPC,mBAEO,QAFP,YAEOC,gBADF,SAAI,IAAA,GAAA,CAAA;AAAA;IAbb,GAAA;AAAA;;;"}
|
package/dist/vue3/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuggestionList.vue.cjs","sources":["../../../../../components/rich_text_editor/extensions/suggestion/SuggestionList.vue"],"sourcesContent":["<template>\n <div class=\"d-popover__dialog d-suggestion-list__container\">\n <ul\n v-show=\"items.length\"\n ref=\"suggestionList\"\n class=\"d-suggestion-list\"\n >\n <dt-list-item\n v-for=\"(item, index) in items\"\n :key=\"item.id\"\n :class=\"[\n 'd-suggestion-list__item',\n { 'd-list-item--highlighted': index === selectedIndex },\n ]\"\n navigation-type=\"arrow-keys\"\n @click=\"selectItem(index)\"\n @keydown.prevent=\"onKeyDown\"\n >\n <component\n :is=\"itemComponent\"\n :item=\"item\"\n />\n </dt-list-item>\n </ul>\n </div>\n</template>\n\n<script>\nimport { DtListItem } from '@/components/list_item';\n\nexport default {\n name: 'SuggestionList',\n components: {\n DtListItem,\n },\n\n props: {\n items: {\n type: Array,\n required: true,\n },\n\n command: {\n type: Function,\n required: true,\n },\n\n itemComponent: {\n type: Object,\n required: true,\n },\n\n itemType: {\n type: String,\n required: true,\n },\n },\n\n data () {\n return {\n selectedIndex: 0,\n };\n },\n\n watch: {\n items () {\n this.selectedIndex = 0;\n },\n },\n\n methods: {\n onKeyDown ({ event }) {\n if (event.key === 'ArrowUp') {\n this.upHandler();\n return true;\n }\n\n if (event.key === 'ArrowDown') {\n this.downHandler();\n return true;\n }\n\n if (event.key === 'Enter' || event.key === 'Tab') {\n this.selectHandler();\n return true;\n }\n\n return false;\n },\n\n upHandler () {\n this.selectedIndex = ((this.selectedIndex + this.items.length) - 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n downHandler () {\n this.selectedIndex = (this.selectedIndex + 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n async scrollActiveElementIntoView () {\n await this.$nextTick();\n const activeElement = this.$refs.suggestionList.querySelector('.d-list-item--highlighted');\n if (activeElement) {\n activeElement.scrollIntoView({\n behaviour: 'smooth',\n block: 'center',\n });\n }\n },\n\n selectHandler () {\n this.selectItem(this.selectedIndex);\n },\n\n selectItem (index) {\n const item = this.items[index];\n\n switch (this.itemType) {\n case 'emoji':\n this.command(item);\n return;\n case 'mention':\n this.command({ name: item.name, id: item.id, avatarSrc: item.avatarSrc });\n break;\n case 'channel':\n this.command({ name: item.name, id: item.id });\n break;\n case 'slash-command':\n this.command({ command: item.command });\n break;\n }\n },\n },\n};\n</script>\n"],"names":["DtListItem","_openBlock","_createElementBlock","_withDirectives","_createElementVNode","_Fragment","_renderList","_createBlock","_normalizeClass","_withModifiers","_withCtx","_resolveDynamicComponent","_vShow"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"SuggestionList.vue.cjs","sources":["../../../../../components/rich_text_editor/extensions/suggestion/SuggestionList.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <div class=\"d-popover__dialog d-suggestion-list__container\">\n <ul\n v-show=\"items.length\"\n ref=\"suggestionList\"\n class=\"d-suggestion-list\"\n >\n <dt-list-item\n v-for=\"(item, index) in items\"\n :key=\"item.id\"\n :class=\"[\n 'd-suggestion-list__item',\n { 'd-list-item--highlighted': index === selectedIndex },\n ]\"\n navigation-type=\"arrow-keys\"\n @click=\"selectItem(index)\"\n @keydown.prevent=\"onKeyDown\"\n >\n <component\n :is=\"itemComponent\"\n :item=\"item\"\n />\n </dt-list-item>\n </ul>\n </div>\n</template>\n\n<script>\nimport { DtListItem } from '@/components/list_item';\n\nexport default {\n name: 'SuggestionList',\n components: {\n DtListItem,\n },\n\n props: {\n items: {\n type: Array,\n required: true,\n },\n\n command: {\n type: Function,\n required: true,\n },\n\n itemComponent: {\n type: Object,\n required: true,\n },\n\n itemType: {\n type: String,\n required: true,\n },\n },\n\n data () {\n return {\n selectedIndex: 0,\n };\n },\n\n watch: {\n items () {\n this.selectedIndex = 0;\n },\n },\n\n methods: {\n onKeyDown ({ event }) {\n if (event.key === 'ArrowUp') {\n this.upHandler();\n return true;\n }\n\n if (event.key === 'ArrowDown') {\n this.downHandler();\n return true;\n }\n\n if (event.key === 'Enter' || event.key === 'Tab') {\n this.selectHandler();\n return true;\n }\n\n return false;\n },\n\n upHandler () {\n this.selectedIndex = ((this.selectedIndex + this.items.length) - 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n downHandler () {\n this.selectedIndex = (this.selectedIndex + 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n async scrollActiveElementIntoView () {\n await this.$nextTick();\n const activeElement = this.$refs.suggestionList.querySelector('.d-list-item--highlighted');\n if (activeElement) {\n activeElement.scrollIntoView({\n behaviour: 'smooth',\n block: 'center',\n });\n }\n },\n\n selectHandler () {\n this.selectItem(this.selectedIndex);\n },\n\n selectItem (index) {\n const item = this.items[index];\n\n switch (this.itemType) {\n case 'emoji':\n this.command(item);\n return;\n case 'mention':\n this.command({ name: item.name, id: item.id, avatarSrc: item.avatarSrc });\n break;\n case 'channel':\n this.command({ name: item.name, id: item.id });\n break;\n case 'slash-command':\n this.command({ command: item.command });\n break;\n }\n },\n },\n};\n</script>\n"],"names":["DtListItem","_openBlock","_createElementBlock","_withDirectives","_createElementVNode","_Fragment","_renderList","_createBlock","_normalizeClass","_withModifiers","_withCtx","_resolveDynamicComponent","_vShow"],"mappings":";;;;;AA+BA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,gBACVA,UAAU;AAAA,EACX;AAAA,EAED,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,eAAe;AAAA,MACb,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,UAAU;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,eAAe;AAAA;EAElB;AAAA,EAED,OAAO;AAAA,IACL,QAAS;AACP,WAAK,gBAAgB;AAAA,IACtB;AAAA,EACF;AAAA,EAED,SAAS;AAAA,IACP,UAAW,EAAE,SAAS;AACpB,UAAI,MAAM,QAAQ,WAAW;AAC3B,aAAK,UAAS;AACd,eAAO;AAAA,MACT;AAEA,UAAI,MAAM,QAAQ,aAAa;AAC7B,aAAK,YAAW;AAChB,eAAO;AAAA,MACT;AAEA,UAAI,MAAM,QAAQ,WAAW,MAAM,QAAQ,OAAO;AAChD,aAAK,cAAa;AAClB,eAAO;AAAA,MACT;AAE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AK;gCADrBC,IAee,YAAA,yBAAA;AAAA,UAbZ,KAAK,KAAK;AAAA,UACV,OAXTC,IAAAA,eAAA;AAAA;YAW+F,EAAA,4BAAA,UAAU,MAAa,cAAA;AAAA;UAI9G,mBAAgB;AAAA,UACf,SAAK,YAAE,SAAU,WAAC,KAAK;AAAA,UACvB,WAjBTC,IAAAA,cAiB0B,SAAS,WAAA,CAAA,SAAA,CAAA;AAAA;UAjBnC,SAAAC,IAAA,QAmBQ,MAGE;AAAA,aAHFT,IAAAA,UAAA,GAAAM,IAAA,YAGEI,4BAFK,OAAA,aAAa,GACjB,EAAA,KAAU,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA;AAAA;UArBrB,GAAA;AAAA;;;MAIc,CAAAC,WAAA,OAAA,MAAM,MAAM;AAAA;;;;;"}
|
package/dist/vue3/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuggestionList.vue.js","sources":["../../../../../components/rich_text_editor/extensions/suggestion/SuggestionList.vue"],"sourcesContent":["<template>\n <div class=\"d-popover__dialog d-suggestion-list__container\">\n <ul\n v-show=\"items.length\"\n ref=\"suggestionList\"\n class=\"d-suggestion-list\"\n >\n <dt-list-item\n v-for=\"(item, index) in items\"\n :key=\"item.id\"\n :class=\"[\n 'd-suggestion-list__item',\n { 'd-list-item--highlighted': index === selectedIndex },\n ]\"\n navigation-type=\"arrow-keys\"\n @click=\"selectItem(index)\"\n @keydown.prevent=\"onKeyDown\"\n >\n <component\n :is=\"itemComponent\"\n :item=\"item\"\n />\n </dt-list-item>\n </ul>\n </div>\n</template>\n\n<script>\nimport { DtListItem } from '@/components/list_item';\n\nexport default {\n name: 'SuggestionList',\n components: {\n DtListItem,\n },\n\n props: {\n items: {\n type: Array,\n required: true,\n },\n\n command: {\n type: Function,\n required: true,\n },\n\n itemComponent: {\n type: Object,\n required: true,\n },\n\n itemType: {\n type: String,\n required: true,\n },\n },\n\n data () {\n return {\n selectedIndex: 0,\n };\n },\n\n watch: {\n items () {\n this.selectedIndex = 0;\n },\n },\n\n methods: {\n onKeyDown ({ event }) {\n if (event.key === 'ArrowUp') {\n this.upHandler();\n return true;\n }\n\n if (event.key === 'ArrowDown') {\n this.downHandler();\n return true;\n }\n\n if (event.key === 'Enter' || event.key === 'Tab') {\n this.selectHandler();\n return true;\n }\n\n return false;\n },\n\n upHandler () {\n this.selectedIndex = ((this.selectedIndex + this.items.length) - 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n downHandler () {\n this.selectedIndex = (this.selectedIndex + 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n async scrollActiveElementIntoView () {\n await this.$nextTick();\n const activeElement = this.$refs.suggestionList.querySelector('.d-list-item--highlighted');\n if (activeElement) {\n activeElement.scrollIntoView({\n behaviour: 'smooth',\n block: 'center',\n });\n }\n },\n\n selectHandler () {\n this.selectItem(this.selectedIndex);\n },\n\n selectItem (index) {\n const item = this.items[index];\n\n switch (this.itemType) {\n case 'emoji':\n this.command(item);\n return;\n case 'mention':\n this.command({ name: item.name, id: item.id, avatarSrc: item.avatarSrc });\n break;\n case 'channel':\n this.command({ name: item.name, id: item.id });\n break;\n case 'slash-command':\n this.command({ command: item.command });\n break;\n }\n },\n },\n};\n</script>\n"],"names":["_openBlock","_createElementBlock","_withDirectives","_createElementVNode","_Fragment","_renderList","_createBlock","_normalizeClass","_withModifiers","_withCtx","_resolveDynamicComponent","_vShow"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"SuggestionList.vue.js","sources":["../../../../../components/rich_text_editor/extensions/suggestion/SuggestionList.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <div class=\"d-popover__dialog d-suggestion-list__container\">\n <ul\n v-show=\"items.length\"\n ref=\"suggestionList\"\n class=\"d-suggestion-list\"\n >\n <dt-list-item\n v-for=\"(item, index) in items\"\n :key=\"item.id\"\n :class=\"[\n 'd-suggestion-list__item',\n { 'd-list-item--highlighted': index === selectedIndex },\n ]\"\n navigation-type=\"arrow-keys\"\n @click=\"selectItem(index)\"\n @keydown.prevent=\"onKeyDown\"\n >\n <component\n :is=\"itemComponent\"\n :item=\"item\"\n />\n </dt-list-item>\n </ul>\n </div>\n</template>\n\n<script>\nimport { DtListItem } from '@/components/list_item';\n\nexport default {\n name: 'SuggestionList',\n components: {\n DtListItem,\n },\n\n props: {\n items: {\n type: Array,\n required: true,\n },\n\n command: {\n type: Function,\n required: true,\n },\n\n itemComponent: {\n type: Object,\n required: true,\n },\n\n itemType: {\n type: String,\n required: true,\n },\n },\n\n data () {\n return {\n selectedIndex: 0,\n };\n },\n\n watch: {\n items () {\n this.selectedIndex = 0;\n },\n },\n\n methods: {\n onKeyDown ({ event }) {\n if (event.key === 'ArrowUp') {\n this.upHandler();\n return true;\n }\n\n if (event.key === 'ArrowDown') {\n this.downHandler();\n return true;\n }\n\n if (event.key === 'Enter' || event.key === 'Tab') {\n this.selectHandler();\n return true;\n }\n\n return false;\n },\n\n upHandler () {\n this.selectedIndex = ((this.selectedIndex + this.items.length) - 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n downHandler () {\n this.selectedIndex = (this.selectedIndex + 1) % this.items.length;\n\n this.scrollActiveElementIntoView();\n },\n\n async scrollActiveElementIntoView () {\n await this.$nextTick();\n const activeElement = this.$refs.suggestionList.querySelector('.d-list-item--highlighted');\n if (activeElement) {\n activeElement.scrollIntoView({\n behaviour: 'smooth',\n block: 'center',\n });\n }\n },\n\n selectHandler () {\n this.selectItem(this.selectedIndex);\n },\n\n selectItem (index) {\n const item = this.items[index];\n\n switch (this.itemType) {\n case 'emoji':\n this.command(item);\n return;\n case 'mention':\n this.command({ name: item.name, id: item.id, avatarSrc: item.avatarSrc });\n break;\n case 'channel':\n this.command({ name: item.name, id: item.id });\n break;\n case 'slash-command':\n this.command({ command: item.command });\n break;\n }\n },\n },\n};\n</script>\n"],"names":["_openBlock","_createElementBlock","_withDirectives","_createElementVNode","_Fragment","_renderList","_createBlock","_normalizeClass","_withModifiers","_withCtx","_resolveDynamicComponent","_vShow"],"mappings":";;;AA+BA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,EACD;AAAA,EAED,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,eAAe;AAAA,MACb,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,UAAU;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,eAAe;AAAA;EAElB;AAAA,EAED,OAAO;AAAA,IACL,QAAS;AACP,WAAK,gBAAgB;AAAA,IACtB;AAAA,EACF;AAAA,EAED,SAAS;AAAA,IACP,UAAW,EAAE,SAAS;AACpB,UAAI,MAAM,QAAQ,WAAW;AAC3B,aAAK,UAAS;AACd,eAAO;AAAA,MACT;AAEA,UAAI,MAAM,QAAQ,aAAa;AAC7B,aAAK,YAAW;AAChB,eAAO;AAAA,MACT;AAEA,UAAI,MAAM,QAAQ,WAAW,MAAM,QAAQ,OAAO;AAChD,aAAK,cAAa;AAClB,eAAO;AAAA,MACT;AAEA,aAAO;AAAA,IACR;AAAA,IAED,YAAa;AACX,WAAK,iBAAkB,KAAK,gBAAgB,KAAK,MAAM,SAAU,KAAK,KAAK,MAAM;AAEjF,WAAK,4BAA2B;AAAA,IACjC;AAAA,IAED,cAAe;AACb,WAAK,iBAAiB,KAAK,gBAAgB,KAAK,KAAK,MAAM;AAE3D,WAAK,4BAA2B;AAAA,IACjC;AAAA,IAED,MAAM,8BAA+B;AACnC,YAAM,KAAK;AACX,YAAM,gBAAgB,KAAK,MAAM,eAAe,cAAc,2BAA2B;AACzF,UAAI,eAAe;AACjB,sBAAc,eA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AA;AAAA;;;MAIc,CAAAC,OAAA,OAAA,MAAM,MAAM;AAAA;;;;"}
|
|
@@ -4,6 +4,7 @@ const vue3 = require("@tiptap/vue-3");
|
|
|
4
4
|
const core = require("@tiptap/core");
|
|
5
5
|
const Blockquote = require("@tiptap/extension-blockquote");
|
|
6
6
|
const CodeBlock = require("@tiptap/extension-code-block");
|
|
7
|
+
const Code = require("@tiptap/extension-code");
|
|
7
8
|
const Document = require("@tiptap/extension-document");
|
|
8
9
|
const HardBreak = require("@tiptap/extension-hard-break");
|
|
9
10
|
const Paragraph = require("@tiptap/extension-paragraph");
|
|
@@ -31,12 +32,18 @@ const suggestion = require("./extensions/mentions/suggestion.cjs");
|
|
|
31
32
|
const suggestion$1 = require("./extensions/channels/suggestion.cjs");
|
|
32
33
|
const suggestion$2 = require("./extensions/slash_command/suggestion.cjs");
|
|
33
34
|
const common_utils = require("../../common/utils.cjs");
|
|
35
|
+
const deepEqual = require("deep-equal");
|
|
34
36
|
const vue = require("vue");
|
|
35
37
|
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
|
|
38
|
+
const button = require("../button/button.vue.cjs");
|
|
39
|
+
const stack = require("../stack/stack.vue.cjs");
|
|
36
40
|
const _sfc_main = {
|
|
37
41
|
name: "DtRichTextEditor",
|
|
38
42
|
components: {
|
|
39
|
-
EditorContent: vue3.EditorContent
|
|
43
|
+
EditorContent: vue3.EditorContent,
|
|
44
|
+
BubbleMenu: vue3.BubbleMenu,
|
|
45
|
+
DtButton: button.default,
|
|
46
|
+
DtStack: stack.default
|
|
40
47
|
},
|
|
41
48
|
props: {
|
|
42
49
|
/**
|
|
@@ -240,6 +247,13 @@ const _sfc_main = {
|
|
|
240
247
|
type: Boolean,
|
|
241
248
|
default: true
|
|
242
249
|
},
|
|
250
|
+
/**
|
|
251
|
+
* Whether the input allows inline code (wrapped in backticks).
|
|
252
|
+
*/
|
|
253
|
+
allowCode: {
|
|
254
|
+
type: Boolean,
|
|
255
|
+
default: true
|
|
256
|
+
},
|
|
243
257
|
/**
|
|
244
258
|
* Whether the input allows codeblock to be introduced in the text.
|
|
245
259
|
*/
|
|
@@ -260,6 +274,15 @@ const _sfc_main = {
|
|
|
260
274
|
additionalExtensions: {
|
|
261
275
|
type: Array,
|
|
262
276
|
default: () => []
|
|
277
|
+
},
|
|
278
|
+
/**
|
|
279
|
+
* Manually hide the link bubble menu. The link bubble menu is shown when a link is selected via the cursor.
|
|
280
|
+
* There are some cases when you may want the link to remain selected but hide the bubble menu such as when You
|
|
281
|
+
* are showing a custom link editor popup.
|
|
282
|
+
*/
|
|
283
|
+
hideLinkBubbleMenu: {
|
|
284
|
+
type: Boolean,
|
|
285
|
+
default: false
|
|
263
286
|
}
|
|
264
287
|
},
|
|
265
288
|
emits: [
|
|
@@ -269,6 +292,24 @@ const _sfc_main = {
|
|
|
269
292
|
* @type {String|JSON}
|
|
270
293
|
*/
|
|
271
294
|
"input",
|
|
295
|
+
/**
|
|
296
|
+
* Input event always in JSON format.
|
|
297
|
+
* @event input
|
|
298
|
+
* @type {JSON}
|
|
299
|
+
*/
|
|
300
|
+
"json-input",
|
|
301
|
+
/**
|
|
302
|
+
* Input event always in HTML format.
|
|
303
|
+
* @event input
|
|
304
|
+
* @type {HTML}
|
|
305
|
+
*/
|
|
306
|
+
"html-input",
|
|
307
|
+
/**
|
|
308
|
+
* Input event always in text format.
|
|
309
|
+
* @event input
|
|
310
|
+
* @type {String}
|
|
311
|
+
*/
|
|
312
|
+
"text-input",
|
|
272
313
|
/**
|
|
273
314
|
* Event to sync the value with the parent
|
|
274
315
|
* @event update:value
|
|
@@ -292,11 +333,32 @@ const _sfc_main = {
|
|
|
292
333
|
* @event enter
|
|
293
334
|
* @type {String}
|
|
294
335
|
*/
|
|
295
|
-
"enter"
|
|
336
|
+
"enter",
|
|
337
|
+
/**
|
|
338
|
+
* "Edit link" button was clicked. Fires an event for the consuming component to handle the editing of the link.
|
|
339
|
+
* event contains the link object with two properties href and text.
|
|
340
|
+
* @event edit-link
|
|
341
|
+
* @type {Object}
|
|
342
|
+
*/
|
|
343
|
+
"edit-link",
|
|
344
|
+
/**
|
|
345
|
+
* "Selected" event is fired when the user selects text in the editor. returns the currently selected text.
|
|
346
|
+
* If the selected text is partially a link, the full link text is returned.
|
|
347
|
+
* @event selected
|
|
348
|
+
* @type {String}
|
|
349
|
+
*/
|
|
350
|
+
"selected"
|
|
296
351
|
],
|
|
297
352
|
data() {
|
|
298
353
|
return {
|
|
299
|
-
editor: null
|
|
354
|
+
editor: null,
|
|
355
|
+
tippyOptions: {
|
|
356
|
+
appendTo: () => {
|
|
357
|
+
var _a;
|
|
358
|
+
return (_a = this.$refs.editor.$el.getRootNode()) == null ? void 0 : _a.querySelector("body");
|
|
359
|
+
},
|
|
360
|
+
placement: "top-start"
|
|
361
|
+
}
|
|
300
362
|
};
|
|
301
363
|
},
|
|
302
364
|
computed: {
|
|
@@ -322,7 +384,11 @@ const _sfc_main = {
|
|
|
322
384
|
}
|
|
323
385
|
if (this.allowBulletList) {
|
|
324
386
|
extensions.push(BulletList);
|
|
325
|
-
extensions.push(ListItem
|
|
387
|
+
extensions.push(ListItem.extend({
|
|
388
|
+
renderText({ node }) {
|
|
389
|
+
return node.textContent;
|
|
390
|
+
}
|
|
391
|
+
}));
|
|
326
392
|
extensions.push(OrderedList);
|
|
327
393
|
}
|
|
328
394
|
if (this.allowItalic) {
|
|
@@ -372,6 +438,7 @@ const _sfc_main = {
|
|
|
372
438
|
HTMLAttributes: {
|
|
373
439
|
class: "d-link d-wb-break-all"
|
|
374
440
|
},
|
|
441
|
+
openOnClick: false,
|
|
375
442
|
autolink: true,
|
|
376
443
|
protocols: rich_text_editor_constants.RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS
|
|
377
444
|
}));
|
|
@@ -396,8 +463,17 @@ const _sfc_main = {
|
|
|
396
463
|
types: ["paragraph"],
|
|
397
464
|
defaultAlignment: "left"
|
|
398
465
|
}));
|
|
466
|
+
if (this.allowCode) {
|
|
467
|
+
extensions.push(Code);
|
|
468
|
+
}
|
|
399
469
|
if (this.allowCodeblock) {
|
|
400
|
-
extensions.push(CodeBlock.
|
|
470
|
+
extensions.push(CodeBlock.extend({
|
|
471
|
+
renderText({ node }) {
|
|
472
|
+
return `\`\`\`
|
|
473
|
+
${node.textContent}
|
|
474
|
+
\`\`\``;
|
|
475
|
+
}
|
|
476
|
+
}).configure({
|
|
401
477
|
HTMLAttributes: {
|
|
402
478
|
class: "d-rich-text-editor__code-block"
|
|
403
479
|
}
|
|
@@ -478,36 +554,103 @@ const _sfc_main = {
|
|
|
478
554
|
});
|
|
479
555
|
this.addEditorListeners();
|
|
480
556
|
},
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
557
|
+
bubbleMenuShouldShow({ editor, view, state, oldState, from, to }) {
|
|
558
|
+
return editor.isActive("link");
|
|
559
|
+
},
|
|
560
|
+
/**
|
|
561
|
+
* If the selection contains a link, return the existing link text.
|
|
562
|
+
* Otherwise, use just the selected text.
|
|
563
|
+
* @param editor the editor instance.
|
|
564
|
+
*/
|
|
565
|
+
getSelectedLinkText(editor) {
|
|
566
|
+
var _a, _b, _c;
|
|
567
|
+
const { view, state } = editor;
|
|
568
|
+
const { from, to } = view.state.selection;
|
|
569
|
+
const text = state.doc.textBetween(from, to, "");
|
|
570
|
+
const linkNode = this.editor.state.doc.nodeAt(from);
|
|
571
|
+
if (linkNode && ((_c = (_b = (_a = linkNode.marks) == null ? void 0 : _a.at(0)) == null ? void 0 : _b.type) == null ? void 0 : _c.name) === "link") {
|
|
572
|
+
return linkNode.textContent;
|
|
573
|
+
} else {
|
|
574
|
+
return text;
|
|
486
575
|
}
|
|
487
|
-
|
|
576
|
+
},
|
|
577
|
+
editLink() {
|
|
578
|
+
const linkText = this.getSelectedLinkText(this.editor);
|
|
579
|
+
const link = {
|
|
580
|
+
href: this.editor.getAttributes("link").href,
|
|
581
|
+
text: linkText
|
|
582
|
+
};
|
|
583
|
+
this.$emit("edit-link", link);
|
|
584
|
+
},
|
|
585
|
+
removeLink() {
|
|
586
|
+
var _a, _b, _c, _d;
|
|
587
|
+
(_d = (_c = (_b = (_a = this.editor) == null ? void 0 : _a.chain()) == null ? void 0 : _b.focus()) == null ? void 0 : _c.unsetLink()) == null ? void 0 : _d.run();
|
|
588
|
+
},
|
|
589
|
+
openLink() {
|
|
590
|
+
var _a, _b;
|
|
591
|
+
(_b = (_a = this.editor) == null ? void 0 : _a.chain()) == null ? void 0 : _b.focus();
|
|
592
|
+
const link = this.editor.getAttributes("link").href;
|
|
593
|
+
window.open(link, "_blank");
|
|
594
|
+
},
|
|
595
|
+
// eslint-disable-next-line complexity
|
|
596
|
+
setLink(linkInput, linkText, linkOptions, linkProtocols = rich_text_editor_constants.RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS, defaultPrefix) {
|
|
597
|
+
var _a, _b, _c;
|
|
598
|
+
if (!linkInput) {
|
|
599
|
+
this.removeLink();
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
const prefix = linkProtocols.find((prefixRegex) => prefixRegex.test(linkInput));
|
|
603
|
+
if (!prefix) {
|
|
604
|
+
linkInput = `${defaultPrefix}${linkInput}`;
|
|
605
|
+
}
|
|
606
|
+
this.editor.chain().focus().extendMarkRange("link").run();
|
|
607
|
+
const selection = (_c = (_b = (_a = this.editor) == null ? void 0 : _a.view) == null ? void 0 : _b.state) == null ? void 0 : _c.selection;
|
|
608
|
+
this.editor.chain().focus().insertContent(linkText).setTextSelection({ from: selection.from, to: selection.from + linkText.length }).setLink({ href: linkInput, class: linkOptions.class }).run();
|
|
609
|
+
},
|
|
610
|
+
// eslint-disable-next-line complexity
|
|
611
|
+
processValue(newValue, returnIfEqual = true) {
|
|
612
|
+
const currentValue = this.getOutput();
|
|
613
|
+
if (returnIfEqual && deepEqual(newValue, currentValue)) {
|
|
488
614
|
return;
|
|
489
615
|
}
|
|
490
|
-
|
|
491
|
-
|
|
616
|
+
if (typeof newValue === "string" && this.outputFormat === "text") {
|
|
617
|
+
const inputUnicodeRegex = new RegExp(`(${regexCombinedEmojis.emojiPattern})`, "g");
|
|
618
|
+
newValue = newValue == null ? void 0 : newValue.replace(inputUnicodeRegex, '<emoji-component code="$1"></emoji-component>');
|
|
619
|
+
}
|
|
492
620
|
this.editor.commands.setContent(newValue, false);
|
|
493
621
|
},
|
|
494
622
|
destroyEditor() {
|
|
495
623
|
this.editor.destroy();
|
|
496
624
|
},
|
|
625
|
+
triggerInputChangeEvents() {
|
|
626
|
+
const value = this.getOutput();
|
|
627
|
+
this.$emit("input", value);
|
|
628
|
+
this.$emit("update:modelValue", value);
|
|
629
|
+
const jsonValue = this.editor.getJSON();
|
|
630
|
+
this.$emit("json-input", jsonValue);
|
|
631
|
+
const htmlValue = this.editor.getHTML();
|
|
632
|
+
this.$emit("html-input", htmlValue);
|
|
633
|
+
const textValue = this.editor.getText({ blockSeparator: "\n" });
|
|
634
|
+
this.$emit("text-input", textValue);
|
|
635
|
+
},
|
|
497
636
|
/**
|
|
498
637
|
* The Editor exposes event hooks that we have to map our emits into. See
|
|
499
638
|
* https://tiptap.dev/api/events for all events.
|
|
500
639
|
*/
|
|
501
640
|
addEditorListeners() {
|
|
641
|
+
this.editor.on("create", () => {
|
|
642
|
+
this.triggerInputChangeEvents();
|
|
643
|
+
});
|
|
502
644
|
this.editor.on("update", () => {
|
|
503
645
|
var _a, _b;
|
|
504
|
-
const value = this.getOutput();
|
|
505
646
|
if (this.preventTyping && ((_b = (_a = this.editor.view) == null ? void 0 : _a.input) == null ? void 0 : _b.lastKeyCode) !== 8) {
|
|
506
647
|
this.editor.commands.setContent(this.value, false);
|
|
507
648
|
return;
|
|
508
649
|
}
|
|
509
|
-
this
|
|
510
|
-
|
|
650
|
+
this.triggerInputChangeEvents();
|
|
651
|
+
});
|
|
652
|
+
this.editor.on("selectionUpdate", ({ editor }) => {
|
|
653
|
+
this.$emit("selected", this.getSelectedLinkText(editor));
|
|
511
654
|
});
|
|
512
655
|
this.editor.on("focus", ({ event }) => {
|
|
513
656
|
this.$emit("focus", event);
|
|
@@ -550,13 +693,72 @@ const _sfc_main = {
|
|
|
550
693
|
}
|
|
551
694
|
}
|
|
552
695
|
};
|
|
696
|
+
const _hoisted_1 = { class: "d-popover__dialog" };
|
|
553
697
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
698
|
+
const _component_dt_button = vue.resolveComponent("dt-button");
|
|
699
|
+
const _component_dt_stack = vue.resolveComponent("dt-stack");
|
|
700
|
+
const _component_bubble_menu = vue.resolveComponent("bubble-menu");
|
|
554
701
|
const _component_editor_content = vue.resolveComponent("editor-content");
|
|
555
|
-
return vue.openBlock(), vue.
|
|
556
|
-
editor
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
702
|
+
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
703
|
+
$data.editor && $props.link && !$props.hideLinkBubbleMenu ? (vue.openBlock(), vue.createBlock(_component_bubble_menu, {
|
|
704
|
+
key: 0,
|
|
705
|
+
editor: $data.editor,
|
|
706
|
+
"should-show": $options.bubbleMenuShouldShow,
|
|
707
|
+
"tippy-options": $data.tippyOptions,
|
|
708
|
+
style: { "visibility": "visible" }
|
|
709
|
+
}, {
|
|
710
|
+
default: vue.withCtx(() => [
|
|
711
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
712
|
+
vue.createVNode(_component_dt_stack, {
|
|
713
|
+
direction: "row",
|
|
714
|
+
class: "d-rich-text-editor-bubble-menu__button-stack",
|
|
715
|
+
gap: "0"
|
|
716
|
+
}, {
|
|
717
|
+
default: vue.withCtx(() => [
|
|
718
|
+
vue.createVNode(_component_dt_button, {
|
|
719
|
+
kind: "muted",
|
|
720
|
+
importance: "clear",
|
|
721
|
+
onClick: $options.editLink
|
|
722
|
+
}, {
|
|
723
|
+
default: vue.withCtx(() => [
|
|
724
|
+
vue.createTextVNode(" Edit ")
|
|
725
|
+
]),
|
|
726
|
+
_: 1
|
|
727
|
+
}, 8, ["onClick"]),
|
|
728
|
+
vue.createVNode(_component_dt_button, {
|
|
729
|
+
kind: "muted",
|
|
730
|
+
importance: "clear",
|
|
731
|
+
onClick: $options.openLink
|
|
732
|
+
}, {
|
|
733
|
+
default: vue.withCtx(() => [
|
|
734
|
+
vue.createTextVNode(" Open link ")
|
|
735
|
+
]),
|
|
736
|
+
_: 1
|
|
737
|
+
}, 8, ["onClick"]),
|
|
738
|
+
vue.createVNode(_component_dt_button, {
|
|
739
|
+
kind: "danger",
|
|
740
|
+
importance: "clear",
|
|
741
|
+
onClick: $options.removeLink
|
|
742
|
+
}, {
|
|
743
|
+
default: vue.withCtx(() => [
|
|
744
|
+
vue.createTextVNode(" Remove ")
|
|
745
|
+
]),
|
|
746
|
+
_: 1
|
|
747
|
+
}, 8, ["onClick"])
|
|
748
|
+
]),
|
|
749
|
+
_: 1
|
|
750
|
+
})
|
|
751
|
+
])
|
|
752
|
+
]),
|
|
753
|
+
_: 1
|
|
754
|
+
}, 8, ["editor", "should-show", "tippy-options"])) : vue.createCommentVNode("", true),
|
|
755
|
+
vue.createVNode(_component_editor_content, vue.mergeProps({
|
|
756
|
+
ref: "editor",
|
|
757
|
+
editor: $data.editor,
|
|
758
|
+
class: "d-rich-text-editor",
|
|
759
|
+
"data-qa": "dt-rich-text-editor"
|
|
760
|
+
}, $options.attrs), null, 16, ["editor"])
|
|
761
|
+
]);
|
|
560
762
|
}
|
|
561
763
|
const DtRichTextEditor = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
|
|
562
764
|
exports.default = DtRichTextEditor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich_text_editor.vue.cjs","sources":["../../../components/rich_text_editor/rich_text_editor.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <editor-content\n :editor=\"editor\"\n class=\"d-rich-text-editor\"\n data-qa=\"dt-rich-text-editor\"\n v-bind=\"attrs\"\n />\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { Editor, EditorContent } from '@tiptap/vue-3';\nimport { Extension } from '@tiptap/core';\nimport Blockquote from '@tiptap/extension-blockquote';\nimport CodeBlock from '@tiptap/extension-code-block';\nimport Document from '@tiptap/extension-document';\nimport HardBreak from '@tiptap/extension-hard-break';\nimport Paragraph from '@tiptap/extension-paragraph';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport Bold from '@tiptap/extension-bold';\nimport BulletList from '@tiptap/extension-bullet-list';\nimport Italic from '@tiptap/extension-italic';\nimport TipTapLink from '@tiptap/extension-link';\nimport ListItem from '@tiptap/extension-list-item';\nimport OrderedList from '@tiptap/extension-ordered-list';\nimport Strike from '@tiptap/extension-strike';\nimport Underline from '@tiptap/extension-underline';\nimport Text from '@tiptap/extension-text';\nimport TextAlign from '@tiptap/extension-text-align';\nimport History from '@tiptap/extension-history';\nimport Emoji from './extensions/emoji';\nimport CustomLink from './extensions/custom_link';\nimport ConfigurableImage from './extensions/image';\nimport { MentionPlugin } from './extensions/mentions/mention';\nimport { ChannelPlugin } from './extensions/channels/channel';\nimport { SlashCommandPlugin } from './extensions/slash_command/slash_command';\nimport {\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n} from './rich_text_editor_constants';\nimport { emojiPattern } from 'regex-combined-emojis';\n\nimport mentionSuggestion from './extensions/mentions/suggestion';\nimport channelSuggestion from './extensions/channels/suggestion';\nimport slashCommandSuggestion from './extensions/slash_command/suggestion';\nimport { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n name: 'DtRichTextEditor',\n\n components: {\n EditorContent,\n },\n\n props: {\n /**\n * Value of the input. The object format should match TipTap's JSON\n * document structure: https://tiptap.dev/guide/output#option-1-json\n */\n modelValue: {\n type: [Object, String],\n default: '',\n },\n\n /**\n * Whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Prevents the user from typing any further. Deleting text will still work.\n */\n preventTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether the input allows for line breaks to be introduced in the text by pressing enter. If this is disabled,\n * line breaks can still be entered by pressing shift+enter.\n */\n allowLineBreaks: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Descriptive label for the input element\n */\n inputAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Additional class name for the input element. Only accepts a String value\n * because this is passed to the editor via options. For multiple classes,\n * join them into one string, e.g. \"d-p8 d-hmx96\"\n */\n inputClass: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the input should receive focus after the component has been\n * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n * - `start` Sets the focus to the beginning of the input\n * - `end` Sets the focus to the end of the input\n * - `all` Selects the whole contents of the input\n * - `Number` Sets the focus to a specific position in the input\n * - `true` Defaults to `start`\n * - `false` Disables autofocus\n * @values true, false, start, end, all, number\n */\n autoFocus: {\n type: [Boolean, String, Number],\n default: false,\n validator (autoFocus) {\n if (typeof autoFocus === 'string') {\n return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n }\n return true;\n },\n },\n\n /**\n * The output format that the editor uses when emitting the \"@input\" event.\n * One of `text`, `json`, `html`. See https://tiptap.dev/guide/output for\n * examples.\n * @values text, json, html\n */\n outputFormat: {\n type: String,\n default: 'html',\n validator (outputFormat) {\n return RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);\n },\n },\n\n /**\n * Placeholder text\n */\n placeholder: {\n type: String,\n default: '',\n },\n\n /**\n * Enables the TipTap Link extension and optionally passes configurations to it\n *\n * It is not recommended to use this and the custom link extension at the same time.\n */\n link: {\n type: [Boolean, Object],\n default: false,\n },\n\n /**\n * Enables the Custom Link extension and optionally passes configurations to it\n *\n * It is not recommended to use this and the built in TipTap link extension at the same time.\n *\n * The custom link does some additional things on top of the built in TipTap link\n * extension such as styling phone numbers and IP adresses as links, and allows you\n * to linkify text without having to type a space after the link. Currently it is missing some\n * functionality such as editing links and will likely require more work to be fully usable,\n * so it is recommended to use the built in TipTap link for now.\n */\n customLink: {\n type: [Boolean, Object],\n default: false,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the contacts for suggestion.\n * items({ query }) => { return [ContactObject]; }\n * ContactObject format:\n * { name: string, avatarSrc: string, id: string }\n *\n * When null, it does not add the plugin.\n */\n mentionSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the channels for suggestion.\n * items({ query }) => { return [ChannelObject]; }\n * ChannelObject format:\n * { name: string, id: string, locked: boolean }\n *\n * When null, it does not add the plugin. Setting locked to true will display a lock rather than hash.\n */\n channelSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the slash commands for suggestion.\n * items({ query }) => { return [SlashCommandObject]; }\n * SlashCommandObject format:\n * { command: string, description: string, parametersExample?: string }\n * The \"parametersExample\" parameter is optional, and describes an example\n * of the parameters that command can take.\n *\n * When null, it does not add the plugin.\n * Note that slash commands only work when they are the first word in the input.\n */\n slashCommandSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * Whether the input allows for block quote.\n */\n allowBlockquote: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bold to be introduced in the text.\n */\n allowBold: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bullet list to be introduced in the text.\n */\n allowBulletList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for italic to be introduced in the text.\n */\n allowItalic: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for strike to be introduced in the text.\n */\n allowStrike: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for underline to be introduced in the text.\n */\n allowUnderline: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows codeblock to be introduced in the text.\n */\n allowCodeblock: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows inline images to be rendered.\n */\n allowInlineImages: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional TipTap extensions to be added to the editor.\n */\n additionalExtensions: {\n type: Array,\n default: () => [],\n },\n },\n\n emits: [\n /**\n * Editor input event\n * @event input\n * @type {String|JSON}\n */\n 'input',\n\n /**\n * Event to sync the value with the parent\n * @event update:value\n * @type {String|JSON}\n */\n 'update:modelValue',\n\n /**\n * Editor blur event\n * @event blur\n * @type {FocusEvent}\n */\n 'blur',\n\n /**\n * Editor focus event\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Enter was pressed. Note that shift enter must be pressed to line break the input.\n * @event enter\n * @type {String}\n */\n 'enter',\n ],\n\n data () {\n return {\n editor: null,\n };\n },\n\n computed: {\n attrs () {\n return {\n ...this.$attrs,\n onInput: () => {},\n onFocus: () => {},\n onBlur: () => {},\n };\n },\n\n // eslint-disable-next-line complexity\n extensions () {\n // These are the default extensions needed just for plain text.\n const extensions = [Document, Paragraph, Text, History, HardBreak];\n\n if (this.allowBlockquote) {\n extensions.push(Blockquote);\n }\n if (this.allowBold) {\n extensions.push(Bold);\n }\n if (this.allowBulletList) {\n extensions.push(BulletList);\n extensions.push(ListItem);\n extensions.push(OrderedList);\n }\n if (this.allowItalic) {\n extensions.push(Italic);\n }\n if (this.allowStrike) {\n extensions.push(Strike);\n }\n if (this.allowUnderline) {\n extensions.push(Underline);\n }\n\n // Enable placeholderText\n if (this.placeholder) {\n extensions.push(\n Placeholder.configure({ placeholder: this.placeholder }),\n );\n }\n\n const self = this;\n const ShiftEnter = Extension.create({\n addKeyboardShortcuts () {\n return {\n 'Shift-Enter': ({ editor }) => {\n if (self.allowLineBreaks) {\n return false;\n }\n editor.commands.first(({ commands }) => [\n () => commands.newlineInCode(),\n () => self.allowBulletList && commands.splitListItem('listItem'),\n () => commands.createParagraphNear(),\n () => commands.liftEmptyBlock(),\n () => commands.splitBlock(),\n ]);\n return true;\n },\n Enter: () => {\n if (self.allowLineBreaks) {\n return false;\n }\n self.$emit('enter');\n return true;\n },\n };\n },\n });\n extensions.push(ShiftEnter);\n\n if (this.link) {\n extensions.push(TipTapLink.extend({ inclusive: false }).configure({\n HTMLAttributes: {\n class: 'd-link d-wb-break-all',\n },\n autolink: true,\n protocols: RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n }));\n }\n if (this.customLink) {\n extensions.push(this.getExtension(CustomLink, this.customLink));\n }\n\n if (this.mentionSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.mentionSuggestion, ...mentionSuggestion };\n extensions.push(MentionPlugin.configure({ suggestion: suggestionObject }));\n }\n\n if (this.channelSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.channelSuggestion, ...channelSuggestion };\n extensions.push(ChannelPlugin.configure({ suggestion: suggestionObject }));\n }\n\n if (this.slashCommandSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.slashCommandSuggestion, ...slashCommandSuggestion };\n extensions.push(SlashCommandPlugin.configure({ suggestion: suggestionObject }));\n }\n\n // Emoji has some interactions with Enter key\n // hence this should be done last otherwise the enter wont add a emoji.\n extensions.push(Emoji);\n\n extensions.push(TextAlign.configure({\n types: ['paragraph'],\n defaultAlignment: 'left',\n }));\n\n if (this.allowCodeblock) {\n extensions.push(CodeBlock.configure({\n HTMLAttributes: {\n class: 'd-rich-text-editor__code-block',\n },\n }));\n }\n\n if (this.allowInlineImages) {\n extensions.push(ConfigurableImage);\n }\n\n if (this.additionalExtensions.length) {\n extensions.push(...this.additionalExtensions);\n }\n\n return extensions;\n },\n\n inputAttrs () {\n const attrs = {\n 'aria-label': this.inputAriaLabel,\n 'aria-multiline': true,\n role: 'textbox',\n };\n if (!this.editable) {\n attrs['aria-readonly'] = true;\n }\n return attrs;\n },\n },\n\n /**\n * Because the Editor instance is initialized when mounted it does not get\n * updated props automatically, so the ones that can change after mount have\n * to be hooked up to the Editor's own API.\n */\n watch: {\n editable (isEditable) {\n this.editor.setEditable(isEditable);\n this.updateEditorAttributes({ 'aria-readonly': !isEditable });\n },\n\n inputClass (newClass) {\n this.updateEditorAttributes({ class: newClass });\n },\n\n inputAriaLabel (newLabel) {\n this.updateEditorAttributes({ 'aria-label': newLabel });\n },\n\n extensions () {\n // Extensions can't be registered on the fly, so just recreate the editor.\n // https://github.com/ueberdosis/tiptap/issues/1044\n this.destroyEditor();\n this.createEditor();\n },\n\n modelValue (newValue) {\n this.processValue(newValue);\n },\n },\n\n created () {\n this.createEditor();\n },\n\n beforeUnmount () {\n this.destroyEditor();\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n this.processValue(this.modelValue, false);\n },\n\n methods: {\n\n createEditor () {\n // For all available options, see https://tiptap.dev/api/editor#settings\n this.editor = new Editor({\n autofocus: this.autoFocus,\n content: this.modelValue,\n editable: this.editable,\n extensions: this.extensions,\n editorProps: {\n attributes: {\n ...this.inputAttrs,\n class: this.inputClass,\n },\n\n // Moves the <br /> tags inside the previous closing tag to avoid\n // Prosemirror wrapping them within another </p> tag.\n transformPastedHTML (html) {\n return html.replace(/(<\\/\\w+>)((<br \\/>)+)/g, '$2$3$1');\n },\n },\n });\n this.addEditorListeners();\n },\n\n processValue (newValue, returnIfEqual = true) {\n let currentValue = this.getOutput();\n if (this.outputFormat === 'json') {\n newValue = JSON.stringify(newValue);\n currentValue = JSON.stringify(currentValue);\n }\n\n if (returnIfEqual && newValue === currentValue) {\n // The new value came from this component and was passed back down\n // through the parent, so don't do anything here.\n return;\n }\n\n const inputUnicodeRegex = new RegExp(`(${emojiPattern})`, 'g');\n\n // If the text contains emoji characters convert them to emoji component tags\n newValue = newValue.replace(inputUnicodeRegex, '<emoji-component code=\"$1\"></emoji-component>');\n\n // Otherwise replace the content (resets the cursor position).\n this.editor.commands.setContent(newValue, false);\n },\n\n destroyEditor () {\n this.editor.destroy();\n },\n\n /**\n * The Editor exposes event hooks that we have to map our emits into. See\n * https://tiptap.dev/api/events for all events.\n */\n addEditorListeners () {\n // The content has changed.\n this.editor.on('update', () => {\n const value = this.getOutput();\n // When preventTyping is true and user wants to type, we revert to last value\n // If Backspace (keyCode = 8) is pressed, we allow updating the text\n if (this.preventTyping && this.editor.view?.input?.lastKeyCode !== 8) {\n this.editor.commands.setContent(this.value, false);\n return;\n }\n this.$emit('input', value);\n this.$emit('update:modelValue', value);\n });\n\n // The editor is focused.\n this.editor.on('focus', ({ event }) => {\n this.$emit('focus', event);\n });\n\n // The editor isn’t focused anymore.\n this.editor.on('blur', ({ event }) => {\n this.$emit('blur', event);\n });\n },\n\n getOutput () {\n switch (this.outputFormat) {\n case 'json':\n return this.editor.getJSON();\n case 'html':\n return this.editor.getHTML();\n case 'text':\n default:\n return this.editor.getText({ blockSeparator: '\\n' });\n }\n },\n\n getExtension (extension, options) {\n if (typeof options === 'boolean') {\n return extension;\n }\n return extension.configure?.(options);\n },\n\n updateEditorAttributes (attributes) {\n this.editor.setOptions({\n editorProps: {\n attributes: {\n ...this.inputAttrs,\n class: this.inputClass,\n ...attributes,\n },\n },\n });\n },\n\n focusEditor () {\n this.editor.commands.focus();\n },\n },\n};\n</script>\n"],"names":["EditorContent","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","RICH_TEXT_EDITOR_OUTPUT_FORMATS","Extension","RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS","CustomLink","mentionSuggestion","MentionPlugin","channelSuggestion","ChannelPlugin","slashCommandSuggestion","SlashCommandPlugin","Emoji","ConfigurableImage","warnIfUnmounted","Editor","emojiPattern","_openBlock","_createBlock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JC,QAAQ,MAAM;AAAA,IACf,OAAM;AAAA,IACN,WAAQ;AAAA,KACA,SAAK,KAAA,GAAA,MAAA,IAAA,CAAA,QAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"rich_text_editor.vue.cjs","sources":["../../../components/rich_text_editor/rich_text_editor.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <div>\n <!-- why the hell is this visibility: hidden by default??? -->\n <bubble-menu\n v-if=\"editor && link && !hideLinkBubbleMenu\"\n :editor=\"editor\"\n :should-show=\"bubbleMenuShouldShow\"\n :tippy-options=\"tippyOptions\"\n style=\"visibility: visible;\"\n >\n <div class=\"d-popover__dialog\">\n <dt-stack\n direction=\"row\"\n class=\"d-rich-text-editor-bubble-menu__button-stack\"\n gap=\"0\"\n >\n <dt-button\n kind=\"muted\"\n importance=\"clear\"\n @click=\"editLink\"\n >\n Edit\n </dt-button>\n <dt-button\n kind=\"muted\"\n importance=\"clear\"\n @click=\"openLink\"\n >\n Open link\n </dt-button>\n <dt-button\n kind=\"danger\"\n importance=\"clear\"\n @click=\"removeLink\"\n >\n Remove\n </dt-button>\n </dt-stack>\n </div>\n </bubble-menu>\n <editor-content\n ref=\"editor\"\n :editor=\"editor\"\n class=\"d-rich-text-editor\"\n data-qa=\"dt-rich-text-editor\"\n v-bind=\"attrs\"\n />\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { Editor, EditorContent, BubbleMenu } from '@tiptap/vue-3';\nimport { Extension } from '@tiptap/core';\nimport { DtButton } from '../button';\nimport { DtStack } from '../stack';\nimport Blockquote from '@tiptap/extension-blockquote';\nimport CodeBlock from '@tiptap/extension-code-block';\nimport Code from '@tiptap/extension-code';\nimport Document from '@tiptap/extension-document';\nimport HardBreak from '@tiptap/extension-hard-break';\nimport Paragraph from '@tiptap/extension-paragraph';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport Bold from '@tiptap/extension-bold';\nimport BulletList from '@tiptap/extension-bullet-list';\nimport Italic from '@tiptap/extension-italic';\nimport TipTapLink from '@tiptap/extension-link';\nimport ListItem from '@tiptap/extension-list-item';\nimport OrderedList from '@tiptap/extension-ordered-list';\nimport Strike from '@tiptap/extension-strike';\nimport Underline from '@tiptap/extension-underline';\nimport Text from '@tiptap/extension-text';\nimport TextAlign from '@tiptap/extension-text-align';\nimport History from '@tiptap/extension-history';\nimport Emoji from './extensions/emoji';\nimport CustomLink from './extensions/custom_link';\nimport ConfigurableImage from './extensions/image';\nimport { MentionPlugin } from './extensions/mentions/mention';\nimport { ChannelPlugin } from './extensions/channels/channel';\nimport { SlashCommandPlugin } from './extensions/slash_command/slash_command';\nimport {\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n} from './rich_text_editor_constants';\nimport { emojiPattern } from 'regex-combined-emojis';\n\nimport mentionSuggestion from './extensions/mentions/suggestion';\nimport channelSuggestion from './extensions/channels/suggestion';\nimport slashCommandSuggestion from './extensions/slash_command/suggestion';\nimport { warnIfUnmounted } from '@/common/utils';\nimport deepEqual from 'deep-equal';\n\nexport default {\n name: 'DtRichTextEditor',\n\n components: {\n EditorContent,\n BubbleMenu,\n DtButton,\n DtStack,\n },\n\n props: {\n /**\n * Value of the input. The object format should match TipTap's JSON\n * document structure: https://tiptap.dev/guide/output#option-1-json\n */\n modelValue: {\n type: [Object, String],\n default: '',\n },\n\n /**\n * Whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Prevents the user from typing any further. Deleting text will still work.\n */\n preventTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether the input allows for line breaks to be introduced in the text by pressing enter. If this is disabled,\n * line breaks can still be entered by pressing shift+enter.\n */\n allowLineBreaks: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Descriptive label for the input element\n */\n inputAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Additional class name for the input element. Only accepts a String value\n * because this is passed to the editor via options. For multiple classes,\n * join them into one string, e.g. \"d-p8 d-hmx96\"\n */\n inputClass: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the input should receive focus after the component has been\n * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n * - `start` Sets the focus to the beginning of the input\n * - `end` Sets the focus to the end of the input\n * - `all` Selects the whole contents of the input\n * - `Number` Sets the focus to a specific position in the input\n * - `true` Defaults to `start`\n * - `false` Disables autofocus\n * @values true, false, start, end, all, number\n */\n autoFocus: {\n type: [Boolean, String, Number],\n default: false,\n validator (autoFocus) {\n if (typeof autoFocus === 'string') {\n return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n }\n return true;\n },\n },\n\n /**\n * The output format that the editor uses when emitting the \"@input\" event.\n * One of `text`, `json`, `html`. See https://tiptap.dev/guide/output for\n * examples.\n * @values text, json, html\n */\n outputFormat: {\n type: String,\n default: 'html',\n validator (outputFormat) {\n return RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);\n },\n },\n\n /**\n * Placeholder text\n */\n placeholder: {\n type: String,\n default: '',\n },\n\n /**\n * Enables the TipTap Link extension and optionally passes configurations to it\n *\n * It is not recommended to use this and the custom link extension at the same time.\n */\n link: {\n type: [Boolean, Object],\n default: false,\n },\n\n /**\n * Enables the Custom Link extension and optionally passes configurations to it\n *\n * It is not recommended to use this and the built in TipTap link extension at the same time.\n *\n * The custom link does some additional things on top of the built in TipTap link\n * extension such as styling phone numbers and IP adresses as links, and allows you\n * to linkify text without having to type a space after the link. Currently it is missing some\n * functionality such as editing links and will likely require more work to be fully usable,\n * so it is recommended to use the built in TipTap link for now.\n */\n customLink: {\n type: [Boolean, Object],\n default: false,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the contacts for suggestion.\n * items({ query }) => { return [ContactObject]; }\n * ContactObject format:\n * { name: string, avatarSrc: string, id: string }\n *\n * When null, it does not add the plugin.\n */\n mentionSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the channels for suggestion.\n * items({ query }) => { return [ChannelObject]; }\n * ChannelObject format:\n * { name: string, id: string, locked: boolean }\n *\n * When null, it does not add the plugin. Setting locked to true will display a lock rather than hash.\n */\n channelSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the slash commands for suggestion.\n * items({ query }) => { return [SlashCommandObject]; }\n * SlashCommandObject format:\n * { command: string, description: string, parametersExample?: string }\n * The \"parametersExample\" parameter is optional, and describes an example\n * of the parameters that command can take.\n *\n * When null, it does not add the plugin.\n * Note that slash commands only work when they are the first word in the input.\n */\n slashCommandSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * Whether the input allows for block quote.\n */\n allowBlockquote: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bold to be introduced in the text.\n */\n allowBold: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bullet list to be introduced in the text.\n */\n allowBulletList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for italic to be introduced in the text.\n */\n allowItalic: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for strike to be introduced in the text.\n */\n allowStrike: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for underline to be introduced in the text.\n */\n allowUnderline: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows inline code (wrapped in backticks).\n */\n allowCode: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows codeblock to be introduced in the text.\n */\n allowCodeblock: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows inline images to be rendered.\n */\n allowInlineImages: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional TipTap extensions to be added to the editor.\n */\n additionalExtensions: {\n type: Array,\n default: () => [],\n },\n\n /**\n * Manually hide the link bubble menu. The link bubble menu is shown when a link is selected via the cursor.\n * There are some cases when you may want the link to remain selected but hide the bubble menu such as when You\n * are showing a custom link editor popup.\n */\n hideLinkBubbleMenu: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Editor input event\n * @event input\n * @type {String|JSON}\n */\n 'input',\n\n /**\n * Input event always in JSON format.\n * @event input\n * @type {JSON}\n */\n 'json-input',\n\n /**\n * Input event always in HTML format.\n * @event input\n * @type {HTML}\n */\n 'html-input',\n\n /**\n * Input event always in text format.\n * @event input\n * @type {String}\n */\n 'text-input',\n\n /**\n * Event to sync the value with the parent\n * @event update:value\n * @type {String|JSON}\n */\n 'update:modelValue',\n\n /**\n * Editor blur event\n * @event blur\n * @type {FocusEvent}\n */\n 'blur',\n\n /**\n * Editor focus event\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Enter was pressed. Note that shift enter must be pressed to line break the input.\n * @event enter\n * @type {String}\n */\n 'enter',\n\n /**\n * \"Edit link\" button was clicked. Fires an event for the consuming component to handle the editing of the link.\n * event contains the link object with two properties href and text.\n * @event edit-link\n * @type {Object}\n */\n 'edit-link',\n\n /**\n * \"Selected\" event is fired when the user selects text in the editor. returns the currently selected text.\n * If the selected text is partially a link, the full link text is returned.\n * @event selected\n * @type {String}\n */\n 'selected',\n ],\n\n data () {\n return {\n editor: null,\n tippyOptions: {\n appendTo: () => this.$refs.editor.$el.getRootNode()?.querySelector('body'),\n placement: 'top-start',\n },\n };\n },\n\n computed: {\n attrs () {\n return {\n ...this.$attrs,\n onInput: () => {},\n onFocus: () => {},\n onBlur: () => {},\n };\n },\n\n // eslint-disable-next-line complexity\n extensions () {\n // These are the default extensions needed just for plain text.\n const extensions = [Document, Paragraph, Text, History, HardBreak];\n\n if (this.allowBlockquote) {\n extensions.push(Blockquote);\n }\n if (this.allowBold) {\n extensions.push(Bold);\n }\n if (this.allowBulletList) {\n extensions.push(BulletList);\n extensions.push(ListItem.extend({\n renderText ({ node }) {\n return node.textContent;\n },\n }));\n extensions.push(OrderedList);\n }\n if (this.allowItalic) {\n extensions.push(Italic);\n }\n if (this.allowStrike) {\n extensions.push(Strike);\n }\n if (this.allowUnderline) {\n extensions.push(Underline);\n }\n\n // Enable placeholderText\n if (this.placeholder) {\n extensions.push(\n Placeholder.configure({ placeholder: this.placeholder }),\n );\n }\n\n const self = this;\n const ShiftEnter = Extension.create({\n addKeyboardShortcuts () {\n return {\n 'Shift-Enter': ({ editor }) => {\n if (self.allowLineBreaks) {\n return false;\n }\n editor.commands.first(({ commands }) => [\n () => commands.newlineInCode(),\n () => self.allowBulletList && commands.splitListItem('listItem'),\n () => commands.createParagraphNear(),\n () => commands.liftEmptyBlock(),\n () => commands.splitBlock(),\n ]);\n return true;\n },\n Enter: () => {\n if (self.allowLineBreaks) {\n return false;\n }\n self.$emit('enter');\n return true;\n },\n };\n },\n });\n extensions.push(ShiftEnter);\n\n if (this.link) {\n extensions.push(TipTapLink.extend({ inclusive: false }).configure({\n HTMLAttributes: {\n class: 'd-link d-wb-break-all',\n },\n openOnClick: false,\n autolink: true,\n protocols: RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n }));\n }\n if (this.customLink) {\n extensions.push(this.getExtension(CustomLink, this.customLink));\n }\n\n if (this.mentionSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.mentionSuggestion, ...mentionSuggestion };\n extensions.push(MentionPlugin.configure({ suggestion: suggestionObject }));\n }\n\n if (this.channelSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.channelSuggestion, ...channelSuggestion };\n extensions.push(ChannelPlugin.configure({ suggestion: suggestionObject }));\n }\n\n if (this.slashCommandSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.slashCommandSuggestion, ...slashCommandSuggestion };\n extensions.push(SlashCommandPlugin.configure({ suggestion: suggestionObject }));\n }\n\n // Emoji has some interactions with Enter key\n // hence this should be done last otherwise the enter wont add a emoji.\n extensions.push(Emoji);\n\n extensions.push(TextAlign.configure({\n types: ['paragraph'],\n defaultAlignment: 'left',\n }));\n\n if (this.allowCode) {\n extensions.push(Code);\n }\n\n if (this.allowCodeblock) {\n extensions.push(CodeBlock.extend({\n renderText ({ node }) {\n return `\\`\\`\\`\\n${node.textContent}\\n\\`\\`\\``;\n },\n }).configure({\n HTMLAttributes: {\n class: 'd-rich-text-editor__code-block',\n },\n }));\n }\n\n if (this.allowInlineImages) {\n extensions.push(ConfigurableImage);\n }\n\n if (this.additionalExtensions.length) {\n extensions.push(...this.additionalExtensions);\n }\n\n return extensions;\n },\n\n inputAttrs () {\n const attrs = {\n 'aria-label': this.inputAriaLabel,\n 'aria-multiline': true,\n role: 'textbox',\n };\n if (!this.editable) {\n attrs['aria-readonly'] = true;\n }\n return attrs;\n },\n },\n\n /**\n * Because the Editor instance is initialized when mounted it does not get\n * updated props automatically, so the ones that can change after mount have\n * to be hooked up to the Editor's own API.\n */\n watch: {\n editable (isEditable) {\n this.editor.setEditable(isEditable);\n this.updateEditorAttributes({ 'aria-readonly': !isEditable });\n },\n\n inputClass (newClass) {\n this.updateEditorAttributes({ class: newClass });\n },\n\n inputAriaLabel (newLabel) {\n this.updateEditorAttributes({ 'aria-label': newLabel });\n },\n\n extensions () {\n // Extensions can't be registered on the fly, so just recreate the editor.\n // https://github.com/ueberdosis/tiptap/issues/1044\n this.destroyEditor();\n this.createEditor();\n },\n\n modelValue (newValue) {\n this.processValue(newValue);\n },\n },\n\n created () {\n this.createEditor();\n },\n\n beforeUnmount () {\n this.destroyEditor();\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n this.processValue(this.modelValue, false);\n },\n\n methods: {\n\n createEditor () {\n // For all available options, see https://tiptap.dev/api/editor#settings\n this.editor = new Editor({\n autofocus: this.autoFocus,\n content: this.modelValue,\n editable: this.editable,\n extensions: this.extensions,\n editorProps: {\n attributes: {\n ...this.inputAttrs,\n class: this.inputClass,\n },\n\n // Moves the <br /> tags inside the previous closing tag to avoid\n // Prosemirror wrapping them within another </p> tag.\n transformPastedHTML (html) {\n return html.replace(/(<\\/\\w+>)((<br \\/>)+)/g, '$2$3$1');\n },\n },\n });\n this.addEditorListeners();\n },\n\n bubbleMenuShouldShow ({ editor, view, state, oldState, from, to }) {\n return editor.isActive('link');\n },\n\n /**\n * If the selection contains a link, return the existing link text.\n * Otherwise, use just the selected text.\n * @param editor the editor instance.\n */\n getSelectedLinkText (editor) {\n const { view, state } = editor;\n const { from, to } = view.state.selection;\n const text = state.doc.textBetween(from, to, '');\n const linkNode = this.editor.state.doc.nodeAt(from);\n if (linkNode && linkNode.marks?.at(0)?.type?.name === 'link') {\n return linkNode.textContent;\n } else {\n return text;\n }\n },\n\n editLink () {\n const linkText = this.getSelectedLinkText(this.editor);\n\n const link = {\n href: this.editor.getAttributes('link').href,\n text: linkText,\n };\n this.$emit('edit-link', link);\n },\n\n removeLink () {\n this.editor?.chain()?.focus()?.unsetLink()?.run();\n },\n\n openLink () {\n this.editor?.chain()?.focus();\n const link = this.editor.getAttributes('link').href;\n window.open(link, '_blank');\n },\n\n // eslint-disable-next-line complexity\n setLink (linkInput, linkText, linkOptions, linkProtocols = RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n defaultPrefix) {\n if (!linkInput) {\n // If link text is set to empty string,\n // remove any existing links.\n this.removeLink();\n return;\n }\n\n // Check if input matches any of the supported link formats\n const prefix = linkProtocols.find(prefixRegex => prefixRegex.test(linkInput));\n\n if (!prefix) {\n // If no matching pattern is found, prepend default prefix\n linkInput = `${defaultPrefix}${linkInput}`;\n }\n\n this.editor\n .chain()\n .focus()\n .extendMarkRange('link')\n .run();\n\n const selection = this.editor?.view?.state?.selection;\n\n this.editor\n .chain()\n .focus()\n .insertContent(linkText)\n .setTextSelection({ from: selection.from, to: selection.from + linkText.length })\n .setLink({ href: linkInput, class: linkOptions.class })\n .run();\n },\n\n // eslint-disable-next-line complexity\n processValue (newValue, returnIfEqual = true) {\n const currentValue = this.getOutput();\n\n if (returnIfEqual && deepEqual(newValue, currentValue)) {\n // The new value came from this component and was passed back down\n // through the parent, so don't do anything here.\n return;\n }\n\n // If the text contains emoji characters convert them to emoji component tags\n if (typeof newValue === 'string' && this.outputFormat === 'text') {\n const inputUnicodeRegex = new RegExp(`(${emojiPattern})`, 'g');\n newValue = newValue?.replace(inputUnicodeRegex, '<emoji-component code=\"$1\"></emoji-component>');\n }\n\n // Otherwise replace the content (resets the cursor position).\n this.editor.commands.setContent(newValue, false);\n },\n\n destroyEditor () {\n this.editor.destroy();\n },\n\n triggerInputChangeEvents () {\n const value = this.getOutput();\n this.$emit('input', value);\n this.$emit('update:modelValue', value);\n\n // Always output JSON in a separate event\n const jsonValue = this.editor.getJSON();\n this.$emit('json-input', jsonValue);\n\n // Always output HTML in a separate event\n const htmlValue = this.editor.getHTML();\n this.$emit('html-input', htmlValue);\n\n // Always output HTML in a separate event\n const textValue = this.editor.getText({ blockSeparator: '\\n' });\n this.$emit('text-input', textValue);\n },\n\n /**\n * The Editor exposes event hooks that we have to map our emits into. See\n * https://tiptap.dev/api/events for all events.\n */\n addEditorListeners () {\n this.editor.on('create', () => {\n this.triggerInputChangeEvents();\n });\n // The content has changed.\n this.editor.on('update', () => {\n // When preventTyping is true and user wants to type, we revert to last value\n // If Backspace (keyCode = 8) is pressed, we allow updating the text\n if (this.preventTyping && this.editor.view?.input?.lastKeyCode !== 8) {\n this.editor.commands.setContent(this.value, false);\n return;\n }\n this.triggerInputChangeEvents();\n });\n\n this.editor.on('selectionUpdate', ({ editor }) => {\n this.$emit('selected', this.getSelectedLinkText(editor));\n });\n\n // The editor is focused.\n this.editor.on('focus', ({ event }) => {\n this.$emit('focus', event);\n });\n\n // The editor isn’t focused anymore.\n this.editor.on('blur', ({ event }) => {\n this.$emit('blur', event);\n });\n },\n\n getOutput () {\n switch (this.outputFormat) {\n case 'json':\n return this.editor.getJSON();\n case 'html':\n return this.editor.getHTML();\n case 'text':\n default:\n return this.editor.getText({ blockSeparator: '\\n' });\n }\n },\n\n getExtension (extension, options) {\n if (typeof options === 'boolean') {\n return extension;\n }\n return extension.configure?.(options);\n },\n\n updateEditorAttributes (attributes) {\n this.editor.setOptions({\n editorProps: {\n attributes: {\n ...this.inputAttrs,\n class: this.inputClass,\n ...attributes,\n },\n },\n });\n },\n\n focusEditor () {\n this.editor.commands.focus();\n },\n },\n};\n</script>\n"],"names":["EditorContent","BubbleMenu","DtButton","DtStack","RICH_TEXT_EDITOR_AUTOFOCUS_TYPES","RICH_TEXT_EDITOR_OUTPUT_FORMATS","Extension","RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS","CustomLink","mentionSuggestion","MentionPlugin","channelSuggestion","ChannelPlugin","slashCommandSuggestion","SlashCommandPlugin","Emoji","ConfigurableImage","warnIfUnmounted","Editor","emojiPattern","_createElementBlock","_createBlock","_withCtx","_createElementVNode","_createVNode","_createTextVNode","_createCommentVNode","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,mBACVA,KAAa;AAAA,gBACbC,KAAU;AAAA,IACV,UAAAC,OAAQ;AAAA,IACR,SAAAC,MAAO;AAAA,EACR;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,M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