@element-plus/nightly 0.0.20260720 → 0.0.20260721

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.
Files changed (626) hide show
  1. package/es/components/affix/src/affix.d.ts +1 -1
  2. package/es/components/affix/src/affix.vue.d.ts +3 -3
  3. package/es/components/alert/src/alert.d.ts +2 -2
  4. package/es/components/anchor/src/anchor.d.ts +1 -1
  5. package/es/components/anchor/src/anchor.vue.d.ts +2 -2
  6. package/es/components/autocomplete/src/autocomplete.d.ts +7 -108
  7. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  8. package/es/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
  9. package/es/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  10. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  11. package/es/components/avatar/src/avatar-group-props.d.ts +9 -106
  12. package/es/components/avatar/src/avatar-group-props.mjs +9 -1
  13. package/es/components/avatar/src/avatar-group-props.mjs.map +1 -1
  14. package/es/components/avatar/src/avatar-group.d.ts +20 -213
  15. package/es/components/avatar/src/avatar.d.ts +3 -3
  16. package/es/components/backtop/src/backtop.vue.d.ts +1 -1
  17. package/es/components/badge/src/badge.d.ts +4 -8
  18. package/es/components/badge/src/badge.mjs +9 -1
  19. package/es/components/badge/src/badge.mjs.map +1 -1
  20. package/es/components/badge/src/badge.vue.d.ts +3 -1
  21. package/es/components/badge/src/badge.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  22. package/es/components/badge/src/badge2.mjs.map +1 -1
  23. package/es/components/button/src/button-group.d.ts +2 -2
  24. package/es/components/button/src/button-group.vue.d.ts +1 -1
  25. package/es/components/button/src/button.d.ts +2 -2
  26. package/es/components/button/src/button.vue.d.ts +4 -4
  27. package/es/components/button/src/use-button.d.ts +2 -2
  28. package/es/components/calendar/src/calendar.mjs.map +1 -1
  29. package/es/components/calendar/src/calendar.vue.d.ts +1 -1
  30. package/es/components/calendar/style/css.mjs +1 -1
  31. package/es/components/calendar/style/index.mjs +1 -1
  32. package/es/components/card/src/card.d.ts +8 -7
  33. package/es/components/card/src/card.mjs +27 -3
  34. package/es/components/card/src/card.mjs.map +1 -1
  35. package/es/components/card/src/card.vue.d.ts +4 -0
  36. package/es/components/card/src/card.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  37. package/es/components/card/src/card2.mjs.map +1 -1
  38. package/es/components/carousel/src/carousel.d.ts +1 -1
  39. package/es/components/carousel/src/carousel.vue.d.ts +4 -4
  40. package/es/components/cascader/src/cascader.d.ts +9 -110
  41. package/es/components/cascader/src/cascader.mjs.map +1 -1
  42. package/es/components/cascader/src/cascader.vue.d.ts +22 -20
  43. package/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  44. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  45. package/es/components/cascader-panel/src/index.vue.d.ts +4 -4
  46. package/es/components/cascader-panel/src/menu.vue.d.ts +1 -1
  47. package/es/components/check-tag/src/check-tag.d.ts +1 -1
  48. package/es/components/checkbox/src/checkbox-button.vue.d.ts +6 -6
  49. package/es/components/checkbox/src/checkbox-group.d.ts +1 -1
  50. package/es/components/checkbox/src/checkbox-group.vue.d.ts +5 -5
  51. package/es/components/checkbox/src/checkbox.d.ts +9 -9
  52. package/es/components/checkbox/src/checkbox.vue.d.ts +6 -6
  53. package/es/components/checkbox/src/composables/use-checkbox-status.d.ts +2 -2
  54. package/es/components/checkbox/src/composables/use-checkbox.d.ts +2 -2
  55. package/es/components/col/src/col.vue.d.ts +1 -1
  56. package/es/components/collapse/src/collapse-item.vue.d.ts +1 -1
  57. package/es/components/collapse/src/collapse.d.ts +1 -1
  58. package/es/components/collapse/src/collapse.vue.d.ts +1 -1
  59. package/es/components/color-picker/src/color-picker.d.ts +5 -104
  60. package/es/components/color-picker/src/color-picker.mjs +1 -0
  61. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  62. package/es/components/color-picker/src/color-picker.vue.d.ts +12 -10
  63. package/es/components/color-picker-panel/src/color-picker-panel.d.ts +4 -10
  64. package/es/components/color-picker-panel/src/color-picker-panel.mjs +9 -5
  65. package/es/components/color-picker-panel/src/color-picker-panel.mjs.map +1 -1
  66. package/es/components/color-picker-panel/src/color-picker-panel.vue.d.ts +4 -1
  67. package/es/components/color-picker-panel/src/color-picker-panel.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  68. package/es/components/color-picker-panel/src/color-picker-panel2.mjs.map +1 -1
  69. package/es/components/config-provider/src/config-provider-props.d.ts +1 -1
  70. package/es/components/config-provider/src/config-provider.d.ts +2 -2
  71. package/es/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
  72. package/es/components/date-picker/src/date-picker.d.ts +17 -217
  73. package/es/components/date-picker/src/props.d.ts +4 -104
  74. package/es/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
  75. package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +3 -3
  76. package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +2 -2
  77. package/es/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +2 -2
  78. package/es/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +2 -2
  79. package/es/components/date-picker-panel/src/date-picker-panel.d.ts +4 -4
  80. package/es/components/date-picker-panel/src/panel-utils.d.ts +21 -21
  81. package/es/components/date-picker-panel/src/props/basic-date-table.mjs.map +1 -1
  82. package/es/components/descriptions/src/description-item.d.ts +18 -18
  83. package/es/components/descriptions/src/description.d.ts +1 -1
  84. package/es/components/descriptions/src/description.vue.d.ts +2 -2
  85. package/es/components/dialog/src/dialog-content.d.ts +10 -6
  86. package/es/components/dialog/src/dialog-content.mjs +32 -5
  87. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  88. package/es/components/dialog/src/dialog-content.vue.d.ts +5 -1
  89. package/es/components/dialog/src/dialog.d.ts +10 -5
  90. package/es/components/dialog/src/dialog.mjs +11 -14
  91. package/es/components/dialog/src/dialog.mjs.map +1 -1
  92. package/es/components/dialog/src/dialog.vue.d.ts +9 -4
  93. package/es/components/divider/src/divider.d.ts +1 -1
  94. package/es/components/divider/src/divider.vue.d.ts +1 -1
  95. package/es/components/drawer/src/drawer.d.ts +5 -4
  96. package/es/components/drawer/src/drawer.vue.d.ts +12 -7
  97. package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +2 -2
  98. package/es/components/dropdown/src/dropdown-item.vue.d.ts +5 -5
  99. package/es/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  100. package/es/components/dropdown/src/dropdown.d.ts +5 -106
  101. package/es/components/dropdown/src/dropdown.vue.d.ts +115 -313
  102. package/es/components/dropdown/style/css.mjs +1 -1
  103. package/es/components/dropdown/style/index.mjs +1 -1
  104. package/es/components/form/src/form-item.d.ts +3 -3
  105. package/es/components/form/src/form-item.vue.d.ts +2 -2
  106. package/es/components/form/src/form.d.ts +4 -4
  107. package/es/components/form/src/hooks/use-form-common-props.d.ts +2 -2
  108. package/es/components/image/src/image.d.ts +1 -1
  109. package/es/components/image/src/image.mjs.map +1 -1
  110. package/es/components/image/src/image.vue.d.ts +4 -4
  111. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  112. package/es/components/image-viewer/src/image-viewer.vue.d.ts +4 -4
  113. package/es/components/input/src/input.d.ts +4 -4
  114. package/es/components/input/src/input.vue.d.ts +19 -19
  115. package/es/components/input-number/src/input-number.d.ts +3 -3
  116. package/es/components/input-number/src/input-number.vue.d.ts +10 -10
  117. package/es/components/input-otp/src/input-otp.vue.d.ts +7 -7
  118. package/es/components/input-tag/src/composables/use-input-tag.d.ts +1 -1
  119. package/es/components/input-tag/src/input-tag.d.ts +3 -3
  120. package/es/components/input-tag/src/input-tag.vue.d.ts +12 -12
  121. package/es/components/link/src/link.d.ts +2 -2
  122. package/es/components/link/src/link.mjs.map +1 -1
  123. package/es/components/mention/src/mention.d.ts +7 -108
  124. package/es/components/mention/src/mention.vue.d.ts +5 -5
  125. package/es/components/mention/src/mention.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  126. package/es/components/mention/src/mention2.mjs.map +1 -1
  127. package/es/components/menu/src/menu.d.ts +13 -25
  128. package/es/components/menu/src/menu.mjs +18 -2
  129. package/es/components/menu/src/menu.mjs.map +1 -1
  130. package/es/components/menu/src/sub-menu.d.ts +11 -23
  131. package/es/components/menu/src/sub-menu.mjs +18 -2
  132. package/es/components/menu/src/sub-menu.mjs.map +1 -1
  133. package/es/components/message/src/instance.d.ts +1 -1
  134. package/es/components/message/src/message.d.ts +5 -5
  135. package/es/components/message/src/message.mjs +6 -1
  136. package/es/components/message/src/message.mjs.map +1 -1
  137. package/es/components/message/src/message.vue.d.ts +7 -6
  138. package/es/components/message/src/method.mjs.map +1 -1
  139. package/es/components/message-box/src/index.vue.d.ts +73 -81
  140. package/es/components/notification/src/notification.d.ts +4 -3
  141. package/es/components/notification/src/notification.mjs +6 -1
  142. package/es/components/notification/src/notification.mjs.map +1 -1
  143. package/es/components/notification/src/notification.vue.d.ts +5 -4
  144. package/es/components/overlay/index.d.ts +4 -12
  145. package/es/components/overlay/src/overlay.d.ts +5 -18
  146. package/es/components/overlay/src/overlay.mjs +9 -5
  147. package/es/components/overlay/src/overlay.mjs.map +1 -1
  148. package/es/components/pagination/src/components/jumper.d.ts +1 -1
  149. package/es/components/pagination/src/components/jumper.vue.d.ts +2 -2
  150. package/es/components/pagination/src/components/sizes.d.ts +5 -14
  151. package/es/components/pagination/src/components/sizes.mjs +18 -2
  152. package/es/components/pagination/src/components/sizes.mjs.map +1 -1
  153. package/es/components/pagination/src/components/sizes.vue.d.ts +10 -27
  154. package/es/components/pagination/src/pagination.d.ts +16 -29
  155. package/es/components/pagination/src/pagination.mjs +15 -2
  156. package/es/components/pagination/src/pagination.mjs.map +1 -1
  157. package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
  158. package/es/components/popconfirm/src/popconfirm.vue.d.ts +5 -5
  159. package/es/components/popover/src/popover.d.ts +5 -105
  160. package/es/components/popover/src/popover.mjs +1 -0
  161. package/es/components/popover/src/popover.mjs.map +1 -1
  162. package/es/components/popover/src/popover.vue.d.ts +14 -13
  163. package/es/components/popper/src/composables/use-content-dom.d.ts +2 -25
  164. package/es/components/popper/src/composables/use-content.d.ts +4 -4
  165. package/es/components/popper/src/content.d.ts +8 -18
  166. package/es/components/popper/src/content.mjs +13 -7
  167. package/es/components/popper/src/content.mjs.map +1 -1
  168. package/es/components/popper/src/content.vue.d.ts +19 -17
  169. package/es/components/popper/src/popper.d.ts +2 -2
  170. package/es/components/popper/src/popper.mjs.map +1 -1
  171. package/es/components/progress/src/progress.d.ts +1 -1
  172. package/es/components/progress/src/progress.vue.d.ts +2 -2
  173. package/es/components/radio/src/radio-button.d.ts +4 -4
  174. package/es/components/radio/src/radio-button.vue.d.ts +2 -2
  175. package/es/components/radio/src/radio-group.d.ts +1 -1
  176. package/es/components/radio/src/radio-group.vue.d.ts +6 -6
  177. package/es/components/radio/src/radio.d.ts +8 -8
  178. package/es/components/radio/src/radio.vue.d.ts +4 -4
  179. package/es/components/radio/src/use-radio.d.ts +1 -1
  180. package/es/components/rate/src/rate.d.ts +1 -1
  181. package/es/components/rate/src/rate.vue.d.ts +3 -3
  182. package/es/components/rate/src/rate.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  183. package/es/components/rate/src/rate2.mjs.map +1 -1
  184. package/es/components/result/src/result.d.ts +1 -1
  185. package/es/components/result/src/result.vue.d.ts +1 -1
  186. package/es/components/row/src/row.d.ts +1 -1
  187. package/es/components/scrollbar/src/scrollbar.d.ts +5 -4
  188. package/es/components/scrollbar/src/scrollbar.mjs +12 -2
  189. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  190. package/es/components/scrollbar/src/scrollbar.vue.d.ts +5 -4
  191. package/es/components/scrollbar/src/thumb.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  192. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  193. package/es/components/segmented/index.d.ts +2 -2
  194. package/es/components/segmented/src/segmented.d.ts +2 -2
  195. package/es/components/segmented/src/segmented.vue.d.ts +1 -1
  196. package/es/components/select/src/option.d.ts +2 -2
  197. package/es/components/select/src/option.vue.d.ts +5 -5
  198. package/es/components/select/src/select-dropdown.vue.d.ts +2 -1
  199. package/es/components/select/src/select.d.ts +12 -16
  200. package/es/components/select/src/select.mjs +15 -2
  201. package/es/components/select/src/select.mjs.map +1 -1
  202. package/es/components/select/src/select.vue.d.ts +137 -143
  203. package/es/components/select/src/select.vue_vue_type_script_lang.mjs.map +1 -1
  204. package/es/components/select/src/select2.mjs.map +1 -1
  205. package/es/components/select/src/useOption.d.ts +2 -2
  206. package/es/components/select/src/useSelect.d.ts +7 -7
  207. package/es/components/select/src/useSelect.mjs.map +1 -1
  208. package/es/components/select-v2/src/defaults.d.ts +6 -106
  209. package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
  210. package/es/components/select-v2/src/select.vue.d.ts +110 -308
  211. package/es/components/select-v2/src/useSelect.d.ts +2 -2
  212. package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
  213. package/es/components/skeleton/src/skeleton.vue.d.ts +1 -1
  214. package/es/components/slider/src/button.d.ts +2 -1
  215. package/es/components/slider/src/button.mjs +10 -2
  216. package/es/components/slider/src/button.mjs.map +1 -1
  217. package/es/components/slider/src/button.vue.d.ts +6 -4
  218. package/es/components/slider/src/composables/use-marks.mjs.map +1 -1
  219. package/es/components/slider/src/slider.d.ts +4 -4
  220. package/es/components/slider/src/slider.mjs +6 -1
  221. package/es/components/slider/src/slider.mjs.map +1 -1
  222. package/es/components/slider/src/slider.vue.d.ts +16 -16
  223. package/es/components/space/src/space.d.ts +10 -10
  224. package/es/components/space/src/space.mjs +2 -1
  225. package/es/components/space/src/space.mjs.map +1 -1
  226. package/es/components/space/src/use-space.d.ts +2 -3
  227. package/es/components/splitter/src/split-bar.vue.d.ts +1 -1
  228. package/es/components/statistic/src/statistic.vue.d.ts +2 -2
  229. package/es/components/steps/src/item.d.ts +1 -1
  230. package/es/components/steps/src/item.vue.d.ts +1 -1
  231. package/es/components/steps/src/steps.d.ts +2 -2
  232. package/es/components/steps/src/steps.vue.d.ts +1 -1
  233. package/es/components/switch/src/switch.d.ts +1 -1
  234. package/es/components/switch/src/switch.vue.d.ts +4 -4
  235. package/es/components/table/src/filter-panel.vue.d.ts +107 -104
  236. package/es/components/table/src/table/defaults.d.ts +6 -6
  237. package/es/components/table/src/table/defaults.mjs.map +1 -1
  238. package/es/components/table/src/table/style-helper.d.ts +2 -2
  239. package/es/components/table/src/table-body/events-helper.mjs.map +1 -1
  240. package/es/components/table/src/table-column/defaults.d.ts +4 -4
  241. package/es/components/table/src/table-footer/index.d.ts +1 -1
  242. package/es/components/table/src/table-header/index.d.ts +19 -19
  243. package/es/components/table/src/table.vue.d.ts +5 -5
  244. package/es/components/table-v2/src/components/header.d.ts +1 -1
  245. package/es/components/table-v2/src/components/row.d.ts +1 -1
  246. package/es/components/table-v2/src/table-grid.d.ts +4 -4
  247. package/es/components/table-v2/src/table-v2.d.ts +5 -5
  248. package/es/components/tabs/src/tab-nav.d.ts +1 -1
  249. package/es/components/tabs/src/tabs.d.ts +6 -6
  250. package/es/components/tag/src/tag.d.ts +3 -3
  251. package/es/components/tag/src/tag.vue.d.ts +2 -2
  252. package/es/components/text/src/text.d.ts +2 -2
  253. package/es/components/time-picker/src/common/picker-range-trigger.vue.d.ts +6 -6
  254. package/es/components/time-picker/src/common/picker.vue.d.ts +23 -223
  255. package/es/components/time-picker/src/common/props.d.ts +4 -104
  256. package/es/components/time-picker/src/time-picker.d.ts +17 -217
  257. package/es/components/time-select/src/time-select.d.ts +7 -11
  258. package/es/components/time-select/src/time-select.mjs +15 -2
  259. package/es/components/time-select/src/time-select.mjs.map +1 -1
  260. package/es/components/time-select/src/time-select.vue.d.ts +11 -10
  261. package/es/components/timeline/src/timeline-item.d.ts +2 -2
  262. package/es/components/timeline/src/timeline-item.vue.d.ts +1 -1
  263. package/es/components/tooltip/src/content.d.ts +4 -199
  264. package/es/components/tooltip/src/content.vue.d.ts +18 -16
  265. package/es/components/tooltip/src/tooltip.d.ts +5 -202
  266. package/es/components/tooltip/src/tooltip.vue.d.ts +22 -21
  267. package/es/components/tooltip/src/trigger.d.ts +1 -1
  268. package/es/components/tour/src/content.d.ts +1 -1
  269. package/es/components/tour/src/content.vue.d.ts +1 -1
  270. package/es/components/tour/src/mask.vue.d.ts +1 -1
  271. package/es/components/tour/src/step.d.ts +1 -1
  272. package/es/components/tour/src/step.vue.d.ts +1 -1
  273. package/es/components/tour/src/tour.d.ts +1 -1
  274. package/es/components/tour/src/tour.vue.d.ts +7 -7
  275. package/es/components/transfer/src/transfer.vue.d.ts +1 -1
  276. package/es/components/tree/src/tree-node.vue.d.ts +18 -18
  277. package/es/components/tree/src/tree.vue.d.ts +22 -22
  278. package/es/components/tree-select/src/select.mjs +1 -5
  279. package/es/components/tree-select/src/select.mjs.map +1 -1
  280. package/es/components/tree-select/src/tree-select-option.d.ts +5 -5
  281. package/es/components/tree-select/src/tree-select.vue.d.ts +44 -52
  282. package/es/components/tree-v2/src/composables/useTree.d.ts +13 -12
  283. package/es/components/tree-v2/src/tree.vue.d.ts +5 -5
  284. package/es/components/upload/src/upload-content.d.ts +1 -1
  285. package/es/components/upload/src/upload-content.vue.d.ts +2 -2
  286. package/es/components/upload/src/upload-list.d.ts +1 -1
  287. package/es/components/upload/src/upload.d.ts +2 -2
  288. package/es/components/upload/src/upload.mjs.map +1 -1
  289. package/es/components/upload/src/upload.vue.d.ts +2 -2
  290. package/es/components/virtual-list/src/builders/build-grid.d.ts +5 -4
  291. package/es/components/virtual-list/src/builders/build-list.d.ts +7 -6
  292. package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +5 -4
  293. package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +7 -6
  294. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +5 -4
  295. package/es/components/virtual-list/src/components/fixed-size-list.d.ts +7 -6
  296. package/es/components/virtual-list/src/components/scrollbar.d.ts +4 -2
  297. package/es/components/virtual-list/src/props.d.ts +5 -4
  298. package/es/components/virtual-list/src/props.mjs +15 -2
  299. package/es/components/virtual-list/src/props.mjs.map +1 -1
  300. package/es/components/watermark/src/watermark.mjs.map +1 -1
  301. package/es/components/watermark/src/watermark.vue.d.ts +1 -1
  302. package/es/hooks/use-floating/index.d.ts +12 -12
  303. package/es/hooks/use-popper/index.d.ts +4 -4
  304. package/es/hooks/use-size/index.d.ts +3 -3
  305. package/es/hooks/use-throttle-render/index.mjs.map +1 -1
  306. package/es/utils/index.d.ts +2 -2
  307. package/es/utils/typescript.d.ts +2 -1
  308. package/es/utils/typescript.mjs.map +1 -1
  309. package/es/utils/vue/size.d.ts +1 -1
  310. package/es/version.d.ts +1 -1
  311. package/es/version.mjs +1 -1
  312. package/es/version.mjs.map +1 -1
  313. package/lib/components/affix/src/affix.d.ts +1 -1
  314. package/lib/components/affix/src/affix.vue.d.ts +3 -3
  315. package/lib/components/alert/src/alert.d.ts +2 -2
  316. package/lib/components/anchor/src/anchor.d.ts +1 -1
  317. package/lib/components/anchor/src/anchor.vue.d.ts +2 -2
  318. package/lib/components/autocomplete/src/autocomplete.d.ts +7 -108
  319. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  320. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
  321. package/lib/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  322. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  323. package/lib/components/avatar/src/avatar-group-props.d.ts +9 -106
  324. package/lib/components/avatar/src/avatar-group-props.js +9 -1
  325. package/lib/components/avatar/src/avatar-group-props.js.map +1 -1
  326. package/lib/components/avatar/src/avatar-group.d.ts +20 -213
  327. package/lib/components/avatar/src/avatar.d.ts +3 -3
  328. package/lib/components/backtop/src/backtop.vue.d.ts +1 -1
  329. package/lib/components/badge/src/badge.d.ts +4 -8
  330. package/lib/components/badge/src/badge.js +9 -1
  331. package/lib/components/badge/src/badge.js.map +1 -1
  332. package/lib/components/badge/src/badge.vue.d.ts +3 -1
  333. package/lib/components/badge/src/badge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  334. package/lib/components/badge/src/badge2.js.map +1 -1
  335. package/lib/components/button/src/button-group.d.ts +2 -2
  336. package/lib/components/button/src/button-group.vue.d.ts +1 -1
  337. package/lib/components/button/src/button.d.ts +2 -2
  338. package/lib/components/button/src/button.vue.d.ts +4 -4
  339. package/lib/components/button/src/use-button.d.ts +2 -2
  340. package/lib/components/calendar/src/calendar.js.map +1 -1
  341. package/lib/components/calendar/src/calendar.vue.d.ts +1 -1
  342. package/lib/components/calendar/style/css.js +1 -1
  343. package/lib/components/calendar/style/index.js +1 -1
  344. package/lib/components/card/src/card.d.ts +8 -7
  345. package/lib/components/card/src/card.js +27 -3
  346. package/lib/components/card/src/card.js.map +1 -1
  347. package/lib/components/card/src/card.vue.d.ts +4 -0
  348. package/lib/components/card/src/card.vue_vue_type_script_setup_true_lang.js.map +1 -1
  349. package/lib/components/card/src/card2.js.map +1 -1
  350. package/lib/components/carousel/src/carousel.d.ts +1 -1
  351. package/lib/components/carousel/src/carousel.vue.d.ts +4 -4
  352. package/lib/components/cascader/src/cascader.d.ts +9 -110
  353. package/lib/components/cascader/src/cascader.js.map +1 -1
  354. package/lib/components/cascader/src/cascader.vue.d.ts +22 -20
  355. package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  356. package/lib/components/cascader/src/cascader2.js.map +1 -1
  357. package/lib/components/cascader-panel/src/index.vue.d.ts +4 -4
  358. package/lib/components/cascader-panel/src/menu.vue.d.ts +1 -1
  359. package/lib/components/check-tag/src/check-tag.d.ts +1 -1
  360. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +6 -6
  361. package/lib/components/checkbox/src/checkbox-group.d.ts +1 -1
  362. package/lib/components/checkbox/src/checkbox-group.vue.d.ts +5 -5
  363. package/lib/components/checkbox/src/checkbox.d.ts +9 -9
  364. package/lib/components/checkbox/src/checkbox.vue.d.ts +6 -6
  365. package/lib/components/checkbox/src/composables/use-checkbox-status.d.ts +2 -2
  366. package/lib/components/checkbox/src/composables/use-checkbox.d.ts +2 -2
  367. package/lib/components/col/src/col.vue.d.ts +1 -1
  368. package/lib/components/collapse/src/collapse-item.vue.d.ts +1 -1
  369. package/lib/components/collapse/src/collapse.d.ts +1 -1
  370. package/lib/components/collapse/src/collapse.vue.d.ts +1 -1
  371. package/lib/components/color-picker/src/color-picker.d.ts +5 -104
  372. package/lib/components/color-picker/src/color-picker.js +1 -0
  373. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  374. package/lib/components/color-picker/src/color-picker.vue.d.ts +12 -10
  375. package/lib/components/color-picker-panel/src/color-picker-panel.d.ts +4 -10
  376. package/lib/components/color-picker-panel/src/color-picker-panel.js +9 -5
  377. package/lib/components/color-picker-panel/src/color-picker-panel.js.map +1 -1
  378. package/lib/components/color-picker-panel/src/color-picker-panel.vue.d.ts +4 -1
  379. package/lib/components/color-picker-panel/src/color-picker-panel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  380. package/lib/components/color-picker-panel/src/color-picker-panel2.js.map +1 -1
  381. package/lib/components/config-provider/src/config-provider-props.d.ts +1 -1
  382. package/lib/components/config-provider/src/config-provider.d.ts +2 -2
  383. package/lib/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
  384. package/lib/components/date-picker/src/date-picker.d.ts +17 -217
  385. package/lib/components/date-picker/src/props.d.ts +4 -104
  386. package/lib/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
  387. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +3 -3
  388. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +2 -2
  389. package/lib/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +2 -2
  390. package/lib/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +2 -2
  391. package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +4 -4
  392. package/lib/components/date-picker-panel/src/panel-utils.d.ts +21 -21
  393. package/lib/components/date-picker-panel/src/props/basic-date-table.js.map +1 -1
  394. package/lib/components/descriptions/src/description-item.d.ts +18 -18
  395. package/lib/components/descriptions/src/description.d.ts +1 -1
  396. package/lib/components/descriptions/src/description.vue.d.ts +2 -2
  397. package/lib/components/dialog/src/dialog-content.d.ts +10 -6
  398. package/lib/components/dialog/src/dialog-content.js +31 -4
  399. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  400. package/lib/components/dialog/src/dialog-content.vue.d.ts +5 -1
  401. package/lib/components/dialog/src/dialog.d.ts +10 -5
  402. package/lib/components/dialog/src/dialog.js +11 -14
  403. package/lib/components/dialog/src/dialog.js.map +1 -1
  404. package/lib/components/dialog/src/dialog.vue.d.ts +9 -4
  405. package/lib/components/divider/src/divider.d.ts +1 -1
  406. package/lib/components/divider/src/divider.vue.d.ts +1 -1
  407. package/lib/components/drawer/src/drawer.d.ts +5 -4
  408. package/lib/components/drawer/src/drawer.vue.d.ts +12 -7
  409. package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +2 -2
  410. package/lib/components/dropdown/src/dropdown-item.vue.d.ts +5 -5
  411. package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  412. package/lib/components/dropdown/src/dropdown.d.ts +5 -106
  413. package/lib/components/dropdown/src/dropdown.vue.d.ts +115 -313
  414. package/lib/components/dropdown/style/css.js +1 -1
  415. package/lib/components/dropdown/style/index.js +1 -1
  416. package/lib/components/form/src/form-item.d.ts +3 -3
  417. package/lib/components/form/src/form-item.vue.d.ts +2 -2
  418. package/lib/components/form/src/form.d.ts +4 -4
  419. package/lib/components/form/src/hooks/use-form-common-props.d.ts +2 -2
  420. package/lib/components/image/src/image.d.ts +1 -1
  421. package/lib/components/image/src/image.js.map +1 -1
  422. package/lib/components/image/src/image.vue.d.ts +4 -4
  423. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  424. package/lib/components/image-viewer/src/image-viewer.vue.d.ts +4 -4
  425. package/lib/components/input/src/input.d.ts +4 -4
  426. package/lib/components/input/src/input.vue.d.ts +19 -19
  427. package/lib/components/input-number/src/input-number.d.ts +3 -3
  428. package/lib/components/input-number/src/input-number.vue.d.ts +10 -10
  429. package/lib/components/input-otp/src/input-otp.vue.d.ts +7 -7
  430. package/lib/components/input-tag/src/composables/use-input-tag.d.ts +1 -1
  431. package/lib/components/input-tag/src/input-tag.d.ts +3 -3
  432. package/lib/components/input-tag/src/input-tag.vue.d.ts +12 -12
  433. package/lib/components/link/src/link.d.ts +2 -2
  434. package/lib/components/link/src/link.js.map +1 -1
  435. package/lib/components/mention/src/mention.d.ts +7 -108
  436. package/lib/components/mention/src/mention.vue.d.ts +5 -5
  437. package/lib/components/mention/src/mention.vue_vue_type_script_setup_true_lang.js.map +1 -1
  438. package/lib/components/mention/src/mention2.js.map +1 -1
  439. package/lib/components/menu/src/menu.d.ts +13 -25
  440. package/lib/components/menu/src/menu.js +18 -2
  441. package/lib/components/menu/src/menu.js.map +1 -1
  442. package/lib/components/menu/src/sub-menu.d.ts +11 -23
  443. package/lib/components/menu/src/sub-menu.js +18 -2
  444. package/lib/components/menu/src/sub-menu.js.map +1 -1
  445. package/lib/components/message/src/instance.d.ts +1 -1
  446. package/lib/components/message/src/message.d.ts +5 -5
  447. package/lib/components/message/src/message.js +6 -1
  448. package/lib/components/message/src/message.js.map +1 -1
  449. package/lib/components/message/src/message.vue.d.ts +7 -6
  450. package/lib/components/message/src/method.js.map +1 -1
  451. package/lib/components/message-box/src/index.vue.d.ts +73 -81
  452. package/lib/components/notification/src/notification.d.ts +4 -3
  453. package/lib/components/notification/src/notification.js +6 -1
  454. package/lib/components/notification/src/notification.js.map +1 -1
  455. package/lib/components/notification/src/notification.vue.d.ts +5 -4
  456. package/lib/components/overlay/index.d.ts +4 -12
  457. package/lib/components/overlay/src/overlay.d.ts +5 -18
  458. package/lib/components/overlay/src/overlay.js +9 -5
  459. package/lib/components/overlay/src/overlay.js.map +1 -1
  460. package/lib/components/pagination/src/components/jumper.d.ts +1 -1
  461. package/lib/components/pagination/src/components/jumper.vue.d.ts +2 -2
  462. package/lib/components/pagination/src/components/sizes.d.ts +5 -14
  463. package/lib/components/pagination/src/components/sizes.js +18 -2
  464. package/lib/components/pagination/src/components/sizes.js.map +1 -1
  465. package/lib/components/pagination/src/components/sizes.vue.d.ts +10 -27
  466. package/lib/components/pagination/src/pagination.d.ts +16 -29
  467. package/lib/components/pagination/src/pagination.js +15 -2
  468. package/lib/components/pagination/src/pagination.js.map +1 -1
  469. package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
  470. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +5 -5
  471. package/lib/components/popover/src/popover.d.ts +5 -105
  472. package/lib/components/popover/src/popover.js +1 -0
  473. package/lib/components/popover/src/popover.js.map +1 -1
  474. package/lib/components/popover/src/popover.vue.d.ts +14 -13
  475. package/lib/components/popper/src/composables/use-content-dom.d.ts +2 -25
  476. package/lib/components/popper/src/composables/use-content.d.ts +4 -4
  477. package/lib/components/popper/src/content.d.ts +8 -18
  478. package/lib/components/popper/src/content.js +13 -7
  479. package/lib/components/popper/src/content.js.map +1 -1
  480. package/lib/components/popper/src/content.vue.d.ts +19 -17
  481. package/lib/components/popper/src/popper.d.ts +2 -2
  482. package/lib/components/popper/src/popper.js.map +1 -1
  483. package/lib/components/progress/src/progress.d.ts +1 -1
  484. package/lib/components/progress/src/progress.vue.d.ts +2 -2
  485. package/lib/components/radio/src/radio-button.d.ts +4 -4
  486. package/lib/components/radio/src/radio-button.vue.d.ts +2 -2
  487. package/lib/components/radio/src/radio-group.d.ts +1 -1
  488. package/lib/components/radio/src/radio-group.vue.d.ts +6 -6
  489. package/lib/components/radio/src/radio.d.ts +8 -8
  490. package/lib/components/radio/src/radio.vue.d.ts +4 -4
  491. package/lib/components/radio/src/use-radio.d.ts +1 -1
  492. package/lib/components/rate/src/rate.d.ts +1 -1
  493. package/lib/components/rate/src/rate.vue.d.ts +3 -3
  494. package/lib/components/rate/src/rate.vue_vue_type_script_setup_true_lang.js.map +1 -1
  495. package/lib/components/rate/src/rate2.js.map +1 -1
  496. package/lib/components/result/src/result.d.ts +1 -1
  497. package/lib/components/result/src/result.vue.d.ts +1 -1
  498. package/lib/components/row/src/row.d.ts +1 -1
  499. package/lib/components/scrollbar/src/scrollbar.d.ts +5 -4
  500. package/lib/components/scrollbar/src/scrollbar.js +12 -2
  501. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  502. package/lib/components/scrollbar/src/scrollbar.vue.d.ts +5 -4
  503. package/lib/components/scrollbar/src/thumb.vue_vue_type_script_setup_true_lang.js.map +1 -1
  504. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  505. package/lib/components/segmented/index.d.ts +2 -2
  506. package/lib/components/segmented/src/segmented.d.ts +2 -2
  507. package/lib/components/segmented/src/segmented.vue.d.ts +1 -1
  508. package/lib/components/select/src/option.d.ts +2 -2
  509. package/lib/components/select/src/option.vue.d.ts +5 -5
  510. package/lib/components/select/src/select-dropdown.vue.d.ts +2 -1
  511. package/lib/components/select/src/select.d.ts +12 -16
  512. package/lib/components/select/src/select.js +15 -2
  513. package/lib/components/select/src/select.js.map +1 -1
  514. package/lib/components/select/src/select.vue.d.ts +137 -143
  515. package/lib/components/select/src/select.vue_vue_type_script_lang.js.map +1 -1
  516. package/lib/components/select/src/select2.js.map +1 -1
  517. package/lib/components/select/src/useOption.d.ts +2 -2
  518. package/lib/components/select/src/useSelect.d.ts +7 -7
  519. package/lib/components/select/src/useSelect.js.map +1 -1
  520. package/lib/components/select-v2/src/defaults.d.ts +6 -106
  521. package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
  522. package/lib/components/select-v2/src/select.vue.d.ts +110 -308
  523. package/lib/components/select-v2/src/useSelect.d.ts +2 -2
  524. package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
  525. package/lib/components/skeleton/src/skeleton.vue.d.ts +1 -1
  526. package/lib/components/slider/src/button.d.ts +2 -1
  527. package/lib/components/slider/src/button.js +9 -1
  528. package/lib/components/slider/src/button.js.map +1 -1
  529. package/lib/components/slider/src/button.vue.d.ts +6 -4
  530. package/lib/components/slider/src/composables/use-marks.js.map +1 -1
  531. package/lib/components/slider/src/slider.d.ts +4 -4
  532. package/lib/components/slider/src/slider.js +6 -1
  533. package/lib/components/slider/src/slider.js.map +1 -1
  534. package/lib/components/slider/src/slider.vue.d.ts +16 -16
  535. package/lib/components/space/src/space.d.ts +10 -10
  536. package/lib/components/space/src/space.js +2 -1
  537. package/lib/components/space/src/space.js.map +1 -1
  538. package/lib/components/space/src/use-space.d.ts +2 -3
  539. package/lib/components/splitter/src/split-bar.vue.d.ts +1 -1
  540. package/lib/components/statistic/src/statistic.vue.d.ts +2 -2
  541. package/lib/components/steps/src/item.d.ts +1 -1
  542. package/lib/components/steps/src/item.vue.d.ts +1 -1
  543. package/lib/components/steps/src/steps.d.ts +2 -2
  544. package/lib/components/steps/src/steps.vue.d.ts +1 -1
  545. package/lib/components/switch/src/switch.d.ts +1 -1
  546. package/lib/components/switch/src/switch.vue.d.ts +4 -4
  547. package/lib/components/table/src/filter-panel.vue.d.ts +107 -104
  548. package/lib/components/table/src/table/defaults.d.ts +6 -6
  549. package/lib/components/table/src/table/defaults.js.map +1 -1
  550. package/lib/components/table/src/table/style-helper.d.ts +2 -2
  551. package/lib/components/table/src/table-body/events-helper.js.map +1 -1
  552. package/lib/components/table/src/table-column/defaults.d.ts +4 -4
  553. package/lib/components/table/src/table-footer/index.d.ts +1 -1
  554. package/lib/components/table/src/table-header/index.d.ts +19 -19
  555. package/lib/components/table/src/table.vue.d.ts +5 -5
  556. package/lib/components/table-v2/src/components/header.d.ts +1 -1
  557. package/lib/components/table-v2/src/components/row.d.ts +1 -1
  558. package/lib/components/table-v2/src/table-grid.d.ts +4 -4
  559. package/lib/components/table-v2/src/table-v2.d.ts +5 -5
  560. package/lib/components/tabs/src/tab-nav.d.ts +1 -1
  561. package/lib/components/tabs/src/tabs.d.ts +6 -6
  562. package/lib/components/tag/src/tag.d.ts +3 -3
  563. package/lib/components/tag/src/tag.vue.d.ts +2 -2
  564. package/lib/components/text/src/text.d.ts +2 -2
  565. package/lib/components/time-picker/src/common/picker-range-trigger.vue.d.ts +6 -6
  566. package/lib/components/time-picker/src/common/picker.vue.d.ts +23 -223
  567. package/lib/components/time-picker/src/common/props.d.ts +4 -104
  568. package/lib/components/time-picker/src/time-picker.d.ts +17 -217
  569. package/lib/components/time-select/src/time-select.d.ts +7 -11
  570. package/lib/components/time-select/src/time-select.js +15 -2
  571. package/lib/components/time-select/src/time-select.js.map +1 -1
  572. package/lib/components/time-select/src/time-select.vue.d.ts +11 -10
  573. package/lib/components/timeline/src/timeline-item.d.ts +2 -2
  574. package/lib/components/timeline/src/timeline-item.vue.d.ts +1 -1
  575. package/lib/components/tooltip/src/content.d.ts +4 -199
  576. package/lib/components/tooltip/src/content.vue.d.ts +18 -16
  577. package/lib/components/tooltip/src/tooltip.d.ts +5 -202
  578. package/lib/components/tooltip/src/tooltip.vue.d.ts +22 -21
  579. package/lib/components/tooltip/src/trigger.d.ts +1 -1
  580. package/lib/components/tour/src/content.d.ts +1 -1
  581. package/lib/components/tour/src/content.vue.d.ts +1 -1
  582. package/lib/components/tour/src/mask.vue.d.ts +1 -1
  583. package/lib/components/tour/src/step.d.ts +1 -1
  584. package/lib/components/tour/src/step.vue.d.ts +1 -1
  585. package/lib/components/tour/src/tour.d.ts +1 -1
  586. package/lib/components/tour/src/tour.vue.d.ts +7 -7
  587. package/lib/components/transfer/src/transfer.vue.d.ts +1 -1
  588. package/lib/components/tree/src/tree-node.vue.d.ts +18 -18
  589. package/lib/components/tree/src/tree.vue.d.ts +22 -22
  590. package/lib/components/tree-select/src/select.js +1 -5
  591. package/lib/components/tree-select/src/select.js.map +1 -1
  592. package/lib/components/tree-select/src/tree-select-option.d.ts +5 -5
  593. package/lib/components/tree-select/src/tree-select.vue.d.ts +44 -52
  594. package/lib/components/tree-v2/src/composables/useTree.d.ts +13 -12
  595. package/lib/components/tree-v2/src/tree.vue.d.ts +5 -5
  596. package/lib/components/upload/src/upload-content.d.ts +1 -1
  597. package/lib/components/upload/src/upload-content.vue.d.ts +2 -2
  598. package/lib/components/upload/src/upload-list.d.ts +1 -1
  599. package/lib/components/upload/src/upload.d.ts +2 -2
  600. package/lib/components/upload/src/upload.js.map +1 -1
  601. package/lib/components/upload/src/upload.vue.d.ts +2 -2
  602. package/lib/components/virtual-list/src/builders/build-grid.d.ts +5 -4
  603. package/lib/components/virtual-list/src/builders/build-list.d.ts +7 -6
  604. package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +5 -4
  605. package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +7 -6
  606. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +5 -4
  607. package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +7 -6
  608. package/lib/components/virtual-list/src/components/scrollbar.d.ts +4 -2
  609. package/lib/components/virtual-list/src/props.d.ts +5 -4
  610. package/lib/components/virtual-list/src/props.js +15 -2
  611. package/lib/components/virtual-list/src/props.js.map +1 -1
  612. package/lib/components/watermark/src/watermark.js.map +1 -1
  613. package/lib/components/watermark/src/watermark.vue.d.ts +1 -1
  614. package/lib/hooks/use-floating/index.d.ts +12 -12
  615. package/lib/hooks/use-popper/index.d.ts +4 -4
  616. package/lib/hooks/use-size/index.d.ts +3 -3
  617. package/lib/hooks/use-throttle-render/index.js.map +1 -1
  618. package/lib/utils/index.d.ts +2 -2
  619. package/lib/utils/typescript.d.ts +2 -1
  620. package/lib/utils/typescript.js.map +1 -1
  621. package/lib/utils/vue/size.d.ts +1 -1
  622. package/lib/version.d.ts +1 -1
  623. package/lib/version.js +1 -1
  624. package/lib/version.js.map +1 -1
  625. package/package.json +2 -2
  626. package/web-types.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
2
- import { Mutable } from "../../../utils/typescript.js";
2
+ import { ClassValue, Mutable } from "../../../utils/typescript.js";
3
3
  import { Options } from "../../popper/index.js";
4
4
  import { InputAutoSize, InputModelModifiers, InputProps, InputType } from "../../input/src/input.js";
5
5
  import { ElTooltipContentProps } from "../../tooltip/src/content.js";
@@ -81,7 +81,7 @@ declare const mentionProps: {
81
81
  prefix: EpPropFinalized<(new (...args: any[]) => string | string[]) | (() => string | string[]) | (((new (...args: any[]) => string | string[]) | (() => string | string[])) | null)[], unknown, unknown, string, boolean>;
82
82
  split: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
83
83
  filterOption: EpPropFinalized<(new (...args: any[]) => false | (<T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean)) | (() => false | (<T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean)) | (((new (...args: any[]) => false | (<T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean)) | (() => false | (<T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean))) | null)[], unknown, unknown, () => <T extends MentionOption = MentionOption>(pattern: string, option: T & MentionOption) => boolean, boolean>;
84
- placement: EpPropFinalized<(new (...args: any[]) => "top" | "bottom") | (() => "top" | "bottom") | (((new (...args: any[]) => "top" | "bottom") | (() => "top" | "bottom")) | null)[], unknown, unknown, string, boolean>;
84
+ placement: EpPropFinalized<(new (...args: any[]) => "bottom" | "top") | (() => "bottom" | "top") | (((new (...args: any[]) => "bottom" | "top") | (() => "bottom" | "top")) | null)[], unknown, unknown, string, boolean>;
85
85
  showArrow: BooleanConstructor;
86
86
  offset: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
87
87
  whole: BooleanConstructor;
@@ -93,117 +93,16 @@ declare const mentionProps: {
93
93
  };
94
94
  modelValue: StringConstructor;
95
95
  loading: BooleanConstructor;
96
- popperClass: {
97
- readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string | {
98
- [x: string]: boolean;
99
- } | (string | {
100
- [x: string]: boolean;
101
- } | (string | {
102
- [x: string]: boolean;
103
- } | (string | {
104
- [x: string]: boolean;
105
- } | (string | {
106
- [x: string]: boolean;
107
- } | (string | {
108
- [x: string]: boolean;
109
- } | (string | {
110
- [x: string]: boolean;
111
- } | (string | {
112
- [x: string]: boolean;
113
- } | (string | {
114
- [x: string]: boolean;
115
- } | (string | {
116
- [x: string]: boolean;
117
- } | (string | {
118
- [x: string]: boolean;
119
- } | (string | {
120
- [x: string]: boolean;
121
- } | /*elided*/any)[])[])[])[])[])[])[])[])[])[])[]) | (() => string | {
122
- [x: string]: boolean;
123
- } | (string | {
124
- [x: string]: boolean;
125
- } | (string | {
126
- [x: string]: boolean;
127
- } | (string | {
128
- [x: string]: boolean;
129
- } | (string | {
130
- [x: string]: boolean;
131
- } | (string | {
132
- [x: string]: boolean;
133
- } | (string | {
134
- [x: string]: boolean;
135
- } | (string | {
136
- [x: string]: boolean;
137
- } | (string | {
138
- [x: string]: boolean;
139
- } | (string | {
140
- [x: string]: boolean;
141
- } | (string | {
142
- [x: string]: boolean;
143
- } | (string | {
144
- [x: string]: boolean;
145
- } | /*elided*/any)[])[])[])[])[])[])[])[])[])[])[]) | (((new (...args: any[]) => string | {
146
- [x: string]: boolean;
147
- } | (string | {
148
- [x: string]: boolean;
149
- } | (string | {
150
- [x: string]: boolean;
151
- } | (string | {
152
- [x: string]: boolean;
153
- } | (string | {
154
- [x: string]: boolean;
155
- } | (string | {
156
- [x: string]: boolean;
157
- } | (string | {
158
- [x: string]: boolean;
159
- } | (string | {
160
- [x: string]: boolean;
161
- } | (string | {
162
- [x: string]: boolean;
163
- } | (string | {
164
- [x: string]: boolean;
165
- } | (string | {
166
- [x: string]: boolean;
167
- } | (string | {
168
- [x: string]: boolean;
169
- } | /*elided*/any)[])[])[])[])[])[])[])[])[])[])[]) | (() => string | {
170
- [x: string]: boolean;
171
- } | (string | {
172
- [x: string]: boolean;
173
- } | (string | {
174
- [x: string]: boolean;
175
- } | (string | {
176
- [x: string]: boolean;
177
- } | (string | {
178
- [x: string]: boolean;
179
- } | (string | {
180
- [x: string]: boolean;
181
- } | (string | {
182
- [x: string]: boolean;
183
- } | (string | {
184
- [x: string]: boolean;
185
- } | (string | {
186
- [x: string]: boolean;
187
- } | (string | {
188
- [x: string]: boolean;
189
- } | (string | {
190
- [x: string]: boolean;
191
- } | (string | {
192
- [x: string]: boolean;
193
- } | /*elided*/any)[])[])[])[])[])[])[])[])[])[])[])) | null)[], unknown, unknown>>;
194
- readonly required: false;
195
- readonly validator: ((val: unknown) => boolean) | undefined;
196
- __epPropKey: true;
197
- };
96
+ popperClass: EpPropFinalized<(new (...args: any[]) => string | false | Record<string, any> | ClassValue[]) | (() => ClassValue) | (((new (...args: any[]) => string | false | Record<string, any> | ClassValue[]) | (() => ClassValue)) | null)[], unknown, unknown, undefined, boolean>;
198
97
  popperStyle: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | _$vue.StyleValue[]) | (() => _$vue.StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | _$vue.StyleValue[]) | (() => _$vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
199
98
  popperOptions: EpPropFinalized<(new (...args: any[]) => Partial<Options>) | (() => Partial<Options>) | (((new (...args: any[]) => Partial<Options>) | (() => Partial<Options>)) | null)[], unknown, unknown, () => Partial<Options>, boolean>;
200
99
  props: EpPropFinalized<(new (...args: any[]) => MentionOptionProps) | (() => MentionOptionProps) | (((new (...args: any[]) => MentionOptionProps) | (() => MentionOptionProps)) | null)[], unknown, unknown, () => Required<MentionOptionProps>, boolean>;
201
- inputmode: EpPropFinalized<(new (...args: any[]) => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal") | (() => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal") | (() => "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
100
+ inputmode: EpPropFinalized<(new (...args: any[]) => "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal") | (() => "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal") | (() => "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
202
101
  name: StringConstructor;
203
102
  ariaLabel: StringConstructor;
204
103
  id: EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
205
104
  size: {
206
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
105
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
207
106
  readonly required: false;
208
107
  readonly validator: ((val: unknown) => boolean) | undefined;
209
108
  __epPropKey: true;
@@ -224,7 +123,7 @@ declare const mentionProps: {
224
123
  };
225
124
  type: EpPropFinalized<(new (...args: any[]) => string) | (() => InputType) | (((new (...args: any[]) => string) | (() => InputType)) | null)[], unknown, unknown, "text", boolean>;
226
125
  resize: {
227
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "horizontal" | "vertical" | "none" | "both", unknown>>;
126
+ readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>>;
228
127
  readonly required: false;
229
128
  readonly validator: ((val: unknown) => boolean) | undefined;
230
129
  __epPropKey: true;
@@ -266,7 +165,7 @@ declare const mentionProps: {
266
165
  clearIcon: EpPropFinalized<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown, _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
267
166
  showPassword: BooleanConstructor;
268
167
  showWordLimit: BooleanConstructor;
269
- wordLimitPosition: EpPropFinalized<StringConstructor, "outside" | "inside", unknown, "inside", boolean>;
168
+ wordLimitPosition: EpPropFinalized<StringConstructor, "inside" | "outside", unknown, "inside", boolean>;
270
169
  suffixIcon: {
271
170
  readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>>;
272
171
  readonly required: false;
@@ -7,12 +7,12 @@ import * as _$vue from "vue";
7
7
  //#region ../../packages/components/mention/src/mention.vue.d.ts
8
8
  declare const __VLS_export: <T extends MentionOption = MentionOption>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
9
9
  props: _$vue.PublicProps & __VLS_PrettifyLocal<MentionProps<T> & {
10
- onInput?: ((value: string) => any) | undefined;
10
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
11
11
  onSearch?: ((pattern: string, prefix: string) => any) | undefined;
12
- onSelect?: ((option: MentionOption, prefix: string) => any) | undefined;
13
- onBlur?: ((evt: FocusEvent) => any) | undefined;
12
+ onInput?: ((value: string) => any) | undefined;
14
13
  onFocus?: ((evt: FocusEvent) => any) | undefined;
15
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
14
+ onBlur?: ((evt: FocusEvent) => any) | undefined;
15
+ onSelect?: ((option: MentionOption, prefix: string) => any) | undefined;
16
16
  "onWhole-remove"?: ((pattern: string, prefix: string) => any) | undefined;
17
17
  }> & (typeof globalThis extends {
18
18
  __VLS_PROPS_FALLBACK: infer P;
@@ -46,7 +46,7 @@ declare const __VLS_export: <T extends MentionOption = MentionOption>(__VLS_prop
46
46
  index: number;
47
47
  }) => any;
48
48
  };
49
- emit: ((event: "input", value: string) => void) & ((event: "search", pattern: string, prefix: string) => void) & ((event: "select", option: MentionOption, prefix: string) => void) & ((event: "blur", evt: FocusEvent) => void) & ((event: "focus", evt: FocusEvent) => void) & ((event: "update:modelValue", value: string) => void) & ((event: "whole-remove", pattern: string, prefix: string) => void);
49
+ emit: ((event: "update:modelValue", value: string) => void) & ((event: "search", pattern: string, prefix: string) => void) & ((event: "input", value: string) => void) & ((event: "focus", evt: FocusEvent) => void) & ((event: "blur", evt: FocusEvent) => void) & ((event: "select", option: MentionOption, prefix: string) => void) & ((event: "whole-remove", pattern: string, prefix: string) => void);
50
50
  }>) => _$vue.VNode & {
51
51
  __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
52
52
  };
@@ -1 +1 @@
1
- {"version":3,"file":"mention.vue_vue_type_script_setup_true_lang.js","names":["$attrs","$slots"],"sources":["../../../../../../packages/components/mention/src/mention.vue"],"sourcesContent":["<template>\n <div ref=\"wrapperRef\" :class=\"ns.b()\">\n <el-input\n v-bind=\"mergeProps(passInputProps, $attrs)\"\n ref=\"elInputRef\"\n :model-value=\"modelValue\"\n :disabled=\"disabled\"\n :role=\"dropdownVisible ? 'combobox' : undefined\"\n :aria-activedescendant=\"dropdownVisible ? hoveringId || '' : undefined\"\n :aria-controls=\"dropdownVisible ? contentId : undefined\"\n :aria-expanded=\"dropdownVisible || undefined\"\n :aria-label=\"ariaLabel\"\n :aria-autocomplete=\"dropdownVisible ? 'none' : undefined\"\n :aria-haspopup=\"dropdownVisible ? 'listbox' : undefined\"\n @input=\"handleInputChange\"\n @keydown=\"handleInputKeyDown\"\n @mousedown=\"handleInputMouseDown\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-input>\n <el-tooltip\n ref=\"tooltipRef\"\n :visible=\"dropdownVisible\"\n :popper-class=\"[ns.e('popper'), popperClass!]\"\n :popper-style=\"popperStyle\"\n :popper-options=\"popperOptions\"\n :placement=\"computedPlacement\"\n :fallback-placements=\"computedFallbackPlacements\"\n effect=\"light\"\n pure\n :offset=\"offset\"\n :show-arrow=\"showArrow\"\n >\n <template #default>\n <div :style=\"cursorStyle\" />\n </template>\n <template #content>\n <el-mention-dropdown\n ref=\"dropdownRef\"\n :options=\"filteredOptions\"\n :disabled=\"disabled\"\n :loading=\"loading\"\n :content-id=\"contentId\"\n :aria-label=\"ariaLabel\"\n @select=\"handleSelect\"\n @click.stop=\"elInputRef?.focus()\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-mention-dropdown>\n </template>\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends MentionOption = MentionOption\">\nimport { computed, mergeProps, nextTick, ref } from 'vue'\nimport { pick } from 'lodash-unified'\nimport { useFocusController, useId, useNamespace } from '@element-plus/hooks'\nimport ElInput, { inputPropsDefaults } from '@element-plus/components/input'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { getEventCode, isArray, isFunction } from '@element-plus/utils'\nimport { mentionDefaultProps, mentionEmits } from './mention'\nimport { filterOption, getCursorPosition, getMentionCtx } from './helper'\nimport ElMentionDropdown from './mention-dropdown.vue'\n\nimport type { MentionProps } from './mention'\nimport type { Placement } from '@popperjs/core'\nimport type { CSSProperties } from 'vue'\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { MentionCtx, MentionOption } from './types'\n\ndefineOptions({\n name: 'ElMention',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<MentionProps<T>>(), {\n ...inputPropsDefaults,\n options: () => [],\n prefix: '@',\n split: ' ',\n filterOption: () => filterOption,\n placement: 'bottom',\n offset: 0,\n popperOptions: () => ({}),\n props: () => mentionDefaultProps,\n})\nconst emit = defineEmits(mentionEmits)\ndefineSlots<\n InputInstance['$slots'] & {\n header?: () => any\n footer?: () => any\n loading?: () => any\n label?: (props: { item: T & MentionOption; index: number }) => any\n }\n>()\n\nconst passInputProps = computed(() => {\n const inputProps = ElInput.props ?? []\n const keys = isArray(inputProps) ? inputProps : Object.keys(inputProps)\n return pick(props, keys)\n})\n\nconst ns = useNamespace('mention')\nconst disabled = useFormDisabled()\nconst contentId = useId()\n\nconst elInputRef = ref<InputInstance>()\nconst tooltipRef = ref<TooltipInstance>()\nconst dropdownRef = ref<InstanceType<typeof ElMentionDropdown>>()\n\nconst visible = ref(false)\nconst cursorStyle = ref<CSSProperties>()\nconst mentionCtx = ref<MentionCtx>()\n\nconst computedPlacement = computed<Placement>(() =>\n props.showArrow ? props.placement : `${props.placement}-start`\n)\n\nconst computedFallbackPlacements = computed<Placement[]>(() =>\n props.showArrow ? ['bottom', 'top'] : ['bottom-start', 'top-start']\n)\n\nconst aliasProps = computed(() => ({\n ...mentionDefaultProps,\n ...props.props,\n}))\n\nconst mapOption = (option: T) => {\n const base = {\n label: option[aliasProps.value.label],\n value: option[aliasProps.value.value],\n disabled: option[aliasProps.value.disabled],\n }\n return { ...option, ...base }\n}\n\nconst options = computed(() => props.options.map(mapOption))\n\nconst filteredOptions = computed(() => {\n const { filterOption } = props\n if (!mentionCtx.value || !filterOption) return options.value\n return options.value.filter((option) =>\n filterOption(mentionCtx.value!.pattern, option)\n )\n})\n\nconst dropdownVisible = computed(() => {\n return visible.value && (!!filteredOptions.value.length || props.loading)\n})\n\nconst hoveringId = computed(() => {\n return `${contentId.value}-${dropdownRef.value?.hoveringIndex}`\n})\n\nconst handleInputChange = (value: string) => {\n emit(UPDATE_MODEL_EVENT, value)\n emit(INPUT_EVENT, value)\n syncAfterCursorMove()\n}\n\nconst handleInputKeyDown = (event: KeyboardEvent | Event) => {\n if (elInputRef.value?.isComposing) return\n const code = getEventCode(event as KeyboardEvent)\n\n switch (code) {\n case EVENT_CODE.left:\n case EVENT_CODE.right:\n syncAfterCursorMove()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.down:\n if (!visible.value) return\n event.preventDefault()\n dropdownRef.value?.navigateOptions(\n code === EVENT_CODE.up ? 'prev' : 'next'\n )\n break\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n if (!visible.value) {\n props.type !== 'textarea' && syncAfterCursorMove()\n return\n }\n event.preventDefault()\n if (dropdownRef.value?.hoverOption) {\n dropdownRef.value?.selectHoverOption()\n } else {\n visible.value = false\n }\n break\n case EVENT_CODE.esc:\n if (!visible.value) return\n event.preventDefault()\n visible.value = false\n break\n case EVENT_CODE.backspace:\n if (props.whole && mentionCtx.value) {\n const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } =\n mentionCtx.value\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const matchOption = options.value.find((item) => item.value === pattern)\n const isWhole = isFunction(props.checkIsWhole)\n ? props.checkIsWhole(pattern, prefix)\n : matchOption\n if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {\n event.preventDefault()\n const newValue =\n inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1)\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('whole-remove', pattern, prefix)\n\n const newSelectionEnd = prefixIndex\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n syncDropdownVisible()\n })\n }\n }\n }\n}\n\nconst { wrapperRef } = useFocusController(elInputRef, {\n disabled,\n afterFocus() {\n syncAfterCursorMove()\n },\n beforeBlur(event) {\n return tooltipRef.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n visible.value = false\n },\n})\n\nconst handleInputMouseDown = () => {\n syncAfterCursorMove()\n}\n\n// Ensure that the original option passed by users is returned\nconst getOriginalOption = (mentionOption: MentionOption) => {\n return props.options.find((option: MentionOption) => {\n return mentionOption.value === option[aliasProps.value.value]\n })\n}\n\nconst handleSelect = (item: MentionOption) => {\n if (!mentionCtx.value) return\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const { split } = props\n\n const newEndPart = inputValue.slice(mentionCtx.value.end)\n const alreadySeparated = newEndPart.startsWith(split)\n const newMiddlePart = `${item.value}${alreadySeparated ? '' : split}`\n\n const newValue =\n inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart\n\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('select', getOriginalOption(item)!, mentionCtx.value.prefix)\n\n const newSelectionEnd =\n mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0)\n\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n inputEl.focus()\n syncDropdownVisible()\n })\n}\n\nconst getInputEl = () =>\n props.type === 'textarea'\n ? elInputRef.value?.textarea\n : elInputRef.value?.input\n\nconst syncAfterCursorMove = () => {\n // can't use nextTick(), get cursor position will be wrong\n setTimeout(() => {\n syncCursor()\n syncDropdownVisible()\n nextTick(() => tooltipRef.value?.updatePopper())\n }, 0)\n}\n\nconst syncCursor = () => {\n const inputEl = getInputEl()\n if (!inputEl) return\n\n const caretPosition = getCursorPosition(inputEl)\n const inputRect = inputEl.getBoundingClientRect()\n const wrapperRect = wrapperRef.value!.getBoundingClientRect()\n\n cursorStyle.value = {\n position: 'absolute',\n width: 0,\n height: `${caretPosition.height}px`,\n left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`,\n top: `${caretPosition.top + inputRect.top - wrapperRect.top}px`,\n }\n}\n\nconst syncDropdownVisible = () => {\n const inputEl = getInputEl()\n if (document.activeElement !== inputEl) {\n visible.value = false\n return\n }\n const { prefix, split } = props\n mentionCtx.value = getMentionCtx(inputEl, prefix, split)\n if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {\n visible.value = true\n emit('search', mentionCtx.value.pattern, mentionCtx.value.prefix)\n return\n }\n visible.value = false\n}\n\ndefineExpose({\n input: elInputRef,\n tooltip: tooltipRef,\n dropdownVisible,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAuFA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAUb,MAAM,kBAAA,GAAA,IAAA,gBAAgC;GACpC,MAAM,aAAa,gBAAA,QAAQ,SAAS,EAAC;GAErC,QAAA,GAAA,eAAA,MAAY,QAAA,GAAA,YAAA,SADS,WAAW,GAAG,aAAa,OAAO,KAAK,WAAU,CAC/C;IACxB;EAED,MAAM,KAAK,cAAA,aAAa,UAAS;EACjC,MAAM,WAAW,8BAAA,iBAAgB;EACjC,MAAM,YAAY,gBAAA,OAAM;EAExB,MAAM,cAAA,GAAA,IAAA,MAAgC;EACtC,MAAM,cAAA,GAAA,IAAA,MAAkC;EACxC,MAAM,eAAA,GAAA,IAAA,MAA0D;EAEhE,MAAM,WAAA,GAAA,IAAA,KAAc,MAAK;EACzB,MAAM,eAAA,GAAA,IAAA,MAAiC;EACvC,MAAM,cAAA,GAAA,IAAA,MAA6B;EAEnC,MAAM,qBAAA,GAAA,IAAA,gBACJ,MAAM,YAAY,MAAM,YAAY,GAAG,MAAM,UAAU,QACzD;EAEA,MAAM,8BAAA,GAAA,IAAA,gBACJ,MAAM,YAAY,CAAC,UAAU,MAAM,GAAG,CAAC,gBAAgB,YAAW,CACpE;EAEA,MAAM,cAAA,GAAA,IAAA,iBAA6B;GACjC,GAAG,gBAAA;GACH,GAAG,MAAM;GACV,EAAC;EAEF,MAAM,aAAa,WAAc;GAC/B,MAAM,OAAO;IACX,O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A,EAAY,QAAA,YAAW;IAC1C,gBAAc,QAAA;IACd,kBAAgB,QAAA;IAChB,WAAW,kBAAA;IACX,uBAAqB,2BAAA;IACtB,QAAO;IACP,MAAA;IACC,QAAQ,QAAA;IACR,cAAY,QAAA;;IAEF,UAAA,GAAA,IAAA,eACmB,EAAA,GAAA,IAAA,oBAAA,OAAA,EAAtB,QAAA,GAAA,IAAA,gBAAO,YAAA,MAAW,EAAA,EAAA,MAAA,EAAA,CAAA,CAAA;IAEf,UAAA,GAAA,IAAA,eAca,EAAA,GAAA,IAAA,aAAA,yBAAA,SAAA;cAZhB;KAAJ,KAAI;KACH,SAAS,gBAAA;KACT,WAAA,GAAA,IAAA,OAAU,SAAQ;KAClB,SAAS,QAAA;KACT,eAAA,GAAA,IAAA,OAAY,UAAS;KACrB,cAAY,QAAA;KACZ,UAAQ;KACR,SAAK,OAAA,OAAA,OAAA,MAAA,GAAA,IAAA,gBAAA,WAAO,WAAA,OAAY,OAAK,EAAA,CAAA,OAAA,CAAA;2DAEAA,KAAAA,SAAZ,GAAG,SAAI;;MAAc;4BAAQ,cAAS,EAAA,GAAA,IAAA,YACd,KAAA,QAA3B,OAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,oBAAc,UAAS,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"mention.vue_vue_type_script_setup_true_lang.js","names":["$attrs","$slots"],"sources":["../../../../../../packages/components/mention/src/mention.vue"],"sourcesContent":["<template>\n <div ref=\"wrapperRef\" :class=\"ns.b()\">\n <el-input\n v-bind=\"mergeProps(passInputProps, $attrs)\"\n ref=\"elInputRef\"\n :model-value=\"modelValue\"\n :disabled=\"disabled\"\n :role=\"dropdownVisible ? 'combobox' : undefined\"\n :aria-activedescendant=\"dropdownVisible ? hoveringId || '' : undefined\"\n :aria-controls=\"dropdownVisible ? contentId : undefined\"\n :aria-expanded=\"dropdownVisible || undefined\"\n :aria-label=\"ariaLabel\"\n :aria-autocomplete=\"dropdownVisible ? 'none' : undefined\"\n :aria-haspopup=\"dropdownVisible ? 'listbox' : undefined\"\n @input=\"handleInputChange\"\n @keydown=\"handleInputKeyDown\"\n @mousedown=\"handleInputMouseDown\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-input>\n <el-tooltip\n ref=\"tooltipRef\"\n :visible=\"dropdownVisible\"\n :popper-class=\"[ns.e('popper'), popperClass!]\"\n :popper-style=\"popperStyle\"\n :popper-options=\"popperOptions\"\n :placement=\"computedPlacement\"\n :fallback-placements=\"computedFallbackPlacements\"\n effect=\"light\"\n pure\n :offset=\"offset\"\n :show-arrow=\"showArrow\"\n >\n <template #default>\n <div :style=\"cursorStyle\" />\n </template>\n <template #content>\n <el-mention-dropdown\n ref=\"dropdownRef\"\n :options=\"filteredOptions\"\n :disabled=\"disabled\"\n :loading=\"loading\"\n :content-id=\"contentId\"\n :aria-label=\"ariaLabel\"\n @select=\"handleSelect\"\n @click.stop=\"elInputRef?.focus()\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-mention-dropdown>\n </template>\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends MentionOption = MentionOption\">\nimport { computed, mergeProps, nextTick, ref } from 'vue'\nimport { pick } from 'lodash-unified'\nimport { useFocusController, useId, useNamespace } from '@element-plus/hooks'\nimport ElInput, { inputPropsDefaults } from '@element-plus/components/input'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { getEventCode, isArray, isFunction } from '@element-plus/utils'\nimport { mentionDefaultProps, mentionEmits } from './mention'\nimport { filterOption, getCursorPosition, getMentionCtx } from './helper'\nimport ElMentionDropdown from './mention-dropdown.vue'\n\nimport type { MentionProps } from './mention'\nimport type { Placement } from '@popperjs/core'\nimport type { CSSProperties } from 'vue'\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { MentionCtx, MentionOption } from './types'\n\ndefineOptions({\n name: 'ElMention',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<MentionProps<T>>(), {\n ...inputPropsDefaults,\n options: () => [],\n prefix: '@',\n split: ' ',\n filterOption: () => filterOption,\n placement: 'bottom',\n offset: 0,\n popperClass: undefined,\n popperStyle: undefined,\n popperOptions: () => ({}),\n props: () => mentionDefaultProps,\n})\nconst emit = defineEmits(mentionEmits)\ndefineSlots<\n InputInstance['$slots'] & {\n header?: () => any\n footer?: () => any\n loading?: () => any\n label?: (props: { item: T & MentionOption; index: number }) => any\n }\n>()\n\nconst passInputProps = computed(() => {\n const inputProps = ElInput.props ?? []\n const keys = isArray(inputProps) ? inputProps : Object.keys(inputProps)\n return pick(props, keys)\n})\n\nconst ns = useNamespace('mention')\nconst disabled = useFormDisabled()\nconst contentId = useId()\n\nconst elInputRef = ref<InputInstance>()\nconst tooltipRef = ref<TooltipInstance>()\nconst dropdownRef = ref<InstanceType<typeof ElMentionDropdown>>()\n\nconst visible = ref(false)\nconst cursorStyle = ref<CSSProperties>()\nconst mentionCtx = ref<MentionCtx>()\n\nconst computedPlacement = computed<Placement>(() =>\n props.showArrow ? props.placement : `${props.placement}-start`\n)\n\nconst computedFallbackPlacements = computed<Placement[]>(() =>\n props.showArrow ? ['bottom', 'top'] : ['bottom-start', 'top-start']\n)\n\nconst aliasProps = computed(() => ({\n ...mentionDefaultProps,\n ...props.props,\n}))\n\nconst mapOption = (option: T) => {\n const base = {\n label: option[aliasProps.value.label],\n value: option[aliasProps.value.value],\n disabled: option[aliasProps.value.disabled],\n }\n return { ...option, ...base }\n}\n\nconst options = computed(() => props.options.map(mapOption))\n\nconst filteredOptions = computed(() => {\n const { filterOption } = props\n if (!mentionCtx.value || !filterOption) return options.value\n return options.value.filter((option) =>\n filterOption(mentionCtx.value!.pattern, option)\n )\n})\n\nconst dropdownVisible = computed(() => {\n return visible.value && (!!filteredOptions.value.length || props.loading)\n})\n\nconst hoveringId = computed(() => {\n return `${contentId.value}-${dropdownRef.value?.hoveringIndex}`\n})\n\nconst handleInputChange = (value: string) => {\n emit(UPDATE_MODEL_EVENT, value)\n emit(INPUT_EVENT, value)\n syncAfterCursorMove()\n}\n\nconst handleInputKeyDown = (event: KeyboardEvent | Event) => {\n if (elInputRef.value?.isComposing) return\n const code = getEventCode(event as KeyboardEvent)\n\n switch (code) {\n case EVENT_CODE.left:\n case EVENT_CODE.right:\n syncAfterCursorMove()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.down:\n if (!visible.value) return\n event.preventDefault()\n dropdownRef.value?.navigateOptions(\n code === EVENT_CODE.up ? 'prev' : 'next'\n )\n break\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n if (!visible.value) {\n props.type !== 'textarea' && syncAfterCursorMove()\n return\n }\n event.preventDefault()\n if (dropdownRef.value?.hoverOption) {\n dropdownRef.value?.selectHoverOption()\n } else {\n visible.value = false\n }\n break\n case EVENT_CODE.esc:\n if (!visible.value) return\n event.preventDefault()\n visible.value = false\n break\n case EVENT_CODE.backspace:\n if (props.whole && mentionCtx.value) {\n const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } =\n mentionCtx.value\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const matchOption = options.value.find((item) => item.value === pattern)\n const isWhole = isFunction(props.checkIsWhole)\n ? props.checkIsWhole(pattern, prefix)\n : matchOption\n if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {\n event.preventDefault()\n const newValue =\n inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1)\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('whole-remove', pattern, prefix)\n\n const newSelectionEnd = prefixIndex\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n syncDropdownVisible()\n })\n }\n }\n }\n}\n\nconst { wrapperRef } = useFocusController(elInputRef, {\n disabled,\n afterFocus() {\n syncAfterCursorMove()\n },\n beforeBlur(event) {\n return tooltipRef.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n visible.value = false\n },\n})\n\nconst handleInputMouseDown = () => {\n syncAfterCursorMove()\n}\n\n// Ensure that the original option passed by users is returned\nconst getOriginalOption = (mentionOption: MentionOption) => {\n return props.options.find((option: MentionOption) => {\n return mentionOption.value === option[aliasProps.value.value]\n })\n}\n\nconst handleSelect = (item: MentionOption) => {\n if (!mentionCtx.value) return\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const { split } = props\n\n const newEndPart = inputValue.slice(mentionCtx.value.end)\n const alreadySeparated = newEndPart.startsWith(split)\n const newMiddlePart = `${item.value}${alreadySeparated ? '' : split}`\n\n const newValue =\n inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart\n\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('select', getOriginalOption(item)!, mentionCtx.value.prefix)\n\n const newSelectionEnd =\n mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0)\n\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n inputEl.focus()\n syncDropdownVisible()\n })\n}\n\nconst getInputEl = () =>\n props.type === 'textarea'\n ? elInputRef.value?.textarea\n : elInputRef.value?.input\n\nconst syncAfterCursorMove = () => {\n // can't use nextTick(), get cursor position will be wrong\n setTimeout(() => {\n syncCursor()\n syncDropdownVisible()\n nextTick(() => tooltipRef.value?.updatePopper())\n }, 0)\n}\n\nconst syncCursor = () => {\n const inputEl = getInputEl()\n if (!inputEl) return\n\n const caretPosition = getCursorPosition(inputEl)\n const inputRect = inputEl.getBoundingClientRect()\n const wrapperRect = wrapperRef.value!.getBoundingClientRect()\n\n cursorStyle.value = {\n position: 'absolute',\n width: 0,\n height: `${caretPosition.height}px`,\n left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`,\n top: `${caretPosition.top + inputRect.top - wrapperRect.top}px`,\n }\n}\n\nconst syncDropdownVisible = () => {\n const inputEl = getInputEl()\n if (document.activeElement !== inputEl) {\n visible.value = false\n return\n }\n const { prefix, split } = props\n mentionCtx.value = getMentionCtx(inputEl, prefix, split)\n if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {\n visible.value = true\n emit('search', mentionCtx.value.pattern, mentionCtx.value.prefix)\n return\n }\n visible.value = false\n}\n\ndefineExpose({\n input: elInputRef,\n tooltip: tooltipRef,\n dropdownVisible,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAuFA,MAAM,QAAQ;EAad,MAAM,OAAO;EAUb,MAAM,kBAAA,GAAA,IAAA,gBAAgC;GACpC,MAAM,aAAa,gBAAA,QAAQ,SAAS,EAAC;GAErC,QAAA,GAAA,eAAA,MAAY,QAAA,GAAA,YAAA,SADS,WAAW,GAAG,aAAa,OAAO,KAAK,WAAU,CAC/C;IACxB;EAED,MAAM,KAAK,cAAA,aAAa,UAAS;EACjC,MAAM,WAAW,8BAAA,iBAAgB;EACjC,MAAM,YAAY,gBAAA,OAAM;EAExB,MAAM,cAAA,GAAA,IAAA,MAAgC;EACtC,MAAM,cAAA,GAAA,IAAA,MAAkC;EACxC,MAAM,eAAA,GAAA,IAAA,MAA0D;EAEhE,MAAM,WAAA,GAAA,IAAA,KAAc,MAAK;EACzB,MAAM,eAAA,GAAA,IAAA,MAAiC;EACvC,MAAM,cAAA,GAAA,IAAA,MAA6B;EAEnC,MAAM,qBAAA,GAAA,IAAA,gBACJ,MAAM,YAAY,MAAM,YAAY,GAAG,MAAM,UAAU,QACzD;EAEA,MAAM,8BAAA,GAAA,IAAA,gBACJ,MAAM,YAAY,CAAC,UAAU,MAAM,GAA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,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;2CAmC3B,gBAAA,UAAA,EAAA;aA/BP;IAAJ,KAAI;IACH,SAAS,gBAAA;IACT,gBAAY,EAAA,GAAA,IAAA,OAAG,GAAE,CAAC,EAAC,SAAA,EAAY,QAAA,YAAW;IAC1C,gBAAc,QAAA;IACd,kBAAgB,QAAA;IAChB,WAAW,kBAAA;IACX,uBAAqB,2BAAA;IACtB,QAAO;IACP,MAAA;IACC,QAAQ,QAAA;IACR,cAAY,QAAA;;IAEF,UAAA,GAAA,IAAA,eACmB,EAAA,GAAA,IAAA,oBAAA,OAAA,EAAtB,QAAA,GAAA,IAAA,gBAAO,YAAA,MAAW,EAAA,EAAA,MAAA,EAAA,CAAA,CAAA;IAEf,UAAA,GAAA,IAAA,eAca,EAAA,GAAA,IAAA,aAAA,yBAAA,SAAA;cAZhB;KAAJ,KAAI;KACH,SAAS,gBAAA;KACT,WAAA,GAAA,IAAA,OAAU,SAAQ;KAClB,SAAS,QAAA;KACT,eAAA,GAAA,IAAA,OAAY,UAAS;KACrB,cAAY,QAAA;KACZ,UAAQ;KACR,SAAK,OAAA,OAAA,OAAA,MAAA,GAAA,IAAA,gBAAA,WAAO,WAAA,OAAY,OAAK,EAAA,CAAA,OAAA,CAAA;2DAEAA,KAAAA,SAAZ,GAAG,SAAI;;MAAc;4BAAQ,cAAS,EAAA,GAAA,IAAA,YACd,KAAA,QAA3B,OAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,oBAAc,UAAS,CAAA,CAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"mention2.js","names":[],"sources":["../../../../../../packages/components/mention/src/mention.vue"],"sourcesContent":["<template>\n <div ref=\"wrapperRef\" :class=\"ns.b()\">\n <el-input\n v-bind=\"mergeProps(passInputProps, $attrs)\"\n ref=\"elInputRef\"\n :model-value=\"modelValue\"\n :disabled=\"disabled\"\n :role=\"dropdownVisible ? 'combobox' : undefined\"\n :aria-activedescendant=\"dropdownVisible ? hoveringId || '' : undefined\"\n :aria-controls=\"dropdownVisible ? contentId : undefined\"\n :aria-expanded=\"dropdownVisible || undefined\"\n :aria-label=\"ariaLabel\"\n :aria-autocomplete=\"dropdownVisible ? 'none' : undefined\"\n :aria-haspopup=\"dropdownVisible ? 'listbox' : undefined\"\n @input=\"handleInputChange\"\n @keydown=\"handleInputKeyDown\"\n @mousedown=\"handleInputMouseDown\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-input>\n <el-tooltip\n ref=\"tooltipRef\"\n :visible=\"dropdownVisible\"\n :popper-class=\"[ns.e('popper'), popperClass!]\"\n :popper-style=\"popperStyle\"\n :popper-options=\"popperOptions\"\n :placement=\"computedPlacement\"\n :fallback-placements=\"computedFallbackPlacements\"\n effect=\"light\"\n pure\n :offset=\"offset\"\n :show-arrow=\"showArrow\"\n >\n <template #default>\n <div :style=\"cursorStyle\" />\n </template>\n <template #content>\n <el-mention-dropdown\n ref=\"dropdownRef\"\n :options=\"filteredOptions\"\n :disabled=\"disabled\"\n :loading=\"loading\"\n :content-id=\"contentId\"\n :aria-label=\"ariaLabel\"\n @select=\"handleSelect\"\n @click.stop=\"elInputRef?.focus()\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-mention-dropdown>\n </template>\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends MentionOption = MentionOption\">\nimport { computed, mergeProps, nextTick, ref } from 'vue'\nimport { pick } from 'lodash-unified'\nimport { useFocusController, useId, useNamespace } from '@element-plus/hooks'\nimport ElInput, { inputPropsDefaults } from '@element-plus/components/input'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { getEventCode, isArray, isFunction } from '@element-plus/utils'\nimport { mentionDefaultProps, mentionEmits } from './mention'\nimport { filterOption, getCursorPosition, getMentionCtx } from './helper'\nimport ElMentionDropdown from './mention-dropdown.vue'\n\nimport type { MentionProps } from './mention'\nimport type { Placement } from '@popperjs/core'\nimport type { CSSProperties } from 'vue'\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { MentionCtx, MentionOption } from './types'\n\ndefineOptions({\n name: 'ElMention',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<MentionProps<T>>(), {\n ...inputPropsDefaults,\n options: () => [],\n prefix: '@',\n split: ' ',\n filterOption: () => filterOption,\n placement: 'bottom',\n offset: 0,\n popperOptions: () => ({}),\n props: () => mentionDefaultProps,\n})\nconst emit = defineEmits(mentionEmits)\ndefineSlots<\n InputInstance['$slots'] & {\n header?: () => any\n footer?: () => any\n loading?: () => any\n label?: (props: { item: T & MentionOption; index: number }) => any\n }\n>()\n\nconst passInputProps = computed(() => {\n const inputProps = ElInput.props ?? []\n const keys = isArray(inputProps) ? inputProps : Object.keys(inputProps)\n return pick(props, keys)\n})\n\nconst ns = useNamespace('mention')\nconst disabled = useFormDisabled()\nconst contentId = useId()\n\nconst elInputRef = ref<InputInstance>()\nconst tooltipRef = ref<TooltipInstance>()\nconst dropdownRef = ref<InstanceType<typeof ElMentionDropdown>>()\n\nconst visible = ref(false)\nconst cursorStyle = ref<CSSProperties>()\nconst mentionCtx = ref<MentionCtx>()\n\nconst computedPlacement = computed<Placement>(() =>\n props.showArrow ? props.placement : `${props.placement}-start`\n)\n\nconst computedFallbackPlacements = computed<Placement[]>(() =>\n props.showArrow ? ['bottom', 'top'] : ['bottom-start', 'top-start']\n)\n\nconst aliasProps = computed(() => ({\n ...mentionDefaultProps,\n ...props.props,\n}))\n\nconst mapOption = (option: T) => {\n const base = {\n label: option[aliasProps.value.label],\n value: option[aliasProps.value.value],\n disabled: option[aliasProps.value.disabled],\n }\n return { ...option, ...base }\n}\n\nconst options = computed(() => props.options.map(mapOption))\n\nconst filteredOptions = computed(() => {\n const { filterOption } = props\n if (!mentionCtx.value || !filterOption) return options.value\n return options.value.filter((option) =>\n filterOption(mentionCtx.value!.pattern, option)\n )\n})\n\nconst dropdownVisible = computed(() => {\n return visible.value && (!!filteredOptions.value.length || props.loading)\n})\n\nconst hoveringId = computed(() => {\n return `${contentId.value}-${dropdownRef.value?.hoveringIndex}`\n})\n\nconst handleInputChange = (value: string) => {\n emit(UPDATE_MODEL_EVENT, value)\n emit(INPUT_EVENT, value)\n syncAfterCursorMove()\n}\n\nconst handleInputKeyDown = (event: KeyboardEvent | Event) => {\n if (elInputRef.value?.isComposing) return\n const code = getEventCode(event as KeyboardEvent)\n\n switch (code) {\n case EVENT_CODE.left:\n case EVENT_CODE.right:\n syncAfterCursorMove()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.down:\n if (!visible.value) return\n event.preventDefault()\n dropdownRef.value?.navigateOptions(\n code === EVENT_CODE.up ? 'prev' : 'next'\n )\n break\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n if (!visible.value) {\n props.type !== 'textarea' && syncAfterCursorMove()\n return\n }\n event.preventDefault()\n if (dropdownRef.value?.hoverOption) {\n dropdownRef.value?.selectHoverOption()\n } else {\n visible.value = false\n }\n break\n case EVENT_CODE.esc:\n if (!visible.value) return\n event.preventDefault()\n visible.value = false\n break\n case EVENT_CODE.backspace:\n if (props.whole && mentionCtx.value) {\n const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } =\n mentionCtx.value\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const matchOption = options.value.find((item) => item.value === pattern)\n const isWhole = isFunction(props.checkIsWhole)\n ? props.checkIsWhole(pattern, prefix)\n : matchOption\n if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {\n event.preventDefault()\n const newValue =\n inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1)\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('whole-remove', pattern, prefix)\n\n const newSelectionEnd = prefixIndex\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n syncDropdownVisible()\n })\n }\n }\n }\n}\n\nconst { wrapperRef } = useFocusController(elInputRef, {\n disabled,\n afterFocus() {\n syncAfterCursorMove()\n },\n beforeBlur(event) {\n return tooltipRef.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n visible.value = false\n },\n})\n\nconst handleInputMouseDown = () => {\n syncAfterCursorMove()\n}\n\n// Ensure that the original option passed by users is returned\nconst getOriginalOption = (mentionOption: MentionOption) => {\n return props.options.find((option: MentionOption) => {\n return mentionOption.value === option[aliasProps.value.value]\n })\n}\n\nconst handleSelect = (item: MentionOption) => {\n if (!mentionCtx.value) return\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const { split } = props\n\n const newEndPart = inputValue.slice(mentionCtx.value.end)\n const alreadySeparated = newEndPart.startsWith(split)\n const newMiddlePart = `${item.value}${alreadySeparated ? '' : split}`\n\n const newValue =\n inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart\n\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('select', getOriginalOption(item)!, mentionCtx.value.prefix)\n\n const newSelectionEnd =\n mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0)\n\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n inputEl.focus()\n syncDropdownVisible()\n })\n}\n\nconst getInputEl = () =>\n props.type === 'textarea'\n ? elInputRef.value?.textarea\n : elInputRef.value?.input\n\nconst syncAfterCursorMove = () => {\n // can't use nextTick(), get cursor position will be wrong\n setTimeout(() => {\n syncCursor()\n syncDropdownVisible()\n nextTick(() => tooltipRef.value?.updatePopper())\n }, 0)\n}\n\nconst syncCursor = () => {\n const inputEl = getInputEl()\n if (!inputEl) return\n\n const caretPosition = getCursorPosition(inputEl)\n const inputRect = inputEl.getBoundingClientRect()\n const wrapperRect = wrapperRef.value!.getBoundingClientRect()\n\n cursorStyle.value = {\n position: 'absolute',\n width: 0,\n height: `${caretPosition.height}px`,\n left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`,\n top: `${caretPosition.top + inputRect.top - wrapperRect.top}px`,\n }\n}\n\nconst syncDropdownVisible = () => {\n const inputEl = getInputEl()\n if (document.activeElement !== inputEl) {\n visible.value = false\n return\n }\n const { prefix, split } = props\n mentionCtx.value = getMentionCtx(inputEl, prefix, split)\n if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {\n visible.value = true\n emit('search', mentionCtx.value.pattern, mentionCtx.value.prefix)\n return\n }\n visible.value = false\n}\n\ndefineExpose({\n input: elInputRef,\n tooltip: tooltipRef,\n dropdownVisible,\n})\n</script>\n"],"mappings":""}
1
+ {"version":3,"file":"mention2.js","names":[],"sources":["../../../../../../packages/components/mention/src/mention.vue"],"sourcesContent":["<template>\n <div ref=\"wrapperRef\" :class=\"ns.b()\">\n <el-input\n v-bind=\"mergeProps(passInputProps, $attrs)\"\n ref=\"elInputRef\"\n :model-value=\"modelValue\"\n :disabled=\"disabled\"\n :role=\"dropdownVisible ? 'combobox' : undefined\"\n :aria-activedescendant=\"dropdownVisible ? hoveringId || '' : undefined\"\n :aria-controls=\"dropdownVisible ? contentId : undefined\"\n :aria-expanded=\"dropdownVisible || undefined\"\n :aria-label=\"ariaLabel\"\n :aria-autocomplete=\"dropdownVisible ? 'none' : undefined\"\n :aria-haspopup=\"dropdownVisible ? 'listbox' : undefined\"\n @input=\"handleInputChange\"\n @keydown=\"handleInputKeyDown\"\n @mousedown=\"handleInputMouseDown\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-input>\n <el-tooltip\n ref=\"tooltipRef\"\n :visible=\"dropdownVisible\"\n :popper-class=\"[ns.e('popper'), popperClass!]\"\n :popper-style=\"popperStyle\"\n :popper-options=\"popperOptions\"\n :placement=\"computedPlacement\"\n :fallback-placements=\"computedFallbackPlacements\"\n effect=\"light\"\n pure\n :offset=\"offset\"\n :show-arrow=\"showArrow\"\n >\n <template #default>\n <div :style=\"cursorStyle\" />\n </template>\n <template #content>\n <el-mention-dropdown\n ref=\"dropdownRef\"\n :options=\"filteredOptions\"\n :disabled=\"disabled\"\n :loading=\"loading\"\n :content-id=\"contentId\"\n :aria-label=\"ariaLabel\"\n @select=\"handleSelect\"\n @click.stop=\"elInputRef?.focus()\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-mention-dropdown>\n </template>\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends MentionOption = MentionOption\">\nimport { computed, mergeProps, nextTick, ref } from 'vue'\nimport { pick } from 'lodash-unified'\nimport { useFocusController, useId, useNamespace } from '@element-plus/hooks'\nimport ElInput, { inputPropsDefaults } from '@element-plus/components/input'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { getEventCode, isArray, isFunction } from '@element-plus/utils'\nimport { mentionDefaultProps, mentionEmits } from './mention'\nimport { filterOption, getCursorPosition, getMentionCtx } from './helper'\nimport ElMentionDropdown from './mention-dropdown.vue'\n\nimport type { MentionProps } from './mention'\nimport type { Placement } from '@popperjs/core'\nimport type { CSSProperties } from 'vue'\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { MentionCtx, MentionOption } from './types'\n\ndefineOptions({\n name: 'ElMention',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<MentionProps<T>>(), {\n ...inputPropsDefaults,\n options: () => [],\n prefix: '@',\n split: ' ',\n filterOption: () => filterOption,\n placement: 'bottom',\n offset: 0,\n popperClass: undefined,\n popperStyle: undefined,\n popperOptions: () => ({}),\n props: () => mentionDefaultProps,\n})\nconst emit = defineEmits(mentionEmits)\ndefineSlots<\n InputInstance['$slots'] & {\n header?: () => any\n footer?: () => any\n loading?: () => any\n label?: (props: { item: T & MentionOption; index: number }) => any\n }\n>()\n\nconst passInputProps = computed(() => {\n const inputProps = ElInput.props ?? []\n const keys = isArray(inputProps) ? inputProps : Object.keys(inputProps)\n return pick(props, keys)\n})\n\nconst ns = useNamespace('mention')\nconst disabled = useFormDisabled()\nconst contentId = useId()\n\nconst elInputRef = ref<InputInstance>()\nconst tooltipRef = ref<TooltipInstance>()\nconst dropdownRef = ref<InstanceType<typeof ElMentionDropdown>>()\n\nconst visible = ref(false)\nconst cursorStyle = ref<CSSProperties>()\nconst mentionCtx = ref<MentionCtx>()\n\nconst computedPlacement = computed<Placement>(() =>\n props.showArrow ? props.placement : `${props.placement}-start`\n)\n\nconst computedFallbackPlacements = computed<Placement[]>(() =>\n props.showArrow ? ['bottom', 'top'] : ['bottom-start', 'top-start']\n)\n\nconst aliasProps = computed(() => ({\n ...mentionDefaultProps,\n ...props.props,\n}))\n\nconst mapOption = (option: T) => {\n const base = {\n label: option[aliasProps.value.label],\n value: option[aliasProps.value.value],\n disabled: option[aliasProps.value.disabled],\n }\n return { ...option, ...base }\n}\n\nconst options = computed(() => props.options.map(mapOption))\n\nconst filteredOptions = computed(() => {\n const { filterOption } = props\n if (!mentionCtx.value || !filterOption) return options.value\n return options.value.filter((option) =>\n filterOption(mentionCtx.value!.pattern, option)\n )\n})\n\nconst dropdownVisible = computed(() => {\n return visible.value && (!!filteredOptions.value.length || props.loading)\n})\n\nconst hoveringId = computed(() => {\n return `${contentId.value}-${dropdownRef.value?.hoveringIndex}`\n})\n\nconst handleInputChange = (value: string) => {\n emit(UPDATE_MODEL_EVENT, value)\n emit(INPUT_EVENT, value)\n syncAfterCursorMove()\n}\n\nconst handleInputKeyDown = (event: KeyboardEvent | Event) => {\n if (elInputRef.value?.isComposing) return\n const code = getEventCode(event as KeyboardEvent)\n\n switch (code) {\n case EVENT_CODE.left:\n case EVENT_CODE.right:\n syncAfterCursorMove()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.down:\n if (!visible.value) return\n event.preventDefault()\n dropdownRef.value?.navigateOptions(\n code === EVENT_CODE.up ? 'prev' : 'next'\n )\n break\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n if (!visible.value) {\n props.type !== 'textarea' && syncAfterCursorMove()\n return\n }\n event.preventDefault()\n if (dropdownRef.value?.hoverOption) {\n dropdownRef.value?.selectHoverOption()\n } else {\n visible.value = false\n }\n break\n case EVENT_CODE.esc:\n if (!visible.value) return\n event.preventDefault()\n visible.value = false\n break\n case EVENT_CODE.backspace:\n if (props.whole && mentionCtx.value) {\n const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } =\n mentionCtx.value\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const matchOption = options.value.find((item) => item.value === pattern)\n const isWhole = isFunction(props.checkIsWhole)\n ? props.checkIsWhole(pattern, prefix)\n : matchOption\n if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {\n event.preventDefault()\n const newValue =\n inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1)\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('whole-remove', pattern, prefix)\n\n const newSelectionEnd = prefixIndex\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n syncDropdownVisible()\n })\n }\n }\n }\n}\n\nconst { wrapperRef } = useFocusController(elInputRef, {\n disabled,\n afterFocus() {\n syncAfterCursorMove()\n },\n beforeBlur(event) {\n return tooltipRef.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n visible.value = false\n },\n})\n\nconst handleInputMouseDown = () => {\n syncAfterCursorMove()\n}\n\n// Ensure that the original option passed by users is returned\nconst getOriginalOption = (mentionOption: MentionOption) => {\n return props.options.find((option: MentionOption) => {\n return mentionOption.value === option[aliasProps.value.value]\n })\n}\n\nconst handleSelect = (item: MentionOption) => {\n if (!mentionCtx.value) return\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const { split } = props\n\n const newEndPart = inputValue.slice(mentionCtx.value.end)\n const alreadySeparated = newEndPart.startsWith(split)\n const newMiddlePart = `${item.value}${alreadySeparated ? '' : split}`\n\n const newValue =\n inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart\n\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('select', getOriginalOption(item)!, mentionCtx.value.prefix)\n\n const newSelectionEnd =\n mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0)\n\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n inputEl.focus()\n syncDropdownVisible()\n })\n}\n\nconst getInputEl = () =>\n props.type === 'textarea'\n ? elInputRef.value?.textarea\n : elInputRef.value?.input\n\nconst syncAfterCursorMove = () => {\n // can't use nextTick(), get cursor position will be wrong\n setTimeout(() => {\n syncCursor()\n syncDropdownVisible()\n nextTick(() => tooltipRef.value?.updatePopper())\n }, 0)\n}\n\nconst syncCursor = () => {\n const inputEl = getInputEl()\n if (!inputEl) return\n\n const caretPosition = getCursorPosition(inputEl)\n const inputRect = inputEl.getBoundingClientRect()\n const wrapperRect = wrapperRef.value!.getBoundingClientRect()\n\n cursorStyle.value = {\n position: 'absolute',\n width: 0,\n height: `${caretPosition.height}px`,\n left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`,\n top: `${caretPosition.top + inputRect.top - wrapperRect.top}px`,\n }\n}\n\nconst syncDropdownVisible = () => {\n const inputEl = getInputEl()\n if (document.activeElement !== inputEl) {\n visible.value = false\n return\n }\n const { prefix, split } = props\n mentionCtx.value = getMentionCtx(inputEl, prefix, split)\n if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {\n visible.value = true\n emit('search', mentionCtx.value.pattern, mentionCtx.value.prefix)\n return\n }\n visible.value = false\n}\n\ndefineExpose({\n input: elInputRef,\n tooltip: tooltipRef,\n dropdownVisible,\n})\n</script>\n"],"mappings":""}
@@ -1,8 +1,9 @@
1
1
  import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
2
+ import { ClassValue } from "../../../utils/typescript.js";
2
3
  import { PopperEffect } from "../../popper/src/popper.js";
3
4
  import { MenuItemClicked } from "./types.js";
4
5
  import * as _$vue from "vue";
5
- import { CSSProperties, Component, ExtractPropTypes, ExtractPublicPropTypes, VNode } from "vue";
6
+ import { Component, ExtractPropTypes, ExtractPublicPropTypes, StyleValue, VNode } from "vue";
6
7
  import { NavigationFailure } from "vue-router";
7
8
 
8
9
  //#region ../../packages/components/menu/src/menu.d.ts
@@ -23,13 +24,8 @@ declare const menuProps: {
23
24
  readonly popperOffset: EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
24
25
  readonly ellipsisIcon: EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
25
26
  readonly popperEffect: EpPropFinalized<(new (...args: any[]) => string) | (() => PopperEffect) | (((new (...args: any[]) => string) | (() => PopperEffect)) | null)[], unknown, unknown, "dark", boolean>;
26
- readonly popperClass: StringConstructor;
27
- readonly popperStyle: {
28
- readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
29
- readonly required: false;
30
- readonly validator: ((val: unknown) => boolean) | undefined;
31
- __epPropKey: true;
32
- };
27
+ readonly popperClass: EpPropFinalized<(new (...args: any[]) => string | false | Record<string, any> | ClassValue[]) | (() => ClassValue) | (((new (...args: any[]) => string | false | Record<string, any> | ClassValue[]) | (() => ClassValue)) | null)[], unknown, unknown, undefined, boolean>;
28
+ readonly popperStyle: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
33
29
  readonly showTimeout: EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
34
30
  readonly hideTimeout: EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
35
31
  readonly persistent: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
@@ -59,13 +55,8 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
59
55
  readonly popperOffset: EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
60
56
  readonly ellipsisIcon: EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
61
57
  readonly popperEffect: EpPropFinalized<(new (...args: any[]) => string) | (() => PopperEffect) | (((new (...args: any[]) => string) | (() => PopperEffect)) | null)[], unknown, unknown, "dark", boolean>;
62
- readonly popperClass: StringConstructor;
63
- readonly popperStyle: {
64
- readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
65
- readonly required: false;
66
- readonly validator: ((val: unknown) => boolean) | undefined;
67
- __epPropKey: true;
68
- };
58
+ readonly popperClass: EpPropFinalized<(new (...args: any[]) => string | false | Record<string, any> | ClassValue[]) | (() => ClassValue) | (((new (...args: any[]) => string | false | Record<string, any> | ClassValue[]) | (() => ClassValue)) | null)[], unknown, unknown, undefined, boolean>;
59
+ readonly popperStyle: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
69
60
  readonly showTimeout: EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
70
61
  readonly hideTimeout: EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
71
62
  readonly persistent: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
@@ -92,25 +83,22 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
92
83
  readonly popperOffset: EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
93
84
  readonly ellipsisIcon: EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
94
85
  readonly popperEffect: EpPropFinalized<(new (...args: any[]) => string) | (() => PopperEffect) | (((new (...args: any[]) => string) | (() => PopperEffect)) | null)[], unknown, unknown, "dark", boolean>;
95
- readonly popperClass: StringConstructor;
96
- readonly popperStyle: {
97
- readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
98
- readonly required: false;
99
- readonly validator: ((val: unknown) => boolean) | undefined;
100
- __epPropKey: true;
101
- };
86
+ readonly popperClass: EpPropFinalized<(new (...args: any[]) => string | false | Record<string, any> | ClassValue[]) | (() => ClassValue) | (((new (...args: any[]) => string | false | Record<string, any> | ClassValue[]) | (() => ClassValue)) | null)[], unknown, unknown, undefined, boolean>;
87
+ readonly popperStyle: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
102
88
  readonly showTimeout: EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
103
89
  readonly hideTimeout: EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
104
90
  readonly persistent: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
105
91
  }>> & Readonly<{
92
+ onOpen?: ((index: string, indexPath: string[]) => any) | undefined;
106
93
  onSelect?: ((index: string, indexPath: string[], item: MenuItemClicked, routerResult?: Promise<void | NavigationFailure> | undefined) => any) | undefined;
107
94
  onClose?: ((index: string, indexPath: string[]) => any) | undefined;
108
- onOpen?: ((index: string, indexPath: string[]) => any) | undefined;
109
95
  }>, {
110
- readonly persistent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
111
- readonly mode: EpPropMergeType<StringConstructor, "horizontal" | "vertical", unknown>;
112
96
  readonly collapse: boolean;
113
97
  readonly ellipsis: EpPropMergeType<BooleanConstructor, unknown, unknown>;
98
+ readonly persistent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
99
+ readonly popperClass: ClassValue;
100
+ readonly popperStyle: StyleValue;
101
+ readonly mode: EpPropMergeType<StringConstructor, "horizontal" | "vertical", unknown>;
114
102
  readonly showTimeout: number;
115
103
  readonly hideTimeout: number;
116
104
  readonly defaultActive: string;
@@ -122,11 +122,27 @@ const menuProps = require_runtime$1.buildProps({
122
122
  /**
123
123
  * @description custom class name for all popup menus
124
124
  */
125
- popperClass: String,
125
+ popperClass: {
126
+ type: require_runtime$1.definePropType([
127
+ String,
128
+ Array,
129
+ Object,
130
+ Boolean
131
+ ]),
132
+ default: void 0
133
+ },
126
134
  /**
127
135
  * @description custom style for all popup menus
128
136
  */
129
- popperStyle: { type: require_runtime$1.definePropType([String, Object]) },
137
+ popperStyle: {
138
+ type: require_runtime$1.definePropType([
139
+ String,
140
+ Array,
141
+ Object,
142
+ Boolean
143
+ ]),
144
+ default: void 0
145
+ },
130
146
  /**
131
147
  * @description control timeout for all menus before showing
132
148
  */
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","names":["buildProps","definePropType","mutable","iconPropType","More","isUndefined","useNamespace","MENU_INJECTION_KEY","SUB_MENU_INJECTION_KEY","Menubar","useMenuCssVar","flattedChildren","ElSubMenu","ElIcon","vClickoutside","ElMenuCollapseTransition"],"sources":["../../../../../../packages/components/menu/src/menu.ts"],"sourcesContent":["import {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n watchEffect,\n withDirectives,\n} from 'vue'\nimport { unrefElement, useResizeObserver } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport ElIcon from '@element-plus/components/icon'\nimport { More } from '@element-plus/icons-vue'\nimport {\n buildProps,\n definePropType,\n flattedChildren,\n iconPropType,\n isArray,\n isObject,\n isString,\n isUndefined,\n mutable,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ClickOutside as vClickoutside } from '@element-plus/directives'\nimport Menubar from './utils/menu-bar'\nimport ElMenuCollapseTransition from './menu-collapse-transition.vue'\nimport ElSubMenu from './sub-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\nimport { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './tokens'\n\nimport type { PopperEffect } from '@element-plus/components/popper'\nimport type { MenuItemClicked, MenuProvider, SubMenuProvider } from './types'\nimport type { NavigationFailure, Router } from 'vue-router'\nimport type {\n CSSProperties,\n Component,\n DirectiveArguments,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n VNode,\n VNodeArrayChildren,\n} from 'vue'\nimport type { UseResizeObserverReturn } from '@vueuse/core'\n\nexport const menuProps = buildProps({\n /**\n * @description menu display mode\n */\n mode: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'vertical',\n },\n /**\n * @description index of active menu on page load\n */\n defaultActive: {\n type: String,\n default: '',\n },\n /**\n * @description array that contains indexes of currently active sub-menus\n */\n defaultOpeneds: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether only one sub-menu can be active\n */\n uniqueOpened: Boolean,\n /**\n * @description whether `vue-router` mode is activated. If true, index will be used as 'path' to activate the route action. Use with `default-active` to set the active item on load.\n */\n router: Boolean,\n /**\n * @description how sub-menus are triggered, only works when `mode` is 'horizontal'\n */\n menuTrigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n /**\n * @description whether the menu is collapsed (available only in vertical mode)\n */\n collapse: Boolean,\n /**\n * @description background color of Menu (hex format) (deprecated, use `--bg-color` instead)\n * @deprecated use `--bg-color` instead\n */\n backgroundColor: String,\n /**\n * @description text color of Menu (hex format) (deprecated, use `--text-color` instead)\n * @deprecated use `--text-color` instead\n */\n textColor: String,\n /**\n * @description text color of currently active menu item (hex format) (deprecated, use `--active-color` instead)\n * @deprecated use `--active-color` instead\n */\n activeTextColor: String,\n /**\n * @description optional, whether menu is collapsed when clicking outside\n */\n closeOnClickOutside: Boolean,\n /**\n * @description whether to enable the collapse transition\n */\n collapseTransition: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the menu is ellipsis (available only in horizontal mode)\n */\n ellipsis: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the popper (effective for all submenus)\n */\n popperOffset: {\n type: Number,\n default: 6,\n },\n /**\n * @description custom ellipsis icon (available only in horizontal mode and ellipsis is true)\n */\n ellipsisIcon: {\n type: iconPropType,\n default: () => More,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light` when menu is collapsed\n */\n popperEffect: {\n type: definePropType<PopperEffect>(String),\n default: 'dark',\n },\n /**\n * @description custom class name for all popup menus\n */\n popperClass: String,\n /**\n * @description custom style for all popup menus\n */\n popperStyle: {\n type: definePropType<string | CSSProperties>([String, Object]),\n },\n /**\n * @description control timeout for all menus before showing\n */\n showTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description control timeout for all menus before hiding\n */\n hideTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description when menu inactive and `persistent` is `false` , dropdown menu will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type MenuProps = ExtractPropTypes<typeof menuProps>\nexport type MenuPropsPublic = ExtractPublicPropTypes<typeof menuProps>\n\nconst checkIndexPath = (indexPath: unknown): indexPath is string[] =>\n isArray(indexPath) && indexPath.every((path) => isString(path))\n\nexport const menuEmits = {\n close: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n open: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n select: (\n index: string,\n indexPath: string[],\n item: MenuItemClicked,\n routerResult?: Promise<void | NavigationFailure>\n ) =>\n isString(index) &&\n checkIndexPath(indexPath) &&\n isObject(item) &&\n (isUndefined(routerResult) || routerResult instanceof Promise),\n}\nexport type MenuEmits = typeof menuEmits\n\nconst DEFAULT_MORE_ITEM_WIDTH = 64\n\nexport default defineComponent({\n name: 'ElMenu',\n\n props: menuProps,\n emits: menuEmits,\n\n setup(props, { emit, slots, expose }) {\n const instance = getCurrentInstance()!\n const router = instance.appContext.config.globalProperties.$router as Router\n const menu = ref<HTMLUListElement>()\n const subMenu = ref<HTMLElement>()\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH\n\n // data\n const sliceIndex = ref(-1)\n\n const openedMenus = ref<MenuProvider['openedMenus']>(\n props.defaultOpeneds && !props.collapse\n ? props.defaultOpeneds.slice(0)\n : []\n )\n const activeIndex = ref<MenuProvider['activeIndex']>(props.defaultActive)\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n // computed\n const isMenuPopup = computed<MenuProvider['isMenuPopup']>(\n () =>\n props.mode === 'horizontal' ||\n (props.mode === 'vertical' && props.collapse)\n )\n\n // methods\n const initMenu = () => {\n const activeItem = activeIndex.value && items.value[activeIndex.value]\n if (!activeItem || props.mode === 'horizontal' || props.collapse) return\n\n const indexPath = activeItem.indexPath\n\n // 展开该菜单项的路径上所有子菜单\n // expand all subMenus of the menu item\n indexPath.forEach((index) => {\n const subMenu = subMenus.value[index]\n subMenu && openMenu(index, subMenu.indexPath)\n })\n }\n\n const openMenu: MenuProvider['openMenu'] = (index, indexPath) => {\n if (openedMenus.value.includes(index)) return\n // 将不在该菜单路径下的其余菜单收起\n // collapse all menu that are not under current menu item\n if (props.uniqueOpened) {\n openedMenus.value = openedMenus.value.filter((index: string) =>\n indexPath.includes(index)\n )\n }\n openedMenus.value.push(index)\n emit('open', index, indexPath)\n }\n\n const close = (index: string) => {\n const i = openedMenus.value.indexOf(index)\n if (i !== -1) {\n openedMenus.value.splice(i, 1)\n }\n }\n\n const closeMenu: MenuProvider['closeMenu'] = (index, indexPath) => {\n close(index)\n emit('close', index, indexPath)\n }\n\n const handleSubMenuClick: MenuProvider['handleSubMenuClick'] = ({\n index,\n indexPath,\n }) => {\n const isOpened = openedMenus.value.includes(index)\n\n isOpened ? closeMenu(index, indexPath) : openMenu(index, indexPath)\n }\n\n const handleMenuItemClick: MenuProvider['handleMenuItemClick'] = (\n menuItem\n ) => {\n if (props.mode === 'horizontal' || props.collapse) {\n openedMenus.value = []\n }\n const { index, indexPath } = menuItem\n if (isNil(index) || isNil(indexPath)) return\n\n if (props.router && router) {\n const route = menuItem.route || index\n const routerResult = router.push(route).then((res) => {\n if (!res) activeIndex.value = index\n return res\n })\n emit(\n 'select',\n index,\n indexPath,\n { index, indexPath, route },\n routerResult\n )\n } else {\n activeIndex.value = index\n emit('select', index, indexPath, { index, indexPath })\n }\n }\n\n const updateActiveIndex = (val: string) => {\n const itemsInData = items.value\n const item =\n itemsInData[val] ||\n (activeIndex.value && itemsInData[activeIndex.value]) ||\n itemsInData[props.defaultActive]\n\n activeIndex.value = item?.index ?? val\n }\n\n const calcMenuItemWidth = (menuItem: HTMLElement) => {\n const computedStyle = getComputedStyle(menuItem)\n const marginLeft = Number.parseInt(computedStyle.marginLeft, 10)\n const marginRight = Number.parseInt(computedStyle.marginRight, 10)\n return menuItem.offsetWidth + marginLeft + marginRight || 0\n }\n\n const calcSliceIndex = () => {\n if (!menu.value) return -1\n\n const items = Array.from(menu.value.childNodes).filter(\n (item) =>\n item.nodeName !== '#comment' &&\n (item.nodeName !== '#text' || item.nodeValue)\n ) as HTMLElement[]\n\n const computedMenuStyle = getComputedStyle(menu.value)\n const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10)\n const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10)\n const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight\n\n let calcWidth = 0\n let sliceIndex = 0\n items.forEach((item, index) => {\n calcWidth += calcMenuItemWidth(item)\n if (calcWidth <= menuWidth - moreItemWidth) {\n sliceIndex = index + 1\n }\n })\n return sliceIndex === items.length ? -1 : sliceIndex\n }\n\n const getIndexPath = (index: string) => subMenus.value[index].indexPath\n\n // Common computer monitor FPS is 60Hz, which means 60 redraws per second. Calculation formula: 1000ms/60 ≈ 16.67ms, In order to avoid a certain chance of repeated triggering when `resize`, set wait to 16.67 * 2 = 33.34\n const debounce = (fn: () => void, wait = 33.34) => {\n let timer: ReturnType<typeof setTimeout> | null\n return () => {\n timer && clearTimeout(timer)\n timer = setTimeout(() => {\n fn()\n }, wait)\n }\n }\n\n let isFirstTimeRender = true\n const handleResize = () => {\n const el = unrefElement(subMenu)\n if (el) moreItemWidth = calcMenuItemWidth(el) || DEFAULT_MORE_ITEM_WIDTH\n if (sliceIndex.value === calcSliceIndex()) return\n const callback = () => {\n sliceIndex.value = -1\n nextTick(() => {\n sliceIndex.value = calcSliceIndex()\n })\n }\n // execute callback directly when first time resize to avoid shaking\n isFirstTimeRender ? callback() : debounce(callback)()\n isFirstTimeRender = false\n }\n\n watch(\n () => props.defaultActive,\n (currentActive) => {\n if (!items.value[currentActive]) {\n activeIndex.value = ''\n }\n updateActiveIndex(currentActive)\n }\n )\n\n watch(\n () => props.collapse,\n (value) => {\n if (value) openedMenus.value = []\n }\n )\n\n watch(items.value, initMenu)\n\n let resizeStopper: UseResizeObserverReturn['stop']\n watchEffect(() => {\n if (props.mode === 'horizontal' && props.ellipsis)\n resizeStopper = useResizeObserver(menu, handleResize).stop\n else resizeStopper?.()\n })\n\n const mouseInChild = ref(false)\n\n // provide\n {\n const addSubMenu: MenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n\n const removeSubMenu: MenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n\n const addMenuItem: MenuProvider['addMenuItem'] = (item) => {\n items.value[item.index] = item\n }\n\n const removeMenuItem: MenuProvider['removeMenuItem'] = (item) => {\n delete items.value[item.index]\n }\n\n provide<MenuProvider>(\n MENU_INJECTION_KEY,\n reactive({\n props,\n openedMenus,\n items,\n subMenus,\n activeIndex,\n isMenuPopup,\n\n addMenuItem,\n removeMenuItem,\n addSubMenu,\n removeSubMenu,\n openMenu,\n closeMenu,\n handleMenuItemClick,\n handleSubMenuClick,\n })\n )\n\n provide<SubMenuProvider>(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n mouseInChild,\n level: 0,\n })\n }\n\n // lifecycle\n onMounted(() => {\n if (props.mode === 'horizontal') {\n new Menubar(instance.vnode.el!, nsMenu.namespace.value)\n }\n })\n\n {\n const open = (index: string) => {\n const { indexPath } = subMenus.value[index]\n indexPath.forEach((i) => openMenu(i, indexPath))\n }\n\n expose({\n open,\n close,\n updateActiveIndex,\n handleResize,\n })\n }\n\n const ulStyle = useMenuCssVar(props, 0)\n\n return () => {\n let slot: VNodeArrayChildren = slots.default?.() ?? []\n const vShowMore: VNode[] = []\n\n if (props.mode === 'horizontal' && menu.value) {\n const originalSlot = (\n flattedChildren(slot) as VNodeArrayChildren\n ).filter((vnode) => {\n // Filter text and comment nodes (https://github.com/vuejs/core/blob/c875019d49b4c36a88d929ccadc31ad414747c7b/packages/shared/src/shapeFlags.ts#L5)\n return (vnode as VNode)?.shapeFlag !== 8\n })\n const slotDefault =\n sliceIndex.value === -1\n ? originalSlot\n : originalSlot.slice(0, sliceIndex.value)\n\n const slotMore =\n sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value)\n\n if (slotMore?.length && props.ellipsis) {\n slot = slotDefault\n vShowMore.push(\n h(\n ElSubMenu,\n {\n ref: subMenu,\n index: 'sub-menu-more',\n class: nsSubMenu.e('hide-arrow'),\n popperOffset: props.popperOffset,\n },\n {\n title: () =>\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-more'),\n },\n {\n default: () => h(props.ellipsisIcon as Component),\n }\n ),\n default: () => slotMore,\n }\n )\n )\n }\n }\n\n const directives: DirectiveArguments = props.closeOnClickOutside\n ? [\n [\n vClickoutside,\n () => {\n if (!openedMenus.value.length) return\n\n if (!mouseInChild.value) {\n openedMenus.value.forEach((openedMenu) =>\n emit('close', openedMenu, getIndexPath(openedMenu))\n )\n\n openedMenus.value = []\n }\n },\n ],\n ]\n : []\n\n const vMenu = withDirectives(\n h(\n 'ul',\n {\n key: String(props.collapse),\n role: 'menubar',\n ref: menu,\n style: ulStyle.value,\n class: {\n [nsMenu.b()]: true,\n [nsMenu.m(props.mode)]: true,\n [nsMenu.m('collapse')]: props.collapse,\n },\n },\n [...slot, ...vShowMore]\n ),\n directives\n )\n\n if (props.collapseTransition && props.mode === 'vertical') {\n return h(ElMenuCollapseTransition, () => vMenu)\n }\n\n return vMenu\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,YAAYA,kBAAAA,WAAW;;;;CAIlC,MAAM;EACJ,MAAM;EACN,QAAQ,CAAC,cAAc,WAAW;EAClC,SAAS;EACV;;;;CAID,eAAe;EACb,MAAM;EACN,SAAS;EACV;;;;CAID,gBAAgB;EACd,MAAMC,kBAAAA,eAAyB,MAAM;EACrC,eAAeC,mBAAAA,QAAQ,EAAE,CAAU;EACpC;;;;CAID,cAAc;;;;CAId,QAAQ;;;;CAIR,aAAa;EACX,MAAM;EACN,QAAQ,CAAC,SAAS,QAAQ;EAC1B,SAAS;EACV;;;;CAID,UAAU;;;;;CAKV,iBAAiB;;;;;CAKjB,WAAW;;;;;CAKX,iBAAiB;;;;CAIjB,qBAAqB;;;;CAIrB,oBAAoB;EAClB,MAAM;EACN,SAAS;EACV;;;;CAID,UAAU;EACR,MAAM;EACN,SAAS;EACV;;;;CAID,cAAc;EACZ,MAAM;EACN,SAAS;EACV;;;;CAID,cAAc;EACZ,MAAMC,aAAAA;EACN,eAAeC,wBAAAA;EAChB;;;;CAID,cAAc;EACZ,MAAMH,kBAAAA,eAA6B,OAAO;EAC1C,SAAS;EACV;;;;CAID,aAAa;;;;CAIb,aAAa,EACX,MAAMA,kBAAAA,eAAuC,CAAC,QAAQ,OAAO,CAAC,EAC/D;;;;CAID,aAAa;EACX,MAAM;EACN,SAAS;EACV;;;;CAID,aAAa;EACX,MAAM;EACN,SAAS;EACV;;;;CAID,YAAY;EACV,MAAM;EACN,SAAS;EACV;CACF,CAAU;AAIX,MAAM,kBAAkB,eAAA,GAAA,YAAA,SACd,UAAU,IAAI,UAAU,OAAO,UAAA,GAAA,YAAA,UAAkB,KAAK,CAAC;AAEjE,MAAa,YA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,OAAO;MACJ,OAAO,GAAG,GAAG;MACb,OAAO,EAAE,MAAM,KAAK,GAAG;MACvB,OAAO,EAAE,WAAW,GAAG,MAAM;KAC/B;IACF,EACD,CAAC,GAAG,MAAM,GAAG,UAAU,CACxB,EACD,WACD;GAED,IAAI,MAAM,sBAAsB,MAAM,SAAS,YAC7C,QAAA,GAAA,IAAA,GAASC,iCAAAA,eAAgC,MAAM;GAGjD,OAAO;;;CAGZ,CAAC"}
1
+ {"version":3,"file":"menu.js","names":["buildProps","definePropType","mutable","iconPropType","More","isUndefined","useNamespace","MENU_INJECTION_KEY","SUB_MENU_INJECTION_KEY","Menubar","useMenuCssVar","flattedChildren","ElSubMenu","ElIcon","vClickoutside","ElMenuCollapseTransition"],"sources":["../../../../../../packages/components/menu/src/menu.ts"],"sourcesContent":["import {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n watchEffect,\n withDirectives,\n} from 'vue'\nimport { unrefElement, useResizeObserver } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport ElIcon from '@element-plus/components/icon'\nimport { More } from '@element-plus/icons-vue'\nimport {\n buildProps,\n definePropType,\n flattedChildren,\n iconPropType,\n isArray,\n isObject,\n isString,\n isUndefined,\n mutable,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ClickOutside as vClickoutside } from '@element-plus/directives'\nimport Menubar from './utils/menu-bar'\nimport ElMenuCollapseTransition from './menu-collapse-transition.vue'\nimport ElSubMenu from './sub-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\nimport { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './tokens'\n\nimport type { ClassValue } from '@element-plus/utils'\nimport type { PopperEffect } from '@element-plus/components/popper'\nimport type { MenuItemClicked, MenuProvider, SubMenuProvider } from './types'\nimport type { NavigationFailure, Router } from 'vue-router'\nimport type {\n Component,\n DirectiveArguments,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n StyleValue,\n VNode,\n VNodeArrayChildren,\n} from 'vue'\nimport type { UseResizeObserverReturn } from '@vueuse/core'\n\nexport const menuProps = buildProps({\n /**\n * @description menu display mode\n */\n mode: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'vertical',\n },\n /**\n * @description index of active menu on page load\n */\n defaultActive: {\n type: String,\n default: '',\n },\n /**\n * @description array that contains indexes of currently active sub-menus\n */\n defaultOpeneds: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether only one sub-menu can be active\n */\n uniqueOpened: Boolean,\n /**\n * @description whether `vue-router` mode is activated. If true, index will be used as 'path' to activate the route action. Use with `default-active` to set the active item on load.\n */\n router: Boolean,\n /**\n * @description how sub-menus are triggered, only works when `mode` is 'horizontal'\n */\n menuTrigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n /**\n * @description whether the menu is collapsed (available only in vertical mode)\n */\n collapse: Boolean,\n /**\n * @description background color of Menu (hex format) (deprecated, use `--bg-color` instead)\n * @deprecated use `--bg-color` instead\n */\n backgroundColor: String,\n /**\n * @description text color of Menu (hex format) (deprecated, use `--text-color` instead)\n * @deprecated use `--text-color` instead\n */\n textColor: String,\n /**\n * @description text color of currently active menu item (hex format) (deprecated, use `--active-color` instead)\n * @deprecated use `--active-color` instead\n */\n activeTextColor: String,\n /**\n * @description optional, whether menu is collapsed when clicking outside\n */\n closeOnClickOutside: Boolean,\n /**\n * @description whether to enable the collapse transition\n */\n collapseTransition: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the menu is ellipsis (available only in horizontal mode)\n */\n ellipsis: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the popper (effective for all submenus)\n */\n popperOffset: {\n type: Number,\n default: 6,\n },\n /**\n * @description custom ellipsis icon (available only in horizontal mode and ellipsis is true)\n */\n ellipsisIcon: {\n type: iconPropType,\n default: () => More,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light` when menu is collapsed\n */\n popperEffect: {\n type: definePropType<PopperEffect>(String),\n default: 'dark',\n },\n /**\n * @description custom class name for all popup menus\n */\n popperClass: {\n type: definePropType<ClassValue>([String, Array, Object, Boolean]),\n default: undefined,\n },\n /**\n * @description custom style for all popup menus\n */\n popperStyle: {\n type: definePropType<StyleValue>([String, Array, Object, Boolean]),\n default: undefined,\n },\n /**\n * @description control timeout for all menus before showing\n */\n showTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description control timeout for all menus before hiding\n */\n hideTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description when menu inactive and `persistent` is `false` , dropdown menu will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type MenuProps = ExtractPropTypes<typeof menuProps>\nexport type MenuPropsPublic = ExtractPublicPropTypes<typeof menuProps>\n\nconst checkIndexPath = (indexPath: unknown): indexPath is string[] =>\n isArray(indexPath) && indexPath.every((path) => isString(path))\n\nexport const menuEmits = {\n close: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n open: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n select: (\n index: string,\n indexPath: string[],\n item: MenuItemClicked,\n routerResult?: Promise<void | NavigationFailure>\n ) =>\n isString(index) &&\n checkIndexPath(indexPath) &&\n isObject(item) &&\n (isUndefined(routerResult) || routerResult instanceof Promise),\n}\nexport type MenuEmits = typeof menuEmits\n\nconst DEFAULT_MORE_ITEM_WIDTH = 64\n\nexport default defineComponent({\n name: 'ElMenu',\n\n props: menuProps,\n emits: menuEmits,\n\n setup(props, { emit, slots, expose }) {\n const instance = getCurrentInstance()!\n const router = instance.appContext.config.globalProperties.$router as Router\n const menu = ref<HTMLUListElement>()\n const subMenu = ref<HTMLElement>()\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH\n\n // data\n const sliceIndex = ref(-1)\n\n const openedMenus = ref<MenuProvider['openedMenus']>(\n props.defaultOpeneds && !props.collapse\n ? props.defaultOpeneds.slice(0)\n : []\n )\n const activeIndex = ref<MenuProvider['activeIndex']>(props.defaultActive)\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n // computed\n const isMenuPopup = computed<MenuProvider['isMenuPopup']>(\n () =>\n props.mode === 'horizontal' ||\n (props.mode === 'vertical' && props.collapse)\n )\n\n // methods\n const initMenu = () => {\n const activeItem = activeIndex.value && items.value[activeIndex.value]\n if (!activeItem || props.mode === 'horizontal' || props.collapse) return\n\n const indexPath = activeItem.indexPath\n\n // 展开该菜单项的路径上所有子菜单\n // expand all subMenus of the menu item\n indexPath.forEach((index) => {\n const subMenu = subMenus.value[index]\n subMenu && openMenu(index, subMenu.indexPath)\n })\n }\n\n const openMenu: MenuProvider['openMenu'] = (index, indexPath) => {\n if (openedMenus.value.includes(index)) return\n // 将不在该菜单路径下的其余菜单收起\n // collapse all menu that are not under current menu item\n if (props.uniqueOpened) {\n openedMenus.value = openedMenus.value.filter((index: string) =>\n indexPath.includes(index)\n )\n }\n openedMenus.value.push(index)\n emit('open', index, indexPath)\n }\n\n const close = (index: string) => {\n const i = openedMenus.value.indexOf(index)\n if (i !== -1) {\n openedMenus.value.splice(i, 1)\n }\n }\n\n const closeMenu: MenuProvider['closeMenu'] = (index, indexPath) => {\n close(index)\n emit('close', index, indexPath)\n }\n\n const handleSubMenuClick: MenuProvider['handleSubMenuClick'] = ({\n index,\n indexPath,\n }) => {\n const isOpened = openedMenus.value.includes(index)\n\n isOpened ? closeMenu(index, indexPath) : openMenu(index, indexPath)\n }\n\n const handleMenuItemClick: MenuProvider['handleMenuItemClick'] = (\n menuItem\n ) => {\n if (props.mode === 'horizontal' || props.collapse) {\n openedMenus.value = []\n }\n const { index, indexPath } = menuItem\n if (isNil(index) || isNil(indexPath)) return\n\n if (props.router && router) {\n const route = menuItem.route || index\n const routerResult = router.push(route).then((res) => {\n if (!res) activeIndex.value = index\n return res\n })\n emit(\n 'select',\n index,\n indexPath,\n { index, indexPath, route },\n routerResult\n )\n } else {\n activeIndex.value = index\n emit('select', index, indexPath, { index, indexPath })\n }\n }\n\n const updateActiveIndex = (val: string) => {\n const itemsInData = items.value\n const item =\n itemsInData[val] ||\n (activeIndex.value && itemsInData[activeIndex.value]) ||\n itemsInData[props.defaultActive]\n\n activeIndex.value = item?.index ?? val\n }\n\n const calcMenuItemWidth = (menuItem: HTMLElement) => {\n const computedStyle = getComputedStyle(menuItem)\n const marginLeft = Number.parseInt(computedStyle.marginLeft, 10)\n const marginRight = Number.parseInt(computedStyle.marginRight, 10)\n return menuItem.offsetWidth + marginLeft + marginRight || 0\n }\n\n const calcSliceIndex = () => {\n if (!menu.value) return -1\n\n const items = Array.from(menu.value.childNodes).filter(\n (item) =>\n item.nodeName !== '#comment' &&\n (item.nodeName !== '#text' || item.nodeValue)\n ) as HTMLElement[]\n\n const computedMenuStyle = getComputedStyle(menu.value)\n const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10)\n const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10)\n const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight\n\n let calcWidth = 0\n let sliceIndex = 0\n items.forEach((item, index) => {\n calcWidth += calcMenuItemWidth(item)\n if (calcWidth <= menuWidth - moreItemWidth) {\n sliceIndex = index + 1\n }\n })\n return sliceIndex === items.length ? -1 : sliceIndex\n }\n\n const getIndexPath = (index: string) => subMenus.value[index].indexPath\n\n // Common computer monitor FPS is 60Hz, which means 60 redraws per second. Calculation formula: 1000ms/60 ≈ 16.67ms, In order to avoid a certain chance of repeated triggering when `resize`, set wait to 16.67 * 2 = 33.34\n const debounce = (fn: () => void, wait = 33.34) => {\n let timer: ReturnType<typeof setTimeout> | null\n return () => {\n timer && clearTimeout(timer)\n timer = setTimeout(() => {\n fn()\n }, wait)\n }\n }\n\n let isFirstTimeRender = true\n const handleResize = () => {\n const el = unrefElement(subMenu)\n if (el) moreItemWidth = calcMenuItemWidth(el) || DEFAULT_MORE_ITEM_WIDTH\n if (sliceIndex.value === calcSliceIndex()) return\n const callback = () => {\n sliceIndex.value = -1\n nextTick(() => {\n sliceIndex.value = calcSliceIndex()\n })\n }\n // execute callback directly when first time resize to avoid shaking\n isFirstTimeRender ? callback() : debounce(callback)()\n isFirstTimeRender = false\n }\n\n watch(\n () => props.defaultActive,\n (currentActive) => {\n if (!items.value[currentActive]) {\n activeIndex.value = ''\n }\n updateActiveIndex(currentActive)\n }\n )\n\n watch(\n () => props.collapse,\n (value) => {\n if (value) openedMenus.value = []\n }\n )\n\n watch(items.value, initMenu)\n\n let resizeStopper: UseResizeObserverReturn['stop']\n watchEffect(() => {\n if (props.mode === 'horizontal' && props.ellipsis)\n resizeStopper = useResizeObserver(menu, handleResize).stop\n else resizeStopper?.()\n })\n\n const mouseInChild = ref(false)\n\n // provide\n {\n const addSubMenu: MenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n\n const removeSubMenu: MenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n\n const addMenuItem: MenuProvider['addMenuItem'] = (item) => {\n items.value[item.index] = item\n }\n\n const removeMenuItem: MenuProvider['removeMenuItem'] = (item) => {\n delete items.value[item.index]\n }\n\n provide<MenuProvider>(\n MENU_INJECTION_KEY,\n reactive({\n props,\n openedMenus,\n items,\n subMenus,\n activeIndex,\n isMenuPopup,\n\n addMenuItem,\n removeMenuItem,\n addSubMenu,\n removeSubMenu,\n openMenu,\n closeMenu,\n handleMenuItemClick,\n handleSubMenuClick,\n }) as unknown as MenuProvider // Avoid TS2589\n )\n\n provide<SubMenuProvider>(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n mouseInChild,\n level: 0,\n })\n }\n\n // lifecycle\n onMounted(() => {\n if (props.mode === 'horizontal') {\n new Menubar(instance.vnode.el!, nsMenu.namespace.value)\n }\n })\n\n {\n const open = (index: string) => {\n const { indexPath } = subMenus.value[index]\n indexPath.forEach((i) => openMenu(i, indexPath))\n }\n\n expose({\n open,\n close,\n updateActiveIndex,\n handleResize,\n })\n }\n\n const ulStyle = useMenuCssVar(props, 0)\n\n return () => {\n let slot: VNodeArrayChildren = slots.default?.() ?? []\n const vShowMore: VNode[] = []\n\n if (props.mode === 'horizontal' && menu.value) {\n const originalSlot = (\n flattedChildren(slot) as VNodeArrayChildren\n ).filter((vnode) => {\n // Filter text and comment nodes (https://github.com/vuejs/core/blob/c875019d49b4c36a88d929ccadc31ad414747c7b/packages/shared/src/shapeFlags.ts#L5)\n return (vnode as VNode)?.shapeFlag !== 8\n })\n const slotDefault =\n sliceIndex.value === -1\n ? originalSlot\n : originalSlot.slice(0, sliceIndex.value)\n\n const slotMore =\n sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value)\n\n if (slotMore?.length && props.ellipsis) {\n slot = slotDefault\n vShowMore.push(\n h(\n ElSubMenu,\n {\n ref: subMenu,\n index: 'sub-menu-more',\n class: nsSubMenu.e('hide-arrow'),\n popperOffset: props.popperOffset,\n },\n {\n title: () =>\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-more'),\n },\n {\n default: () => h(props.ellipsisIcon as Component),\n }\n ),\n default: () => slotMore,\n }\n )\n )\n }\n }\n\n const directives: DirectiveArguments = props.closeOnClickOutside\n ? [\n [\n vClickoutside,\n () => {\n if (!openedMenus.value.length) return\n\n if (!mouseInChild.value) {\n openedMenus.value.forEach((openedMenu) =>\n emit('close', openedMenu, getIndexPath(openedMenu))\n )\n\n openedMenus.value = []\n }\n },\n ],\n ]\n : []\n\n const vMenu = withDirectives(\n h(\n 'ul',\n {\n key: String(props.collapse),\n role: 'menubar',\n ref: menu,\n style: ulStyle.value,\n class: {\n [nsMenu.b()]: true,\n [nsMenu.m(props.mode)]: true,\n [nsMenu.m('collapse')]: props.collapse,\n },\n },\n [...slot, ...vShowMore]\n ),\n directives\n )\n\n if (props.collapseTransition && props.mode === 'vertical') {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