@dialpad/dialtone 9.124.0 → 9.126.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/README.md +9 -2
- package/dist/css/dialtone-default-theme.css +4 -0
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone.css +4 -0
- package/dist/css/dialtone.min.css +1 -1
- package/dist/tokens/doc.json +12021 -12021
- package/dist/vue2/common/mixins/index.cjs +1 -1
- package/dist/vue2/common/mixins/index.js +10 -10
- package/dist/vue2/common/mixins/localization.cjs +2 -0
- package/dist/vue2/common/mixins/localization.cjs.map +1 -0
- package/dist/vue2/common/mixins/localization.js +10 -0
- package/dist/vue2/common/mixins/localization.js.map +1 -0
- package/dist/vue2/common/utils/index.cjs +1 -1
- package/dist/vue2/common/utils/index.cjs.map +1 -1
- package/dist/vue2/common/utils/index.js +43 -39
- package/dist/vue2/common/utils/index.js.map +1 -1
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/dialtone-vue.cjs +1 -1
- package/dist/vue2/dialtone-vue.js +361 -358
- package/dist/vue2/dialtone-vue.js.map +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 +61 -86
- package/dist/vue2/lib/attachment-carousel/attachment-carousel.js.map +1 -1
- package/dist/vue2/lib/banner/banner.cjs +2 -2
- package/dist/vue2/lib/banner/banner.cjs.map +1 -1
- package/dist/vue2/lib/banner/banner.js +25 -33
- package/dist/vue2/lib/banner/banner.js.map +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
- package/dist/vue2/lib/breadcrumbs/breadcrumbs.js +14 -12
- 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.cjs.map +1 -1
- package/dist/vue2/lib/button/button.js +9 -7
- package/dist/vue2/lib/button/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.cjs.map +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +19 -25
- 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.cjs.map +1 -1
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +18 -21
- package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
- package/dist/vue2/lib/chip/chip.cjs +1 -1
- package/dist/vue2/lib/chip/chip.cjs.map +1 -1
- package/dist/vue2/lib/chip/chip.js +24 -29
- package/dist/vue2/lib/chip/chip.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox-constants.cjs +1 -1
- package/dist/vue2/lib/combobox/combobox-constants.cjs.map +1 -1
- package/dist/vue2/lib/combobox/combobox-constants.js +2 -2
- package/dist/vue2/lib/combobox/combobox-constants.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox-empty-list.cjs.map +1 -1
- package/dist/vue2/lib/combobox/combobox-empty-list.js.map +1 -1
- package/dist/vue2/lib/combobox/combobox-loading-list.cjs.map +1 -1
- 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.cjs.map +1 -1
- package/dist/vue2/lib/combobox/combobox.js +12 -12
- package/dist/vue2/lib/combobox/combobox.js.map +1 -1
- package/dist/vue2/lib/combobox/index.cjs +1 -1
- package/dist/vue2/lib/combobox/index.js +3 -3
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
- package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js +16 -18
- 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.cjs.map +1 -1
- package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js +22 -24
- 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.cjs.map +1 -1
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.js +40 -36
- package/dist/vue2/lib/contact-centers-row/contact-centers-row.js.map +1 -1
- package/dist/vue2/lib/contact-row/contact-row.cjs +1 -1
- package/dist/vue2/lib/contact-row/contact-row.cjs.map +1 -1
- package/dist/vue2/lib/contact-row/contact-row.js +11 -25
- package/dist/vue2/lib/contact-row/contact-row.js.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker-constants.cjs +1 -1
- package/dist/vue2/lib/datepicker/datepicker-constants.cjs.map +1 -1
- package/dist/vue2/lib/datepicker/datepicker-constants.js +2 -3
- package/dist/vue2/lib/datepicker/datepicker-constants.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 +143 -229
- package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
- package/dist/vue2/lib/datepicker/utils.cjs +1 -1
- package/dist/vue2/lib/datepicker/utils.cjs.map +1 -1
- package/dist/vue2/lib/datepicker/utils.js +12 -11
- package/dist/vue2/lib/datepicker/utils.js.map +1 -1
- package/dist/vue2/lib/description-list/description-list.cjs +1 -1
- package/dist/vue2/lib/description-list/description-list.cjs.map +1 -1
- package/dist/vue2/lib/description-list/description-list.js +8 -8
- package/dist/vue2/lib/description-list/description-list.js.map +1 -1
- package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
- package/dist/vue2/lib/dropdown/dropdown.cjs.map +1 -1
- package/dist/vue2/lib/dropdown/dropdown.js +48 -50
- 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.cjs.map +1 -1
- package/dist/vue2/lib/editor/editor.js +78 -87
- package/dist/vue2/lib/editor/editor.js.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
- package/dist/vue2/lib/emoji-picker/emoji-picker-constants.js +6 -19
- package/dist/vue2/lib/emoji-picker/emoji-picker-constants.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 +106 -145
- package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
- package/dist/vue2/lib/emoji-picker/index.cjs +1 -1
- package/dist/vue2/lib/emoji-picker/index.js +6 -7
- package/dist/vue2/lib/emoji-row/emoji-row-constants.cjs +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row-constants.js +5 -7
- package/dist/vue2/lib/emoji-row/emoji-row-constants.js.map +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.cjs.map +1 -1
- package/dist/vue2/lib/emoji-row/emoji-row.js +31 -22
- package/dist/vue2/lib/emoji-row/emoji-row.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.cjs.map +1 -1
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.js +20 -22
- package/dist/vue2/lib/feed-item-pill/feed-item-pill.js.map +1 -1
- package/dist/vue2/lib/general-row/general-row.cjs +1 -1
- package/dist/vue2/lib/general-row/general-row.cjs.map +1 -1
- package/dist/vue2/lib/general-row/general-row.js +63 -52
- package/dist/vue2/lib/general-row/general-row.js.map +1 -1
- package/dist/vue2/lib/group-row/group-row.cjs +1 -1
- package/dist/vue2/lib/group-row/group-row.cjs.map +1 -1
- package/dist/vue2/lib/group-row/group-row.js +43 -32
- package/dist/vue2/lib/group-row/group-row.js.map +1 -1
- package/dist/vue2/lib/icon/icon-constants.cjs.map +1 -1
- package/dist/vue2/lib/icon/icon-constants.js.map +1 -1
- package/dist/vue2/lib/icon/icon.cjs +1 -1
- package/dist/vue2/lib/icon/icon.cjs.map +1 -1
- package/dist/vue2/lib/icon/icon.js +12 -8
- package/dist/vue2/lib/icon/icon.js.map +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.cjs +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.cjs.map +1 -1
- package/dist/vue2/lib/image-viewer/image-viewer.js +30 -31
- package/dist/vue2/lib/image-viewer/image-viewer.js.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node-constants.cjs +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node-constants.js +24 -24
- package/dist/vue2/lib/ivr-node/ivr-node-constants.js.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.cjs +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.cjs.map +1 -1
- package/dist/vue2/lib/ivr-node/ivr-node.js +38 -36
- package/dist/vue2/lib/ivr-node/ivr-node.js.map +1 -1
- package/dist/vue2/lib/list-item/list-item.cjs +1 -1
- package/dist/vue2/lib/list-item/list-item.cjs.map +1 -1
- package/dist/vue2/lib/list-item/list-item.js +21 -11
- package/dist/vue2/lib/list-item/list-item.js.map +1 -1
- package/dist/vue2/lib/loader/index.cjs +2 -0
- package/dist/vue2/lib/loader/index.cjs.map +1 -0
- package/dist/vue2/lib/loader/index.js +5 -0
- package/dist/vue2/lib/loader/index.js.map +1 -0
- package/dist/vue2/lib/loader/loader.cjs +2 -0
- package/dist/vue2/lib/loader/loader.cjs.map +1 -0
- package/dist/vue2/lib/loader/loader.js +48 -0
- package/dist/vue2/lib/loader/loader.js.map +1 -0
- package/dist/vue2/lib/message-input/message-input-link.cjs +1 -1
- package/dist/vue2/lib/message-input/message-input-link.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input-link.js +48 -23
- 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.cjs.map +1 -1
- package/dist/vue2/lib/message-input/message-input-topbar.js +50 -22
- 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 +112 -143
- package/dist/vue2/lib/message-input/message-input.js.map +1 -1
- package/dist/vue2/lib/modal/modal.cjs +1 -2
- package/dist/vue2/lib/modal/modal.cjs.map +1 -1
- package/dist/vue2/lib/modal/modal.js +25 -42
- 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.cjs.map +1 -1
- package/dist/vue2/lib/notice/notice-action.js +19 -26
- package/dist/vue2/lib/notice/notice-action.js.map +1 -1
- package/dist/vue2/lib/notice/notice.cjs +1 -1
- package/dist/vue2/lib/notice/notice.cjs.map +1 -1
- package/dist/vue2/lib/notice/notice.js +18 -27
- 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.cjs.map +1 -1
- package/dist/vue2/lib/pagination/pagination.js +49 -58
- 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.cjs.map +1 -1
- package/dist/vue2/lib/popover/popover-header-footer.js +24 -26
- 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.cjs.map +1 -1
- package/dist/vue2/lib/popover/popover.js +26 -35
- package/dist/vue2/lib/popover/popover.js.map +1 -1
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +9 -5
- 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 +543 -475
- package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue2/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
- package/dist/vue2/lib/settings-menu-button/settings-menu-button.js.map +1 -1
- package/dist/vue2/lib/time-pill/time-pill.cjs.map +1 -1
- 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 +64 -97
- package/dist/vue2/lib/toast/toast.js.map +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.cjs +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.cjs.map +1 -1
- package/dist/vue2/lib/unread-pill/unread-pill.js +27 -18
- package/dist/vue2/lib/unread-pill/unread-pill.js.map +1 -1
- package/dist/vue2/localization/en-US.cjs +185 -0
- package/dist/vue2/localization/en-US.cjs.map +1 -0
- package/dist/vue2/localization/en-US.js +188 -0
- package/dist/vue2/localization/en-US.js.map +1 -0
- package/dist/vue2/localization/es-LA.cjs +169 -0
- package/dist/vue2/localization/es-LA.cjs.map +1 -0
- package/dist/vue2/localization/es-LA.js +172 -0
- package/dist/vue2/localization/es-LA.js.map +1 -0
- package/dist/vue2/localization/index.cjs +1322 -0
- package/dist/vue2/localization/index.cjs.map +1 -0
- package/dist/vue2/localization/index.js +1385 -0
- package/dist/vue2/localization/index.js.map +1 -0
- package/dist/vue2/node_modules/@tiptap/vue-2.cjs.map +1 -1
- 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.cjs.map +1 -1
- package/dist/vue2/shared/sr_only_close_button.js +19 -22
- package/dist/vue2/shared/sr_only_close_button.js.map +1 -1
- package/dist/vue2/types/common/mixins/index.d.ts +1 -1
- package/dist/vue2/types/common/mixins/localization.d.ts +8 -0
- package/dist/vue2/types/common/mixins/localization.d.ts.map +1 -0
- package/dist/vue2/types/common/sr_only_close_button.vue.d.ts +7 -13
- package/dist/vue2/types/common/sr_only_close_button.vue.d.ts.map +1 -1
- package/dist/vue2/types/common/utils/index.d.ts +1 -0
- package/dist/vue2/types/common/utils/index.d.ts.map +1 -1
- package/dist/vue2/types/components/banner/banner.vue.d.ts +0 -33
- package/dist/vue2/types/components/banner/banner.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/breadcrumbs/breadcrumbs.vue.d.ts +5 -1
- package/dist/vue2/types/components/button/button.vue.d.ts +6 -2
- package/dist/vue2/types/components/chip/chip.vue.d.ts +8 -18
- package/dist/vue2/types/components/combobox/combobox_constants.d.ts +2 -2
- package/dist/vue2/types/components/combobox/index.d.ts +1 -1
- package/dist/vue2/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/datepicker/datepicker_constants.d.ts +0 -1
- package/dist/vue2/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
- package/dist/vue2/types/components/datepicker/modules/calendar.vue.d.ts +5 -17
- package/dist/vue2/types/components/datepicker/modules/month-year-picker.vue.d.ts +8 -48
- package/dist/vue2/types/components/datepicker/utils.d.ts +1 -0
- package/dist/vue2/types/components/datepicker/utils.d.ts.map +1 -1
- package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts +0 -24
- package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/emoji_picker/emoji_picker.vue.d.ts +5 -1
- package/dist/vue2/types/components/emoji_picker/emoji_picker_constants.d.ts +0 -13
- package/dist/vue2/types/components/icon/icon.vue.d.ts +1 -0
- package/dist/vue2/types/components/icon/icon_constants.d.ts.map +1 -1
- package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts +5 -8
- package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/list_item/list_item.vue.d.ts +9 -0
- package/dist/vue2/types/components/list_item/list_item.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/loader/index.d.ts +2 -0
- package/dist/vue2/types/components/loader/index.d.ts.map +1 -0
- package/dist/vue2/types/components/loader/loader.vue.d.ts +32 -0
- package/dist/vue2/types/components/loader/loader.vue.d.ts.map +1 -0
- package/dist/vue2/types/components/modal/modal.vue.d.ts +3 -33
- package/dist/vue2/types/components/notice/notice.vue.d.ts +1 -34
- package/dist/vue2/types/components/notice/notice.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/notice/notice_action.vue.d.ts +3 -31
- package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/pagination/pagination.vue.d.ts +9 -26
- package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/popover/popover.vue.d.ts +0 -33
- package/dist/vue2/types/components/popover/popover.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts +8 -11
- package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +25 -2
- package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +1 -43
- package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -34
- package/dist/vue2/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/toast/toast.vue.d.ts +3 -111
- package/dist/vue2/types/components/toast/toast.vue.d.ts.map +1 -1
- package/dist/vue2/types/index.d.ts +2 -0
- package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +7 -13
- package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +7 -12
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +8 -10
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node_constants.d.ts +7 -7
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
- package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -25
- package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -25
- package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +5 -41
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +8 -26
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +2 -2
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +20 -61
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +6 -1
- package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row_constants.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +10 -13
- package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +8 -2
- package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +15 -90
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +14 -2
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +14 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +10 -11
- package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -18
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +21 -37
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts +9 -18
- package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +7 -1
- package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/dialtone-vue.cjs +1 -1
- package/dist/vue3/dialtone-vue.js +208 -206
- package/dist/vue3/dialtone-vue.js.map +1 -1
- package/dist/vue3/lib/list-item/list-item.cjs +1 -1
- package/dist/vue3/lib/list-item/list-item.cjs.map +1 -1
- package/dist/vue3/lib/list-item/list-item.js +35 -30
- package/dist/vue3/lib/list-item/list-item.js.map +1 -1
- package/dist/vue3/lib/loader/index.cjs +2 -0
- package/dist/vue3/lib/loader/index.cjs.map +1 -0
- package/dist/vue3/lib/loader/index.js +5 -0
- package/dist/vue3/lib/loader/index.js.map +1 -0
- package/dist/vue3/lib/loader/loader.cjs +2 -0
- package/dist/vue3/lib/loader/loader.cjs.map +1 -0
- package/dist/vue3/lib/loader/loader.js +48 -0
- package/dist/vue3/lib/loader/loader.js.map +1 -0
- package/dist/vue3/lib/message-input/message-input.cjs +1 -1
- package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
- package/dist/vue3/lib/message-input/message-input.js +2 -1
- package/dist/vue3/lib/message-input/message-input.js.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +8 -4
- 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 +301 -235
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue3/types/components/list_item/list_item.vue.d.ts +10 -2
- package/dist/vue3/types/components/loader/index.d.ts +2 -0
- package/dist/vue3/types/components/loader/index.d.ts.map +1 -0
- package/dist/vue3/types/components/loader/loader.vue.d.ts +26 -0
- package/dist/vue3/types/components/loader/loader.vue.d.ts.map +1 -0
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +19 -0
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/toggle/toggle.vue.d.ts +1 -1
- package/dist/vue3/types/index.d.ts +1 -0
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/package.json +4 -3
- package/dist/vue2/common/mixins/sr-only-close-button.cjs +0 -3
- package/dist/vue2/common/mixins/sr-only-close-button.cjs.map +0 -1
- package/dist/vue2/common/mixins/sr-only-close-button.js +0 -44
- package/dist/vue2/common/mixins/sr-only-close-button.js.map +0 -1
- package/dist/vue2/lib/contact-row/contact-row-constants.cjs +0 -2
- package/dist/vue2/lib/contact-row/contact-row-constants.cjs.map +0 -1
- package/dist/vue2/lib/contact-row/contact-row-constants.js +0 -5
- package/dist/vue2/lib/contact-row/contact-row-constants.js.map +0 -1
- package/dist/vue2/lib/emoji/emoji-constants.cjs +0 -2
- package/dist/vue2/lib/emoji/emoji-constants.cjs.map +0 -1
- package/dist/vue2/lib/emoji/emoji-constants.js +0 -5
- package/dist/vue2/lib/emoji/emoji-constants.js.map +0 -1
- package/dist/vue2/lib/group-row/group-row-constants.cjs +0 -2
- package/dist/vue2/lib/group-row/group-row-constants.cjs.map +0 -1
- package/dist/vue2/lib/group-row/group-row-constants.js +0 -8
- package/dist/vue2/lib/group-row/group-row-constants.js.map +0 -1
- package/dist/vue2/lib/time-pill/time-pill-constants.cjs +0 -2
- package/dist/vue2/lib/time-pill/time-pill-constants.cjs.map +0 -1
- package/dist/vue2/lib/time-pill/time-pill-constants.js +0 -8
- package/dist/vue2/lib/time-pill/time-pill-constants.js.map +0 -1
- package/dist/vue2/types/common/mixins/sr_only_close_button.d.ts +0 -30
- package/dist/vue2/types/common/mixins/sr_only_close_button.d.ts.map +0 -1
- package/dist/vue2/types/components/emoji/emoji_constants.d.ts +0 -3
- package/dist/vue2/types/components/emoji/emoji_constants.d.ts.map +0 -1
- package/dist/vue2/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts +0 -6
- package/dist/vue2/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts.map +0 -1
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row_constants.d.ts +0 -3
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row_constants.d.ts.map +0 -1
- package/dist/vue2/types/recipes/leftbar/group_row/group_row_constants.d.ts +0 -6
- package/dist/vue2/types/recipes/leftbar/group_row/group_row_constants.d.ts.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { NodeViewWrapper as _, nodeViewProps as y, VueRenderer as w, VueNodeViewRenderer as
|
|
2
|
-
import { Node as
|
|
1
|
+
import { NodeViewWrapper as _, nodeViewProps as y, VueRenderer as w, VueNodeViewRenderer as v, EditorContent as H, BubbleMenu as j, Editor as F } from "../../node_modules/@tiptap/vue-2.js";
|
|
2
|
+
import { Node as N, mergeAttributes as m, InputRule as q, nodePasteRule as E, getMarksBetween as U, combineTransactionSteps as K, getChangedRanges as W, findChildrenInRange as V, Mark as z, 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";
|
|
6
6
|
import Z from "@tiptap/extension-document";
|
|
7
|
-
import
|
|
7
|
+
import O from "@tiptap/extension-paragraph";
|
|
8
8
|
import ee from "@tiptap/extension-placeholder";
|
|
9
9
|
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
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import se from "@tiptap/extension-italic";
|
|
13
|
+
import ie from "@tiptap/extension-link";
|
|
14
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";
|
|
@@ -23,44 +23,45 @@ import fe from "@tiptap/extension-color";
|
|
|
23
23
|
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
|
-
import { emojiPattern as
|
|
26
|
+
import { emojiPattern as B } from "regex-combined-emojis";
|
|
27
27
|
import { n as c } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
|
|
28
|
-
import
|
|
29
|
-
import { stringToUnicode as ye, codeToEmojiData as
|
|
30
|
-
import { emojisIndexed as
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import { linkRegex as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as
|
|
39
|
-
import
|
|
40
|
-
import
|
|
28
|
+
import P from "../emoji/emoji.js";
|
|
29
|
+
import { stringToUnicode as ye, codeToEmojiData as R, emojiRegex as we, emojiShortCodeRegex as ve } from "../../common/emoji/index.js";
|
|
30
|
+
import { emojisIndexed as xe } from "@dialpad/dialtone-emojis";
|
|
31
|
+
import be from "../list-item/list-item.js";
|
|
32
|
+
import x from "../stack/stack.js";
|
|
33
|
+
import b from "tippy.js";
|
|
34
|
+
import { linkRegex as ke, getPhoneNumberRegex as Te, warnIfUnmounted as Ce } from "../../common/utils/index.js";
|
|
35
|
+
import Ee from "@tiptap/extension-image";
|
|
36
|
+
import S from "@tiptap/extension-mention";
|
|
37
|
+
import M from "../link/link.js";
|
|
38
|
+
import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as Le, RICH_TEXT_EDITOR_OUTPUT_FORMATS as Re, RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as $ } from "./rich-text-editor-constants.js";
|
|
39
|
+
import Se from "../avatar/avatar.js";
|
|
40
|
+
import $e from "@dialpad/dialtone-icons/vue2/hash";
|
|
41
41
|
import Ie from "@dialpad/dialtone-icons/vue2/lock";
|
|
42
42
|
import Ae from "deep-equal";
|
|
43
|
-
import
|
|
44
|
-
|
|
43
|
+
import Oe from "../button/button.js";
|
|
44
|
+
import Be from "../../common/mixins/localization.js";
|
|
45
|
+
const Pe = {
|
|
45
46
|
name: "EmojiComponent",
|
|
46
47
|
components: {
|
|
47
48
|
NodeViewWrapper: _,
|
|
48
|
-
DtEmoji:
|
|
49
|
+
DtEmoji: P
|
|
49
50
|
},
|
|
50
51
|
props: y
|
|
51
52
|
};
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
return
|
|
55
|
-
}, De = [],
|
|
53
|
+
var Me = function() {
|
|
54
|
+
var t = this, n = t._self._c;
|
|
55
|
+
return n("node-view-wrapper", { staticClass: "d-d-inline-block d-va-bottom d-lh0" }, [n("dt-emoji", { attrs: { size: "500", code: t.node.attrs.code } })], 1);
|
|
56
|
+
}, De = [], He = /* @__PURE__ */ c(
|
|
57
|
+
Pe,
|
|
56
58
|
Me,
|
|
57
|
-
Oe,
|
|
58
59
|
De
|
|
59
60
|
);
|
|
60
|
-
const
|
|
61
|
+
const je = He.exports, Fe = {
|
|
61
62
|
name: "SuggestionList",
|
|
62
63
|
components: {
|
|
63
|
-
DtListItem:
|
|
64
|
+
DtListItem: be
|
|
64
65
|
},
|
|
65
66
|
props: {
|
|
66
67
|
items: {
|
|
@@ -91,8 +92,8 @@ const Pe = Be.exports, He = {
|
|
|
91
92
|
}
|
|
92
93
|
},
|
|
93
94
|
methods: {
|
|
94
|
-
onKeyDown({ event:
|
|
95
|
-
return
|
|
95
|
+
onKeyDown({ event: e }) {
|
|
96
|
+
return e.key === "ArrowUp" ? (this.upHandler(), !0) : e.key === "ArrowDown" ? (this.downHandler(), !0) : e.key === "Enter" || e.key === "Tab" ? (this.selectHandler(), !0) : !1;
|
|
96
97
|
},
|
|
97
98
|
upHandler() {
|
|
98
99
|
this.selectedIndex = (this.selectedIndex + this.items.length - 1) % this.items.length, this.scrollActiveElementIntoView();
|
|
@@ -102,8 +103,8 @@ const Pe = Be.exports, He = {
|
|
|
102
103
|
},
|
|
103
104
|
async scrollActiveElementIntoView() {
|
|
104
105
|
await this.$nextTick();
|
|
105
|
-
const
|
|
106
|
-
|
|
106
|
+
const e = this.$refs.suggestionList.querySelector(".d-list-item--highlighted");
|
|
107
|
+
e && e.scrollIntoView({
|
|
107
108
|
behaviour: "smooth",
|
|
108
109
|
block: "center"
|
|
109
110
|
});
|
|
@@ -111,47 +112,47 @@ const Pe = Be.exports, He = {
|
|
|
111
112
|
selectHandler() {
|
|
112
113
|
this.selectItem(this.selectedIndex);
|
|
113
114
|
},
|
|
114
|
-
selectItem(
|
|
115
|
-
const
|
|
115
|
+
selectItem(e) {
|
|
116
|
+
const t = this.items[e];
|
|
116
117
|
switch (this.itemType) {
|
|
117
118
|
case "emoji":
|
|
118
|
-
this.command(
|
|
119
|
+
this.command(t);
|
|
119
120
|
return;
|
|
120
121
|
case "mention":
|
|
121
|
-
this.command({ name:
|
|
122
|
+
this.command({ name: t.name, id: t.id, avatarSrc: t.avatarSrc });
|
|
122
123
|
break;
|
|
123
124
|
case "channel":
|
|
124
|
-
this.command({ name:
|
|
125
|
+
this.command({ name: t.name, id: t.id });
|
|
125
126
|
break;
|
|
126
127
|
case "slash-command":
|
|
127
|
-
this.command({ command:
|
|
128
|
+
this.command({ command: t.command });
|
|
128
129
|
break;
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
};
|
|
133
|
-
var
|
|
134
|
-
var
|
|
135
|
-
return
|
|
136
|
-
return
|
|
134
|
+
var Ne = function() {
|
|
135
|
+
var t = this, n = t._self._c;
|
|
136
|
+
return n("div", { staticClass: "d-popover__dialog d-suggestion-list__container" }, [n("ul", { directives: [{ name: "show", rawName: "v-show", value: t.items.length, expression: "items.length" }], ref: "suggestionList", staticClass: "d-suggestion-list" }, t._l(t.items, function(r, s) {
|
|
137
|
+
return n("dt-list-item", { key: r.id, class: [
|
|
137
138
|
"d-suggestion-list__item",
|
|
138
|
-
{ "d-list-item--highlighted":
|
|
139
|
+
{ "d-list-item--highlighted": s === t.selectedIndex }
|
|
139
140
|
], attrs: { "navigation-type": "arrow-keys" }, on: { click: function(o) {
|
|
140
|
-
return
|
|
141
|
+
return t.selectItem(s);
|
|
141
142
|
}, keydown: function(o) {
|
|
142
|
-
return o.preventDefault(),
|
|
143
|
-
} } }, [
|
|
143
|
+
return o.preventDefault(), t.onKeyDown.apply(null, arguments);
|
|
144
|
+
} } }, [n(t.itemComponent, { tag: "component", attrs: { item: r } })], 1);
|
|
144
145
|
}), 1)]);
|
|
145
|
-
}, qe = [],
|
|
146
|
-
He,
|
|
146
|
+
}, qe = [], Ue = /* @__PURE__ */ c(
|
|
147
147
|
Fe,
|
|
148
|
+
Ne,
|
|
148
149
|
qe
|
|
149
150
|
);
|
|
150
|
-
const
|
|
151
|
+
const k = Ue.exports, Ke = {
|
|
151
152
|
name: "EmojiSuggestion",
|
|
152
153
|
components: {
|
|
153
|
-
DtEmoji:
|
|
154
|
-
DtStack:
|
|
154
|
+
DtEmoji: P,
|
|
155
|
+
DtStack: x
|
|
155
156
|
},
|
|
156
157
|
props: {
|
|
157
158
|
item: {
|
|
@@ -160,106 +161,106 @@ const C = Ke.exports, Ue = {
|
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
163
|
};
|
|
163
|
-
var
|
|
164
|
-
var
|
|
165
|
-
return
|
|
164
|
+
var We = function() {
|
|
165
|
+
var t = this, n = t._self._c;
|
|
166
|
+
return n("dt-stack", { attrs: { direction: "row", gap: "400" } }, [n("dt-emoji", { attrs: { size: "200", code: t.item.code } }), t._v(" " + t._s(t.item.code) + " ")], 1);
|
|
166
167
|
}, Ve = [], ze = /* @__PURE__ */ c(
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
Ke,
|
|
169
|
+
We,
|
|
169
170
|
Ve
|
|
170
171
|
);
|
|
171
|
-
const
|
|
172
|
+
const Xe = ze.exports, T = {
|
|
172
173
|
name: "hideOnEsc",
|
|
173
174
|
defaultValue: !0,
|
|
174
|
-
fn({ hide:
|
|
175
|
-
function
|
|
176
|
-
|
|
175
|
+
fn({ hide: e }) {
|
|
176
|
+
function t(n) {
|
|
177
|
+
n.keyCode === 27 && e();
|
|
177
178
|
}
|
|
178
179
|
return {
|
|
179
180
|
onShow() {
|
|
180
|
-
document.addEventListener("keydown",
|
|
181
|
+
document.addEventListener("keydown", t);
|
|
181
182
|
},
|
|
182
183
|
onHide() {
|
|
183
|
-
document.removeEventListener("keydown",
|
|
184
|
+
document.removeEventListener("keydown", t);
|
|
184
185
|
}
|
|
185
186
|
};
|
|
186
187
|
}
|
|
187
|
-
},
|
|
188
|
-
items: ({ query:
|
|
189
|
-
if (
|
|
188
|
+
}, Je = 20, Ye = {
|
|
189
|
+
items: ({ query: e }) => {
|
|
190
|
+
if (e.length < 2)
|
|
190
191
|
return [];
|
|
191
|
-
const
|
|
192
|
-
return
|
|
193
|
-
(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
...
|
|
197
|
-
].some((
|
|
198
|
-
).splice(0,
|
|
192
|
+
const t = Object.values(xe);
|
|
193
|
+
return e = e.toLowerCase(), t.filter(
|
|
194
|
+
(r) => [
|
|
195
|
+
r.name,
|
|
196
|
+
r.shortname.replaceAll(":", ""),
|
|
197
|
+
...r.keywords
|
|
198
|
+
].some((s) => s.startsWith(e))
|
|
199
|
+
).splice(0, Je).map((r) => ({ code: r.shortname }));
|
|
199
200
|
},
|
|
200
|
-
command: ({ editor:
|
|
201
|
-
var o,
|
|
202
|
-
const
|
|
203
|
-
((o =
|
|
201
|
+
command: ({ editor: e, range: t, props: n }) => {
|
|
202
|
+
var o, i;
|
|
203
|
+
const r = e.view.state.selection.$to.nodeAfter;
|
|
204
|
+
((o = r == null ? void 0 : r.text) == null ? void 0 : o.startsWith(" ")) && (t.to += 1), e.chain().focus().insertContentAt(t, [
|
|
204
205
|
{
|
|
205
206
|
type: "emoji",
|
|
206
|
-
attrs:
|
|
207
|
+
attrs: n
|
|
207
208
|
}
|
|
208
|
-
]).run(), (
|
|
209
|
+
]).run(), (i = window.getSelection()) == null || i.collapseToEnd();
|
|
209
210
|
},
|
|
210
211
|
render: () => {
|
|
211
|
-
let
|
|
212
|
+
let e, t, n = !1;
|
|
212
213
|
return {
|
|
213
|
-
onStart: (
|
|
214
|
-
|
|
214
|
+
onStart: (r) => {
|
|
215
|
+
e = new w(k, {
|
|
215
216
|
parent: void 0,
|
|
216
217
|
propsData: {
|
|
217
|
-
itemComponent:
|
|
218
|
+
itemComponent: Xe,
|
|
218
219
|
itemType: "emoji",
|
|
219
|
-
...
|
|
220
|
+
...r
|
|
220
221
|
},
|
|
221
|
-
editor:
|
|
222
|
-
}),
|
|
223
|
-
getReferenceClientRect:
|
|
222
|
+
editor: r.editor
|
|
223
|
+
}), r.clientRect && (t = b("body", {
|
|
224
|
+
getReferenceClientRect: r.clientRect,
|
|
224
225
|
appendTo: () => document.body,
|
|
225
|
-
content:
|
|
226
|
+
content: e.element,
|
|
226
227
|
showOnCreate: !1,
|
|
227
228
|
onShow: () => {
|
|
228
|
-
|
|
229
|
+
n = !0;
|
|
229
230
|
},
|
|
230
231
|
onHidden: () => {
|
|
231
|
-
|
|
232
|
+
n = !1;
|
|
232
233
|
},
|
|
233
234
|
interactive: !0,
|
|
234
235
|
trigger: "manual",
|
|
235
236
|
placement: "top-start",
|
|
236
237
|
zIndex: 650,
|
|
237
|
-
plugins: [
|
|
238
|
-
}),
|
|
238
|
+
plugins: [T]
|
|
239
|
+
}), r.items.length > 0 && (t == null || t[0].show()));
|
|
239
240
|
},
|
|
240
|
-
onUpdate(
|
|
241
|
-
|
|
242
|
-
getReferenceClientRect:
|
|
241
|
+
onUpdate(r) {
|
|
242
|
+
e == null || e.updateProps(r), r.items.length > 0 ? t == null || t[0].show() : t == null || t[0].hide(), t == null || t[0].setProps({
|
|
243
|
+
getReferenceClientRect: r.clientRect
|
|
243
244
|
});
|
|
244
245
|
},
|
|
245
|
-
onKeyDown(
|
|
246
|
-
var
|
|
247
|
-
if (
|
|
248
|
-
return (
|
|
246
|
+
onKeyDown(r) {
|
|
247
|
+
var s;
|
|
248
|
+
if (n)
|
|
249
|
+
return (s = e == null ? void 0 : e.ref) == null ? void 0 : s.onKeyDown(r);
|
|
249
250
|
},
|
|
250
251
|
onExit() {
|
|
251
|
-
|
|
252
|
+
t == null || t[0].destroy(), t = null, e == null || e.destroy(), e = null;
|
|
252
253
|
}
|
|
253
254
|
};
|
|
254
255
|
}
|
|
255
|
-
},
|
|
256
|
-
if (
|
|
257
|
-
return { text:
|
|
258
|
-
},
|
|
259
|
-
index:
|
|
260
|
-
text:
|
|
261
|
-
match:
|
|
262
|
-
})),
|
|
256
|
+
}, Ge = /(:\w+:)$/, Qe = new RegExp(B + "$"), Ze = (e) => {
|
|
257
|
+
if (e && R(e[0]))
|
|
258
|
+
return { text: e[2] || e[0] };
|
|
259
|
+
}, et = (e) => [...e.matchAll(ve)].filter((n) => R(n[0])).map((n) => ({
|
|
260
|
+
index: n.index,
|
|
261
|
+
text: n[0],
|
|
262
|
+
match: n
|
|
263
|
+
})), tt = N.create({
|
|
263
264
|
name: "emoji",
|
|
264
265
|
addOptions() {
|
|
265
266
|
return {
|
|
@@ -271,7 +272,7 @@ const We = ze.exports, k = {
|
|
|
271
272
|
selectable: !1,
|
|
272
273
|
atom: !0,
|
|
273
274
|
addNodeView() {
|
|
274
|
-
return
|
|
275
|
+
return v(je);
|
|
275
276
|
},
|
|
276
277
|
addAttributes() {
|
|
277
278
|
return {
|
|
@@ -287,44 +288,44 @@ const We = ze.exports, k = {
|
|
|
287
288
|
}
|
|
288
289
|
];
|
|
289
290
|
},
|
|
290
|
-
renderText({ node:
|
|
291
|
-
return ye(
|
|
291
|
+
renderText({ node: e }) {
|
|
292
|
+
return ye(R(e.attrs.code).unicode_output);
|
|
292
293
|
},
|
|
293
|
-
renderHTML({ HTMLAttributes:
|
|
294
|
-
return ["emoji-component", m(this.options.HTMLAttributes,
|
|
294
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
295
|
+
return ["emoji-component", m(this.options.HTMLAttributes, e)];
|
|
295
296
|
},
|
|
296
297
|
addInputRules() {
|
|
297
298
|
return [
|
|
298
|
-
new
|
|
299
|
-
find: (
|
|
300
|
-
const
|
|
301
|
-
if (
|
|
302
|
-
return
|
|
299
|
+
new q({
|
|
300
|
+
find: (e) => {
|
|
301
|
+
const t = e.match(Ge) || e.match(Qe);
|
|
302
|
+
if (t)
|
|
303
|
+
return Ze(t);
|
|
303
304
|
},
|
|
304
|
-
handler: ({ state:
|
|
305
|
-
const { tr:
|
|
306
|
-
|
|
305
|
+
handler: ({ state: e, range: t, match: n, commands: r, chain: s, can: o }) => {
|
|
306
|
+
const { tr: i } = e, a = t.from, l = t.to;
|
|
307
|
+
i.replaceWith(a, l, this.type.create({ code: n[0] }));
|
|
307
308
|
}
|
|
308
309
|
})
|
|
309
310
|
];
|
|
310
311
|
},
|
|
311
312
|
addPasteRules() {
|
|
312
313
|
return [
|
|
313
|
-
|
|
314
|
-
find:
|
|
314
|
+
E({
|
|
315
|
+
find: et,
|
|
315
316
|
type: this.type,
|
|
316
|
-
getAttributes(
|
|
317
|
+
getAttributes(e) {
|
|
317
318
|
return {
|
|
318
|
-
code:
|
|
319
|
+
code: e[0]
|
|
319
320
|
};
|
|
320
321
|
}
|
|
321
322
|
}),
|
|
322
|
-
|
|
323
|
+
E({
|
|
323
324
|
find: we,
|
|
324
325
|
type: this.type,
|
|
325
|
-
getAttributes(
|
|
326
|
+
getAttributes(e) {
|
|
326
327
|
return {
|
|
327
|
-
code:
|
|
328
|
+
code: e[0]
|
|
328
329
|
};
|
|
329
330
|
}
|
|
330
331
|
})
|
|
@@ -337,111 +338,111 @@ const We = ze.exports, k = {
|
|
|
337
338
|
pluginKey: new f("emoji"),
|
|
338
339
|
editor: this.editor,
|
|
339
340
|
...this.options.suggestion,
|
|
340
|
-
...
|
|
341
|
+
...Ye
|
|
341
342
|
})
|
|
342
343
|
];
|
|
343
344
|
},
|
|
344
345
|
addKeyboardShortcuts() {
|
|
345
346
|
return {
|
|
346
|
-
Backspace: () => this.editor.commands.command(({ tr:
|
|
347
|
-
let
|
|
348
|
-
const { selection:
|
|
349
|
-
return
|
|
350
|
-
if (
|
|
351
|
-
return
|
|
352
|
-
}),
|
|
347
|
+
Backspace: () => this.editor.commands.command(({ tr: e, state: t }) => {
|
|
348
|
+
let n = !1;
|
|
349
|
+
const { selection: r } = t, { empty: s, anchor: o } = r;
|
|
350
|
+
return s ? (t.doc.nodesBetween(o - 1, o, (i, a) => {
|
|
351
|
+
if (i.type.name === this.name)
|
|
352
|
+
return n = !0, e.insertText("", a, a + i.nodeSize), !1;
|
|
353
|
+
}), n) : !1;
|
|
353
354
|
})
|
|
354
355
|
};
|
|
355
356
|
}
|
|
356
357
|
});
|
|
357
|
-
function
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
let
|
|
361
|
-
for (;
|
|
362
|
-
|
|
363
|
-
return
|
|
358
|
+
function nt(e, t, n = () => !0) {
|
|
359
|
+
const r = [];
|
|
360
|
+
t.lastIndex = 0;
|
|
361
|
+
let s;
|
|
362
|
+
for (; s = t.exec(e); )
|
|
363
|
+
n(e, s) && r.push(s);
|
|
364
|
+
return r;
|
|
364
365
|
}
|
|
365
|
-
function
|
|
366
|
-
return !["#", "@"].includes(
|
|
366
|
+
function rt(e, t) {
|
|
367
|
+
return !["#", "@"].includes(e.charAt(t.index)) && !["#", "@"].includes(e.charAt(t.index - 1));
|
|
367
368
|
}
|
|
368
|
-
function
|
|
369
|
-
const
|
|
369
|
+
function st(e) {
|
|
370
|
+
const t = new RegExp(
|
|
370
371
|
"(?:" + [
|
|
371
372
|
`[!?.,:;'"]`,
|
|
372
373
|
"(?:&|&)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"
|
|
373
374
|
].join("|"),
|
|
374
375
|
"g"
|
|
375
376
|
);
|
|
376
|
-
return
|
|
377
|
+
return e.replace(t, "");
|
|
377
378
|
}
|
|
378
|
-
function it(
|
|
379
|
-
const
|
|
380
|
-
if (
|
|
381
|
-
const
|
|
379
|
+
function it(e, t) {
|
|
380
|
+
const n = e.slice(0, t + 1).search(/\S+\s*$/), r = e.slice(t).search(/\s/);
|
|
381
|
+
if (r < 0) {
|
|
382
|
+
const s = e.slice(n);
|
|
382
383
|
return {
|
|
383
|
-
text:
|
|
384
|
-
from:
|
|
385
|
-
to:
|
|
384
|
+
text: s,
|
|
385
|
+
from: n,
|
|
386
|
+
to: n + s.length
|
|
386
387
|
};
|
|
387
388
|
}
|
|
388
389
|
return {
|
|
389
|
-
text:
|
|
390
|
-
from:
|
|
391
|
-
to:
|
|
390
|
+
text: e.slice(n, r + t),
|
|
391
|
+
from: n,
|
|
392
|
+
to: r + t
|
|
392
393
|
};
|
|
393
394
|
}
|
|
394
|
-
function
|
|
395
|
-
const
|
|
396
|
-
if (
|
|
397
|
-
return
|
|
398
|
-
const o =
|
|
399
|
-
return o <= 0 || o >=
|
|
395
|
+
function L(e, t, n, r) {
|
|
396
|
+
const s = it(e, t);
|
|
397
|
+
if (r.lastIndex = 0, !r.test(s.text))
|
|
398
|
+
return s;
|
|
399
|
+
const o = n === "left" ? s.from - 1 : s.to + 1;
|
|
400
|
+
return o <= 0 || o >= e.length || o === t ? s : L(e, o, n, r);
|
|
400
401
|
}
|
|
401
|
-
function
|
|
402
|
-
const
|
|
403
|
-
for (const a of
|
|
404
|
-
a.mark.type ===
|
|
402
|
+
function ot(e, t, n, r) {
|
|
403
|
+
const s = Math.max(e.from - 1, 0), o = Math.min(e.to + 1, t.content.size), i = U(s, o, t);
|
|
404
|
+
for (const a of i)
|
|
405
|
+
a.mark.type === r && n.removeMark(a.from, a.to, r);
|
|
405
406
|
}
|
|
406
|
-
const I =
|
|
407
|
-
function A(t,
|
|
408
|
-
if (!
|
|
407
|
+
const I = Te(1, 15);
|
|
408
|
+
function A(e, t, n, r, s, o) {
|
|
409
|
+
if (!e)
|
|
409
410
|
return;
|
|
410
|
-
let
|
|
411
|
-
|
|
412
|
-
const a =
|
|
413
|
-
|
|
414
|
-
|
|
411
|
+
let i = n - t - 1;
|
|
412
|
+
i = i < 0 ? 0 : i;
|
|
413
|
+
const a = r - t, l = L(
|
|
414
|
+
e,
|
|
415
|
+
i,
|
|
415
416
|
"left",
|
|
416
417
|
I
|
|
417
|
-
), d =
|
|
418
|
-
|
|
418
|
+
), d = L(
|
|
419
|
+
e,
|
|
419
420
|
a,
|
|
420
421
|
"right",
|
|
421
422
|
I
|
|
422
|
-
), u =
|
|
423
|
-
|
|
424
|
-
const h =
|
|
425
|
-
|
|
423
|
+
), u = e.slice(l.from, d.to);
|
|
424
|
+
nt(u, ke, rt).forEach((C) => {
|
|
425
|
+
const h = st(C[0]), g = t + l.from + C.index + 1, D = g + h.length;
|
|
426
|
+
s.addMark(g, D, o.create());
|
|
426
427
|
});
|
|
427
428
|
}
|
|
428
|
-
function
|
|
429
|
-
let
|
|
429
|
+
function at(e) {
|
|
430
|
+
let t = !1;
|
|
430
431
|
return new ge({
|
|
431
432
|
key: new f("autolink"),
|
|
432
|
-
appendTransaction: (
|
|
433
|
-
const o =
|
|
434
|
-
if (
|
|
433
|
+
appendTransaction: (n, r, s) => {
|
|
434
|
+
const o = n.some((u) => u.docChanged) && !r.doc.eq(s.doc);
|
|
435
|
+
if (t && !o)
|
|
435
436
|
return;
|
|
436
|
-
const { tr:
|
|
437
|
-
|
|
438
|
-
const l =
|
|
439
|
-
|
|
440
|
-
[...
|
|
437
|
+
const { tr: i } = s, { textContent: a } = s.doc;
|
|
438
|
+
t || A(a, 0, 0, a.length, i, e.type), t = !0;
|
|
439
|
+
const l = K(
|
|
440
|
+
r.doc,
|
|
441
|
+
[...n]
|
|
441
442
|
);
|
|
442
|
-
return
|
|
443
|
-
|
|
444
|
-
|
|
443
|
+
return W(l).forEach(({ oldRange: u, newRange: p }) => {
|
|
444
|
+
ot(p, s.doc, i, e.type), V(
|
|
445
|
+
s.doc,
|
|
445
446
|
p,
|
|
446
447
|
(h) => h.isTextblock
|
|
447
448
|
).forEach(({ node: h, pos: g }) => {
|
|
@@ -450,38 +451,38 @@ function ot(t) {
|
|
|
450
451
|
g,
|
|
451
452
|
u.from,
|
|
452
453
|
p.to,
|
|
453
|
-
|
|
454
|
-
|
|
454
|
+
i,
|
|
455
|
+
e.type
|
|
455
456
|
);
|
|
456
457
|
});
|
|
457
|
-
}),
|
|
458
|
+
}), i;
|
|
458
459
|
}
|
|
459
460
|
});
|
|
460
461
|
}
|
|
461
|
-
const
|
|
462
|
+
const lt = {
|
|
462
463
|
class: "d-link d-c-text d-d-inline-block d-wb-break-all",
|
|
463
464
|
rel: "noopener noreferrer nofollow"
|
|
464
|
-
},
|
|
465
|
+
}, ct = z.create({
|
|
465
466
|
name: "CustomLink",
|
|
466
|
-
renderHTML({ HTMLAttributes:
|
|
467
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
467
468
|
return [
|
|
468
469
|
"a",
|
|
469
470
|
m(
|
|
470
471
|
this.options.HTMLAttributes,
|
|
471
|
-
|
|
472
|
-
|
|
472
|
+
e,
|
|
473
|
+
lt
|
|
473
474
|
)
|
|
474
475
|
];
|
|
475
476
|
},
|
|
476
|
-
renderText({ node:
|
|
477
|
-
return
|
|
477
|
+
renderText({ node: e }) {
|
|
478
|
+
return e.attrs.text;
|
|
478
479
|
},
|
|
479
480
|
addProseMirrorPlugins() {
|
|
480
481
|
return [
|
|
481
|
-
|
|
482
|
+
at({ type: this.type })
|
|
482
483
|
];
|
|
483
484
|
}
|
|
484
|
-
}),
|
|
485
|
+
}), dt = Ee.extend({
|
|
485
486
|
name: "ConfigurableImage",
|
|
486
487
|
addAttributes() {
|
|
487
488
|
return {
|
|
@@ -505,18 +506,18 @@ const at = {
|
|
|
505
506
|
}
|
|
506
507
|
};
|
|
507
508
|
}
|
|
508
|
-
}).configure({ inline: !0, allowBase64: !0 }),
|
|
509
|
+
}).configure({ inline: !0, allowBase64: !0 }), ut = O.extend({
|
|
509
510
|
parseHTML() {
|
|
510
511
|
return [{ tag: "div" }];
|
|
511
512
|
},
|
|
512
|
-
renderHTML({ HTMLAttributes:
|
|
513
|
-
return ["div", m(this.options.HTMLAttributes,
|
|
513
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
514
|
+
return ["div", m(this.options.HTMLAttributes, e), 0];
|
|
514
515
|
}
|
|
515
|
-
}),
|
|
516
|
+
}), mt = {
|
|
516
517
|
name: "MentionComponent",
|
|
517
518
|
components: {
|
|
518
519
|
NodeViewWrapper: _,
|
|
519
|
-
DtLink:
|
|
520
|
+
DtLink: M
|
|
520
521
|
},
|
|
521
522
|
props: y,
|
|
522
523
|
computed: {
|
|
@@ -525,17 +526,17 @@ const at = {
|
|
|
525
526
|
}
|
|
526
527
|
}
|
|
527
528
|
};
|
|
528
|
-
var
|
|
529
|
-
var
|
|
530
|
-
return
|
|
531
|
-
},
|
|
532
|
-
ut,
|
|
529
|
+
var ht = function() {
|
|
530
|
+
var t = this, n = t._self._c;
|
|
531
|
+
return n("node-view-wrapper", { staticClass: "d-d-inline-block" }, [n("dt-link", { attrs: { kind: "mention" } }, [t._v(" " + t._s(t.text) + " ")])], 1);
|
|
532
|
+
}, ft = [], pt = /* @__PURE__ */ c(
|
|
533
533
|
mt,
|
|
534
|
-
ht
|
|
534
|
+
ht,
|
|
535
|
+
ft
|
|
535
536
|
);
|
|
536
|
-
const
|
|
537
|
+
const gt = pt.exports, _t = S.extend({
|
|
537
538
|
addNodeView() {
|
|
538
|
-
return
|
|
539
|
+
return v(gt);
|
|
539
540
|
},
|
|
540
541
|
parseHTML() {
|
|
541
542
|
return [
|
|
@@ -557,22 +558,22 @@ const pt = ft.exports, gt = $.extend({
|
|
|
557
558
|
}
|
|
558
559
|
};
|
|
559
560
|
},
|
|
560
|
-
renderText({ node:
|
|
561
|
-
return `@${
|
|
561
|
+
renderText({ node: e }) {
|
|
562
|
+
return `@${e.attrs.id}`;
|
|
562
563
|
},
|
|
563
|
-
renderHTML({ HTMLAttributes:
|
|
564
|
-
return ["mention-component", m(this.options.HTMLAttributes,
|
|
564
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
565
|
+
return ["mention-component", m(this.options.HTMLAttributes, e)];
|
|
565
566
|
}
|
|
566
567
|
}).configure({
|
|
567
568
|
suggestion: {
|
|
568
569
|
char: "@",
|
|
569
570
|
pluginKey: new f("mentionSuggestion")
|
|
570
571
|
}
|
|
571
|
-
}),
|
|
572
|
+
}), yt = {
|
|
572
573
|
name: "ChannelComponent",
|
|
573
574
|
components: {
|
|
574
575
|
NodeViewWrapper: _,
|
|
575
|
-
DtLink:
|
|
576
|
+
DtLink: M
|
|
576
577
|
},
|
|
577
578
|
props: y,
|
|
578
579
|
computed: {
|
|
@@ -581,18 +582,18 @@ const pt = ft.exports, gt = $.extend({
|
|
|
581
582
|
}
|
|
582
583
|
}
|
|
583
584
|
};
|
|
584
|
-
var
|
|
585
|
-
var
|
|
586
|
-
return
|
|
587
|
-
},
|
|
588
|
-
_t,
|
|
585
|
+
var wt = function() {
|
|
586
|
+
var t = this, n = t._self._c;
|
|
587
|
+
return n("node-view-wrapper", { staticClass: "d-d-inline-block" }, [n("dt-link", { attrs: { kind: "mention" } }, [t._v(" " + t._s(t.text) + " ")])], 1);
|
|
588
|
+
}, vt = [], xt = /* @__PURE__ */ c(
|
|
589
589
|
yt,
|
|
590
|
-
wt
|
|
590
|
+
wt,
|
|
591
|
+
vt
|
|
591
592
|
);
|
|
592
|
-
const
|
|
593
|
+
const bt = xt.exports, kt = S.extend({
|
|
593
594
|
name: "channel",
|
|
594
595
|
addNodeView() {
|
|
595
|
-
return
|
|
596
|
+
return v(bt);
|
|
596
597
|
},
|
|
597
598
|
parseHTML() {
|
|
598
599
|
return [
|
|
@@ -614,18 +615,18 @@ const vt = bt.exports, xt = $.extend({
|
|
|
614
615
|
}
|
|
615
616
|
};
|
|
616
617
|
},
|
|
617
|
-
renderText({ node:
|
|
618
|
-
return `#${
|
|
618
|
+
renderText({ node: e }) {
|
|
619
|
+
return `#${e.attrs.id}`;
|
|
619
620
|
},
|
|
620
|
-
renderHTML({ HTMLAttributes:
|
|
621
|
-
return ["channel-component", m(this.options.HTMLAttributes,
|
|
621
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
622
|
+
return ["channel-component", m(this.options.HTMLAttributes, e)];
|
|
622
623
|
}
|
|
623
624
|
}).configure({
|
|
624
625
|
suggestion: {
|
|
625
626
|
char: "#",
|
|
626
627
|
pluginKey: new f("channelSuggestion")
|
|
627
628
|
}
|
|
628
|
-
}),
|
|
629
|
+
}), Tt = {
|
|
629
630
|
name: "SlashCommandsComponent",
|
|
630
631
|
components: {
|
|
631
632
|
NodeViewWrapper: _
|
|
@@ -641,27 +642,27 @@ const vt = bt.exports, xt = $.extend({
|
|
|
641
642
|
this.$parent.$emit("selected-command", this.$props.node.attrs.command);
|
|
642
643
|
}
|
|
643
644
|
};
|
|
644
|
-
var
|
|
645
|
-
var
|
|
646
|
-
return
|
|
647
|
-
},
|
|
645
|
+
var Ct = function() {
|
|
646
|
+
var t = this, n = t._self._c;
|
|
647
|
+
return n("node-view-wrapper", { staticClass: "d-d-inline-block" }, [t._v(" " + t._s(t.text) + " ")]);
|
|
648
|
+
}, Et = [], Lt = /* @__PURE__ */ c(
|
|
649
|
+
Tt,
|
|
648
650
|
Ct,
|
|
649
|
-
|
|
650
|
-
St
|
|
651
|
+
Et
|
|
651
652
|
);
|
|
652
|
-
const Rt =
|
|
653
|
-
let
|
|
654
|
-
return
|
|
655
|
-
index:
|
|
656
|
-
text:
|
|
657
|
-
match:
|
|
653
|
+
const Rt = Lt.exports, St = (e, t) => [...e.matchAll(t)].map((r) => {
|
|
654
|
+
let s = r[2];
|
|
655
|
+
return s.endsWith(" ") || (s += " "), {
|
|
656
|
+
index: r.index,
|
|
657
|
+
text: s,
|
|
658
|
+
match: r
|
|
658
659
|
};
|
|
659
|
-
}), $t =
|
|
660
|
+
}), $t = S.extend({
|
|
660
661
|
name: "slash-commands",
|
|
661
662
|
group: "inline",
|
|
662
663
|
inline: !0,
|
|
663
664
|
addNodeView() {
|
|
664
|
-
return
|
|
665
|
+
return v(Rt);
|
|
665
666
|
},
|
|
666
667
|
parseHTML() {
|
|
667
668
|
return [
|
|
@@ -683,34 +684,34 @@ const Rt = Tt.exports, Et = (t, e) => [...t.matchAll(e)].map((n) => {
|
|
|
683
684
|
}
|
|
684
685
|
};
|
|
685
686
|
},
|
|
686
|
-
renderText({ node:
|
|
687
|
-
return `/${
|
|
687
|
+
renderText({ node: e }) {
|
|
688
|
+
return `/${e.attrs.command}`;
|
|
688
689
|
},
|
|
689
|
-
renderHTML({ HTMLAttributes:
|
|
690
|
-
return ["command-component", m(this.options.HTMLAttributes,
|
|
690
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
691
|
+
return ["command-component", m(this.options.HTMLAttributes, e)];
|
|
691
692
|
},
|
|
692
693
|
addInputRules() {
|
|
693
|
-
var
|
|
694
|
-
const
|
|
694
|
+
var n;
|
|
695
|
+
const e = (n = this.options.suggestion) == null ? void 0 : n.items({ query: "" }).map((r) => r.command), t = new RegExp(`^((?:\\/)(${e.join("|")})) $`);
|
|
695
696
|
return [
|
|
696
697
|
X({
|
|
697
|
-
find:
|
|
698
|
+
find: t,
|
|
698
699
|
type: this.type,
|
|
699
|
-
getAttributes(
|
|
700
|
-
return { command:
|
|
700
|
+
getAttributes(r) {
|
|
701
|
+
return { command: r[2] };
|
|
701
702
|
}
|
|
702
703
|
})
|
|
703
704
|
];
|
|
704
705
|
},
|
|
705
706
|
addPasteRules() {
|
|
706
|
-
var
|
|
707
|
-
const
|
|
707
|
+
var n;
|
|
708
|
+
const e = (n = this.options.suggestion) == null ? void 0 : n.items({ query: "" }).map((r) => r.command), t = new RegExp(`^((?:\\/)(${e.join("|")})) ?$`, "g");
|
|
708
709
|
return [
|
|
709
|
-
|
|
710
|
-
find: (
|
|
710
|
+
E({
|
|
711
|
+
find: (r) => St(r, t),
|
|
711
712
|
type: this.type,
|
|
712
|
-
getAttributes(
|
|
713
|
-
return { command:
|
|
713
|
+
getAttributes(r) {
|
|
714
|
+
return { command: r[0].trim() };
|
|
714
715
|
}
|
|
715
716
|
})
|
|
716
717
|
];
|
|
@@ -720,11 +721,11 @@ const Rt = Tt.exports, Et = (t, e) => [...t.matchAll(e)].map((n) => {
|
|
|
720
721
|
char: "/",
|
|
721
722
|
pluginKey: new f("slashCommandSuggestion")
|
|
722
723
|
}
|
|
723
|
-
}),
|
|
724
|
+
}), It = {
|
|
724
725
|
name: "MentionSuggestion",
|
|
725
726
|
components: {
|
|
726
|
-
DtAvatar:
|
|
727
|
-
DtStack:
|
|
727
|
+
DtAvatar: Se,
|
|
728
|
+
DtStack: x
|
|
728
729
|
},
|
|
729
730
|
props: {
|
|
730
731
|
item: {
|
|
@@ -761,69 +762,69 @@ const Rt = Tt.exports, Et = (t, e) => [...t.matchAll(e)].map((n) => {
|
|
|
761
762
|
}
|
|
762
763
|
}
|
|
763
764
|
};
|
|
764
|
-
var
|
|
765
|
-
var
|
|
766
|
-
return
|
|
767
|
-
},
|
|
768
|
-
Lt,
|
|
765
|
+
var At = function() {
|
|
766
|
+
var t = this, n = t._self._c;
|
|
767
|
+
return n("dt-stack", { staticClass: "d-mention-suggestion__container", attrs: { direction: "row", gap: "400" } }, [n("dt-avatar", { attrs: { "full-name": t.name, "image-src": t.avatarSrc, "image-alt": t.name, "show-presence": t.showDetails, presence: t.presence, size: "sm" } }), n("dt-stack", { staticClass: "d-mention-suggestion__details-container", attrs: { gap: "100" } }, [n("span", { staticClass: "d-mention-suggestion__name" }, [t._v(" " + t._s(t.name) + " ")]), t.showDetails ? n("dt-stack", { staticClass: "d-label--sm-plain", attrs: { direction: "row", gap: "300" } }, [t.presenceText ? n("span", { staticClass: "d-mention-suggestion__presence", class: [t.presenceFontColorClass] }, [t._v(" " + t._s(t.presenceText) + " ")]) : t._e(), t.status && t.presenceText ? n("div", { staticClass: "d-mention-suggestion__divider" }, [t._v(" • ")]) : t._e(), t.status ? n("div", { staticClass: "d-mention-suggestion__status" }, [t._v(" " + t._s(t.status) + " ")]) : t._e()]) : t._e()], 1)], 1);
|
|
768
|
+
}, Ot = [], Bt = /* @__PURE__ */ c(
|
|
769
769
|
It,
|
|
770
|
-
At
|
|
770
|
+
At,
|
|
771
|
+
Ot
|
|
771
772
|
);
|
|
772
|
-
const
|
|
773
|
+
const Pt = Bt.exports, Mt = {
|
|
773
774
|
// This function comes from the user and passed to the editor directly.
|
|
774
775
|
// This will also activate the mention plugin on the editor
|
|
775
776
|
// items: ({ query }) => { return [] },
|
|
776
777
|
allowSpaces: !0,
|
|
777
778
|
render: () => {
|
|
778
|
-
let
|
|
779
|
+
let e, t, n = !1;
|
|
779
780
|
return {
|
|
780
|
-
onStart: (
|
|
781
|
-
|
|
781
|
+
onStart: (r) => {
|
|
782
|
+
e = new w(k, {
|
|
782
783
|
parent: void 0,
|
|
783
784
|
propsData: {
|
|
784
|
-
itemComponent:
|
|
785
|
+
itemComponent: Pt,
|
|
785
786
|
itemType: "mention",
|
|
786
|
-
...
|
|
787
|
+
...r
|
|
787
788
|
},
|
|
788
|
-
editor:
|
|
789
|
-
}),
|
|
790
|
-
getReferenceClientRect:
|
|
789
|
+
editor: r.editor
|
|
790
|
+
}), r.clientRect && (t = b("body", {
|
|
791
|
+
getReferenceClientRect: r.clientRect,
|
|
791
792
|
appendTo: () => document.body,
|
|
792
|
-
content:
|
|
793
|
+
content: e.element,
|
|
793
794
|
showOnCreate: !1,
|
|
794
795
|
onShow: () => {
|
|
795
|
-
|
|
796
|
+
n = !0;
|
|
796
797
|
},
|
|
797
798
|
onHidden: () => {
|
|
798
|
-
|
|
799
|
+
n = !1;
|
|
799
800
|
},
|
|
800
801
|
interactive: !0,
|
|
801
802
|
trigger: "manual",
|
|
802
803
|
placement: "top-start",
|
|
803
804
|
zIndex: 650,
|
|
804
|
-
plugins: [
|
|
805
|
-
}),
|
|
805
|
+
plugins: [T]
|
|
806
|
+
}), r.items.length > 0 && (t == null || t[0].show()));
|
|
806
807
|
},
|
|
807
|
-
onUpdate(
|
|
808
|
-
|
|
809
|
-
getReferenceClientRect:
|
|
808
|
+
onUpdate(r) {
|
|
809
|
+
e == null || e.updateProps(r), r.items.length > 0 ? t == null || t[0].show() : t == null || t[0].hide(), r.clientRect && (t == null || t[0].setProps({
|
|
810
|
+
getReferenceClientRect: r.clientRect
|
|
810
811
|
}));
|
|
811
812
|
},
|
|
812
|
-
onKeyDown(
|
|
813
|
-
var
|
|
814
|
-
if (
|
|
815
|
-
return (
|
|
813
|
+
onKeyDown(r) {
|
|
814
|
+
var s;
|
|
815
|
+
if (n)
|
|
816
|
+
return (s = e == null ? void 0 : e.ref) == null ? void 0 : s.onKeyDown(r);
|
|
816
817
|
},
|
|
817
818
|
onExit() {
|
|
818
|
-
|
|
819
|
+
t == null || t[0].destroy(), t = null, e == null || e.destroy(), e = null;
|
|
819
820
|
}
|
|
820
821
|
};
|
|
821
822
|
}
|
|
822
823
|
}, Dt = {
|
|
823
824
|
name: "ChannelSuggestion",
|
|
824
825
|
components: {
|
|
825
|
-
DtStack:
|
|
826
|
-
DtIconHash:
|
|
826
|
+
DtStack: x,
|
|
827
|
+
DtIconHash: $e,
|
|
827
828
|
DtIconLock: Ie
|
|
828
829
|
},
|
|
829
830
|
props: {
|
|
@@ -838,65 +839,65 @@ const Mt = jt.exports, Ot = {
|
|
|
838
839
|
}
|
|
839
840
|
}
|
|
840
841
|
};
|
|
841
|
-
var
|
|
842
|
-
var
|
|
843
|
-
return
|
|
844
|
-
},
|
|
842
|
+
var Ht = function() {
|
|
843
|
+
var t = this, n = t._self._c;
|
|
844
|
+
return n("dt-stack", { attrs: { direction: "row", gap: "400" } }, [t.item.locked ? n("dt-icon-lock", { attrs: { size: "300" } }) : n("dt-icon-hash", { attrs: { size: "300" } }), n("span", [t._v(t._s(t.name))])], 1);
|
|
845
|
+
}, jt = [], Ft = /* @__PURE__ */ c(
|
|
845
846
|
Dt,
|
|
846
|
-
|
|
847
|
-
|
|
847
|
+
Ht,
|
|
848
|
+
jt
|
|
848
849
|
);
|
|
849
|
-
const
|
|
850
|
+
const Nt = Ft.exports, qt = {
|
|
850
851
|
// This function comes from the user and passed to the editor directly.
|
|
851
852
|
// This will also activate the mention plugin on the editor
|
|
852
853
|
// items: ({ query }) => { return [] },
|
|
853
854
|
allowSpaces: !0,
|
|
854
855
|
render: () => {
|
|
855
|
-
let
|
|
856
|
+
let e, t, n = !1;
|
|
856
857
|
return {
|
|
857
|
-
onStart: (
|
|
858
|
-
|
|
858
|
+
onStart: (r) => {
|
|
859
|
+
e = new w(k, {
|
|
859
860
|
parent: void 0,
|
|
860
861
|
propsData: {
|
|
861
|
-
itemComponent:
|
|
862
|
+
itemComponent: Nt,
|
|
862
863
|
itemType: "channel",
|
|
863
|
-
...
|
|
864
|
+
...r
|
|
864
865
|
},
|
|
865
|
-
editor:
|
|
866
|
-
}),
|
|
867
|
-
getReferenceClientRect:
|
|
866
|
+
editor: r.editor
|
|
867
|
+
}), r.clientRect && (t = b("body", {
|
|
868
|
+
getReferenceClientRect: r.clientRect,
|
|
868
869
|
appendTo: () => document.body,
|
|
869
|
-
content:
|
|
870
|
+
content: e.element,
|
|
870
871
|
showOnCreate: !1,
|
|
871
872
|
onShow: () => {
|
|
872
|
-
|
|
873
|
+
n = !0;
|
|
873
874
|
},
|
|
874
875
|
onHidden: () => {
|
|
875
|
-
|
|
876
|
+
n = !1;
|
|
876
877
|
},
|
|
877
878
|
interactive: !0,
|
|
878
879
|
trigger: "manual",
|
|
879
880
|
placement: "top-start",
|
|
880
881
|
zIndex: 650,
|
|
881
|
-
plugins: [
|
|
882
|
-
}),
|
|
882
|
+
plugins: [T]
|
|
883
|
+
}), r.items.length > 0 && (t == null || t[0].show()));
|
|
883
884
|
},
|
|
884
|
-
onUpdate(
|
|
885
|
-
|
|
886
|
-
getReferenceClientRect:
|
|
885
|
+
onUpdate(r) {
|
|
886
|
+
e == null || e.updateProps(r), r.items.length > 0 ? t == null || t[0].show() : t == null || t[0].hide(), r.clientRect && (t == null || t[0].setProps({
|
|
887
|
+
getReferenceClientRect: r.clientRect
|
|
887
888
|
}));
|
|
888
889
|
},
|
|
889
|
-
onKeyDown(
|
|
890
|
-
var
|
|
891
|
-
if (
|
|
892
|
-
return (
|
|
890
|
+
onKeyDown(r) {
|
|
891
|
+
var s;
|
|
892
|
+
if (n)
|
|
893
|
+
return (s = e == null ? void 0 : e.ref) == null ? void 0 : s.onKeyDown(r);
|
|
893
894
|
},
|
|
894
895
|
onExit() {
|
|
895
|
-
|
|
896
|
+
t == null || t[0].destroy(), t = null, e == null || e.destroy(), e = null;
|
|
896
897
|
}
|
|
897
898
|
};
|
|
898
899
|
}
|
|
899
|
-
},
|
|
900
|
+
}, Ut = {
|
|
900
901
|
name: "SlashCommandSuggestion",
|
|
901
902
|
props: {
|
|
902
903
|
item: {
|
|
@@ -916,73 +917,74 @@ const Ft = Ht.exports, qt = {
|
|
|
916
917
|
}
|
|
917
918
|
}
|
|
918
919
|
};
|
|
919
|
-
var
|
|
920
|
-
var
|
|
921
|
-
return
|
|
922
|
-
},
|
|
923
|
-
Kt,
|
|
920
|
+
var Kt = function() {
|
|
921
|
+
var t = this, n = t._self._c;
|
|
922
|
+
return n("div", [n("div", { staticClass: "d-body--md-compact" }, [n("span", [t._v("/" + t._s(t.command))]), t.parametersExample ? n("span", [t._v(" " + t._s(t.parametersExample))]) : t._e()]), n("div", { staticClass: "d-body--sm d-fc-tertiary" }, [t._v(" " + t._s(t.description) + " ")])]);
|
|
923
|
+
}, Wt = [], Vt = /* @__PURE__ */ c(
|
|
924
924
|
Ut,
|
|
925
|
-
|
|
925
|
+
Kt,
|
|
926
|
+
Wt
|
|
926
927
|
);
|
|
927
|
-
const zt = Vt.exports,
|
|
928
|
+
const zt = Vt.exports, Xt = {
|
|
928
929
|
// This function comes from the user and passed to the editor directly.
|
|
929
930
|
// This will also activate the mention plugin on the editor
|
|
930
931
|
// items: ({ query }) => { return [] },
|
|
931
932
|
allowSpaces: !0,
|
|
932
933
|
startOfLine: !0,
|
|
933
934
|
render: () => {
|
|
934
|
-
let
|
|
935
|
+
let e, t, n = !1;
|
|
935
936
|
return {
|
|
936
|
-
onStart: (
|
|
937
|
-
|
|
937
|
+
onStart: (r) => {
|
|
938
|
+
e = new w(k, {
|
|
938
939
|
parent: void 0,
|
|
939
940
|
propsData: {
|
|
940
941
|
itemComponent: zt,
|
|
941
942
|
itemType: "slash-command",
|
|
942
|
-
...
|
|
943
|
+
...r
|
|
943
944
|
},
|
|
944
|
-
editor:
|
|
945
|
-
}),
|
|
946
|
-
getReferenceClientRect:
|
|
945
|
+
editor: r.editor
|
|
946
|
+
}), r.clientRect && (t = b("body", {
|
|
947
|
+
getReferenceClientRect: r.clientRect,
|
|
947
948
|
appendTo: () => document.body,
|
|
948
|
-
content:
|
|
949
|
+
content: e.element,
|
|
949
950
|
showOnCreate: !1,
|
|
950
951
|
onShow: () => {
|
|
951
|
-
|
|
952
|
+
n = !0;
|
|
952
953
|
},
|
|
953
954
|
onHidden: () => {
|
|
954
|
-
|
|
955
|
+
n = !1;
|
|
955
956
|
},
|
|
956
957
|
interactive: !0,
|
|
957
958
|
trigger: "manual",
|
|
958
959
|
placement: "top-start",
|
|
959
960
|
zIndex: 650,
|
|
960
|
-
plugins: [
|
|
961
|
-
}),
|
|
961
|
+
plugins: [T]
|
|
962
|
+
}), r.items.length > 0 && (t == null || t[0].show()));
|
|
962
963
|
},
|
|
963
|
-
onUpdate(
|
|
964
|
-
|
|
965
|
-
getReferenceClientRect:
|
|
964
|
+
onUpdate(r) {
|
|
965
|
+
e == null || e.updateProps(r), r.items.length > 0 ? t == null || t[0].show() : t == null || t[0].hide(), r.clientRect && (t == null || t[0].setProps({
|
|
966
|
+
getReferenceClientRect: r.clientRect
|
|
966
967
|
}));
|
|
967
968
|
},
|
|
968
|
-
onKeyDown(
|
|
969
|
-
var
|
|
970
|
-
if (
|
|
971
|
-
return (
|
|
969
|
+
onKeyDown(r) {
|
|
970
|
+
var s;
|
|
971
|
+
if (n)
|
|
972
|
+
return (s = e == null ? void 0 : e.ref) == null ? void 0 : s.onKeyDown(r);
|
|
972
973
|
},
|
|
973
974
|
onExit() {
|
|
974
|
-
|
|
975
|
+
t == null || t[0].destroy(), t = null, e == null || e.destroy(), e = null;
|
|
975
976
|
}
|
|
976
977
|
};
|
|
977
978
|
}
|
|
978
|
-
},
|
|
979
|
+
}, Jt = {
|
|
979
980
|
name: "DtRichTextEditor",
|
|
980
981
|
components: {
|
|
981
|
-
EditorContent:
|
|
982
|
-
BubbleMenu:
|
|
983
|
-
DtButton:
|
|
984
|
-
DtStack:
|
|
982
|
+
EditorContent: H,
|
|
983
|
+
BubbleMenu: j,
|
|
984
|
+
DtButton: Oe,
|
|
985
|
+
DtStack: x
|
|
985
986
|
},
|
|
987
|
+
mixins: [Be],
|
|
986
988
|
props: {
|
|
987
989
|
/**
|
|
988
990
|
* Value of the input. The object format should match TipTap's JSON
|
|
@@ -1006,6 +1008,14 @@ const zt = Vt.exports, Wt = {
|
|
|
1006
1008
|
type: Boolean,
|
|
1007
1009
|
default: !1
|
|
1008
1010
|
},
|
|
1011
|
+
/**
|
|
1012
|
+
* When this option is false the editor will only ever paste plain text, no rich text formatting will be applied,
|
|
1013
|
+
* and any HTML will be rendered as text.
|
|
1014
|
+
*/
|
|
1015
|
+
pasteRichText: {
|
|
1016
|
+
type: Boolean,
|
|
1017
|
+
default: !0
|
|
1018
|
+
},
|
|
1009
1019
|
/**
|
|
1010
1020
|
* Whether the input allows for line breaks to be introduced in the text by pressing enter. If this is disabled,
|
|
1011
1021
|
* line breaks can still be entered by pressing shift+enter.
|
|
@@ -1044,8 +1054,8 @@ const zt = Vt.exports, Wt = {
|
|
|
1044
1054
|
autoFocus: {
|
|
1045
1055
|
type: [Boolean, String, Number],
|
|
1046
1056
|
default: !1,
|
|
1047
|
-
validator(
|
|
1048
|
-
return typeof
|
|
1057
|
+
validator(e) {
|
|
1058
|
+
return typeof e == "string" ? Le.includes(e) : !0;
|
|
1049
1059
|
}
|
|
1050
1060
|
},
|
|
1051
1061
|
/**
|
|
@@ -1057,8 +1067,8 @@ const zt = Vt.exports, Wt = {
|
|
|
1057
1067
|
outputFormat: {
|
|
1058
1068
|
type: String,
|
|
1059
1069
|
default: "html",
|
|
1060
|
-
validator(
|
|
1061
|
-
return
|
|
1070
|
+
validator(e) {
|
|
1071
|
+
return Re.includes(e);
|
|
1062
1072
|
}
|
|
1063
1073
|
},
|
|
1064
1074
|
/**
|
|
@@ -1310,8 +1320,8 @@ const zt = Vt.exports, Wt = {
|
|
|
1310
1320
|
editor: null,
|
|
1311
1321
|
tippyOptions: {
|
|
1312
1322
|
appendTo: () => {
|
|
1313
|
-
var
|
|
1314
|
-
return (
|
|
1323
|
+
var e;
|
|
1324
|
+
return (e = this.$refs.editor.$el.getRootNode()) == null ? void 0 : e.querySelector("body");
|
|
1315
1325
|
},
|
|
1316
1326
|
placement: "top-start"
|
|
1317
1327
|
}
|
|
@@ -1331,68 +1341,68 @@ const zt = Vt.exports, Wt = {
|
|
|
1331
1341
|
},
|
|
1332
1342
|
// eslint-disable-next-line complexity
|
|
1333
1343
|
extensions() {
|
|
1334
|
-
const
|
|
1335
|
-
|
|
1336
|
-
renderText({ node:
|
|
1337
|
-
return
|
|
1344
|
+
const e = [Z, de, me, te];
|
|
1345
|
+
e.push(this.useDivTags ? ut : O), this.allowBlockquote && e.push(Y), this.allowBold && e.push(ne), this.allowBulletList && (e.push(re), e.push(oe.extend({
|
|
1346
|
+
renderText({ node: r }) {
|
|
1347
|
+
return r.textContent;
|
|
1338
1348
|
}
|
|
1339
|
-
})),
|
|
1349
|
+
})), e.push(ae)), this.allowItalic && e.push(se), this.allowStrike && e.push(le), this.allowUnderline && e.push(ce), this.placeholder && e.push(
|
|
1340
1350
|
ee.configure({ placeholder: this.placeholder })
|
|
1341
1351
|
);
|
|
1342
|
-
const
|
|
1352
|
+
const t = this, n = J.create({
|
|
1343
1353
|
addKeyboardShortcuts() {
|
|
1344
1354
|
return {
|
|
1345
|
-
"Shift-Enter": ({ editor:
|
|
1346
|
-
() =>
|
|
1347
|
-
() =>
|
|
1348
|
-
() =>
|
|
1349
|
-
() =>
|
|
1350
|
-
() =>
|
|
1355
|
+
"Shift-Enter": ({ editor: r }) => t.allowLineBreaks ? !1 : (r.commands.first(({ commands: s }) => [
|
|
1356
|
+
() => s.newlineInCode(),
|
|
1357
|
+
() => t.allowBulletList && s.splitListItem("listItem"),
|
|
1358
|
+
() => s.createParagraphNear(),
|
|
1359
|
+
() => s.liftEmptyBlock(),
|
|
1360
|
+
() => s.splitBlock()
|
|
1351
1361
|
]), !0),
|
|
1352
|
-
Enter: () =>
|
|
1362
|
+
Enter: () => t.allowLineBreaks ? !1 : (t.$emit("enter"), !0)
|
|
1353
1363
|
};
|
|
1354
1364
|
}
|
|
1355
1365
|
});
|
|
1356
|
-
if (
|
|
1366
|
+
if (e.push(n), this.link && e.push(ie.extend({ inclusive: !1 }).configure({
|
|
1357
1367
|
HTMLAttributes: {
|
|
1358
1368
|
class: "d-link d-wb-break-all"
|
|
1359
1369
|
},
|
|
1360
1370
|
openOnClick: !1,
|
|
1361
1371
|
autolink: !0,
|
|
1362
|
-
protocols:
|
|
1363
|
-
})), this.customLink &&
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1372
|
+
protocols: $
|
|
1373
|
+
})), this.customLink && e.push(this.getExtension(ct, this.customLink)), this.mentionSuggestion) {
|
|
1374
|
+
const r = { ...this.mentionSuggestion, ...Mt };
|
|
1375
|
+
e.push(_t.configure({ suggestion: r }));
|
|
1366
1376
|
}
|
|
1367
1377
|
if (this.channelSuggestion) {
|
|
1368
|
-
const
|
|
1369
|
-
|
|
1378
|
+
const r = { ...this.channelSuggestion, ...qt };
|
|
1379
|
+
e.push(kt.configure({ suggestion: r }));
|
|
1370
1380
|
}
|
|
1371
1381
|
if (this.slashCommandSuggestion) {
|
|
1372
|
-
const
|
|
1373
|
-
|
|
1382
|
+
const r = { ...this.slashCommandSuggestion, ...Xt };
|
|
1383
|
+
e.push($t.configure({ suggestion: r }));
|
|
1374
1384
|
}
|
|
1375
|
-
return
|
|
1385
|
+
return e.push(tt), e.push(ue.configure({
|
|
1376
1386
|
types: ["paragraph"]
|
|
1377
|
-
})), this.allowCode &&
|
|
1378
|
-
renderText({ node:
|
|
1387
|
+
})), this.allowCode && e.push(Q), this.allowCodeblock && e.push(G.extend({
|
|
1388
|
+
renderText({ node: r }) {
|
|
1379
1389
|
return `\`\`\`
|
|
1380
|
-
${
|
|
1390
|
+
${r.textContent}
|
|
1381
1391
|
\`\`\``;
|
|
1382
1392
|
}
|
|
1383
1393
|
}).configure({
|
|
1384
1394
|
HTMLAttributes: {
|
|
1385
1395
|
class: "d-rich-text-editor__code-block"
|
|
1386
1396
|
}
|
|
1387
|
-
})), this.allowInlineImages &&
|
|
1397
|
+
})), this.allowInlineImages && e.push(dt), (this.allowFontFamily || this.allowFontColor) && (e.push(he), this.allowFontColor && e.push(fe), this.allowFontFamily && e.push(pe)), this.additionalExtensions.length && e.push(...this.additionalExtensions), e;
|
|
1388
1398
|
},
|
|
1389
1399
|
inputAttrs() {
|
|
1390
|
-
const
|
|
1400
|
+
const e = {
|
|
1391
1401
|
"aria-label": this.inputAriaLabel,
|
|
1392
1402
|
"aria-multiline": !0,
|
|
1393
1403
|
role: "textbox"
|
|
1394
1404
|
};
|
|
1395
|
-
return this.editable || (
|
|
1405
|
+
return this.editable || (e["aria-readonly"] = !0), e;
|
|
1396
1406
|
}
|
|
1397
1407
|
},
|
|
1398
1408
|
/**
|
|
@@ -1401,20 +1411,20 @@ ${n.textContent}
|
|
|
1401
1411
|
* to be hooked up to the Editor's own API.
|
|
1402
1412
|
*/
|
|
1403
1413
|
watch: {
|
|
1404
|
-
editable(
|
|
1405
|
-
this.editor.setEditable(
|
|
1414
|
+
editable(e) {
|
|
1415
|
+
this.editor.setEditable(e), this.updateEditorAttributes({ "aria-readonly": !e });
|
|
1406
1416
|
},
|
|
1407
|
-
inputClass(
|
|
1408
|
-
this.updateEditorAttributes({ class:
|
|
1417
|
+
inputClass(e) {
|
|
1418
|
+
this.updateEditorAttributes({ class: e });
|
|
1409
1419
|
},
|
|
1410
|
-
inputAriaLabel(
|
|
1411
|
-
this.updateEditorAttributes({ "aria-label":
|
|
1420
|
+
inputAriaLabel(e) {
|
|
1421
|
+
this.updateEditorAttributes({ "aria-label": e });
|
|
1412
1422
|
},
|
|
1413
1423
|
extensions() {
|
|
1414
1424
|
this.destroyEditor(), this.createEditor();
|
|
1415
1425
|
},
|
|
1416
|
-
value(
|
|
1417
|
-
this.processValue(
|
|
1426
|
+
value(e) {
|
|
1427
|
+
this.processValue(e);
|
|
1418
1428
|
}
|
|
1419
1429
|
},
|
|
1420
1430
|
created() {
|
|
@@ -1424,7 +1434,7 @@ ${n.textContent}
|
|
|
1424
1434
|
this.destroyEditor();
|
|
1425
1435
|
},
|
|
1426
1436
|
mounted() {
|
|
1427
|
-
|
|
1437
|
+
Ce(this.$el, this.$options.name), this.processValue(this.value, !1);
|
|
1428
1438
|
},
|
|
1429
1439
|
methods: {
|
|
1430
1440
|
createEditor() {
|
|
@@ -1433,97 +1443,155 @@ ${n.textContent}
|
|
|
1433
1443
|
content: this.value,
|
|
1434
1444
|
editable: this.editable,
|
|
1435
1445
|
extensions: this.extensions,
|
|
1446
|
+
parseOptions: {
|
|
1447
|
+
preserveWhitespace: "full"
|
|
1448
|
+
},
|
|
1436
1449
|
editorProps: {
|
|
1437
1450
|
attributes: {
|
|
1438
1451
|
...this.inputAttrs,
|
|
1439
1452
|
class: this.inputClass
|
|
1440
1453
|
},
|
|
1441
|
-
handlePaste: (t,
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
if (!(e != null && e.clipboardData))
|
|
1445
|
-
return !1;
|
|
1446
|
-
const n = e.clipboardData.getData("text");
|
|
1447
|
-
if (!r.test(n) || !e.clipboardData.getData("text/html"))
|
|
1448
|
-
return !1;
|
|
1449
|
-
const i = n.replace(/\n/g, "<br>").replace(/ {2}/g, " ");
|
|
1450
|
-
return this.editor.chain().focus().insertContent(i).run(), !0;
|
|
1451
|
-
}
|
|
1452
|
-
return !1;
|
|
1454
|
+
handlePaste: (e, t, n) => {
|
|
1455
|
+
const r = t.clipboardData || window.clipboardData, s = r.getData("text/plain"), o = r.getData("text/html");
|
|
1456
|
+
return this.processPasteData(e, s, o);
|
|
1453
1457
|
},
|
|
1454
1458
|
// Moves the <br /> tags inside the previous closing tag to avoid
|
|
1455
1459
|
// Prosemirror wrapping them within another </p> tag.
|
|
1456
|
-
transformPastedHTML(
|
|
1457
|
-
return
|
|
1460
|
+
transformPastedHTML(e) {
|
|
1461
|
+
return e.replace(/(<\/\w+>)((<br \/>)+)/g, "$2$3$1");
|
|
1458
1462
|
}
|
|
1459
1463
|
}
|
|
1460
1464
|
}), this.addEditorListeners();
|
|
1461
1465
|
},
|
|
1462
|
-
bubbleMenuShouldShow({ editor:
|
|
1463
|
-
return
|
|
1466
|
+
bubbleMenuShouldShow({ editor: e, view: t, state: n, oldState: r, from: s, to: o }) {
|
|
1467
|
+
return e.isActive("link");
|
|
1464
1468
|
},
|
|
1465
1469
|
/**
|
|
1466
1470
|
* If the selection contains a link, return the existing link text.
|
|
1467
1471
|
* Otherwise, use just the selected text.
|
|
1468
1472
|
* @param editor the editor instance.
|
|
1469
1473
|
*/
|
|
1470
|
-
getSelectedLinkText(
|
|
1474
|
+
getSelectedLinkText(e) {
|
|
1471
1475
|
var a, l, d;
|
|
1472
|
-
const { view:
|
|
1473
|
-
return
|
|
1476
|
+
const { view: t, state: n } = e, { from: r, to: s } = t.state.selection, o = n.doc.textBetween(r, s, ""), i = this.editor.state.doc.nodeAt(r);
|
|
1477
|
+
return i && ((d = (l = (a = i.marks) == null ? void 0 : a.at(0)) == null ? void 0 : l.type) == null ? void 0 : d.name) === "link" ? i.textContent : o;
|
|
1474
1478
|
},
|
|
1475
1479
|
editLink() {
|
|
1476
|
-
const
|
|
1480
|
+
const e = this.getSelectedLinkText(this.editor), t = {
|
|
1477
1481
|
href: this.editor.getAttributes("link").href,
|
|
1478
|
-
text:
|
|
1482
|
+
text: e
|
|
1479
1483
|
};
|
|
1480
|
-
this.$emit("edit-link",
|
|
1484
|
+
this.$emit("edit-link", t);
|
|
1481
1485
|
},
|
|
1482
1486
|
removeLink() {
|
|
1483
|
-
var t,
|
|
1484
|
-
(
|
|
1487
|
+
var e, t, n, r;
|
|
1488
|
+
(r = (n = (t = (e = this.editor) == null ? void 0 : e.chain()) == null ? void 0 : t.focus()) == null ? void 0 : n.unsetLink()) == null || r.run();
|
|
1485
1489
|
},
|
|
1486
1490
|
openLink() {
|
|
1487
|
-
var
|
|
1488
|
-
(
|
|
1489
|
-
const
|
|
1490
|
-
window.open(
|
|
1491
|
+
var t, n;
|
|
1492
|
+
(n = (t = this.editor) == null ? void 0 : t.chain()) == null || n.focus();
|
|
1493
|
+
const e = this.editor.getAttributes("link").href;
|
|
1494
|
+
window.open(e, "_blank");
|
|
1491
1495
|
},
|
|
1492
1496
|
// eslint-disable-next-line complexity
|
|
1493
|
-
setLink(t,
|
|
1497
|
+
setLink(e, t, n, r = $, s) {
|
|
1494
1498
|
var a, l, d;
|
|
1495
|
-
if (!
|
|
1499
|
+
if (!e) {
|
|
1496
1500
|
this.removeLink();
|
|
1497
1501
|
return;
|
|
1498
1502
|
}
|
|
1499
|
-
|
|
1500
|
-
const
|
|
1501
|
-
this.editor.chain().focus().insertContent(
|
|
1503
|
+
r.find((u) => u.test(e)) || (e = `${s}${e}`), this.editor.chain().focus().extendMarkRange("link").run();
|
|
1504
|
+
const i = (d = (l = (a = this.editor) == null ? void 0 : a.view) == null ? void 0 : l.state) == null ? void 0 : d.selection;
|
|
1505
|
+
this.editor.chain().focus().insertContent(t).setTextSelection({ from: i.from, to: i.from + t.length }).setLink({ href: e, class: n.class }).run();
|
|
1502
1506
|
},
|
|
1503
1507
|
// eslint-disable-next-line complexity
|
|
1504
|
-
processValue(
|
|
1505
|
-
const
|
|
1506
|
-
if (!(
|
|
1507
|
-
if (typeof
|
|
1508
|
-
const
|
|
1509
|
-
|
|
1508
|
+
processValue(e, t = !0) {
|
|
1509
|
+
const n = this.getOutput();
|
|
1510
|
+
if (!(t && Ae(e, n))) {
|
|
1511
|
+
if (typeof e == "string" && this.outputFormat === "text") {
|
|
1512
|
+
const r = new RegExp(`(${B})`, "g");
|
|
1513
|
+
e = e == null ? void 0 : e.replace(r, '<emoji-component code="$1"></emoji-component>');
|
|
1510
1514
|
}
|
|
1511
|
-
this.editor.commands.setContent(
|
|
1515
|
+
this.editor.commands.setContent(e, !1, { preserveWhitespace: "full" });
|
|
1512
1516
|
}
|
|
1513
1517
|
},
|
|
1514
1518
|
destroyEditor() {
|
|
1515
1519
|
this.editor.destroy();
|
|
1516
1520
|
},
|
|
1521
|
+
insertPlainTextWithHardBreaks(e, t) {
|
|
1522
|
+
const { tr: n } = e.state, { from: r, to: s } = e.state.selection;
|
|
1523
|
+
n.deleteRange(r, s);
|
|
1524
|
+
const o = t.split(/\r?\n/);
|
|
1525
|
+
let i = r;
|
|
1526
|
+
for (let a = 0; a < o.length; a++)
|
|
1527
|
+
a > 0 && (n.insert(i, e.state.schema.nodes.hardBreak.create()), i++), n.insertText(o[a], i), i += o[a].length;
|
|
1528
|
+
e.dispatch(n);
|
|
1529
|
+
},
|
|
1530
|
+
shouldPreserveLineBreaks(e, t) {
|
|
1531
|
+
return this.pasteRichText ? !t && e && this.hasBlankLines(e) : !!e;
|
|
1532
|
+
},
|
|
1533
|
+
processPasteData(e, t, n) {
|
|
1534
|
+
if (this.shouldPreserveLineBreaks(t, n))
|
|
1535
|
+
return this.insertPlainTextWithHardBreaks(e, t), !0;
|
|
1536
|
+
if (this.shouldHandlePreformattedHTML(n)) {
|
|
1537
|
+
const r = this.extractPreformattedText(n);
|
|
1538
|
+
if (r && r.includes(`
|
|
1539
|
+
`))
|
|
1540
|
+
return this.insertPlainTextWithHardBreaks(e, r), !0;
|
|
1541
|
+
}
|
|
1542
|
+
return !1;
|
|
1543
|
+
},
|
|
1544
|
+
shouldHandlePreformattedHTML(e) {
|
|
1545
|
+
return this.pasteRichText && e && this.containsPreformattedContent(e);
|
|
1546
|
+
},
|
|
1547
|
+
containsPreformattedContent(e) {
|
|
1548
|
+
const t = document.createElement("div");
|
|
1549
|
+
t.innerHTML = e;
|
|
1550
|
+
const n = t.querySelectorAll("*");
|
|
1551
|
+
for (const r of n)
|
|
1552
|
+
if (this.hasPreWhitespace(r) && this.hasLineBreaks(r))
|
|
1553
|
+
return !0;
|
|
1554
|
+
return !1;
|
|
1555
|
+
},
|
|
1556
|
+
hasPreWhitespace(e) {
|
|
1557
|
+
const t = e.getAttribute("style") || "", n = e.style.whiteSpace || "", r = n === "pre" || n === "pre-wrap", s = t.includes("white-space: pre");
|
|
1558
|
+
return r || s;
|
|
1559
|
+
},
|
|
1560
|
+
hasLineBreaks(e) {
|
|
1561
|
+
return e.textContent && e.textContent.includes(`
|
|
1562
|
+
`);
|
|
1563
|
+
},
|
|
1564
|
+
hasBlankLines(e) {
|
|
1565
|
+
return e.includes(`
|
|
1566
|
+
|
|
1567
|
+
`) || /\n\s*\n/.test(e);
|
|
1568
|
+
},
|
|
1569
|
+
extractPreformattedText(e) {
|
|
1570
|
+
const t = document.createElement("div");
|
|
1571
|
+
return t.innerHTML = e, this.walkAndExtractText(t);
|
|
1572
|
+
},
|
|
1573
|
+
walkAndExtractText(e) {
|
|
1574
|
+
let t = "";
|
|
1575
|
+
if (e.nodeType === Node.TEXT_NODE)
|
|
1576
|
+
t += e.textContent;
|
|
1577
|
+
else if (e.nodeType === Node.ELEMENT_NODE)
|
|
1578
|
+
if (this.hasPreWhitespace(e))
|
|
1579
|
+
t += e.textContent;
|
|
1580
|
+
else
|
|
1581
|
+
for (const n of e.childNodes)
|
|
1582
|
+
t += this.walkAndExtractText(n);
|
|
1583
|
+
return t;
|
|
1584
|
+
},
|
|
1517
1585
|
triggerInputChangeEvents() {
|
|
1518
|
-
const
|
|
1519
|
-
this.$emit("input",
|
|
1520
|
-
const
|
|
1521
|
-
this.$emit("json-input",
|
|
1522
|
-
const
|
|
1523
|
-
this.$emit("html-input",
|
|
1524
|
-
const
|
|
1586
|
+
const e = this.getOutput();
|
|
1587
|
+
this.$emit("input", e), this.$emit("update:value", e);
|
|
1588
|
+
const t = this.editor.getJSON();
|
|
1589
|
+
this.$emit("json-input", t);
|
|
1590
|
+
const n = this.editor.getHTML();
|
|
1591
|
+
this.$emit("html-input", n);
|
|
1592
|
+
const r = this.editor.getText({ blockSeparator: `
|
|
1525
1593
|
` });
|
|
1526
|
-
this.$emit("text-input",
|
|
1594
|
+
this.$emit("text-input", r);
|
|
1527
1595
|
},
|
|
1528
1596
|
/**
|
|
1529
1597
|
* The Editor exposes event hooks that we have to map our emits into. See
|
|
@@ -1533,18 +1601,18 @@ ${n.textContent}
|
|
|
1533
1601
|
this.editor.on("create", () => {
|
|
1534
1602
|
this.triggerInputChangeEvents();
|
|
1535
1603
|
}), this.editor.on("update", () => {
|
|
1536
|
-
var
|
|
1537
|
-
if (this.preventTyping && ((
|
|
1604
|
+
var e, t;
|
|
1605
|
+
if (this.preventTyping && ((t = (e = this.editor.view) == null ? void 0 : e.input) == null ? void 0 : t.lastKeyCode) !== 8) {
|
|
1538
1606
|
this.editor.commands.setContent(this.value, !1);
|
|
1539
1607
|
return;
|
|
1540
1608
|
}
|
|
1541
1609
|
this.triggerInputChangeEvents();
|
|
1542
|
-
}), this.editor.on("selectionUpdate", ({ editor:
|
|
1543
|
-
this.$emit("selected", this.getSelectedLinkText(
|
|
1544
|
-
}), this.editor.on("focus", ({ event:
|
|
1545
|
-
this.$emit("focus",
|
|
1546
|
-
}), this.editor.on("blur", ({ event:
|
|
1547
|
-
this.$emit("blur",
|
|
1610
|
+
}), this.editor.on("selectionUpdate", ({ editor: e }) => {
|
|
1611
|
+
this.$emit("selected", this.getSelectedLinkText(e));
|
|
1612
|
+
}), this.editor.on("focus", ({ event: e }) => {
|
|
1613
|
+
this.$emit("focus", e);
|
|
1614
|
+
}), this.editor.on("blur", ({ event: e }) => {
|
|
1615
|
+
this.$emit("blur", e);
|
|
1548
1616
|
});
|
|
1549
1617
|
},
|
|
1550
1618
|
getOutput() {
|
|
@@ -1559,17 +1627,17 @@ ${n.textContent}
|
|
|
1559
1627
|
` });
|
|
1560
1628
|
}
|
|
1561
1629
|
},
|
|
1562
|
-
getExtension(
|
|
1563
|
-
var
|
|
1564
|
-
return typeof
|
|
1630
|
+
getExtension(e, t) {
|
|
1631
|
+
var n;
|
|
1632
|
+
return typeof t == "boolean" ? e : (n = e.configure) == null ? void 0 : n.call(e, t);
|
|
1565
1633
|
},
|
|
1566
|
-
updateEditorAttributes(
|
|
1634
|
+
updateEditorAttributes(e) {
|
|
1567
1635
|
this.editor.setOptions({
|
|
1568
1636
|
editorProps: {
|
|
1569
1637
|
attributes: {
|
|
1570
1638
|
...this.inputAttrs,
|
|
1571
1639
|
class: this.inputClass,
|
|
1572
|
-
...
|
|
1640
|
+
...e
|
|
1573
1641
|
}
|
|
1574
1642
|
}
|
|
1575
1643
|
});
|
|
@@ -1579,15 +1647,15 @@ ${n.textContent}
|
|
|
1579
1647
|
}
|
|
1580
1648
|
}
|
|
1581
1649
|
};
|
|
1582
|
-
var
|
|
1583
|
-
var
|
|
1584
|
-
return
|
|
1585
|
-
},
|
|
1586
|
-
Xt,
|
|
1650
|
+
var Yt = function() {
|
|
1651
|
+
var t = this, n = t._self._c;
|
|
1652
|
+
return n("div", [t.editor && t.link && !t.hideLinkBubbleMenu ? n("bubble-menu", { staticStyle: { visibility: "visible" }, attrs: { editor: t.editor, "should-show": t.bubbleMenuShouldShow, "tippy-options": t.tippyOptions } }, [n("div", { staticClass: "d-popover__dialog" }, [n("dt-stack", { staticClass: "d-rich-text-editor-bubble-menu__button-stack", attrs: { direction: "row", gap: "0" } }, [n("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: t.editLink } }, [t._v(" " + t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL")) + " ")]), n("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: t.openLink } }, [t._v(" " + t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL")) + " ")]), n("dt-button", { attrs: { kind: "danger", importance: "clear" }, on: { click: t.removeLink } }, [t._v(" " + t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL")) + " ")])], 1)], 1)]) : t._e(), n("editor-content", t._g({ ref: "editor", staticClass: "d-rich-text-editor", attrs: { editor: t.editor, "data-qa": "dt-rich-text-editor" } }, t.editorListeners))], 1);
|
|
1653
|
+
}, Gt = [], Qt = /* @__PURE__ */ c(
|
|
1587
1654
|
Jt,
|
|
1588
|
-
Yt
|
|
1655
|
+
Yt,
|
|
1656
|
+
Gt
|
|
1589
1657
|
);
|
|
1590
|
-
const Kn =
|
|
1658
|
+
const Kn = Qt.exports;
|
|
1591
1659
|
export {
|
|
1592
1660
|
Kn as default
|
|
1593
1661
|
};
|