@rhino-design/vue 0.2.1 → 0.2.3
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 +4 -6
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/_virtual/alignment-pattern.js +4 -0
- package/dist/_virtual/browser.js +4 -0
- package/dist/_virtual/canvas.js +4 -0
- package/dist/_virtual/dijkstra.js +4 -0
- package/dist/_virtual/error-correction-code.js +4 -0
- package/dist/_virtual/error-correction-level.js +4 -0
- package/dist/_virtual/finder-pattern.js +4 -0
- package/dist/_virtual/format-info.js +4 -0
- package/dist/_virtual/galois-field.js +4 -0
- package/dist/_virtual/mask-pattern.js +4 -0
- package/dist/_virtual/mode.js +4 -0
- package/dist/_virtual/polynomial.js +4 -0
- package/dist/_virtual/qrcode.js +4 -0
- package/dist/_virtual/regex.js +4 -0
- package/dist/_virtual/segments.js +4 -0
- package/dist/_virtual/svg-tag.js +4 -0
- package/dist/_virtual/utils.js +4 -0
- package/dist/_virtual/utils2.js +4 -0
- package/dist/_virtual/version-check.js +4 -0
- package/dist/_virtual/version.js +4 -0
- package/dist/arco.less +14834 -0
- package/dist/components/XAffix.vue.d.ts +1 -1
- package/dist/components/XAffix.vue.js +7 -0
- package/dist/components/XAffix.vue2.js +181 -0
- package/dist/components/XAlert.vue.js +106 -0
- package/dist/components/XAlert.vue2.js +4 -0
- package/dist/components/XAnchor.vue.d.ts +2 -2
- package/dist/components/XAnchor.vue.js +9 -0
- package/dist/components/XAnchor.vue2.js +204 -0
- package/dist/components/XAnchorLink.vue.js +7 -0
- package/dist/components/XAnchorLink.vue2.js +44 -0
- package/dist/components/XApp.vue.js +12 -0
- package/dist/components/XAutoComplete.vue.d.ts +649 -15
- package/dist/components/XAutoComplete.vue.js +399 -0
- package/dist/components/XAutoComplete.vue2.js +4 -0
- package/dist/components/XAvatar.vue.d.ts +2 -2
- package/dist/components/XAvatar.vue.js +166 -0
- package/dist/components/XAvatar.vue2.js +4 -0
- package/dist/components/XAvatarGroup.vue.js +27 -0
- package/dist/components/XAvatarGroup.vue2.js +4 -0
- package/dist/components/XBackTop.vue.d.ts +23 -7
- package/dist/components/XBackTop.vue.js +118 -0
- package/dist/components/XBackTop.vue2.js +4 -0
- package/dist/components/XBadge.vue.d.ts +3 -3
- package/dist/components/XBadge.vue.js +64 -0
- package/dist/components/XBadge.vue2.js +4 -0
- package/dist/components/XBaseMenu.vue.d.ts +5 -5
- package/dist/components/XBaseMenu.vue.js +37 -0
- package/dist/components/XBaseMenu.vue2.js +334 -0
- package/dist/components/XBreadcrumb.vue.d.ts +31 -6
- package/dist/components/XBreadcrumb.vue.js +97 -0
- package/dist/components/XBreadcrumb.vue2.js +4 -0
- package/dist/components/XBreadcrumbItem.vue.d.ts +21 -6
- package/dist/components/XBreadcrumbItem.vue.js +136 -0
- package/dist/components/XBreadcrumbItem.vue2.js +4 -0
- package/dist/components/XButton.vue.d.ts +4 -4
- package/dist/components/XButton.vue.js +7 -0
- package/dist/components/XButton.vue2.js +142 -0
- package/dist/components/XButtonG.vue.d.ts +2 -2
- package/dist/components/XButtonG.vue.js +7 -0
- package/dist/components/XButtonG.vue2.js +67 -0
- package/dist/components/XButtonGroup.vue.d.ts +1 -1
- package/dist/components/XButtonGroup.vue.js +39 -0
- package/dist/components/XButtonGroup.vue3.js +5 -0
- package/dist/components/XCalendar.vue.d.ts +5 -2
- package/dist/components/XCalendar.vue.js +309 -0
- package/dist/components/XCalendar.vue2.js +4 -0
- package/dist/components/XCard.vue.d.ts +1 -1
- package/dist/components/XCard.vue.js +80 -0
- package/dist/components/XCard.vue2.js +4 -0
- package/dist/components/XCarousel.vue.d.ts +2 -2
- package/dist/components/XCarousel.vue.js +7 -0
- package/dist/components/XCarousel.vue2.js +150 -0
- package/dist/components/XCarouselItem.vue.js +7 -0
- package/dist/components/XCarouselItem.vue2.js +112 -0
- package/dist/components/XCascader.vue.d.ts +19 -19
- package/dist/components/XCascader.vue.js +1015 -0
- package/dist/components/XCascader.vue2.js +4 -0
- package/dist/components/XCascaderPanel.vue.d.ts +6 -6
- package/dist/components/XCascaderPanel.vue.js +466 -0
- package/dist/components/XCascaderPanel.vue2.js +4 -0
- package/dist/components/XChatInput.vue.d.ts +5 -5
- package/dist/components/XChatInput.vue.js +7 -0
- package/dist/components/XChatInput.vue2.js +454 -0
- package/dist/components/XCheckbox.vue.d.ts +14 -8
- package/dist/components/XCheckbox.vue.js +154 -0
- package/dist/components/XCheckbox.vue2.js +4 -0
- package/dist/components/XCheckboxGroup.vue.d.ts +36 -13
- package/dist/components/XCheckboxGroup.vue.js +87 -0
- package/dist/components/XCheckboxGroup.vue2.js +4 -0
- package/dist/components/XCollapse.vue.d.ts +14 -7
- package/dist/components/XCollapse.vue.js +54 -0
- package/dist/components/XCollapse.vue2.js +4 -0
- package/dist/components/XCollapseItem.vue.d.ts +16 -4
- package/dist/components/XCollapseItem.vue.js +152 -0
- package/dist/components/XCollapseItem.vue2.js +4 -0
- package/dist/components/XColorGroup.vue.d.ts +1 -1
- package/dist/components/XColorGroup.vue.js +7 -0
- package/dist/components/XColorGroup.vue2.js +306 -0
- package/dist/components/XColorPicker.vue.js +62 -0
- package/dist/components/XColorPicker.vue2.js +4 -0
- package/dist/components/XComment.vue.js +129 -0
- package/dist/components/XComment.vue2.js +4 -0
- package/dist/components/XCompact.vue.js +17 -0
- package/dist/components/XCompact.vue2.js +4 -0
- package/dist/components/XConfigProvider.vue.d.ts +17 -4
- package/dist/components/XConfigProvider.vue.js +78 -0
- package/dist/components/XConfigProvider.vue2.js +4 -0
- package/dist/components/XCountdown.vue.d.ts +2 -2
- package/dist/components/XCountdown.vue.js +7 -0
- package/dist/components/XCountdown.vue2.js +104 -0
- package/dist/components/XCropper.vue.d.ts +2 -2
- package/dist/components/XCropper.vue.js +7 -0
- package/dist/components/XCropper.vue2.js +525 -0
- package/dist/components/XDatePicker.vue.d.ts +17 -17
- package/dist/components/XDatePicker.vue.js +1798 -0
- package/dist/components/XDatePicker.vue2.js +4 -0
- package/dist/components/XDescriptions.vue.d.ts +4 -4
- package/dist/components/XDescriptions.vue.js +260 -0
- package/dist/components/XDescriptions.vue2.js +4 -0
- package/dist/components/XDescriptionsItem.vue.d.ts +2 -1
- package/dist/components/XDescriptionsItem.vue.js +21 -0
- package/dist/components/XDescriptionsItem.vue2.js +4 -0
- package/dist/components/XDgroup.vue.d.ts +21 -0
- package/dist/components/XDgroup.vue.js +21 -0
- package/dist/components/XDgroup.vue2.js +4 -0
- package/dist/components/XDivider.vue.js +54 -0
- package/dist/components/XDivider.vue2.js +4 -0
- package/dist/components/XDoption.vue.d.ts +38 -0
- package/dist/components/XDoption.vue.js +59 -0
- package/dist/components/XDoption.vue2.js +4 -0
- package/dist/components/XDrawer.vue.d.ts +7 -7
- package/dist/components/XDrawer.vue.js +7 -0
- package/dist/components/XDrawer.vue2.js +320 -0
- package/dist/components/XDrawerService.d.ts +2 -0
- package/dist/components/XDrawerService.js +97 -0
- package/dist/components/XDropdown.vue.d.ts +43 -17
- package/dist/components/XDropdown.vue.js +127 -0
- package/dist/components/XDropdown.vue2.js +4 -0
- package/dist/components/XDropdownButton.vue.d.ts +65 -0
- package/dist/components/XDropdownButton.vue.js +84 -0
- package/dist/components/XDropdownButton.vue2.js +4 -0
- package/dist/components/XDropdownItem.vue.d.ts +29 -0
- package/dist/components/XDropdownItem.vue.js +47 -0
- package/dist/components/XDropdownItem.vue2.js +4 -0
- package/dist/components/XDropdownPanel.vue.d.ts +33 -0
- package/dist/components/XDropdownPanel.vue.js +58 -0
- package/dist/components/XDropdownPanel.vue2.js +4 -0
- package/dist/components/XDsubmenu.vue.d.ts +48 -0
- package/dist/components/XDsubmenu.vue.js +82 -0
- package/dist/components/XDsubmenu.vue2.js +4 -0
- package/dist/components/XEmpty.vue.d.ts +2 -2
- package/dist/components/XEmpty.vue.js +54 -0
- package/dist/components/XEmpty.vue2.js +4 -0
- package/dist/components/XFlex.vue.js +7 -0
- package/dist/components/XFlex.vue2.js +122 -0
- package/dist/components/XFloatButton.vue.js +28 -0
- package/dist/components/XFloatButton.vue2.js +4 -0
- package/dist/components/XFloatButtonGroup.vue.js +17 -0
- package/dist/components/XFloatButtonGroup.vue2.js +4 -0
- package/dist/components/XForm.vue.d.ts +2 -2
- package/dist/components/XForm.vue.js +156 -0
- package/dist/components/XForm.vue2.js +4 -0
- package/dist/components/XFormItem.vue.d.ts +21 -5
- package/dist/components/XFormItem.vue.js +425 -0
- package/dist/components/XFormItem.vue2.js +4 -0
- package/dist/components/XGrid.vue.d.ts +1 -1
- package/dist/components/XGrid.vue.js +7 -0
- package/dist/components/XGrid.vue2.js +88 -0
- package/dist/components/XGridItem.vue.d.ts +3 -3
- package/dist/components/XGridItem.vue.js +8 -0
- package/dist/components/XGridItem.vue2.js +112 -0
- package/dist/components/XGridLayout.vue.js +7 -0
- package/dist/components/XGridLayout.vue2.js +66 -0
- package/dist/components/XGridLayoutItem.vue.d.ts +1 -1
- package/dist/components/XGridLayoutItem.vue.js +7 -0
- package/dist/components/XGridLayoutItem.vue2.js +56 -0
- package/dist/components/XIcon.d.ts +1 -1
- package/dist/components/XIcon.js +5 -0
- package/dist/components/XIconLite.d.ts +1 -1
- package/dist/components/XIconLite.js +8 -0
- package/dist/components/XImage.vue.d.ts +7 -3
- package/dist/components/XImage.vue.js +7 -0
- package/dist/components/XImage.vue2.js +241 -0
- package/dist/components/XImageGroup.vue.js +7 -0
- package/dist/components/XImageGroup.vue2.js +22 -0
- package/dist/components/XInput.vue.d.ts +5 -5
- package/dist/components/XInput.vue.js +7 -0
- package/dist/components/XInput.vue2.js +537 -0
- package/dist/components/XInputComposite.vue.d.ts +12 -12
- package/dist/components/XInputComposite.vue.js +7 -0
- package/dist/components/XInputComposite.vue2.js +176 -0
- package/dist/components/XInputGroup.vue.js +19 -0
- package/dist/components/XInputGroup.vue3.js +5 -0
- package/dist/components/XInputNumber.vue.d.ts +9 -9
- package/dist/components/XInputNumber.vue.js +7 -0
- package/dist/components/XInputNumber.vue2.js +344 -0
- package/dist/components/XInputPassword.vue.d.ts +24 -24
- package/dist/components/XInputPassword.vue.js +7 -0
- package/dist/components/XInputPassword.vue2.js +125 -0
- package/dist/components/XInputSearch.vue.d.ts +26 -26
- package/dist/components/XInputSearch.vue.js +7 -0
- package/dist/components/XInputSearch.vue2.js +154 -0
- package/dist/components/XInputTag.vue.d.ts +10 -10
- package/dist/components/XInputTag.vue.js +367 -0
- package/dist/components/XInputTag.vue2.js +4 -0
- package/dist/components/XLayout.vue.js +22 -0
- package/dist/components/XLayout.vue2.js +4 -0
- package/dist/components/XLayoutContent.vue.js +13 -0
- package/dist/components/XLayoutContent.vue2.js +4 -0
- package/dist/components/XLayoutFooter.vue.js +22 -0
- package/dist/components/XLayoutFooter.vue2.js +4 -0
- package/dist/components/XLayoutHeader.vue.js +128 -0
- package/dist/components/XLayoutHeader.vue2.js +4 -0
- package/dist/components/XLayoutSider.vue.js +108 -0
- package/dist/components/XLayoutSider.vue2.js +4 -0
- package/dist/components/XLink.vue.d.ts +1 -1
- package/dist/components/XLink.vue.js +21 -0
- package/dist/components/XLink.vue2.js +4 -0
- package/dist/components/XList.vue.d.ts +8 -5
- package/dist/components/XList.vue.js +295 -0
- package/dist/components/XList.vue2.js +4 -0
- package/dist/components/XListItem.vue.d.ts +2 -3
- package/dist/components/XListItem.vue.js +53 -0
- package/dist/components/XListItem.vue2.js +4 -0
- package/dist/components/XListItemMeta.vue.js +43 -0
- package/dist/components/XListItemMeta.vue2.js +4 -0
- package/dist/components/XMention.vue.d.ts +899 -0
- package/dist/components/XMention.vue.js +456 -0
- package/dist/components/XMention.vue2.js +4 -0
- package/dist/components/XMentions.vue.js +16 -0
- package/dist/components/XMentions.vue2.js +4 -0
- package/dist/components/XMenu.vue.d.ts +7 -7
- package/dist/components/XMenu.vue.js +57 -0
- package/dist/components/XMenu.vue2.js +123 -0
- package/dist/components/XMenuIndent.vue.js +19 -0
- package/dist/components/XMenuIndent.vue2.js +21 -0
- package/dist/components/XMenuItem.vue.d.ts +43 -43
- package/dist/components/XMenuItem.vue.js +71 -0
- package/dist/components/XMenuItem.vue2.js +92 -0
- package/dist/components/XMenuItemGroup.vue.js +27 -0
- package/dist/components/XMenuItemGroup.vue2.js +26 -0
- package/dist/components/XMenuOverflowWrap.vue.js +116 -0
- package/dist/components/XMenuOverflowWrap.vue2.js +4 -0
- package/dist/components/XMessage.vue.d.ts +1 -1
- package/dist/components/XMessage.vue.js +7 -0
- package/dist/components/XMessage.vue2.js +89 -0
- package/dist/components/XMessageList.d.ts +1 -1
- package/dist/components/XMessageList.js +61 -0
- package/dist/components/XMessageService.d.ts +2 -0
- package/dist/components/XMessageService.js +118 -0
- package/dist/components/XModal.vue.d.ts +8 -8
- package/dist/components/XModal.vue.js +7 -0
- package/dist/components/XModal.vue2.js +364 -0
- package/dist/components/XModalService.d.ts +2 -0
- package/dist/components/XModalService.js +157 -0
- package/dist/components/XNotification.vue.d.ts +31 -20
- package/dist/components/XNotification.vue.js +7 -0
- package/dist/components/XNotification.vue2.js +107 -0
- package/dist/components/XNotificationList.d.ts +39 -0
- package/dist/components/XNotificationList.js +70 -0
- package/dist/components/XNotificationService.d.ts +54 -15
- package/dist/components/XNotificationService.js +119 -0
- package/dist/components/XOptgroup.vue.d.ts +1 -0
- package/dist/components/XOptgroup.vue.js +14 -0
- package/dist/components/XOptgroup.vue2.js +4 -0
- package/dist/components/XOption.vue.d.ts +1 -0
- package/dist/components/XOption.vue.js +21 -0
- package/dist/components/XOption.vue2.js +4 -0
- package/dist/components/XOverflowList.vue.d.ts +38 -8
- package/dist/components/XOverflowList.vue.js +149 -0
- package/dist/components/XOverflowList.vue2.js +4 -0
- package/dist/components/XPageHeader.vue.d.ts +11 -5
- package/dist/components/XPageHeader.vue.js +84 -0
- package/dist/components/XPageHeader.vue2.js +4 -0
- package/dist/components/XPagination.vue.js +121 -0
- package/dist/components/XPagination.vue2.js +4 -0
- package/dist/components/XPopconfirm.vue.d.ts +82 -77
- package/dist/components/XPopconfirm.vue.js +90 -0
- package/dist/components/XPopconfirm.vue2.js +4 -0
- package/dist/components/XPopover.vue.d.ts +3 -3
- package/dist/components/XPopover.vue.js +53 -0
- package/dist/components/XPopover.vue2.js +4 -0
- package/dist/components/XProgress.vue.d.ts +2 -2
- package/dist/components/XProgress.vue.js +263 -0
- package/dist/components/XProgress.vue2.js +4 -0
- package/dist/components/XQRCode.vue.d.ts +3 -3
- package/dist/components/XQRCode.vue.js +141 -0
- package/dist/components/XQRCode.vue2.js +4 -0
- package/dist/components/XRadio.vue.d.ts +1 -1
- package/dist/components/XRadio.vue.js +138 -0
- package/dist/components/XRadio.vue2.js +4 -0
- package/dist/components/XRadioButton.vue.d.ts +1 -1
- package/dist/components/XRadioButton.vue.js +41 -0
- package/dist/components/XRadioButton.vue2.js +4 -0
- package/dist/components/XRadioGroup.vue.d.ts +3 -3
- package/dist/components/XRadioGroup.vue.js +168 -0
- package/dist/components/XRadioGroup.vue2.js +4 -0
- package/dist/components/XRate.vue.d.ts +3 -3
- package/dist/components/XRate.vue.js +145 -0
- package/dist/components/XRate.vue2.js +4 -0
- package/dist/components/XResizeBox.vue.d.ts +41 -9
- package/dist/components/XResizeBox.vue.js +184 -0
- package/dist/components/XResizeBox.vue2.js +4 -0
- package/dist/components/XResult.vue.js +78 -0
- package/dist/components/XResult.vue2.js +4 -0
- package/dist/components/XRichTextEditor.vue.d.ts +2 -2
- package/dist/components/XRichTextEditor.vue.js +7 -0
- package/dist/components/XRichTextEditor.vue2.js +742 -0
- package/dist/components/XScrollbar.vue.d.ts +176 -5
- package/dist/components/XScrollbar.vue.js +190 -0
- package/dist/components/XScrollbar.vue2.js +4 -0
- package/dist/components/XScrollbarThumb.vue.d.ts +22 -0
- package/dist/components/XScrollbarThumb.vue.js +97 -0
- package/dist/components/XScrollbarThumb.vue2.js +4 -0
- package/dist/components/XSegmented.vue.js +7 -0
- package/dist/components/XSegmented.vue2.js +71 -0
- package/dist/components/XSelect.vue.d.ts +27 -27
- package/dist/components/XSelect.vue.js +858 -0
- package/dist/components/XSelect.vue2.js +4 -0
- package/dist/components/XSkeleton.vue.d.ts +100 -29
- package/dist/components/XSkeleton.vue.js +37 -0
- package/dist/components/XSkeleton.vue2.js +59 -0
- package/dist/components/XSkeletonLine.vue.d.ts +15 -0
- package/dist/components/XSkeletonLine.vue.js +36 -0
- package/dist/components/XSkeletonLine.vue2.js +4 -0
- package/dist/components/XSkeletonShape.vue.d.ts +9 -0
- package/dist/components/XSkeletonShape.vue.js +21 -0
- package/dist/components/XSkeletonShape.vue2.js +4 -0
- package/dist/components/XSlider.vue.d.ts +86 -86
- package/dist/components/XSlider.vue.js +402 -0
- package/dist/components/XSlider.vue2.js +4 -0
- package/dist/components/XSpace.vue.d.ts +59 -28
- package/dist/components/XSpace.vue.js +125 -0
- package/dist/components/XSpace.vue2.js +4 -0
- package/dist/components/XSpin.vue.js +54 -0
- package/dist/components/XSpin.vue2.js +4 -0
- package/dist/components/XSplit.vue.d.ts +3 -3
- package/dist/components/XSplit.vue.js +7 -0
- package/dist/components/XSplit.vue2.js +126 -0
- package/dist/components/XStatistic.vue.d.ts +5 -5
- package/dist/components/XStatistic.vue.js +7 -0
- package/dist/components/XStatistic.vue2.js +176 -0
- package/dist/components/XStep.vue.d.ts +3 -3
- package/dist/components/XStep.vue.js +91 -0
- package/dist/components/XStep.vue2.js +4 -0
- package/dist/components/XSteps.vue.d.ts +2 -2
- package/dist/components/XSteps.vue.js +73 -0
- package/dist/components/XSteps.vue2.js +4 -0
- package/dist/components/XSubMenu.vue.d.ts +30 -30
- package/dist/components/XSubMenu.vue.js +109 -0
- package/dist/components/XSubMenu.vue2.js +69 -0
- package/dist/components/XSubMenuInline.vue.js +74 -0
- package/dist/components/XSubMenuInline.vue2.js +56 -0
- package/dist/components/XSubMenuPop.vue.d.ts +29 -29
- package/dist/components/XSubMenuPop.vue.js +91 -0
- package/dist/components/XSubMenuPop.vue2.js +113 -0
- package/dist/components/XSwitch.vue.d.ts +5 -5
- package/dist/components/XSwitch.vue.js +133 -0
- package/dist/components/XSwitch.vue2.js +4 -0
- package/dist/components/XTabPane.vue.d.ts +4 -4
- package/dist/components/XTabPane.vue.js +59 -0
- package/dist/components/XTabPane.vue2.js +4 -0
- package/dist/components/XTable.vue.d.ts +5 -5
- package/dist/components/XTable.vue.js +7 -0
- package/dist/components/XTable.vue2.js +1059 -0
- package/dist/components/XTableFilter.vue.js +7 -0
- package/dist/components/XTableFilter.vue2.js +141 -0
- package/dist/components/XTabs.vue.d.ts +53 -25
- package/dist/components/XTabs.vue.js +402 -0
- package/dist/components/XTabs.vue2.js +4 -0
- package/dist/components/XTag.vue.d.ts +5 -3
- package/dist/components/XTag.vue.js +126 -0
- package/dist/components/XTag.vue2.js +4 -0
- package/dist/components/XTextarea.vue.d.ts +9 -9
- package/dist/components/XTextarea.vue.js +261 -0
- package/dist/components/XTextarea.vue2.js +4 -0
- package/dist/components/XTimePicker.vue.d.ts +13 -13
- package/dist/components/XTimePicker.vue.js +827 -0
- package/dist/components/XTimePicker.vue2.js +4 -0
- package/dist/components/XTimeline.vue.d.ts +2 -2
- package/dist/components/XTimeline.vue.js +84 -0
- package/dist/components/XTimeline.vue2.js +4 -0
- package/dist/components/XTimelineItem.vue.d.ts +3 -3
- package/dist/components/XTimelineItem.vue.js +202 -0
- package/dist/components/XTimelineItem.vue2.js +4 -0
- package/dist/components/XTooltip.vue.d.ts +76 -76
- package/dist/components/XTooltip.vue.js +78 -0
- package/dist/components/XTooltip.vue2.js +4 -0
- package/dist/components/XTour.vue.js +120 -0
- package/dist/components/XTour.vue2.js +4 -0
- package/dist/components/XTr.vue.js +12 -0
- package/dist/components/XTransfer.vue.js +128 -0
- package/dist/components/XTransfer.vue2.js +4 -0
- package/dist/components/XTree.vue.d.ts +3 -1
- package/dist/components/XTree.vue.js +7 -0
- package/dist/components/XTree.vue2.js +601 -0
- package/dist/components/XTreeNode.vue.js +7 -0
- package/dist/components/XTreeNode.vue2.js +314 -0
- package/dist/components/XTreeSelect.vue.d.ts +175 -29
- package/dist/components/XTreeSelect.vue.js +7 -0
- package/dist/components/XTreeSelect.vue2.js +715 -0
- package/dist/components/XTrigger.vue.d.ts +6 -6
- package/dist/components/XTrigger.vue.js +492 -0
- package/dist/components/XTrigger.vue2.js +4 -0
- package/dist/components/XTypography.vue.d.ts +4 -4
- package/dist/components/XTypography.vue.js +51 -0
- package/dist/components/XTypography.vue2.js +126 -0
- package/dist/components/XTypographyParagraph.vue.d.ts +2 -2
- package/dist/components/XTypographyParagraph.vue.js +83 -0
- package/dist/components/XTypographyParagraph.vue2.js +4 -0
- package/dist/components/XTypographyText.vue.d.ts +3 -3
- package/dist/components/XTypographyText.vue.js +76 -0
- package/dist/components/XTypographyText.vue2.js +4 -0
- package/dist/components/XTypographyTitle.vue.d.ts +2 -2
- package/dist/components/XTypographyTitle.vue.js +77 -0
- package/dist/components/XTypographyTitle.vue2.js +4 -0
- package/dist/components/XUpload.vue.d.ts +7 -5
- package/dist/components/XUpload.vue.js +7 -0
- package/dist/components/XUpload.vue2.js +1060 -0
- package/dist/components/XVerificationCode.vue.d.ts +3 -3
- package/dist/components/XVerificationCode.vue.js +149 -0
- package/dist/components/XVerificationCode.vue2.js +4 -0
- package/dist/components/XWatermark.vue.d.ts +30 -4
- package/dist/components/XWatermark.vue.js +204 -0
- package/dist/components/XWatermark.vue2.js +4 -0
- package/dist/components/index.d.ts +504 -1
- package/dist/components/index.js +308 -0
- package/dist/components/result-assets/result-403.svg.js +4 -0
- package/dist/components/result-assets/result-404.svg.js +4 -0
- package/dist/components/result-assets/result-500.svg.js +4 -0
- package/dist/components/statistic-utils.js +81 -0
- package/dist/components/timelineContext.js +4 -0
- package/dist/components/x-breadcrumb-context.d.ts +9 -0
- package/dist/components/x-breadcrumb-context.js +4 -0
- package/dist/components/x-checkbox-context.d.ts +19 -0
- package/dist/components/x-checkbox-context.js +4 -0
- package/dist/components/x-dropdown-context.d.ts +7 -0
- package/dist/components/x-dropdown-context.js +4 -0
- package/dist/components/x-icon-shared.d.ts +1 -1
- package/dist/components/x-icon-shared.js +151 -0
- package/dist/components/x-list-shared.d.ts +20 -8
- package/dist/components/x-radio-context.js +4 -0
- package/dist/components/x-scrollbar-types.d.ts +5 -0
- package/dist/composables/collapse.d.ts +8 -5
- package/dist/composables/collapse.js +9 -0
- package/dist/composables/config-provider.d.ts +29 -0
- package/dist/composables/config-provider.js +48 -0
- package/dist/composables/config.js +39 -0
- package/dist/composables/form.js +397 -0
- package/dist/composables/i18n.d.ts +4 -2
- package/dist/composables/i18n.js +257 -0
- package/dist/composables/menu-context.js +6 -0
- package/dist/composables/menu-hooks/use-level.js +25 -0
- package/dist/composables/menu-hooks/use-menu-context.js +8 -0
- package/dist/composables/menu-hooks/use-menu-data-collector.js +63 -0
- package/dist/composables/menu-hooks/use-menu-open-state.js +120 -0
- package/dist/composables/menu-hooks/use-menu.js +19 -0
- package/dist/composables/popup.js +177 -0
- package/dist/composables/scrollbar-visibility.d.ts +1 -0
- package/dist/composables/scrollbar-visibility.js +96 -0
- package/dist/composables/steps.d.ts +1 -0
- package/dist/composables/steps.js +9 -0
- package/dist/composables/tabs.d.ts +19 -8
- package/dist/composables/tabs.js +10 -0
- package/dist/composables/theme-context.d.ts +9 -0
- package/dist/composables/theme-context.js +24 -0
- package/dist/composables/theme.js +53 -0
- package/dist/composables/useMergeState.js +27 -0
- package/dist/composables/useResponsive.js +36 -0
- package/dist/iconfont/generated/icons/guanbi.js +7 -0
- package/dist/iconfont/generated/icons/shijian.js +7 -0
- package/dist/iconfont/internal-icons.js +71 -0
- package/dist/index.cjs +10 -11
- package/dist/index.css +14834 -0
- package/dist/index.js +382 -27802
- package/dist/index.less +14834 -0
- package/dist/install.js +39 -0
- package/dist/locales/ar-EG.js +5 -0
- package/dist/locales/da-DK.d.ts +381 -0
- package/dist/locales/da-DK.js +5 -0
- package/dist/locales/de-DE.js +5 -0
- package/dist/locales/en-US.js +312 -0
- package/dist/locales/es-ES.js +5 -0
- package/dist/locales/fr-FR.js +5 -0
- package/dist/locales/id-ID.js +5 -0
- package/dist/locales/it-IT.js +5 -0
- package/dist/locales/ja-JP.js +5 -0
- package/dist/locales/km-KH.js +5 -0
- package/dist/locales/ko-KR.js +5 -0
- package/dist/locales/ms-MY.js +5 -0
- package/dist/locales/nl-NL.d.ts +381 -0
- package/dist/locales/nl-NL.js +5 -0
- package/dist/locales/pt-PT.js +5 -0
- package/dist/locales/ru-RU.js +5 -0
- package/dist/locales/th-TH.js +5 -0
- package/dist/locales/vi-VN.js +5 -0
- package/dist/locales/zh-CN.js +312 -0
- package/dist/locales/zh-TW.js +5 -0
- package/dist/node_modules/dijkstrajs/dijkstra.js +70 -0
- package/dist/node_modules/qrcode/lib/browser.js +45 -0
- package/dist/node_modules/qrcode/lib/can-promise.js +6 -0
- package/dist/node_modules/qrcode/lib/core/alignment-pattern.js +21 -0
- package/dist/node_modules/qrcode/lib/core/alphanumeric-data.js +73 -0
- package/dist/node_modules/qrcode/lib/core/bit-buffer.js +24 -0
- package/dist/node_modules/qrcode/lib/core/bit-matrix.js +22 -0
- package/dist/node_modules/qrcode/lib/core/byte-data.js +23 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-code.js +359 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-level.js +35 -0
- package/dist/node_modules/qrcode/lib/core/finder-pattern.js +18 -0
- package/dist/node_modules/qrcode/lib/core/format-info.js +14 -0
- package/dist/node_modules/qrcode/lib/core/galois-field.js +22 -0
- package/dist/node_modules/qrcode/lib/core/kanji-data.js +37 -0
- package/dist/node_modules/qrcode/lib/core/mask-pattern.js +96 -0
- package/dist/node_modules/qrcode/lib/core/mode.js +64 -0
- package/dist/node_modules/qrcode/lib/core/numeric-data.js +26 -0
- package/dist/node_modules/qrcode/lib/core/polynomial.js +29 -0
- package/dist/node_modules/qrcode/lib/core/qrcode.js +159 -0
- package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.js +25 -0
- package/dist/node_modules/qrcode/lib/core/regex.js +24 -0
- package/dist/node_modules/qrcode/lib/core/segments.js +143 -0
- package/dist/node_modules/qrcode/lib/core/utils.js +74 -0
- package/dist/node_modules/qrcode/lib/core/version-check.js +7 -0
- package/dist/node_modules/qrcode/lib/core/version.js +74 -0
- package/dist/node_modules/qrcode/lib/renderer/canvas.js +27 -0
- package/dist/node_modules/qrcode/lib/renderer/svg-tag.js +28 -0
- package/dist/node_modules/qrcode/lib/renderer/utils.js +52 -0
- package/dist/style.css +14834 -1
- package/dist/style.less +14834 -0
- package/package.json +12 -4
- package/dist/components/__tests__/XAffix.test.d.ts +0 -1
- package/dist/components/__tests__/XButton.test.d.ts +0 -1
- package/dist/components/__tests__/XCard.test.d.ts +0 -1
- package/dist/components/__tests__/XCarousel.test.d.ts +0 -1
- package/dist/components/__tests__/XCascader.test.d.ts +0 -1
- package/dist/components/__tests__/XCropper.test.d.ts +0 -1
- package/dist/components/__tests__/XMention.test.d.ts +0 -1
- package/dist/components/__tests__/XMenuAccordion.test.d.ts +0 -1
- package/dist/components/__tests__/XStatistic.test.d.ts +0 -1
- package/dist/components/__tests__/XSwitch.test.d.ts +0 -1
- package/dist/components/__tests__/XTable.test.d.ts +0 -1
- package/dist/components/__tests__/XTag.test.d.ts +0 -1
- package/dist/components/__tests__/XTimePicker.test.d.ts +0 -1
- package/dist/components/__tests__/XTree.test.d.ts +0 -1
- package/dist/components/__tests__/XTrigger.test.d.ts +0 -1
- package/dist/favicon.ico +0 -1
- package/dist/favicon.svg +0 -5
- package/dist/images/carousel-0.png +0 -0
- package/dist/images/carousel-2.png +0 -0
- package/dist/images/carousel-3.png +0 -0
- package/dist/images/image-1.png +0 -0
- package/dist/img/avatar-1.jpg +0 -0
- package/dist/img/avatar.jpg +0 -0
- package/dist/img/avatar0.jpg +0 -0
- package/dist/img/avatar1.jpg +0 -0
- package/dist/img/image-1.png +0 -0
- package/dist/img/image-2.png +0 -0
- package/dist/img/image-3.png +0 -0
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,742 @@
|
|
|
1
|
+
import { defineComponent as ht, ref as v, reactive as vt, computed as L, watch as Ce, onMounted as pt, onBeforeUnmount as xt, openBlock as c, createElementBlock as f, normalizeClass as re, createVNode as V, withCtx as $, Fragment as X, renderList as ke, createBlock as we, withModifiers as Q, toDisplayString as T, unref as bt, createTextVNode as G, createCommentVNode as J, createElementVNode as ie, normalizeStyle as yt, nextTick as Y } from "vue";
|
|
2
|
+
import se from "./XButton.vue.js";
|
|
3
|
+
import _t from "./XCascaderPanel.vue.js";
|
|
4
|
+
import Ct from "./XIcon.js";
|
|
5
|
+
import Le from "./XSpace.vue.js";
|
|
6
|
+
import { useXI18n as kt } from "../composables/i18n.js";
|
|
7
|
+
const wt = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "x-richtext__toolbar x-rich-text-editor__toolbar"
|
|
10
|
+
}, Lt = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "x-richtext__tool-letter x-richtext__tool-letter--bold"
|
|
13
|
+
}, Tt = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "x-richtext__tool-letter x-richtext__tool-letter--italic"
|
|
16
|
+
}, Rt = {
|
|
17
|
+
key: 2,
|
|
18
|
+
class: "x-richtext__tool-letter x-richtext__tool-letter--underline"
|
|
19
|
+
}, St = {
|
|
20
|
+
key: 3,
|
|
21
|
+
class: "x-richtext__tool-text"
|
|
22
|
+
}, Et = ["accept", "multiple", "disabled"], Mt = ["contenteditable", "data-placeholder"], At = {
|
|
23
|
+
key: 2,
|
|
24
|
+
class: "x-richtext__emoji-list x-rich-text-editor__emoji-list"
|
|
25
|
+
}, Nt = ["onMousedown"], Pt = ["src", "alt"], It = {
|
|
26
|
+
key: 3,
|
|
27
|
+
class: "x-richtext__footer x-rich-text-editor__footer"
|
|
28
|
+
}, Ot = { class: "x-richtext__tips x-rich-text-editor__tips" }, Vt = /* @__PURE__ */ ht({
|
|
29
|
+
__name: "XRichTextEditor",
|
|
30
|
+
props: {
|
|
31
|
+
modelValue: { default: "" },
|
|
32
|
+
placeholder: { default: "请输入内容" },
|
|
33
|
+
mentionOptions: { default: () => [] },
|
|
34
|
+
mentionCascaderOptions: { default: () => [] },
|
|
35
|
+
mentionFieldNames: { default: void 0 },
|
|
36
|
+
mentionExpandChild: { type: Boolean, default: !0 },
|
|
37
|
+
mentionChangeOnSelect: { type: Boolean, default: !1 },
|
|
38
|
+
emojiOptions: { default: () => ["😀", "😄", "😉", "😍", "🤔", "👍", "🎉", "🔥"] },
|
|
39
|
+
toolbar: { default: () => [
|
|
40
|
+
"bold",
|
|
41
|
+
"italic",
|
|
42
|
+
"underline",
|
|
43
|
+
"unorderedList",
|
|
44
|
+
"orderedList",
|
|
45
|
+
"quote",
|
|
46
|
+
"codeBlock",
|
|
47
|
+
"paragraph",
|
|
48
|
+
"link",
|
|
49
|
+
"emoji",
|
|
50
|
+
"image",
|
|
51
|
+
"mention",
|
|
52
|
+
"clearFormat"
|
|
53
|
+
] },
|
|
54
|
+
accept: { default: "image/*" },
|
|
55
|
+
multiple: { type: Boolean, default: !0 },
|
|
56
|
+
maxImages: { default: 9 },
|
|
57
|
+
beforeImageUpload: { type: Function, default: void 0 },
|
|
58
|
+
uploadImage: { type: Function, default: void 0 },
|
|
59
|
+
allowImagePaste: { type: Boolean, default: !0 },
|
|
60
|
+
showToolbar: { type: Boolean, default: !0 },
|
|
61
|
+
showFooter: { type: Boolean, default: !0 },
|
|
62
|
+
tips: { default: "" },
|
|
63
|
+
linkPromptText: { default: "请输入链接地址" },
|
|
64
|
+
clearText: { default: "清空" },
|
|
65
|
+
submitText: { default: "发送" },
|
|
66
|
+
clearAfterSubmit: { type: Boolean, default: !0 },
|
|
67
|
+
submitOnHotkey: { default: "ctrl-enter" },
|
|
68
|
+
disabled: { type: Boolean, default: !1 }
|
|
69
|
+
},
|
|
70
|
+
emits: ["update:modelValue", "change", "clear", "submit", "mentionSelect", "emojiSelect", "imageInsert", "imageUploadSuccess", "imageUploadError"],
|
|
71
|
+
setup(d, { expose: Te, emit: Re }) {
|
|
72
|
+
const Se = [
|
|
73
|
+
"bold",
|
|
74
|
+
"italic",
|
|
75
|
+
"underline",
|
|
76
|
+
"unorderedList",
|
|
77
|
+
"orderedList",
|
|
78
|
+
"quote",
|
|
79
|
+
"codeBlock",
|
|
80
|
+
"paragraph",
|
|
81
|
+
"link",
|
|
82
|
+
"emoji",
|
|
83
|
+
"image",
|
|
84
|
+
"mention",
|
|
85
|
+
"clearFormat"
|
|
86
|
+
], l = d, p = Re, { t: m } = kt(), Z = v(null), h = v(null), ue = v(null), ee = v(null), y = v(null), ce = v(0), j = v(""), U = v([]), te = v({ top: 0, left: 12 }), R = v(!1), S = v(!1), de = v([]), z = v(!0), i = vt({
|
|
87
|
+
bold: !1,
|
|
88
|
+
italic: !1,
|
|
89
|
+
underline: !1,
|
|
90
|
+
unorderedList: !1,
|
|
91
|
+
orderedList: !1
|
|
92
|
+
}), Ee = L(() => l.toolbar.length ? l.toolbar : Se), E = L(() => ({
|
|
93
|
+
bold: "B",
|
|
94
|
+
italic: "I",
|
|
95
|
+
underline: "U",
|
|
96
|
+
unorderedList: m("richText.toolbar.unorderedList", void 0, "无序列表"),
|
|
97
|
+
orderedList: m("richText.toolbar.orderedList", void 0, "有序列表"),
|
|
98
|
+
quote: m("richText.toolbar.quote", void 0, "引用"),
|
|
99
|
+
codeBlock: m("richText.toolbar.codeBlock", void 0, "代码块"),
|
|
100
|
+
paragraph: m("richText.toolbar.paragraph", void 0, "正文"),
|
|
101
|
+
link: m("richText.toolbar.link", void 0, "链接"),
|
|
102
|
+
emoji: m("richText.toolbar.emoji", void 0, "表情"),
|
|
103
|
+
image: m("richText.toolbar.image", void 0, "图片"),
|
|
104
|
+
mention: m("richText.toolbar.mention", void 0, "@ 提及"),
|
|
105
|
+
clearFormat: m("richText.toolbar.clearFormat", void 0, "清格式")
|
|
106
|
+
})), Me = {
|
|
107
|
+
bold: null,
|
|
108
|
+
italic: null,
|
|
109
|
+
underline: null,
|
|
110
|
+
unorderedList: "list-v2-full",
|
|
111
|
+
orderedList: "list-v3-full",
|
|
112
|
+
quote: "chat-full",
|
|
113
|
+
codeBlock: "program-code-full",
|
|
114
|
+
paragraph: null,
|
|
115
|
+
link: "link-full",
|
|
116
|
+
emoji: "smile-full",
|
|
117
|
+
image: "image-full",
|
|
118
|
+
mention: "user-full",
|
|
119
|
+
clearFormat: "reset-full"
|
|
120
|
+
}, Ae = L(() => l.placeholder === "请输入内容" ? m("richText.placeholder", void 0, "请输入内容") : l.placeholder), Ne = L(() => l.linkPromptText === "请输入链接地址" ? m("richText.linkPromptText", void 0, "请输入链接地址") : l.linkPromptText), Pe = L(() => l.clearText === "清空" ? m("richText.clearText", void 0, "清空") : l.clearText), Ie = L(() => l.submitText === "发送" ? m("richText.submitText", void 0, "发送") : l.submitText), Oe = L(() => l.mentionOptions.map((e) => typeof e == "string" ? { label: e, value: e } : e)), H = L(() => l.mentionCascaderOptions.length > 0 ? l.mentionCascaderOptions : Oe.value.map((e) => ({
|
|
121
|
+
label: e.label,
|
|
122
|
+
value: e.value,
|
|
123
|
+
isLeaf: !0
|
|
124
|
+
}))), Fe = L(() => l.emojiOptions.map((e, n) => typeof e == "string" ? {
|
|
125
|
+
key: `${e}-${n}`,
|
|
126
|
+
label: e,
|
|
127
|
+
value: e,
|
|
128
|
+
image: "",
|
|
129
|
+
insertAs: "text"
|
|
130
|
+
} : {
|
|
131
|
+
key: e.key ?? e.value ?? e.label ?? `emoji-${n}`,
|
|
132
|
+
label: e.label ?? e.value ?? "",
|
|
133
|
+
value: e.value ?? e.label ?? "",
|
|
134
|
+
image: e.image ?? "",
|
|
135
|
+
insertAs: e.insertAs ?? (e.image ? "image" : "text")
|
|
136
|
+
}));
|
|
137
|
+
Ce(
|
|
138
|
+
() => l.modelValue,
|
|
139
|
+
(e) => {
|
|
140
|
+
const n = h.value, t = e ?? "";
|
|
141
|
+
n && n.innerHTML !== t && (n.innerHTML = t, me());
|
|
142
|
+
},
|
|
143
|
+
{ immediate: !0 }
|
|
144
|
+
), Ce(
|
|
145
|
+
h,
|
|
146
|
+
(e) => {
|
|
147
|
+
if (!e)
|
|
148
|
+
return;
|
|
149
|
+
const n = l.modelValue ?? "";
|
|
150
|
+
e.innerHTML !== n && (e.innerHTML = n), me();
|
|
151
|
+
},
|
|
152
|
+
{ immediate: !0 }
|
|
153
|
+
);
|
|
154
|
+
function fe() {
|
|
155
|
+
const e = h.value, n = window.getSelection();
|
|
156
|
+
if (!e || !n || n.rangeCount === 0)
|
|
157
|
+
return !1;
|
|
158
|
+
const t = n.getRangeAt(0);
|
|
159
|
+
return e.contains(t.startContainer) && e.contains(t.endContainer);
|
|
160
|
+
}
|
|
161
|
+
function P() {
|
|
162
|
+
if (!fe())
|
|
163
|
+
return;
|
|
164
|
+
const e = window.getSelection();
|
|
165
|
+
!e || e.rangeCount === 0 || (y.value = e.getRangeAt(0).cloneRange());
|
|
166
|
+
}
|
|
167
|
+
function Be() {
|
|
168
|
+
const e = window.getSelection();
|
|
169
|
+
if (!e || !y.value)
|
|
170
|
+
return !1;
|
|
171
|
+
try {
|
|
172
|
+
return e.removeAllRanges(), e.addRange(y.value.cloneRange()), !0;
|
|
173
|
+
} catch {
|
|
174
|
+
return !1;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
function x(e = !1) {
|
|
178
|
+
const n = h.value;
|
|
179
|
+
if (!n || l.disabled)
|
|
180
|
+
return;
|
|
181
|
+
n.focus();
|
|
182
|
+
const t = window.getSelection();
|
|
183
|
+
if (t && (e || !Be())) {
|
|
184
|
+
const o = document.createRange();
|
|
185
|
+
o.selectNodeContents(n), o.collapse(!1), t.removeAllRanges(), t.addRange(o), y.value = o.cloneRange();
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function K(e) {
|
|
189
|
+
if (l.disabled)
|
|
190
|
+
return;
|
|
191
|
+
x();
|
|
192
|
+
const n = window.getSelection();
|
|
193
|
+
if (!n || n.rangeCount === 0)
|
|
194
|
+
return;
|
|
195
|
+
const t = n.getRangeAt(0);
|
|
196
|
+
t.deleteContents(), t.insertNode(e), t.setStartAfter(e), t.collapse(!0), n.removeAllRanges(), n.addRange(t), y.value = t.cloneRange();
|
|
197
|
+
}
|
|
198
|
+
function D(e) {
|
|
199
|
+
K(document.createTextNode(e));
|
|
200
|
+
}
|
|
201
|
+
function Ue(e) {
|
|
202
|
+
return Array.from(new Set((e.match(/@([^\s@]+)/g) ?? []).map((t) => t.slice(1)))).map((t) => ({ value: t, label: t, path: [t] }));
|
|
203
|
+
}
|
|
204
|
+
function He(e) {
|
|
205
|
+
if (!e)
|
|
206
|
+
return [];
|
|
207
|
+
const n = Array.from(e.querySelectorAll("span.x-richtext__mention")), t = /* @__PURE__ */ new Set(), o = [];
|
|
208
|
+
return n.forEach((a) => {
|
|
209
|
+
var A, b, w;
|
|
210
|
+
const r = ((A = a.dataset.mentionValue) == null ? void 0 : A.trim()) || ((b = a.textContent) == null ? void 0 : b.replace(/^@/, "").trim()) || "", u = ((w = a.dataset.mentionLabel) == null ? void 0 : w.trim()) || r, g = (a.dataset.mentionPath ?? "").split("/").map((N) => N.trim()).filter(Boolean);
|
|
211
|
+
if (!r)
|
|
212
|
+
return;
|
|
213
|
+
const s = g.length > 0 ? g : [r], k = `${r}|${s.join("/")}`;
|
|
214
|
+
t.has(k) || (t.add(k), o.push({ value: r, label: u, path: s }));
|
|
215
|
+
}), o;
|
|
216
|
+
}
|
|
217
|
+
function De(e, n) {
|
|
218
|
+
var s, k, A;
|
|
219
|
+
if (e.length === 0)
|
|
220
|
+
return { value: "", label: "" };
|
|
221
|
+
const t = {
|
|
222
|
+
label: ((s = l.mentionFieldNames) == null ? void 0 : s.label) ?? "label",
|
|
223
|
+
value: ((k = l.mentionFieldNames) == null ? void 0 : k.value) ?? "value",
|
|
224
|
+
children: ((A = l.mentionFieldNames) == null ? void 0 : A.children) ?? "children"
|
|
225
|
+
};
|
|
226
|
+
let o = n, a = "", r = "";
|
|
227
|
+
for (const b of e) {
|
|
228
|
+
const w = o.find((B) => (B == null ? void 0 : B[t.value]) === b);
|
|
229
|
+
if (!w) {
|
|
230
|
+
r = String(b), a = a || r;
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
r = String(w[t.value] ?? b), a = String(w[t.label] ?? r);
|
|
234
|
+
const N = w[t.children];
|
|
235
|
+
o = Array.isArray(N) ? N : [];
|
|
236
|
+
}
|
|
237
|
+
const u = r || a;
|
|
238
|
+
return { value: u, label: a || r || u };
|
|
239
|
+
}
|
|
240
|
+
function I() {
|
|
241
|
+
const e = h.value, n = ((e == null ? void 0 : e.innerHTML) ?? "").trim(), t = ((e == null ? void 0 : e.innerText) ?? "").replace(/\u00a0/g, " ").trim(), o = He(e), a = o.length > 0 ? o : Ue(t), r = a.map((s) => s.value), u = e ? Array.from(e.querySelectorAll("img.x-richtext__inline-image")) : [], g = u.map((s) => s.src);
|
|
242
|
+
return {
|
|
243
|
+
html: n,
|
|
244
|
+
text: t,
|
|
245
|
+
mentions: r,
|
|
246
|
+
mentionDetails: a,
|
|
247
|
+
hasImage: u.length > 0,
|
|
248
|
+
imageCount: u.length,
|
|
249
|
+
imageUrls: g
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
function M() {
|
|
253
|
+
if (!fe()) {
|
|
254
|
+
i.bold = !1, i.italic = !1, i.underline = !1, i.unorderedList = !1, i.orderedList = !1;
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
try {
|
|
258
|
+
i.bold = document.queryCommandState("bold"), i.italic = document.queryCommandState("italic"), i.underline = document.queryCommandState("underline"), i.unorderedList = document.queryCommandState("insertUnorderedList"), i.orderedList = document.queryCommandState("insertOrderedList");
|
|
259
|
+
} catch {
|
|
260
|
+
i.bold = !1, i.italic = !1, i.underline = !1, i.unorderedList = !1, i.orderedList = !1;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
function me() {
|
|
264
|
+
const e = I();
|
|
265
|
+
z.value = !e.text && !e.hasImage, M();
|
|
266
|
+
}
|
|
267
|
+
function _() {
|
|
268
|
+
const e = I();
|
|
269
|
+
z.value = !e.text && !e.hasImage, p("update:modelValue", e.html), p("change", e);
|
|
270
|
+
}
|
|
271
|
+
function C(e, n) {
|
|
272
|
+
l.disabled || (x(), document.execCommand(e, !1, n), P(), _(), M());
|
|
273
|
+
}
|
|
274
|
+
function qe() {
|
|
275
|
+
C("formatBlock", "p");
|
|
276
|
+
}
|
|
277
|
+
function Ve() {
|
|
278
|
+
C("formatBlock", "blockquote");
|
|
279
|
+
}
|
|
280
|
+
function $e() {
|
|
281
|
+
C("formatBlock", "pre");
|
|
282
|
+
}
|
|
283
|
+
function je() {
|
|
284
|
+
if (l.disabled)
|
|
285
|
+
return;
|
|
286
|
+
x();
|
|
287
|
+
const e = window.prompt(Ne.value);
|
|
288
|
+
e && C("createLink", e);
|
|
289
|
+
}
|
|
290
|
+
function ze() {
|
|
291
|
+
l.disabled || (x(), document.execCommand("removeFormat", !1), document.execCommand("unlink", !1), P(), _(), M());
|
|
292
|
+
}
|
|
293
|
+
function Ke() {
|
|
294
|
+
const e = h.value, n = window.getSelection();
|
|
295
|
+
if (!e || !n || n.rangeCount === 0)
|
|
296
|
+
return null;
|
|
297
|
+
const t = n.getRangeAt(0);
|
|
298
|
+
if (!t.collapsed || !e.contains(t.startContainer))
|
|
299
|
+
return null;
|
|
300
|
+
const o = t.cloneRange();
|
|
301
|
+
o.selectNodeContents(e), o.setEnd(t.startContainer, t.startOffset);
|
|
302
|
+
const r = o.toString().match(/@([^\s@]*)$/);
|
|
303
|
+
return r ? { keyword: r[1] ?? "" } : null;
|
|
304
|
+
}
|
|
305
|
+
function We(e, n) {
|
|
306
|
+
const t = document.createTreeWalker(e, NodeFilter.SHOW_TEXT);
|
|
307
|
+
let o = 0, a = t.nextNode();
|
|
308
|
+
for (; a; ) {
|
|
309
|
+
const r = a, u = r.data.length;
|
|
310
|
+
if (n <= o + u)
|
|
311
|
+
return {
|
|
312
|
+
node: r,
|
|
313
|
+
offset: Math.max(0, n - o)
|
|
314
|
+
};
|
|
315
|
+
o += u, a = t.nextNode();
|
|
316
|
+
}
|
|
317
|
+
return null;
|
|
318
|
+
}
|
|
319
|
+
function Xe(e) {
|
|
320
|
+
const n = h.value;
|
|
321
|
+
if (!n || !n.contains(e.startContainer))
|
|
322
|
+
return !1;
|
|
323
|
+
const t = e.cloneRange();
|
|
324
|
+
t.selectNodeContents(n), t.setEnd(e.startContainer, e.startOffset);
|
|
325
|
+
const o = t.toString(), a = o.match(/@([^\s@]*)$/);
|
|
326
|
+
if (!a)
|
|
327
|
+
return !1;
|
|
328
|
+
const r = o.length - a[0].length, u = We(n, r);
|
|
329
|
+
if (!u)
|
|
330
|
+
return !1;
|
|
331
|
+
const g = document.createRange();
|
|
332
|
+
g.setStart(u.node, u.offset), g.setEnd(e.startContainer, e.startOffset), g.deleteContents();
|
|
333
|
+
const s = window.getSelection();
|
|
334
|
+
return s && (s.removeAllRanges(), s.addRange(g)), !0;
|
|
335
|
+
}
|
|
336
|
+
function q(e) {
|
|
337
|
+
const n = h.value;
|
|
338
|
+
if (!n || !e)
|
|
339
|
+
return null;
|
|
340
|
+
let t = e;
|
|
341
|
+
for (; t && t !== n; ) {
|
|
342
|
+
if (t instanceof HTMLSpanElement && t.classList.contains("x-richtext__mention"))
|
|
343
|
+
return t;
|
|
344
|
+
t = t.parentNode;
|
|
345
|
+
}
|
|
346
|
+
return null;
|
|
347
|
+
}
|
|
348
|
+
function Qe(e) {
|
|
349
|
+
const n = q(e.startContainer);
|
|
350
|
+
if (n)
|
|
351
|
+
return n;
|
|
352
|
+
if (e.startContainer.nodeType === Node.ELEMENT_NODE) {
|
|
353
|
+
const t = e.startContainer, o = e.startOffset > 0 ? t.childNodes[e.startOffset - 1] : null, a = t.childNodes[e.startOffset] ?? null;
|
|
354
|
+
return q(o) ?? q(a);
|
|
355
|
+
}
|
|
356
|
+
if (e.startContainer.nodeType === Node.TEXT_NODE) {
|
|
357
|
+
const t = e.startContainer;
|
|
358
|
+
if (e.startOffset === 0) {
|
|
359
|
+
const o = q(t.previousSibling);
|
|
360
|
+
if (o)
|
|
361
|
+
return o;
|
|
362
|
+
}
|
|
363
|
+
if (e.startOffset === t.data.length)
|
|
364
|
+
return q(t.nextSibling);
|
|
365
|
+
}
|
|
366
|
+
return null;
|
|
367
|
+
}
|
|
368
|
+
function O() {
|
|
369
|
+
const e = Ke();
|
|
370
|
+
if (!e) {
|
|
371
|
+
j.value = "", U.value = [], R.value = !1;
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
j.value = e.keyword, R.value = H.value.length > 0, R.value && Y(ne);
|
|
375
|
+
}
|
|
376
|
+
function ne() {
|
|
377
|
+
var N, B;
|
|
378
|
+
const e = Z.value, n = h.value;
|
|
379
|
+
if (!e || !n)
|
|
380
|
+
return;
|
|
381
|
+
const t = window.getSelection();
|
|
382
|
+
let o = null;
|
|
383
|
+
if (t && t.rangeCount > 0) {
|
|
384
|
+
const ae = t.getRangeAt(0);
|
|
385
|
+
n.contains(ae.startContainer) && n.contains(ae.endContainer) && (o = ae.cloneRange());
|
|
386
|
+
}
|
|
387
|
+
if (!o && y.value && n.contains(y.value.startContainer) && n.contains(y.value.endContainer) && (o = y.value.cloneRange()), !o)
|
|
388
|
+
return;
|
|
389
|
+
o.collapse(!0);
|
|
390
|
+
const a = o.getBoundingClientRect(), r = e.getBoundingClientRect(), u = ((N = ee.value) == null ? void 0 : N.offsetWidth) ?? 320, g = ((B = ee.value) == null ? void 0 : B.offsetHeight) ?? 240, s = 12;
|
|
391
|
+
let k = a.left - r.left;
|
|
392
|
+
const A = Math.max(s, e.clientWidth - u - s);
|
|
393
|
+
k = Math.min(Math.max(k, s), A);
|
|
394
|
+
let b = a.bottom - r.top + 8;
|
|
395
|
+
const w = a.top - r.top - g - 8 > s;
|
|
396
|
+
b + g + s > e.clientHeight && w && (b = a.top - r.top - g - 8), b = Math.max(b, s), te.value = { top: b, left: k };
|
|
397
|
+
}
|
|
398
|
+
function F() {
|
|
399
|
+
R.value = !1, j.value = "", U.value = [];
|
|
400
|
+
}
|
|
401
|
+
function Ge(e) {
|
|
402
|
+
const n = Array.isArray(e) ? e : e == null || e === "" ? [] : [e];
|
|
403
|
+
if (!n.length)
|
|
404
|
+
return;
|
|
405
|
+
const t = De(n, H.value);
|
|
406
|
+
t.value && et({
|
|
407
|
+
value: t.value,
|
|
408
|
+
label: t.label,
|
|
409
|
+
path: n.map((o) => String(o))
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
function ge(e) {
|
|
413
|
+
const n = Z.value;
|
|
414
|
+
if (!n)
|
|
415
|
+
return;
|
|
416
|
+
const t = e.target;
|
|
417
|
+
!t || n.contains(t) || F();
|
|
418
|
+
}
|
|
419
|
+
function W() {
|
|
420
|
+
R.value && Y(ne);
|
|
421
|
+
}
|
|
422
|
+
function Je() {
|
|
423
|
+
P(), O(), _();
|
|
424
|
+
}
|
|
425
|
+
function Ye() {
|
|
426
|
+
P(), O(), M();
|
|
427
|
+
}
|
|
428
|
+
function Ze() {
|
|
429
|
+
P(), O(), M();
|
|
430
|
+
}
|
|
431
|
+
function et(e) {
|
|
432
|
+
if (l.disabled)
|
|
433
|
+
return;
|
|
434
|
+
x();
|
|
435
|
+
const n = window.getSelection();
|
|
436
|
+
if (!n || n.rangeCount === 0)
|
|
437
|
+
return;
|
|
438
|
+
const t = n.getRangeAt(0);
|
|
439
|
+
t.collapsed && Xe(t);
|
|
440
|
+
const o = document.createElement("span");
|
|
441
|
+
o.className = "x-richtext__mention x-rich-text-editor__mention", o.dataset.mentionValue = e.value, o.dataset.mentionLabel = e.label, o.dataset.mentionPath = (e.path ?? [e.value]).join("/"), o.textContent = `@${e.label}`, K(o), D(" "), F(), p("mentionSelect", e.value), _();
|
|
442
|
+
}
|
|
443
|
+
function he() {
|
|
444
|
+
if (l.disabled)
|
|
445
|
+
return;
|
|
446
|
+
S.value = !1, x();
|
|
447
|
+
const e = window.getSelection();
|
|
448
|
+
if (e && e.rangeCount > 0) {
|
|
449
|
+
const n = e.getRangeAt(0), t = Qe(n);
|
|
450
|
+
if (t) {
|
|
451
|
+
const o = document.createRange();
|
|
452
|
+
o.selectNode(t), e.removeAllRanges(), e.addRange(o), y.value = o.cloneRange();
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
D("@"), j.value = "", U.value = [], R.value = H.value.length > 0, Y(ne), _();
|
|
456
|
+
}
|
|
457
|
+
function ve() {
|
|
458
|
+
l.disabled || (F(), S.value = !S.value, x());
|
|
459
|
+
}
|
|
460
|
+
function tt(e) {
|
|
461
|
+
if (!l.disabled) {
|
|
462
|
+
if (x(), e.insertAs === "image" && e.image) {
|
|
463
|
+
const n = document.createElement("img");
|
|
464
|
+
n.className = "x-richtext__inline-emoji x-rich-text-editor__inline-emoji", n.src = e.image, n.alt = e.label || e.value || "", K(n), D(" ");
|
|
465
|
+
} else
|
|
466
|
+
D(e.value || e.label);
|
|
467
|
+
S.value = !1, O(), p("emojiSelect", e.value || e.label), _();
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
function pe() {
|
|
471
|
+
var e;
|
|
472
|
+
l.disabled || (S.value = !1, F(), (e = ue.value) == null || e.click());
|
|
473
|
+
}
|
|
474
|
+
function nt() {
|
|
475
|
+
const e = h.value;
|
|
476
|
+
return e ? e.querySelectorAll("img.x-richtext__inline-image").length : 0;
|
|
477
|
+
}
|
|
478
|
+
function ot(e, n) {
|
|
479
|
+
const t = document.createElement("img");
|
|
480
|
+
t.className = "x-richtext__inline-image x-rich-text-editor__inline-image", t.src = e, t.alt = n, K(t), D(" ");
|
|
481
|
+
}
|
|
482
|
+
async function xe(e) {
|
|
483
|
+
if (!e.length)
|
|
484
|
+
return 0;
|
|
485
|
+
const n = Math.max(0, l.maxImages - nt());
|
|
486
|
+
if (n <= 0)
|
|
487
|
+
return 0;
|
|
488
|
+
let t = 0;
|
|
489
|
+
for (const o of e.slice(0, n)) {
|
|
490
|
+
if (!o.type.startsWith("image/") || l.beforeImageUpload && !await Promise.resolve(l.beforeImageUpload(o)))
|
|
491
|
+
continue;
|
|
492
|
+
let a = "";
|
|
493
|
+
if (l.uploadImage)
|
|
494
|
+
try {
|
|
495
|
+
a = await l.uploadImage(o), p("imageUploadSuccess", o, a);
|
|
496
|
+
} catch (r) {
|
|
497
|
+
p("imageUploadError", o, r);
|
|
498
|
+
continue;
|
|
499
|
+
}
|
|
500
|
+
else
|
|
501
|
+
a = URL.createObjectURL(o), de.value.push(a);
|
|
502
|
+
a && (ot(a, o.name), t += 1);
|
|
503
|
+
}
|
|
504
|
+
return t;
|
|
505
|
+
}
|
|
506
|
+
async function lt(e) {
|
|
507
|
+
if (l.disabled)
|
|
508
|
+
return;
|
|
509
|
+
const n = e.target, t = Array.from(n.files ?? []);
|
|
510
|
+
if (!t.length)
|
|
511
|
+
return;
|
|
512
|
+
x();
|
|
513
|
+
const o = await xe(t);
|
|
514
|
+
n.value = "", O(), o > 0 && (p("imageInsert", o), _());
|
|
515
|
+
}
|
|
516
|
+
async function at(e) {
|
|
517
|
+
var a;
|
|
518
|
+
if (!l.allowImagePaste || l.disabled)
|
|
519
|
+
return;
|
|
520
|
+
const t = Array.from(((a = e.clipboardData) == null ? void 0 : a.items) ?? []).filter((r) => r.kind === "file").map((r) => r.getAsFile()).filter((r) => r instanceof File && r.type.startsWith("image/"));
|
|
521
|
+
if (!t.length)
|
|
522
|
+
return;
|
|
523
|
+
e.preventDefault(), x();
|
|
524
|
+
const o = await xe(t);
|
|
525
|
+
o > 0 && (p("imageInsert", o), _());
|
|
526
|
+
}
|
|
527
|
+
function rt(e) {
|
|
528
|
+
return l.submitOnHotkey === "none" || e.key !== "Enter" ? !1 : l.submitOnHotkey === "ctrl-enter" ? e.ctrlKey : l.submitOnHotkey === "meta-enter" ? e.metaKey : e.ctrlKey || e.metaKey;
|
|
529
|
+
}
|
|
530
|
+
function it(e) {
|
|
531
|
+
if (e.key === "Escape") {
|
|
532
|
+
F(), S.value = !1;
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
rt(e) && (e.preventDefault(), le());
|
|
536
|
+
}
|
|
537
|
+
function oe() {
|
|
538
|
+
const e = h.value;
|
|
539
|
+
e && (e.innerHTML = "", y.value = null, F(), S.value = !1, z.value = !0, p("update:modelValue", ""), p("change", {
|
|
540
|
+
html: "",
|
|
541
|
+
text: "",
|
|
542
|
+
mentions: [],
|
|
543
|
+
mentionDetails: [],
|
|
544
|
+
hasImage: !1,
|
|
545
|
+
imageCount: 0,
|
|
546
|
+
imageUrls: []
|
|
547
|
+
}), p("clear"), Y(() => {
|
|
548
|
+
x(!0);
|
|
549
|
+
}));
|
|
550
|
+
}
|
|
551
|
+
function le() {
|
|
552
|
+
if (l.disabled)
|
|
553
|
+
return;
|
|
554
|
+
const e = I();
|
|
555
|
+
!e.text && !e.hasImage || (p("submit", e), l.clearAfterSubmit && oe());
|
|
556
|
+
}
|
|
557
|
+
function st() {
|
|
558
|
+
P(), M();
|
|
559
|
+
}
|
|
560
|
+
function ut(e) {
|
|
561
|
+
const n = h.value;
|
|
562
|
+
n && (n.innerHTML = e, _());
|
|
563
|
+
}
|
|
564
|
+
function ct() {
|
|
565
|
+
return I().html;
|
|
566
|
+
}
|
|
567
|
+
function dt() {
|
|
568
|
+
return I().text;
|
|
569
|
+
}
|
|
570
|
+
function ft(e) {
|
|
571
|
+
return e === "bold" ? i.bold : e === "italic" ? i.italic : e === "underline" ? i.underline : e === "unorderedList" ? i.unorderedList : e === "orderedList" ? i.orderedList : !1;
|
|
572
|
+
}
|
|
573
|
+
function be(e) {
|
|
574
|
+
return Me[e];
|
|
575
|
+
}
|
|
576
|
+
function ye(e) {
|
|
577
|
+
return e === "bold" ? C("bold") : e === "italic" ? C("italic") : e === "underline" ? C("underline") : e === "unorderedList" ? C("insertUnorderedList") : e === "orderedList" ? C("insertOrderedList") : e === "quote" ? Ve() : e === "codeBlock" ? $e() : e === "paragraph" ? qe() : e === "link" ? je() : e === "emoji" ? ve() : e === "image" ? pe() : e === "mention" ? he() : ze();
|
|
578
|
+
}
|
|
579
|
+
function mt(e) {
|
|
580
|
+
ce.value = Date.now(), ye(e);
|
|
581
|
+
}
|
|
582
|
+
function gt(e) {
|
|
583
|
+
Date.now() - ce.value <= 180 || ye(e);
|
|
584
|
+
}
|
|
585
|
+
function _e() {
|
|
586
|
+
M(), R.value && O();
|
|
587
|
+
}
|
|
588
|
+
return Te({
|
|
589
|
+
focus: x,
|
|
590
|
+
clear: oe,
|
|
591
|
+
getPayload: I,
|
|
592
|
+
setHtml: ut,
|
|
593
|
+
getHtml: ct,
|
|
594
|
+
getText: dt,
|
|
595
|
+
toggleEmojiPanel: ve,
|
|
596
|
+
openImagePicker: pe,
|
|
597
|
+
submit: le,
|
|
598
|
+
triggerMention: he
|
|
599
|
+
}), pt(() => {
|
|
600
|
+
document.addEventListener("selectionchange", _e), document.addEventListener("mousedown", ge), window.addEventListener("resize", W), window.addEventListener("scroll", W, !0);
|
|
601
|
+
}), xt(() => {
|
|
602
|
+
document.removeEventListener("selectionchange", _e), document.removeEventListener("mousedown", ge), window.removeEventListener("resize", W), window.removeEventListener("scroll", W, !0);
|
|
603
|
+
for (const e of de.value)
|
|
604
|
+
URL.revokeObjectURL(e);
|
|
605
|
+
}), (e, n) => (c(), f("div", {
|
|
606
|
+
ref_key: "rootRef",
|
|
607
|
+
ref: Z,
|
|
608
|
+
class: re(["x-richtext x-rich-text-editor", { "is-disabled": d.disabled }])
|
|
609
|
+
}, [
|
|
610
|
+
d.showToolbar ? (c(), f("div", wt, [
|
|
611
|
+
V(Le, {
|
|
612
|
+
wrap: "",
|
|
613
|
+
size: 4
|
|
614
|
+
}, {
|
|
615
|
+
default: $(() => [
|
|
616
|
+
(c(!0), f(X, null, ke(Ee.value, (t) => (c(), we(se, {
|
|
617
|
+
key: t,
|
|
618
|
+
size: "small",
|
|
619
|
+
variant: "text",
|
|
620
|
+
disabled: d.disabled,
|
|
621
|
+
class: re(["x-richtext__tool-btn", {
|
|
622
|
+
"is-active": ft(t),
|
|
623
|
+
"is-text-action": t === "paragraph"
|
|
624
|
+
}]),
|
|
625
|
+
title: E.value[t],
|
|
626
|
+
"aria-label": E.value[t],
|
|
627
|
+
onMousedown: Q((o) => mt(t), ["prevent"]),
|
|
628
|
+
onClick: Q((o) => gt(t), ["prevent"])
|
|
629
|
+
}, {
|
|
630
|
+
default: $(() => [
|
|
631
|
+
t === "bold" ? (c(), f("span", Lt, T(E.value[t]), 1)) : t === "italic" ? (c(), f("span", Tt, T(E.value[t]), 1)) : t === "underline" ? (c(), f("span", Rt, T(E.value[t]), 1)) : t === "paragraph" ? (c(), f("span", St, T(E.value[t]), 1)) : be(t) ? (c(), we(bt(Ct), {
|
|
632
|
+
key: 4,
|
|
633
|
+
name: be(t) || "",
|
|
634
|
+
size: 14
|
|
635
|
+
}, null, 8, ["name"])) : (c(), f(X, { key: 5 }, [
|
|
636
|
+
G(T(E.value[t]), 1)
|
|
637
|
+
], 64))
|
|
638
|
+
]),
|
|
639
|
+
_: 2
|
|
640
|
+
}, 1032, ["disabled", "class", "title", "aria-label", "onMousedown", "onClick"]))), 128))
|
|
641
|
+
]),
|
|
642
|
+
_: 1
|
|
643
|
+
})
|
|
644
|
+
])) : J("", !0),
|
|
645
|
+
ie("input", {
|
|
646
|
+
ref_key: "uploadInputRef",
|
|
647
|
+
ref: ue,
|
|
648
|
+
class: "x-richtext__input-file x-rich-text-editor__input-file",
|
|
649
|
+
type: "file",
|
|
650
|
+
accept: d.accept,
|
|
651
|
+
multiple: d.multiple,
|
|
652
|
+
disabled: d.disabled,
|
|
653
|
+
onChange: lt
|
|
654
|
+
}, null, 40, Et),
|
|
655
|
+
ie("div", {
|
|
656
|
+
ref_key: "editorRef",
|
|
657
|
+
ref: h,
|
|
658
|
+
class: re(["x-richtext__input x-rich-text-editor__input", { "is-empty": z.value }]),
|
|
659
|
+
contenteditable: !d.disabled,
|
|
660
|
+
"data-placeholder": Ae.value,
|
|
661
|
+
onInput: Je,
|
|
662
|
+
onKeydown: it,
|
|
663
|
+
onKeyup: Ye,
|
|
664
|
+
onMouseup: Ze,
|
|
665
|
+
onFocus: st,
|
|
666
|
+
onPaste: at
|
|
667
|
+
}, null, 42, Mt),
|
|
668
|
+
R.value && H.value.length > 0 ? (c(), f("div", {
|
|
669
|
+
key: 1,
|
|
670
|
+
ref_key: "mentionPanelRef",
|
|
671
|
+
ref: ee,
|
|
672
|
+
class: "x-richtext__mention-float x-rich-text-editor__mention-float",
|
|
673
|
+
style: yt({
|
|
674
|
+
top: `${te.value.top}px`,
|
|
675
|
+
left: `${te.value.left}px`
|
|
676
|
+
}),
|
|
677
|
+
onMousedown: n[1] || (n[1] = Q(() => {
|
|
678
|
+
}, ["stop"]))
|
|
679
|
+
}, [
|
|
680
|
+
V(_t, {
|
|
681
|
+
modelValue: U.value,
|
|
682
|
+
"onUpdate:modelValue": n[0] || (n[0] = (t) => U.value = t),
|
|
683
|
+
options: H.value,
|
|
684
|
+
"field-names": d.mentionFieldNames,
|
|
685
|
+
"expand-child": d.mentionExpandChild,
|
|
686
|
+
"change-on-select": d.mentionChangeOnSelect,
|
|
687
|
+
"path-mode": !0,
|
|
688
|
+
onChange: Ge
|
|
689
|
+
}, null, 8, ["modelValue", "options", "field-names", "expand-child", "change-on-select"])
|
|
690
|
+
], 36)) : J("", !0),
|
|
691
|
+
S.value ? (c(), f("div", At, [
|
|
692
|
+
(c(!0), f(X, null, ke(Fe.value, (t) => (c(), f("button", {
|
|
693
|
+
key: t.key,
|
|
694
|
+
type: "button",
|
|
695
|
+
class: "x-richtext__emoji-item x-rich-text-editor__emoji-item",
|
|
696
|
+
onMousedown: Q((o) => tt(t), ["prevent"])
|
|
697
|
+
}, [
|
|
698
|
+
t.image ? (c(), f("img", {
|
|
699
|
+
key: 0,
|
|
700
|
+
class: "x-richtext__emoji-image x-rich-text-editor__emoji-image",
|
|
701
|
+
src: t.image,
|
|
702
|
+
alt: t.label || t.value
|
|
703
|
+
}, null, 8, Pt)) : (c(), f(X, { key: 1 }, [
|
|
704
|
+
G(T(t.label || t.value), 1)
|
|
705
|
+
], 64))
|
|
706
|
+
], 40, Nt))), 128))
|
|
707
|
+
])) : J("", !0),
|
|
708
|
+
d.showFooter ? (c(), f("div", It, [
|
|
709
|
+
ie("span", Ot, T(d.tips), 1),
|
|
710
|
+
V(Le, null, {
|
|
711
|
+
default: $(() => [
|
|
712
|
+
V(se, {
|
|
713
|
+
size: "small",
|
|
714
|
+
disabled: d.disabled,
|
|
715
|
+
onClick: oe
|
|
716
|
+
}, {
|
|
717
|
+
default: $(() => [
|
|
718
|
+
G(T(Pe.value), 1)
|
|
719
|
+
]),
|
|
720
|
+
_: 1
|
|
721
|
+
}, 8, ["disabled"]),
|
|
722
|
+
V(se, {
|
|
723
|
+
size: "small",
|
|
724
|
+
type: "primary",
|
|
725
|
+
disabled: d.disabled,
|
|
726
|
+
onClick: le
|
|
727
|
+
}, {
|
|
728
|
+
default: $(() => [
|
|
729
|
+
G(T(Ie.value), 1)
|
|
730
|
+
]),
|
|
731
|
+
_: 1
|
|
732
|
+
}, 8, ["disabled"])
|
|
733
|
+
]),
|
|
734
|
+
_: 1
|
|
735
|
+
})
|
|
736
|
+
])) : J("", !0)
|
|
737
|
+
], 2));
|
|
738
|
+
}
|
|
739
|
+
});
|
|
740
|
+
export {
|
|
741
|
+
Vt as default
|
|
742
|
+
};
|