@dialpad/dialtone 9.122.0 → 9.123.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/tokens/doc.json +30685 -30685
- package/dist/vue2/_plugin-vue2_normalizer-CeySl7Fu.js +11 -0
- package/dist/vue2/_plugin-vue2_normalizer-CeySl7Fu.js.map +1 -0
- package/dist/vue2/_plugin-vue2_normalizer-yXi3ZRRD.cjs +2 -0
- package/dist/vue2/_plugin-vue2_normalizer-yXi3ZRRD.cjs.map +1 -0
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs +1 -1
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.js +17 -8
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.js.map +1 -1
- package/dist/vue2/lib/avatar/avatar.cjs +1 -1
- package/dist/vue2/lib/avatar/avatar.js +5 -2
- package/dist/vue2/lib/avatar/avatar.js.map +1 -1
- package/dist/vue2/lib/badge/badge.cjs +1 -1
- package/dist/vue2/lib/badge/badge.js +7 -4
- package/dist/vue2/lib/badge/badge.js.map +1 -1
- package/dist/vue2/lib/banner/banner.cjs +2 -2
- package/dist/vue2/lib/banner/banner.js +9 -6
- package/dist/vue2/lib/banner/banner.js.map +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumb-item.cjs +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumb-item.js +7 -4
- package/dist/vue2/lib/breadcrumbs/breadcrumb-item.js.map +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.js +5 -2
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/vue2/lib/button/button.cjs +1 -1
- package/dist/vue2/lib/button/button.js +5 -2
- package/dist/vue2/lib/button/button.js.map +1 -1
- package/dist/vue2/lib/button-group/button-group.cjs +1 -1
- package/dist/vue2/lib/button-group/button-group.js +11 -8
- package/dist/vue2/lib/button-group/button-group.js.map +1 -1
- package/dist/vue2/lib/button-group/buttons-decorator.cjs +1 -1
- package/dist/vue2/lib/button-group/buttons-decorator.js +7 -4
- package/dist/vue2/lib/button-group/buttons-decorator.js.map +1 -1
- package/dist/vue2/lib/callbar-button/callbar-button.cjs +1 -1
- package/dist/vue2/lib/callbar-button/callbar-button.js +10 -7
- package/dist/vue2/lib/callbar-button/callbar-button.js.map +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +5 -2
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +12 -9
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
- package/dist/vue2/lib/callbox/callbox.cjs +1 -1
- package/dist/vue2/lib/callbox/callbox.js +5 -2
- package/dist/vue2/lib/callbox/callbox.js.map +1 -1
- package/dist/vue2/lib/card/card.cjs +1 -1
- package/dist/vue2/lib/card/card.js +7 -4
- package/dist/vue2/lib/card/card.js.map +1 -1
- package/dist/vue2/lib/checkbox/checkbox.cjs +1 -1
- package/dist/vue2/lib/checkbox/checkbox.js +5 -2
- package/dist/vue2/lib/checkbox/checkbox.js.map +1 -1
- package/dist/vue2/lib/checkbox-group/checkbox-group.cjs +1 -1
- package/dist/vue2/lib/checkbox-group/checkbox-group.js +8 -5
- package/dist/vue2/lib/checkbox-group/checkbox-group.js.map +1 -1
- package/dist/vue2/lib/checkbox-group/checkboxes-decorator.cjs +1 -1
- package/dist/vue2/lib/checkbox-group/checkboxes-decorator.js +12 -9
- package/dist/vue2/lib/checkbox-group/checkboxes-decorator.js.map +1 -1
- package/dist/vue2/lib/chip/chip.cjs +1 -1
- package/dist/vue2/lib/chip/chip.js +11 -8
- package/dist/vue2/lib/chip/chip.js.map +1 -1
- package/dist/vue2/lib/codeblock/codeblock.cjs +2 -2
- package/dist/vue2/lib/codeblock/codeblock.js +11 -8
- package/dist/vue2/lib/codeblock/codeblock.js.map +1 -1
- package/dist/vue2/lib/collapsible/collapsible-lazy-show.cjs +1 -1
- package/dist/vue2/lib/collapsible/collapsible-lazy-show.js +5 -2
- package/dist/vue2/lib/collapsible/collapsible-lazy-show.js.map +1 -1
- package/dist/vue2/lib/collapsible/collapsible.cjs +1 -1
- package/dist/vue2/lib/collapsible/collapsible.js +7 -4
- package/dist/vue2/lib/collapsible/collapsible.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox-empty-list.cjs +1 -1
- package/dist/vue2/lib/combobox/combobox-empty-list.js +10 -7
- package/dist/vue2/lib/combobox/combobox-empty-list.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox-loading-list.cjs +1 -1
- package/dist/vue2/lib/combobox/combobox-loading-list.js +10 -7
- package/dist/vue2/lib/combobox/combobox-loading-list.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox.cjs +2 -2
- package/dist/vue2/lib/combobox/combobox.js +5 -2
- package/dist/vue2/lib/combobox/combobox.js.map +1 -1
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js +9 -6
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
- package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
- package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js +5 -2
- package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs +1 -1
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.js +9 -6
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.js.map +1 -1
- package/dist/vue2/lib/contact-info/contact-info.cjs +1 -1
- package/dist/vue2/lib/contact-info/contact-info.js +8 -5
- package/dist/vue2/lib/contact-info/contact-info.js.map +1 -1
- package/dist/vue2/lib/contact-row/contact-row.cjs +1 -1
- package/dist/vue2/lib/contact-row/contact-row.js +5 -2
- package/dist/vue2/lib/contact-row/contact-row.js.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
- package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker.js +13 -4
- package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
- package/dist/vue2/lib/description-list/description-list.cjs +1 -1
- package/dist/vue2/lib/description-list/description-list.js +13 -10
- package/dist/vue2/lib/description-list/description-list.js.map +1 -1
- package/dist/vue2/lib/dropdown/dropdown-list.cjs +1 -1
- package/dist/vue2/lib/dropdown/dropdown-list.js +8 -5
- package/dist/vue2/lib/dropdown/dropdown-list.js.map +1 -1
- package/dist/vue2/lib/dropdown/dropdown-separator.cjs +1 -1
- package/dist/vue2/lib/dropdown/dropdown-separator.js +7 -4
- package/dist/vue2/lib/dropdown/dropdown-separator.js.map +1 -1
- package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
- package/dist/vue2/lib/dropdown/dropdown.js +5 -2
- package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
- package/dist/vue2/lib/editor/editor.cjs +1 -1
- package/dist/vue2/lib/editor/editor.js +49 -46
- package/dist/vue2/lib/editor/editor.js.map +1 -1
- package/dist/vue2/lib/emoji/emoji.cjs +1 -1
- package/dist/vue2/lib/emoji/emoji.js +10 -7
- package/dist/vue2/lib/emoji/emoji.js.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.cjs +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker.js +34 -13
- package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.js +6 -3
- package/dist/vue2/lib/emoji-row/emoji-row.js.map +1 -1
- package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.cjs +1 -1
- package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.js +9 -6
- package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.js.map +1 -1
- package/dist/vue2/lib/empty-state/empty-state.cjs +1 -1
- package/dist/vue2/lib/empty-state/empty-state.js +9 -6
- package/dist/vue2/lib/empty-state/empty-state.js.map +1 -1
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs +1 -1
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.js +14 -11
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.js.map +1 -1
- package/dist/vue2/lib/feed-item-row/feed-item-row.cjs +1 -1
- package/dist/vue2/lib/feed-item-row/feed-item-row.js +9 -6
- package/dist/vue2/lib/feed-item-row/feed-item-row.js.map +1 -1
- package/dist/vue2/lib/general-row/general-row.cjs +1 -1
- package/dist/vue2/lib/general-row/general-row.js +5 -2
- package/dist/vue2/lib/general-row/general-row.js.map +1 -1
- package/dist/vue2/lib/general-row/leftbar-general-row-icon.cjs +1 -1
- package/dist/vue2/lib/general-row/leftbar-general-row-icon.js +10 -7
- package/dist/vue2/lib/general-row/leftbar-general-row-icon.js.map +1 -1
- package/dist/vue2/lib/group-row/group-row.cjs +1 -1
- package/dist/vue2/lib/group-row/group-row.js +7 -4
- package/dist/vue2/lib/group-row/group-row.js.map +1 -1
- package/dist/vue2/lib/grouped-chip/grouped-chip.cjs +1 -1
- package/dist/vue2/lib/grouped-chip/grouped-chip.js +7 -4
- package/dist/vue2/lib/grouped-chip/grouped-chip.js.map +1 -1
- package/dist/vue2/lib/hovercard/hovercard.cjs +1 -1
- package/dist/vue2/lib/hovercard/hovercard.js +9 -6
- package/dist/vue2/lib/hovercard/hovercard.js.map +1 -1
- package/dist/vue2/lib/icon/icon.cjs +1 -1
- package/dist/vue2/lib/icon/icon.js +12 -9
- package/dist/vue2/lib/icon/icon.js.map +1 -1
- package/dist/vue2/lib/illustration/illustration.cjs +1 -1
- package/dist/vue2/lib/illustration/illustration.js +13 -10
- package/dist/vue2/lib/illustration/illustration.js.map +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.cjs +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.js +9 -6
- package/dist/vue2/lib/image-viewer/image-viewer.js.map +1 -1
- package/dist/vue2/lib/input/input.cjs +1 -1
- package/dist/vue2/lib/input/input.js +5 -2
- package/dist/vue2/lib/input/input.js.map +1 -1
- package/dist/vue2/lib/input-group/input-group.cjs +1 -1
- package/dist/vue2/lib/input-group/input-group.js +9 -6
- package/dist/vue2/lib/input-group/input-group.js.map +1 -1
- package/dist/vue2/lib/item-layout/item-layout.cjs +2 -2
- package/dist/vue2/lib/item-layout/item-layout.js +7 -4
- package/dist/vue2/lib/item-layout/item-layout.js.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.cjs +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.js +14 -11
- package/dist/vue2/lib/ivr-node/ivr-node.js.map +1 -1
- package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
- package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.js +13 -10
- package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/dist/vue2/lib/lazy-show/lazy-show.cjs +1 -1
- package/dist/vue2/lib/lazy-show/lazy-show.js +5 -2
- package/dist/vue2/lib/lazy-show/lazy-show.js.map +1 -1
- package/dist/vue2/lib/link/link.cjs +1 -1
- package/dist/vue2/lib/link/link.js +9 -6
- package/dist/vue2/lib/link/link.js.map +1 -1
- package/dist/vue2/lib/list-item/list-item.cjs +1 -1
- package/dist/vue2/lib/list-item/list-item.js +25 -22
- package/dist/vue2/lib/list-item/list-item.js.map +1 -1
- package/dist/vue2/lib/list-item-group/list-item-group.cjs +1 -1
- package/dist/vue2/lib/list-item-group/list-item-group.js +11 -8
- package/dist/vue2/lib/list-item-group/list-item-group.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input-button.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input-button.js +7 -4
- package/dist/vue2/lib/message-input/message-input-button.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input-link.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input-link.js +5 -2
- package/dist/vue2/lib/message-input/message-input-link.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input-topbar.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input-topbar.js +5 -2
- package/dist/vue2/lib/message-input/message-input-topbar.js.map +1 -1
- package/dist/vue2/lib/message-input/message-input.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input.js +23 -9
- package/dist/vue2/lib/message-input/message-input.js.map +1 -1
- package/dist/vue2/lib/modal/modal.cjs +2 -2
- package/dist/vue2/lib/modal/modal.js +5 -2
- package/dist/vue2/lib/modal/modal.js.map +1 -1
- package/dist/vue2/lib/notice/notice-action.cjs +1 -1
- package/dist/vue2/lib/notice/notice-action.js +7 -4
- package/dist/vue2/lib/notice/notice-action.js.map +1 -1
- package/dist/vue2/lib/notice/notice-content.cjs +1 -1
- package/dist/vue2/lib/notice/notice-content.js +5 -2
- package/dist/vue2/lib/notice/notice-content.js.map +1 -1
- package/dist/vue2/lib/notice/notice-icon.cjs +1 -1
- package/dist/vue2/lib/notice/notice-icon.js +16 -13
- package/dist/vue2/lib/notice/notice-icon.js.map +1 -1
- package/dist/vue2/lib/notice/notice.cjs +1 -1
- package/dist/vue2/lib/notice/notice.js +10 -7
- package/dist/vue2/lib/notice/notice.js.map +1 -1
- package/dist/vue2/lib/pagination/pagination.cjs +1 -1
- package/dist/vue2/lib/pagination/pagination.js +9 -6
- package/dist/vue2/lib/pagination/pagination.js.map +1 -1
- package/dist/vue2/lib/popover/popover-header-footer.cjs +1 -1
- package/dist/vue2/lib/popover/popover-header-footer.js +8 -5
- package/dist/vue2/lib/popover/popover-header-footer.js.map +1 -1
- package/dist/vue2/lib/popover/popover.cjs +1 -1
- package/dist/vue2/lib/popover/popover.js +5 -2
- package/dist/vue2/lib/popover/popover.js.map +1 -1
- package/dist/vue2/lib/presence/presence.cjs +1 -1
- package/dist/vue2/lib/presence/presence.js +7 -4
- package/dist/vue2/lib/presence/presence.js.map +1 -1
- package/dist/vue2/lib/radio/radio.cjs +1 -1
- package/dist/vue2/lib/radio/radio.js +8 -5
- package/dist/vue2/lib/radio/radio.js.map +1 -1
- package/dist/vue2/lib/radio-group/radio-group.cjs +1 -1
- package/dist/vue2/lib/radio-group/radio-group.js +5 -2
- package/dist/vue2/lib/radio-group/radio-group.js.map +1 -1
- package/dist/vue2/lib/radio-group/radios-decorator.cjs +1 -1
- package/dist/vue2/lib/radio-group/radios-decorator.js +9 -6
- package/dist/vue2/lib/radio-group/radios-decorator.js.map +1 -1
- package/dist/vue2/lib/rich-text-editor/mention-suggestion.cjs +1 -1
- package/dist/vue2/lib/rich-text-editor/mention-suggestion.cjs.map +1 -1
- package/dist/vue2/lib/rich-text-editor/mention-suggestion.js +33 -14
- package/dist/vue2/lib/rich-text-editor/mention-suggestion.js.map +1 -1
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +4 -4
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +364 -315
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue2/lib/root-layout/root-layout.cjs +1 -1
- package/dist/vue2/lib/root-layout/root-layout.js +8 -5
- package/dist/vue2/lib/root-layout/root-layout.js.map +1 -1
- package/dist/vue2/lib/select-menu/select-menu.cjs +1 -1
- package/dist/vue2/lib/select-menu/select-menu.js +5 -2
- package/dist/vue2/lib/select-menu/select-menu.js.map +1 -1
- package/dist/vue2/lib/settings-menu-button/settings-menu-button.cjs +1 -1
- package/dist/vue2/lib/settings-menu-button/settings-menu-button.js +7 -4
- package/dist/vue2/lib/settings-menu-button/settings-menu-button.js.map +1 -1
- package/dist/vue2/lib/skeleton/skeleton-list-item.cjs +1 -1
- package/dist/vue2/lib/skeleton/skeleton-list-item.js +5 -2
- package/dist/vue2/lib/skeleton/skeleton-list-item.js.map +1 -1
- package/dist/vue2/lib/skeleton/skeleton-paragraph.cjs +1 -1
- package/dist/vue2/lib/skeleton/skeleton-paragraph.js +8 -5
- package/dist/vue2/lib/skeleton/skeleton-paragraph.js.map +1 -1
- package/dist/vue2/lib/skeleton/skeleton-shape.cjs +1 -1
- package/dist/vue2/lib/skeleton/skeleton-shape.js +7 -4
- package/dist/vue2/lib/skeleton/skeleton-shape.js.map +1 -1
- package/dist/vue2/lib/skeleton/skeleton-text.cjs +1 -1
- package/dist/vue2/lib/skeleton/skeleton-text.js +14 -11
- package/dist/vue2/lib/skeleton/skeleton-text.js.map +1 -1
- package/dist/vue2/lib/skeleton/skeleton.cjs +1 -1
- package/dist/vue2/lib/skeleton/skeleton.js +9 -6
- package/dist/vue2/lib/skeleton/skeleton.js.map +1 -1
- package/dist/vue2/lib/split-button/split-button-alpha.cjs +1 -1
- package/dist/vue2/lib/split-button/split-button-alpha.js +12 -9
- package/dist/vue2/lib/split-button/split-button-alpha.js.map +1 -1
- package/dist/vue2/lib/split-button/split-button-omega.cjs +1 -1
- package/dist/vue2/lib/split-button/split-button-omega.js +9 -6
- package/dist/vue2/lib/split-button/split-button-omega.js.map +1 -1
- package/dist/vue2/lib/split-button/split-button.cjs +1 -1
- package/dist/vue2/lib/split-button/split-button.js +9 -6
- package/dist/vue2/lib/split-button/split-button.js.map +1 -1
- package/dist/vue2/lib/stack/stack.cjs +1 -1
- package/dist/vue2/lib/stack/stack.js +15 -12
- package/dist/vue2/lib/stack/stack.js.map +1 -1
- package/dist/vue2/lib/tab/tab-group.cjs +1 -1
- package/dist/vue2/lib/tab/tab-group.js +5 -2
- package/dist/vue2/lib/tab/tab-group.js.map +1 -1
- package/dist/vue2/lib/tab/tab-panel.cjs +1 -1
- package/dist/vue2/lib/tab/tab-panel.js +11 -8
- package/dist/vue2/lib/tab/tab-panel.js.map +1 -1
- package/dist/vue2/lib/tab/tab.cjs +1 -1
- package/dist/vue2/lib/tab/tab.js +10 -7
- package/dist/vue2/lib/tab/tab.js.map +1 -1
- package/dist/vue2/lib/time-pill/time-pill.cjs +1 -1
- package/dist/vue2/lib/time-pill/time-pill.js +8 -5
- package/dist/vue2/lib/time-pill/time-pill.js.map +1 -1
- package/dist/vue2/lib/toast/toast.cjs +1 -1
- package/dist/vue2/lib/toast/toast.cjs.map +1 -1
- package/dist/vue2/lib/toast/toast.js +17 -5
- package/dist/vue2/lib/toast/toast.js.map +1 -1
- package/dist/vue2/lib/toggle/toggle.cjs +1 -1
- package/dist/vue2/lib/toggle/toggle.js +5 -2
- package/dist/vue2/lib/toggle/toggle.js.map +1 -1
- package/dist/vue2/lib/tooltip/tooltip.cjs +1 -1
- package/dist/vue2/lib/tooltip/tooltip.js +9 -6
- package/dist/vue2/lib/tooltip/tooltip.js.map +1 -1
- package/dist/vue2/lib/top-banner-info/top-banner-info.cjs +1 -1
- package/dist/vue2/lib/top-banner-info/top-banner-info.js +5 -2
- package/dist/vue2/lib/top-banner-info/top-banner-info.js.map +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.cjs +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.js +8 -5
- package/dist/vue2/lib/unread-pill/unread-pill.js.map +1 -1
- package/dist/vue2/lib/validation-messages/validation-messages.cjs +1 -1
- package/dist/vue2/lib/validation-messages/validation-messages.js +10 -7
- package/dist/vue2/lib/validation-messages/validation-messages.js.map +1 -1
- package/dist/vue2/node_modules/@tiptap/vue-2.cjs +1 -1
- package/dist/vue2/node_modules/@tiptap/vue-2.cjs.map +1 -1
- package/dist/vue2/node_modules/@tiptap/vue-2.js +191 -149
- package/dist/vue2/node_modules/@tiptap/vue-2.js.map +1 -1
- package/dist/vue2/shared/sr_only_close_button.cjs +1 -1
- package/dist/vue2/shared/sr_only_close_button.js +12 -9
- package/dist/vue2/shared/sr_only_close_button.js.map +1 -1
- package/dist/vue2/style.css +1 -0
- package/dist/vue2/types/components/emoji_picker/emoji_picker.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +16 -16
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +16 -16
- package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +16 -16
- package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +5 -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/slash_command/SlashCommandComponent.vue.d.ts +16 -16
- package/dist/vue2/types/components/rich_text_editor/mention_suggestion.d.ts +23 -3
- package/dist/vue2/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -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/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +16 -16
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js +4 -3
- package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker.cjs +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker.cjs.map +1 -1
- package/dist/vue3/lib/emoji-picker/emoji-picker.js +518 -415
- package/dist/vue3/lib/emoji-picker/emoji-picker.js.map +1 -1
- package/dist/vue3/lib/rich-text-editor/mention-suggestion.cjs +1 -1
- package/dist/vue3/lib/rich-text-editor/mention-suggestion.cjs.map +1 -1
- package/dist/vue3/lib/rich-text-editor/mention-suggestion.js +34 -15
- package/dist/vue3/lib/rich-text-editor/mention-suggestion.js.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +3 -3
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +264 -212
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue3/node_modules/@tiptap/vue-3.cjs +1 -1
- package/dist/vue3/node_modules/@tiptap/vue-3.cjs.map +1 -1
- package/dist/vue3/node_modules/@tiptap/vue-3.js +165 -115
- package/dist/vue3/node_modules/@tiptap/vue-3.js.map +1 -1
- package/dist/vue3/style.css +1 -0
- package/dist/vue3/types/components/emoji_picker/emoji_picker.vue.d.ts +1 -1
- package/dist/vue3/types/components/emoji_picker/emoji_picker.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/emoji_picker/emoji_picker_constants.d.ts +1 -0
- package/dist/vue3/types/components/emoji_picker/modules/emoji_selector.vue.d.ts +1 -1
- package/dist/vue3/types/components/emoji_picker/modules/emoji_selector.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +26 -2
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +26 -2
- package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +26 -2
- package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +5 -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/slash_command/SlashCommandComponent.vue.d.ts +26 -2
- package/dist/vue3/types/components/rich_text_editor/mention_suggestion.d.ts +23 -3
- package/dist/vue3/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -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/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +26 -2
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -1
- package/package.json +31 -31
- package/dist/vue2/_plugin-vue2_normalizer-DSLOjnn3.js +0 -11
- package/dist/vue2/_plugin-vue2_normalizer-DSLOjnn3.js.map +0 -1
- package/dist/vue2/_plugin-vue2_normalizer-e_CkxkSV.cjs +0 -2
- package/dist/vue2/_plugin-vue2_normalizer-e_CkxkSV.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NodeViewWrapper as _, nodeViewProps as y, VueRenderer as
|
|
2
|
-
import { Node as q, mergeAttributes as m, InputRule as K, nodePasteRule as
|
|
1
|
+
import { NodeViewWrapper as _, nodeViewProps as y, VueRenderer as w, VueNodeViewRenderer as b, EditorContent as P, BubbleMenu as H, Editor as F } from "../../node_modules/@tiptap/vue-2.js";
|
|
2
|
+
import { Node as q, mergeAttributes as m, InputRule as K, nodePasteRule as T, getMarksBetween as U, combineTransactionSteps as N, getChangedRanges as V, findChildrenInRange as z, Mark as W, nodeInputRule as X, Extension as J } from "@tiptap/core";
|
|
3
3
|
import Y from "@tiptap/extension-blockquote";
|
|
4
4
|
import G from "@tiptap/extension-code-block";
|
|
5
5
|
import Q from "@tiptap/extension-code";
|
|
@@ -10,12 +10,12 @@ import te from "@tiptap/extension-hard-break";
|
|
|
10
10
|
import ne from "@tiptap/extension-bold";
|
|
11
11
|
import re from "@tiptap/extension-bullet-list";
|
|
12
12
|
import ie from "@tiptap/extension-italic";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import se from "@tiptap/extension-link";
|
|
14
|
+
import oe from "@tiptap/extension-list-item";
|
|
15
15
|
import ae from "@tiptap/extension-ordered-list";
|
|
16
16
|
import le from "@tiptap/extension-strike";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
17
|
+
import ce from "@tiptap/extension-underline";
|
|
18
|
+
import de from "@tiptap/extension-text";
|
|
19
19
|
import ue from "@tiptap/extension-text-align";
|
|
20
20
|
import me from "@tiptap/extension-history";
|
|
21
21
|
import he from "@tiptap/extension-text-style";
|
|
@@ -24,18 +24,18 @@ import pe from "@tiptap/extension-font-family";
|
|
|
24
24
|
import { PluginKey as f, Plugin as ge } from "@tiptap/pm/state";
|
|
25
25
|
import _e from "@tiptap/suggestion";
|
|
26
26
|
import { emojiPattern as M } from "regex-combined-emojis";
|
|
27
|
-
import { n as
|
|
27
|
+
import { n as c } from "../../_plugin-vue2_normalizer-CeySl7Fu.js";
|
|
28
28
|
import O from "../emoji/emoji.js";
|
|
29
|
-
import { stringToUnicode as ye, codeToEmojiData as E, emojiRegex as
|
|
29
|
+
import { stringToUnicode as ye, codeToEmojiData as E, emojiRegex as we, emojiShortCodeRegex as be } from "../../common/emoji/index.js";
|
|
30
30
|
import { emojisIndexed as ve } from "@dialpad/dialtone-emojis";
|
|
31
31
|
import xe from "../list-item/list-item.js";
|
|
32
32
|
import v from "../stack/stack.js";
|
|
33
33
|
import x from "tippy.js";
|
|
34
|
-
import { linkRegex as
|
|
35
|
-
import
|
|
34
|
+
import { linkRegex as Ce, getPhoneNumberRegex as ke, warnIfUnmounted as Se } from "../../common/utils/index.js";
|
|
35
|
+
import Te from "@tiptap/extension-image";
|
|
36
36
|
import $ from "@tiptap/extension-mention";
|
|
37
|
-
import
|
|
38
|
-
import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as
|
|
37
|
+
import D from "../link/link.js";
|
|
38
|
+
import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as Re, RICH_TEXT_EDITOR_OUTPUT_FORMATS as Ee, RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as L } from "./rich-text-editor-constants.js";
|
|
39
39
|
import $e from "../avatar/avatar.js";
|
|
40
40
|
import Le from "@dialpad/dialtone-icons/vue2/hash";
|
|
41
41
|
import Ie from "@dialpad/dialtone-icons/vue2/lock";
|
|
@@ -50,14 +50,17 @@ const Me = {
|
|
|
50
50
|
props: y
|
|
51
51
|
};
|
|
52
52
|
var Oe = function() {
|
|
53
|
-
var
|
|
54
|
-
return r("node-view-wrapper", { staticClass: "d-d-inline-block d-va-bottom d-lh0" }, [r("dt-emoji", { attrs: { size: "500", code:
|
|
55
|
-
},
|
|
53
|
+
var e = this, r = e._self._c;
|
|
54
|
+
return r("node-view-wrapper", { staticClass: "d-d-inline-block d-va-bottom d-lh0" }, [r("dt-emoji", { attrs: { size: "500", code: e.node.attrs.code } })], 1);
|
|
55
|
+
}, De = [], Be = /* @__PURE__ */ c(
|
|
56
56
|
Me,
|
|
57
57
|
Oe,
|
|
58
|
-
|
|
58
|
+
De,
|
|
59
|
+
!1,
|
|
60
|
+
null,
|
|
61
|
+
null
|
|
59
62
|
);
|
|
60
|
-
const Pe =
|
|
63
|
+
const Pe = Be.exports, He = {
|
|
61
64
|
name: "SuggestionList",
|
|
62
65
|
components: {
|
|
63
66
|
DtListItem: xe
|
|
@@ -91,8 +94,8 @@ const Pe = De.exports, He = {
|
|
|
91
94
|
}
|
|
92
95
|
},
|
|
93
96
|
methods: {
|
|
94
|
-
onKeyDown({ event:
|
|
95
|
-
return
|
|
97
|
+
onKeyDown({ event: t }) {
|
|
98
|
+
return t.key === "ArrowUp" ? (this.upHandler(), !0) : t.key === "ArrowDown" ? (this.downHandler(), !0) : t.key === "Enter" || t.key === "Tab" ? (this.selectHandler(), !0) : !1;
|
|
96
99
|
},
|
|
97
100
|
upHandler() {
|
|
98
101
|
this.selectedIndex = (this.selectedIndex + this.items.length - 1) % this.items.length, this.scrollActiveElementIntoView();
|
|
@@ -102,8 +105,8 @@ const Pe = De.exports, He = {
|
|
|
102
105
|
},
|
|
103
106
|
async scrollActiveElementIntoView() {
|
|
104
107
|
await this.$nextTick();
|
|
105
|
-
const
|
|
106
|
-
|
|
108
|
+
const t = this.$refs.suggestionList.querySelector(".d-list-item--highlighted");
|
|
109
|
+
t && t.scrollIntoView({
|
|
107
110
|
behaviour: "smooth",
|
|
108
111
|
block: "center"
|
|
109
112
|
});
|
|
@@ -111,43 +114,46 @@ const Pe = De.exports, He = {
|
|
|
111
114
|
selectHandler() {
|
|
112
115
|
this.selectItem(this.selectedIndex);
|
|
113
116
|
},
|
|
114
|
-
selectItem(
|
|
115
|
-
const
|
|
117
|
+
selectItem(t) {
|
|
118
|
+
const e = this.items[t];
|
|
116
119
|
switch (this.itemType) {
|
|
117
120
|
case "emoji":
|
|
118
|
-
this.command(
|
|
121
|
+
this.command(e);
|
|
119
122
|
return;
|
|
120
123
|
case "mention":
|
|
121
|
-
this.command({ name:
|
|
124
|
+
this.command({ name: e.name, id: e.id, avatarSrc: e.avatarSrc });
|
|
122
125
|
break;
|
|
123
126
|
case "channel":
|
|
124
|
-
this.command({ name:
|
|
127
|
+
this.command({ name: e.name, id: e.id });
|
|
125
128
|
break;
|
|
126
129
|
case "slash-command":
|
|
127
|
-
this.command({ command:
|
|
130
|
+
this.command({ command: e.command });
|
|
128
131
|
break;
|
|
129
132
|
}
|
|
130
133
|
}
|
|
131
134
|
}
|
|
132
135
|
};
|
|
133
136
|
var Fe = function() {
|
|
134
|
-
var
|
|
135
|
-
return r("div", { staticClass: "d-popover__dialog d-suggestion-list__container" }, [r("ul", { directives: [{ name: "show", rawName: "v-show", value:
|
|
137
|
+
var e = this, r = e._self._c;
|
|
138
|
+
return r("div", { staticClass: "d-popover__dialog d-suggestion-list__container" }, [r("ul", { directives: [{ name: "show", rawName: "v-show", value: e.items.length, expression: "items.length" }], ref: "suggestionList", staticClass: "d-suggestion-list" }, e._l(e.items, function(n, i) {
|
|
136
139
|
return r("dt-list-item", { key: n.id, class: [
|
|
137
140
|
"d-suggestion-list__item",
|
|
138
|
-
{ "d-list-item--highlighted": i ===
|
|
139
|
-
], attrs: { "navigation-type": "arrow-keys" }, on: { click: function(
|
|
140
|
-
return
|
|
141
|
-
}, keydown: function(
|
|
142
|
-
return
|
|
143
|
-
} } }, [r(
|
|
141
|
+
{ "d-list-item--highlighted": i === e.selectedIndex }
|
|
142
|
+
], attrs: { "navigation-type": "arrow-keys" }, on: { click: function(o) {
|
|
143
|
+
return e.selectItem(i);
|
|
144
|
+
}, keydown: function(o) {
|
|
145
|
+
return o.preventDefault(), e.onKeyDown.apply(null, arguments);
|
|
146
|
+
} } }, [r(e.itemComponent, { tag: "component", attrs: { item: n } })], 1);
|
|
144
147
|
}), 1)]);
|
|
145
|
-
}, qe = [], Ke = /* @__PURE__ */
|
|
148
|
+
}, qe = [], Ke = /* @__PURE__ */ c(
|
|
146
149
|
He,
|
|
147
150
|
Fe,
|
|
148
|
-
qe
|
|
151
|
+
qe,
|
|
152
|
+
!1,
|
|
153
|
+
null,
|
|
154
|
+
null
|
|
149
155
|
);
|
|
150
|
-
const
|
|
156
|
+
const C = Ke.exports, Ue = {
|
|
151
157
|
name: "EmojiSuggestion",
|
|
152
158
|
components: {
|
|
153
159
|
DtEmoji: O,
|
|
@@ -161,57 +167,60 @@ const k = Ke.exports, Ue = {
|
|
|
161
167
|
}
|
|
162
168
|
};
|
|
163
169
|
var Ne = function() {
|
|
164
|
-
var
|
|
165
|
-
return r("dt-stack", { attrs: { direction: "row", gap: "400" } }, [r("dt-emoji", { attrs: { size: "200", code:
|
|
166
|
-
}, Ve = [], ze = /* @__PURE__ */
|
|
170
|
+
var e = this, r = e._self._c;
|
|
171
|
+
return r("dt-stack", { attrs: { direction: "row", gap: "400" } }, [r("dt-emoji", { attrs: { size: "200", code: e.item.code } }), e._v(" " + e._s(e.item.code) + " ")], 1);
|
|
172
|
+
}, Ve = [], ze = /* @__PURE__ */ c(
|
|
167
173
|
Ue,
|
|
168
174
|
Ne,
|
|
169
|
-
Ve
|
|
175
|
+
Ve,
|
|
176
|
+
!1,
|
|
177
|
+
null,
|
|
178
|
+
null
|
|
170
179
|
);
|
|
171
|
-
const We = ze.exports,
|
|
180
|
+
const We = ze.exports, k = {
|
|
172
181
|
name: "hideOnEsc",
|
|
173
182
|
defaultValue: !0,
|
|
174
|
-
fn({ hide:
|
|
175
|
-
function
|
|
176
|
-
r.keyCode === 27 &&
|
|
183
|
+
fn({ hide: t }) {
|
|
184
|
+
function e(r) {
|
|
185
|
+
r.keyCode === 27 && t();
|
|
177
186
|
}
|
|
178
187
|
return {
|
|
179
188
|
onShow() {
|
|
180
|
-
document.addEventListener("keydown",
|
|
189
|
+
document.addEventListener("keydown", e);
|
|
181
190
|
},
|
|
182
191
|
onHide() {
|
|
183
|
-
document.removeEventListener("keydown",
|
|
192
|
+
document.removeEventListener("keydown", e);
|
|
184
193
|
}
|
|
185
194
|
};
|
|
186
195
|
}
|
|
187
196
|
}, Xe = 20, Je = {
|
|
188
|
-
items: ({ query:
|
|
189
|
-
if (
|
|
197
|
+
items: ({ query: t }) => {
|
|
198
|
+
if (t.length < 2)
|
|
190
199
|
return [];
|
|
191
|
-
const
|
|
192
|
-
return
|
|
200
|
+
const e = Object.values(ve);
|
|
201
|
+
return t = t.toLowerCase(), e.filter(
|
|
193
202
|
(n) => [
|
|
194
203
|
n.name,
|
|
195
204
|
n.shortname.replaceAll(":", ""),
|
|
196
205
|
...n.keywords
|
|
197
|
-
].some((i) => i.startsWith(
|
|
206
|
+
].some((i) => i.startsWith(t))
|
|
198
207
|
).splice(0, Xe).map((n) => ({ code: n.shortname }));
|
|
199
208
|
},
|
|
200
|
-
command: ({ editor:
|
|
201
|
-
var
|
|
202
|
-
const n =
|
|
203
|
-
((
|
|
209
|
+
command: ({ editor: t, range: e, props: r }) => {
|
|
210
|
+
var o, s;
|
|
211
|
+
const n = t.view.state.selection.$to.nodeAfter;
|
|
212
|
+
((o = n == null ? void 0 : n.text) == null ? void 0 : o.startsWith(" ")) && (e.to += 1), t.chain().focus().insertContentAt(e, [
|
|
204
213
|
{
|
|
205
214
|
type: "emoji",
|
|
206
215
|
attrs: r
|
|
207
216
|
}
|
|
208
|
-
]).run(), (
|
|
217
|
+
]).run(), (s = window.getSelection()) == null || s.collapseToEnd();
|
|
209
218
|
},
|
|
210
219
|
render: () => {
|
|
211
|
-
let
|
|
220
|
+
let t, e, r = !1;
|
|
212
221
|
return {
|
|
213
222
|
onStart: (n) => {
|
|
214
|
-
|
|
223
|
+
t = new w(C, {
|
|
215
224
|
parent: void 0,
|
|
216
225
|
propsData: {
|
|
217
226
|
itemComponent: We,
|
|
@@ -219,10 +228,10 @@ const We = ze.exports, C = {
|
|
|
219
228
|
...n
|
|
220
229
|
},
|
|
221
230
|
editor: n.editor
|
|
222
|
-
}), n.clientRect && (
|
|
231
|
+
}), n.clientRect && (e = x("body", {
|
|
223
232
|
getReferenceClientRect: n.clientRect,
|
|
224
233
|
appendTo: () => document.body,
|
|
225
|
-
content:
|
|
234
|
+
content: t.element,
|
|
226
235
|
showOnCreate: !1,
|
|
227
236
|
onShow: () => {
|
|
228
237
|
r = !0;
|
|
@@ -234,28 +243,28 @@ const We = ze.exports, C = {
|
|
|
234
243
|
trigger: "manual",
|
|
235
244
|
placement: "top-start",
|
|
236
245
|
zIndex: 650,
|
|
237
|
-
plugins: [
|
|
238
|
-
}), n.items.length > 0 && (
|
|
246
|
+
plugins: [k]
|
|
247
|
+
}), n.items.length > 0 && (e == null || e[0].show()));
|
|
239
248
|
},
|
|
240
249
|
onUpdate(n) {
|
|
241
|
-
|
|
250
|
+
t == null || t.updateProps(n), n.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), e == null || e[0].setProps({
|
|
242
251
|
getReferenceClientRect: n.clientRect
|
|
243
252
|
});
|
|
244
253
|
},
|
|
245
254
|
onKeyDown(n) {
|
|
246
255
|
var i;
|
|
247
256
|
if (r)
|
|
248
|
-
return (i =
|
|
257
|
+
return (i = t == null ? void 0 : t.ref) == null ? void 0 : i.onKeyDown(n);
|
|
249
258
|
},
|
|
250
259
|
onExit() {
|
|
251
|
-
|
|
260
|
+
e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
|
|
252
261
|
}
|
|
253
262
|
};
|
|
254
263
|
}
|
|
255
|
-
}, Ye = /(:\w+:)$/, Ge = new RegExp(M + "$"), Qe = (
|
|
256
|
-
if (
|
|
257
|
-
return { text:
|
|
258
|
-
}, Ze = (
|
|
264
|
+
}, Ye = /(:\w+:)$/, Ge = new RegExp(M + "$"), Qe = (t) => {
|
|
265
|
+
if (t && E(t[0]))
|
|
266
|
+
return { text: t[2] || t[0] };
|
|
267
|
+
}, Ze = (t) => [...t.matchAll(be)].filter((r) => E(r[0])).map((r) => ({
|
|
259
268
|
index: r.index,
|
|
260
269
|
text: r[0],
|
|
261
270
|
match: r
|
|
@@ -271,7 +280,7 @@ const We = ze.exports, C = {
|
|
|
271
280
|
selectable: !1,
|
|
272
281
|
atom: !0,
|
|
273
282
|
addNodeView() {
|
|
274
|
-
return
|
|
283
|
+
return b(Pe);
|
|
275
284
|
},
|
|
276
285
|
addAttributes() {
|
|
277
286
|
return {
|
|
@@ -287,44 +296,44 @@ const We = ze.exports, C = {
|
|
|
287
296
|
}
|
|
288
297
|
];
|
|
289
298
|
},
|
|
290
|
-
renderText({ node:
|
|
291
|
-
return ye(E(
|
|
299
|
+
renderText({ node: t }) {
|
|
300
|
+
return ye(E(t.attrs.code).unicode_output);
|
|
292
301
|
},
|
|
293
|
-
renderHTML({ HTMLAttributes:
|
|
294
|
-
return ["emoji-component", m(this.options.HTMLAttributes,
|
|
302
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
303
|
+
return ["emoji-component", m(this.options.HTMLAttributes, t)];
|
|
295
304
|
},
|
|
296
305
|
addInputRules() {
|
|
297
306
|
return [
|
|
298
307
|
new K({
|
|
299
|
-
find: (
|
|
300
|
-
const
|
|
301
|
-
if (
|
|
302
|
-
return Qe(
|
|
308
|
+
find: (t) => {
|
|
309
|
+
const e = t.match(Ye) || t.match(Ge);
|
|
310
|
+
if (e)
|
|
311
|
+
return Qe(e);
|
|
303
312
|
},
|
|
304
|
-
handler: ({ state:
|
|
305
|
-
const { tr:
|
|
306
|
-
|
|
313
|
+
handler: ({ state: t, range: e, match: r, commands: n, chain: i, can: o }) => {
|
|
314
|
+
const { tr: s } = t, a = e.from, l = e.to;
|
|
315
|
+
s.replaceWith(a, l, this.type.create({ code: r[0] }));
|
|
307
316
|
}
|
|
308
317
|
})
|
|
309
318
|
];
|
|
310
319
|
},
|
|
311
320
|
addPasteRules() {
|
|
312
321
|
return [
|
|
313
|
-
|
|
322
|
+
T({
|
|
314
323
|
find: Ze,
|
|
315
324
|
type: this.type,
|
|
316
|
-
getAttributes(
|
|
325
|
+
getAttributes(t) {
|
|
317
326
|
return {
|
|
318
|
-
code:
|
|
327
|
+
code: t[0]
|
|
319
328
|
};
|
|
320
329
|
}
|
|
321
330
|
}),
|
|
322
|
-
|
|
323
|
-
find:
|
|
331
|
+
T({
|
|
332
|
+
find: we,
|
|
324
333
|
type: this.type,
|
|
325
|
-
getAttributes(
|
|
334
|
+
getAttributes(t) {
|
|
326
335
|
return {
|
|
327
|
-
code:
|
|
336
|
+
code: t[0]
|
|
328
337
|
};
|
|
329
338
|
}
|
|
330
339
|
})
|
|
@@ -343,42 +352,42 @@ const We = ze.exports, C = {
|
|
|
343
352
|
},
|
|
344
353
|
addKeyboardShortcuts() {
|
|
345
354
|
return {
|
|
346
|
-
Backspace: () => this.editor.commands.command(({ tr:
|
|
355
|
+
Backspace: () => this.editor.commands.command(({ tr: t, state: e }) => {
|
|
347
356
|
let r = !1;
|
|
348
|
-
const { selection: n } =
|
|
349
|
-
return i ? (
|
|
350
|
-
if (
|
|
351
|
-
return r = !0,
|
|
357
|
+
const { selection: n } = e, { empty: i, anchor: o } = n;
|
|
358
|
+
return i ? (e.doc.nodesBetween(o - 1, o, (s, a) => {
|
|
359
|
+
if (s.type.name === this.name)
|
|
360
|
+
return r = !0, t.insertText("", a, a + s.nodeSize), !1;
|
|
352
361
|
}), r) : !1;
|
|
353
362
|
})
|
|
354
363
|
};
|
|
355
364
|
}
|
|
356
365
|
});
|
|
357
|
-
function tt(
|
|
366
|
+
function tt(t, e, r = () => !0) {
|
|
358
367
|
const n = [];
|
|
359
|
-
|
|
368
|
+
e.lastIndex = 0;
|
|
360
369
|
let i;
|
|
361
|
-
for (; i =
|
|
362
|
-
r(
|
|
370
|
+
for (; i = e.exec(t); )
|
|
371
|
+
r(t, i) && n.push(i);
|
|
363
372
|
return n;
|
|
364
373
|
}
|
|
365
|
-
function nt(
|
|
366
|
-
return !["#", "@"].includes(
|
|
374
|
+
function nt(t, e) {
|
|
375
|
+
return !["#", "@"].includes(t.charAt(e.index)) && !["#", "@"].includes(t.charAt(e.index - 1));
|
|
367
376
|
}
|
|
368
|
-
function rt(
|
|
369
|
-
const
|
|
377
|
+
function rt(t) {
|
|
378
|
+
const e = new RegExp(
|
|
370
379
|
"(?:" + [
|
|
371
380
|
`[!?.,:;'"]`,
|
|
372
381
|
"(?:&|&)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"
|
|
373
382
|
].join("|"),
|
|
374
383
|
"g"
|
|
375
384
|
);
|
|
376
|
-
return
|
|
385
|
+
return t.replace(e, "");
|
|
377
386
|
}
|
|
378
|
-
function it(
|
|
379
|
-
const r =
|
|
387
|
+
function it(t, e) {
|
|
388
|
+
const r = t.slice(0, e + 1).search(/\S+\s*$/), n = t.slice(e).search(/\s/);
|
|
380
389
|
if (n < 0) {
|
|
381
|
-
const i =
|
|
390
|
+
const i = t.slice(r);
|
|
382
391
|
return {
|
|
383
392
|
text: i,
|
|
384
393
|
from: r,
|
|
@@ -386,61 +395,61 @@ function it(e, t) {
|
|
|
386
395
|
};
|
|
387
396
|
}
|
|
388
397
|
return {
|
|
389
|
-
text:
|
|
398
|
+
text: t.slice(r, n + e),
|
|
390
399
|
from: r,
|
|
391
|
-
to: n +
|
|
400
|
+
to: n + e
|
|
392
401
|
};
|
|
393
402
|
}
|
|
394
|
-
function
|
|
395
|
-
const i = it(
|
|
403
|
+
function R(t, e, r, n) {
|
|
404
|
+
const i = it(t, e);
|
|
396
405
|
if (n.lastIndex = 0, !n.test(i.text))
|
|
397
406
|
return i;
|
|
398
|
-
const
|
|
399
|
-
return
|
|
407
|
+
const o = r === "left" ? i.from - 1 : i.to + 1;
|
|
408
|
+
return o <= 0 || o >= t.length || o === e ? i : R(t, o, r, n);
|
|
400
409
|
}
|
|
401
|
-
function
|
|
402
|
-
const i = Math.max(
|
|
403
|
-
for (const a of
|
|
410
|
+
function st(t, e, r, n) {
|
|
411
|
+
const i = Math.max(t.from - 1, 0), o = Math.min(t.to + 1, e.content.size), s = U(i, o, e);
|
|
412
|
+
for (const a of s)
|
|
404
413
|
a.mark.type === n && r.removeMark(a.from, a.to, n);
|
|
405
414
|
}
|
|
406
|
-
const I =
|
|
407
|
-
function A(
|
|
408
|
-
if (!
|
|
415
|
+
const I = ke(1, 15);
|
|
416
|
+
function A(t, e, r, n, i, o) {
|
|
417
|
+
if (!t)
|
|
409
418
|
return;
|
|
410
|
-
let
|
|
411
|
-
|
|
412
|
-
const a = n -
|
|
413
|
-
|
|
414
|
-
|
|
419
|
+
let s = r - e - 1;
|
|
420
|
+
s = s < 0 ? 0 : s;
|
|
421
|
+
const a = n - e, l = R(
|
|
422
|
+
t,
|
|
423
|
+
s,
|
|
415
424
|
"left",
|
|
416
425
|
I
|
|
417
|
-
),
|
|
418
|
-
|
|
426
|
+
), d = R(
|
|
427
|
+
t,
|
|
419
428
|
a,
|
|
420
429
|
"right",
|
|
421
430
|
I
|
|
422
|
-
), u =
|
|
423
|
-
tt(u,
|
|
424
|
-
const h = rt(S[0]), g =
|
|
425
|
-
i.addMark(g,
|
|
431
|
+
), u = t.slice(l.from, d.to);
|
|
432
|
+
tt(u, Ce, nt).forEach((S) => {
|
|
433
|
+
const h = rt(S[0]), g = e + l.from + S.index + 1, B = g + h.length;
|
|
434
|
+
i.addMark(g, B, o.create());
|
|
426
435
|
});
|
|
427
436
|
}
|
|
428
|
-
function
|
|
429
|
-
let
|
|
437
|
+
function ot(t) {
|
|
438
|
+
let e = !1;
|
|
430
439
|
return new ge({
|
|
431
440
|
key: new f("autolink"),
|
|
432
441
|
appendTransaction: (r, n, i) => {
|
|
433
|
-
const
|
|
434
|
-
if (
|
|
442
|
+
const o = r.some((u) => u.docChanged) && !n.doc.eq(i.doc);
|
|
443
|
+
if (e && !o)
|
|
435
444
|
return;
|
|
436
|
-
const { tr:
|
|
437
|
-
|
|
445
|
+
const { tr: s } = i, { textContent: a } = i.doc;
|
|
446
|
+
e || A(a, 0, 0, a.length, s, t.type), e = !0;
|
|
438
447
|
const l = N(
|
|
439
448
|
n.doc,
|
|
440
449
|
[...r]
|
|
441
450
|
);
|
|
442
451
|
return V(l).forEach(({ oldRange: u, newRange: p }) => {
|
|
443
|
-
|
|
452
|
+
st(p, i.doc, s, t.type), z(
|
|
444
453
|
i.doc,
|
|
445
454
|
p,
|
|
446
455
|
(h) => h.isTextblock
|
|
@@ -450,11 +459,11 @@ function st(e) {
|
|
|
450
459
|
g,
|
|
451
460
|
u.from,
|
|
452
461
|
p.to,
|
|
453
|
-
|
|
454
|
-
|
|
462
|
+
s,
|
|
463
|
+
t.type
|
|
455
464
|
);
|
|
456
465
|
});
|
|
457
|
-
}),
|
|
466
|
+
}), s;
|
|
458
467
|
}
|
|
459
468
|
});
|
|
460
469
|
}
|
|
@@ -463,25 +472,25 @@ const at = {
|
|
|
463
472
|
rel: "noopener noreferrer nofollow"
|
|
464
473
|
}, lt = W.create({
|
|
465
474
|
name: "CustomLink",
|
|
466
|
-
renderHTML({ HTMLAttributes:
|
|
475
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
467
476
|
return [
|
|
468
477
|
"a",
|
|
469
478
|
m(
|
|
470
479
|
this.options.HTMLAttributes,
|
|
471
|
-
|
|
480
|
+
t,
|
|
472
481
|
at
|
|
473
482
|
)
|
|
474
483
|
];
|
|
475
484
|
},
|
|
476
|
-
renderText({ node:
|
|
477
|
-
return
|
|
485
|
+
renderText({ node: t }) {
|
|
486
|
+
return t.attrs.text;
|
|
478
487
|
},
|
|
479
488
|
addProseMirrorPlugins() {
|
|
480
489
|
return [
|
|
481
|
-
|
|
490
|
+
ot({ type: this.type })
|
|
482
491
|
];
|
|
483
492
|
}
|
|
484
|
-
}),
|
|
493
|
+
}), ct = Te.extend({
|
|
485
494
|
name: "ConfigurableImage",
|
|
486
495
|
addAttributes() {
|
|
487
496
|
return {
|
|
@@ -505,18 +514,18 @@ const at = {
|
|
|
505
514
|
}
|
|
506
515
|
};
|
|
507
516
|
}
|
|
508
|
-
}).configure({ inline: !0, allowBase64: !0 }),
|
|
517
|
+
}).configure({ inline: !0, allowBase64: !0 }), dt = j.extend({
|
|
509
518
|
parseHTML() {
|
|
510
519
|
return [{ tag: "div" }];
|
|
511
520
|
},
|
|
512
|
-
renderHTML({ HTMLAttributes:
|
|
513
|
-
return ["div", m(this.options.HTMLAttributes,
|
|
521
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
522
|
+
return ["div", m(this.options.HTMLAttributes, t), 0];
|
|
514
523
|
}
|
|
515
524
|
}), ut = {
|
|
516
525
|
name: "MentionComponent",
|
|
517
526
|
components: {
|
|
518
527
|
NodeViewWrapper: _,
|
|
519
|
-
DtLink:
|
|
528
|
+
DtLink: D
|
|
520
529
|
},
|
|
521
530
|
props: y,
|
|
522
531
|
computed: {
|
|
@@ -526,16 +535,19 @@ const at = {
|
|
|
526
535
|
}
|
|
527
536
|
};
|
|
528
537
|
var mt = function() {
|
|
529
|
-
var
|
|
530
|
-
return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [r("dt-link", { attrs: { kind: "mention" } }, [
|
|
531
|
-
}, ht = [], ft = /* @__PURE__ */
|
|
538
|
+
var e = this, r = e._self._c;
|
|
539
|
+
return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [r("dt-link", { attrs: { kind: "mention" } }, [e._v(" " + e._s(e.text) + " ")])], 1);
|
|
540
|
+
}, ht = [], ft = /* @__PURE__ */ c(
|
|
532
541
|
ut,
|
|
533
542
|
mt,
|
|
534
|
-
ht
|
|
543
|
+
ht,
|
|
544
|
+
!1,
|
|
545
|
+
null,
|
|
546
|
+
null
|
|
535
547
|
);
|
|
536
548
|
const pt = ft.exports, gt = $.extend({
|
|
537
549
|
addNodeView() {
|
|
538
|
-
return
|
|
550
|
+
return b(pt);
|
|
539
551
|
},
|
|
540
552
|
parseHTML() {
|
|
541
553
|
return [
|
|
@@ -557,11 +569,11 @@ const pt = ft.exports, gt = $.extend({
|
|
|
557
569
|
}
|
|
558
570
|
};
|
|
559
571
|
},
|
|
560
|
-
renderText({ node:
|
|
561
|
-
return `@${
|
|
572
|
+
renderText({ node: t }) {
|
|
573
|
+
return `@${t.attrs.id}`;
|
|
562
574
|
},
|
|
563
|
-
renderHTML({ HTMLAttributes:
|
|
564
|
-
return ["mention-component", m(this.options.HTMLAttributes,
|
|
575
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
576
|
+
return ["mention-component", m(this.options.HTMLAttributes, t)];
|
|
565
577
|
}
|
|
566
578
|
}).configure({
|
|
567
579
|
suggestion: {
|
|
@@ -572,7 +584,7 @@ const pt = ft.exports, gt = $.extend({
|
|
|
572
584
|
name: "ChannelComponent",
|
|
573
585
|
components: {
|
|
574
586
|
NodeViewWrapper: _,
|
|
575
|
-
DtLink:
|
|
587
|
+
DtLink: D
|
|
576
588
|
},
|
|
577
589
|
props: y,
|
|
578
590
|
computed: {
|
|
@@ -582,17 +594,20 @@ const pt = ft.exports, gt = $.extend({
|
|
|
582
594
|
}
|
|
583
595
|
};
|
|
584
596
|
var yt = function() {
|
|
585
|
-
var
|
|
586
|
-
return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [r("dt-link", { attrs: { kind: "mention" } }, [
|
|
587
|
-
},
|
|
597
|
+
var e = this, r = e._self._c;
|
|
598
|
+
return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [r("dt-link", { attrs: { kind: "mention" } }, [e._v(" " + e._s(e.text) + " ")])], 1);
|
|
599
|
+
}, wt = [], bt = /* @__PURE__ */ c(
|
|
588
600
|
_t,
|
|
589
601
|
yt,
|
|
590
|
-
|
|
602
|
+
wt,
|
|
603
|
+
!1,
|
|
604
|
+
null,
|
|
605
|
+
null
|
|
591
606
|
);
|
|
592
|
-
const vt =
|
|
607
|
+
const vt = bt.exports, xt = $.extend({
|
|
593
608
|
name: "channel",
|
|
594
609
|
addNodeView() {
|
|
595
|
-
return
|
|
610
|
+
return b(vt);
|
|
596
611
|
},
|
|
597
612
|
parseHTML() {
|
|
598
613
|
return [
|
|
@@ -614,18 +629,18 @@ const vt = wt.exports, xt = $.extend({
|
|
|
614
629
|
}
|
|
615
630
|
};
|
|
616
631
|
},
|
|
617
|
-
renderText({ node:
|
|
618
|
-
return `#${
|
|
632
|
+
renderText({ node: t }) {
|
|
633
|
+
return `#${t.attrs.id}`;
|
|
619
634
|
},
|
|
620
|
-
renderHTML({ HTMLAttributes:
|
|
621
|
-
return ["channel-component", m(this.options.HTMLAttributes,
|
|
635
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
636
|
+
return ["channel-component", m(this.options.HTMLAttributes, t)];
|
|
622
637
|
}
|
|
623
638
|
}).configure({
|
|
624
639
|
suggestion: {
|
|
625
640
|
char: "#",
|
|
626
641
|
pluginKey: new f("channelSuggestion")
|
|
627
642
|
}
|
|
628
|
-
}),
|
|
643
|
+
}), Ct = {
|
|
629
644
|
name: "SlashCommandsComponent",
|
|
630
645
|
components: {
|
|
631
646
|
NodeViewWrapper: _
|
|
@@ -641,15 +656,18 @@ const vt = wt.exports, xt = $.extend({
|
|
|
641
656
|
this.$parent.$emit("selected-command", this.$props.node.attrs.command);
|
|
642
657
|
}
|
|
643
658
|
};
|
|
644
|
-
var
|
|
645
|
-
var
|
|
646
|
-
return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [
|
|
647
|
-
}, St = [],
|
|
648
|
-
kt,
|
|
659
|
+
var kt = function() {
|
|
660
|
+
var e = this, r = e._self._c;
|
|
661
|
+
return r("node-view-wrapper", { staticClass: "d-d-inline-block" }, [e._v(" " + e._s(e.text) + " ")]);
|
|
662
|
+
}, St = [], Tt = /* @__PURE__ */ c(
|
|
649
663
|
Ct,
|
|
650
|
-
|
|
664
|
+
kt,
|
|
665
|
+
St,
|
|
666
|
+
!1,
|
|
667
|
+
null,
|
|
668
|
+
null
|
|
651
669
|
);
|
|
652
|
-
const
|
|
670
|
+
const Rt = Tt.exports, Et = (t, e) => [...t.matchAll(e)].map((n) => {
|
|
653
671
|
let i = n[2];
|
|
654
672
|
return i.endsWith(" ") || (i += " "), {
|
|
655
673
|
index: n.index,
|
|
@@ -661,7 +679,7 @@ const Tt = Rt.exports, Et = (e, t) => [...e.matchAll(t)].map((n) => {
|
|
|
661
679
|
group: "inline",
|
|
662
680
|
inline: !0,
|
|
663
681
|
addNodeView() {
|
|
664
|
-
return
|
|
682
|
+
return b(Rt);
|
|
665
683
|
},
|
|
666
684
|
parseHTML() {
|
|
667
685
|
return [
|
|
@@ -683,18 +701,18 @@ const Tt = Rt.exports, Et = (e, t) => [...e.matchAll(t)].map((n) => {
|
|
|
683
701
|
}
|
|
684
702
|
};
|
|
685
703
|
},
|
|
686
|
-
renderText({ node:
|
|
687
|
-
return `/${
|
|
704
|
+
renderText({ node: t }) {
|
|
705
|
+
return `/${t.attrs.command}`;
|
|
688
706
|
},
|
|
689
|
-
renderHTML({ HTMLAttributes:
|
|
690
|
-
return ["command-component", m(this.options.HTMLAttributes,
|
|
707
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
708
|
+
return ["command-component", m(this.options.HTMLAttributes, t)];
|
|
691
709
|
},
|
|
692
710
|
addInputRules() {
|
|
693
711
|
var r;
|
|
694
|
-
const
|
|
712
|
+
const t = (r = this.options.suggestion) == null ? void 0 : r.items({ query: "" }).map((n) => n.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) $`);
|
|
695
713
|
return [
|
|
696
714
|
X({
|
|
697
|
-
find:
|
|
715
|
+
find: e,
|
|
698
716
|
type: this.type,
|
|
699
717
|
getAttributes(n) {
|
|
700
718
|
return { command: n[2] };
|
|
@@ -704,10 +722,10 @@ const Tt = Rt.exports, Et = (e, t) => [...e.matchAll(t)].map((n) => {
|
|
|
704
722
|
},
|
|
705
723
|
addPasteRules() {
|
|
706
724
|
var r;
|
|
707
|
-
const
|
|
725
|
+
const t = (r = this.options.suggestion) == null ? void 0 : r.items({ query: "" }).map((n) => n.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) ?$`, "g");
|
|
708
726
|
return [
|
|
709
|
-
|
|
710
|
-
find: (n) => Et(n,
|
|
727
|
+
T({
|
|
728
|
+
find: (n) => Et(n, e),
|
|
711
729
|
type: this.type,
|
|
712
730
|
getAttributes(n) {
|
|
713
731
|
return { command: n[0].trim() };
|
|
@@ -738,16 +756,39 @@ const Tt = Rt.exports, Et = (e, t) => [...e.matchAll(t)].map((n) => {
|
|
|
738
756
|
},
|
|
739
757
|
avatarSrc() {
|
|
740
758
|
return this.item.avatarSrc;
|
|
759
|
+
},
|
|
760
|
+
presence() {
|
|
761
|
+
return this.item.presence;
|
|
762
|
+
},
|
|
763
|
+
status() {
|
|
764
|
+
return this.item.status;
|
|
765
|
+
},
|
|
766
|
+
presenceText() {
|
|
767
|
+
return this.item.presenceText;
|
|
768
|
+
},
|
|
769
|
+
presenceFontColorClass() {
|
|
770
|
+
return {
|
|
771
|
+
active: "d-recipe-contact-row--active",
|
|
772
|
+
busy: "d-recipe-contact-row--busy",
|
|
773
|
+
away: "d-recipe-contact-row--away",
|
|
774
|
+
offline: "d-recipe-contact-row--busy"
|
|
775
|
+
}[this.presence];
|
|
776
|
+
},
|
|
777
|
+
showDetails() {
|
|
778
|
+
return this.item.showDetails;
|
|
741
779
|
}
|
|
742
780
|
}
|
|
743
781
|
};
|
|
744
782
|
var It = function() {
|
|
745
|
-
var
|
|
746
|
-
return r("dt-stack", { attrs: { direction: "row", gap: "400" } }, [r("dt-avatar", { attrs: { "full-name":
|
|
747
|
-
}, At = [], jt = /* @__PURE__ */
|
|
783
|
+
var e = this, r = e._self._c;
|
|
784
|
+
return r("dt-stack", { staticClass: "d-mention-suggestion__container", attrs: { direction: "row", gap: "400" } }, [r("dt-avatar", { attrs: { "full-name": e.name, "image-src": e.avatarSrc, "image-alt": e.name, "show-presence": e.showDetails, presence: e.presence, size: "sm" } }), r("dt-stack", { staticClass: "d-mention-suggestion__details-container", attrs: { gap: "100" } }, [r("span", { staticClass: "d-mention-suggestion__name" }, [e._v(" " + e._s(e.name) + " ")]), e.showDetails ? r("dt-stack", { staticClass: "d-label--sm-plain", attrs: { direction: "row", gap: "300" } }, [e.presenceText ? r("span", { staticClass: "d-mention-suggestion__presence", class: [e.presenceFontColorClass] }, [e._v(" " + e._s(e.presenceText) + " ")]) : e._e(), e.status && e.presenceText ? r("div", { staticClass: "d-mention-suggestion__divider" }, [e._v(" • ")]) : e._e(), e.status ? r("div", { staticClass: "d-mention-suggestion__status" }, [e._v(" " + e._s(e.status) + " ")]) : e._e()]) : e._e()], 1)], 1);
|
|
785
|
+
}, At = [], jt = /* @__PURE__ */ c(
|
|
748
786
|
Lt,
|
|
749
787
|
It,
|
|
750
|
-
At
|
|
788
|
+
At,
|
|
789
|
+
!1,
|
|
790
|
+
null,
|
|
791
|
+
"b080cd76"
|
|
751
792
|
);
|
|
752
793
|
const Mt = jt.exports, Ot = {
|
|
753
794
|
// This function comes from the user and passed to the editor directly.
|
|
@@ -755,10 +796,10 @@ const Mt = jt.exports, Ot = {
|
|
|
755
796
|
// items: ({ query }) => { return [] },
|
|
756
797
|
allowSpaces: !0,
|
|
757
798
|
render: () => {
|
|
758
|
-
let
|
|
799
|
+
let t, e, r = !1;
|
|
759
800
|
return {
|
|
760
801
|
onStart: (n) => {
|
|
761
|
-
|
|
802
|
+
t = new w(C, {
|
|
762
803
|
parent: void 0,
|
|
763
804
|
propsData: {
|
|
764
805
|
itemComponent: Mt,
|
|
@@ -766,10 +807,10 @@ const Mt = jt.exports, Ot = {
|
|
|
766
807
|
...n
|
|
767
808
|
},
|
|
768
809
|
editor: n.editor
|
|
769
|
-
}), n.clientRect && (
|
|
810
|
+
}), n.clientRect && (e = x("body", {
|
|
770
811
|
getReferenceClientRect: n.clientRect,
|
|
771
812
|
appendTo: () => document.body,
|
|
772
|
-
content:
|
|
813
|
+
content: t.element,
|
|
773
814
|
showOnCreate: !1,
|
|
774
815
|
onShow: () => {
|
|
775
816
|
r = !0;
|
|
@@ -781,25 +822,25 @@ const Mt = jt.exports, Ot = {
|
|
|
781
822
|
trigger: "manual",
|
|
782
823
|
placement: "top-start",
|
|
783
824
|
zIndex: 650,
|
|
784
|
-
plugins: [
|
|
785
|
-
}), n.items.length > 0 && (
|
|
825
|
+
plugins: [k]
|
|
826
|
+
}), n.items.length > 0 && (e == null || e[0].show()));
|
|
786
827
|
},
|
|
787
828
|
onUpdate(n) {
|
|
788
|
-
|
|
829
|
+
t == null || t.updateProps(n), n.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), n.clientRect && (e == null || e[0].setProps({
|
|
789
830
|
getReferenceClientRect: n.clientRect
|
|
790
831
|
}));
|
|
791
832
|
},
|
|
792
833
|
onKeyDown(n) {
|
|
793
834
|
var i;
|
|
794
835
|
if (r)
|
|
795
|
-
return (i =
|
|
836
|
+
return (i = t == null ? void 0 : t.ref) == null ? void 0 : i.onKeyDown(n);
|
|
796
837
|
},
|
|
797
838
|
onExit() {
|
|
798
|
-
|
|
839
|
+
e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
|
|
799
840
|
}
|
|
800
841
|
};
|
|
801
842
|
}
|
|
802
|
-
},
|
|
843
|
+
}, Dt = {
|
|
803
844
|
name: "ChannelSuggestion",
|
|
804
845
|
components: {
|
|
805
846
|
DtStack: v,
|
|
@@ -818,13 +859,16 @@ const Mt = jt.exports, Ot = {
|
|
|
818
859
|
}
|
|
819
860
|
}
|
|
820
861
|
};
|
|
821
|
-
var
|
|
822
|
-
var
|
|
823
|
-
return r("dt-stack", { attrs: { direction: "row", gap: "400" } }, [
|
|
824
|
-
}, Pt = [], Ht = /* @__PURE__ */
|
|
825
|
-
Bt,
|
|
862
|
+
var Bt = function() {
|
|
863
|
+
var e = this, r = e._self._c;
|
|
864
|
+
return r("dt-stack", { attrs: { direction: "row", gap: "400" } }, [e.item.locked ? r("dt-icon-lock", { attrs: { size: "300" } }) : r("dt-icon-hash", { attrs: { size: "300" } }), r("span", [e._v(e._s(e.name))])], 1);
|
|
865
|
+
}, Pt = [], Ht = /* @__PURE__ */ c(
|
|
826
866
|
Dt,
|
|
827
|
-
|
|
867
|
+
Bt,
|
|
868
|
+
Pt,
|
|
869
|
+
!1,
|
|
870
|
+
null,
|
|
871
|
+
null
|
|
828
872
|
);
|
|
829
873
|
const Ft = Ht.exports, qt = {
|
|
830
874
|
// This function comes from the user and passed to the editor directly.
|
|
@@ -832,10 +876,10 @@ const Ft = Ht.exports, qt = {
|
|
|
832
876
|
// items: ({ query }) => { return [] },
|
|
833
877
|
allowSpaces: !0,
|
|
834
878
|
render: () => {
|
|
835
|
-
let
|
|
879
|
+
let t, e, r = !1;
|
|
836
880
|
return {
|
|
837
881
|
onStart: (n) => {
|
|
838
|
-
|
|
882
|
+
t = new w(C, {
|
|
839
883
|
parent: void 0,
|
|
840
884
|
propsData: {
|
|
841
885
|
itemComponent: Ft,
|
|
@@ -843,10 +887,10 @@ const Ft = Ht.exports, qt = {
|
|
|
843
887
|
...n
|
|
844
888
|
},
|
|
845
889
|
editor: n.editor
|
|
846
|
-
}), n.clientRect && (
|
|
890
|
+
}), n.clientRect && (e = x("body", {
|
|
847
891
|
getReferenceClientRect: n.clientRect,
|
|
848
892
|
appendTo: () => document.body,
|
|
849
|
-
content:
|
|
893
|
+
content: t.element,
|
|
850
894
|
showOnCreate: !1,
|
|
851
895
|
onShow: () => {
|
|
852
896
|
r = !0;
|
|
@@ -858,21 +902,21 @@ const Ft = Ht.exports, qt = {
|
|
|
858
902
|
trigger: "manual",
|
|
859
903
|
placement: "top-start",
|
|
860
904
|
zIndex: 650,
|
|
861
|
-
plugins: [
|
|
862
|
-
}), n.items.length > 0 && (
|
|
905
|
+
plugins: [k]
|
|
906
|
+
}), n.items.length > 0 && (e == null || e[0].show()));
|
|
863
907
|
},
|
|
864
908
|
onUpdate(n) {
|
|
865
|
-
|
|
909
|
+
t == null || t.updateProps(n), n.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), n.clientRect && (e == null || e[0].setProps({
|
|
866
910
|
getReferenceClientRect: n.clientRect
|
|
867
911
|
}));
|
|
868
912
|
},
|
|
869
913
|
onKeyDown(n) {
|
|
870
914
|
var i;
|
|
871
915
|
if (r)
|
|
872
|
-
return (i =
|
|
916
|
+
return (i = t == null ? void 0 : t.ref) == null ? void 0 : i.onKeyDown(n);
|
|
873
917
|
},
|
|
874
918
|
onExit() {
|
|
875
|
-
|
|
919
|
+
e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
|
|
876
920
|
}
|
|
877
921
|
};
|
|
878
922
|
}
|
|
@@ -897,12 +941,15 @@ const Ft = Ht.exports, qt = {
|
|
|
897
941
|
}
|
|
898
942
|
};
|
|
899
943
|
var Ut = function() {
|
|
900
|
-
var
|
|
901
|
-
return r("div", [r("div", { staticClass: "d-body--md-compact" }, [r("span", [
|
|
902
|
-
}, Nt = [], Vt = /* @__PURE__ */
|
|
944
|
+
var e = this, r = e._self._c;
|
|
945
|
+
return r("div", [r("div", { staticClass: "d-body--md-compact" }, [r("span", [e._v("/" + e._s(e.command))]), e.parametersExample ? r("span", [e._v(" " + e._s(e.parametersExample))]) : e._e()]), r("div", { staticClass: "d-body--sm d-fc-tertiary" }, [e._v(" " + e._s(e.description) + " ")])]);
|
|
946
|
+
}, Nt = [], Vt = /* @__PURE__ */ c(
|
|
903
947
|
Kt,
|
|
904
948
|
Ut,
|
|
905
|
-
Nt
|
|
949
|
+
Nt,
|
|
950
|
+
!1,
|
|
951
|
+
null,
|
|
952
|
+
null
|
|
906
953
|
);
|
|
907
954
|
const zt = Vt.exports, Wt = {
|
|
908
955
|
// This function comes from the user and passed to the editor directly.
|
|
@@ -911,10 +958,10 @@ const zt = Vt.exports, Wt = {
|
|
|
911
958
|
allowSpaces: !0,
|
|
912
959
|
startOfLine: !0,
|
|
913
960
|
render: () => {
|
|
914
|
-
let
|
|
961
|
+
let t, e, r = !1;
|
|
915
962
|
return {
|
|
916
963
|
onStart: (n) => {
|
|
917
|
-
|
|
964
|
+
t = new w(C, {
|
|
918
965
|
parent: void 0,
|
|
919
966
|
propsData: {
|
|
920
967
|
itemComponent: zt,
|
|
@@ -922,10 +969,10 @@ const zt = Vt.exports, Wt = {
|
|
|
922
969
|
...n
|
|
923
970
|
},
|
|
924
971
|
editor: n.editor
|
|
925
|
-
}), n.clientRect && (
|
|
972
|
+
}), n.clientRect && (e = x("body", {
|
|
926
973
|
getReferenceClientRect: n.clientRect,
|
|
927
974
|
appendTo: () => document.body,
|
|
928
|
-
content:
|
|
975
|
+
content: t.element,
|
|
929
976
|
showOnCreate: !1,
|
|
930
977
|
onShow: () => {
|
|
931
978
|
r = !0;
|
|
@@ -937,21 +984,21 @@ const zt = Vt.exports, Wt = {
|
|
|
937
984
|
trigger: "manual",
|
|
938
985
|
placement: "top-start",
|
|
939
986
|
zIndex: 650,
|
|
940
|
-
plugins: [
|
|
941
|
-
}), n.items.length > 0 && (
|
|
987
|
+
plugins: [k]
|
|
988
|
+
}), n.items.length > 0 && (e == null || e[0].show()));
|
|
942
989
|
},
|
|
943
990
|
onUpdate(n) {
|
|
944
|
-
|
|
991
|
+
t == null || t.updateProps(n), n.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), n.clientRect && (e == null || e[0].setProps({
|
|
945
992
|
getReferenceClientRect: n.clientRect
|
|
946
993
|
}));
|
|
947
994
|
},
|
|
948
995
|
onKeyDown(n) {
|
|
949
996
|
var i;
|
|
950
997
|
if (r)
|
|
951
|
-
return (i =
|
|
998
|
+
return (i = t == null ? void 0 : t.ref) == null ? void 0 : i.onKeyDown(n);
|
|
952
999
|
},
|
|
953
1000
|
onExit() {
|
|
954
|
-
|
|
1001
|
+
e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
|
|
955
1002
|
}
|
|
956
1003
|
};
|
|
957
1004
|
}
|
|
@@ -1024,8 +1071,8 @@ const zt = Vt.exports, Wt = {
|
|
|
1024
1071
|
autoFocus: {
|
|
1025
1072
|
type: [Boolean, String, Number],
|
|
1026
1073
|
default: !1,
|
|
1027
|
-
validator(
|
|
1028
|
-
return typeof
|
|
1074
|
+
validator(t) {
|
|
1075
|
+
return typeof t == "string" ? Re.includes(t) : !0;
|
|
1029
1076
|
}
|
|
1030
1077
|
},
|
|
1031
1078
|
/**
|
|
@@ -1037,8 +1084,8 @@ const zt = Vt.exports, Wt = {
|
|
|
1037
1084
|
outputFormat: {
|
|
1038
1085
|
type: String,
|
|
1039
1086
|
default: "html",
|
|
1040
|
-
validator(
|
|
1041
|
-
return Ee.includes(
|
|
1087
|
+
validator(t) {
|
|
1088
|
+
return Ee.includes(t);
|
|
1042
1089
|
}
|
|
1043
1090
|
},
|
|
1044
1091
|
/**
|
|
@@ -1290,8 +1337,8 @@ const zt = Vt.exports, Wt = {
|
|
|
1290
1337
|
editor: null,
|
|
1291
1338
|
tippyOptions: {
|
|
1292
1339
|
appendTo: () => {
|
|
1293
|
-
var
|
|
1294
|
-
return (
|
|
1340
|
+
var t;
|
|
1341
|
+
return (t = this.$refs.editor.$el.getRootNode()) == null ? void 0 : t.querySelector("body");
|
|
1295
1342
|
},
|
|
1296
1343
|
placement: "top-start"
|
|
1297
1344
|
}
|
|
@@ -1311,51 +1358,50 @@ const zt = Vt.exports, Wt = {
|
|
|
1311
1358
|
},
|
|
1312
1359
|
// eslint-disable-next-line complexity
|
|
1313
1360
|
extensions() {
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1361
|
+
const t = [Z, de, me, te];
|
|
1362
|
+
t.push(this.useDivTags ? dt : j), this.allowBlockquote && t.push(Y), this.allowBold && t.push(ne), this.allowBulletList && (t.push(re), t.push(oe.extend({
|
|
1316
1363
|
renderText({ node: n }) {
|
|
1317
1364
|
return n.textContent;
|
|
1318
1365
|
}
|
|
1319
|
-
})),
|
|
1366
|
+
})), t.push(ae)), this.allowItalic && t.push(ie), this.allowStrike && t.push(le), this.allowUnderline && t.push(ce), this.placeholder && t.push(
|
|
1320
1367
|
ee.configure({ placeholder: this.placeholder })
|
|
1321
1368
|
);
|
|
1322
|
-
const
|
|
1369
|
+
const e = this, r = J.create({
|
|
1323
1370
|
addKeyboardShortcuts() {
|
|
1324
1371
|
return {
|
|
1325
|
-
"Shift-Enter": ({ editor: n }) =>
|
|
1372
|
+
"Shift-Enter": ({ editor: n }) => e.allowLineBreaks ? !1 : (n.commands.first(({ commands: i }) => [
|
|
1326
1373
|
() => i.newlineInCode(),
|
|
1327
|
-
() =>
|
|
1374
|
+
() => e.allowBulletList && i.splitListItem("listItem"),
|
|
1328
1375
|
() => i.createParagraphNear(),
|
|
1329
1376
|
() => i.liftEmptyBlock(),
|
|
1330
1377
|
() => i.splitBlock()
|
|
1331
1378
|
]), !0),
|
|
1332
|
-
Enter: () =>
|
|
1379
|
+
Enter: () => e.allowLineBreaks ? !1 : (e.$emit("enter"), !0)
|
|
1333
1380
|
};
|
|
1334
1381
|
}
|
|
1335
1382
|
});
|
|
1336
|
-
if (
|
|
1383
|
+
if (t.push(r), this.link && t.push(se.extend({ inclusive: !1 }).configure({
|
|
1337
1384
|
HTMLAttributes: {
|
|
1338
1385
|
class: "d-link d-wb-break-all"
|
|
1339
1386
|
},
|
|
1340
1387
|
openOnClick: !1,
|
|
1341
1388
|
autolink: !0,
|
|
1342
1389
|
protocols: L
|
|
1343
|
-
})), this.customLink &&
|
|
1390
|
+
})), this.customLink && t.push(this.getExtension(lt, this.customLink)), this.mentionSuggestion) {
|
|
1344
1391
|
const n = { ...this.mentionSuggestion, ...Ot };
|
|
1345
|
-
|
|
1392
|
+
t.push(gt.configure({ suggestion: n }));
|
|
1346
1393
|
}
|
|
1347
1394
|
if (this.channelSuggestion) {
|
|
1348
1395
|
const n = { ...this.channelSuggestion, ...qt };
|
|
1349
|
-
|
|
1396
|
+
t.push(xt.configure({ suggestion: n }));
|
|
1350
1397
|
}
|
|
1351
1398
|
if (this.slashCommandSuggestion) {
|
|
1352
1399
|
const n = { ...this.slashCommandSuggestion, ...Wt };
|
|
1353
|
-
|
|
1400
|
+
t.push($t.configure({ suggestion: n }));
|
|
1354
1401
|
}
|
|
1355
|
-
return
|
|
1356
|
-
types: ["paragraph"]
|
|
1357
|
-
|
|
1358
|
-
})), this.allowCode && e.push(Q), this.allowCodeblock && e.push(G.extend({
|
|
1402
|
+
return t.push(et), t.push(ue.configure({
|
|
1403
|
+
types: ["paragraph"]
|
|
1404
|
+
})), this.allowCode && t.push(Q), this.allowCodeblock && t.push(G.extend({
|
|
1359
1405
|
renderText({ node: n }) {
|
|
1360
1406
|
return `\`\`\`
|
|
1361
1407
|
${n.textContent}
|
|
@@ -1365,15 +1411,15 @@ ${n.textContent}
|
|
|
1365
1411
|
HTMLAttributes: {
|
|
1366
1412
|
class: "d-rich-text-editor__code-block"
|
|
1367
1413
|
}
|
|
1368
|
-
})), this.allowInlineImages &&
|
|
1414
|
+
})), this.allowInlineImages && t.push(ct), (this.allowFontFamily || this.allowFontColor) && (t.push(he), this.allowFontColor && t.push(fe), this.allowFontFamily && t.push(pe)), this.additionalExtensions.length && t.push(...this.additionalExtensions), t;
|
|
1369
1415
|
},
|
|
1370
1416
|
inputAttrs() {
|
|
1371
|
-
const
|
|
1417
|
+
const t = {
|
|
1372
1418
|
"aria-label": this.inputAriaLabel,
|
|
1373
1419
|
"aria-multiline": !0,
|
|
1374
1420
|
role: "textbox"
|
|
1375
1421
|
};
|
|
1376
|
-
return this.editable || (
|
|
1422
|
+
return this.editable || (t["aria-readonly"] = !0), t;
|
|
1377
1423
|
}
|
|
1378
1424
|
},
|
|
1379
1425
|
/**
|
|
@@ -1382,20 +1428,20 @@ ${n.textContent}
|
|
|
1382
1428
|
* to be hooked up to the Editor's own API.
|
|
1383
1429
|
*/
|
|
1384
1430
|
watch: {
|
|
1385
|
-
editable(
|
|
1386
|
-
this.editor.setEditable(
|
|
1431
|
+
editable(t) {
|
|
1432
|
+
this.editor.setEditable(t), this.updateEditorAttributes({ "aria-readonly": !t });
|
|
1387
1433
|
},
|
|
1388
|
-
inputClass(
|
|
1389
|
-
this.updateEditorAttributes({ class:
|
|
1434
|
+
inputClass(t) {
|
|
1435
|
+
this.updateEditorAttributes({ class: t });
|
|
1390
1436
|
},
|
|
1391
|
-
inputAriaLabel(
|
|
1392
|
-
this.updateEditorAttributes({ "aria-label":
|
|
1437
|
+
inputAriaLabel(t) {
|
|
1438
|
+
this.updateEditorAttributes({ "aria-label": t });
|
|
1393
1439
|
},
|
|
1394
1440
|
extensions() {
|
|
1395
1441
|
this.destroyEditor(), this.createEditor();
|
|
1396
1442
|
},
|
|
1397
|
-
value(
|
|
1398
|
-
this.processValue(
|
|
1443
|
+
value(t) {
|
|
1444
|
+
this.processValue(t);
|
|
1399
1445
|
}
|
|
1400
1446
|
},
|
|
1401
1447
|
created() {
|
|
@@ -1419,13 +1465,13 @@ ${n.textContent}
|
|
|
1419
1465
|
...this.inputAttrs,
|
|
1420
1466
|
class: this.inputClass
|
|
1421
1467
|
},
|
|
1422
|
-
handlePaste: (
|
|
1468
|
+
handlePaste: (t, e) => {
|
|
1423
1469
|
if (!this.link && !this.customLink) {
|
|
1424
1470
|
const r = /^https?:\/\//;
|
|
1425
|
-
if (!(
|
|
1471
|
+
if (!(e != null && e.clipboardData))
|
|
1426
1472
|
return !1;
|
|
1427
|
-
const n =
|
|
1428
|
-
if (!r.test(n) || !
|
|
1473
|
+
const n = e.clipboardData.getData("text");
|
|
1474
|
+
if (!r.test(n) || !e.clipboardData.getData("text/html"))
|
|
1429
1475
|
return !1;
|
|
1430
1476
|
const i = n.replace(/\n/g, "<br>").replace(/ {2}/g, " ");
|
|
1431
1477
|
return this.editor.chain().focus().insertContent(i).run(), !0;
|
|
@@ -1434,72 +1480,72 @@ ${n.textContent}
|
|
|
1434
1480
|
},
|
|
1435
1481
|
// Moves the <br /> tags inside the previous closing tag to avoid
|
|
1436
1482
|
// Prosemirror wrapping them within another </p> tag.
|
|
1437
|
-
transformPastedHTML(
|
|
1438
|
-
return
|
|
1483
|
+
transformPastedHTML(t) {
|
|
1484
|
+
return t.replace(/(<\/\w+>)((<br \/>)+)/g, "$2$3$1");
|
|
1439
1485
|
}
|
|
1440
1486
|
}
|
|
1441
1487
|
}), this.addEditorListeners();
|
|
1442
1488
|
},
|
|
1443
|
-
bubbleMenuShouldShow({ editor:
|
|
1444
|
-
return
|
|
1489
|
+
bubbleMenuShouldShow({ editor: t, view: e, state: r, oldState: n, from: i, to: o }) {
|
|
1490
|
+
return t.isActive("link");
|
|
1445
1491
|
},
|
|
1446
1492
|
/**
|
|
1447
1493
|
* If the selection contains a link, return the existing link text.
|
|
1448
1494
|
* Otherwise, use just the selected text.
|
|
1449
1495
|
* @param editor the editor instance.
|
|
1450
1496
|
*/
|
|
1451
|
-
getSelectedLinkText(
|
|
1452
|
-
var a, l,
|
|
1453
|
-
const { view:
|
|
1454
|
-
return
|
|
1497
|
+
getSelectedLinkText(t) {
|
|
1498
|
+
var a, l, d;
|
|
1499
|
+
const { view: e, state: r } = t, { from: n, to: i } = e.state.selection, o = r.doc.textBetween(n, i, ""), s = this.editor.state.doc.nodeAt(n);
|
|
1500
|
+
return s && ((d = (l = (a = s.marks) == null ? void 0 : a.at(0)) == null ? void 0 : l.type) == null ? void 0 : d.name) === "link" ? s.textContent : o;
|
|
1455
1501
|
},
|
|
1456
1502
|
editLink() {
|
|
1457
|
-
const
|
|
1503
|
+
const t = this.getSelectedLinkText(this.editor), e = {
|
|
1458
1504
|
href: this.editor.getAttributes("link").href,
|
|
1459
|
-
text:
|
|
1505
|
+
text: t
|
|
1460
1506
|
};
|
|
1461
|
-
this.$emit("edit-link",
|
|
1507
|
+
this.$emit("edit-link", e);
|
|
1462
1508
|
},
|
|
1463
1509
|
removeLink() {
|
|
1464
|
-
var
|
|
1465
|
-
(n = (r = (
|
|
1510
|
+
var t, e, r, n;
|
|
1511
|
+
(n = (r = (e = (t = this.editor) == null ? void 0 : t.chain()) == null ? void 0 : e.focus()) == null ? void 0 : r.unsetLink()) == null || n.run();
|
|
1466
1512
|
},
|
|
1467
1513
|
openLink() {
|
|
1468
|
-
var
|
|
1469
|
-
(r = (
|
|
1470
|
-
const
|
|
1471
|
-
window.open(
|
|
1514
|
+
var e, r;
|
|
1515
|
+
(r = (e = this.editor) == null ? void 0 : e.chain()) == null || r.focus();
|
|
1516
|
+
const t = this.editor.getAttributes("link").href;
|
|
1517
|
+
window.open(t, "_blank");
|
|
1472
1518
|
},
|
|
1473
1519
|
// eslint-disable-next-line complexity
|
|
1474
|
-
setLink(
|
|
1475
|
-
var a, l,
|
|
1476
|
-
if (!
|
|
1520
|
+
setLink(t, e, r, n = L, i) {
|
|
1521
|
+
var a, l, d;
|
|
1522
|
+
if (!t) {
|
|
1477
1523
|
this.removeLink();
|
|
1478
1524
|
return;
|
|
1479
1525
|
}
|
|
1480
|
-
n.find((u) => u.test(
|
|
1481
|
-
const
|
|
1482
|
-
this.editor.chain().focus().insertContent(
|
|
1526
|
+
n.find((u) => u.test(t)) || (t = `${i}${t}`), this.editor.chain().focus().extendMarkRange("link").run();
|
|
1527
|
+
const s = (d = (l = (a = this.editor) == null ? void 0 : a.view) == null ? void 0 : l.state) == null ? void 0 : d.selection;
|
|
1528
|
+
this.editor.chain().focus().insertContent(e).setTextSelection({ from: s.from, to: s.from + e.length }).setLink({ href: t, class: r.class }).run();
|
|
1483
1529
|
},
|
|
1484
1530
|
// eslint-disable-next-line complexity
|
|
1485
|
-
processValue(
|
|
1531
|
+
processValue(t, e = !0) {
|
|
1486
1532
|
const r = this.getOutput();
|
|
1487
|
-
if (!(
|
|
1488
|
-
if (typeof
|
|
1533
|
+
if (!(e && Ae(t, r))) {
|
|
1534
|
+
if (typeof t == "string" && this.outputFormat === "text") {
|
|
1489
1535
|
const n = new RegExp(`(${M})`, "g");
|
|
1490
|
-
|
|
1536
|
+
t = t == null ? void 0 : t.replace(n, '<emoji-component code="$1"></emoji-component>');
|
|
1491
1537
|
}
|
|
1492
|
-
this.editor.commands.setContent(
|
|
1538
|
+
this.editor.commands.setContent(t, !1);
|
|
1493
1539
|
}
|
|
1494
1540
|
},
|
|
1495
1541
|
destroyEditor() {
|
|
1496
1542
|
this.editor.destroy();
|
|
1497
1543
|
},
|
|
1498
1544
|
triggerInputChangeEvents() {
|
|
1499
|
-
const
|
|
1500
|
-
this.$emit("input",
|
|
1501
|
-
const
|
|
1502
|
-
this.$emit("json-input",
|
|
1545
|
+
const t = this.getOutput();
|
|
1546
|
+
this.$emit("input", t), this.$emit("update:value", t);
|
|
1547
|
+
const e = this.editor.getJSON();
|
|
1548
|
+
this.$emit("json-input", e);
|
|
1503
1549
|
const r = this.editor.getHTML();
|
|
1504
1550
|
this.$emit("html-input", r);
|
|
1505
1551
|
const n = this.editor.getText({ blockSeparator: `
|
|
@@ -1514,18 +1560,18 @@ ${n.textContent}
|
|
|
1514
1560
|
this.editor.on("create", () => {
|
|
1515
1561
|
this.triggerInputChangeEvents();
|
|
1516
1562
|
}), this.editor.on("update", () => {
|
|
1517
|
-
var
|
|
1518
|
-
if (this.preventTyping && ((
|
|
1563
|
+
var t, e;
|
|
1564
|
+
if (this.preventTyping && ((e = (t = this.editor.view) == null ? void 0 : t.input) == null ? void 0 : e.lastKeyCode) !== 8) {
|
|
1519
1565
|
this.editor.commands.setContent(this.value, !1);
|
|
1520
1566
|
return;
|
|
1521
1567
|
}
|
|
1522
1568
|
this.triggerInputChangeEvents();
|
|
1523
|
-
}), this.editor.on("selectionUpdate", ({ editor:
|
|
1524
|
-
this.$emit("selected", this.getSelectedLinkText(
|
|
1525
|
-
}), this.editor.on("focus", ({ event:
|
|
1526
|
-
this.$emit("focus",
|
|
1527
|
-
}), this.editor.on("blur", ({ event:
|
|
1528
|
-
this.$emit("blur",
|
|
1569
|
+
}), this.editor.on("selectionUpdate", ({ editor: t }) => {
|
|
1570
|
+
this.$emit("selected", this.getSelectedLinkText(t));
|
|
1571
|
+
}), this.editor.on("focus", ({ event: t }) => {
|
|
1572
|
+
this.$emit("focus", t);
|
|
1573
|
+
}), this.editor.on("blur", ({ event: t }) => {
|
|
1574
|
+
this.$emit("blur", t);
|
|
1529
1575
|
});
|
|
1530
1576
|
},
|
|
1531
1577
|
getOutput() {
|
|
@@ -1540,17 +1586,17 @@ ${n.textContent}
|
|
|
1540
1586
|
` });
|
|
1541
1587
|
}
|
|
1542
1588
|
},
|
|
1543
|
-
getExtension(
|
|
1589
|
+
getExtension(t, e) {
|
|
1544
1590
|
var r;
|
|
1545
|
-
return typeof
|
|
1591
|
+
return typeof e == "boolean" ? t : (r = t.configure) == null ? void 0 : r.call(t, e);
|
|
1546
1592
|
},
|
|
1547
|
-
updateEditorAttributes(
|
|
1593
|
+
updateEditorAttributes(t) {
|
|
1548
1594
|
this.editor.setOptions({
|
|
1549
1595
|
editorProps: {
|
|
1550
1596
|
attributes: {
|
|
1551
1597
|
...this.inputAttrs,
|
|
1552
1598
|
class: this.inputClass,
|
|
1553
|
-
...
|
|
1599
|
+
...t
|
|
1554
1600
|
}
|
|
1555
1601
|
}
|
|
1556
1602
|
});
|
|
@@ -1561,12 +1607,15 @@ ${n.textContent}
|
|
|
1561
1607
|
}
|
|
1562
1608
|
};
|
|
1563
1609
|
var Jt = function() {
|
|
1564
|
-
var
|
|
1565
|
-
return r("div", [
|
|
1566
|
-
}, Yt = [], Gt = /* @__PURE__ */
|
|
1610
|
+
var e = this, r = e._self._c;
|
|
1611
|
+
return r("div", [e.editor && e.link && !e.hideLinkBubbleMenu ? r("bubble-menu", { staticStyle: { visibility: "visible" }, attrs: { editor: e.editor, "should-show": e.bubbleMenuShouldShow, "tippy-options": e.tippyOptions } }, [r("div", { staticClass: "d-popover__dialog" }, [r("dt-stack", { staticClass: "d-rich-text-editor-bubble-menu__button-stack", attrs: { direction: "row", gap: "0" } }, [r("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: e.editLink } }, [e._v(" Edit ")]), r("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: e.openLink } }, [e._v(" Open link ")]), r("dt-button", { attrs: { kind: "danger", importance: "clear" }, on: { click: e.removeLink } }, [e._v(" Remove ")])], 1)], 1)]) : e._e(), r("editor-content", e._g({ ref: "editor", staticClass: "d-rich-text-editor", attrs: { editor: e.editor, "data-qa": "dt-rich-text-editor" } }, e.editorListeners))], 1);
|
|
1612
|
+
}, Yt = [], Gt = /* @__PURE__ */ c(
|
|
1567
1613
|
Xt,
|
|
1568
1614
|
Jt,
|
|
1569
|
-
Yt
|
|
1615
|
+
Yt,
|
|
1616
|
+
!1,
|
|
1617
|
+
null,
|
|
1618
|
+
null
|
|
1570
1619
|
);
|
|
1571
1620
|
const Kn = Gt.exports;
|
|
1572
1621
|
export {
|