@uzum-tech/ui 1.8.2 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/dist/index.js +1244 -379
  2. package/dist/index.prod.js +3 -3
  3. package/es/_internal/scrollbar/src/Scrollbar.d.ts +119 -17
  4. package/es/_internal/scrollbar/src/Scrollbar.js +120 -67
  5. package/es/_internal/scrollbar/src/styles/index.cssr.js +32 -15
  6. package/es/_internal/scrollbar/styles/common.d.ts +7 -0
  7. package/es/_internal/scrollbar/styles/common.js +7 -0
  8. package/es/_internal/scrollbar/styles/light.d.ts +8 -0
  9. package/es/_internal/scrollbar/styles/light.js +3 -5
  10. package/es/_internal/select-menu/src/SelectMenu.d.ts +57 -1
  11. package/es/_internal/select-menu/styles/light.d.ts +8 -0
  12. package/es/_internal/selection/src/Selection.d.ts +3 -1
  13. package/es/_internal/selection/src/Selection.js +3 -1
  14. package/es/_utils/css/index.d.ts +1 -0
  15. package/es/_utils/css/index.js +1 -0
  16. package/es/_utils/css/rtl-inset.d.ts +1 -0
  17. package/es/_utils/css/rtl-inset.js +5 -0
  18. package/es/_utils/index.d.ts +1 -1
  19. package/es/_utils/index.js +1 -1
  20. package/es/auto-complete/src/AutoComplete.d.ts +88 -0
  21. package/es/auto-complete/styles/light.d.ts +8 -0
  22. package/es/back-top/src/BackTop.d.ts +1 -1
  23. package/es/cascader/src/Cascader.d.ts +168 -0
  24. package/es/cascader/src/CascaderMenu.d.ts +24 -0
  25. package/es/cascader/src/CascaderOption.d.ts +24 -0
  26. package/es/cascader/src/CascaderSelectMenu.d.ts +24 -0
  27. package/es/cascader/src/CascaderSubmenu.d.ts +25 -1
  28. package/es/cascader/styles/light.d.ts +16 -0
  29. package/es/chat/index.d.ts +1 -1
  30. package/es/chat/src/Chat.d.ts +321 -11
  31. package/es/chat/src/Chat.js +73 -22
  32. package/es/chat/src/ChatListItems.d.ts +104 -0
  33. package/es/chat/src/ChatMessages.d.ts +104 -0
  34. package/es/chat/src/ChatParts/ChatAttachment.js +14 -12
  35. package/es/chat/src/ChatParts/MainArea.d.ts +1 -0
  36. package/es/chat/src/ChatParts/MainArea.js +95 -57
  37. package/es/chat/src/ChatParts/Sidebar.d.ts +920 -0
  38. package/es/chat/src/ChatParts/Sidebar.js +63 -12
  39. package/es/chat/src/interface.d.ts +24 -3
  40. package/es/chat/src/styles/index.cssr.js +13 -2
  41. package/es/chat/styles/dark.d.ts +8 -0
  42. package/es/chat/styles/light.d.ts +8 -0
  43. package/es/components.d.ts +2 -0
  44. package/es/components.js +2 -0
  45. package/es/data-table/src/DataTable.d.ts +184 -0
  46. package/es/data-table/src/HeaderButton/FilterButton.d.ts +40 -0
  47. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +40 -0
  48. package/es/data-table/src/TableParts/Body.d.ts +41 -1
  49. package/es/data-table/src/TableParts/Header.d.ts +40 -0
  50. package/es/data-table/src/interface.d.ts +72 -0
  51. package/es/data-table/styles/light.d.ts +24 -0
  52. package/es/date-picker/src/DatePicker.d.ts +1469 -36
  53. package/es/date-picker/src/DatePicker.js +54 -29
  54. package/es/date-picker/src/interface.d.ts +1 -0
  55. package/es/date-picker/src/panel/date.d.ts +166 -1
  56. package/es/date-picker/src/panel/daterange.d.ts +167 -2
  57. package/es/date-picker/src/panel/datetime.d.ts +166 -1
  58. package/es/date-picker/src/panel/datetimerange.d.ts +167 -2
  59. package/es/date-picker/src/panel/panelMonth.d.ts +332 -2
  60. package/es/date-picker/src/panel/panelMonthContent.d.ts +166 -1
  61. package/es/date-picker/src/panel/panelYear.d.ts +332 -2
  62. package/es/date-picker/src/panel/panelYearContent.d.ts +166 -1
  63. package/es/date-picker/src/panel/use-calendar.d.ts +165 -0
  64. package/es/date-picker/src/panel/use-dual-calendar.d.ts +165 -0
  65. package/es/date-picker/src/panel/use-panel-common.d.ts +165 -0
  66. package/es/date-picker/styles/dark.js +3 -1
  67. package/es/date-picker/styles/light.d.ts +139 -0
  68. package/es/date-picker/styles/light.js +3 -1
  69. package/es/descriptions/src/Descriptions.d.ts +30 -0
  70. package/es/descriptions/src/Descriptions.js +18 -10
  71. package/es/dialog/src/DialogProvider.d.ts +2 -2
  72. package/es/drawer/src/Drawer.d.ts +81 -1
  73. package/es/drawer/src/DrawerBodyWrapper.d.ts +9 -1
  74. package/es/drawer/src/DrawerContent.d.ts +8 -0
  75. package/es/drawer/styles/light.d.ts +8 -0
  76. package/es/dropdown/src/Dropdown.d.ts +1 -1
  77. package/es/infinite-scroll/index.d.ts +2 -0
  78. package/es/infinite-scroll/index.js +1 -0
  79. package/es/infinite-scroll/src/InfiniteScroll.d.ts +45 -0
  80. package/es/infinite-scroll/src/InfiniteScroll.js +78 -0
  81. package/es/layout/src/Layout.d.ts +112 -0
  82. package/es/layout/src/LayoutContent.d.ts +56 -0
  83. package/es/layout/src/LayoutFooter.d.ts +72 -0
  84. package/es/layout/src/LayoutHeader.d.ts +48 -0
  85. package/es/layout/src/LayoutSider.d.ts +56 -0
  86. package/es/layout/styles/light.d.ts +8 -0
  87. package/es/legacy-transfer/src/Transfer.d.ts +80 -0
  88. package/es/legacy-transfer/src/TransferFilter.d.ts +8 -0
  89. package/es/legacy-transfer/src/TransferList.d.ts +9 -1
  90. package/es/legacy-transfer/src/TransferListItem.d.ts +8 -0
  91. package/es/legacy-transfer/styles/light.d.ts +8 -0
  92. package/es/locales/common/arDZ.js +2 -0
  93. package/es/locales/common/deDE.js +2 -0
  94. package/es/locales/common/enGB.js +2 -0
  95. package/es/locales/common/enUS.d.ts +2 -0
  96. package/es/locales/common/enUS.js +2 -0
  97. package/es/locales/common/eo.js +2 -0
  98. package/es/locales/common/esAR.js +2 -0
  99. package/es/locales/common/faIR.js +2 -0
  100. package/es/locales/common/frFR.js +2 -0
  101. package/es/locales/common/idID.js +2 -0
  102. package/es/locales/common/itIT.js +2 -0
  103. package/es/locales/common/jaJP.js +2 -0
  104. package/es/locales/common/koKR.js +2 -0
  105. package/es/locales/common/nbNO.js +2 -0
  106. package/es/locales/common/nlNL.js +2 -0
  107. package/es/locales/common/plPL.js +2 -0
  108. package/es/locales/common/ptBR.js +2 -0
  109. package/es/locales/common/ruRU.js +2 -0
  110. package/es/locales/common/skSK.js +2 -0
  111. package/es/locales/common/svSE.js +2 -0
  112. package/es/locales/common/thTH.js +2 -0
  113. package/es/locales/common/trTR.js +2 -0
  114. package/es/locales/common/ukUA.js +2 -0
  115. package/es/locales/common/viVN.js +2 -0
  116. package/es/locales/common/zhCN.js +2 -0
  117. package/es/locales/common/zhTW.js +2 -0
  118. package/es/log/src/Log.d.ts +80 -0
  119. package/es/log/styles/light.d.ts +8 -0
  120. package/es/mention/src/Mention.d.ts +88 -0
  121. package/es/mention/styles/light.d.ts +8 -0
  122. package/es/menu/src/Menu.d.ts +1 -1
  123. package/es/modal/src/BodyWrapper.d.ts +9 -1
  124. package/es/modal/src/Modal.d.ts +73 -1
  125. package/es/modal/styles/light.d.ts +8 -0
  126. package/es/notification/src/NotificationContainer.d.ts +8 -0
  127. package/es/notification/src/NotificationProvider.d.ts +72 -0
  128. package/es/notification/styles/light.d.ts +8 -0
  129. package/es/pagination/src/Pagination.d.ts +176 -0
  130. package/es/pagination/styles/light.d.ts +16 -0
  131. package/es/popselect/src/Popselect.d.ts +88 -0
  132. package/es/popselect/src/PopselectPanel.d.ts +16 -0
  133. package/es/popselect/styles/light.d.ts +8 -0
  134. package/es/scrollbar/src/Scrollbar.d.ts +72 -0
  135. package/es/select/src/Select.d.ts +88 -0
  136. package/es/select/styles/light.d.ts +8 -0
  137. package/es/time-picker/src/Panel.d.ts +8 -0
  138. package/es/time-picker/src/TimePicker.d.ts +80 -0
  139. package/es/time-picker/styles/light.d.ts +8 -0
  140. package/es/transfer/src/Transfer.d.ts +80 -0
  141. package/es/transfer/src/TransferFilter.d.ts +8 -0
  142. package/es/transfer/src/TransferList.d.ts +9 -1
  143. package/es/transfer/src/TransferListItem.d.ts +8 -0
  144. package/es/transfer/styles/light.d.ts +8 -0
  145. package/es/tree/src/Tree.d.ts +82 -2
  146. package/es/tree/src/TreeNodeCheckbox.d.ts +8 -0
  147. package/es/tree/styles/light.d.ts +8 -0
  148. package/es/tree-select/src/TreeSelect.d.ts +89 -1
  149. package/es/tree-select/styles/light.d.ts +8 -0
  150. package/es/version.d.ts +1 -1
  151. package/es/version.js +1 -1
  152. package/es/virtual-list/index.d.ts +2 -0
  153. package/es/virtual-list/index.js +1 -0
  154. package/es/virtual-list/src/VirtualList.d.ts +146 -0
  155. package/es/virtual-list/src/VirtualList.js +103 -0
  156. package/lib/_internal/scrollbar/src/Scrollbar.d.ts +119 -17
  157. package/lib/_internal/scrollbar/src/Scrollbar.js +117 -64
  158. package/lib/_internal/scrollbar/src/styles/index.cssr.js +32 -15
  159. package/lib/_internal/scrollbar/styles/common.d.ts +7 -0
  160. package/lib/_internal/scrollbar/styles/common.js +10 -0
  161. package/lib/_internal/scrollbar/styles/light.d.ts +8 -0
  162. package/lib/_internal/scrollbar/styles/light.js +3 -5
  163. package/lib/_internal/select-menu/src/SelectMenu.d.ts +57 -1
  164. package/lib/_internal/select-menu/styles/light.d.ts +8 -0
  165. package/lib/_internal/selection/src/Selection.d.ts +3 -1
  166. package/lib/_internal/selection/src/Selection.js +3 -1
  167. package/lib/_utils/css/index.d.ts +1 -0
  168. package/lib/_utils/css/index.js +3 -1
  169. package/lib/_utils/css/rtl-inset.d.ts +1 -0
  170. package/lib/_utils/css/rtl-inset.js +8 -0
  171. package/lib/_utils/index.d.ts +1 -1
  172. package/lib/_utils/index.js +2 -1
  173. package/lib/auto-complete/src/AutoComplete.d.ts +88 -0
  174. package/lib/auto-complete/styles/light.d.ts +8 -0
  175. package/lib/back-top/src/BackTop.d.ts +1 -1
  176. package/lib/cascader/src/Cascader.d.ts +168 -0
  177. package/lib/cascader/src/CascaderMenu.d.ts +24 -0
  178. package/lib/cascader/src/CascaderOption.d.ts +24 -0
  179. package/lib/cascader/src/CascaderSelectMenu.d.ts +24 -0
  180. package/lib/cascader/src/CascaderSubmenu.d.ts +25 -1
  181. package/lib/cascader/styles/light.d.ts +16 -0
  182. package/lib/chat/index.d.ts +1 -1
  183. package/lib/chat/src/Chat.d.ts +321 -11
  184. package/lib/chat/src/Chat.js +73 -22
  185. package/lib/chat/src/ChatListItems.d.ts +104 -0
  186. package/lib/chat/src/ChatMessages.d.ts +104 -0
  187. package/lib/chat/src/ChatParts/ChatAttachment.js +14 -12
  188. package/lib/chat/src/ChatParts/MainArea.d.ts +1 -0
  189. package/lib/chat/src/ChatParts/MainArea.js +94 -56
  190. package/lib/chat/src/ChatParts/Sidebar.d.ts +920 -0
  191. package/lib/chat/src/ChatParts/Sidebar.js +62 -11
  192. package/lib/chat/src/interface.d.ts +24 -3
  193. package/lib/chat/src/styles/index.cssr.js +13 -2
  194. package/lib/chat/styles/dark.d.ts +8 -0
  195. package/lib/chat/styles/light.d.ts +8 -0
  196. package/lib/components.d.ts +2 -0
  197. package/lib/components.js +2 -0
  198. package/lib/data-table/src/DataTable.d.ts +184 -0
  199. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +40 -0
  200. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +40 -0
  201. package/lib/data-table/src/TableParts/Body.d.ts +41 -1
  202. package/lib/data-table/src/TableParts/Header.d.ts +40 -0
  203. package/lib/data-table/src/interface.d.ts +72 -0
  204. package/lib/data-table/styles/light.d.ts +24 -0
  205. package/lib/date-picker/src/DatePicker.d.ts +1469 -36
  206. package/lib/date-picker/src/DatePicker.js +53 -28
  207. package/lib/date-picker/src/interface.d.ts +1 -0
  208. package/lib/date-picker/src/panel/date.d.ts +166 -1
  209. package/lib/date-picker/src/panel/daterange.d.ts +167 -2
  210. package/lib/date-picker/src/panel/datetime.d.ts +166 -1
  211. package/lib/date-picker/src/panel/datetimerange.d.ts +167 -2
  212. package/lib/date-picker/src/panel/panelMonth.d.ts +332 -2
  213. package/lib/date-picker/src/panel/panelMonthContent.d.ts +166 -1
  214. package/lib/date-picker/src/panel/panelYear.d.ts +332 -2
  215. package/lib/date-picker/src/panel/panelYearContent.d.ts +166 -1
  216. package/lib/date-picker/src/panel/use-calendar.d.ts +165 -0
  217. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +165 -0
  218. package/lib/date-picker/src/panel/use-panel-common.d.ts +165 -0
  219. package/lib/date-picker/styles/dark.js +3 -1
  220. package/lib/date-picker/styles/light.d.ts +139 -0
  221. package/lib/date-picker/styles/light.js +3 -1
  222. package/lib/descriptions/src/Descriptions.d.ts +30 -0
  223. package/lib/descriptions/src/Descriptions.js +18 -10
  224. package/lib/dialog/src/DialogProvider.d.ts +2 -2
  225. package/lib/drawer/src/Drawer.d.ts +81 -1
  226. package/lib/drawer/src/DrawerBodyWrapper.d.ts +9 -1
  227. package/lib/drawer/src/DrawerContent.d.ts +8 -0
  228. package/lib/drawer/styles/light.d.ts +8 -0
  229. package/lib/dropdown/src/Dropdown.d.ts +1 -1
  230. package/lib/infinite-scroll/index.d.ts +2 -0
  231. package/lib/infinite-scroll/index.js +9 -0
  232. package/lib/infinite-scroll/src/InfiniteScroll.d.ts +45 -0
  233. package/lib/infinite-scroll/src/InfiniteScroll.js +81 -0
  234. package/lib/layout/src/Layout.d.ts +112 -0
  235. package/lib/layout/src/LayoutContent.d.ts +56 -0
  236. package/lib/layout/src/LayoutFooter.d.ts +72 -0
  237. package/lib/layout/src/LayoutHeader.d.ts +48 -0
  238. package/lib/layout/src/LayoutSider.d.ts +56 -0
  239. package/lib/layout/styles/light.d.ts +8 -0
  240. package/lib/legacy-transfer/src/Transfer.d.ts +80 -0
  241. package/lib/legacy-transfer/src/TransferFilter.d.ts +8 -0
  242. package/lib/legacy-transfer/src/TransferList.d.ts +9 -1
  243. package/lib/legacy-transfer/src/TransferListItem.d.ts +8 -0
  244. package/lib/legacy-transfer/styles/light.d.ts +8 -0
  245. package/lib/locales/common/arDZ.js +2 -0
  246. package/lib/locales/common/deDE.js +2 -0
  247. package/lib/locales/common/enGB.js +2 -0
  248. package/lib/locales/common/enUS.d.ts +2 -0
  249. package/lib/locales/common/enUS.js +2 -0
  250. package/lib/locales/common/eo.js +2 -0
  251. package/lib/locales/common/esAR.js +2 -0
  252. package/lib/locales/common/faIR.js +2 -0
  253. package/lib/locales/common/frFR.js +2 -0
  254. package/lib/locales/common/idID.js +2 -0
  255. package/lib/locales/common/itIT.js +2 -0
  256. package/lib/locales/common/jaJP.js +2 -0
  257. package/lib/locales/common/koKR.js +2 -0
  258. package/lib/locales/common/nbNO.js +2 -0
  259. package/lib/locales/common/nlNL.js +2 -0
  260. package/lib/locales/common/plPL.js +2 -0
  261. package/lib/locales/common/ptBR.js +2 -0
  262. package/lib/locales/common/ruRU.js +2 -0
  263. package/lib/locales/common/skSK.js +2 -0
  264. package/lib/locales/common/svSE.js +2 -0
  265. package/lib/locales/common/thTH.js +2 -0
  266. package/lib/locales/common/trTR.js +2 -0
  267. package/lib/locales/common/ukUA.js +2 -0
  268. package/lib/locales/common/viVN.js +2 -0
  269. package/lib/locales/common/zhCN.js +2 -0
  270. package/lib/locales/common/zhTW.js +2 -0
  271. package/lib/log/src/Log.d.ts +80 -0
  272. package/lib/log/styles/light.d.ts +8 -0
  273. package/lib/mention/src/Mention.d.ts +88 -0
  274. package/lib/mention/styles/light.d.ts +8 -0
  275. package/lib/menu/src/Menu.d.ts +1 -1
  276. package/lib/modal/src/BodyWrapper.d.ts +9 -1
  277. package/lib/modal/src/Modal.d.ts +73 -1
  278. package/lib/modal/styles/light.d.ts +8 -0
  279. package/lib/notification/src/NotificationContainer.d.ts +8 -0
  280. package/lib/notification/src/NotificationProvider.d.ts +72 -0
  281. package/lib/notification/styles/light.d.ts +8 -0
  282. package/lib/pagination/src/Pagination.d.ts +176 -0
  283. package/lib/pagination/styles/light.d.ts +16 -0
  284. package/lib/popselect/src/Popselect.d.ts +88 -0
  285. package/lib/popselect/src/PopselectPanel.d.ts +16 -0
  286. package/lib/popselect/styles/light.d.ts +8 -0
  287. package/lib/scrollbar/src/Scrollbar.d.ts +72 -0
  288. package/lib/select/src/Select.d.ts +88 -0
  289. package/lib/select/styles/light.d.ts +8 -0
  290. package/lib/time-picker/src/Panel.d.ts +8 -0
  291. package/lib/time-picker/src/TimePicker.d.ts +80 -0
  292. package/lib/time-picker/styles/light.d.ts +8 -0
  293. package/lib/transfer/src/Transfer.d.ts +80 -0
  294. package/lib/transfer/src/TransferFilter.d.ts +8 -0
  295. package/lib/transfer/src/TransferList.d.ts +9 -1
  296. package/lib/transfer/src/TransferListItem.d.ts +8 -0
  297. package/lib/transfer/styles/light.d.ts +8 -0
  298. package/lib/tree/src/Tree.d.ts +82 -2
  299. package/lib/tree/src/TreeNodeCheckbox.d.ts +8 -0
  300. package/lib/tree/styles/light.d.ts +8 -0
  301. package/lib/tree-select/src/TreeSelect.d.ts +89 -1
  302. package/lib/tree-select/styles/light.d.ts +8 -0
  303. package/lib/version.d.ts +1 -1
  304. package/lib/version.js +1 -1
  305. package/lib/virtual-list/index.d.ts +2 -0
  306. package/lib/virtual-list/index.js +9 -0
  307. package/lib/virtual-list/src/VirtualList.d.ts +146 -0
  308. package/lib/virtual-list/src/VirtualList.js +106 -0
  309. package/package.json +4 -4
  310. package/volar.d.ts +1 -0
  311. package/web-types.json +124 -4
package/dist/index.js CHANGED
@@ -771,6 +771,16 @@
771
771
  return /^\d+$/.test(value) ? `${value}px` : value;
772
772
  };
773
773
 
774
+ function rtlInset(inset) {
775
+ const {
776
+ left,
777
+ right,
778
+ top,
779
+ bottom
780
+ } = getMargin(inset);
781
+ return `${top} ${left} ${bottom} ${right}`;
782
+ }
783
+
774
784
  function ampCount(selector) {
775
785
  let cnt = 0;
776
786
  for (let i = 0; i < selector.length; ++i) {
@@ -3017,7 +3027,7 @@
3017
3027
  if (typeof selector === 'string') {
3018
3028
  return document.querySelector(selector);
3019
3029
  }
3020
- return selector();
3030
+ return selector() || null;
3021
3031
  }
3022
3032
 
3023
3033
  var VLazyTeleport = vue.defineComponent({
@@ -3109,8 +3119,11 @@
3109
3119
  };
3110
3120
  const keepOffsetDirection = {
3111
3121
  top: true,
3122
+ // top++
3112
3123
  bottom: false,
3124
+ // top--
3113
3125
  left: true,
3126
+ // left++
3114
3127
  right: false // left--
3115
3128
  };
3116
3129
  const cssPositionToOppositeAlign = {
@@ -4281,6 +4294,7 @@
4281
4294
 
4282
4295
  let maybeTouch;
4283
4296
  function ensureMaybeTouch() {
4297
+ if (typeof document === 'undefined') return false;
4284
4298
  if (maybeTouch === undefined) {
4285
4299
  if ('matchMedia' in window) {
4286
4300
  maybeTouch = window.matchMedia('(pointer:coarse)').matches;
@@ -4292,12 +4306,139 @@
4292
4306
  }
4293
4307
  let wheelScale;
4294
4308
  function ensureWheelScale() {
4309
+ if (typeof document === 'undefined') return 1;
4295
4310
  if (wheelScale === undefined) {
4296
4311
  wheelScale = 'chrome' in window ? window.devicePixelRatio : 1;
4297
4312
  }
4298
4313
  return wheelScale;
4299
4314
  }
4300
4315
 
4316
+ const xScrollInjextionKey = 'VVirtualListXScroll';
4317
+
4318
+ function setupXScroll({
4319
+ columnsRef,
4320
+ renderColRef,
4321
+ renderItemWithColsRef
4322
+ }) {
4323
+ const listWidthRef = vue.ref(0);
4324
+ const scrollLeftRef = vue.ref(0);
4325
+ const xFinweckTreeRef = vue.computed(() => {
4326
+ const columns = columnsRef.value;
4327
+ if (columns.length === 0) {
4328
+ return null;
4329
+ }
4330
+ const ft = new FinweckTree(columns.length, 0);
4331
+ columns.forEach((column, index) => {
4332
+ ft.add(index, column.width);
4333
+ });
4334
+ return ft;
4335
+ });
4336
+ const startIndexRef = useMemo(() => {
4337
+ const xFinweckTree = xFinweckTreeRef.value;
4338
+ if (xFinweckTree !== null) {
4339
+ return Math.max(xFinweckTree.getBound(scrollLeftRef.value) - 1, 0);
4340
+ } else {
4341
+ return 0;
4342
+ }
4343
+ });
4344
+ const getLeft = index => {
4345
+ const xFinweckTree = xFinweckTreeRef.value;
4346
+ if (xFinweckTree !== null) {
4347
+ return xFinweckTree.sum(index);
4348
+ } else {
4349
+ return 0;
4350
+ }
4351
+ };
4352
+ const endIndexRef = useMemo(() => {
4353
+ const xFinweckTree = xFinweckTreeRef.value;
4354
+ if (xFinweckTree !== null) {
4355
+ return Math.min(xFinweckTree.getBound(scrollLeftRef.value + listWidthRef.value) + 1, columnsRef.value.length - 1);
4356
+ } else {
4357
+ return 0;
4358
+ }
4359
+ });
4360
+ vue.provide(xScrollInjextionKey, {
4361
+ startIndexRef,
4362
+ endIndexRef,
4363
+ columnsRef,
4364
+ renderColRef,
4365
+ renderItemWithColsRef,
4366
+ getLeft
4367
+ });
4368
+ return {
4369
+ listWidthRef,
4370
+ scrollLeftRef
4371
+ };
4372
+ }
4373
+
4374
+ const VirtualListRow = vue.defineComponent({
4375
+ name: 'VirtualListRow',
4376
+ props: {
4377
+ index: {
4378
+ type: Number,
4379
+ required: true
4380
+ },
4381
+ item: {
4382
+ type: Object,
4383
+ required: true
4384
+ }
4385
+ },
4386
+ setup() {
4387
+ const {
4388
+ startIndexRef,
4389
+ endIndexRef,
4390
+ columnsRef,
4391
+ getLeft,
4392
+ renderColRef,
4393
+ renderItemWithColsRef
4394
+ } =
4395
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
4396
+ vue.inject(xScrollInjextionKey);
4397
+ return {
4398
+ startIndex: startIndexRef,
4399
+ endIndex: endIndexRef,
4400
+ columns: columnsRef,
4401
+ renderCol: renderColRef,
4402
+ renderItemWithCols: renderItemWithColsRef,
4403
+ getLeft
4404
+ };
4405
+ },
4406
+ render() {
4407
+ const {
4408
+ startIndex,
4409
+ endIndex,
4410
+ columns,
4411
+ renderCol,
4412
+ renderItemWithCols,
4413
+ getLeft,
4414
+ item
4415
+ } = this;
4416
+ if (renderItemWithCols != null) {
4417
+ return renderItemWithCols({
4418
+ itemIndex: this.index,
4419
+ startColIndex: startIndex,
4420
+ endColIndex: endIndex,
4421
+ allColumns: columns,
4422
+ item,
4423
+ getLeft
4424
+ });
4425
+ }
4426
+ if (renderCol != null) {
4427
+ const items = [];
4428
+ for (let i = startIndex; i <= endIndex; ++i) {
4429
+ const column = columns[i];
4430
+ items.push(renderCol({
4431
+ column,
4432
+ left: getLeft(i),
4433
+ item
4434
+ }));
4435
+ }
4436
+ return items;
4437
+ }
4438
+ return null;
4439
+ }
4440
+ });
4441
+
4301
4442
  /* eslint-disable no-void */
4302
4443
  /* eslint-disable @typescript-eslint/restrict-plus-operands */
4303
4444
  const styles$1 = c('.v-vl', {
@@ -4320,6 +4461,12 @@
4320
4461
  type: Boolean,
4321
4462
  default: true
4322
4463
  },
4464
+ columns: {
4465
+ type: Array,
4466
+ default: () => []
4467
+ },
4468
+ renderCol: Function,
4469
+ renderItemWithCols: Function,
4323
4470
  items: {
4324
4471
  type: Array,
4325
4472
  default: () => []
@@ -4392,7 +4539,7 @@
4392
4539
  // remount
4393
4540
  scrollTo({
4394
4541
  top: scrollTopRef.value,
4395
- left: scrollLeft
4542
+ left: scrollLeftRef.value
4396
4543
  });
4397
4544
  });
4398
4545
  vue.onDeactivated(() => {
@@ -4401,6 +4548,17 @@
4401
4548
  activateStateInitialized = true;
4402
4549
  }
4403
4550
  });
4551
+ const totalWidthRef = useMemo(() => {
4552
+ if (props.renderCol == null && props.renderItemWithCols == null) {
4553
+ return undefined;
4554
+ }
4555
+ if (props.columns.length === 0) return undefined;
4556
+ let width = 0;
4557
+ props.columns.forEach(column => {
4558
+ width += column.width;
4559
+ });
4560
+ return width;
4561
+ });
4404
4562
  const keyIndexMapRef = vue.computed(() => {
4405
4563
  const map = new Map();
4406
4564
  const {
@@ -4411,6 +4569,14 @@
4411
4569
  });
4412
4570
  return map;
4413
4571
  });
4572
+ const {
4573
+ scrollLeftRef,
4574
+ listWidthRef
4575
+ } = setupXScroll({
4576
+ columnsRef: vue.toRef(props, 'columns'),
4577
+ renderColRef: vue.toRef(props, 'renderCol'),
4578
+ renderItemWithColsRef: vue.toRef(props, 'renderItemWithCols')
4579
+ });
4414
4580
  const listElRef = vue.ref(null);
4415
4581
  const listHeightRef = vue.ref(undefined);
4416
4582
  const keyToHeightOffset = new Map();
@@ -4431,7 +4597,6 @@
4431
4597
  return ft;
4432
4598
  });
4433
4599
  const finweckTreeUpdateTrigger = vue.ref(0);
4434
- let scrollLeft = 0;
4435
4600
  const scrollTopRef = vue.ref(0);
4436
4601
  const startIndexRef = useMemo(() => {
4437
4602
  return Math.max(finweckTreeRef.value.getBound(scrollTopRef.value - depx(props.paddingTop)) - 1, 0);
@@ -4618,8 +4783,15 @@
4618
4783
  // List is HTMLElement
4619
4784
  if (isHideByVShow(entry.target)) return;
4620
4785
  // If height is same, return
4621
- if (entry.contentRect.height === listHeightRef.value) return;
4786
+ if (props.renderCol == null && props.renderItemWithCols == null) {
4787
+ if (entry.contentRect.height === listHeightRef.value) return;
4788
+ } else {
4789
+ if (entry.contentRect.height === listHeightRef.value && entry.contentRect.width === listWidthRef.value) {
4790
+ return;
4791
+ }
4792
+ }
4622
4793
  listHeightRef.value = entry.contentRect.height;
4794
+ listWidthRef.value = entry.contentRect.width;
4623
4795
  const {
4624
4796
  onResize
4625
4797
  } = props;
@@ -4633,7 +4805,7 @@
4633
4805
  // https://github.com/TuSimple/naive-ui/issues/811
4634
4806
  if (listEl == null) return;
4635
4807
  scrollTopRef.value = listEl.scrollTop;
4636
- scrollLeft = listEl.scrollLeft;
4808
+ scrollLeftRef.value = listEl.scrollLeft;
4637
4809
  }
4638
4810
  function isHideByVShow(el) {
4639
4811
  let cursor = el;
@@ -4658,6 +4830,7 @@
4658
4830
  finweckTreeUpdateTrigger.value;
4659
4831
  return [props.itemsStyle, {
4660
4832
  boxSizing: 'content-box',
4833
+ width: pxfy(totalWidthRef.value),
4661
4834
  height: itemResizable ? '' : height,
4662
4835
  minHeight: itemResizable ? height : '',
4663
4836
  paddingTop: pxfy(props.paddingTop),
@@ -4706,24 +4879,40 @@
4706
4879
  class: 'v-vl-visible-items',
4707
4880
  style: this.visibleItemsStyle
4708
4881
  }, this.visibleItemsProps), {
4709
- default: () => this.viewportItems.map(item => {
4710
- const key = item[keyField];
4711
- const index = keyToIndex.get(key);
4712
- const itemVNode = this.$slots.default({
4713
- item,
4714
- index
4715
- })[0];
4716
- if (itemResizable) {
4717
- return vue.h(VResizeObserver, {
4718
- key,
4719
- onResize: entry => this.handleItemResize(key, entry)
4720
- }, {
4721
- default: () => itemVNode
4722
- });
4723
- }
4724
- itemVNode.key = key;
4725
- return itemVNode;
4726
- })
4882
+ default: () => {
4883
+ const {
4884
+ renderCol,
4885
+ renderItemWithCols
4886
+ } = this;
4887
+ return this.viewportItems.map(item => {
4888
+ const key = item[keyField];
4889
+ const index = keyToIndex.get(key);
4890
+ const renderedCols = renderCol != null ? vue.h(VirtualListRow, {
4891
+ index,
4892
+ item
4893
+ }) : undefined;
4894
+ const renderedItemWithCols = renderItemWithCols != null ? vue.h(VirtualListRow, {
4895
+ index,
4896
+ item
4897
+ }) : undefined;
4898
+ const itemVNode = this.$slots.default({
4899
+ item,
4900
+ renderedCols,
4901
+ renderedItemWithCols,
4902
+ index
4903
+ })[0];
4904
+ if (itemResizable) {
4905
+ return vue.h(VResizeObserver, {
4906
+ key,
4907
+ onResize: entry => this.handleItemResize(key, entry)
4908
+ }, {
4909
+ default: () => itemVNode
4910
+ });
4911
+ }
4912
+ itemVNode.key = key;
4913
+ return itemVNode;
4914
+ });
4915
+ }
4727
4916
  })]) : (_b = (_a = this.$slots).empty) === null || _b === void 0 ? void 0 : _b.call(_a)]);
4728
4917
  }
4729
4918
  });
@@ -4790,6 +4979,7 @@
4790
4979
  getCounter: Function,
4791
4980
  getTail: Function,
4792
4981
  updateCounter: Function,
4982
+ onUpdateCount: Function,
4793
4983
  onUpdateOverflow: Function
4794
4984
  },
4795
4985
  setup(props, {
@@ -4797,7 +4987,7 @@
4797
4987
  }) {
4798
4988
  const selfRef = vue.ref(null);
4799
4989
  const counterRef = vue.ref(null);
4800
- function deriveCounter() {
4990
+ function deriveCounter(options) {
4801
4991
  const {
4802
4992
  value: self
4803
4993
  } = selfRef;
@@ -4816,6 +5006,13 @@
4816
5006
  const {
4817
5007
  children
4818
5008
  } = self;
5009
+ if (options.showAllItemsBeforeCalculate) {
5010
+ for (const child of children) {
5011
+ if (child.hasAttribute(hiddenAttr)) {
5012
+ child.removeAttribute(hiddenAttr);
5013
+ }
5014
+ }
5015
+ }
4819
5016
  const containerWidth = self.offsetWidth;
4820
5017
  const childWidths = [];
4821
5018
  const tail = slots.tail ? getTail === null || getTail === void 0 ? void 0 : getTail() : null;
@@ -4862,6 +5059,10 @@
4862
5059
  tail.style.maxWidth = '';
4863
5060
  }
4864
5061
  }
5062
+ const {
5063
+ onUpdateCount
5064
+ } = props;
5065
+ if (onUpdateCount) onUpdateCount(restCount);
4865
5066
  break;
4866
5067
  }
4867
5068
  }
@@ -4888,7 +5089,9 @@
4888
5089
  anchorMetaName: cssrAnchorMetaName$1,
4889
5090
  ssr: ssrAdapter
4890
5091
  });
4891
- vue.onMounted(deriveCounter);
5092
+ vue.onMounted(() => deriveCounter({
5093
+ showAllItemsBeforeCalculate: false
5094
+ }));
4892
5095
  // besides onMounted, other case should be manually triggered, or we shoud watch items
4893
5096
  return {
4894
5097
  selfRef,
@@ -4901,7 +5104,9 @@
4901
5104
  $slots
4902
5105
  } = this;
4903
5106
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
4904
- vue.nextTick(this.sync);
5107
+ vue.nextTick(() => this.sync({
5108
+ showAllItemsBeforeCalculate: false
5109
+ }));
4905
5110
  // It shouldn't have border
4906
5111
  return vue.h('div', {
4907
5112
  class: 'v-overflow',
@@ -4969,7 +5174,6 @@
4969
5174
  return !!element.href && element.rel !== 'ignore';
4970
5175
  case 'INPUT':
4971
5176
  return element.type !== 'hidden' && element.type !== 'file';
4972
- case 'BUTTON':
4973
5177
  case 'SELECT':
4974
5178
  case 'TEXTAREA':
4975
5179
  return true;
@@ -4989,8 +5193,8 @@
4989
5193
  default: true
4990
5194
  },
4991
5195
  onEsc: Function,
4992
- initialFocusTo: String,
4993
- finalFocusTo: String,
5196
+ initialFocusTo: [String, Function],
5197
+ finalFocusTo: [String, Function],
4994
5198
  returnFocusOnDeactivated: {
4995
5199
  type: Boolean,
4996
5200
  default: true
@@ -15202,6 +15406,8 @@
15202
15406
  typingText: "Typing...",
15203
15407
  retryText: "Resend",
15204
15408
  closeButtonText: "Close chat",
15409
+ shareButtonTooltip: "Share chat",
15410
+ profileButtonTooltip: "View profile",
15205
15411
  unreadNotificationText: "new messages"
15206
15412
  }
15207
15413
  };
@@ -15337,6 +15543,8 @@
15337
15543
  typingText: "Typing...",
15338
15544
  retryText: "Resend",
15339
15545
  closeButtonText: "Close chat",
15546
+ shareButtonTooltip: "Share chat",
15547
+ profileButtonTooltip: "View profile",
15340
15548
  unreadNotificationText: "new messages"
15341
15549
  }
15342
15550
  };
@@ -15473,6 +15681,8 @@
15473
15681
  typingText: "Typing...",
15474
15682
  retryText: "Resend",
15475
15683
  closeButtonText: "Close chat",
15684
+ shareButtonTooltip: "Share chat",
15685
+ profileButtonTooltip: "View profile",
15476
15686
  unreadNotificationText: "new messages"
15477
15687
  }
15478
15688
  };
@@ -15613,6 +15823,8 @@
15613
15823
  typingText: "\u041F\u0435\u0447\u0430\u0442\u0430\u0435\u0442...",
15614
15824
  retryText: "\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C",
15615
15825
  closeButtonText: "\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0447\u0430\u0442",
15826
+ shareButtonTooltip: "\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u044C\u0441\u044F \u0447\u0430\u0442\u043E\u043C",
15827
+ profileButtonTooltip: "\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043F\u0440\u043E\u0444\u0438\u043B\u044C",
15616
15828
  unreadNotificationText: "\u043D\u043E\u0432\u044B\u0445 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439"
15617
15829
  }
15618
15830
  };
@@ -15749,6 +15961,8 @@
15749
15961
  typingText: "Typing...",
15750
15962
  retryText: "Resend",
15751
15963
  closeButtonText: "Close chat",
15964
+ shareButtonTooltip: "Share chat",
15965
+ profileButtonTooltip: "View profile",
15752
15966
  unreadNotificationText: "new messages"
15753
15967
  }
15754
15968
  };
@@ -15887,6 +16101,8 @@
15887
16101
  typingText: "Typing...",
15888
16102
  retryText: "Resend",
15889
16103
  closeButtonText: "Close chat",
16104
+ shareButtonTooltip: "Share chat",
16105
+ profileButtonTooltip: "View profile",
15890
16106
  unreadNotificationText: "new messages"
15891
16107
  }
15892
16108
  };
@@ -16025,6 +16241,8 @@
16025
16241
  typingText: "Typing...",
16026
16242
  retryText: "Resend",
16027
16243
  closeButtonText: "Close chat",
16244
+ shareButtonTooltip: "Share chat",
16245
+ profileButtonTooltip: "View profile",
16028
16246
  unreadNotificationText: "new messages"
16029
16247
  }
16030
16248
  };
@@ -16164,6 +16382,8 @@
16164
16382
  typingText: "Typing...",
16165
16383
  retryText: "Resend",
16166
16384
  closeButtonText: "Close chat",
16385
+ shareButtonTooltip: "Share chat",
16386
+ profileButtonTooltip: "View profile",
16167
16387
  unreadNotificationText: "new messages"
16168
16388
  }
16169
16389
  };
@@ -16299,6 +16519,8 @@
16299
16519
  typingText: "Typing...",
16300
16520
  retryText: "Resend",
16301
16521
  closeButtonText: "Close chat",
16522
+ shareButtonTooltip: "Share chat",
16523
+ profileButtonTooltip: "View profile",
16302
16524
  unreadNotificationText: "new messages"
16303
16525
  }
16304
16526
  };
@@ -16438,6 +16660,8 @@
16438
16660
  typingText: "Typing...",
16439
16661
  retryText: "Resend",
16440
16662
  closeButtonText: "Close chat",
16663
+ shareButtonTooltip: "Share chat",
16664
+ profileButtonTooltip: "View profile",
16441
16665
  unreadNotificationText: "new messages"
16442
16666
  }
16443
16667
  };
@@ -16575,6 +16799,8 @@
16575
16799
  typingText: "Typing...",
16576
16800
  retryText: "Resend",
16577
16801
  closeButtonText: "Close chat",
16802
+ shareButtonTooltip: "Share chat",
16803
+ profileButtonTooltip: "View profile",
16578
16804
  unreadNotificationText: "new messages"
16579
16805
  }
16580
16806
  };
@@ -16710,6 +16936,8 @@
16710
16936
  typingText: "Typing...",
16711
16937
  retryText: "Resend",
16712
16938
  closeButtonText: "Close chat",
16939
+ shareButtonTooltip: "Share chat",
16940
+ profileButtonTooltip: "View profile",
16713
16941
  unreadNotificationText: "new messages"
16714
16942
  }
16715
16943
  };
@@ -16849,6 +17077,8 @@
16849
17077
  typingText: "Typing...",
16850
17078
  retryText: "Resend",
16851
17079
  closeButtonText: "Close chat",
17080
+ shareButtonTooltip: "Share chat",
17081
+ profileButtonTooltip: "View profile",
16852
17082
  unreadNotificationText: "new messages"
16853
17083
  }
16854
17084
  };
@@ -16987,6 +17217,8 @@
16987
17217
  typingText: "Typing...",
16988
17218
  retryText: "Resend",
16989
17219
  closeButtonText: "Close chat",
17220
+ shareButtonTooltip: "Share chat",
17221
+ profileButtonTooltip: "View profile",
16990
17222
  unreadNotificationText: "new messages"
16991
17223
  }
16992
17224
  };
@@ -17126,6 +17358,8 @@
17126
17358
  typingText: "Typing...",
17127
17359
  retryText: "Resend",
17128
17360
  closeButtonText: "Close chat",
17361
+ shareButtonTooltip: "Share chat",
17362
+ profileButtonTooltip: "View profile",
17129
17363
  unreadNotificationText: "new messages"
17130
17364
  }
17131
17365
  };
@@ -17262,6 +17496,8 @@
17262
17496
  typingText: "Typing...",
17263
17497
  retryText: "Resend",
17264
17498
  closeButtonText: "Close chat",
17499
+ shareButtonTooltip: "Share chat",
17500
+ profileButtonTooltip: "View profile",
17265
17501
  unreadNotificationText: "new messages"
17266
17502
  }
17267
17503
  };
@@ -17400,6 +17636,8 @@
17400
17636
  typingText: "Typing...",
17401
17637
  retryText: "Resend",
17402
17638
  closeButtonText: "Close chat",
17639
+ shareButtonTooltip: "Share chat",
17640
+ profileButtonTooltip: "View profile",
17403
17641
  unreadNotificationText: "new messages"
17404
17642
  }
17405
17643
  };
@@ -17535,6 +17773,8 @@
17535
17773
  typingText: "Typing...",
17536
17774
  retryText: "Resend",
17537
17775
  closeButtonText: "Close chat",
17776
+ shareButtonTooltip: "Share chat",
17777
+ profileButtonTooltip: "View profile",
17538
17778
  unreadNotificationText: "new messages"
17539
17779
  }
17540
17780
  };
@@ -17674,6 +17914,8 @@
17674
17914
  typingText: "Typing...",
17675
17915
  retryText: "Resend",
17676
17916
  closeButtonText: "Close chat",
17917
+ shareButtonTooltip: "Share chat",
17918
+ profileButtonTooltip: "View profile",
17677
17919
  unreadNotificationText: "new messages"
17678
17920
  }
17679
17921
  };
@@ -17809,6 +18051,8 @@
17809
18051
  typingText: "Typing...",
17810
18052
  retryText: "Resend",
17811
18053
  closeButtonText: "Close chat",
18054
+ shareButtonTooltip: "Share chat",
18055
+ profileButtonTooltip: "View profile",
17812
18056
  unreadNotificationText: "new messages"
17813
18057
  }
17814
18058
  };
@@ -17945,6 +18189,8 @@
17945
18189
  typingText: "Typing...",
17946
18190
  retryText: "Resend",
17947
18191
  closeButtonText: "Close chat",
18192
+ shareButtonTooltip: "Share chat",
18193
+ profileButtonTooltip: "View profile",
17948
18194
  unreadNotificationText: "new messages"
17949
18195
  }
17950
18196
  };
@@ -18082,6 +18328,8 @@
18082
18328
  typingText: "Typing...",
18083
18329
  retryText: "Resend",
18084
18330
  closeButtonText: "Close chat",
18331
+ shareButtonTooltip: "Share chat",
18332
+ profileButtonTooltip: "View profile",
18085
18333
  unreadNotificationText: "new messages"
18086
18334
  }
18087
18335
  };
@@ -18217,6 +18465,8 @@
18217
18465
  typingText: "Typing...",
18218
18466
  retryText: "Resend",
18219
18467
  closeButtonText: "Close chat",
18468
+ shareButtonTooltip: "Share chat",
18469
+ profileButtonTooltip: "View profile",
18220
18470
  unreadNotificationText: "new messages"
18221
18471
  }
18222
18472
  };
@@ -18352,6 +18602,8 @@
18352
18602
  typingText: "Typing...",
18353
18603
  retryText: "Resend",
18354
18604
  closeButtonText: "Close chat",
18605
+ shareButtonTooltip: "Share chat",
18606
+ profileButtonTooltip: "View profile",
18355
18607
  unreadNotificationText: "new messages"
18356
18608
  }
18357
18609
  };
@@ -18487,6 +18739,8 @@
18487
18739
  typingText: "Typing...",
18488
18740
  retryText: "Resend",
18489
18741
  closeButtonText: "Close chat",
18742
+ shareButtonTooltip: "Share chat",
18743
+ profileButtonTooltip: "View profile",
18490
18744
  unreadNotificationText: "new messages"
18491
18745
  }
18492
18746
  };
@@ -31510,12 +31764,27 @@
31510
31764
  }
31511
31765
  });
31512
31766
 
31767
+ const commonVars$8 = {
31768
+ railInsetHorizontalBottom: "auto 2px 4px 2px",
31769
+ railInsetHorizontalTop: "4px 2px auto 2px",
31770
+ railInsetVerticalRight: "2px 4px 2px auto",
31771
+ railInsetVerticalLeft: "2px auto 2px 4px",
31772
+ railColor: "transparent"
31773
+ };
31774
+
31513
31775
  const self$1m = vars => {
31514
31776
  const {
31515
31777
  scrollbarColor,
31516
- scrollbarColorHover
31778
+ scrollbarColorHover,
31779
+ scrollbarHeight,
31780
+ scrollbarWidth,
31781
+ scrollbarBorderRadius
31517
31782
  } = vars;
31518
31783
  return {
31784
+ ...commonVars$8,
31785
+ height: scrollbarHeight,
31786
+ width: scrollbarWidth,
31787
+ borderRadius: scrollbarBorderRadius,
31519
31788
  color: scrollbarColor,
31520
31789
  colorHover: scrollbarColorHover
31521
31790
  };
@@ -31585,50 +31854,60 @@
31585
31854
  width: 0;
31586
31855
  height: 0;
31587
31856
  display: none;
31588
- `), c$1(">", [cB("scrollbar-content", `
31857
+ `), c$1(">", [
31858
+ // We can't set overflow hidden since it affects positioning.
31859
+ cB("scrollbar-content", `
31589
31860
  box-sizing: border-box;
31590
31861
  min-width: 100%;
31591
31862
  `)])])]), c$1(">, +", [cB("scrollbar-rail", `
31592
31863
  position: absolute;
31593
31864
  pointer-events: none;
31594
31865
  user-select: none;
31866
+ background: var(--u-scrollbar-rail-color);
31595
31867
  -webkit-user-select: none;
31596
31868
  `, [cM("horizontal", `
31597
- left: 2px;
31598
- right: 2px;
31599
- bottom: 4px;
31600
31869
  height: var(--u-scrollbar-height);
31601
31870
  `, [c$1(">", [cE("scrollbar", `
31602
31871
  height: var(--u-scrollbar-height);
31603
31872
  border-radius: var(--u-scrollbar-border-radius);
31604
31873
  right: 0;
31605
- `)])]), cM("vertical", `
31606
- right: 4px;
31607
- top: 2px;
31608
- bottom: 2px;
31874
+ `)])]), cM("horizontal--top", `
31875
+ top: var(--u-scrollbar-rail-top-horizontal-top);
31876
+ right: var(--u-scrollbar-rail-right-horizontal-top);
31877
+ bottom: var(--u-scrollbar-rail-bottom-horizontal-top);
31878
+ left: var(--u-scrollbar-rail-left-horizontal-top);
31879
+ `), cM("horizontal--bottom", `
31880
+ top: var(--u-scrollbar-rail-top-horizontal-bottom);
31881
+ right: var(--u-scrollbar-rail-right-horizontal-bottom);
31882
+ bottom: var(--u-scrollbar-rail-bottom-horizontal-bottom);
31883
+ left: var(--u-scrollbar-rail-left-horizontal-bottom);
31884
+ `), cM("vertical", `
31609
31885
  width: var(--u-scrollbar-width);
31610
31886
  `, [c$1(">", [cE("scrollbar", `
31611
31887
  width: var(--u-scrollbar-width);
31612
31888
  border-radius: var(--u-scrollbar-border-radius);
31613
31889
  bottom: 0;
31614
- `)])]), cM("disabled", [c$1(">", [cE("scrollbar", {
31615
- pointerEvents: "none"
31616
- })])]), c$1(">", [cE("scrollbar", `
31890
+ `)])]), cM("vertical--left", `
31891
+ top: var(--u-scrollbar-rail-top-vertical-left);
31892
+ right: var(--u-scrollbar-rail-right-vertical-left);
31893
+ bottom: var(--u-scrollbar-rail-bottom-vertical-left);
31894
+ left: var(--u-scrollbar-rail-left-vertical-left);
31895
+ `), cM("vertical--right", `
31896
+ top: var(--u-scrollbar-rail-top-vertical-right);
31897
+ right: var(--u-scrollbar-rail-right-vertical-right);
31898
+ bottom: var(--u-scrollbar-rail-bottom-vertical-right);
31899
+ left: var(--u-scrollbar-rail-left-vertical-right);
31900
+ `), cM("disabled", [c$1(">", [cE("scrollbar", "pointer-events: none;")])]), c$1(">", [cE("scrollbar", `
31901
+ z-index: 1;
31617
31902
  position: absolute;
31618
31903
  cursor: pointer;
31619
31904
  pointer-events: all;
31620
31905
  background-color: var(--u-scrollbar-color);
31621
31906
  transition: background-color .2s var(--u-scrollbar-bezier);
31622
- `, [fadeInTransition(), c$1("&:hover", {
31623
- backgroundColor: "var(--u-scrollbar-color-hover)"
31624
- })])])])])]);
31907
+ `, [fadeInTransition(), c$1("&:hover", "background-color: var(--u-scrollbar-color-hover);")])])])])]);
31625
31908
 
31626
31909
  const scrollbarProps$1 = {
31627
31910
  ...useTheme.props,
31628
- size: {
31629
- type: Number,
31630
- default: 5
31631
- },
31632
31911
  duration: {
31633
31912
  type: Number,
31634
31913
  default: 0
@@ -31649,7 +31928,7 @@
31649
31928
  content: Function,
31650
31929
  containerClass: String,
31651
31930
  containerStyle: [String, Object],
31652
- contentClass: String,
31931
+ contentClass: [String, Array],
31653
31932
  contentStyle: [String, Object],
31654
31933
  horizontalRailStyle: [String, Object],
31655
31934
  verticalRailStyle: [String, Object],
@@ -31657,7 +31936,15 @@
31657
31936
  onWheel: Function,
31658
31937
  onResize: Function,
31659
31938
  internalOnUpdateScrollLeft: Function,
31660
- internalHoistYRail: Boolean
31939
+ internalHoistYRail: Boolean,
31940
+ yPlacement: {
31941
+ type: String,
31942
+ default: "right"
31943
+ },
31944
+ xPlacement: {
31945
+ type: String,
31946
+ default: "bottom"
31947
+ }
31661
31948
  };
31662
31949
  const Scrollbar$1 = vue.defineComponent({
31663
31950
  name: "Scrollbar",
@@ -31690,6 +31977,14 @@
31690
31977
  let memoMouseX = 0;
31691
31978
  let memoMouseY = 0;
31692
31979
  const isIos = useIsIos();
31980
+ const themeRef = useTheme(
31981
+ "Scrollbar",
31982
+ "-scrollbar",
31983
+ style$1C,
31984
+ scrollbarLight,
31985
+ props,
31986
+ mergedClsPrefixRef
31987
+ );
31693
31988
  const yBarSizeRef = vue.computed(() => {
31694
31989
  const { value: containerHeight } = containerHeightRef;
31695
31990
  const { value: contentHeight } = contentHeightRef;
@@ -31699,7 +31994,7 @@
31699
31994
  } else {
31700
31995
  return Math.min(
31701
31996
  containerHeight,
31702
- yRailSize * containerHeight / contentHeight + props.size * 1.5
31997
+ yRailSize * containerHeight / contentHeight + depx(themeRef.value.self.width) * 1.5
31703
31998
  );
31704
31999
  }
31705
32000
  });
@@ -31713,7 +32008,7 @@
31713
32008
  if (containerWidth === null || contentWidth === null || xRailSize === null) {
31714
32009
  return 0;
31715
32010
  } else {
31716
- return xRailSize * containerWidth / contentWidth + props.size * 1.5;
32011
+ return xRailSize * containerWidth / contentWidth + depx(themeRef.value.self.height) * 1.5;
31717
32012
  }
31718
32013
  });
31719
32014
  const xBarSizePxRef = vue.computed(() => {
@@ -31728,7 +32023,9 @@
31728
32023
  return 0;
31729
32024
  } else {
31730
32025
  const heightDiff = contentHeight - containerHeight;
31731
- if (!heightDiff) return 0;
32026
+ if (!heightDiff) {
32027
+ return 0;
32028
+ }
31732
32029
  return containerScrollTop / heightDiff * (yRailSize - yBarSizeRef.value);
31733
32030
  }
31734
32031
  });
@@ -31744,7 +32041,9 @@
31744
32041
  return 0;
31745
32042
  } else {
31746
32043
  const widthDiff = contentWidth - containerWidth;
31747
- if (!widthDiff) return 0;
32044
+ if (!widthDiff) {
32045
+ return 0;
32046
+ }
31748
32047
  return containerScrollLeft / widthDiff * (xRailSize - xBarSizeRef.value);
31749
32048
  }
31750
32049
  });
@@ -31771,34 +32070,22 @@
31771
32070
  });
31772
32071
  const mergedContainerRef = vue.computed(() => {
31773
32072
  const { container } = props;
31774
- if (container) return container();
32073
+ if (container) {
32074
+ return container();
32075
+ }
31775
32076
  return containerRef.value;
31776
32077
  });
31777
32078
  const mergedContentRef = vue.computed(() => {
31778
32079
  const { content } = props;
31779
- if (content) return content();
31780
- return contentRef.value;
31781
- });
31782
- const activateState = useReactivated(() => {
31783
- if (!props.container) {
31784
- scrollTo({
31785
- top: containerScrollTopRef.value,
31786
- left: containerScrollLeftRef.value
31787
- });
32080
+ if (content) {
32081
+ return content();
31788
32082
  }
32083
+ return contentRef.value;
31789
32084
  });
31790
- const handleContentResize = () => {
31791
- if (activateState.isDeactivated) return;
31792
- sync();
31793
- };
31794
- const handleContainerResize = (e) => {
31795
- if (activateState.isDeactivated) return;
31796
- const { onResize } = props;
31797
- if (onResize) onResize(e);
31798
- sync();
31799
- };
31800
32085
  const scrollTo = (options, y) => {
31801
- if (!props.scrollable) return;
32086
+ if (!props.scrollable) {
32087
+ return;
32088
+ }
31802
32089
  if (typeof options === "number") {
31803
32090
  scrollToPosition(options, y ?? 0, 0, false, "auto");
31804
32091
  return;
@@ -31826,10 +32113,38 @@
31826
32113
  scrollToPosition(0, 0, 0, false, behavior);
31827
32114
  }
31828
32115
  };
32116
+ const activateState = useReactivated(() => {
32117
+ if (!props.container) {
32118
+ scrollTo({
32119
+ top: containerScrollTopRef.value,
32120
+ left: containerScrollLeftRef.value
32121
+ });
32122
+ }
32123
+ });
32124
+ const handleContentResize = () => {
32125
+ if (activateState.isDeactivated) {
32126
+ return;
32127
+ }
32128
+ sync();
32129
+ };
32130
+ const handleContainerResize = (e) => {
32131
+ if (activateState.isDeactivated) {
32132
+ return;
32133
+ }
32134
+ const { onResize } = props;
32135
+ if (onResize) {
32136
+ onResize(e);
32137
+ }
32138
+ sync();
32139
+ };
31829
32140
  const scrollBy = (options, y) => {
31830
- if (!props.scrollable) return;
32141
+ if (!props.scrollable) {
32142
+ return;
32143
+ }
31831
32144
  const { value: container } = mergedContainerRef;
31832
- if (!container) return;
32145
+ if (!container) {
32146
+ return;
32147
+ }
31833
32148
  if (typeof options === "object") {
31834
32149
  container.scrollBy(options);
31835
32150
  } else {
@@ -31838,7 +32153,9 @@
31838
32153
  };
31839
32154
  function scrollToPosition(left, top, elSize, debounce, behavior) {
31840
32155
  const { value: container } = mergedContainerRef;
31841
- if (!container) return;
32156
+ if (!container) {
32157
+ return;
32158
+ }
31842
32159
  if (debounce) {
31843
32160
  const { scrollTop, offsetHeight } = container;
31844
32161
  if (top > scrollTop) {
@@ -31900,7 +32217,9 @@
31900
32217
  }
31901
32218
  function handleScroll(e) {
31902
32219
  const { onScroll } = props;
31903
- if (onScroll) onScroll(e);
32220
+ if (onScroll) {
32221
+ onScroll(e);
32222
+ }
31904
32223
  syncScrollState();
31905
32224
  }
31906
32225
  function syncScrollState() {
@@ -31950,7 +32269,9 @@
31950
32269
  }
31951
32270
  }
31952
32271
  function sync() {
31953
- if (!props.scrollable) return;
32272
+ if (!props.scrollable) {
32273
+ return;
32274
+ }
31954
32275
  if (props.useUnifiedContainer) {
31955
32276
  syncUnifiedContainer();
31956
32277
  } else {
@@ -31973,7 +32294,9 @@
31973
32294
  memoMouseX = rtlEnabledRef?.value ? window.innerWidth - e.clientX : e.clientX;
31974
32295
  }
31975
32296
  function handleXScrollMouseMove(e) {
31976
- if (!xBarPressed) return;
32297
+ if (!xBarPressed) {
32298
+ return;
32299
+ }
31977
32300
  if (xBarVanishTimerId !== void 0) {
31978
32301
  window.clearTimeout(xBarVanishTimerId);
31979
32302
  }
@@ -31983,7 +32306,9 @@
31983
32306
  const { value: containerWidth } = containerWidthRef;
31984
32307
  const { value: contentWidth } = contentWidthRef;
31985
32308
  const { value: xBarSize } = xBarSizeRef;
31986
- if (containerWidth === null || contentWidth === null) return;
32309
+ if (containerWidth === null || contentWidth === null) {
32310
+ return;
32311
+ }
31987
32312
  const dX = rtlEnabledRef?.value ? window.innerWidth - e.clientX - memoMouseX : e.clientX - memoMouseX;
31988
32313
  const dScrollLeft = dX * (contentWidth - containerWidth) / (containerWidth - xBarSize);
31989
32314
  const toScrollLeftUpperBound = contentWidth - containerWidth;
@@ -31994,7 +32319,9 @@
31994
32319
  if (container) {
31995
32320
  container.scrollLeft = toScrollLeft * (rtlEnabledRef?.value ? -1 : 1);
31996
32321
  const { internalOnUpdateScrollLeft } = props;
31997
- if (internalOnUpdateScrollLeft) internalOnUpdateScrollLeft(toScrollLeft);
32322
+ if (internalOnUpdateScrollLeft) {
32323
+ internalOnUpdateScrollLeft(toScrollLeft);
32324
+ }
31998
32325
  }
31999
32326
  }
32000
32327
  function handleXScrollMouseUp(e) {
@@ -32018,7 +32345,9 @@
32018
32345
  memoMouseY = e.clientY;
32019
32346
  }
32020
32347
  function handleYScrollMouseMove(e) {
32021
- if (!yBarPressed) return;
32348
+ if (!yBarPressed) {
32349
+ return;
32350
+ }
32022
32351
  if (xBarVanishTimerId !== void 0) {
32023
32352
  window.clearTimeout(xBarVanishTimerId);
32024
32353
  }
@@ -32028,7 +32357,9 @@
32028
32357
  const { value: containerHeight } = containerHeightRef;
32029
32358
  const { value: contentHeight } = contentHeightRef;
32030
32359
  const { value: yBarSize } = yBarSizeRef;
32031
- if (containerHeight === null || contentHeight === null) return;
32360
+ if (containerHeight === null || contentHeight === null) {
32361
+ return;
32362
+ }
32032
32363
  const dY = e.clientY - memoMouseY;
32033
32364
  const dScrollTop = dY * (contentHeight - containerHeight) / (containerHeight - yBarSize);
32034
32365
  const toScrollTopUpperBound = contentHeight - containerHeight;
@@ -32077,7 +32408,9 @@
32077
32408
  }
32078
32409
  });
32079
32410
  vue.onMounted(() => {
32080
- if (props.container) return;
32411
+ if (props.container) {
32412
+ return;
32413
+ }
32081
32414
  sync();
32082
32415
  });
32083
32416
  vue.onBeforeUnmount(() => {
@@ -32090,31 +32423,74 @@
32090
32423
  off("mousemove", window, handleYScrollMouseMove, true);
32091
32424
  off("mouseup", window, handleYScrollMouseUp, true);
32092
32425
  });
32093
- const themeRef = useTheme(
32094
- "Scrollbar",
32095
- "-scrollbar",
32096
- style$1C,
32097
- scrollbarLight,
32098
- props,
32099
- mergedClsPrefixRef
32100
- );
32101
32426
  const cssVarsRef = vue.computed(() => {
32102
32427
  const {
32103
- common: {
32104
- cubicBezierEaseInOut,
32105
- scrollbarBorderRadius,
32106
- scrollbarHeight,
32107
- scrollbarWidth
32108
- },
32109
- self: { color, colorHover }
32428
+ common: { cubicBezierEaseInOut },
32429
+ self: {
32430
+ color,
32431
+ colorHover,
32432
+ height,
32433
+ width,
32434
+ borderRadius,
32435
+ railInsetHorizontalTop,
32436
+ railInsetHorizontalBottom,
32437
+ railInsetVerticalRight,
32438
+ railInsetVerticalLeft,
32439
+ railColor
32440
+ }
32110
32441
  } = themeRef.value;
32442
+ const {
32443
+ top: railTopHorizontalTop,
32444
+ right: railRightHorizontalTop,
32445
+ bottom: railBottomHorizontalTop,
32446
+ left: railLeftHorizontalTop
32447
+ } = getMargin(railInsetHorizontalTop);
32448
+ const {
32449
+ top: railTopHorizontalBottom,
32450
+ right: railRightHorizontalBottom,
32451
+ bottom: railBottomHorizontalBottom,
32452
+ left: railLeftHorizontalBottom
32453
+ } = getMargin(railInsetHorizontalBottom);
32454
+ const {
32455
+ top: railTopVerticalRight,
32456
+ right: railRightVerticalRight,
32457
+ bottom: railBottomVerticalRight,
32458
+ left: railLeftVerticalRight
32459
+ } = getMargin(
32460
+ rtlEnabledRef?.value ? rtlInset(railInsetVerticalRight) : railInsetVerticalRight
32461
+ );
32462
+ const {
32463
+ top: railTopVerticalLeft,
32464
+ right: railRightVerticalLeft,
32465
+ bottom: railBottomVerticalLeft,
32466
+ left: railLeftVerticalLeft
32467
+ } = getMargin(
32468
+ rtlEnabledRef?.value ? rtlInset(railInsetVerticalLeft) : railInsetVerticalLeft
32469
+ );
32111
32470
  return {
32112
32471
  "--u-scrollbar-bezier": cubicBezierEaseInOut,
32113
32472
  "--u-scrollbar-color": color,
32114
32473
  "--u-scrollbar-color-hover": colorHover,
32115
- "--u-scrollbar-border-radius": scrollbarBorderRadius,
32116
- "--u-scrollbar-width": scrollbarWidth,
32117
- "--u-scrollbar-height": scrollbarHeight
32474
+ "--u-scrollbar-border-radius": borderRadius,
32475
+ "--u-scrollbar-width": width,
32476
+ "--u-scrollbar-height": height,
32477
+ "--u-scrollbar-rail-top-horizontal-top": railTopHorizontalTop,
32478
+ "--u-scrollbar-rail-right-horizontal-top": railRightHorizontalTop,
32479
+ "--u-scrollbar-rail-bottom-horizontal-top": railBottomHorizontalTop,
32480
+ "--u-scrollbar-rail-left-horizontal-top": railLeftHorizontalTop,
32481
+ "--u-scrollbar-rail-top-horizontal-bottom": railTopHorizontalBottom,
32482
+ "--u-scrollbar-rail-right-horizontal-bottom": railRightHorizontalBottom,
32483
+ "--u-scrollbar-rail-bottom-horizontal-bottom": railBottomHorizontalBottom,
32484
+ "--u-scrollbar-rail-left-horizontal-bottom": railLeftHorizontalBottom,
32485
+ "--u-scrollbar-rail-top-vertical-right": railTopVerticalRight,
32486
+ "--u-scrollbar-rail-right-vertical-right": railRightVerticalRight,
32487
+ "--u-scrollbar-rail-bottom-vertical-right": railBottomVerticalRight,
32488
+ "--u-scrollbar-rail-left-vertical-right": railLeftVerticalRight,
32489
+ "--u-scrollbar-rail-top-vertical-left": railTopVerticalLeft,
32490
+ "--u-scrollbar-rail-right-vertical-left": railRightVerticalLeft,
32491
+ "--u-scrollbar-rail-bottom-vertical-left": railBottomVerticalLeft,
32492
+ "--u-scrollbar-rail-left-vertical-left": railLeftVerticalLeft,
32493
+ "--u-scrollbar-rail-color": railColor
32118
32494
  };
32119
32495
  });
32120
32496
  const themeClassHandle = inlineThemeDisabled ? useThemeClass("scrollbar", void 0, cssVarsRef, props) : void 0;
@@ -32161,22 +32537,29 @@
32161
32537
  mergedClsPrefix,
32162
32538
  triggerDisplayManually,
32163
32539
  rtlEnabled,
32164
- internalHoistYRail
32540
+ internalHoistYRail,
32541
+ yPlacement,
32542
+ xPlacement,
32543
+ xScrollable
32165
32544
  } = this;
32166
- if (!this.scrollable) return $slots.default?.();
32545
+ if (!this.scrollable) {
32546
+ return $slots.default?.();
32547
+ }
32167
32548
  const triggerIsNone = this.trigger === "none";
32168
- const createYRail = (style2) => {
32549
+ const createYRail = (className, style2) => {
32169
32550
  return /* @__PURE__ */ vue.h(
32170
32551
  "div",
32171
32552
  {
32172
32553
  ref: "yRailRef",
32173
32554
  class: [
32174
32555
  `${mergedClsPrefix}-scrollbar-rail`,
32175
- `${mergedClsPrefix}-scrollbar-rail--vertical`
32556
+ `${mergedClsPrefix}-scrollbar-rail--vertical`,
32557
+ `${mergedClsPrefix}-scrollbar-rail--vertical--${yPlacement}`,
32558
+ className
32176
32559
  ],
32177
32560
  "data-scrollbar-rail": true,
32178
32561
  style: [style2 || "", this.verticalRailStyle],
32179
- "aria-hiddens": true
32562
+ "aria-hidden": true
32180
32563
  },
32181
32564
  vue.h(
32182
32565
  triggerIsNone ? Wrapper : vue.Transition,
@@ -32248,14 +32631,15 @@
32248
32631
  )
32249
32632
  })
32250
32633
  ),
32251
- internalHoistYRail ? null : createYRail(void 0),
32252
- this.xScrollable && /* @__PURE__ */ vue.h(
32634
+ internalHoistYRail ? null : createYRail(void 0, void 0),
32635
+ xScrollable && /* @__PURE__ */ vue.h(
32253
32636
  "div",
32254
32637
  {
32255
32638
  ref: "xRailRef",
32256
32639
  class: [
32257
32640
  `${mergedClsPrefix}-scrollbar-rail`,
32258
- `${mergedClsPrefix}-scrollbar-rail--horizontal`
32641
+ `${mergedClsPrefix}-scrollbar-rail--horizontal`,
32642
+ `${mergedClsPrefix}-scrollbar-rail--horizontal--${xPlacement}`
32259
32643
  ],
32260
32644
  style: this.horizontalRailStyle,
32261
32645
  "data-scrollbar-rail": true,
@@ -32287,7 +32671,7 @@
32287
32671
  default: createChildren
32288
32672
  });
32289
32673
  if (internalHoistYRail) {
32290
- return /* @__PURE__ */ vue.h(vue.Fragment, null, scrollbarNode, createYRail(this.cssVars));
32674
+ return /* @__PURE__ */ vue.h(vue.Fragment, null, scrollbarNode, createYRail(this.themeClass, this.cssVars));
32291
32675
  } else {
32292
32676
  return scrollbarNode;
32293
32677
  }
@@ -35786,7 +36170,9 @@
35786
36170
  if (patternInputEl) {
35787
36171
  patternInputEl.style.width = `${patternInputMirrorEl.offsetWidth}px`;
35788
36172
  if (props.maxTagCount !== "responsive") {
35789
- overflowRef.value?.sync();
36173
+ overflowRef.value?.sync({
36174
+ showAllItemsBeforeCalculate: false
36175
+ });
35790
36176
  }
35791
36177
  }
35792
36178
  }
@@ -39739,7 +40125,8 @@
39739
40125
  Input: inputLight,
39740
40126
  Button: buttonLight,
39741
40127
  TimePicker: timePickerLight,
39742
- Scrollbar: scrollbarLight
40128
+ Scrollbar: scrollbarLight,
40129
+ Select: internalSelectionLight
39743
40130
  },
39744
40131
  self: self$Q
39745
40132
  });
@@ -39751,7 +40138,8 @@
39751
40138
  Input: inputDark,
39752
40139
  Button: buttonDark,
39753
40140
  TimePicker: timePickerDark,
39754
- Scrollbar: scrollbarDark
40141
+ Scrollbar: scrollbarDark,
40142
+ Select: internalSelectionDark
39755
40143
  },
39756
40144
  self: self$Q
39757
40145
  };
@@ -59115,6 +59503,36 @@
59115
59503
  }
59116
59504
  });
59117
59505
 
59506
+ const scrollbarProps = {
59507
+ ...useTheme.props,
59508
+ trigger: String,
59509
+ xScrollable: Boolean,
59510
+ onScroll: Function,
59511
+ size: Number
59512
+ };
59513
+ const Scrollbar = vue.defineComponent({
59514
+ name: "Scrollbar",
59515
+ props: scrollbarProps,
59516
+ setup() {
59517
+ const scrollbarInstRef = vue.ref(null);
59518
+ const exposedMethods = {
59519
+ scrollTo: (...args) => {
59520
+ scrollbarInstRef.value?.scrollTo(args[0], args[1]);
59521
+ },
59522
+ scrollBy: (...args) => {
59523
+ scrollbarInstRef.value?.scrollBy(args[0], args[1]);
59524
+ }
59525
+ };
59526
+ return {
59527
+ ...exposedMethods,
59528
+ scrollbarInstRef
59529
+ };
59530
+ },
59531
+ render() {
59532
+ return /* @__PURE__ */ vue.h(Scrollbar$1, { ref: "scrollbarInstRef", ...this.$props }, this.$slots);
59533
+ }
59534
+ });
59535
+
59118
59536
  var style$13 = c$1([cB("align-start", `
59119
59537
  align-self: self-start;
59120
59538
  `), cB("align-center", `
@@ -59802,11 +60220,11 @@
59802
60220
  gap: 8px;
59803
60221
  `), cE("content", `
59804
60222
  flex: 1;
59805
- overflow-y: auto;
59806
60223
  min-height: 0;
59807
- padding: 16px;
59808
- padding-top: 8px;
59809
- `), cE("item", `
60224
+ `, [c$1(".u-scrollbar-content", `
60225
+ padding: 16px;
60226
+ padding-top: 8px;
60227
+ `)]), cE("item", `
59810
60228
  padding: 12px 16px;
59811
60229
  width: 100%;
59812
60230
  cursor: pointer;
@@ -59928,8 +60346,19 @@
59928
60346
  `), cE("header-title", `
59929
60347
  margin-top: 9px;
59930
60348
  color: var(--u-header-title-color);
60349
+ flex: 1;
60350
+ min-width: 0;
60351
+ overflow: hidden;
60352
+ text-overflow: ellipsis;
60353
+ white-space: nowrap;
60354
+ display: block;
60355
+ margin-right: 16px;
59931
60356
  `), cE("header-actions", `
59932
60357
  padding: 4px;
60358
+ flex-shrink: 0;
60359
+ display: flex;
60360
+ align-items: center;
60361
+ gap: 8px;
59933
60362
  `), cE("unread-notification", `
59934
60363
  background-color: var(--u-unread-notification-background-color);
59935
60364
  color: var(--u-unread-notification-text-color);
@@ -60564,10 +60993,10 @@
60564
60993
  var ChatSidebar = vue.defineComponent({
60565
60994
  name: "ChatSidebar",
60566
60995
  setup(props, { slots }) {
60567
- return { slots };
60568
- },
60569
- render() {
60570
- const { slots } = this;
60996
+ const sidebarContentRef = vue.ref();
60997
+ const lastScrollTop = vue.ref(0);
60998
+ const scrollTopFired = vue.ref(false);
60999
+ const scrollBottomFired = vue.ref(false);
60571
61000
  const {
60572
61001
  mergedClsPrefixRef,
60573
61002
  mergedThemeRef,
@@ -60581,9 +61010,35 @@
60581
61010
  listItemAvatarPropsRef,
60582
61011
  listItemBadgePropsRef,
60583
61012
  notificationsShownSetRef,
60584
- handleChatSelect
61013
+ handleChatSelect,
61014
+ onChatItemsScrollToTop,
61015
+ onChatItemsScrollToBottom
60585
61016
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
60586
61017
  } = vue.inject(chatInjectionKey);
61018
+ const handleSidebarScroll = (e) => {
61019
+ const target = e.target;
61020
+ if (!target) return;
61021
+ const { scrollTop, scrollHeight, clientHeight } = target;
61022
+ const threshold = 5;
61023
+ const scrollDirection = scrollTop > lastScrollTop.value ? "down" : "up";
61024
+ const nearTop = scrollTop <= threshold;
61025
+ const nearBottom = scrollHeight - (scrollTop + clientHeight) <= threshold;
61026
+ if (scrollTop > threshold) {
61027
+ scrollTopFired.value = false;
61028
+ }
61029
+ if (scrollHeight - (scrollTop + clientHeight) > threshold) {
61030
+ scrollBottomFired.value = false;
61031
+ }
61032
+ if (nearTop && scrollDirection === "up" && !scrollTopFired.value) {
61033
+ scrollTopFired.value = true;
61034
+ onChatItemsScrollToTop?.value?.();
61035
+ }
61036
+ if (nearBottom && scrollDirection === "down" && !scrollBottomFired.value) {
61037
+ scrollBottomFired.value = true;
61038
+ onChatItemsScrollToBottom?.value?.();
61039
+ }
61040
+ lastScrollTop.value = scrollTop;
61041
+ };
60587
61042
  const renderListHeader = () => {
60588
61043
  return /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefixRef.value}-chat-sidebar__header` }, /* @__PURE__ */ vue.h(
60589
61044
  UFlex,
@@ -60618,55 +61073,56 @@
60618
61073
  }
60619
61074
  ));
60620
61075
  };
60621
- return /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefixRef.value}-chat-sidebar` }, renderListHeader(), /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefixRef.value}-chat-sidebar__content` }, /* @__PURE__ */ vue.h(
60622
- UChatListItems,
60623
- {
60624
- chatItems: chatItemsRef.value,
60625
- selectedChatId: selectedChatIdRef.value,
60626
- typingChatIds: typingChatIdsRef.value,
60627
- typingText: typingTextRef.value,
60628
- loading: chatItemsLoadingRef.value,
60629
- loadingCount: chatItemsLoadingCountRef.value,
60630
- emptyProps: listEmptyPropsRef.value,
60631
- avatarProps: listItemAvatarPropsRef.value,
60632
- badgeProps: listItemBadgePropsRef.value,
60633
- notificationsShown: notificationsShownSetRef.value,
60634
- onChatSelect: handleChatSelect
60635
- },
60636
- {
60637
- chatItemStatus: slots.chatItemStatus
60638
- }
60639
- )));
60640
- }
60641
- });
60642
-
60643
- const scrollbarProps = {
60644
- ...useTheme.props,
60645
- trigger: String,
60646
- xScrollable: Boolean,
60647
- onScroll: Function,
60648
- size: Number
60649
- };
60650
- const Scrollbar = vue.defineComponent({
60651
- name: "Scrollbar",
60652
- props: scrollbarProps,
60653
- setup() {
60654
- const scrollbarInstRef = vue.ref(null);
60655
- const exposedMethods = {
60656
- scrollTo: (...args) => {
60657
- scrollbarInstRef.value?.scrollTo(args[0], args[1]);
60658
- },
60659
- scrollBy: (...args) => {
60660
- scrollbarInstRef.value?.scrollBy(args[0], args[1]);
60661
- }
60662
- };
60663
61076
  return {
60664
- ...exposedMethods,
60665
- scrollbarInstRef
61077
+ slots,
61078
+ sidebarContentRef,
61079
+ renderListHeader,
61080
+ handleSidebarScroll,
61081
+ mergedClsPrefixRef,
61082
+ mergedThemeRef,
61083
+ chatItemsRef,
61084
+ chatItemsLoadingRef,
61085
+ chatItemsLoadingCountRef,
61086
+ listEmptyPropsRef,
61087
+ selectedChatIdRef,
61088
+ typingChatIdsRef,
61089
+ typingTextRef,
61090
+ listItemAvatarPropsRef,
61091
+ listItemBadgePropsRef,
61092
+ notificationsShownSetRef,
61093
+ handleChatSelect
60666
61094
  };
60667
61095
  },
60668
61096
  render() {
60669
- return /* @__PURE__ */ vue.h(Scrollbar$1, { ref: "scrollbarInstRef", ...this.$props }, this.$slots);
61097
+ return /* @__PURE__ */ vue.h("div", { class: `${this.mergedClsPrefixRef}-chat-sidebar` }, this.renderListHeader(), /* @__PURE__ */ vue.h(
61098
+ Scrollbar,
61099
+ {
61100
+ ref: "sidebarContentRef",
61101
+ class: `${this.mergedClsPrefixRef}-chat-sidebar__content`,
61102
+ onScroll: this.handleSidebarScroll
61103
+ },
61104
+ {
61105
+ default: () => /* @__PURE__ */ vue.h(
61106
+ UChatListItems,
61107
+ {
61108
+ chatItems: this.chatItemsRef,
61109
+ selectedChatId: this.selectedChatIdRef,
61110
+ typingChatIds: this.typingChatIdsRef,
61111
+ typingText: this.typingTextRef,
61112
+ loading: this.chatItemsLoadingRef,
61113
+ loadingCount: this.chatItemsLoadingCountRef,
61114
+ emptyProps: this.listEmptyPropsRef,
61115
+ avatarProps: this.listItemAvatarPropsRef,
61116
+ badgeProps: this.listItemBadgePropsRef,
61117
+ notificationsShown: this.notificationsShownSetRef,
61118
+ onChatSelect: this.handleChatSelect
61119
+ },
61120
+ {
61121
+ chatItemStatus: this.slots.chatItemStatus
61122
+ }
61123
+ )
61124
+ }
61125
+ ));
60670
61126
  }
60671
61127
  });
60672
61128
 
@@ -64425,22 +64881,22 @@
64425
64881
  }
64426
64882
  },
64427
64883
  setup(props, { slots }) {
64428
- const getThumbnailUrl = (att) => {
64429
- const url = [att.preview, att.thumbnail].find(
64884
+ const getThumbnailUrl = (attachment) => {
64885
+ const url = [attachment.preview, attachment.thumbnail].find(
64430
64886
  (value) => typeof value === "string"
64431
64887
  );
64432
64888
  return url ?? null;
64433
64889
  };
64434
64890
  const renderAttachment = () => {
64435
64891
  const fileList = props.attachments.map(
64436
- (att, index) => ({
64892
+ (attachment, index) => ({
64437
64893
  id: `${String(props.message.id)}-attachment-${index}`,
64438
- name: att.name,
64439
- status: att.status || "finished",
64440
- percentage: att.percentage ?? null,
64441
- url: att.url ?? null,
64442
- thumbnailUrl: getThumbnailUrl(att),
64443
- type: att.type ?? null,
64894
+ name: attachment.name,
64895
+ status: attachment.status || "finished",
64896
+ percentage: attachment.percentage ?? null,
64897
+ url: attachment.url ?? null,
64898
+ thumbnailUrl: getThumbnailUrl(attachment),
64899
+ type: attachment.type ?? null,
64444
64900
  file: null,
64445
64901
  batchId: null
64446
64902
  })
@@ -64458,10 +64914,10 @@
64458
64914
  } : void 0,
64459
64915
  showRemoveButton: false,
64460
64916
  showDownloadButton: props.attachments.some(
64461
- (att) => att.status === "finished"
64917
+ (attachment) => attachment.status === "finished" && attachment.url && attachment.url !== "#"
64462
64918
  ),
64463
64919
  showRetryButton: props.attachments.some(
64464
- (att) => att.status === "error"
64920
+ (attachment) => attachment.status === "error"
64465
64921
  ),
64466
64922
  ...props.uploadProps
64467
64923
  },
@@ -64469,10 +64925,10 @@
64469
64925
  default: () => /* @__PURE__ */ vue.h(UUploadFileList, null, {
64470
64926
  "upload-file-title": slots["upload-file-title"] ? ({ file }) => slots["upload-file-title"]?.(file) : void 0,
64471
64927
  "upload-file-subtitle": slots["upload-file-subtitle"] ? ({ file }) => slots["upload-file-subtitle"]?.(file) : ({ file }) => {
64472
- const att = props.attachments.find(
64473
- (a) => a.name === file.name
64928
+ const attachment = props.attachments.find(
64929
+ (attachment2) => attachment2.name === file.name
64474
64930
  );
64475
- return /* @__PURE__ */ vue.h("span", { style: { fontSize: "12px", color: "#999" } }, att?.size || file.file?.size);
64931
+ return /* @__PURE__ */ vue.h("span", { style: { fontSize: "12px", color: "#999" } }, attachment?.size || file.file?.size);
64476
64932
  }
64477
64933
  })
64478
64934
  }
@@ -65005,7 +65461,6 @@
65005
65461
  }
65006
65462
  });
65007
65463
 
65008
- const SCROLL_DELAY = 50;
65009
65464
  const SENDING_DELAY = 100;
65010
65465
  var ChatMainArea = vue.defineComponent({
65011
65466
  name: "ChatMainArea",
@@ -65020,6 +65475,11 @@
65020
65475
  messagesLoadingCountRef,
65021
65476
  headerButtonPropsRef,
65022
65477
  headerIconPropsRef,
65478
+ headerShareButtonPropsRef,
65479
+ headerProfileButtonPropsRef,
65480
+ headerCloseButtonPropsRef,
65481
+ headerShareIconPropsRef,
65482
+ headerProfileIconPropsRef,
65023
65483
  messageUploadPropsRef,
65024
65484
  footerInputPropsRef,
65025
65485
  footerButtonPropsRef,
@@ -65029,21 +65489,29 @@
65029
65489
  retryTextRef,
65030
65490
  typingTextRef,
65031
65491
  closeButtonTextRef,
65492
+ shareButtonTooltipRef,
65493
+ profileButtonTooltipRef,
65032
65494
  unreadNotificationTextRef,
65033
65495
  notificationsShownSetRef,
65034
65496
  unreadCountsBeforeReadRef,
65035
65497
  markNotificationShown,
65036
65498
  handleMessageSend,
65037
65499
  handleMessageRetry,
65500
+ handleFooterInputChange,
65038
65501
  onChatClose,
65039
65502
  onChatShare,
65040
- onUserProfile
65503
+ onUserProfile,
65504
+ onMessagesScrollToTop,
65505
+ onMessagesScrollToBottom
65041
65506
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
65042
65507
  } = vue.inject(chatInjectionKey);
65043
65508
  const messagesBodyRef = vue.ref();
65044
65509
  const inputRef = vue.ref();
65045
65510
  const inputValue = vue.ref("");
65046
65511
  const attachmentFileList = vue.ref([]);
65512
+ const lastScrollTop = vue.ref(0);
65513
+ const scrollTopFired = vue.ref(false);
65514
+ const scrollBottomFired = vue.ref(false);
65047
65515
  const unreadMessagesCount = vue.computed(() => {
65048
65516
  if (!messagesRef.value) return 0;
65049
65517
  return messagesRef.value.filter(
@@ -65055,6 +65523,7 @@
65055
65523
  const unreadCountOnOpen = vue.ref(0);
65056
65524
  const chatInputs = vue.ref({});
65057
65525
  const lastMessageId = vue.ref(null);
65526
+ const shouldScrollOnLoad = vue.ref(false);
65058
65527
  vue.watch(
65059
65528
  selectedChatRef,
65060
65529
  (newChat, oldChat) => {
@@ -65063,6 +65532,10 @@
65063
65532
  const unreadBeforeRead = unreadCountsBeforeReadRef.value[newChat.id] || 0;
65064
65533
  unreadCountOnOpen.value = unreadBeforeRead;
65065
65534
  lastMessageId.value = null;
65535
+ lastScrollTop.value = 0;
65536
+ scrollTopFired.value = false;
65537
+ scrollBottomFired.value = false;
65538
+ shouldScrollOnLoad.value = true;
65066
65539
  if (unreadBeforeRead > 0 && !notificationsShownSetRef.value.has(newChat.id)) {
65067
65540
  hasUnreadMessages.value = true;
65068
65541
  showNotificationManually.value = true;
@@ -65071,12 +65544,6 @@
65071
65544
  hasUnreadMessages.value = false;
65072
65545
  showNotificationManually.value = false;
65073
65546
  }
65074
- void vue.nextTick(() => {
65075
- scrollToBottom();
65076
- });
65077
- setTimeout(() => {
65078
- scrollToBottom();
65079
- }, SCROLL_DELAY);
65080
65547
  }
65081
65548
  },
65082
65549
  { immediate: true }
@@ -65090,16 +65557,15 @@
65090
65557
  }
65091
65558
  const currentLastMessage = newMessages[newMessages.length - 1];
65092
65559
  const currentLastId = currentLastMessage?.id;
65093
- if (currentLastId !== lastMessageId.value && lastMessageId.value !== null) {
65560
+ const hasLastMessageChanged = currentLastId !== lastMessageId.value;
65561
+ if (hasLastMessageChanged && currentLastMessage && !currentLastMessage.isOwn && currentLastMessage.status === MessageStatus.UNREAD) {
65562
+ unreadCountOnOpen.value = unreadMessagesCount.value;
65563
+ }
65564
+ if (shouldScrollOnLoad.value && newMessages.length > 0) {
65565
+ shouldScrollOnLoad.value = false;
65094
65566
  void vue.nextTick(() => {
65095
65567
  scrollToBottom();
65096
65568
  });
65097
- setTimeout(() => {
65098
- scrollToBottom();
65099
- }, SCROLL_DELAY);
65100
- if (currentLastMessage && !currentLastMessage.isOwn && currentLastMessage.status === MessageStatus.UNREAD) {
65101
- unreadCountOnOpen.value = unreadMessagesCount.value;
65102
- }
65103
65569
  }
65104
65570
  lastMessageId.value = currentLastId ?? null;
65105
65571
  },
@@ -65114,17 +65580,38 @@
65114
65580
  notificationsShownSetRef.value = newSet;
65115
65581
  }
65116
65582
  });
65583
+ vue.watch(inputValue, (newValue) => {
65584
+ if (selectedChatRef.value) {
65585
+ handleFooterInputChange(newValue, selectedChatRef.value.id);
65586
+ }
65587
+ });
65117
65588
  const showUnreadNotification = vue.computed(() => {
65118
65589
  return hasUnreadMessages.value && showNotificationManually.value;
65119
65590
  });
65120
- vue.onMounted(() => {
65121
- void vue.nextTick(() => {
65122
- scrollToBottom();
65123
- });
65124
- setTimeout(() => {
65125
- scrollToBottom();
65126
- }, SCROLL_DELAY);
65127
- });
65591
+ const handleMessagesScroll = (e) => {
65592
+ const target = e.target;
65593
+ if (!target) return;
65594
+ const { scrollTop, scrollHeight, clientHeight } = target;
65595
+ const threshold = 5;
65596
+ const scrollDirection = scrollTop > lastScrollTop.value ? "down" : "up";
65597
+ const nearTop = scrollTop <= threshold;
65598
+ const nearBottom = scrollHeight - (scrollTop + clientHeight) <= threshold;
65599
+ if (scrollTop > threshold) {
65600
+ scrollTopFired.value = false;
65601
+ }
65602
+ if (scrollHeight - (scrollTop + clientHeight) > threshold) {
65603
+ scrollBottomFired.value = false;
65604
+ }
65605
+ if (nearTop && scrollDirection === "up" && !scrollTopFired.value) {
65606
+ scrollTopFired.value = true;
65607
+ onMessagesScrollToTop?.value?.();
65608
+ }
65609
+ if (nearBottom && scrollDirection === "down" && !scrollBottomFired.value) {
65610
+ scrollBottomFired.value = true;
65611
+ onMessagesScrollToBottom?.value?.();
65612
+ }
65613
+ lastScrollTop.value = scrollTop;
65614
+ };
65128
65615
  const scrollToBottom = () => {
65129
65616
  const el = messagesBodyRef.value;
65130
65617
  if (!el) return;
@@ -65144,7 +65631,7 @@
65144
65631
  }
65145
65632
  };
65146
65633
  const renderHeader = () => {
65147
- return /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefixRef.value}-chat-main__header` }, /* @__PURE__ */ vue.h(UFlex, { justify: "space-between", align: "flex-start" }, {
65634
+ return /* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefixRef.value}-chat-main__header` }, /* @__PURE__ */ vue.h(UFlex, { justify: "space-between", align: "flex-start", wrap: false }, {
65148
65635
  default: () => /* @__PURE__ */ vue.h(vue.Fragment, null, /* @__PURE__ */ vue.h(
65149
65636
  UText,
65150
65637
  {
@@ -65154,7 +65641,7 @@
65154
65641
  themeOverrides: mergedThemeRef.value.peerOverrides.Typography
65155
65642
  },
65156
65643
  {
65157
- default: () => selectedChatRef.value?.title || "Select a chat"
65644
+ default: () => selectedChatRef.value?.title ?? ""
65158
65645
  }
65159
65646
  ), /* @__PURE__ */ vue.h(
65160
65647
  UFlex,
@@ -65164,75 +65651,115 @@
65164
65651
  class: `${mergedClsPrefixRef.value}-chat-main__header-actions`
65165
65652
  },
65166
65653
  {
65167
- default: () => resolveSlot(slots.headerActions, () => [
65168
- /* @__PURE__ */ vue.h(
65169
- Button,
65170
- {
65171
- secondary: true,
65172
- circle: true,
65173
- size: "large",
65174
- ...headerButtonPropsRef.value,
65175
- theme: mergedThemeRef.value.peers.Button,
65176
- themeOverrides: mergedThemeRef.value.peerOverrides.Button,
65177
- onClick: () => onChatShare?.value?.()
65178
- },
65179
- {
65180
- default: () => /* @__PURE__ */ vue.h(
65181
- UIcon,
65182
- {
65183
- size: 20,
65184
- ...headerIconPropsRef.value,
65185
- theme: mergedThemeRef.value.peers.Icon,
65186
- themeOverrides: mergedThemeRef.value.peerOverrides.Icon
65187
- },
65188
- {
65189
- default: () => /* @__PURE__ */ vue.h(ArrowHookUpRight, null)
65190
- }
65191
- )
65192
- }
65193
- ),
65194
- /* @__PURE__ */ vue.h(
65195
- Button,
65196
- {
65197
- secondary: true,
65198
- circle: true,
65199
- size: "large",
65200
- ...headerButtonPropsRef.value,
65201
- theme: mergedThemeRef.value.peers.Button,
65202
- themeOverrides: mergedThemeRef.value.peerOverrides.Button,
65203
- onClick: () => onUserProfile?.value?.()
65204
- },
65205
- {
65206
- default: () => /* @__PURE__ */ vue.h(
65207
- UIcon,
65654
+ default: () => resolveSlot(slots.headerActions, () => {
65655
+ const shareButtonProps = {
65656
+ ...headerButtonPropsRef.value,
65657
+ ...headerShareButtonPropsRef.value
65658
+ };
65659
+ const profileButtonProps = {
65660
+ ...headerButtonPropsRef.value,
65661
+ ...headerProfileButtonPropsRef.value
65662
+ };
65663
+ const closeButtonProps = {
65664
+ ...headerButtonPropsRef.value,
65665
+ ...headerCloseButtonPropsRef.value
65666
+ };
65667
+ const shareIconProps = {
65668
+ ...headerIconPropsRef.value,
65669
+ ...headerShareIconPropsRef.value
65670
+ };
65671
+ const profileIconProps = {
65672
+ ...headerIconPropsRef.value,
65673
+ ...headerProfileIconPropsRef.value
65674
+ };
65675
+ const buttons = [];
65676
+ if (shareButtonProps.disabled !== true) {
65677
+ buttons.push(
65678
+ /* @__PURE__ */ vue.h(UTooltip, null, {
65679
+ trigger: () => /* @__PURE__ */ vue.h(
65680
+ Button,
65681
+ {
65682
+ secondary: true,
65683
+ circle: true,
65684
+ size: "large",
65685
+ ...shareButtonProps,
65686
+ theme: mergedThemeRef.value.peers.Button,
65687
+ themeOverrides: mergedThemeRef.value.peerOverrides.Button,
65688
+ onClick: () => onChatShare?.value?.()
65689
+ },
65690
+ {
65691
+ default: () => /* @__PURE__ */ vue.h(
65692
+ UIcon,
65693
+ {
65694
+ size: 20,
65695
+ ...shareIconProps,
65696
+ theme: mergedThemeRef.value.peers.Icon,
65697
+ themeOverrides: mergedThemeRef.value.peerOverrides.Icon
65698
+ },
65699
+ {
65700
+ default: () => /* @__PURE__ */ vue.h(ArrowHookUpRight, null)
65701
+ }
65702
+ )
65703
+ }
65704
+ ),
65705
+ default: () => shareButtonTooltipRef.value
65706
+ })
65707
+ );
65708
+ }
65709
+ if (profileButtonProps.disabled !== true) {
65710
+ buttons.push(
65711
+ /* @__PURE__ */ vue.h(UTooltip, null, {
65712
+ trigger: () => /* @__PURE__ */ vue.h(
65713
+ Button,
65714
+ {
65715
+ secondary: true,
65716
+ circle: true,
65717
+ size: "large",
65718
+ ...profileButtonProps,
65719
+ theme: mergedThemeRef.value.peers.Button,
65720
+ themeOverrides: mergedThemeRef.value.peerOverrides.Button,
65721
+ onClick: () => onUserProfile?.value?.()
65722
+ },
65723
+ {
65724
+ default: () => /* @__PURE__ */ vue.h(
65725
+ UIcon,
65726
+ {
65727
+ size: 20,
65728
+ ...profileIconProps,
65729
+ theme: mergedThemeRef.value.peers.Icon,
65730
+ themeOverrides: mergedThemeRef.value.peerOverrides.Icon
65731
+ },
65732
+ {
65733
+ default: () => /* @__PURE__ */ vue.h(PersonNote, null)
65734
+ }
65735
+ )
65736
+ }
65737
+ ),
65738
+ default: () => profileButtonTooltipRef.value
65739
+ })
65740
+ );
65741
+ }
65742
+ if (closeButtonProps.disabled !== true) {
65743
+ buttons.push(
65744
+ /* @__PURE__ */ vue.h(
65745
+ Button,
65208
65746
  {
65209
- size: 20,
65210
- ...headerIconPropsRef.value,
65211
- theme: mergedThemeRef.value.peers.Icon,
65212
- themeOverrides: mergedThemeRef.value.peerOverrides.Icon
65747
+ type: "primary",
65748
+ size: "large",
65749
+ round: true,
65750
+ ...closeButtonProps,
65751
+ theme: mergedThemeRef.value.peers.Button,
65752
+ themeOverrides: mergedThemeRef.value.peerOverrides.Button,
65753
+ onClick: () => onChatClose?.value?.()
65213
65754
  },
65214
65755
  {
65215
- default: () => /* @__PURE__ */ vue.h(PersonNote, null)
65756
+ default: () => closeButtonTextRef.value
65216
65757
  }
65217
65758
  )
65218
- }
65219
- ),
65220
- /* @__PURE__ */ vue.h(
65221
- Button,
65222
- {
65223
- type: "primary",
65224
- size: "large",
65225
- round: true,
65226
- ...headerButtonPropsRef.value,
65227
- theme: mergedThemeRef.value.peers.Button,
65228
- themeOverrides: mergedThemeRef.value.peerOverrides.Button,
65229
- onClick: () => onChatClose?.value?.()
65230
- },
65231
- {
65232
- default: () => closeButtonTextRef.value
65233
- }
65234
- )
65235
- ])
65759
+ );
65760
+ }
65761
+ return buttons;
65762
+ })
65236
65763
  }
65237
65764
  ))
65238
65765
  }));
@@ -65288,12 +65815,6 @@
65288
65815
  chatInputs.value[selectedChatRef.value.id] = "";
65289
65816
  hasUnreadMessages.value = false;
65290
65817
  showNotificationManually.value = false;
65291
- void vue.nextTick(() => {
65292
- scrollToBottom();
65293
- });
65294
- setTimeout(() => {
65295
- scrollToBottom();
65296
- }, SCROLL_DELAY);
65297
65818
  } finally {
65298
65819
  setTimeout(() => {
65299
65820
  isSending.value = false;
@@ -65337,12 +65858,6 @@
65337
65858
  handleMessageSend("", attachments);
65338
65859
  pendingFiles.value = [];
65339
65860
  attachmentFileList.value = [];
65340
- void vue.nextTick(() => {
65341
- scrollToBottom();
65342
- });
65343
- setTimeout(() => {
65344
- scrollToBottom();
65345
- }, SCROLL_DELAY);
65346
65861
  }
65347
65862
  }, SENDING_DELAY);
65348
65863
  }
@@ -65434,6 +65949,7 @@
65434
65949
  inputRef,
65435
65950
  inputValue,
65436
65951
  handleSendMessage,
65952
+ handleMessagesScroll,
65437
65953
  scrollToBottom
65438
65954
  };
65439
65955
  },
@@ -65443,7 +65959,8 @@
65443
65959
  Scrollbar,
65444
65960
  {
65445
65961
  ref: "messagesBodyRef",
65446
- class: `${mergedClsPrefixRef.value}-chat-main__body`
65962
+ class: `${mergedClsPrefixRef.value}-chat-main__body`,
65963
+ onScroll: this.handleMessagesScroll
65447
65964
  },
65448
65965
  {
65449
65966
  default: () => this.renderMessages()
@@ -65518,6 +66035,26 @@
65518
66035
  type: Object,
65519
66036
  default: void 0
65520
66037
  },
66038
+ headerShareButtonProps: {
66039
+ type: Object,
66040
+ default: void 0
66041
+ },
66042
+ headerProfileButtonProps: {
66043
+ type: Object,
66044
+ default: void 0
66045
+ },
66046
+ headerCloseButtonProps: {
66047
+ type: Object,
66048
+ default: void 0
66049
+ },
66050
+ headerShareIconProps: {
66051
+ type: Object,
66052
+ default: void 0
66053
+ },
66054
+ headerProfileIconProps: {
66055
+ type: Object,
66056
+ default: void 0
66057
+ },
65521
66058
  messageSenderAvatarProps: {
65522
66059
  type: Object,
65523
66060
  default: void 0
@@ -65566,6 +66103,14 @@
65566
66103
  type: String,
65567
66104
  default: void 0
65568
66105
  },
66106
+ shareButtonTooltip: {
66107
+ type: String,
66108
+ default: void 0
66109
+ },
66110
+ profileButtonTooltip: {
66111
+ type: String,
66112
+ default: void 0
66113
+ },
65569
66114
  unreadNotificationText: {
65570
66115
  type: String,
65571
66116
  default: void 0
@@ -65618,7 +66163,7 @@
65618
66163
  type: Function,
65619
66164
  default: void 0
65620
66165
  },
65621
- onLoadMoreChats: {
66166
+ onFooterInputChange: {
65622
66167
  type: Function,
65623
66168
  default: void 0
65624
66169
  },
@@ -65633,6 +66178,22 @@
65633
66178
  onSendError: {
65634
66179
  type: Function,
65635
66180
  default: void 0
66181
+ },
66182
+ onChatItemsScrollToTop: {
66183
+ type: Function,
66184
+ default: void 0
66185
+ },
66186
+ onChatItemsScrollToBottom: {
66187
+ type: Function,
66188
+ default: void 0
66189
+ },
66190
+ onMessagesScrollToTop: {
66191
+ type: Function,
66192
+ default: void 0
66193
+ },
66194
+ onMessagesScrollToBottom: {
66195
+ type: Function,
66196
+ default: void 0
65636
66197
  }
65637
66198
  };
65638
66199
  var Chat = vue.defineComponent({
@@ -65645,12 +66206,16 @@
65645
66206
  "attachment-upload",
65646
66207
  "mark-messages-read",
65647
66208
  "filter-change",
65648
- "load-more-chats",
66209
+ "footer-input-change",
65649
66210
  "network-error",
65650
66211
  "upload-error",
65651
- "send-error"
66212
+ "send-error",
66213
+ "chat-items-scroll-to-top",
66214
+ "chat-items-scroll-to-bottom",
66215
+ "messages-scroll-to-top",
66216
+ "messages-scroll-to-bottom"
65652
66217
  ],
65653
- setup(props, { slots, emit }) {
66218
+ setup(props, { slots, emit, expose }) {
65654
66219
  const { mergedClsPrefixRef } = useConfig(props);
65655
66220
  const themeRef = useTheme(
65656
66221
  "Chat",
@@ -65813,30 +66378,24 @@
65813
66378
  };
65814
66379
  const handleMessageRetry = (message) => {
65815
66380
  emit("message-retry", message);
65816
- props.onMessageRetry?.(message);
65817
66381
  };
65818
66382
  const markMessagesAsRead = (chatId) => {
65819
66383
  emit("mark-messages-read", chatId);
65820
66384
  };
65821
66385
  const handleFilterChange = (filter) => {
65822
66386
  emit("filter-change", filter);
65823
- props.onFilterChange?.(filter);
65824
66387
  };
65825
- const handleLoadMoreChats = (offset, limit) => {
65826
- emit("load-more-chats", { offset, limit });
65827
- props.onLoadMoreChats?.(offset, limit);
66388
+ const handleFooterInputChange = (value, chatId) => {
66389
+ emit("footer-input-change", value, chatId);
65828
66390
  };
65829
66391
  const handleNetworkError = (error) => {
65830
66392
  emit("network-error", error);
65831
- props.onNetworkError?.(error);
65832
66393
  };
65833
66394
  const handleUploadError = (error) => {
65834
66395
  emit("upload-error", error);
65835
- props.onUploadError?.(error);
65836
66396
  };
65837
66397
  const handleSendError = (error) => {
65838
66398
  emit("send-error", error);
65839
- props.onSendError?.(error);
65840
66399
  };
65841
66400
  const mergedInputPlaceholderRef = vue.computed(() => {
65842
66401
  const placeholder = props.footerInputProps?.placeholder;
@@ -65854,6 +66413,12 @@
65854
66413
  const mergedCloseButtonTextRef = vue.computed(
65855
66414
  () => props.closeButtonText ?? localeRef.value.closeButtonText
65856
66415
  );
66416
+ const mergedShareButtonTooltipRef = vue.computed(
66417
+ () => props.shareButtonTooltip ?? localeRef.value.shareButtonTooltip
66418
+ );
66419
+ const mergedProfileButtonTooltipRef = vue.computed(
66420
+ () => props.profileButtonTooltip ?? localeRef.value.profileButtonTooltip
66421
+ );
65857
66422
  const mergedUnreadNotificationTextRef = vue.computed(
65858
66423
  () => props.unreadNotificationText ?? localeRef.value.unreadNotificationText
65859
66424
  );
@@ -65877,6 +66442,11 @@
65877
66442
  emptyPropsRef: vue.toRef(props, "emptyProps"),
65878
66443
  headerButtonPropsRef: vue.toRef(props, "headerButtonProps"),
65879
66444
  headerIconPropsRef: vue.toRef(props, "headerIconProps"),
66445
+ headerShareButtonPropsRef: vue.toRef(props, "headerShareButtonProps"),
66446
+ headerProfileButtonPropsRef: vue.toRef(props, "headerProfileButtonProps"),
66447
+ headerCloseButtonPropsRef: vue.toRef(props, "headerCloseButtonProps"),
66448
+ headerShareIconPropsRef: vue.toRef(props, "headerShareIconProps"),
66449
+ headerProfileIconPropsRef: vue.toRef(props, "headerProfileIconProps"),
65880
66450
  messageSenderAvatarPropsRef: vue.toRef(props, "messageSenderAvatarProps"),
65881
66451
  messageUploadPropsRef: vue.toRef(props, "messageUploadProps"),
65882
66452
  messageButtonPropsRef: vue.toRef(props, "messageButtonProps"),
@@ -65889,6 +66459,8 @@
65889
66459
  retryTextRef: mergedRetryTextRef,
65890
66460
  typingTextRef: mergedTypingTextRef,
65891
66461
  closeButtonTextRef: mergedCloseButtonTextRef,
66462
+ shareButtonTooltipRef: mergedShareButtonTooltipRef,
66463
+ profileButtonTooltipRef: mergedProfileButtonTooltipRef,
65892
66464
  unreadNotificationTextRef: mergedUnreadNotificationTextRef,
65893
66465
  notificationsShownSetRef: notificationsShownSet,
65894
66466
  unreadCountsBeforeReadRef: unreadCountsBeforeRead,
@@ -65898,20 +66470,36 @@
65898
66470
  handleMessageRetry,
65899
66471
  markMessagesAsRead,
65900
66472
  handleFilterChange,
65901
- handleLoadMoreChats,
66473
+ handleFooterInputChange,
65902
66474
  handleNetworkError,
65903
66475
  handleUploadError,
65904
66476
  handleSendError,
65905
66477
  onChatClose: vue.toRef(props, "onChatClose"),
65906
66478
  onChatShare: vue.toRef(props, "onChatShare"),
65907
- onUserProfile: vue.toRef(props, "onUserProfile")
66479
+ onUserProfile: vue.toRef(props, "onUserProfile"),
66480
+ onChatItemsScrollToTop: vue.toRef(props, "onChatItemsScrollToTop"),
66481
+ onChatItemsScrollToBottom: vue.toRef(props, "onChatItemsScrollToBottom"),
66482
+ onMessagesScrollToTop: vue.toRef(props, "onMessagesScrollToTop"),
66483
+ onMessagesScrollToBottom: vue.toRef(props, "onMessagesScrollToBottom")
66484
+ });
66485
+ const mainAreaRef = vue.ref(null);
66486
+ const scrollToBottom = () => {
66487
+ mainAreaRef.value?.scrollToBottom();
66488
+ };
66489
+ const sendMessage = (content, attachments) => {
66490
+ handleMessageSend(content, attachments);
66491
+ };
66492
+ expose({
66493
+ scrollToBottom,
66494
+ sendMessage
65908
66495
  });
65909
66496
  return {
65910
66497
  mergedClsPrefix: mergedClsPrefixRef,
65911
66498
  mergedTheme: themeRef,
65912
66499
  cssVars: cssVarsRef,
65913
66500
  themeClass: themeClassHandle?.themeClass,
65914
- onRender: themeClassHandle?.onRender
66501
+ onRender: themeClassHandle?.onRender,
66502
+ mainAreaRef
65915
66503
  };
65916
66504
  },
65917
66505
  render() {
@@ -65936,7 +66524,7 @@
65936
66524
  sidebarHeaderActions: $slots.sidebarHeaderActions
65937
66525
  })
65938
66526
  ]), this.selectedChatId && resolveSlot($slots.default, () => [
65939
- /* @__PURE__ */ vue.h(ChatMainArea, null, {
66527
+ /* @__PURE__ */ vue.h(ChatMainArea, { ref: "mainAreaRef" }, {
65940
66528
  headerActions: $slots.headerActions
65941
66529
  })
65942
66530
  ]))
@@ -104853,6 +105441,7 @@
104853
105441
  default: void 0
104854
105442
  },
104855
105443
  clearable: Boolean,
105444
+ round: Boolean,
104856
105445
  updateValueOnClose: Boolean,
104857
105446
  defaultValue: [Number, Array],
104858
105447
  defaultFormattedValue: [String, Array],
@@ -104902,6 +105491,10 @@
104902
105491
  defaultCalendarStartTime: Number,
104903
105492
  defaultCalendarEndTime: Number,
104904
105493
  bindCalendarMonths: Boolean,
105494
+ triggerPreset: {
105495
+ type: String,
105496
+ default: "input"
105497
+ },
104905
105498
  "onUpdate:show": [Function, Array],
104906
105499
  onUpdateShow: [Function, Array],
104907
105500
  "onUpdate:formattedValue": [Function, Array],
@@ -105815,84 +106408,137 @@
105815
106408
  /* @__PURE__ */ vue.h(Binder, null, {
105816
106409
  default: () => [
105817
106410
  /* @__PURE__ */ vue.h(VTarget, null, {
105818
- default: () => this.isRange ? /* @__PURE__ */ vue.h(
105819
- UInput,
105820
- {
105821
- ref: "inputInstRef",
105822
- status: this.mergedStatus,
105823
- value: [this.displayStartTime, this.displayEndTime],
105824
- placeholder: [
105825
- this.localizedStartPlaceholder,
105826
- this.localizedEndPlaceholder
105827
- ],
105828
- textDecoration: [
105829
- this.isStartValueInvalid ? "line-through" : "",
105830
- this.isEndValueInvalid ? "line-through" : ""
105831
- ],
105832
- pair: true,
105833
- onUpdateValue: this.handleRangeUpdateValue,
105834
- theme: this.mergedTheme.peers.Input,
105835
- themeOverrides: this.mergedTheme.peerOverrides.Input,
105836
- internalForceFocus: this.mergedShow,
105837
- internalDeactivateOnEnter: true,
105838
- ...commonInputProps
105839
- },
105840
- {
105841
- separator: () => this.separator === void 0 ? resolveSlot($slots.separator, () => [
105842
- /* @__PURE__ */ vue.h(
105843
- UBaseIcon,
105844
- {
105845
- clsPrefix: mergedClsPrefix,
105846
- class: `${mergedClsPrefix}-date-picker-icon`
105847
- },
105848
- {
105849
- default: () => /* @__PURE__ */ vue.h(ToIcon, null)
105850
- }
105851
- )
105852
- ]) : this.separator,
105853
- [clearable ? "clear-icon-placeholder" : "suffix"]: () => resolveSlot($slots["date-icon"], () => [
105854
- /* @__PURE__ */ vue.h(
106411
+ default: () => {
106412
+ if ($slots.trigger) {
106413
+ return $slots.trigger({
106414
+ open: this.handleTriggerClick,
106415
+ value: this.displayTime || this.localizedPlacehoder
106416
+ });
106417
+ }
106418
+ if (this.triggerPreset === "select") {
106419
+ return /* @__PURE__ */ vue.h(
106420
+ UInternalSelection,
106421
+ {
106422
+ ref: "inputInstRef",
106423
+ selectedOption: this.displayTime ? {
106424
+ label: this.displayTime,
106425
+ value: this.displayTime
106426
+ } : null,
106427
+ round: this.round,
106428
+ status: this.mergedStatus,
106429
+ clsPrefix: mergedClsPrefix,
106430
+ bordered: this.mergedBordered,
106431
+ size: this.mergedSize,
106432
+ theme: this.mergedTheme.peers.Select,
106433
+ themeOverrides: this.mergedTheme.peerOverrides.Select,
106434
+ placeholder: this.localizedPlacehoder,
106435
+ active: this.mergedShow,
106436
+ clearable: this.clearable,
106437
+ disabled: this.mergedDisabled,
106438
+ onFocus: this.handleInputFocus,
106439
+ onBlur: this.handleInputBlur,
106440
+ onClick: this.handleTriggerClick,
106441
+ onClear: this.handleClear
106442
+ },
106443
+ {
106444
+ arrow: () => this.$slots.arrow?.()
106445
+ }
106446
+ );
106447
+ }
106448
+ if (this.triggerPreset === "button") {
106449
+ return /* @__PURE__ */ vue.h(
106450
+ Button,
106451
+ {
106452
+ round: this.round,
106453
+ size: this.mergedSize,
106454
+ theme: this.mergedTheme.peers.Button,
106455
+ themeOverrides: this.mergedTheme.peerOverrides.Button,
106456
+ onClick: this.handleTriggerClick
106457
+ },
106458
+ this.displayTime || this.localizedPlacehoder
106459
+ );
106460
+ }
106461
+ return this.isRange ? /* @__PURE__ */ vue.h(
106462
+ UInput,
106463
+ {
106464
+ ref: "inputInstRef",
106465
+ round: this.round,
106466
+ status: this.mergedStatus,
106467
+ value: [this.displayStartTime, this.displayEndTime],
106468
+ placeholder: [
106469
+ this.localizedStartPlaceholder,
106470
+ this.localizedEndPlaceholder
106471
+ ],
106472
+ textDecoration: [
106473
+ this.isStartValueInvalid ? "line-through" : "",
106474
+ this.isEndValueInvalid ? "line-through" : ""
106475
+ ],
106476
+ pair: true,
106477
+ onUpdateValue: this.handleRangeUpdateValue,
106478
+ theme: this.mergedTheme.peers.Input,
106479
+ themeOverrides: this.mergedTheme.peerOverrides.Input,
106480
+ internalForceFocus: this.mergedShow,
106481
+ internalDeactivateOnEnter: true,
106482
+ ...commonInputProps
106483
+ },
106484
+ {
106485
+ separator: () => this.separator === void 0 ? resolveSlot($slots.separator, () => [
106486
+ /* @__PURE__ */ vue.h(
106487
+ UBaseIcon,
106488
+ {
106489
+ clsPrefix: mergedClsPrefix,
106490
+ class: `${mergedClsPrefix}-date-picker-icon`
106491
+ },
106492
+ {
106493
+ default: () => /* @__PURE__ */ vue.h(ToIcon, null)
106494
+ }
106495
+ )
106496
+ ]) : this.separator,
106497
+ [clearable ? "clear-icon-placeholder" : "suffix"]: () => resolveSlot($slots["date-icon"], () => [
106498
+ /* @__PURE__ */ vue.h(
106499
+ UBaseIcon,
106500
+ {
106501
+ clsPrefix: mergedClsPrefix,
106502
+ class: `${mergedClsPrefix}-date-picker-icon`
106503
+ },
106504
+ {
106505
+ default: () => /* @__PURE__ */ vue.h(DateIcon, null)
106506
+ }
106507
+ )
106508
+ ])
106509
+ }
106510
+ ) : /* @__PURE__ */ vue.h(
106511
+ UInput,
106512
+ {
106513
+ ref: "inputInstRef",
106514
+ round: this.round,
106515
+ status: this.mergedStatus,
106516
+ value: this.displayTime,
106517
+ placeholder: this.localizedPlacehoder,
106518
+ textDecoration: this.isValueInvalid && !this.isRange ? "line-through" : "",
106519
+ onUpdateValue: this.handleSingleUpdateValue,
106520
+ theme: this.mergedTheme.peers.Input,
106521
+ themeOverrides: this.mergedTheme.peerOverrides.Input,
106522
+ internalForceFocus: this.mergedShow,
106523
+ internalDeactivateOnEnter: true,
106524
+ ...commonInputProps
106525
+ },
106526
+ {
106527
+ [clearable ? "clear-icon-placeholder" : "suffix"]: () => /* @__PURE__ */ vue.h(
105855
106528
  UBaseIcon,
105856
106529
  {
105857
106530
  clsPrefix: mergedClsPrefix,
105858
106531
  class: `${mergedClsPrefix}-date-picker-icon`
105859
106532
  },
105860
106533
  {
105861
- default: () => /* @__PURE__ */ vue.h(DateIcon, null)
106534
+ default: () => resolveSlot($slots["date-icon"], () => [
106535
+ /* @__PURE__ */ vue.h(DateIcon, null)
106536
+ ])
105862
106537
  }
105863
106538
  )
105864
- ])
105865
- }
105866
- ) : /* @__PURE__ */ vue.h(
105867
- UInput,
105868
- {
105869
- ref: "inputInstRef",
105870
- status: this.mergedStatus,
105871
- value: this.displayTime,
105872
- placeholder: this.localizedPlacehoder,
105873
- textDecoration: this.isValueInvalid && !this.isRange ? "line-through" : "",
105874
- onUpdateValue: this.handleSingleUpdateValue,
105875
- theme: this.mergedTheme.peers.Input,
105876
- themeOverrides: this.mergedTheme.peerOverrides.Input,
105877
- internalForceFocus: this.mergedShow,
105878
- internalDeactivateOnEnter: true,
105879
- ...commonInputProps
105880
- },
105881
- {
105882
- [clearable ? "clear-icon-placeholder" : "suffix"]: () => /* @__PURE__ */ vue.h(
105883
- UBaseIcon,
105884
- {
105885
- clsPrefix: mergedClsPrefix,
105886
- class: `${mergedClsPrefix}-date-picker-icon`
105887
- },
105888
- {
105889
- default: () => resolveSlot($slots["date-icon"], () => [
105890
- /* @__PURE__ */ vue.h(DateIcon, null)
105891
- ])
105892
- }
105893
- )
105894
- }
105895
- )
106539
+ }
106540
+ );
106541
+ }
105896
106542
  }),
105897
106543
  /* @__PURE__ */ vue.h(
105898
106544
  VFollower,
@@ -106041,6 +106687,14 @@
106041
106687
 
106042
106688
  const descriptionsProps = {
106043
106689
  ...useTheme.props,
106690
+ skeletonProps: {
106691
+ type: Object,
106692
+ default: () => ({
106693
+ width: "50%",
106694
+ height: "25px",
106695
+ round: true
106696
+ })
106697
+ },
106044
106698
  title: String,
106045
106699
  column: {
106046
106700
  type: Number,
@@ -106064,6 +106718,7 @@
106064
106718
  default: "medium"
106065
106719
  },
106066
106720
  bordered: Boolean,
106721
+ loadingSkeleton: Boolean,
106067
106722
  labelStyle: [Object, String],
106068
106723
  contentStyle: [Object, String]
106069
106724
  };
@@ -106158,6 +106813,8 @@
106158
106813
  labelAlign,
106159
106814
  size,
106160
106815
  bordered,
106816
+ loadingSkeleton,
106817
+ skeletonProps,
106161
106818
  title,
106162
106819
  cssVars,
106163
106820
  mergedClsPrefix,
@@ -106202,7 +106859,7 @@
106202
106859
  colspan: 1,
106203
106860
  style: labelStyle
106204
106861
  },
106205
- itemLabel
106862
+ loadingSkeleton ? /* @__PURE__ */ vue.h(UBaseSkeleton, { ...skeletonProps }) : itemLabel
106206
106863
  ),
106207
106864
  /* @__PURE__ */ vue.h(
106208
106865
  "td",
@@ -106211,7 +106868,7 @@
106211
106868
  colspan: isLastIteration ? (compitableColumn - memorizedSpan) * 2 + 1 : itemSpan * 2 - 1,
106212
106869
  style: contentStyle
106213
106870
  },
106214
- itemChildren
106871
+ loadingSkeleton ? /* @__PURE__ */ vue.h(UBaseSkeleton, { ...skeletonProps }) : itemChildren
106215
106872
  )
106216
106873
  );
106217
106874
  } else {
@@ -106228,7 +106885,7 @@
106228
106885
  class: `${mergedClsPrefix}-descriptions-table-content__label`,
106229
106886
  style: labelStyle
106230
106887
  },
106231
- [
106888
+ loadingSkeleton ? /* @__PURE__ */ vue.h(UBaseSkeleton, { ...skeletonProps }) : [
106232
106889
  ...itemLabel,
106233
106890
  separator && /* @__PURE__ */ vue.h("span", { class: `${mergedClsPrefix}-descriptions-separator` }, separator)
106234
106891
  ]
@@ -106239,7 +106896,7 @@
106239
106896
  class: `${mergedClsPrefix}-descriptions-table-content__content`,
106240
106897
  style: contentStyle
106241
106898
  },
106242
- itemChildren
106899
+ loadingSkeleton ? /* @__PURE__ */ vue.h(UBaseSkeleton, { ...skeletonProps }) : itemChildren
106243
106900
  )
106244
106901
  )
106245
106902
  );
@@ -106254,7 +106911,7 @@
106254
106911
  colspan,
106255
106912
  style: labelStyle
106256
106913
  },
106257
- itemLabel
106914
+ loadingSkeleton ? /* @__PURE__ */ vue.h(UBaseSkeleton, { ...skeletonProps }) : itemLabel
106258
106915
  )
106259
106916
  );
106260
106917
  state.secondRow.push(
@@ -106265,7 +106922,7 @@
106265
106922
  colspan,
106266
106923
  style: contentStyle
106267
106924
  },
106268
- itemChildren
106925
+ loadingSkeleton ? /* @__PURE__ */ vue.h(UBaseSkeleton, { ...skeletonProps }) : itemChildren
106269
106926
  )
106270
106927
  );
106271
106928
  }
@@ -112471,6 +113128,78 @@
112471
113128
  }
112472
113129
  });
112473
113130
 
113131
+ const infiniteScrollProps = {
113132
+ distance: {
113133
+ type: Number,
113134
+ default: 0
113135
+ },
113136
+ onLoad: Function,
113137
+ scrollbarProps: Object
113138
+ };
113139
+ var InfiniteScroll = vue.defineComponent({
113140
+ name: "InfiniteScroll",
113141
+ props: infiniteScrollProps,
113142
+ setup(props) {
113143
+ const scrollbarInstRef = vue.ref(null);
113144
+ let loading = false;
113145
+ const handleCheckBottom = async () => {
113146
+ const { value: scrollbarInst } = scrollbarInstRef;
113147
+ if (scrollbarInst) {
113148
+ const { containerRef } = scrollbarInst;
113149
+ const scrollHeight = containerRef?.scrollHeight;
113150
+ const clientHeight = containerRef?.clientHeight;
113151
+ const scrollTop = containerRef?.scrollTop;
113152
+ if (containerRef && scrollHeight !== void 0 && clientHeight !== void 0 && scrollTop !== void 0) {
113153
+ if (scrollTop + clientHeight >= scrollHeight - props.distance) {
113154
+ loading = true;
113155
+ try {
113156
+ await props.onLoad?.();
113157
+ } catch {
113158
+ }
113159
+ loading = false;
113160
+ }
113161
+ }
113162
+ }
113163
+ };
113164
+ const handleScroll = () => {
113165
+ if (loading) {
113166
+ return;
113167
+ }
113168
+ void handleCheckBottom();
113169
+ };
113170
+ const handleWheel = (e) => {
113171
+ if (e.deltaY <= 0) {
113172
+ return;
113173
+ }
113174
+ if (loading) {
113175
+ return;
113176
+ }
113177
+ void handleCheckBottom();
113178
+ };
113179
+ return {
113180
+ scrollbarInstRef,
113181
+ handleScroll,
113182
+ handleWheel
113183
+ };
113184
+ },
113185
+ render() {
113186
+ return /* @__PURE__ */ vue.h(
113187
+ XScrollbar,
113188
+ {
113189
+ ...this.scrollbarProps,
113190
+ ref: "scrollbarInstRef",
113191
+ onWheel: this.handleWheel,
113192
+ onScroll: this.handleScroll
113193
+ },
113194
+ {
113195
+ default: () => {
113196
+ return resolveSlot(this.$slots.default, () => []);
113197
+ }
113198
+ }
113199
+ );
113200
+ }
113201
+ });
113202
+
112474
113203
  function parse(value) {
112475
113204
  if (value === void 0 || value === null || typeof value === "string" && value.trim() === "") {
112476
113205
  return null;
@@ -128862,6 +129591,134 @@
128862
129591
  }
128863
129592
  });
128864
129593
 
129594
+ const virtualListProps = {
129595
+ scrollbarProps: Object,
129596
+ items: {
129597
+ type: Array,
129598
+ default: () => []
129599
+ },
129600
+ itemSize: {
129601
+ type: Number,
129602
+ required: true
129603
+ },
129604
+ itemResizable: Boolean,
129605
+ itemsStyle: [String, Object],
129606
+ visibleItemsTag: {
129607
+ type: [String, Object],
129608
+ default: "div"
129609
+ },
129610
+ visibleItemsProps: Object,
129611
+ ignoreItemResize: Boolean,
129612
+ onScroll: Function,
129613
+ onWheel: Function,
129614
+ onResize: Function,
129615
+ defaultScrollKey: [Number, String],
129616
+ defaultScrollIndex: Number,
129617
+ keyField: {
129618
+ type: String,
129619
+ default: "key"
129620
+ },
129621
+ paddingTop: {
129622
+ type: [Number, String],
129623
+ default: 0
129624
+ },
129625
+ paddingBottom: {
129626
+ type: [Number, String],
129627
+ default: 0
129628
+ }
129629
+ };
129630
+ var VirtualList = vue.defineComponent({
129631
+ name: "VirtualList",
129632
+ props: virtualListProps,
129633
+ setup(props) {
129634
+ const scrollbarInstRef = vue.ref(null);
129635
+ const virtualListInstRef = vue.ref(null);
129636
+ function syncScrollbar() {
129637
+ const { value: scrollbarInst } = scrollbarInstRef;
129638
+ if (scrollbarInst) {
129639
+ scrollbarInst.sync();
129640
+ }
129641
+ }
129642
+ function handleScroll(e) {
129643
+ syncScrollbar();
129644
+ props.onScroll?.(e);
129645
+ }
129646
+ function handleResize(e) {
129647
+ syncScrollbar();
129648
+ props.onResize?.(e);
129649
+ }
129650
+ function handleWheel(e) {
129651
+ props.onWheel?.(e);
129652
+ }
129653
+ function scrollTo(options, y) {
129654
+ if (typeof options === "number") {
129655
+ virtualListInstRef.value?.scrollTo(options, y ?? 0);
129656
+ } else {
129657
+ virtualListInstRef.value?.scrollTo(options);
129658
+ }
129659
+ }
129660
+ function getScrollContainer() {
129661
+ return virtualListInstRef.value?.listElRef;
129662
+ }
129663
+ function getScrollContent() {
129664
+ return virtualListInstRef.value?.itemsElRef;
129665
+ }
129666
+ return {
129667
+ scrollTo,
129668
+ scrollbarInstRef,
129669
+ virtualListInstRef,
129670
+ getScrollContainer,
129671
+ getScrollContent,
129672
+ handleScroll,
129673
+ handleResize,
129674
+ handleWheel
129675
+ };
129676
+ },
129677
+ render() {
129678
+ return /* @__PURE__ */ vue.h(
129679
+ XScrollbar,
129680
+ {
129681
+ ...this.scrollbarProps,
129682
+ ref: "scrollbarInstRef",
129683
+ container: this.getScrollContainer,
129684
+ content: this.getScrollContent
129685
+ },
129686
+ {
129687
+ default: () => {
129688
+ return /* @__PURE__ */ vue.h(
129689
+ VVirtualList,
129690
+ {
129691
+ ref: "virtualListInstRef",
129692
+ showScrollbar: false,
129693
+ items: this.items,
129694
+ itemSize: this.itemSize,
129695
+ itemResizable: this.itemResizable,
129696
+ itemsStyle: this.itemsStyle,
129697
+ visibleItemsTag: this.visibleItemsTag,
129698
+ visibleItemsProps: this.visibleItemsProps,
129699
+ ignoreItemResize: this.ignoreItemResize,
129700
+ keyField: this.keyField,
129701
+ defaultScrollKey: this.defaultScrollKey,
129702
+ defaultScrollIndex: this.defaultScrollIndex,
129703
+ paddingTop: this.paddingTop,
129704
+ paddingBottom: this.paddingBottom,
129705
+ onScroll: this.handleScroll,
129706
+ onResize: this.handleResize,
129707
+ onWheel: this.handleWheel
129708
+ },
129709
+ {
129710
+ default: ({
129711
+ item,
129712
+ index
129713
+ }) => this.$slots.default?.({ item, index })
129714
+ }
129715
+ );
129716
+ }
129717
+ }
129718
+ );
129719
+ }
129720
+ });
129721
+
128865
129722
  var style$1 = c$1([cB("watermark-container", `
128866
129723
  position: relative;
128867
129724
  `, [cNotM("selectable", `
@@ -129535,6 +130392,7 @@
129535
130392
  MessageStatus: MessageStatus,
129536
130393
  NA: a,
129537
130394
  NP: p,
130395
+ NVirtualList: VirtualList,
129538
130396
  UActionCard: ActionCard,
129539
130397
  UAffix: UAffix,
129540
130398
  UAlert: Alert,
@@ -129609,6 +130467,7 @@
129609
130467
  UIconWrapper: UIconWrapper,
129610
130468
  UImage: Image$1,
129611
130469
  UImageGroup: UImageGroup,
130470
+ UInfiniteScroll: InfiniteScroll,
129612
130471
  UInput: UInput,
129613
130472
  UInputGroup: UInputGroup,
129614
130473
  UInputGroupLabel: InputGroupLabel,
@@ -129752,6 +130611,7 @@
129752
130611
  iconWrapperProps: iconWrapperProps,
129753
130612
  imageGroupProps: imageGroupProps,
129754
130613
  imageProps: imageProps,
130614
+ infiniteScrollProps: infiniteScrollProps,
129755
130615
  inputGroupLabelProps: inputGroupLabelProps,
129756
130616
  inputGroupProps: inputGroupProps,
129757
130617
  inputNumberProps: inputNumberProps,
@@ -129820,10 +130680,11 @@
129820
130680
  useLoadingBar: useLoadingBar,
129821
130681
  useMessage: useMessage,
129822
130682
  useNotification: useNotification,
130683
+ virtualListProps: virtualListProps,
129823
130684
  watermarkProps: watermarkProps
129824
130685
  });
129825
130686
 
129826
- var version = "1.8.2";
130687
+ var version = "1.9.1";
129827
130688
 
129828
130689
  function create({
129829
130690
  componentPrefix = "U",
@@ -130633,6 +131494,7 @@
130633
131494
  exports.MessageStatus = MessageStatus;
130634
131495
  exports.NA = a;
130635
131496
  exports.NP = p;
131497
+ exports.NVirtualList = VirtualList;
130636
131498
  exports.UActionCard = ActionCard;
130637
131499
  exports.UAffix = UAffix;
130638
131500
  exports.UAlert = Alert;
@@ -130707,6 +131569,7 @@
130707
131569
  exports.UIconWrapper = UIconWrapper;
130708
131570
  exports.UImage = Image$1;
130709
131571
  exports.UImageGroup = UImageGroup;
131572
+ exports.UInfiniteScroll = InfiniteScroll;
130710
131573
  exports.UInput = UInput;
130711
131574
  exports.UInputGroup = UInputGroup;
130712
131575
  exports.UInputGroupLabel = InputGroupLabel;
@@ -130927,6 +131790,7 @@
130927
131790
  exports.idID = idID;
130928
131791
  exports.imageGroupProps = imageGroupProps;
130929
131792
  exports.imageProps = imageProps;
131793
+ exports.infiniteScrollProps = infiniteScrollProps;
130930
131794
  exports.inputDark = inputDark;
130931
131795
  exports.inputGroupLabelProps = inputGroupLabelProps;
130932
131796
  exports.inputGroupProps = inputGroupProps;
@@ -131087,6 +131951,7 @@
131087
131951
  exports.useThemeVars = useThemeVars;
131088
131952
  exports.version = version;
131089
131953
  exports.viVN = viVN;
131954
+ exports.virtualListProps = virtualListProps;
131090
131955
  exports.watermarkDark = watermarkDark;
131091
131956
  exports.watermarkProps = watermarkProps;
131092
131957
  exports.zhCN = zhCN;