@dialpad/dialtone-vue 2.157.1 → 2.158.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/emoji_picker/modules/emoji_search.vue.cjs +3 -3
- package/dist/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
- package/dist/components/emoji_picker/modules/emoji_search.vue.js +3 -3
- package/dist/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
- package/dist/components/emoji_picker/modules/emoji_tabset.vue.cjs +1 -1
- package/dist/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
- package/dist/components/emoji_picker/modules/emoji_tabset.vue.js +1 -1
- package/dist/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
- package/dist/components/rich_text_editor/extensions/emoji/emoji.cjs +38 -40
- package/dist/components/rich_text_editor/extensions/emoji/emoji.cjs.map +1 -1
- package/dist/components/rich_text_editor/extensions/emoji/emoji.js +40 -42
- package/dist/components/rich_text_editor/extensions/emoji/emoji.js.map +1 -1
- package/dist/components/rich_text_editor/extensions/emoji/index.cjs +3 -1
- package/dist/components/rich_text_editor/extensions/emoji/index.cjs.map +1 -1
- package/dist/components/rich_text_editor/extensions/emoji/index.js +1 -0
- package/dist/components/rich_text_editor/extensions/emoji/suggestion.cjs +0 -4
- package/dist/components/rich_text_editor/extensions/emoji/suggestion.cjs.map +1 -1
- package/dist/components/rich_text_editor/extensions/emoji/suggestion.js +0 -4
- package/dist/components/rich_text_editor/extensions/emoji/suggestion.js.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/channels/channel.d.ts +1 -1
- package/dist/types/components/rich_text_editor/extensions/channels/channel.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/emoji/emoji.d.ts +0 -2
- package/dist/types/components/rich_text_editor/extensions/emoji/emoji.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/emoji/index.d.ts +1 -0
- package/dist/types/components/rich_text_editor/extensions/emoji/index.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/mentions/mention.d.ts +1 -1
- package/dist/types/components/rich_text_editor/extensions/mentions/mention.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts +1 -1
- package/dist/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts.map +1 -1
- package/package.json +26 -26
|
@@ -60,9 +60,9 @@ var _sfc_render = function render() {
|
|
|
60
60
|
}] }, scopedSlots: _vm._u([{ key: "leftIcon", fn: function() {
|
|
61
61
|
return [_c("dt-icon", { attrs: { "name": "search", "size": "200" } })];
|
|
62
62
|
}, proxy: true }, _vm.modelValue.length > 0 ? { key: "rightIcon", fn: function() {
|
|
63
|
-
return [_c("dt-button", { attrs: { "importance": "clear", "kind": "muted" }, on: { "click": _vm.clearSearch }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
64
|
-
return [_c("dt-icon", { attrs: { "name": "
|
|
65
|
-
}, proxy: true }], null, false,
|
|
63
|
+
return [_c("dt-button", { staticClass: "d-mrn4", attrs: { "importance": "clear", "size": "xs", "circle": "", "kind": "muted" }, on: { "click": _vm.clearSearch }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
64
|
+
return [_c("dt-icon", { attrs: { "name": "close", "size": "200" } })];
|
|
65
|
+
}, proxy: true }], null, false, 1154370889) })];
|
|
66
66
|
}, proxy: true } : null], null, true) })], 1);
|
|
67
67
|
};
|
|
68
68
|
var _sfc_staticRenderFns = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji_search.vue.cjs","sources":["../../../../components/emoji_picker/modules/emoji_search.vue"],"sourcesContent":["<template>\n <div class=\"d-emoji-picker__search d-emoji-picker__alignment\">\n <dt-input\n id=\"searchInput\"\n ref=\"searchInputRef\"\n :placeholder=\"searchPlaceholderLabel\"\n :value=\"modelValue\"\n @input=\"updateModelValue\"\n @keydown.up=\"focusTabset\"\n @keydown.down.prevent=\"focusEmojiSelector\"\n @keydown.enter=\"selectFirstEmoji\"\n >\n <template #leftIcon>\n <dt-icon\n name=\"search\"\n size=\"200\"\n />\n </template>\n <template\n v-if=\"modelValue.length > 0\"\n #rightIcon\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n @click=\"clearSearch\"\n >\n <template #icon>\n <dt-icon\n name=\"
|
|
1
|
+
{"version":3,"file":"emoji_search.vue.cjs","sources":["../../../../components/emoji_picker/modules/emoji_search.vue"],"sourcesContent":["<template>\n <div class=\"d-emoji-picker__search d-emoji-picker__alignment\">\n <dt-input\n id=\"searchInput\"\n ref=\"searchInputRef\"\n :placeholder=\"searchPlaceholderLabel\"\n :value=\"modelValue\"\n @input=\"updateModelValue\"\n @keydown.up=\"focusTabset\"\n @keydown.down.prevent=\"focusEmojiSelector\"\n @keydown.enter=\"selectFirstEmoji\"\n >\n <template #leftIcon>\n <dt-icon\n name=\"search\"\n size=\"200\"\n />\n </template>\n <template\n v-if=\"modelValue.length > 0\"\n #rightIcon\n >\n <dt-button\n importance=\"clear\"\n size=\"xs\"\n class=\"d-mrn4\"\n circle\n kind=\"muted\"\n @click=\"clearSearch\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n </dt-input>\n </div>\n</template>\n\n<script>\nimport { DtInput } from '@/components/input';\nimport { DtIcon } from '@/components/icon';\nimport { DtButton } from '@/components/button';\n\nexport default {\n name: 'EmojiSearch',\n\n components: {\n DtInput,\n DtIcon,\n DtButton,\n },\n\n props: {\n searchPlaceholderLabel: {\n type: String,\n required: true,\n },\n\n modelValue: {\n type: String,\n default: '',\n },\n },\n\n mounted () {\n this.focusSearchInput();\n },\n\n methods: {\n updateModelValue (value) {\n this.$emit('update:model-value', value);\n },\n\n focusEmojiSelector () {\n this.$emit('focus-emoji-selector');\n },\n\n focusTabset () {\n this.$emit('focus-tabset');\n },\n\n selectFirstEmoji () {\n this.$emit('select-first-emoji');\n },\n\n clearSearch () {\n this.$emit('update:model-value', '');\n this.focusSearchInput();\n },\n\n focusSearchInput () {\n this.$refs.searchInputRef.focus();\n },\n },\n};\n</script>\n"],"names":["DtInput","DtIcon","DtButton"],"mappings":";;;;;AA+CA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,SAAAA;AAAAA,IACA,QAAAC;AAAAA,IACA,UAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,wBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,iBAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,iBAAA,OAAA;AACA,WAAA,MAAA,sBAAA,KAAA;AAAA,IACA;AAAA,IAEA,qBAAA;AACA,WAAA,MAAA,sBAAA;AAAA,IACA;AAAA,IAEA,cAAA;AACA,WAAA,MAAA,cAAA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,WAAA,MAAA,oBAAA;AAAA,IACA;AAAA,IAEA,cAAA;AACA,WAAA,MAAA,sBAAA,EAAA;AACA,WAAA,iBAAA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,WAAA,MAAA,eAAA;IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -59,9 +59,9 @@ var _sfc_render = function render() {
|
|
|
59
59
|
}] }, scopedSlots: _vm._u([{ key: "leftIcon", fn: function() {
|
|
60
60
|
return [_c("dt-icon", { attrs: { "name": "search", "size": "200" } })];
|
|
61
61
|
}, proxy: true }, _vm.modelValue.length > 0 ? { key: "rightIcon", fn: function() {
|
|
62
|
-
return [_c("dt-button", { attrs: { "importance": "clear", "kind": "muted" }, on: { "click": _vm.clearSearch }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
63
|
-
return [_c("dt-icon", { attrs: { "name": "
|
|
64
|
-
}, proxy: true }], null, false,
|
|
62
|
+
return [_c("dt-button", { staticClass: "d-mrn4", attrs: { "importance": "clear", "size": "xs", "circle": "", "kind": "muted" }, on: { "click": _vm.clearSearch }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
63
|
+
return [_c("dt-icon", { attrs: { "name": "close", "size": "200" } })];
|
|
64
|
+
}, proxy: true }], null, false, 1154370889) })];
|
|
65
65
|
}, proxy: true } : null], null, true) })], 1);
|
|
66
66
|
};
|
|
67
67
|
var _sfc_staticRenderFns = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji_search.vue.js","sources":["../../../../components/emoji_picker/modules/emoji_search.vue"],"sourcesContent":["<template>\n <div class=\"d-emoji-picker__search d-emoji-picker__alignment\">\n <dt-input\n id=\"searchInput\"\n ref=\"searchInputRef\"\n :placeholder=\"searchPlaceholderLabel\"\n :value=\"modelValue\"\n @input=\"updateModelValue\"\n @keydown.up=\"focusTabset\"\n @keydown.down.prevent=\"focusEmojiSelector\"\n @keydown.enter=\"selectFirstEmoji\"\n >\n <template #leftIcon>\n <dt-icon\n name=\"search\"\n size=\"200\"\n />\n </template>\n <template\n v-if=\"modelValue.length > 0\"\n #rightIcon\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n @click=\"clearSearch\"\n >\n <template #icon>\n <dt-icon\n name=\"
|
|
1
|
+
{"version":3,"file":"emoji_search.vue.js","sources":["../../../../components/emoji_picker/modules/emoji_search.vue"],"sourcesContent":["<template>\n <div class=\"d-emoji-picker__search d-emoji-picker__alignment\">\n <dt-input\n id=\"searchInput\"\n ref=\"searchInputRef\"\n :placeholder=\"searchPlaceholderLabel\"\n :value=\"modelValue\"\n @input=\"updateModelValue\"\n @keydown.up=\"focusTabset\"\n @keydown.down.prevent=\"focusEmojiSelector\"\n @keydown.enter=\"selectFirstEmoji\"\n >\n <template #leftIcon>\n <dt-icon\n name=\"search\"\n size=\"200\"\n />\n </template>\n <template\n v-if=\"modelValue.length > 0\"\n #rightIcon\n >\n <dt-button\n importance=\"clear\"\n size=\"xs\"\n class=\"d-mrn4\"\n circle\n kind=\"muted\"\n @click=\"clearSearch\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n </dt-input>\n </div>\n</template>\n\n<script>\nimport { DtInput } from '@/components/input';\nimport { DtIcon } from '@/components/icon';\nimport { DtButton } from '@/components/button';\n\nexport default {\n name: 'EmojiSearch',\n\n components: {\n DtInput,\n DtIcon,\n DtButton,\n },\n\n props: {\n searchPlaceholderLabel: {\n type: String,\n required: true,\n },\n\n modelValue: {\n type: String,\n default: '',\n },\n },\n\n mounted () {\n this.focusSearchInput();\n },\n\n methods: {\n updateModelValue (value) {\n this.$emit('update:model-value', value);\n },\n\n focusEmojiSelector () {\n this.$emit('focus-emoji-selector');\n },\n\n focusTabset () {\n this.$emit('focus-tabset');\n },\n\n selectFirstEmoji () {\n this.$emit('select-first-emoji');\n },\n\n clearSearch () {\n this.$emit('update:model-value', '');\n this.focusSearchInput();\n },\n\n focusSearchInput () {\n this.$refs.searchInputRef.focus();\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;AA+CA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,wBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,iBAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,iBAAA,OAAA;AACA,WAAA,MAAA,sBAAA,KAAA;AAAA,IACA;AAAA,IAEA,qBAAA;AACA,WAAA,MAAA,sBAAA;AAAA,IACA;AAAA,IAEA,cAAA;AACA,WAAA,MAAA,cAAA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,WAAA,MAAA,oBAAA;AAAA,IACA;AAAA,IAEA,cAAA;AACA,WAAA,MAAA,sBAAA,EAAA;AACA,WAAA,iBAAA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,WAAA,MAAA,eAAA;IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -125,7 +125,7 @@ const _sfc_main = {
|
|
|
125
125
|
};
|
|
126
126
|
var _sfc_render = function render() {
|
|
127
127
|
var _vm = this, _c = _vm._self._c;
|
|
128
|
-
return _c("div", { staticClass: "d-emoji-picker__tabset" }, [_c("dt-tab-group", { attrs: { "tab-list-class": "d-emoji-picker__tabset-list", "selected": _vm.selectedTab }, scopedSlots: _vm._u([{ key: "tabs", fn: function() {
|
|
128
|
+
return _c("div", { staticClass: "d-emoji-picker__tabset" }, [_c("dt-tab-group", { attrs: { "size": "sm", "tab-list-class": "d-emoji-picker__tabset-list", "selected": _vm.selectedTab }, scopedSlots: _vm._u([{ key: "tabs", fn: function() {
|
|
129
129
|
return _vm._l(_vm.tabs, function(tab2, index) {
|
|
130
130
|
return _c("dt-tab", { key: tab2.id, ref: `tabsetRef-${index}`, refInFor: true, attrs: { "id": tab2.id, "panel-id": tab2.panelId, "label": tab2.label, "aria-controls": "d-emoji-picker-list", "tabindex": index + 1 }, on: { "!click": function($event) {
|
|
131
131
|
$event.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji_tabset.vue.cjs","sources":["../../../../components/emoji_picker/modules/emoji_tabset.vue"],"sourcesContent":["<template>\n <div class=\"d-emoji-picker__tabset\">\n <dt-tab-group\n tab-list-class=\"d-emoji-picker__tabset-list\"\n :selected=\"selectedTab\"\n >\n <template #tabs>\n <dt-tab\n v-for=\"(tab, index) in tabs\"\n :id=\"tab.id\"\n :ref=\"`tabsetRef-${index}`\"\n :key=\"tab.id\"\n :panel-id=\"tab.panelId\"\n :label=\"tab.label\"\n aria-controls=\"d-emoji-picker-list\"\n :tabindex=\"index + 1\"\n @click.capture.stop=\"selectTabset(tab.id)\"\n @keydown=\"handleKeyDown($event, tab.id)\"\n >\n <dt-icon\n size=\"400\"\n :name=\"tab.icon\"\n />\n </dt-tab>\n </template>\n </dt-tab-group>\n </div>\n</template>\n\n<script>\nimport DtTabGroup from '@/components/tabs/tab_group.vue';\nimport DtTab from '@/components/tabs/tab.vue';\nimport DtIcon from '@/components/icon/icon.vue';\nimport { EMOJI_PICKER_CATEGORIES } from '@/components/emoji_picker';\n\nexport default {\n name: 'EmojiTabset',\n\n components: {\n DtTabGroup,\n DtTab,\n DtIcon,\n },\n\n props: {\n showRecentlyUsedTab: {\n type: Boolean,\n default: false,\n },\n\n scrollIntoTab: {\n type: Number,\n required: true,\n },\n\n isScrolling: {\n type: Boolean,\n default: false,\n },\n\n emojiFilter: {\n type: String,\n default: '',\n },\n\n tabSetLabels: {\n type: Array,\n required: true,\n },\n },\n\n data () {\n return {\n selectedTab: '1',\n tabsetRef: [],\n TABS_DATA: [\n { label: EMOJI_PICKER_CATEGORIES.MOST_RECENTLY_USED, icon: 'clock' },\n { label: EMOJI_PICKER_CATEGORIES.SMILEYS_AND_PEOPLE, icon: 'satisfied' },\n { label: EMOJI_PICKER_CATEGORIES.NATURE, icon: 'living-thing' },\n { label: EMOJI_PICKER_CATEGORIES.FOOD, icon: 'food' },\n { label: EMOJI_PICKER_CATEGORIES.ACTIVITY, icon: 'object' },\n { label: EMOJI_PICKER_CATEGORIES.TRAVEL, icon: 'transportation' },\n { label: EMOJI_PICKER_CATEGORIES.OBJECTS, icon: 'lightbulb' },\n { label: EMOJI_PICKER_CATEGORIES.SYMBOLS, icon: 'heart' },\n { label: EMOJI_PICKER_CATEGORIES.FLAGS, icon: 'flag' },\n ],\n };\n },\n\n computed: {\n tabs () {\n const tabsData = this.showRecentlyUsedTab ? this.TABS_DATA : this.TABS_DATA.slice(1);\n return tabsData.map((tab, index) => ({\n ...tab,\n label: this.tabSetLabels[index],\n id: (index + 1).toString(),\n panelId: (index + 1).toString(),\n }));\n },\n\n isSearching () {\n return this.emojiFilter.length > 0;\n },\n },\n\n watch: {\n scrollIntoTab: function (newVal) {\n if (!this.isScrolling && !this.isSearching) {\n this.selectedTab = (newVal + 1).toString();\n }\n },\n\n isSearching: function (newVal) {\n if (newVal) {\n this.selectedTab = null;\n }\n },\n },\n\n mounted () {\n this.$nextTick(() => {\n this.setTabsetRef();\n });\n },\n\n methods: {\n selectTabset (id) {\n if (!this.isScrolling) {\n this.selectedTab = id;\n }\n this.$emit('selected-tabset', id);\n },\n\n setTabsetRef () {\n this.tabs.forEach((skin, index) => {\n const refKey = `tabsetRef-${index}`;\n if (this.$refs[refKey]) {\n this.$set(this.tabsetRef, index, this.$refs[refKey][0].$el);\n }\n });\n },\n\n focusTabset () {\n if (this.tabsetRef[0]) {\n this.tabsetRef[0].focus();\n }\n },\n\n // eslint-disable-next-line complexity\n handleKeyDown (event, tabId) {\n if (event.key === 'Enter') {\n this.selectTabset(tabId);\n if (this.tabsetRef[tabId - 1]) {\n this.tabsetRef[tabId - 1].blur();\n }\n }\n\n if (event.key === 'Tab') {\n event.preventDefault();\n if (event.shiftKey) {\n this.$emit('focus-skin-selector');\n } else {\n this.$emit('focus-search-input');\n }\n }\n\n if (event.key === 'ArrowDown') {\n this.$emit('focus-search-input');\n }\n },\n },\n};\n</script>\n"],"names":["DtTabGroup","DtTab","DtIcon","EMOJI_PICKER_CATEGORIES","tab"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"emoji_tabset.vue.cjs","sources":["../../../../components/emoji_picker/modules/emoji_tabset.vue"],"sourcesContent":["<template>\n <div class=\"d-emoji-picker__tabset\">\n <dt-tab-group\n size=\"sm\"\n tab-list-class=\"d-emoji-picker__tabset-list\"\n :selected=\"selectedTab\"\n >\n <template #tabs>\n <dt-tab\n v-for=\"(tab, index) in tabs\"\n :id=\"tab.id\"\n :ref=\"`tabsetRef-${index}`\"\n :key=\"tab.id\"\n :panel-id=\"tab.panelId\"\n :label=\"tab.label\"\n aria-controls=\"d-emoji-picker-list\"\n :tabindex=\"index + 1\"\n @click.capture.stop=\"selectTabset(tab.id)\"\n @keydown=\"handleKeyDown($event, tab.id)\"\n >\n <dt-icon\n size=\"400\"\n :name=\"tab.icon\"\n />\n </dt-tab>\n </template>\n </dt-tab-group>\n </div>\n</template>\n\n<script>\nimport DtTabGroup from '@/components/tabs/tab_group.vue';\nimport DtTab from '@/components/tabs/tab.vue';\nimport DtIcon from '@/components/icon/icon.vue';\nimport { EMOJI_PICKER_CATEGORIES } from '@/components/emoji_picker';\n\nexport default {\n name: 'EmojiTabset',\n\n components: {\n DtTabGroup,\n DtTab,\n DtIcon,\n },\n\n props: {\n showRecentlyUsedTab: {\n type: Boolean,\n default: false,\n },\n\n scrollIntoTab: {\n type: Number,\n required: true,\n },\n\n isScrolling: {\n type: Boolean,\n default: false,\n },\n\n emojiFilter: {\n type: String,\n default: '',\n },\n\n tabSetLabels: {\n type: Array,\n required: true,\n },\n },\n\n data () {\n return {\n selectedTab: '1',\n tabsetRef: [],\n TABS_DATA: [\n { label: EMOJI_PICKER_CATEGORIES.MOST_RECENTLY_USED, icon: 'clock' },\n { label: EMOJI_PICKER_CATEGORIES.SMILEYS_AND_PEOPLE, icon: 'satisfied' },\n { label: EMOJI_PICKER_CATEGORIES.NATURE, icon: 'living-thing' },\n { label: EMOJI_PICKER_CATEGORIES.FOOD, icon: 'food' },\n { label: EMOJI_PICKER_CATEGORIES.ACTIVITY, icon: 'object' },\n { label: EMOJI_PICKER_CATEGORIES.TRAVEL, icon: 'transportation' },\n { label: EMOJI_PICKER_CATEGORIES.OBJECTS, icon: 'lightbulb' },\n { label: EMOJI_PICKER_CATEGORIES.SYMBOLS, icon: 'heart' },\n { label: EMOJI_PICKER_CATEGORIES.FLAGS, icon: 'flag' },\n ],\n };\n },\n\n computed: {\n tabs () {\n const tabsData = this.showRecentlyUsedTab ? this.TABS_DATA : this.TABS_DATA.slice(1);\n return tabsData.map((tab, index) => ({\n ...tab,\n label: this.tabSetLabels[index],\n id: (index + 1).toString(),\n panelId: (index + 1).toString(),\n }));\n },\n\n isSearching () {\n return this.emojiFilter.length > 0;\n },\n },\n\n watch: {\n scrollIntoTab: function (newVal) {\n if (!this.isScrolling && !this.isSearching) {\n this.selectedTab = (newVal + 1).toString();\n }\n },\n\n isSearching: function (newVal) {\n if (newVal) {\n this.selectedTab = null;\n }\n },\n },\n\n mounted () {\n this.$nextTick(() => {\n this.setTabsetRef();\n });\n },\n\n methods: {\n selectTabset (id) {\n if (!this.isScrolling) {\n this.selectedTab = id;\n }\n this.$emit('selected-tabset', id);\n },\n\n setTabsetRef () {\n this.tabs.forEach((skin, index) => {\n const refKey = `tabsetRef-${index}`;\n if (this.$refs[refKey]) {\n this.$set(this.tabsetRef, index, this.$refs[refKey][0].$el);\n }\n });\n },\n\n focusTabset () {\n if (this.tabsetRef[0]) {\n this.tabsetRef[0].focus();\n }\n },\n\n // eslint-disable-next-line complexity\n handleKeyDown (event, tabId) {\n if (event.key === 'Enter') {\n this.selectTabset(tabId);\n if (this.tabsetRef[tabId - 1]) {\n this.tabsetRef[tabId - 1].blur();\n }\n }\n\n if (event.key === 'Tab') {\n event.preventDefault();\n if (event.shiftKey) {\n this.$emit('focus-skin-selector');\n } else {\n this.$emit('focus-search-input');\n }\n }\n\n if (event.key === 'ArrowDown') {\n this.$emit('focus-search-input');\n }\n },\n },\n};\n</script>\n"],"names":["DtTabGroup","DtTab","DtIcon","EMOJI_PICKER_CATEGORIES","tab"],"mappings":";;;;;;AAoCA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,YAAAA;AAAAA,IACA,OAAAC;AAAAA,IACA,QAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA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A,MAAA,oBAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -124,7 +124,7 @@ const _sfc_main = {
|
|
|
124
124
|
};
|
|
125
125
|
var _sfc_render = function render() {
|
|
126
126
|
var _vm = this, _c = _vm._self._c;
|
|
127
|
-
return _c("div", { staticClass: "d-emoji-picker__tabset" }, [_c("dt-tab-group", { attrs: { "tab-list-class": "d-emoji-picker__tabset-list", "selected": _vm.selectedTab }, scopedSlots: _vm._u([{ key: "tabs", fn: function() {
|
|
127
|
+
return _c("div", { staticClass: "d-emoji-picker__tabset" }, [_c("dt-tab-group", { attrs: { "size": "sm", "tab-list-class": "d-emoji-picker__tabset-list", "selected": _vm.selectedTab }, scopedSlots: _vm._u([{ key: "tabs", fn: function() {
|
|
128
128
|
return _vm._l(_vm.tabs, function(tab, index) {
|
|
129
129
|
return _c("dt-tab", { key: tab.id, ref: `tabsetRef-${index}`, refInFor: true, attrs: { "id": tab.id, "panel-id": tab.panelId, "label": tab.label, "aria-controls": "d-emoji-picker-list", "tabindex": index + 1 }, on: { "!click": function($event) {
|
|
130
130
|
$event.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji_tabset.vue.js","sources":["../../../../components/emoji_picker/modules/emoji_tabset.vue"],"sourcesContent":["<template>\n <div class=\"d-emoji-picker__tabset\">\n <dt-tab-group\n tab-list-class=\"d-emoji-picker__tabset-list\"\n :selected=\"selectedTab\"\n >\n <template #tabs>\n <dt-tab\n v-for=\"(tab, index) in tabs\"\n :id=\"tab.id\"\n :ref=\"`tabsetRef-${index}`\"\n :key=\"tab.id\"\n :panel-id=\"tab.panelId\"\n :label=\"tab.label\"\n aria-controls=\"d-emoji-picker-list\"\n :tabindex=\"index + 1\"\n @click.capture.stop=\"selectTabset(tab.id)\"\n @keydown=\"handleKeyDown($event, tab.id)\"\n >\n <dt-icon\n size=\"400\"\n :name=\"tab.icon\"\n />\n </dt-tab>\n </template>\n </dt-tab-group>\n </div>\n</template>\n\n<script>\nimport DtTabGroup from '@/components/tabs/tab_group.vue';\nimport DtTab from '@/components/tabs/tab.vue';\nimport DtIcon from '@/components/icon/icon.vue';\nimport { EMOJI_PICKER_CATEGORIES } from '@/components/emoji_picker';\n\nexport default {\n name: 'EmojiTabset',\n\n components: {\n DtTabGroup,\n DtTab,\n DtIcon,\n },\n\n props: {\n showRecentlyUsedTab: {\n type: Boolean,\n default: false,\n },\n\n scrollIntoTab: {\n type: Number,\n required: true,\n },\n\n isScrolling: {\n type: Boolean,\n default: false,\n },\n\n emojiFilter: {\n type: String,\n default: '',\n },\n\n tabSetLabels: {\n type: Array,\n required: true,\n },\n },\n\n data () {\n return {\n selectedTab: '1',\n tabsetRef: [],\n TABS_DATA: [\n { label: EMOJI_PICKER_CATEGORIES.MOST_RECENTLY_USED, icon: 'clock' },\n { label: EMOJI_PICKER_CATEGORIES.SMILEYS_AND_PEOPLE, icon: 'satisfied' },\n { label: EMOJI_PICKER_CATEGORIES.NATURE, icon: 'living-thing' },\n { label: EMOJI_PICKER_CATEGORIES.FOOD, icon: 'food' },\n { label: EMOJI_PICKER_CATEGORIES.ACTIVITY, icon: 'object' },\n { label: EMOJI_PICKER_CATEGORIES.TRAVEL, icon: 'transportation' },\n { label: EMOJI_PICKER_CATEGORIES.OBJECTS, icon: 'lightbulb' },\n { label: EMOJI_PICKER_CATEGORIES.SYMBOLS, icon: 'heart' },\n { label: EMOJI_PICKER_CATEGORIES.FLAGS, icon: 'flag' },\n ],\n };\n },\n\n computed: {\n tabs () {\n const tabsData = this.showRecentlyUsedTab ? this.TABS_DATA : this.TABS_DATA.slice(1);\n return tabsData.map((tab, index) => ({\n ...tab,\n label: this.tabSetLabels[index],\n id: (index + 1).toString(),\n panelId: (index + 1).toString(),\n }));\n },\n\n isSearching () {\n return this.emojiFilter.length > 0;\n },\n },\n\n watch: {\n scrollIntoTab: function (newVal) {\n if (!this.isScrolling && !this.isSearching) {\n this.selectedTab = (newVal + 1).toString();\n }\n },\n\n isSearching: function (newVal) {\n if (newVal) {\n this.selectedTab = null;\n }\n },\n },\n\n mounted () {\n this.$nextTick(() => {\n this.setTabsetRef();\n });\n },\n\n methods: {\n selectTabset (id) {\n if (!this.isScrolling) {\n this.selectedTab = id;\n }\n this.$emit('selected-tabset', id);\n },\n\n setTabsetRef () {\n this.tabs.forEach((skin, index) => {\n const refKey = `tabsetRef-${index}`;\n if (this.$refs[refKey]) {\n this.$set(this.tabsetRef, index, this.$refs[refKey][0].$el);\n }\n });\n },\n\n focusTabset () {\n if (this.tabsetRef[0]) {\n this.tabsetRef[0].focus();\n }\n },\n\n // eslint-disable-next-line complexity\n handleKeyDown (event, tabId) {\n if (event.key === 'Enter') {\n this.selectTabset(tabId);\n if (this.tabsetRef[tabId - 1]) {\n this.tabsetRef[tabId - 1].blur();\n }\n }\n\n if (event.key === 'Tab') {\n event.preventDefault();\n if (event.shiftKey) {\n this.$emit('focus-skin-selector');\n } else {\n this.$emit('focus-search-input');\n }\n }\n\n if (event.key === 'ArrowDown') {\n this.$emit('focus-search-input');\n }\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"emoji_tabset.vue.js","sources":["../../../../components/emoji_picker/modules/emoji_tabset.vue"],"sourcesContent":["<template>\n <div class=\"d-emoji-picker__tabset\">\n <dt-tab-group\n size=\"sm\"\n tab-list-class=\"d-emoji-picker__tabset-list\"\n :selected=\"selectedTab\"\n >\n <template #tabs>\n <dt-tab\n v-for=\"(tab, index) in tabs\"\n :id=\"tab.id\"\n :ref=\"`tabsetRef-${index}`\"\n :key=\"tab.id\"\n :panel-id=\"tab.panelId\"\n :label=\"tab.label\"\n aria-controls=\"d-emoji-picker-list\"\n :tabindex=\"index + 1\"\n @click.capture.stop=\"selectTabset(tab.id)\"\n @keydown=\"handleKeyDown($event, tab.id)\"\n >\n <dt-icon\n size=\"400\"\n :name=\"tab.icon\"\n />\n </dt-tab>\n </template>\n </dt-tab-group>\n </div>\n</template>\n\n<script>\nimport DtTabGroup from '@/components/tabs/tab_group.vue';\nimport DtTab from '@/components/tabs/tab.vue';\nimport DtIcon from '@/components/icon/icon.vue';\nimport { EMOJI_PICKER_CATEGORIES } from '@/components/emoji_picker';\n\nexport default {\n name: 'EmojiTabset',\n\n components: {\n DtTabGroup,\n DtTab,\n DtIcon,\n },\n\n props: {\n showRecentlyUsedTab: {\n type: Boolean,\n default: false,\n },\n\n scrollIntoTab: {\n type: Number,\n required: true,\n },\n\n isScrolling: {\n type: Boolean,\n default: false,\n },\n\n emojiFilter: {\n type: String,\n default: '',\n },\n\n tabSetLabels: {\n type: Array,\n required: true,\n },\n },\n\n data () {\n return {\n selectedTab: '1',\n tabsetRef: [],\n TABS_DATA: [\n { label: EMOJI_PICKER_CATEGORIES.MOST_RECENTLY_USED, icon: 'clock' },\n { label: EMOJI_PICKER_CATEGORIES.SMILEYS_AND_PEOPLE, icon: 'satisfied' },\n { label: EMOJI_PICKER_CATEGORIES.NATURE, icon: 'living-thing' },\n { label: EMOJI_PICKER_CATEGORIES.FOOD, icon: 'food' },\n { label: EMOJI_PICKER_CATEGORIES.ACTIVITY, icon: 'object' },\n { label: EMOJI_PICKER_CATEGORIES.TRAVEL, icon: 'transportation' },\n { label: EMOJI_PICKER_CATEGORIES.OBJECTS, icon: 'lightbulb' },\n { label: EMOJI_PICKER_CATEGORIES.SYMBOLS, icon: 'heart' },\n { label: EMOJI_PICKER_CATEGORIES.FLAGS, icon: 'flag' },\n ],\n };\n },\n\n computed: {\n tabs () {\n const tabsData = this.showRecentlyUsedTab ? this.TABS_DATA : this.TABS_DATA.slice(1);\n return tabsData.map((tab, index) => ({\n ...tab,\n label: this.tabSetLabels[index],\n id: (index + 1).toString(),\n panelId: (index + 1).toString(),\n }));\n },\n\n isSearching () {\n return this.emojiFilter.length > 0;\n },\n },\n\n watch: {\n scrollIntoTab: function (newVal) {\n if (!this.isScrolling && !this.isSearching) {\n this.selectedTab = (newVal + 1).toString();\n }\n },\n\n isSearching: function (newVal) {\n if (newVal) {\n this.selectedTab = null;\n }\n },\n },\n\n mounted () {\n this.$nextTick(() => {\n this.setTabsetRef();\n });\n },\n\n methods: {\n selectTabset (id) {\n if (!this.isScrolling) {\n this.selectedTab = id;\n }\n this.$emit('selected-tabset', id);\n },\n\n setTabsetRef () {\n this.tabs.forEach((skin, index) => {\n const refKey = `tabsetRef-${index}`;\n if (this.$refs[refKey]) {\n this.$set(this.tabsetRef, index, this.$refs[refKey][0].$el);\n }\n });\n },\n\n focusTabset () {\n if (this.tabsetRef[0]) {\n this.tabsetRef[0].focus();\n }\n },\n\n // eslint-disable-next-line complexity\n handleKeyDown (event, tabId) {\n if (event.key === 'Enter') {\n this.selectTabset(tabId);\n if (this.tabsetRef[tabId - 1]) {\n this.tabsetRef[tabId - 1].blur();\n }\n }\n\n if (event.key === 'Tab') {\n event.preventDefault();\n if (event.shiftKey) {\n this.$emit('focus-skin-selector');\n } else {\n this.$emit('focus-search-input');\n }\n }\n\n if (event.key === 'ArrowDown') {\n this.$emit('focus-search-input');\n }\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;AAoCA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IAEA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IAEA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IAEA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,aAAA;AAAA,MACA,WAAA,CAA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CAAA,KAAA,aAAA;AACA,aAAA,cAAA;AAAA,MACA;AACA,WAAA,MAAA,mBAAA,EAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,WAAA,KAAA,QAAA,CAAA,MAAA,UAAA;AACA,cAAA,SAAA,aAAA,KAAA;AACA,YAAA,KAAA,MAAA,MAAA,GAAA;AACA,eAAA,KAAA,KAAA,WAAA,OAAA,KAAA,MAAA,MAAA,EAAA,CAAA,EAAA,GAAA;AAAA,QACA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IAEA,cAAA;AACA,UAAA,KAAA,UAAA,CAAA,GAAA;AACA,aAAA,UAAA,CAAA,EAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA,IAGA,cAAA,OAAA,OAAA;AACA,UAAA,MAAA,QAAA,SAAA;AACA,aAAA,aAAA,KAAA;AACA,YAAA,KAAA,UAAA,QAAA,CAAA,GAAA;AACA,eAAA,UAAA,QAAA,CAAA,EAAA,KAAA;AAAA,QACA;AAAA,MACA;AAEA,UAAA,MAAA,QAAA,OAAA;AACA,cAAA,eAAA;AACA,YAAA,MAAA,UAAA;AACA,eAAA,MAAA,qBAAA;AAAA,QACA,OAAA;AACA,eAAA,MAAA,oBAAA;AAAA,QACA;AAAA,MACA;AAEA,UAAA,MAAA,QAAA,aAAA;AACA,aAAA,MAAA,oBAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const core = require("@tiptap/core");
|
|
4
|
+
const state = require("@tiptap/pm/state");
|
|
4
5
|
const vue2 = require("@tiptap/vue-2");
|
|
6
|
+
const Suggestion = require("@tiptap/suggestion");
|
|
7
|
+
const regexCombinedEmojis = require("regex-combined-emojis");
|
|
5
8
|
const EmojiComponent = require("./EmojiComponent.vue.cjs");
|
|
6
9
|
const common_emoji = require("../../../../common/emoji.cjs");
|
|
7
|
-
const state = require("@tiptap/pm/state");
|
|
8
|
-
const Suggestion = require("@tiptap/suggestion");
|
|
9
10
|
const suggestion = require("./suggestion.cjs");
|
|
10
|
-
const
|
|
11
|
-
const EmojiPluginKey = new state.PluginKey("emoji");
|
|
12
|
-
const inputShortCodeRegex = new RegExp("(^| |(?<=:))(:\\w+:)$");
|
|
11
|
+
const inputShortCodeRegex = /(:\w+:)$/;
|
|
13
12
|
const inputUnicodeRegex = new RegExp(regexCombinedEmojis.emojiPattern + "$");
|
|
14
13
|
const inputRuleMatch = (match) => {
|
|
15
14
|
if (match && common_emoji.codeToEmojiData(match[0])) {
|
|
16
15
|
const text = match[2] || match[0];
|
|
17
|
-
return {
|
|
18
|
-
index: match.index,
|
|
19
|
-
text,
|
|
20
|
-
match
|
|
21
|
-
};
|
|
16
|
+
return { text };
|
|
22
17
|
}
|
|
23
18
|
};
|
|
24
19
|
const shortCodePasteMatch = (text) => {
|
|
@@ -30,19 +25,16 @@ const shortCodePasteMatch = (text) => {
|
|
|
30
25
|
}));
|
|
31
26
|
};
|
|
32
27
|
const Emoji = core.Node.create({
|
|
28
|
+
name: "emoji",
|
|
33
29
|
addOptions() {
|
|
34
30
|
return {
|
|
35
|
-
HTMLAttributes: {}
|
|
36
|
-
suggestion: {
|
|
37
|
-
char: ":",
|
|
38
|
-
pluginKey: EmojiPluginKey
|
|
39
|
-
}
|
|
31
|
+
HTMLAttributes: {}
|
|
40
32
|
};
|
|
41
33
|
},
|
|
42
|
-
name: "emoji",
|
|
43
34
|
group: "inline",
|
|
44
35
|
inline: true,
|
|
45
|
-
selectable:
|
|
36
|
+
selectable: false,
|
|
37
|
+
atom: true,
|
|
46
38
|
addNodeView() {
|
|
47
39
|
return vue2.VueNodeViewRenderer(EmojiComponent);
|
|
48
40
|
},
|
|
@@ -69,32 +61,17 @@ const Emoji = core.Node.create({
|
|
|
69
61
|
},
|
|
70
62
|
addInputRules() {
|
|
71
63
|
return [
|
|
72
|
-
|
|
73
|
-
core.nodeInputRule({
|
|
64
|
+
new core.InputRule({
|
|
74
65
|
find: (text) => {
|
|
75
|
-
const match = text.match(inputShortCodeRegex);
|
|
66
|
+
const match = text.match(inputShortCodeRegex) || text.match(inputUnicodeRegex);
|
|
76
67
|
if (!match) return;
|
|
77
68
|
return inputRuleMatch(match);
|
|
78
69
|
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}),
|
|
86
|
-
core.nodeInputRule({
|
|
87
|
-
find: (text) => {
|
|
88
|
-
const match = text.match(inputUnicodeRegex);
|
|
89
|
-
if (!match) return;
|
|
90
|
-
return inputRuleMatch(match);
|
|
91
|
-
},
|
|
92
|
-
type: this.type,
|
|
93
|
-
getAttributes(attrs) {
|
|
94
|
-
const emoji = common_emoji.codeToEmojiData(attrs[0]).shortname;
|
|
95
|
-
return {
|
|
96
|
-
code: emoji
|
|
97
|
-
};
|
|
70
|
+
handler: ({ state: state2, range, match, commands, chain, can }) => {
|
|
71
|
+
const { tr } = state2;
|
|
72
|
+
const start = range.from;
|
|
73
|
+
const end = range.to;
|
|
74
|
+
tr.replaceWith(start, end, this.type.create({ code: match[0] }));
|
|
98
75
|
}
|
|
99
76
|
})
|
|
100
77
|
];
|
|
@@ -124,13 +101,34 @@ const Emoji = core.Node.create({
|
|
|
124
101
|
addProseMirrorPlugins() {
|
|
125
102
|
return [
|
|
126
103
|
Suggestion({
|
|
104
|
+
char: ":",
|
|
105
|
+
pluginKey: new state.PluginKey("emoji"),
|
|
127
106
|
editor: this.editor,
|
|
128
107
|
...this.options.suggestion,
|
|
129
108
|
...suggestion
|
|
130
109
|
})
|
|
131
110
|
];
|
|
111
|
+
},
|
|
112
|
+
addKeyboardShortcuts() {
|
|
113
|
+
return {
|
|
114
|
+
Backspace: () => this.editor.commands.command(({ tr, state: state2 }) => {
|
|
115
|
+
let isEmoji = false;
|
|
116
|
+
const { selection } = state2;
|
|
117
|
+
const { empty, anchor } = selection;
|
|
118
|
+
if (!empty) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
state2.doc.nodesBetween(anchor - 1, anchor, (node, pos) => {
|
|
122
|
+
if (node.type.name === this.name) {
|
|
123
|
+
isEmoji = true;
|
|
124
|
+
tr.insertText("", pos, pos + node.nodeSize);
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
return isEmoji;
|
|
129
|
+
})
|
|
130
|
+
};
|
|
132
131
|
}
|
|
133
132
|
});
|
|
134
133
|
exports.Emoji = Emoji;
|
|
135
|
-
exports.EmojiPluginKey = EmojiPluginKey;
|
|
136
134
|
//# sourceMappingURL=emoji.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji.cjs","sources":["../../../../../components/rich_text_editor/extensions/emoji/emoji.js"],"sourcesContent":["import { mergeAttributes, Node,
|
|
1
|
+
{"version":3,"file":"emoji.cjs","sources":["../../../../../components/rich_text_editor/extensions/emoji/emoji.js"],"sourcesContent":["import { InputRule, mergeAttributes, Node, nodePasteRule } from '@tiptap/core';\nimport { PluginKey } from '@tiptap/pm/state';\nimport { VueNodeViewRenderer } from '@tiptap/vue-2';\nimport Suggestion from '@tiptap/suggestion';\nimport { emojiPattern } from 'regex-combined-emojis';\n\nimport EmojiComponent from './EmojiComponent.vue';\nimport { codeToEmojiData, emojiShortCodeRegex, emojiRegex, stringToUnicode } from '@/common/emoji';\nimport suggestionOptions from './suggestion';\n\nconst inputShortCodeRegex = /(:\\w+:)$/;\nconst inputUnicodeRegex = new RegExp(emojiPattern + '$');\n\nconst inputRuleMatch = (match) => {\n if (match && codeToEmojiData(match[0])) {\n const text = match[2] || match[0];\n // needs to be a dict returned\n // ref type InputRuleMatch:\n // https://github.com/ueberdosis/tiptap/blob/main/packages/core/src/InputRule.ts#L16\n return { text };\n }\n};\n\nconst shortCodePasteMatch = (text) => {\n const matches = [...text.matchAll(emojiShortCodeRegex)];\n\n return matches\n .filter(match => codeToEmojiData(match[0]))\n .map(match => ({\n index: match.index,\n text: match[0],\n match,\n }));\n};\n\nexport const Emoji = Node.create({\n name: 'emoji',\n addOptions () {\n return {\n HTMLAttributes: {},\n };\n },\n group: 'inline',\n inline: true,\n selectable: false,\n atom: true,\n\n addNodeView () {\n return VueNodeViewRenderer(EmojiComponent);\n },\n\n addAttributes () {\n return {\n code: {\n default: null,\n },\n };\n },\n\n parseHTML () {\n return [\n {\n tag: 'emoji-component',\n },\n ];\n },\n\n renderText ({ node }) {\n // output emoji in text as unicode character rather than shortname for backwards compatibility with\n // our backend.\n const unicodeEmoji = stringToUnicode(codeToEmojiData(node.attrs.code).unicode_output);\n return unicodeEmoji;\n },\n\n renderHTML ({ HTMLAttributes }) {\n return ['emoji-component', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n },\n\n addInputRules () {\n return [\n new InputRule({\n find: (text) => {\n const match = text.match(inputShortCodeRegex) || text.match(inputUnicodeRegex);\n if (!match) return;\n\n return inputRuleMatch(match);\n },\n handler: ({ state, range, match, commands, chain, can }) => {\n const { tr } = state;\n const start = range.from;\n const end = range.to;\n tr.replaceWith(start, end, this.type.create({ code: match[0] }));\n },\n }),\n ];\n },\n\n addPasteRules () {\n return [\n nodePasteRule({\n find: shortCodePasteMatch,\n type: this.type,\n getAttributes (attrs) {\n return {\n code: attrs[0],\n };\n },\n }),\n nodePasteRule({\n find: emojiRegex,\n type: this.type,\n getAttributes (attrs) {\n return {\n code: attrs[0],\n };\n },\n }),\n ];\n },\n\n addProseMirrorPlugins () {\n return [\n Suggestion({\n char: ':',\n pluginKey: new PluginKey('emoji'),\n editor: this.editor,\n ...this.options.suggestion,\n ...suggestionOptions,\n }),\n ];\n },\n\n addKeyboardShortcuts () {\n return {\n Backspace: () => this.editor.commands.command(({ tr, state }) => {\n let isEmoji = false;\n const { selection } = state;\n const { empty, anchor } = selection;\n if (!empty) { return false; }\n state.doc.nodesBetween(anchor - 1, anchor, (node, pos) => {\n if (node.type.name === this.name) {\n isEmoji = true;\n tr.insertText('', pos, pos + node.nodeSize);\n return false;\n }\n });\n return isEmoji;\n }),\n };\n },\n});\n"],"names":["emojiPattern","codeToEmojiData","emojiShortCodeRegex","Node","VueNodeViewRenderer","stringToUnicode","mergeAttributes","InputRule","state","nodePasteRule","emojiRegex","PluginKey","suggestionOptions"],"mappings":";;;;;;;;;;AAUA,MAAM,sBAAsB;AAC5B,MAAM,oBAAoB,IAAI,OAAOA,oBAAY,eAAG,GAAG;AAEvD,MAAM,iBAAiB,CAAC,UAAU;AAChC,MAAI,SAASC,aAAe,gBAAC,MAAM,CAAC,CAAC,GAAG;AACtC,UAAM,OAAO,MAAM,CAAC,KAAK,MAAM,CAAC;AAIhC,WAAO,EAAE,KAAI;AAAA,EACd;AACH;AAEA,MAAM,sBAAsB,CAAC,SAAS;AACpC,QAAM,UAAU,CAAC,GAAG,KAAK,SAASC,aAAAA,mBAAmB,CAAC;AAEtD,SAAO,QACJ,OAAO,WAASD,aAAAA,gBAAgB,MAAM,CAAC,CAAC,CAAC,EACzC,IAAI,YAAU;AAAA,IACb,OAAO,MAAM;AAAA,IACb,MAAM,MAAM,CAAC;AAAA,IACb;AAAA,EACD,EAAC;AACN;AAEY,MAAC,QAAQE,KAAI,KAAC,OAAO;AAAA,EAC/B,MAAM;AAAA,EACN,aAAc;AACZ,WAAO;AAAA,MACL,gBAAgB,CAAE;AAAA,IACxB;AAAA,EACG;AAAA,EACD,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,MAAM;AAAA,EAEN,cAAe;AACb,WAAOC,KAAAA,oBAAoB,cAAc;AAAA,EAC1C;AAAA,EAED,gBAAiB;AACf,WAAO;AAAA,MACL,MAAM;AAAA,QACJ,SAAS;AAAA,MACV;AAAA,IACP;AAAA,EACG;AAAA,EAED,YAAa;AACX,WAAO;AAAA,MACL;AAAA,QACE,KAAK;AAAA,MACN;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AA,QACN,WAAW,IAAIC,MAAS,UAAC,OAAO;AAAA,QAChC,QAAQ,KAAK;AAAA,QACb,GAAG,KAAK,QAAQ;AAAA,QAChB,GAAGC;AAAAA,MACX,CAAO;AAAA,IACP;AAAA,EACG;AAAA,EAED,uBAAwB;AACtB,WAAO;AAAA,MACL,WAAW,MAAM,KAAK,OAAO,SAAS,QAAQ,CAAC,EAAE,IAAI,OAAAJ,aAAY;AAC/D,YAAI,UAAU;AACd,cAAM,EAAE,UAAW,IAAGA;AACtB,cAAM,EAAE,OAAO,OAAQ,IAAG;AAC1B,YAAI,CAAC,OAAO;AAAE,iBAAO;AAAA,QAAQ;AAC7B,QAAAA,OAAM,IAAI,aAAa,SAAS,GAAG,QAAQ,CAAC,MAAM,QAAQ;AACxD,cAAI,KAAK,KAAK,SAAS,KAAK,MAAM;AAChC,sBAAU;AACV,eAAG,WAAW,IAAI,KAAK,MAAM,KAAK,QAAQ;AAC1C,mBAAO;AAAA,UACR;AAAA,QACX,CAAS;AACD,eAAO;AAAA,MACf,CAAO;AAAA,IACP;AAAA,EACG;AACH,CAAC;;"}
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import { Node, mergeAttributes,
|
|
1
|
+
import { Node, mergeAttributes, InputRule, nodePasteRule } from "@tiptap/core";
|
|
2
|
+
import { PluginKey } from "@tiptap/pm/state";
|
|
2
3
|
import { VueNodeViewRenderer } from "@tiptap/vue-2";
|
|
4
|
+
import Suggestion from "@tiptap/suggestion";
|
|
5
|
+
import { emojiPattern } from "regex-combined-emojis";
|
|
3
6
|
import EmojiComponent from "./EmojiComponent.vue.js";
|
|
4
7
|
import { stringToUnicode, codeToEmojiData, emojiRegex, emojiShortCodeRegex } from "../../../../common/emoji.js";
|
|
5
|
-
import { PluginKey } from "@tiptap/pm/state";
|
|
6
|
-
import Suggestion from "@tiptap/suggestion";
|
|
7
8
|
import suggestionOptions from "./suggestion.js";
|
|
8
|
-
|
|
9
|
-
const EmojiPluginKey = new PluginKey("emoji");
|
|
10
|
-
const inputShortCodeRegex = new RegExp("(^| |(?<=:))(:\\w+:)$");
|
|
9
|
+
const inputShortCodeRegex = /(:\w+:)$/;
|
|
11
10
|
const inputUnicodeRegex = new RegExp(emojiPattern + "$");
|
|
12
11
|
const inputRuleMatch = (match) => {
|
|
13
12
|
if (match && codeToEmojiData(match[0])) {
|
|
14
13
|
const text = match[2] || match[0];
|
|
15
|
-
return {
|
|
16
|
-
index: match.index,
|
|
17
|
-
text,
|
|
18
|
-
match
|
|
19
|
-
};
|
|
14
|
+
return { text };
|
|
20
15
|
}
|
|
21
16
|
};
|
|
22
17
|
const shortCodePasteMatch = (text) => {
|
|
@@ -28,19 +23,16 @@ const shortCodePasteMatch = (text) => {
|
|
|
28
23
|
}));
|
|
29
24
|
};
|
|
30
25
|
const Emoji = Node.create({
|
|
26
|
+
name: "emoji",
|
|
31
27
|
addOptions() {
|
|
32
28
|
return {
|
|
33
|
-
HTMLAttributes: {}
|
|
34
|
-
suggestion: {
|
|
35
|
-
char: ":",
|
|
36
|
-
pluginKey: EmojiPluginKey
|
|
37
|
-
}
|
|
29
|
+
HTMLAttributes: {}
|
|
38
30
|
};
|
|
39
31
|
},
|
|
40
|
-
name: "emoji",
|
|
41
32
|
group: "inline",
|
|
42
33
|
inline: true,
|
|
43
|
-
selectable:
|
|
34
|
+
selectable: false,
|
|
35
|
+
atom: true,
|
|
44
36
|
addNodeView() {
|
|
45
37
|
return VueNodeViewRenderer(EmojiComponent);
|
|
46
38
|
},
|
|
@@ -67,32 +59,17 @@ const Emoji = Node.create({
|
|
|
67
59
|
},
|
|
68
60
|
addInputRules() {
|
|
69
61
|
return [
|
|
70
|
-
|
|
71
|
-
nodeInputRule({
|
|
62
|
+
new InputRule({
|
|
72
63
|
find: (text) => {
|
|
73
|
-
const match = text.match(inputShortCodeRegex);
|
|
64
|
+
const match = text.match(inputShortCodeRegex) || text.match(inputUnicodeRegex);
|
|
74
65
|
if (!match) return;
|
|
75
66
|
return inputRuleMatch(match);
|
|
76
67
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
}),
|
|
84
|
-
nodeInputRule({
|
|
85
|
-
find: (text) => {
|
|
86
|
-
const match = text.match(inputUnicodeRegex);
|
|
87
|
-
if (!match) return;
|
|
88
|
-
return inputRuleMatch(match);
|
|
89
|
-
},
|
|
90
|
-
type: this.type,
|
|
91
|
-
getAttributes(attrs) {
|
|
92
|
-
const emoji = codeToEmojiData(attrs[0]).shortname;
|
|
93
|
-
return {
|
|
94
|
-
code: emoji
|
|
95
|
-
};
|
|
68
|
+
handler: ({ state, range, match, commands, chain, can }) => {
|
|
69
|
+
const { tr } = state;
|
|
70
|
+
const start = range.from;
|
|
71
|
+
const end = range.to;
|
|
72
|
+
tr.replaceWith(start, end, this.type.create({ code: match[0] }));
|
|
96
73
|
}
|
|
97
74
|
})
|
|
98
75
|
];
|
|
@@ -122,15 +99,36 @@ const Emoji = Node.create({
|
|
|
122
99
|
addProseMirrorPlugins() {
|
|
123
100
|
return [
|
|
124
101
|
Suggestion({
|
|
102
|
+
char: ":",
|
|
103
|
+
pluginKey: new PluginKey("emoji"),
|
|
125
104
|
editor: this.editor,
|
|
126
105
|
...this.options.suggestion,
|
|
127
106
|
...suggestionOptions
|
|
128
107
|
})
|
|
129
108
|
];
|
|
109
|
+
},
|
|
110
|
+
addKeyboardShortcuts() {
|
|
111
|
+
return {
|
|
112
|
+
Backspace: () => this.editor.commands.command(({ tr, state }) => {
|
|
113
|
+
let isEmoji = false;
|
|
114
|
+
const { selection } = state;
|
|
115
|
+
const { empty, anchor } = selection;
|
|
116
|
+
if (!empty) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
state.doc.nodesBetween(anchor - 1, anchor, (node, pos) => {
|
|
120
|
+
if (node.type.name === this.name) {
|
|
121
|
+
isEmoji = true;
|
|
122
|
+
tr.insertText("", pos, pos + node.nodeSize);
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
return isEmoji;
|
|
127
|
+
})
|
|
128
|
+
};
|
|
130
129
|
}
|
|
131
130
|
});
|
|
132
131
|
export {
|
|
133
|
-
Emoji
|
|
134
|
-
EmojiPluginKey
|
|
132
|
+
Emoji
|
|
135
133
|
};
|
|
136
134
|
//# sourceMappingURL=emoji.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji.js","sources":["../../../../../components/rich_text_editor/extensions/emoji/emoji.js"],"sourcesContent":["import { mergeAttributes, Node,
|
|
1
|
+
{"version":3,"file":"emoji.js","sources":["../../../../../components/rich_text_editor/extensions/emoji/emoji.js"],"sourcesContent":["import { InputRule, mergeAttributes, Node, nodePasteRule } from '@tiptap/core';\nimport { PluginKey } from '@tiptap/pm/state';\nimport { VueNodeViewRenderer } from '@tiptap/vue-2';\nimport Suggestion from '@tiptap/suggestion';\nimport { emojiPattern } from 'regex-combined-emojis';\n\nimport EmojiComponent from './EmojiComponent.vue';\nimport { codeToEmojiData, emojiShortCodeRegex, emojiRegex, stringToUnicode } from '@/common/emoji';\nimport suggestionOptions from './suggestion';\n\nconst inputShortCodeRegex = /(:\\w+:)$/;\nconst inputUnicodeRegex = new RegExp(emojiPattern + '$');\n\nconst inputRuleMatch = (match) => {\n if (match && codeToEmojiData(match[0])) {\n const text = match[2] || match[0];\n // needs to be a dict returned\n // ref type InputRuleMatch:\n // https://github.com/ueberdosis/tiptap/blob/main/packages/core/src/InputRule.ts#L16\n return { text };\n }\n};\n\nconst shortCodePasteMatch = (text) => {\n const matches = [...text.matchAll(emojiShortCodeRegex)];\n\n return matches\n .filter(match => codeToEmojiData(match[0]))\n .map(match => ({\n index: match.index,\n text: match[0],\n match,\n }));\n};\n\nexport const Emoji = Node.create({\n name: 'emoji',\n addOptions () {\n return {\n HTMLAttributes: {},\n };\n },\n group: 'inline',\n inline: true,\n selectable: false,\n atom: true,\n\n addNodeView () {\n return VueNodeViewRenderer(EmojiComponent);\n },\n\n addAttributes () {\n return {\n code: {\n default: null,\n },\n };\n },\n\n parseHTML () {\n return [\n {\n tag: 'emoji-component',\n },\n ];\n },\n\n renderText ({ node }) {\n // output emoji in text as unicode character rather than shortname for backwards compatibility with\n // our backend.\n const unicodeEmoji = stringToUnicode(codeToEmojiData(node.attrs.code).unicode_output);\n return unicodeEmoji;\n },\n\n renderHTML ({ HTMLAttributes }) {\n return ['emoji-component', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n },\n\n addInputRules () {\n return [\n new InputRule({\n find: (text) => {\n const match = text.match(inputShortCodeRegex) || text.match(inputUnicodeRegex);\n if (!match) return;\n\n return inputRuleMatch(match);\n },\n handler: ({ state, range, match, commands, chain, can }) => {\n const { tr } = state;\n const start = range.from;\n const end = range.to;\n tr.replaceWith(start, end, this.type.create({ code: match[0] }));\n },\n }),\n ];\n },\n\n addPasteRules () {\n return [\n nodePasteRule({\n find: shortCodePasteMatch,\n type: this.type,\n getAttributes (attrs) {\n return {\n code: attrs[0],\n };\n },\n }),\n nodePasteRule({\n find: emojiRegex,\n type: this.type,\n getAttributes (attrs) {\n return {\n code: attrs[0],\n };\n },\n }),\n ];\n },\n\n addProseMirrorPlugins () {\n return [\n Suggestion({\n char: ':',\n pluginKey: new PluginKey('emoji'),\n editor: this.editor,\n ...this.options.suggestion,\n ...suggestionOptions,\n }),\n ];\n },\n\n addKeyboardShortcuts () {\n return {\n Backspace: () => this.editor.commands.command(({ tr, state }) => {\n let isEmoji = false;\n const { selection } = state;\n const { empty, anchor } = selection;\n if (!empty) { return false; }\n state.doc.nodesBetween(anchor - 1, anchor, (node, pos) => {\n if (node.type.name === this.name) {\n isEmoji = true;\n tr.insertText('', pos, pos + node.nodeSize);\n return false;\n }\n });\n return isEmoji;\n }),\n };\n },\n});\n"],"names":[],"mappings":";;;;;;;;AAUA,MAAM,sBAAsB;AAC5B,MAAM,oBAAoB,IAAI,OAAO,eAAe,GAAG;AAEvD,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AQ,CAAC,MAAM,QAAQ;AACxD,cAAI,KAAK,KAAK,SAAS,KAAK,MAAM;AAChC,sBAAU;AACV,eAAG,WAAW,IAAI,KAAK,MAAM,KAAK,QAAQ;AAC1C,mBAAO;AAAA,UACR;AAAA,QACX,CAAS;AACD,eAAO;AAAA,MACf,CAAO;AAAA,IACP;AAAA,EACG;AACH,CAAC;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
2
3
|
const emoji = require("./emoji.cjs");
|
|
3
|
-
|
|
4
|
+
exports.Emoji = emoji.Emoji;
|
|
5
|
+
exports.default = emoji.Emoji;
|
|
4
6
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion.cjs","sources":["../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"sourcesContent":["import { VueRenderer } from '@tiptap/vue-2';\nimport { emojisIndexed } from '@dialpad/dialtone-emojis';\n\nimport SuggestionList from '../suggestion/SuggestionList.vue';\nimport EmojiSuggestion from './EmojiSuggestion.vue';\n\nimport tippy from 'tippy.js';\nimport hideOnEsc from '../tippy_plugins/hide_on_esc';\n\nexport default {\n items: ({ query }) => {\n if (query.length < 2) {\n return [];\n }\n const emojiList = Object.values(emojisIndexed);\n const filteredEmoji = emojiList.filter(function (item) {\n if (item.shortname.substring(1, item.shortname.length - 1).startsWith(query.toLowerCase())) {\n return true;\n }\n return false;\n });\n return filteredEmoji.map(item => { return { code: item.shortname }; });\n },\n\n command: ({ editor, range, props }) => {\n // increase range.to by one when the next node is of type \"text\"\n // and starts with a space character\n const nodeAfter = editor.view.state.selection.$to.nodeAfter;\n const overrideSpace = nodeAfter?.text?.startsWith(' ');\n\n if (overrideSpace) {\n range.to += 1;\n }\n\n editor\n .chain()\n .focus()\n .insertContentAt(range, [\n {\n type: 'emoji',\n attrs: props,\n },\n
|
|
1
|
+
{"version":3,"file":"suggestion.cjs","sources":["../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"sourcesContent":["import { VueRenderer } from '@tiptap/vue-2';\nimport { emojisIndexed } from '@dialpad/dialtone-emojis';\n\nimport SuggestionList from '../suggestion/SuggestionList.vue';\nimport EmojiSuggestion from './EmojiSuggestion.vue';\n\nimport tippy from 'tippy.js';\nimport hideOnEsc from '../tippy_plugins/hide_on_esc';\n\nexport default {\n items: ({ query }) => {\n if (query.length < 2) {\n return [];\n }\n const emojiList = Object.values(emojisIndexed);\n const filteredEmoji = emojiList.filter(function (item) {\n if (item.shortname.substring(1, item.shortname.length - 1).startsWith(query.toLowerCase())) {\n return true;\n }\n return false;\n });\n return filteredEmoji.map(item => { return { code: item.shortname }; });\n },\n\n command: ({ editor, range, props }) => {\n // increase range.to by one when the next node is of type \"text\"\n // and starts with a space character\n const nodeAfter = editor.view.state.selection.$to.nodeAfter;\n const overrideSpace = nodeAfter?.text?.startsWith(' ');\n\n if (overrideSpace) {\n range.to += 1;\n }\n\n editor\n .chain()\n .focus()\n .insertContentAt(range, [\n {\n type: 'emoji',\n attrs: props,\n },\n ])\n .run();\n\n window.getSelection()?.collapseToEnd();\n },\n\n render: () => {\n let component;\n let popup;\n let popupIsOpen = false;\n\n return {\n onStart: props => {\n component = new VueRenderer(SuggestionList, {\n parent: this,\n propsData: {\n itemComponent: EmojiSuggestion,\n itemType: 'emoji',\n ...props,\n },\n editor: props.editor,\n });\n\n if (!props.clientRect) {\n return;\n }\n\n popup = tippy('body', {\n getReferenceClientRect: props.clientRect,\n appendTo: () => document.body,\n content: component.element,\n showOnCreate: false,\n onShow: () => { popupIsOpen = true; },\n onHidden: () => { popupIsOpen = false; },\n interactive: true,\n trigger: 'manual',\n placement: 'top-start',\n zIndex: 650,\n plugins: [hideOnEsc],\n });\n\n if (props.items.length > 0) {\n popup?.[0].show();\n }\n },\n\n onUpdate (props) {\n component?.updateProps(props);\n\n if (props.items.length > 0) {\n popup?.[0].show();\n } else {\n popup?.[0].hide();\n }\n popup?.[0].setProps({\n getReferenceClientRect: props.clientRect,\n });\n },\n\n onKeyDown (props) {\n if (popupIsOpen) {\n return component?.ref?.onKeyDown(props);\n }\n },\n\n onExit () {\n popup?.[0].destroy();\n popup = null;\n component?.destroy();\n component = null;\n },\n };\n },\n};\n"],"names":["emojisIndexed","VueRenderer","this","hideOnEsc"],"mappings":";;;;;;;AASA,MAAe,oBAAA;AAAA,EACb,OAAO,CAAC,EAAE,YAAY;AACpB,QAAI,MAAM,SAAS,GAAG;AACpB,aAAO;IACR;AACD,UAAM,YAAY,OAAO,OAAOA,eAAa,aAAA;AAC7C,UAAM,gBAAgB,UAAU,OAAO,SAAU,MAAM;AACrD,UAAI,KAAK,UAAU,UAAU,GAAG,KAAK,UAAU,SAAS,CAAC,EAAE,WAAW,MAAM,YAAa,CAAA,GAAG;AAC1F,eAAO;AAAA,MACR;AACD,aAAO;AAAA,IACb,CAAK;AACD,WAAO,cAAc,IAAI,UAAQ;AAAE,aAAO,EAAE,MAAM,KAAK;IAAY,CAAE;AAAA,EACtE;AAAA,EAED,SAAS,CAAC,EAAE,QAAQ,OAAO,MAAK,MAAO;;AAGrC,UAAM,YAAY,OAAO,KAAK,MAAM,UAAU,IAAI;AAClD,UAAM,iBAAgB,4CAAW,SAAX,mBAAiB,WAAW;AAElD,QAAI,eAAe;AACjB,YAAM,MAAM;AAAA,IACb;AAED,WACG,MAAO,EACP,MAAO,EACP,gBAAgB,OAAO;AAAA,MACtB;AAAA,QACE,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,IACT,CAAO,EACA;AAEH,iBAAO,mBAAP,mBAAuB;AAAA,EACxB;AAAA,EAED,QAAQ,MAAM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":["../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"sourcesContent":["import { VueRenderer } from '@tiptap/vue-2';\nimport { emojisIndexed } from '@dialpad/dialtone-emojis';\n\nimport SuggestionList from '../suggestion/SuggestionList.vue';\nimport EmojiSuggestion from './EmojiSuggestion.vue';\n\nimport tippy from 'tippy.js';\nimport hideOnEsc from '../tippy_plugins/hide_on_esc';\n\nexport default {\n items: ({ query }) => {\n if (query.length < 2) {\n return [];\n }\n const emojiList = Object.values(emojisIndexed);\n const filteredEmoji = emojiList.filter(function (item) {\n if (item.shortname.substring(1, item.shortname.length - 1).startsWith(query.toLowerCase())) {\n return true;\n }\n return false;\n });\n return filteredEmoji.map(item => { return { code: item.shortname }; });\n },\n\n command: ({ editor, range, props }) => {\n // increase range.to by one when the next node is of type \"text\"\n // and starts with a space character\n const nodeAfter = editor.view.state.selection.$to.nodeAfter;\n const overrideSpace = nodeAfter?.text?.startsWith(' ');\n\n if (overrideSpace) {\n range.to += 1;\n }\n\n editor\n .chain()\n .focus()\n .insertContentAt(range, [\n {\n type: 'emoji',\n attrs: props,\n },\n
|
|
1
|
+
{"version":3,"file":"suggestion.js","sources":["../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"sourcesContent":["import { VueRenderer } from '@tiptap/vue-2';\nimport { emojisIndexed } from '@dialpad/dialtone-emojis';\n\nimport SuggestionList from '../suggestion/SuggestionList.vue';\nimport EmojiSuggestion from './EmojiSuggestion.vue';\n\nimport tippy from 'tippy.js';\nimport hideOnEsc from '../tippy_plugins/hide_on_esc';\n\nexport default {\n items: ({ query }) => {\n if (query.length < 2) {\n return [];\n }\n const emojiList = Object.values(emojisIndexed);\n const filteredEmoji = emojiList.filter(function (item) {\n if (item.shortname.substring(1, item.shortname.length - 1).startsWith(query.toLowerCase())) {\n return true;\n }\n return false;\n });\n return filteredEmoji.map(item => { return { code: item.shortname }; });\n },\n\n command: ({ editor, range, props }) => {\n // increase range.to by one when the next node is of type \"text\"\n // and starts with a space character\n const nodeAfter = editor.view.state.selection.$to.nodeAfter;\n const overrideSpace = nodeAfter?.text?.startsWith(' ');\n\n if (overrideSpace) {\n range.to += 1;\n }\n\n editor\n .chain()\n .focus()\n .insertContentAt(range, [\n {\n type: 'emoji',\n attrs: props,\n },\n ])\n .run();\n\n window.getSelection()?.collapseToEnd();\n },\n\n render: () => {\n let component;\n let popup;\n let popupIsOpen = false;\n\n return {\n onStart: props => {\n component = new VueRenderer(SuggestionList, {\n parent: this,\n propsData: {\n itemComponent: EmojiSuggestion,\n itemType: 'emoji',\n ...props,\n },\n editor: props.editor,\n });\n\n if (!props.clientRect) {\n return;\n }\n\n popup = tippy('body', {\n getReferenceClientRect: props.clientRect,\n appendTo: () => document.body,\n content: component.element,\n showOnCreate: false,\n onShow: () => { popupIsOpen = true; },\n onHidden: () => { popupIsOpen = false; },\n interactive: true,\n trigger: 'manual',\n placement: 'top-start',\n zIndex: 650,\n plugins: [hideOnEsc],\n });\n\n if (props.items.length > 0) {\n popup?.[0].show();\n }\n },\n\n onUpdate (props) {\n component?.updateProps(props);\n\n if (props.items.length > 0) {\n popup?.[0].show();\n } else {\n popup?.[0].hide();\n }\n popup?.[0].setProps({\n getReferenceClientRect: props.clientRect,\n });\n },\n\n onKeyDown (props) {\n if (popupIsOpen) {\n return component?.ref?.onKeyDown(props);\n }\n },\n\n onExit () {\n popup?.[0].destroy();\n popup = null;\n component?.destroy();\n component = null;\n },\n };\n },\n};\n"],"names":["this"],"mappings":";;;;;;AASA,MAAe,oBAAA;AAAA,EACb,OAAO,CAAC,EAAE,YAAY;AACpB,QAAI,MAAM,SAAS,GAAG;AACpB,aAAO;IACR;AACD,UAAM,YAAY,OAAO,OAAO,aAAa;AAC7C,UAAM,gBAAgB,UAAU,OAAO,SAAU,MAAM;AACrD,UAAI,KAAK,UAAU,UAAU,GAAG,KAAK,UAAU,SAAS,CAAC,EAAE,WAAW,MAAM,YAAa,CAAA,GAAG;AAC1F,eAAO;AAAA,MACR;AACD,aAAO;A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O;AACf,+CAAW,YAAY;AAEvB,YAAI,MAAM,MAAM,SAAS,GAAG;AAC1B,yCAAQ,GAAG;AAAA,QACrB,OAAe;AACL,yCAAQ,GAAG;AAAA,QACZ;AACD,uCAAQ,GAAG,SAAS;AAAA,UAClB,wBAAwB,MAAM;AAAA,QACxC;AAAA,MACO;AAAA,MAED,UAAW,OAAO;;AAChB,YAAI,aAAa;AACf,kBAAO,4CAAW,QAAX,mBAAgB,UAAU;AAAA,QAClC;AAAA,MACF;AAAA,MAED,SAAU;AACR,uCAAQ,GAAG;AACX,gBAAQ;AACR,+CAAW;AACX,oBAAY;AAAA,MACb;AAAA,IACP;AAAA,EACG;AACH;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const ChannelPlugin: import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions, any>;
|
|
1
|
+
export const ChannelPlugin: import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions<any, import("@tiptap/extension-mention").MentionNodeAttrs>, any>;
|
|
2
2
|
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/channels/channel.js"],"names":[],"mappings":"AAQA,
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/channels/channel.js"],"names":[],"mappings":"AAQA,4KA0CG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/emoji.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/emoji.js"],"names":[],"mappings":"AAmCA,mCAmHG;qBAtJ6D,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/index.js"],"names":[],"mappings":";;sBAAsB,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"names":[],"mappings":";IAUS;;;;QAYN;IAEQ;;;;
|
|
1
|
+
{"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"names":[],"mappings":";IAUS;;;;QAYN;IAEQ;;;;aAsBR;IAEO;;;;;MAkEP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const MentionPlugin: import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions, any>;
|
|
1
|
+
export const MentionPlugin: import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions<any, import("@tiptap/extension-mention").MentionNodeAttrs>, any>;
|
|
2
2
|
//# sourceMappingURL=mention.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/mentions/mention.js"],"names":[],"mappings":"AAQA,
|
|
1
|
+
{"version":3,"file":"mention.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/mentions/mention.js"],"names":[],"mappings":"AAQA,4KAyCG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const SlashCommandPlugin: import("@tiptap/vue-2").Node<import("@tiptap/extension-mention").MentionOptions, any>;
|
|
1
|
+
export const SlashCommandPlugin: import("@tiptap/vue-2").Node<import("@tiptap/extension-mention").MentionOptions<any, import("@tiptap/extension-mention").MentionNodeAttrs>, any>;
|
|
2
2
|
//# sourceMappingURL=slash_command.d.ts.map
|
package/dist/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash_command.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/slash_command/slash_command.js"],"names":[],"mappings":"AAuBA,
|
|
1
|
+
{"version":3,"file":"slash_command.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/slash_command/slash_command.js"],"names":[],"mappings":"AAuBA,kLAuEG"}
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dialpad/dialtone-vue",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.158.1",
|
|
4
4
|
"description": "Vue component library for Dialpad's design system Dialtone",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
7
7
|
],
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@linusborg/vue-simple-portal": "0.1.5",
|
|
10
|
-
"@tiptap/core": "2.
|
|
11
|
-
"@tiptap/extension-blockquote": "2.
|
|
12
|
-
"@tiptap/extension-bold": "2.
|
|
13
|
-
"@tiptap/extension-bullet-list": "2.
|
|
14
|
-
"@tiptap/extension-code-block": "2.
|
|
15
|
-
"@tiptap/extension-document": "2.
|
|
16
|
-
"@tiptap/extension-hard-break": "2.
|
|
17
|
-
"@tiptap/extension-history": "2.
|
|
18
|
-
"@tiptap/extension-italic": "2.
|
|
19
|
-
"@tiptap/extension-link": "2.
|
|
20
|
-
"@tiptap/extension-list-item": "2.
|
|
21
|
-
"@tiptap/extension-mention": "2.
|
|
22
|
-
"@tiptap/extension-ordered-list": "2.
|
|
23
|
-
"@tiptap/extension-paragraph": "2.
|
|
24
|
-
"@tiptap/extension-placeholder": "2.
|
|
25
|
-
"@tiptap/extension-strike": "2.
|
|
26
|
-
"@tiptap/extension-text": "2.
|
|
27
|
-
"@tiptap/extension-text-align": "2.
|
|
28
|
-
"@tiptap/extension-underline": "2.
|
|
29
|
-
"@tiptap/pm": "2.
|
|
30
|
-
"@tiptap/suggestion": "2.
|
|
31
|
-
"@tiptap/vue-2": "2.
|
|
10
|
+
"@tiptap/core": "^2.6.6",
|
|
11
|
+
"@tiptap/extension-blockquote": "^2.6.6",
|
|
12
|
+
"@tiptap/extension-bold": "^2.6.6",
|
|
13
|
+
"@tiptap/extension-bullet-list": "^2.6.6",
|
|
14
|
+
"@tiptap/extension-code-block": "^2.6.6",
|
|
15
|
+
"@tiptap/extension-document": "^2.6.6",
|
|
16
|
+
"@tiptap/extension-hard-break": "^2.6.6",
|
|
17
|
+
"@tiptap/extension-history": "^2.6.6",
|
|
18
|
+
"@tiptap/extension-italic": "^2.6.6",
|
|
19
|
+
"@tiptap/extension-link": "^2.6.6",
|
|
20
|
+
"@tiptap/extension-list-item": "^2.6.6",
|
|
21
|
+
"@tiptap/extension-mention": "^2.6.6",
|
|
22
|
+
"@tiptap/extension-ordered-list": "^2.6.6",
|
|
23
|
+
"@tiptap/extension-paragraph": "^2.6.6",
|
|
24
|
+
"@tiptap/extension-placeholder": "^2.6.6",
|
|
25
|
+
"@tiptap/extension-strike": "^2.6.6",
|
|
26
|
+
"@tiptap/extension-text": "^2.6.6",
|
|
27
|
+
"@tiptap/extension-text-align": "^2.6.6",
|
|
28
|
+
"@tiptap/extension-underline": "^2.6.6",
|
|
29
|
+
"@tiptap/pm": "^2.6.6",
|
|
30
|
+
"@tiptap/suggestion": "^2.6.6",
|
|
31
|
+
"@tiptap/vue-2": "^2.6.6",
|
|
32
32
|
"date-fns": "2.30.0",
|
|
33
33
|
"emoji-toolkit": "8.0.0",
|
|
34
34
|
"overlayscrollbars": "2.10.0",
|
|
35
35
|
"regex-combined-emojis": "1.6.0",
|
|
36
36
|
"tippy.js": "6.3.7",
|
|
37
37
|
"@dialpad/dialtone-emojis": "1.0.8",
|
|
38
|
-
"@dialpad/dialtone-icons": "4.26.
|
|
38
|
+
"@dialpad/dialtone-icons": "4.26.7"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@faker-js/faker": "8.4.1",
|
|
@@ -84,12 +84,12 @@
|
|
|
84
84
|
"vue-tsc": "^1.8.25",
|
|
85
85
|
"yo": "^5.0.0",
|
|
86
86
|
"yorkie": "^2.0.0",
|
|
87
|
-
"@dialpad/dialtone-css": "8.
|
|
87
|
+
"@dialpad/dialtone-css": "8.43.0",
|
|
88
88
|
"@dialpad/generator-dialtone": "0.1.0"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"vue": ">=2.6",
|
|
92
|
-
"@dialpad/dialtone-css": "^8.
|
|
92
|
+
"@dialpad/dialtone-css": "^8.43.0"
|
|
93
93
|
},
|
|
94
94
|
"bugs": {
|
|
95
95
|
"email": "dialtone@dialpad.com"
|