@astryx-vue/core 0.13.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/dist/AlertDialog/index.js +1 -1
  2. package/dist/{AlertDialog-CsdgJDLK.js → AlertDialog-BH74lTP9.js} +4 -4
  3. package/dist/AppShell/index.js +1 -1
  4. package/dist/{AppShell-CE5Up5SI.js → AppShell-CBhuHXh4.js} +1 -1
  5. package/dist/Avatar/index.js +1 -1
  6. package/dist/{Avatar-D5CFSkAG.js → Avatar-B-dg3imS.js} +1 -1
  7. package/dist/AvatarGroup/index.d.ts +1 -1
  8. package/dist/Banner/index.d.ts +1 -1
  9. package/dist/Banner/index.js +1 -1
  10. package/dist/{Banner-B4IEG4Fx.js → Banner-qEMqg2D8.js} +1 -1
  11. package/dist/BottomSheet/index.d.ts +1 -1
  12. package/dist/BottomSheet/index.js +2 -2
  13. package/dist/{BottomSheet-D67lQ3Lo.js → BottomSheet-BTf3rz65.js} +3 -3
  14. package/dist/{BottomSheet-UctSPL-g.js → BottomSheet-BvdEUioy.js} +3 -3
  15. package/dist/Breadcrumbs/index.js +1 -1
  16. package/dist/{Breadcrumbs-By21sIml.js → Breadcrumbs-BAyIQaP-.js} +1 -1
  17. package/dist/Button/index.js +1 -1
  18. package/dist/{Button-CfbR2oPc.js → Button-47s3ZBYa.js} +2 -2
  19. package/dist/ButtonGroup/index.d.ts +1 -1
  20. package/dist/Calendar/index.d.ts +1 -1
  21. package/dist/Calendar/index.js +1 -1
  22. package/dist/{Calendar-DwFAzDky.js → Calendar-D029GXOJ.js} +1 -1
  23. package/dist/Carousel/index.d.ts +1 -1
  24. package/dist/Carousel/index.js +1 -1
  25. package/dist/{Carousel-mL_KdBMw.js → Carousel-CYjVpChx.js} +1 -1
  26. package/dist/Center/index.d.ts +1 -1
  27. package/dist/Chat/index.d.ts +1 -1
  28. package/dist/Chat/index.js +1 -1
  29. package/dist/{Chat-C10BQlIl.js → Chat-BfekV9OQ.js} +5 -5
  30. package/dist/CheckboxInput/index.d.ts +1 -1
  31. package/dist/CheckboxInput/index.js +1 -1
  32. package/dist/{CheckboxInput-BGqRMoEA.js → CheckboxInput-Cr0qhZpZ.js} +2 -2
  33. package/dist/CheckboxList/index.d.ts +1 -1
  34. package/dist/CheckboxList/index.js +1 -1
  35. package/dist/{CheckboxList-DbMhC06M.js → CheckboxList-DOAdqkXD.js} +4 -4
  36. package/dist/ClickableCard/index.d.ts +1 -1
  37. package/dist/Code/index.js +1 -1
  38. package/dist/{CodeBlock-DAlWY51H.js → CodeBlock-CuNiGAhQ.js} +1 -1
  39. package/dist/CommandPalette/index.js +1 -1
  40. package/dist/{CommandPalette-DYk_FyFB.js → CommandPalette-ChtGNWy3.js} +1 -1
  41. package/dist/ComplexSelector/index.js +1 -1
  42. package/dist/{ComplexSelector-NDpRucQB.js → ComplexSelector-TPRMIDgt.js} +3 -3
  43. package/dist/ContextMenu/index.d.ts +1 -1
  44. package/dist/ContextMenu/index.js +1 -1
  45. package/dist/{ContextMenu-JDU4HDKm.js → ContextMenu-DYKU1mJT.js} +5 -5
  46. package/dist/DateInput/index.d.ts +2 -2
  47. package/dist/DateInput/index.js +1 -1
  48. package/dist/{DateInput-DVEb1-fM.js → DateInput-iQQLaYlp.js} +562 -123
  49. package/dist/DateRangeInput/index.d.ts +1 -1
  50. package/dist/DateRangeInput/index.js +1 -1
  51. package/dist/{DateRangeInput-OuAz80nR.js → DateRangeInput-BTYlRhmn.js} +14 -11
  52. package/dist/DateTimeInput/index.d.ts +1 -1
  53. package/dist/DateTimeInput/index.js +1 -1
  54. package/dist/{DateTimeInput-J5CFTSSa.js → DateTimeInput-CiUKgoVy.js} +19 -11
  55. package/dist/Dialog/index.d.ts +1 -1
  56. package/dist/Dialog/index.js +3 -3
  57. package/dist/{Dialog-C0WuGDqP.js → Dialog-D54oHAxr.js} +3 -3
  58. package/dist/{Dialog-Cm8CXGpI.js → Dialog-DeHVvhL3.js} +1 -1
  59. package/dist/{DialogHeader-BD2Ezw4F.js → DialogHeader-B6ZIBIC4.js} +2 -2
  60. package/dist/Drawer/index.d.ts +1 -1
  61. package/dist/Drawer/index.js +1 -1
  62. package/dist/{Drawer-CFpcRHt7.js → Drawer-fB3IoD5P.js} +2 -2
  63. package/dist/DropdownMenu/index.js +2 -2
  64. package/dist/{DropdownMenu-2QRvY0aP.js → DropdownMenu-ClBIeBwM.js} +6 -6
  65. package/dist/{DropdownMenu-5Mn01A-5.js → DropdownMenu-D5fBg5Cc.js} +3 -3
  66. package/dist/EmptyState/index.js +1 -1
  67. package/dist/{EmptyState-CqUTEnGg.js → EmptyState-BS8ESteS.js} +2 -2
  68. package/dist/Field/index.js +3 -3
  69. package/dist/{Field-Cw8J8ld7.js → Field-Dxacpe9d.js} +2 -2
  70. package/dist/{FieldInfoTip-D7UNDNje.js → FieldInfoTip-DS4OAl2Q.js} +1 -1
  71. package/dist/{FieldLabel-CJbiefUx.js → FieldLabel-DjzTYhCM.js} +2 -2
  72. package/dist/FileInput/index.d.ts +1 -1
  73. package/dist/FileInput/index.js +1 -1
  74. package/dist/{FileInput-CgfiwVfs.js → FileInput-Dak2gIXU.js} +3 -3
  75. package/dist/FormLayout/index.d.ts +2 -2
  76. package/dist/FormLayout/index.js +1 -1
  77. package/dist/{FormLayout-B9dUB6Ps.js → FormLayout-CGJVeNsL.js} +5 -3
  78. package/dist/Heading/index.js +1 -1
  79. package/dist/{Heading-BO9n2vLl.js → Heading-BYB7QXkT.js} +1 -1
  80. package/dist/HoverCard/index.d.ts +1 -1
  81. package/dist/HoverCard/index.js +1 -1
  82. package/dist/{HoverCard-47J_i9AH.js → HoverCard-CtDr234t.js} +4 -4
  83. package/dist/IconButton/index.js +1 -1
  84. package/dist/{IconButton-DiDHiGbo.js → IconButton-DvgueAEp.js} +1 -1
  85. package/dist/InfoTip/index.d.ts +1 -1
  86. package/dist/InfoTip/index.js +1 -1
  87. package/dist/{InfoTip-ClRC1Hh9.js → InfoTip-DshbO5eW.js} +1 -1
  88. package/dist/{InputClearButton-DL4RM5z1.js → InputClearButton-DEb-bGsY.js} +1 -1
  89. package/dist/InputGroup/index.js +1 -1
  90. package/dist/{InputGroup-JMOrdsmu.js → InputGroup-DLu11Lsd.js} +1 -1
  91. package/dist/InternationalizationProvider/index.d.ts +1 -1
  92. package/dist/InternationalizationProvider/index.js +1 -1
  93. package/dist/{InternationalizationProvider-BYU2MRtX.js → InternationalizationProvider-CqCxB9ku.js} +1 -1
  94. package/dist/{LayerContentBoundary-CeebKoPB.js → LayerContentBoundary-Cx5xXZzg.js} +1 -1
  95. package/dist/Layout/index.d.ts +1 -1
  96. package/dist/Lightbox/index.js +1 -1
  97. package/dist/{Lightbox-kKjxYZ05.js → Lightbox-BbeuDbgd.js} +3 -3
  98. package/dist/Link/index.d.ts +1 -1
  99. package/dist/Link/index.js +1 -1
  100. package/dist/{Link-CkbAlJ3-.js → Link-CFxZ9W2X.js} +1 -1
  101. package/dist/List/index.d.ts +1 -1
  102. package/dist/Markdown/index.js +1 -1
  103. package/dist/{Markdown-DXRFVNJd.js → Markdown-DTqTIKbq.js} +3 -3
  104. package/dist/MobileNav/index.js +1 -1
  105. package/dist/{MobileNavToggle-DUtvvHc7.js → MobileNavToggle-pwkvRFW-.js} +3 -3
  106. package/dist/MoreMenu/index.d.ts +1 -1
  107. package/dist/MoreMenu/index.js +1 -1
  108. package/dist/{MoreMenu-CEJ9E2eD.js → MoreMenu-BY1t1_QA.js} +4 -4
  109. package/dist/MultiSelector/index.d.ts +1 -1
  110. package/dist/MultiSelector/index.js +1 -1
  111. package/dist/{MultiSelector-DgWCWpnM.js → MultiSelector-BgGEzXiX.js} +8 -7
  112. package/dist/{NavDisclosure-Bf5OFtwv.js → NavDisclosure-mXBWmRDC.js} +1 -1
  113. package/dist/{NavHeadingSurface-D5MpO-gO.js → NavHeadingSurface-foJo5bLT.js} +1 -1
  114. package/dist/NavMenu/index.js +3 -3
  115. package/dist/{NavMenu-BcmUfk7z.js → NavMenu-CG9Bthba.js} +2 -2
  116. package/dist/{NavMenuItem-C9xk9KZk.js → NavMenuItem-BiFZUPxC.js} +1 -1
  117. package/dist/NumberInput/index.d.ts +1 -1
  118. package/dist/NumberInput/index.js +1 -1
  119. package/dist/{NumberInput-DNcE_HLD.js → NumberInput-BDNiEgzf.js} +5 -5
  120. package/dist/OverflowList/index.d.ts +1 -1
  121. package/dist/OverflowList/index.js +1 -1
  122. package/dist/{OverflowList-CeQT7MBd.js → OverflowList-CR96Nr5t.js} +2 -2
  123. package/dist/Overlay/index.d.ts +1 -1
  124. package/dist/Pagination/index.d.ts +1 -1
  125. package/dist/Pagination/index.js +1 -1
  126. package/dist/{Pagination-DJGQe6wH.js → Pagination-40BEwZOo.js} +1 -1
  127. package/dist/{PickerWheel-CSwUYfes.js → PickerWheel-DNX3yrUd.js} +21 -8
  128. package/dist/Popover/index.js +1 -1
  129. package/dist/{Popover-C68nCirC.js → Popover-BUiTyOcY.js} +6 -6
  130. package/dist/PowerSearch/index.d.ts +1 -1
  131. package/dist/PowerSearch/index.js +1 -1
  132. package/dist/{PowerSearch-C6lkutch.js → PowerSearch-BLJd0NKp.js} +18 -18
  133. package/dist/ProgressBar/index.js +1 -1
  134. package/dist/{ProgressBar-MaDhabCm.js → ProgressBar-sGSCEtHC.js} +1 -1
  135. package/dist/Radio/index.d.ts +1 -1
  136. package/dist/Radio/index.js +1 -1
  137. package/dist/{RadioGroup-CLQLK_V7.js → RadioGroup-D58Fy-bM.js} +3 -3
  138. package/dist/RadioList/index.d.ts +1 -1
  139. package/dist/RadioList/index.js +1 -1
  140. package/dist/{RadioList-DfHTyqIQ.js → RadioList-u9PoRBXY.js} +1 -1
  141. package/dist/Resizable/index.d.ts +1 -1
  142. package/dist/ScrollableArea/index.d.ts +1 -1
  143. package/dist/SelectableCard/index.d.ts +1 -1
  144. package/dist/Selector/index.d.ts +1 -1
  145. package/dist/Selector/index.js +1 -1
  146. package/dist/{Selector-CPCoJ7Sb.js → Selector-QHLh7g_K.js} +7 -6
  147. package/dist/SideNav/index.d.ts +1 -1
  148. package/dist/SideNav/index.js +1 -1
  149. package/dist/{SideNav-CV8MKVL-.js → SideNav-BgmpUELq.js} +5 -5
  150. package/dist/Slider/index.js +1 -1
  151. package/dist/{Slider-CHJ1CESd.js → Slider-Depy9L-Y.js} +2 -2
  152. package/dist/StatusDot/index.js +1 -1
  153. package/dist/{StatusDot-CGaRrl39.js → StatusDot-D0Wy2ggp.js} +1 -1
  154. package/dist/Stepper/index.d.ts +1 -1
  155. package/dist/Switch/index.d.ts +1 -1
  156. package/dist/Switch/index.js +1 -1
  157. package/dist/{Switch-Bx9ezhrN.js → Switch-dD4OQLkI.js} +2 -2
  158. package/dist/TabList/index.d.ts +1 -1
  159. package/dist/TabList/index.js +1 -1
  160. package/dist/{TabList-o4t9vWvl.js → TabList-CoiyQidC.js} +1 -1
  161. package/dist/Table/index.d.ts +3 -3
  162. package/dist/Table/index.js +2 -2
  163. package/dist/{Table-CO2cYE8r.js → Table-CIMUux6b.js} +1335 -219
  164. package/dist/Text/index.js +1 -1
  165. package/dist/{Text-C6SB2hHJ.js → Text-BWSmB93V.js} +1 -1
  166. package/dist/TextArea/index.d.ts +1 -1
  167. package/dist/TextArea/index.js +1 -1
  168. package/dist/{TextArea-DVaDS_1K.js → TextArea-CbY2w_ic.js} +6 -6
  169. package/dist/TextInput/index.d.ts +1 -1
  170. package/dist/TextInput/index.js +1 -1
  171. package/dist/{TextInput-Dylfzj33.js → TextInput-C8f89GV8.js} +6 -6
  172. package/dist/Thumbnail/index.js +1 -1
  173. package/dist/{Thumbnail-BTQAYnWi.js → Thumbnail-DENhXd9-.js} +2 -2
  174. package/dist/{TimeField-B3JGgLuf.js → TimeField-Bzq72Me_.js} +8 -8
  175. package/dist/TimeInput/index.d.ts +1 -1
  176. package/dist/TimeInput/index.js +1 -1
  177. package/dist/{TimeInput-Dmy6PxaD.js → TimeInput-D-bRCUzU.js} +3 -3
  178. package/dist/Timer/index.js +1 -1
  179. package/dist/{Timer-CN5BmaFS.js → Timer-CgBSMr9E.js} +1 -1
  180. package/dist/Timestamp/index.d.ts +1 -1
  181. package/dist/Timestamp/index.js +1 -1
  182. package/dist/{Timestamp-B7UcCEo2.js → Timestamp-B-VgG6l8.js} +3 -3
  183. package/dist/Toast/index.js +1 -1
  184. package/dist/{Toast-DCipbbCW.js → Toast-CRSZV9K-.js} +1 -1
  185. package/dist/ToggleButton/index.d.ts +1 -1
  186. package/dist/ToggleButton/index.js +1 -1
  187. package/dist/{ToggleButton-C78lrcdr.js → ToggleButton-Bm5IQUy5.js} +1 -1
  188. package/dist/Token/index.d.ts +1 -1
  189. package/dist/Tokenizer/index.js +1 -1
  190. package/dist/{Tokenizer-D7B1ff3O.js → Tokenizer-DmjNQLDl.js} +6 -6
  191. package/dist/Toolbar/index.d.ts +2 -2
  192. package/dist/Tooltip/index.d.ts +1 -1
  193. package/dist/Tooltip/index.js +2 -2
  194. package/dist/{Tooltip-kQPfj3SE.js → Tooltip-BwrJVZ8X.js} +1 -1
  195. package/dist/TopNav/index.d.ts +1 -1
  196. package/dist/TopNav/index.js +1 -1
  197. package/dist/{TopNav-AGY785QI.js → TopNav-FiszUHkM.js} +4 -4
  198. package/dist/Typeahead/index.js +2 -2
  199. package/dist/{Typeahead-QWYeVsel.js → Typeahead-LdmEDCOU.js} +6 -6
  200. package/dist/busyAnnouncement-D3eGqdsf.js +88 -0
  201. package/dist/composables/index.d.ts +2 -2
  202. package/dist/composables/index.js +11 -11
  203. package/dist/{composables-CyKB3F8u.js → composables-Bi0Rt0Uj.js} +2 -2
  204. package/dist/{context-Cfml4jaK.js → context-DsNhYm5O.js} +6 -1
  205. package/dist/{date-input-CiEBtStM.js → date-input-rUD8YAow.js} +4 -0
  206. package/dist/{utils-BOmFijPc.js → dateParser-DS_a8Ej8.js} +1 -329
  207. package/dist/{fieldParts-CDOlBdy6.js → fieldParts-CbWvZLhH.js} +1 -1
  208. package/dist/{format-CiN0Dt_H.js → format-CMHyAMn3.js} +28 -1
  209. package/dist/{index-Cun6cXGP.d.ts → index--tm6L1ot.d.ts} +1 -1
  210. package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
  211. package/dist/{index-D7YRtteD.d.ts → index-BHYhTZzp.d.ts} +1 -1
  212. package/dist/{index-ZbNwGVkS.d.ts → index-BKnyTWPM.d.ts} +1 -1
  213. package/dist/{index-Bl_K_cRv.d.ts → index-BL4mH8aK.d.ts} +2 -2
  214. package/dist/{index-9YGUb_Ht.d.ts → index-BlGEkjh5.d.ts} +3 -3
  215. package/dist/{index-Dlq0cFK-.d.ts → index-C5e2rZML.d.ts} +1 -1
  216. package/dist/{index-BOCb89V9.d.ts → index-CP-fJFcJ.d.ts} +3 -3
  217. package/dist/{index-CVs4A2QU.d.ts → index-Cf5j7Cjl.d.ts} +2 -1
  218. package/dist/{index-BWaO4-T-.d.ts → index-D-eT_nvf.d.ts} +125 -32
  219. package/dist/{index-FeZXsFO-.d.ts → index-DDrL_-hJ.d.ts} +1 -1
  220. package/dist/{index-s0Ezq3U-.d.ts → index-DPH5yoAr.d.ts} +2 -2
  221. package/dist/{index-DPhQZXYw.d.ts → index-DYabo8TI.d.ts} +1 -1
  222. package/dist/{index-C90l2rH1.d.ts → index-DcisK4t8.d.ts} +11 -1
  223. package/dist/{index-BpprL2SN.d.ts → index-DfdtDWSP.d.ts} +5 -1
  224. package/dist/{index-B-3EGjfQ.d.ts → index-Q1oG9yIT.d.ts} +2 -2
  225. package/dist/{index-CREW8ZiL.d.ts → index-bwNMoZo_.d.ts} +3 -3
  226. package/dist/{index-CcYSAva-.d.ts → index-fd--aE4B.d.ts} +1 -1
  227. package/dist/{index-Dep8pgnU.d.ts → index-qbj0Lj9a.d.ts} +4 -4
  228. package/dist/{index-bgjrSSaT.d.ts → index-rnFsCdJ7.d.ts} +2 -2
  229. package/dist/{index-CfoExOY_.d.ts → index-rzkX36wM.d.ts} +1 -1
  230. package/dist/index.d.ts +26 -26
  231. package/dist/index.js +95 -93
  232. package/dist/{layerDepth-BU_55vPr.js → layerDepth-I6d28O4d.js} +5 -2
  233. package/dist/{layerFocusReturn-DWGkSHXj.js → layerFocusReturn-_pBrNAPE.js} +1 -1
  234. package/dist/{loadCatalog-Kp7aQZpL.d.ts → loadCatalog-Cvf-xgDD.d.ts} +34 -27
  235. package/dist/{loadCatalog-BtQRPyzj.js → loadCatalog-DYuZZRtf.js} +1 -1
  236. package/dist/locale/index.d.ts +2 -2
  237. package/dist/locale/index.js +4 -4
  238. package/dist/{locale-DET_YkFW.js → locale-B-DrJCMs.js} +1 -1
  239. package/dist/{selectorEscape-LkWoVYQN.js → selectorEscape-FjiU_5WC.js} +3 -16
  240. package/dist/{stillPointerGate-BZ7KMJOB.js → stillPointerGate-DlAU_J_M.js} +1 -1
  241. package/dist/timeParser-D9tCF_b3.js +203 -0
  242. package/dist/{useDismiss-74dLMi5S.js → useDismiss-21Gk7uWk.js} +1 -1
  243. package/dist/{useFocusTrap-CyooA0OC.js → useFocusTrap-CnKnSN99.js} +16 -2
  244. package/dist/{useHoverLayerDismiss-B1W5qIBx.js → useHoverLayerDismiss-Chfty2wT.js} +1 -1
  245. package/dist/{useInputStatusIcon-ZqCxDNTj.js → useInputStatusIcon-Yd0hvw5K.js} +1 -1
  246. package/dist/{useLayer-BnjrJ85F.js → useLayer-vK4-yRk_.js} +1 -1
  247. package/dist/{useMenuPress-BWq7kwWm.js → useMenuPress-9vsHzbRX.js} +1 -1
  248. package/dist/{useResizable-DziUYD5W.d.ts → useResizable-CJd4JkbJ.d.ts} +30 -1
  249. package/dist/{useResizable-De4Xp3TD.js → useResizable-DYlc06-H.js} +1 -1
  250. package/dist/{useRestoreFocus-CSrI8x7v.js → useRestoreFocus-Do8y6Yy4.js} +1 -1
  251. package/dist/useTimeValue-_XW9g2V1.js +52 -0
  252. package/dist/{useTooltip-uc-VLZ8I.js → useTooltip-DIg3ZE9P.js} +4 -4
  253. package/dist/{useTouchTriggerInternal-b-txblws.js → useTouchTriggerInternal-CrLW-7kT.js} +1 -1
  254. package/dist/{useTruncationTooltip-BVMCoNno.js → useTruncationTooltip-D9_lzxpF.js} +2 -2
  255. package/dist/{useTypeahead-BWj3xhbR.js → useTypeahead-CiLt-yEg.js} +1 -1
  256. package/dist/{useTypeaheadAnnouncement-DVkdWTWy.js → useTypeaheadAnnouncement-C59m2nSx.js} +1 -1
  257. package/dist/utils/index.js +3 -1
  258. package/dist/utils-BW62BpDR.js +135 -0
  259. package/package.json +1 -1
  260. package/styles/card.css +3 -0
  261. package/styles/date-input.css +45 -3
  262. package/styles/date-range-input.css +7 -0
  263. package/styles/table.css +44 -1
  264. package/styles/time-input.css +7 -0
  265. package/dist/useTimeValue-BJd0xBhG.js +0 -95
  266. package/dist/{index-J6YRJ7Ul.d.ts → index-BqhgeAT4.d.ts} +1 -1
@@ -1,25 +1,26 @@
1
1
  import { t as _sfc_main$16 } from "./Icon-BCHo7W0x.js";
2
- import { i as _sfc_main$18, r as useCutTextOnKeyboardFocus, t as _sfc_main$17 } from "./Button-CfbR2oPc.js";
2
+ import { i as _sfc_main$18, r as useCutTextOnKeyboardFocus, t as _sfc_main$17 } from "./Button-47s3ZBYa.js";
3
3
  import { n as useLayerTeleportTarget } from "./useLayerMountTarget-BmZyeKWE.js";
4
4
  import { t as _sfc_main$19 } from "./VisuallyHidden-cpmsV-0M.js";
5
5
  import { n as firstCharacter } from "./characters-wTnzjkkR.js";
6
6
  import { t as devWarn } from "./useDevWarning-B2fsk2B-.js";
7
+ import { r as isFocusDetached } from "./useFocusTrap-CnKnSN99.js";
7
8
  import { o as useComponentMessages } from "./context-B8IEFCDR.js";
8
9
  import { t as useScrollableArea } from "./useScrollableArea-Bwn75HDg.js";
9
- import { t as _sfc_main$20 } from "./Tooltip-kQPfj3SE.js";
10
+ import { t as _sfc_main$20 } from "./Tooltip-BwrJVZ8X.js";
10
11
  import { n as observeResize } from "./sharedResizeObserver-BekhnB3E.js";
11
12
  import { t as useScrollbars } from "./useScrollbars-Ch0xqJWO.js";
12
- import { t as _sfc_main$21 } from "./CheckboxInput-BGqRMoEA.js";
13
+ import { t as _sfc_main$21 } from "./CheckboxInput-Cr0qhZpZ.js";
13
14
  import { t as _sfc_main$22 } from "./ComponentIcon-BRXBBKeG.js";
14
- import { t as _sfc_main$23 } from "./Popover-C68nCirC.js";
15
- import { t as _sfc_main$24 } from "./DateInput-DVEb1-fM.js";
16
- import { s as tableMessages } from "./loadCatalog-BtQRPyzj.js";
17
- import { r as useCollator } from "./locale-DET_YkFW.js";
18
- import { t as _sfc_main$25 } from "./MultiSelector-DgWCWpnM.js";
19
- import { t as _sfc_main$26 } from "./NumberInput-DNcE_HLD.js";
20
- import { t as _sfc_main$27 } from "./Pagination-DJGQe6wH.js";
21
- import { t as _sfc_main$28 } from "./Selector-CPCoJ7Sb.js";
22
- import { t as _sfc_main$29 } from "./TextInput-Dylfzj33.js";
15
+ import { t as _sfc_main$23 } from "./Popover-BUiTyOcY.js";
16
+ import { t as _sfc_main$24 } from "./DateInput-iQQLaYlp.js";
17
+ import { s as tableMessages } from "./loadCatalog-DYuZZRtf.js";
18
+ import { r as useCollator } from "./locale-B-DrJCMs.js";
19
+ import { t as _sfc_main$25 } from "./MultiSelector-BgGEzXiX.js";
20
+ import { t as _sfc_main$26 } from "./NumberInput-BDNiEgzf.js";
21
+ import { t as _sfc_main$27 } from "./Pagination-40BEwZOo.js";
22
+ import { t as _sfc_main$28 } from "./Selector-QHLh7g_K.js";
23
+ import { t as _sfc_main$29 } from "./TextInput-C8f89GV8.js";
23
24
  import { t as _sfc_main$30 } from "./Toolbar-BH_E0F0G.js";
24
25
  import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, getCurrentInstance, h, inject, isVNode, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, onUpdated, openBlock, provide, reactive, ref, renderList, renderSlot, shallowRef, toDisplayString, toValue, unref, useAttrs, useId, watch, withCtx, withModifiers } from "vue";
25
26
  import "../styles/layer.css";
@@ -630,27 +631,30 @@ function useTableGroupedRows(config) {
630
631
  }
631
632
  return {
632
633
  data,
633
- plugin: { rowPatch(row) {
634
- if (!isTableGroupHeader(row)) return null;
635
- const current = toValue(config);
636
- const groupKey = String(row.groupKey);
637
- const count = Number(row.count);
638
- const collapsed = current.collapsedGroups.has(groupKey);
639
- const render = current.renderGroupHeader;
640
- return {
641
- attrs: { "data-group-header": "" },
642
- suppressSelection: true,
643
- skipRowIndex: true,
644
- onClick: () => current.onToggleGroup(groupKey),
645
- group: {
646
- groupKey,
647
- count,
648
- collapsed,
649
- onToggle: () => current.onToggleGroup(groupKey),
650
- render: render ? () => render(groupKey, count, collapsed) : void 0
651
- }
652
- };
653
- } },
634
+ plugin: {
635
+ rowModel: "grouped",
636
+ rowPatch(row) {
637
+ if (!isTableGroupHeader(row)) return null;
638
+ const current = toValue(config);
639
+ const groupKey = String(row.groupKey);
640
+ const count = Number(row.count);
641
+ const collapsed = current.collapsedGroups.has(groupKey);
642
+ const render = current.renderGroupHeader;
643
+ return {
644
+ attrs: { "data-group-header": "" },
645
+ suppressSelection: true,
646
+ skipRowIndex: true,
647
+ onClick: () => current.onToggleGroup(groupKey),
648
+ group: {
649
+ groupKey,
650
+ count,
651
+ collapsed,
652
+ onToggle: () => current.onToggleGroup(groupKey),
653
+ render: render ? () => render(groupKey, count, collapsed) : void 0
654
+ }
655
+ };
656
+ }
657
+ },
654
658
  idKey
655
659
  };
656
660
  }
@@ -912,6 +916,7 @@ const EXPANSION_COLUMN_KEY = "__expansion";
912
916
  function useTableRowExpansion(config) {
913
917
  const messages = useComponentMessages({ table: tableMessages });
914
918
  return {
919
+ rowModel: "detail",
915
920
  transformColumns(columns) {
916
921
  return [{
917
922
  key: EXPANSION_COLUMN_KEY,
@@ -967,6 +972,60 @@ function useTableRowExpansion(config) {
967
972
  };
968
973
  }
969
974
  //#endregion
975
+ //#region src/Table/plugins/virtualization/admission.ts
976
+ /** 自带 renderCell、但内容保证单行定高的内置列(例如行号列)。 */
977
+ const fixedHeightColumns = /* @__PURE__ */ new WeakSet();
978
+ /** 把一个内置列登记为单行定高,窗口化时不因为它自带 renderCell 就退回全部渲染。 */
979
+ function registerFixedHeightColumn(column) {
980
+ fixedHeightColumns.add(column);
981
+ return column;
982
+ }
983
+ function isFixedHeightColumn(column) {
984
+ return column.renderCell == null || fixedHeightColumns.has(column);
985
+ }
986
+ /**
987
+ * 插件合起来的行结构。声明了 `flat` 以外的结构,或者改行、改单元格却没声明 `flat` 的插件,
988
+ * 决定了整张表的结构。
989
+ */
990
+ function resolveRowModel(plugins) {
991
+ for (const plugin of plugins) {
992
+ if (plugin.rowModel != null && plugin.rowModel !== "flat") return plugin.rowModel;
993
+ if (plugin.rowModel == null && (plugin.rowPatch != null || plugin.cellPatch != null)) return "custom";
994
+ }
995
+ return "flat";
996
+ }
997
+ function canonicalKey(value) {
998
+ if (typeof value === "string") return value.length > 0 ? value : void 0;
999
+ if (typeof value === "number") return Number.isFinite(value) ? String(value) : void 0;
1000
+ }
1001
+ /** 全部数据的行键。窗口化要求每一行都有唯一、合法的键。 */
1002
+ function resolveTableIdentity(rows, idKey) {
1003
+ const keys = [];
1004
+ const seen = /* @__PURE__ */ new Set();
1005
+ let isValid = true;
1006
+ for (const row of rows) {
1007
+ const key = canonicalKey(typeof idKey === "function" ? idKey(row) : row[idKey]);
1008
+ if (key === void 0 || seen.has(key)) {
1009
+ isValid = false;
1010
+ keys.push(String(keys.length));
1011
+ continue;
1012
+ }
1013
+ seen.add(key);
1014
+ keys.push(key);
1015
+ }
1016
+ return {
1017
+ keys,
1018
+ isValid
1019
+ };
1020
+ }
1021
+ /** 行、列两个方向都要满足的条件。返回退回全部渲染的原因,能窗口化时为 `undefined`。 */
1022
+ function sharedFallbackReason({ plugins, identity, textOverflow }) {
1023
+ const rowModel = resolveRowModel(plugins);
1024
+ if (rowModel !== "flat") return `plugins that change row structure (${rowModel}) must declare rowModel: 'flat' to admit windowing`;
1025
+ if (!identity.isValid) return "every row needs a unique, valid idKey";
1026
+ if (textOverflow === "wrap") return "explicitly wrapped content does not keep a fixed height";
1027
+ }
1028
+ //#endregion
970
1029
  //#region src/Table/plugins/rowIndex.ts
971
1030
  const ROW_INDEX_COLUMN_KEY = "__rowIndex";
972
1031
  /** 按 `data` 里的位置查行号:分组头不占号,键或对象身份对上就算同一行。 */
@@ -986,7 +1045,7 @@ function useTableRowIndex(config = {}) {
986
1045
  return data == null ? null : createLookup(data, getRowKey);
987
1046
  });
988
1047
  return { transformColumns(columns) {
989
- return [{
1048
+ return [registerFixedHeightColumn({
990
1049
  key: ROW_INDEX_COLUMN_KEY,
991
1050
  header: toValue(config).label ?? "#",
992
1051
  width: pixel(48),
@@ -999,7 +1058,7 @@ function useTableRowIndex(config = {}) {
999
1058
  const start = toValue(config).startFrom ?? 1;
1000
1059
  return h("span", { class: "astryx-table__row-index" }, String(start + position));
1001
1060
  }
1002
- }, ...columns];
1061
+ }), ...columns];
1003
1062
  } };
1004
1063
  }
1005
1064
  //#endregion
@@ -1347,6 +1406,14 @@ function useTableStickyColumns(config) {
1347
1406
  detach = null;
1348
1407
  });
1349
1408
  return {
1409
+ rowModel: "flat",
1410
+ pinnedColumns() {
1411
+ const current = toValue(config);
1412
+ return {
1413
+ startKeys: current.startKeys ?? [],
1414
+ endKeys: current.endKeys ?? []
1415
+ };
1416
+ },
1350
1417
  bindScrollRoot,
1351
1418
  cellPatch({ column, columns, kind }) {
1352
1419
  const current = toValue(config);
@@ -1545,6 +1612,7 @@ function useTableTreeData(config) {
1545
1612
  const resolvedKey = ref();
1546
1613
  const rowIdPrefix = useTreeRowIdPrefix();
1547
1614
  return {
1615
+ rowModel: "tree",
1548
1616
  transformColumns(columns) {
1549
1617
  const current = toValue(config);
1550
1618
  const key = treeColumnKey(columns, current.treeColumnKey);
@@ -1660,6 +1728,50 @@ function useTableTreeState(config) {
1660
1728
  };
1661
1729
  }
1662
1730
  //#endregion
1731
+ //#region src/Table/plugins/virtualization.ts
1732
+ /**
1733
+ * 定高扁平行的行窗口化:只挂载看得见的行,前后各多挂几行,其余用占位撑开滚动高度。
1734
+ * 数据、列、`idKey` 和别的插件照旧交给表格;内容或结构不支持时退回全部渲染。
1735
+ *
1736
+ * 表格在父元素给的高度里滚动并占满它:给父元素一个高度(固定、百分比,或者 flex 子项),
1737
+ * 没有高度时每一行都会渲染。
1738
+ *
1739
+ * @example
1740
+ * ```ts
1741
+ * const rows = useTableRowsVirtualization({ rowHeight: 41, initialViewportHeight: 480 })
1742
+ * // <Table :data="data" :columns="columns" id-key="id" :plugins="{ rows }" />
1743
+ * ```
1744
+ */
1745
+ function useTableRowsVirtualization(config) {
1746
+ return {
1747
+ rowModel: "flat",
1748
+ virtualization: { rows: () => {
1749
+ const { rowHeight, initialViewportHeight } = toValue(config);
1750
+ return {
1751
+ rowHeight,
1752
+ initialViewportHeight
1753
+ };
1754
+ } }
1755
+ };
1756
+ }
1757
+ /**
1758
+ * 列窗口化:只挂载行内方向上看得见的列,两侧各多挂几列。固定列(`useTableStickyColumns`)一直挂着,
1759
+ * 有焦点的格子所在的列滚出视口也继续挂着。滚动区放得下表格最小宽度时,所有列都挂载。
1760
+ * 和行窗口化一起用时,两个插件都放进 `plugins`。
1761
+ *
1762
+ * @example
1763
+ * ```ts
1764
+ * const columns = useTableColumnsVirtualization({ initialViewportWidth: 960 })
1765
+ * // <Table :data="data" :columns="cols" id-key="id" :plugins="{ columns }" />
1766
+ * ```
1767
+ */
1768
+ function useTableColumnsVirtualization(config) {
1769
+ return {
1770
+ rowModel: "flat",
1771
+ virtualization: { columns: () => ({ initialViewportWidth: toValue(config).initialViewportWidth }) }
1772
+ };
1773
+ }
1774
+ //#endregion
1663
1775
  //#region src/Table/headerText.ts
1664
1776
  /**
1665
1777
  * 从渲染结果里收集能直接读到的文字:字符串、数字、元素的文本子节点和数组。
@@ -1686,6 +1798,902 @@ function columnHeaderText(column) {
1686
1798
  return trimmed === "" ? column.key : trimmed;
1687
1799
  }
1688
1800
  //#endregion
1801
+ //#region src/composables/internal/listWindow/listWindowGeometry.ts
1802
+ const UNMEASURED_LIST_GEOMETRY = Object.freeze({
1803
+ viewportHeight: 0,
1804
+ scrollTop: 0,
1805
+ scrollHeight: 0,
1806
+ startOffset: 0,
1807
+ viewportWidth: 0,
1808
+ scrollLeft: 0,
1809
+ isMeasured: false,
1810
+ revision: 0,
1811
+ layoutRevision: 0
1812
+ });
1813
+ /**
1814
+ * 一个滚动视口的几何来源:一个滚动监听加一个 ResizeObserver,块方向和行内方向共用。
1815
+ * 单纯滚动只读 `scrollTop` / `scrollLeft`;尺寸和内容的变化才重新量全部。
1816
+ */
1817
+ function useListWindowGeometry(options) {
1818
+ const snapshot = shallowRef(UNMEASURED_LIST_GEOMETRY);
1819
+ let stop;
1820
+ function measure(isContent, isLayout) {
1821
+ const viewport = options.viewport();
1822
+ const start = options.start();
1823
+ if (viewport == null || start == null || !viewport.isConnected) return;
1824
+ const current = snapshot.value;
1825
+ const scrollTop = viewport.scrollTop;
1826
+ const scrollLeft = Math.abs(viewport.scrollLeft);
1827
+ if (!isContent && !isLayout && current.isMeasured) {
1828
+ if (scrollTop !== current.scrollTop || scrollLeft !== current.scrollLeft) snapshot.value = {
1829
+ ...current,
1830
+ scrollTop,
1831
+ scrollLeft
1832
+ };
1833
+ return;
1834
+ }
1835
+ const viewportHeight = viewport.clientHeight;
1836
+ if (viewportHeight <= 0) return;
1837
+ const next = {
1838
+ viewportHeight,
1839
+ scrollTop,
1840
+ scrollHeight: viewport.scrollHeight,
1841
+ startOffset: Math.max(0, start.getBoundingClientRect().top - viewport.getBoundingClientRect().top + scrollTop - viewport.clientTop),
1842
+ viewportWidth: viewport.clientWidth,
1843
+ scrollLeft,
1844
+ isMeasured: true,
1845
+ revision: current.revision + 1,
1846
+ layoutRevision: current.layoutRevision + (isLayout ? 1 : 0)
1847
+ };
1848
+ if (!isLayout && current.isMeasured && current.viewportHeight === next.viewportHeight && current.scrollTop === next.scrollTop && current.scrollHeight === next.scrollHeight && current.startOffset === next.startOffset && current.viewportWidth === next.viewportWidth && current.scrollLeft === next.scrollLeft) return;
1849
+ snapshot.value = next;
1850
+ }
1851
+ function connect(viewport, start) {
1852
+ const onScroll = () => measure(false, false);
1853
+ viewport.addEventListener("scroll", onScroll, { passive: true });
1854
+ const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(() => measure(true, true));
1855
+ observer?.observe(viewport);
1856
+ observer?.observe(start);
1857
+ measure(true, true);
1858
+ return () => {
1859
+ viewport.removeEventListener("scroll", onScroll);
1860
+ observer?.disconnect();
1861
+ };
1862
+ }
1863
+ watch(() => [
1864
+ options.isActive(),
1865
+ options.viewport(),
1866
+ options.start()
1867
+ ], ([isActive, viewport, start]) => {
1868
+ stop?.();
1869
+ stop = void 0;
1870
+ if (isActive && viewport != null && start != null) stop = connect(viewport, start);
1871
+ }, {
1872
+ immediate: true,
1873
+ flush: "post"
1874
+ });
1875
+ onScopeDispose(() => {
1876
+ stop?.();
1877
+ stop = void 0;
1878
+ });
1879
+ return {
1880
+ snapshot,
1881
+ invalidate(isLayout = false) {
1882
+ if (stop != null) measure(true, isLayout);
1883
+ }
1884
+ };
1885
+ }
1886
+ function isPositiveFinite(value) {
1887
+ return Number.isFinite(value) && value > 0;
1888
+ }
1889
+ function hasValidInputs(options, totalHeight) {
1890
+ const { rowCount, rowHeight, viewportHeight, scrollTop, startOffset, scrollHeight } = options;
1891
+ return Number.isSafeInteger(rowCount) && rowCount >= 0 && isPositiveFinite(rowHeight) && isPositiveFinite(viewportHeight) && Number.isFinite(totalHeight) && Number.isFinite(startOffset + totalHeight) && Number.isFinite(viewportHeight / rowHeight) && Number.isFinite(scrollTop) && (scrollHeight === void 0 || Number.isFinite(scrollHeight) && scrollHeight >= 0) && Number.isFinite(startOffset) && startOffset >= 0;
1892
+ }
1893
+ /**
1894
+ * 定高行的窗口。输入算不出有限的窗口时返回 `null`,调用方退回全部渲染。
1895
+ * 还没量到视口时,从第一行开始挂满 `viewportHeight` 再加缓冲区,服务端和首帧用同一个结果。
1896
+ */
1897
+ function calculateListWindow(options) {
1898
+ const { rowCount, rowHeight, viewportHeight, scrollTop, startOffset, isMeasured, focusIndex } = options;
1899
+ const totalHeight = rowCount * rowHeight;
1900
+ if (!hasValidInputs(options, totalHeight)) return null;
1901
+ if (rowCount === 0) return {
1902
+ segments: [],
1903
+ start: 0,
1904
+ end: 0,
1905
+ firstVisibleIndex: 0,
1906
+ offset: 0,
1907
+ totalHeight: 0
1908
+ };
1909
+ const contentHeight = Math.max(startOffset + totalHeight, options.scrollHeight ?? 0);
1910
+ const maximumScroll = Math.max(0, contentHeight - viewportHeight);
1911
+ const clampedScroll = Math.min(maximumScroll, Math.max(0, scrollTop));
1912
+ const listTop = clampedScroll - startOffset;
1913
+ const bodyTop = Math.min(totalHeight, Math.max(0, listTop));
1914
+ const bodyBottom = Math.min(totalHeight, Math.max(0, clampedScroll + viewportHeight - startOffset));
1915
+ const firstVisibleIndex = isMeasured ? Math.min(rowCount - 1, Math.floor(bodyTop / rowHeight)) : 0;
1916
+ let offset = 0;
1917
+ if (isMeasured) offset = listTop < 0 ? listTop : bodyTop - firstVisibleIndex * rowHeight;
1918
+ const start = isMeasured ? Math.max(0, firstVisibleIndex - 4) : 0;
1919
+ const end = isMeasured ? Math.min(rowCount, Math.max(firstVisibleIndex, Math.ceil(bodyBottom / rowHeight)) + 4) : Math.min(rowCount, Math.ceil(viewportHeight / rowHeight) + 4);
1920
+ return {
1921
+ segments: createListWindowSegments(rowCount, rowHeight, start, end, focusIndex),
1922
+ start,
1923
+ end,
1924
+ firstVisibleIndex,
1925
+ offset,
1926
+ totalHeight
1927
+ };
1928
+ }
1929
+ /** 一段挂载区间加上窗口外那一个焦点行,换成挂载段和占位段。 */
1930
+ function createListWindowSegments(rowCount, rowHeight, start, end, focusIndex) {
1931
+ if (rowCount === 0) return [];
1932
+ const intervals = [{
1933
+ start,
1934
+ end
1935
+ }];
1936
+ if (focusIndex !== void 0 && Number.isInteger(focusIndex) && focusIndex >= 0 && focusIndex < rowCount && (focusIndex < start || focusIndex >= end)) {
1937
+ intervals.push({
1938
+ start: focusIndex,
1939
+ end: focusIndex + 1
1940
+ });
1941
+ intervals.sort((a, b) => a.start - b.start);
1942
+ }
1943
+ const merged = [];
1944
+ for (const interval of intervals) {
1945
+ const previous = merged.at(-1);
1946
+ if (previous && interval.start <= previous.end) previous.end = Math.max(previous.end, interval.end);
1947
+ else if (interval.end > interval.start) merged.push({ ...interval });
1948
+ }
1949
+ const segments = [];
1950
+ let cursor = 0;
1951
+ for (const interval of merged) {
1952
+ if (interval.start > cursor) segments.push({
1953
+ type: "gap",
1954
+ start: cursor,
1955
+ end: interval.start,
1956
+ height: (interval.start - cursor) * rowHeight
1957
+ });
1958
+ segments.push({
1959
+ type: "rows",
1960
+ ...interval
1961
+ });
1962
+ cursor = interval.end;
1963
+ }
1964
+ if (cursor < rowCount) segments.push({
1965
+ type: "gap",
1966
+ start: cursor,
1967
+ end: rowCount,
1968
+ height: (rowCount - cursor) * rowHeight
1969
+ });
1970
+ return segments;
1971
+ }
1972
+ /** `[0, limit)` 里第一个起点不小于 `value` 的位置;`isStrict` 时要求大于。 */
1973
+ function lowerBound(offsets, value, limit, isStrict = false) {
1974
+ let low = 0;
1975
+ let high = limit;
1976
+ while (low < high) {
1977
+ const middle = low + high >> 1;
1978
+ const current = offsets[middle] ?? 0;
1979
+ if (isStrict ? current <= value : current < value) low = middle + 1;
1980
+ else high = middle;
1981
+ }
1982
+ return low;
1983
+ }
1984
+ /**
1985
+ * 不等宽(或不等高)项的挂载区间。还没量到视口时,挂起点落在视口里的项,再往后加缓冲区。
1986
+ */
1987
+ function calculateVariableListRange({ offsets, viewportSize, scrollOffset, isMeasured, overscan }) {
1988
+ const count = Math.max(0, offsets.length - 1);
1989
+ if (count === 0) return {
1990
+ start: 0,
1991
+ end: 0,
1992
+ firstVisibleIndex: 0,
1993
+ offset: 0
1994
+ };
1995
+ if (!isMeasured) return {
1996
+ start: 0,
1997
+ end: Math.min(count, lowerBound(offsets, viewportSize, count) + overscan),
1998
+ firstVisibleIndex: 0,
1999
+ offset: 0
2000
+ };
2001
+ const total = offsets[count] ?? 0;
2002
+ const visibleSize = Math.max(0, viewportSize);
2003
+ const scroll = Math.min(Math.max(0, total - visibleSize), Math.max(0, scrollOffset));
2004
+ const first = Math.max(0, Math.min(count - 1, lowerBound(offsets, scroll, count, true) - 1));
2005
+ const last = Math.max(first + 1, lowerBound(offsets, scroll + visibleSize, count));
2006
+ return {
2007
+ start: Math.max(0, first - overscan),
2008
+ end: Math.min(count, last + overscan),
2009
+ firstVisibleIndex: first,
2010
+ offset: scroll - (offsets[first] ?? 0)
2011
+ };
2012
+ }
2013
+ function findSurvivingIndex(previousKeys, indices, firstVisibleIndex) {
2014
+ const anchor = previousKeys[firstVisibleIndex];
2015
+ let index = anchor === void 0 ? void 0 : indices.get(anchor);
2016
+ for (let i = firstVisibleIndex + 1; index === void 0 && i < previousKeys.length; i += 1) index = indices.get(previousKeys[i]);
2017
+ for (let i = Math.min(firstVisibleIndex - 1, previousKeys.length - 1); index === void 0 && i >= 0; i -= 1) index = indices.get(previousKeys[i]);
2018
+ return index;
2019
+ }
2020
+ /**
2021
+ * 数据、顺序或行高变化之后,让原来第一行可见的那一行(按键找)留在原处,返回新的滚动位置。
2022
+ */
2023
+ function reconcileListAnchor(options) {
2024
+ const { previousKeys, keys, firstVisibleIndex, offset, rowHeight, viewportHeight, startOffset, offsets } = options;
2025
+ const index = findSurvivingIndex(previousKeys, options.keyIndices ?? new Map(keys.map((key, index) => [key, index])), firstVisibleIndex);
2026
+ const contentSize = offsets ? offsets[keys.length] ?? 0 : keys.length * rowHeight;
2027
+ const maximumScroll = Math.max(0, startOffset + contentSize + (options.trailingContentHeight ?? 0) - viewportHeight);
2028
+ if (offsets) {
2029
+ const itemStart = offsets[index ?? 0] ?? 0;
2030
+ const itemSize = index === void 0 ? 0 : (offsets[index + 1] ?? itemStart) - itemStart;
2031
+ const fraction = Math.min(1, Math.max(0, offset));
2032
+ return Math.max(0, Math.min(maximumScroll, startOffset + itemStart + fraction * itemSize));
2033
+ }
2034
+ const fraction = index === void 0 ? Math.min(0, Math.max(-startOffset, offset)) : Math.min(Math.max(-startOffset, offset), rowHeight);
2035
+ return Math.min(maximumScroll, startOffset + (index ?? 0) * rowHeight + fraction);
2036
+ }
2037
+ //#endregion
2038
+ //#region src/composables/internal/listWindow/useListFocusIsland.ts
2039
+ /**
2040
+ * 窗口化共用的焦点岛:有焦点的那一项滚出窗口时仍然挂着,焦点不丢。
2041
+ * 这一项从数据里删掉了,焦点没处落,就交给滚动视口,不掉到页面最前面。
2042
+ */
2043
+ function useListFocusIsland(options) {
2044
+ const focusedKey = shallowRef();
2045
+ const focusIndex = computed(() => {
2046
+ if (!options.isActive() || focusedKey.value === void 0) return void 0;
2047
+ return options.keyIndices().get(focusedKey.value);
2048
+ });
2049
+ watch(focusIndex, (index) => {
2050
+ if (focusedKey.value === void 0 || index !== void 0 || !options.isActive()) return;
2051
+ focusedKey.value = void 0;
2052
+ const viewport = options.viewport();
2053
+ if (viewport != null && isFocusDetached(viewport.ownerDocument)) viewport.focus({ preventScroll: true });
2054
+ }, { flush: "post" });
2055
+ return {
2056
+ focusIndex,
2057
+ onItemFocus(key) {
2058
+ focusedKey.value = key;
2059
+ },
2060
+ onItemBlur() {
2061
+ focusedKey.value = void 0;
2062
+ }
2063
+ };
2064
+ }
2065
+ //#endregion
2066
+ //#region src/composables/internal/listWindow/useInlineListWindow.ts
2067
+ function sameValues(a, b) {
2068
+ return a === b || a.length === b.length && a.every((value, index) => value === b[index]);
2069
+ }
2070
+ /** 从右到左排版时,视口报的行内滚动距离是负数。 */
2071
+ function writeInlineScroll(viewport, logical) {
2072
+ viewport.scrollLeft = viewport.ownerDocument.defaultView?.getComputedStyle(viewport).direction === "rtl" ? -logical : logical;
2073
+ }
2074
+ /**
2075
+ * 行内方向的长列表窗口:项宽各不相同(例如表格列),两端可以有一直挂着的固定内容。
2076
+ * 项的键、宽度或两端固定内容变了,第一项可见项和它露出的比例留在原处。
2077
+ */
2078
+ function useInlineListWindow(options) {
2079
+ const pending = shallowRef();
2080
+ let planned;
2081
+ const keyIndices = computed(() => new Map(options.keys().map((key, index) => [key, index])));
2082
+ const island = useListFocusIsland({
2083
+ keyIndices: () => keyIndices.value,
2084
+ isActive: options.canWindow,
2085
+ viewport: options.viewport
2086
+ });
2087
+ const count = computed(() => Math.max(0, options.offsets().length - 1));
2088
+ const isMeasured = computed(() => {
2089
+ const snapshot = options.geometry();
2090
+ return snapshot.isMeasured && isPositiveFinite(snapshot.viewportWidth) && Number.isFinite(snapshot.scrollLeft);
2091
+ });
2092
+ /** 两端固定内容盖住视口边缘,只有中间这段露出列表。 */
2093
+ function visibleSize(insetStart, insetEnd) {
2094
+ return (isMeasured.value ? options.geometry().viewportWidth : options.initialViewportWidth()) - insetStart - insetEnd;
2095
+ }
2096
+ const range = computed(() => {
2097
+ if (!options.canWindow()) return void 0;
2098
+ return calculateVariableListRange({
2099
+ offsets: options.offsets(),
2100
+ viewportSize: visibleSize(options.insetStart(), options.insetEnd()),
2101
+ scrollOffset: isMeasured.value ? pending.value?.to ?? options.geometry().scrollLeft : 0,
2102
+ isMeasured: isMeasured.value,
2103
+ overscan: options.overscan
2104
+ });
2105
+ });
2106
+ const isWindowed = computed(() => range.value !== void 0 && (range.value.start > 0 || range.value.end < count.value));
2107
+ const bounds = computed(() => isWindowed.value ? {
2108
+ start: range.value.start,
2109
+ end: range.value.end
2110
+ } : {
2111
+ start: 0,
2112
+ end: count.value
2113
+ });
2114
+ const segments = computed(() => {
2115
+ const offsets = options.offsets();
2116
+ const focus = isWindowed.value ? island.focusIndex.value : void 0;
2117
+ return createListWindowSegments(count.value, 1, bounds.value.start, bounds.value.end, focus).map((segment) => segment.type === "gap" ? {
2118
+ ...segment,
2119
+ height: (offsets[segment.end] ?? 0) - (offsets[segment.start] ?? 0)
2120
+ } : segment);
2121
+ });
2122
+ watch([
2123
+ options.keys,
2124
+ options.offsets,
2125
+ options.insetStart,
2126
+ options.insetEnd
2127
+ ], ([keys, offsets, insetStart, insetEnd]) => {
2128
+ const last = planned;
2129
+ if (!options.canWindow() || !isMeasured.value || last == null) return;
2130
+ if (sameValues(last.keys, keys) && sameValues(last.offsets, offsets)) return;
2131
+ const scrollLeft = pending.value?.to ?? options.geometry().scrollLeft;
2132
+ const previous = calculateVariableListRange({
2133
+ offsets: last.offsets,
2134
+ viewportSize: visibleSize(last.insetStart, last.insetEnd),
2135
+ scrollOffset: scrollLeft,
2136
+ isMeasured: true,
2137
+ overscan: options.overscan
2138
+ });
2139
+ const firstSize = (last.offsets[previous.firstVisibleIndex + 1] ?? 0) - (last.offsets[previous.firstVisibleIndex] ?? 0);
2140
+ const to = reconcileListAnchor({
2141
+ previousKeys: last.keys,
2142
+ keys,
2143
+ keyIndices: keyIndices.value,
2144
+ firstVisibleIndex: previous.firstVisibleIndex,
2145
+ offset: firstSize > 0 ? previous.offset / firstSize : 0,
2146
+ offsets,
2147
+ rowHeight: 0,
2148
+ viewportHeight: visibleSize(insetStart, insetEnd),
2149
+ startOffset: 0
2150
+ });
2151
+ pending.value = Math.abs(to - options.geometry().scrollLeft) > .5 ? {
2152
+ from: options.geometry().scrollLeft,
2153
+ to
2154
+ } : void 0;
2155
+ });
2156
+ watch(() => options.geometry().scrollLeft, (scrollLeft) => {
2157
+ if (pending.value != null && scrollLeft !== pending.value.from) pending.value = void 0;
2158
+ });
2159
+ watch([
2160
+ range,
2161
+ options.keys,
2162
+ options.offsets,
2163
+ options.insetStart,
2164
+ options.insetEnd
2165
+ ], ([current]) => {
2166
+ planned = current !== void 0 && isMeasured.value ? {
2167
+ keys: options.keys(),
2168
+ offsets: options.offsets(),
2169
+ insetStart: options.insetStart(),
2170
+ insetEnd: options.insetEnd()
2171
+ } : void 0;
2172
+ const anchor = pending.value;
2173
+ const viewport = options.viewport();
2174
+ if (anchor == null || viewport == null) return;
2175
+ writeInlineScroll(viewport, anchor.to);
2176
+ if (Math.abs(Math.abs(viewport.scrollLeft) - anchor.from) < .5) pending.value = void 0;
2177
+ }, {
2178
+ flush: "post",
2179
+ immediate: true
2180
+ });
2181
+ return {
2182
+ isWindowed,
2183
+ segments,
2184
+ onItemFocus: island.onItemFocus,
2185
+ onItemBlur: island.onItemBlur
2186
+ };
2187
+ }
2188
+ //#endregion
2189
+ //#region src/Table/plugins/virtualization/useTableColumnWindow.ts
2190
+ const OVERSCAN = 2;
2191
+ /** 事件目标所在格子的整表列位置。占位格没有列。 */
2192
+ function cellColumnIndex(table, target) {
2193
+ if (!(target instanceof Element)) return void 0;
2194
+ const cell = target.closest("td, th");
2195
+ if (cell == null || !table.contains(cell) || cell.getAttribute("aria-hidden") === "true") return void 0;
2196
+ const position = cell.getAttribute("aria-colindex");
2197
+ return position == null ? cell.cellIndex : Number(position) - 1;
2198
+ }
2199
+ /**
2200
+ * 表格接到共用行内窗口上的那一层:固定列一直挂着,只有夹在两段固定列中间的列参与窗口化;
2201
+ * 有焦点的格子所在的列滚出视口也继续挂着,直到焦点离开表格或者换到别的格子。
2202
+ */
2203
+ function useTableColumnWindow(options) {
2204
+ const count = computed(() => options.widths().length);
2205
+ const run = computed(() => {
2206
+ const { startCount, endCount } = options.pinned();
2207
+ const start = Math.min(count.value, Math.max(0, startCount));
2208
+ return {
2209
+ start,
2210
+ end: Math.max(start, count.value - Math.max(0, endCount))
2211
+ };
2212
+ });
2213
+ const isActive = computed(() => {
2214
+ const config = options.config();
2215
+ return config != null && options.fallbackReason() == null && isPositiveFinite(config.initialViewportWidth) && run.value.end > run.value.start && options.keys().length === count.value && options.widths().every((width) => Number.isFinite(width) && width >= 0);
2216
+ });
2217
+ const layout = computed(() => {
2218
+ const widths = options.widths();
2219
+ const offsets = [0];
2220
+ for (let index = run.value.start; index < run.value.end; index += 1) offsets.push(offsets.at(-1) + (widths[index] ?? 0));
2221
+ let pinnedStart = 0;
2222
+ for (let index = 0; index < run.value.start; index += 1) pinnedStart += widths[index] ?? 0;
2223
+ let pinnedEnd = 0;
2224
+ for (let index = run.value.end; index < count.value; index += 1) pinnedEnd += widths[index] ?? 0;
2225
+ return {
2226
+ offsets,
2227
+ pinnedStart,
2228
+ pinnedEnd
2229
+ };
2230
+ });
2231
+ const runKeys = computed(() => options.keys().slice(run.value.start, run.value.end));
2232
+ const window = useInlineListWindow({
2233
+ keys: () => runKeys.value,
2234
+ offsets: () => layout.value.offsets,
2235
+ insetStart: () => layout.value.pinnedStart,
2236
+ insetEnd: () => layout.value.pinnedEnd,
2237
+ initialViewportWidth: () => options.config()?.initialViewportWidth ?? 0,
2238
+ overscan: OVERSCAN,
2239
+ canWindow: () => isActive.value,
2240
+ geometry: options.geometry,
2241
+ viewport: options.viewport
2242
+ });
2243
+ watch(() => options.config() == null ? void 0 : options.fallbackReason(), (reason) => {
2244
+ if (reason != null) devWarn("Table", `Column windowing disabled: ${reason}. Rendering every column.`);
2245
+ }, { immediate: true });
2246
+ const segments = computed(() => {
2247
+ if (!window.isWindowed.value) return count.value === 0 ? [] : [{
2248
+ type: "columns",
2249
+ start: 0,
2250
+ end: count.value
2251
+ }];
2252
+ const { start, end } = run.value;
2253
+ const next = [];
2254
+ if (start > 0) next.push({
2255
+ type: "columns",
2256
+ start: 0,
2257
+ end: start
2258
+ });
2259
+ for (const segment of window.segments.value) next.push(segment.type === "gap" ? {
2260
+ type: "gap",
2261
+ start: start + segment.start,
2262
+ end: start + segment.end,
2263
+ width: segment.height
2264
+ } : {
2265
+ type: "columns",
2266
+ start: start + segment.start,
2267
+ end: start + segment.end
2268
+ });
2269
+ if (end < count.value) next.push({
2270
+ type: "columns",
2271
+ start: end,
2272
+ end: count.value
2273
+ });
2274
+ return next;
2275
+ });
2276
+ function onFocusin(event) {
2277
+ const table = options.table();
2278
+ if (!isActive.value || table == null) return;
2279
+ const index = cellColumnIndex(table, event.target);
2280
+ if (index === void 0) return;
2281
+ const key = options.keys()[index];
2282
+ if (key !== void 0 && index >= run.value.start && index < run.value.end) window.onItemFocus(key);
2283
+ else window.onItemBlur();
2284
+ }
2285
+ function onFocusout(event) {
2286
+ const table = options.table();
2287
+ if (!isActive.value || table == null) return;
2288
+ const next = event.relatedTarget;
2289
+ if (!(next == null && !table.ownerDocument.hasFocus()) && !(next instanceof Node && table.contains(next))) window.onItemBlur();
2290
+ }
2291
+ return {
2292
+ isActive,
2293
+ isWindowed: window.isWindowed,
2294
+ segments,
2295
+ onFocusin,
2296
+ onFocusout
2297
+ };
2298
+ }
2299
+ //#endregion
2300
+ //#region src/composables/internal/listWindow/useListWindow.ts
2301
+ /**
2302
+ * 块方向的长列表窗口:定高行,算出要挂载的段和占位段;保留一个焦点岛;
2303
+ * 数据或行高变了,按第一行可见行的键把它留在原处。不装任何观察器,几何由调用方提供。
2304
+ */
2305
+ function useListWindow(options) {
2306
+ const pending = shallowRef();
2307
+ let rendered;
2308
+ const island = useListFocusIsland({
2309
+ keyIndices: options.keyIndices,
2310
+ isActive: options.canWindow,
2311
+ viewport: options.viewport
2312
+ });
2313
+ const effectiveGeometry = computed(() => {
2314
+ const snapshot = options.geometry();
2315
+ const pitch = options.pitch();
2316
+ if (snapshot.isMeasured && isPositiveFinite(snapshot.viewportHeight) && Number.isFinite(snapshot.scrollTop) && Number.isFinite(snapshot.startOffset)) return snapshot;
2317
+ return {
2318
+ ...snapshot,
2319
+ viewportHeight: pitch?.viewportHeight ?? 0,
2320
+ scrollTop: 0,
2321
+ startOffset: 0,
2322
+ isMeasured: false
2323
+ };
2324
+ });
2325
+ const plan = computed(() => {
2326
+ const pitch = options.pitch();
2327
+ if (!options.canWindow() || pitch == null) return null;
2328
+ const geometry = effectiveGeometry.value;
2329
+ return calculateListWindow({
2330
+ rowCount: options.keys().length,
2331
+ rowHeight: pitch.rowHeight,
2332
+ viewportHeight: geometry.viewportHeight,
2333
+ scrollTop: pending.value?.to ?? geometry.scrollTop,
2334
+ scrollHeight: geometry.isMeasured ? geometry.scrollHeight : void 0,
2335
+ startOffset: geometry.startOffset,
2336
+ isMeasured: geometry.isMeasured
2337
+ });
2338
+ });
2339
+ const isWindowed = computed(() => plan.value !== null);
2340
+ const range = computed(() => ({
2341
+ start: plan.value?.start ?? 0,
2342
+ end: plan.value?.end ?? options.keys().length
2343
+ }));
2344
+ const segments = computed(() => {
2345
+ const count = options.keys().length;
2346
+ if (!isWindowed.value) return count === 0 ? [] : [{
2347
+ type: "rows",
2348
+ start: 0,
2349
+ end: count
2350
+ }];
2351
+ return createListWindowSegments(count, options.pitch()?.rowHeight ?? 0, range.value.start, range.value.end, island.focusIndex.value);
2352
+ });
2353
+ watch([options.keys, options.pitch], ([keys, pitch]) => {
2354
+ const last = rendered;
2355
+ if (!options.canWindow() || pitch == null || last == null) return;
2356
+ const geometry = effectiveGeometry.value;
2357
+ if (!geometry.isMeasured) return;
2358
+ const offset = last.plan.offset < 0 ? last.plan.offset : last.plan.offset / last.pitch.rowHeight * pitch.rowHeight;
2359
+ const to = reconcileListAnchor({
2360
+ previousKeys: last.keys,
2361
+ keys,
2362
+ keyIndices: options.keyIndices(),
2363
+ firstVisibleIndex: last.plan.firstVisibleIndex,
2364
+ offset,
2365
+ rowHeight: pitch.rowHeight,
2366
+ viewportHeight: geometry.viewportHeight,
2367
+ startOffset: geometry.startOffset,
2368
+ trailingContentHeight: Math.max(0, last.geometry.scrollHeight - last.geometry.startOffset - last.plan.totalHeight)
2369
+ });
2370
+ pending.value = Math.abs(to - geometry.scrollTop) > .5 ? {
2371
+ from: geometry.scrollTop,
2372
+ to
2373
+ } : void 0;
2374
+ });
2375
+ watch(() => options.geometry().scrollTop, (scrollTop) => {
2376
+ if (pending.value != null && scrollTop !== pending.value.from) pending.value = void 0;
2377
+ });
2378
+ watch([
2379
+ plan,
2380
+ effectiveGeometry,
2381
+ options.keys
2382
+ ], ([current, geometry]) => {
2383
+ const pitch = options.pitch();
2384
+ rendered = current != null && pitch != null && geometry.isMeasured ? {
2385
+ keys: options.keys(),
2386
+ pitch,
2387
+ plan: current,
2388
+ geometry
2389
+ } : void 0;
2390
+ const anchor = pending.value;
2391
+ const viewport = options.viewport();
2392
+ if (anchor == null || viewport == null) return;
2393
+ viewport.scrollTop = anchor.to;
2394
+ if (Math.abs(viewport.scrollTop - anchor.from) < .5) pending.value = void 0;
2395
+ }, {
2396
+ flush: "post",
2397
+ immediate: true
2398
+ });
2399
+ return {
2400
+ segments,
2401
+ plan,
2402
+ isWindowed,
2403
+ onItemFocus: island.onItemFocus,
2404
+ onItemBlur: island.onItemBlur
2405
+ };
2406
+ }
2407
+ /** 共同行高和声明值差得比这还小时,就是声明值。 */
2408
+ const PITCH_EPSILON = .01;
2409
+ function contentViolation(row) {
2410
+ for (const cell of Array.from(row.children)) {
2411
+ if (cell.getAttribute("aria-hidden") === "true") continue;
2412
+ if (cell.clientHeight > 0 && cell.scrollHeight > cell.clientHeight + 1) return "Mounted cell content exceeds the fixed row height.";
2413
+ }
2414
+ }
2415
+ function measureSharedPitch(rows) {
2416
+ let min = Number.POSITIVE_INFINITY;
2417
+ let max = 0;
2418
+ let sum = 0;
2419
+ let count = 0;
2420
+ for (const row of rows) {
2421
+ const height = row.getBoundingClientRect().height;
2422
+ if (!(height > 0)) continue;
2423
+ const reason = contentViolation(row);
2424
+ if (reason) return { reason };
2425
+ min = Math.min(min, height);
2426
+ max = Math.max(max, height);
2427
+ sum += height;
2428
+ count += 1;
2429
+ }
2430
+ if (count === 0) return void 0;
2431
+ if (max - min > .75) return { reason: "Mounted rows have different heights." };
2432
+ return { pitch: sum / count };
2433
+ }
2434
+ /**
2435
+ * 只读挂载着的数据行。`checked` 里的行上次已经通过,内容变化时只读新挂上的行;
2436
+ * 有一行离开了行高,就把所有挂载行一起量:都一样高(例如放大了字号)就用这个新行高,否则退回。
2437
+ */
2438
+ function checkMountedRows(body, rowHeight, checked) {
2439
+ if (!body.isConnected) return void 0;
2440
+ const rows = Array.from(body.querySelectorAll(":scope > tr[data-window-row]"));
2441
+ for (const row of rows) {
2442
+ if (checked.has(row)) continue;
2443
+ const height = row.getBoundingClientRect().height;
2444
+ if (height > 0 && Math.abs(height - rowHeight) > .75) {
2445
+ const shared = measureSharedPitch(rows);
2446
+ if (shared === void 0 || "reason" in shared || Math.abs(shared.pitch - rowHeight) > .75) return shared;
2447
+ }
2448
+ const reason = contentViolation(row);
2449
+ if (reason) return { reason };
2450
+ if (height > 0) checked.add(row);
2451
+ }
2452
+ }
2453
+ //#endregion
2454
+ //#region src/Table/plugins/virtualization/useTableRowWindow.ts
2455
+ function hasValidGeometry(config, rowCount) {
2456
+ return calculateListWindow({
2457
+ rowCount,
2458
+ rowHeight: config.rowHeight,
2459
+ viewportHeight: config.initialViewportHeight,
2460
+ scrollTop: 0,
2461
+ startOffset: 0,
2462
+ isMeasured: false
2463
+ }) !== null;
2464
+ }
2465
+ function round(value) {
2466
+ return Math.round(value * 100) / 100;
2467
+ }
2468
+ /**
2469
+ * 表格接到共用行窗口上的那一层:决定放不放行,挂载之后检查行是不是真的定高,
2470
+ * 所有行一起变高时改用量到的行高,内容溢出或行高不一时退回全部渲染。
2471
+ */
2472
+ function useTableRowWindow(options) {
2473
+ const rejection = shallowRef();
2474
+ const measuredPitch = shallowRef();
2475
+ const declared = computed((previous) => {
2476
+ const next = options.config();
2477
+ if (next != null && previous != null && next.rowHeight === previous.rowHeight && next.initialViewportHeight === previous.initialViewportHeight) return previous;
2478
+ return next;
2479
+ });
2480
+ const reason = computed(() => {
2481
+ const config = declared.value;
2482
+ if (config == null) return void 0;
2483
+ const shared = options.fallbackReason();
2484
+ if (shared != null) return shared;
2485
+ if (!hasValidGeometry(config, options.keys().length)) return "rowHeight and initialViewportHeight must be positive finite CSS pixels";
2486
+ });
2487
+ const isRejected = computed(() => rejection.value != null && rejection.value.keys === options.keys() && rejection.value.config === declared.value);
2488
+ const isActive = computed(() => declared.value != null && reason.value == null && !isRejected.value);
2489
+ const pitch = computed(() => {
2490
+ const config = declared.value;
2491
+ if (config == null) return void 0;
2492
+ return {
2493
+ rowHeight: (measuredPitch.value?.config === config ? measuredPitch.value.rowHeight : void 0) ?? config.rowHeight,
2494
+ viewportHeight: config.initialViewportHeight
2495
+ };
2496
+ });
2497
+ const keyIndices = computed(() => new Map(options.keys().map((key, index) => [key, index])));
2498
+ const window = useListWindow({
2499
+ keys: options.keys,
2500
+ keyIndices: () => keyIndices.value,
2501
+ pitch: () => pitch.value,
2502
+ canWindow: () => isActive.value && options.keys().length > 0,
2503
+ geometry: options.geometry,
2504
+ viewport: options.viewport
2505
+ });
2506
+ watch(reason, (current) => {
2507
+ if (current != null) devWarn("Table", `Windowing disabled: ${current}. Rendering all rows.`);
2508
+ }, { immediate: true });
2509
+ watch(isRejected, (current) => {
2510
+ if (current) devWarn("Table", `${rejection.value?.reason} Rendering all rows without fixed constraints.`);
2511
+ });
2512
+ let checked = /* @__PURE__ */ new WeakSet();
2513
+ let checkedLayout = -1;
2514
+ watch([window.segments, () => options.geometry().revision], () => {
2515
+ const body = options.body();
2516
+ const config = declared.value;
2517
+ const current = pitch.value;
2518
+ if (!window.isWindowed.value || body == null || config == null || current == null) return;
2519
+ const layout = options.geometry().layoutRevision;
2520
+ if (layout !== checkedLayout) {
2521
+ checked = /* @__PURE__ */ new WeakSet();
2522
+ checkedLayout = layout;
2523
+ }
2524
+ const check = checkMountedRows(body, current.rowHeight, checked);
2525
+ if (check === void 0) return;
2526
+ if ("reason" in check) {
2527
+ rejection.value = {
2528
+ keys: options.keys(),
2529
+ config,
2530
+ reason: check.reason
2531
+ };
2532
+ return;
2533
+ }
2534
+ const isDeclared = Math.abs(check.pitch - config.rowHeight) < PITCH_EPSILON;
2535
+ measuredPitch.value = isDeclared ? void 0 : {
2536
+ config,
2537
+ rowHeight: check.pitch
2538
+ };
2539
+ checked = /* @__PURE__ */ new WeakSet();
2540
+ if (!isDeclared) devWarn("Table", `Rows measure ${round(check.pitch)}px, not rowHeight ${round(config.rowHeight)}px. Windowing uses the measured height.`);
2541
+ }, { flush: "post" });
2542
+ return {
2543
+ isActive,
2544
+ isWindowed: window.isWindowed,
2545
+ segments: window.segments,
2546
+ rowHeight: computed(() => pitch.value?.rowHeight ?? 0),
2547
+ minRowHeight: computed(() => declared.value?.rowHeight ?? 0),
2548
+ onRowFocus: window.onItemFocus,
2549
+ onRowBlur: window.onItemBlur
2550
+ };
2551
+ }
2552
+ //#endregion
2553
+ //#region src/Table/plugins/virtualization/useTableWindowing.ts
2554
+ /** 行、列两个窗口化插件接进数据表格:放行条件、几何来源、要渲染的行和格子,以及无障碍位置。 */
2555
+ function useTableWindowing(options) {
2556
+ const contributions = computed(() => options.plugins().map((plugin) => plugin.virtualization).filter((item) => item != null));
2557
+ const rowsConfig = computed(() => contributions.value.find((item) => item.rows)?.rows?.());
2558
+ const columnsConfig = computed(() => contributions.value.find((item) => item.columns)?.columns?.());
2559
+ const identity = computed(() => resolveTableIdentity(options.rows(), options.idKey()));
2560
+ const hasFixedHeightColumns = computed(() => options.layoutColumns().every(isFixedHeightColumn));
2561
+ const shared = computed(() => sharedFallbackReason({
2562
+ plugins: options.plugins(),
2563
+ identity: identity.value,
2564
+ textOverflow: options.textOverflow()
2565
+ }) ?? (hasFixedHeightColumns.value ? void 0 : "a custom cell renderer has no fixed-height admission"));
2566
+ const sizedColumns = computed(() => options.layoutColumns().map((column) => {
2567
+ const override = options.widthOverride(column);
2568
+ return override == null ? column : {
2569
+ ...column,
2570
+ width: pixel(override)
2571
+ };
2572
+ }));
2573
+ const pitches = computed(() => {
2574
+ const floors = resolveColumnFloorWidths(sizedColumns.value);
2575
+ return sizedColumns.value.map((column) => floors.get(column.key) ?? 0);
2576
+ });
2577
+ const floorMinWidth = computed(() => pitches.value.reduce((sum, width) => sum + width, 0));
2578
+ const columnKeys = computed(() => sizedColumns.value.map((column) => column.key));
2579
+ const pinned = computed(() => {
2580
+ const keys = columnKeys.value;
2581
+ let startCount = 0;
2582
+ let endCount = 0;
2583
+ for (const plugin of options.plugins()) {
2584
+ const runs = plugin.pinnedColumns?.();
2585
+ if (runs == null) continue;
2586
+ const lastStart = keys.reduce((last, key, index) => runs.startKeys.includes(key) ? index : last, -1);
2587
+ const firstEnd = keys.findIndex((key) => runs.endKeys.includes(key));
2588
+ startCount = Math.max(startCount, lastStart + 1);
2589
+ endCount = Math.max(endCount, firstEnd === -1 ? 0 : keys.length - firstEnd);
2590
+ }
2591
+ return {
2592
+ startCount,
2593
+ endCount
2594
+ };
2595
+ });
2596
+ const geometry = useListWindowGeometry({
2597
+ viewport: options.viewport,
2598
+ start: options.body,
2599
+ isActive: () => rowsConfig.value != null || columnsConfig.value != null
2600
+ });
2601
+ const readGeometry = () => geometry.snapshot.value;
2602
+ const rows = useTableRowWindow({
2603
+ config: () => rowsConfig.value,
2604
+ keys: () => identity.value.keys,
2605
+ fallbackReason: () => shared.value ?? (options.rowIndexStart() != null || options.rowCount() != null ? "rowIndexStart and rowCount conflict with windowed row positions" : void 0),
2606
+ geometry: readGeometry,
2607
+ viewport: options.viewport,
2608
+ body: options.body
2609
+ });
2610
+ const columns = useTableColumnWindow({
2611
+ config: () => columnsConfig.value,
2612
+ keys: () => columnKeys.value,
2613
+ widths: () => pitches.value,
2614
+ pinned: () => pinned.value,
2615
+ fallbackReason: () => shared.value ?? (resolveTableMinWidth(options.consumerMinWidth(), floorMinWidth.value) !== `${floorMinWidth.value}px` ? "a table min-width wider than the column floors changes the column widths" : void 0),
2616
+ geometry: readGeometry,
2617
+ viewport: options.viewport,
2618
+ table: options.table
2619
+ });
2620
+ const textOverflow = computed(() => options.textOverflow() ?? (rows.isWindowed.value || columnsConfig.value != null ? "truncate" : "wrap"));
2621
+ const rowSlots = computed(() => {
2622
+ const count = options.rows().length;
2623
+ if (!rows.isWindowed.value) return Array.from({ length: count }, (_, index) => ({
2624
+ kind: "row",
2625
+ index
2626
+ }));
2627
+ return rows.segments.value.flatMap((segment) => segment.type === "gap" ? [{
2628
+ kind: "gap",
2629
+ key: `\u0000gap:${segment.start}:${segment.end}`,
2630
+ height: segment.height
2631
+ }] : Array.from({ length: segment.end - segment.start }, (_, offset) => ({
2632
+ kind: "row",
2633
+ index: segment.start + offset
2634
+ })));
2635
+ });
2636
+ const columnSlots = computed(() => {
2637
+ const layout = options.layoutColumns();
2638
+ const hasSelection = options.hasSelection();
2639
+ const slotAt = (position) => hasSelection && position === 0 ? {
2640
+ kind: "select",
2641
+ key: "\0select",
2642
+ position
2643
+ } : {
2644
+ kind: "column",
2645
+ key: layout[position].key,
2646
+ column: layout[position],
2647
+ position
2648
+ };
2649
+ return columns.segments.value.flatMap((segment) => segment.type === "gap" ? [{
2650
+ kind: "gap",
2651
+ key: `\u0000gap:${segment.start}`,
2652
+ width: segment.width
2653
+ }] : Array.from({ length: segment.end - segment.start }, (_, offset) => slotAt(segment.start + offset)));
2654
+ });
2655
+ const cellCount = computed(() => Math.max(1, columnSlots.value.length));
2656
+ const hasMoreRows = computed(() => options.plugins().some((plugin) => plugin.loadingState?.().hasMore === true));
2657
+ const tableAttrs = computed(() => ({
2658
+ "aria-rowcount": rows.isWindowed.value ? hasMoreRows.value ? -1 : 1 + options.rows().length : options.rowCount() != null || options.rowIndexStart() != null ? String(options.rowCount() ?? -1) : void 0,
2659
+ "aria-colcount": columns.isWindowed.value ? options.layoutColumns().length : void 0,
2660
+ "data-windowed": rows.isWindowed.value || columns.isWindowed.value ? "" : void 0
2661
+ }));
2662
+ function widthStyle(position) {
2663
+ if (!columns.isWindowed.value) return void 0;
2664
+ const width = `${pitches.value[position] ?? 0}px`;
2665
+ return {
2666
+ width,
2667
+ minWidth: width,
2668
+ maxWidth: width
2669
+ };
2670
+ }
2671
+ return {
2672
+ textOverflow,
2673
+ hasBlockViewport: rows.isActive,
2674
+ rows,
2675
+ columns,
2676
+ rowSlots,
2677
+ columnSlots,
2678
+ cellCount,
2679
+ widthStyle,
2680
+ tableAttrs,
2681
+ headerRowIndex: computed(() => rows.isWindowed.value ? 1 : void 0),
2682
+ rowAriaIndex: (index) => rows.isWindowed.value ? index + 2 : void 0,
2683
+ colAriaIndex: (position) => columns.isWindowed.value ? position + 1 : void 0,
2684
+ onRowFocusin(index) {
2685
+ const key = identity.value.keys[index];
2686
+ if (rows.isWindowed.value && key !== void 0) rows.onRowFocus(key);
2687
+ },
2688
+ onRowFocusout(event) {
2689
+ if (!rows.isWindowed.value) return;
2690
+ const row = event.currentTarget;
2691
+ const next = event.relatedTarget;
2692
+ if (!(next == null && !row.ownerDocument.hasFocus()) && !(next instanceof Node && row.contains(next))) rows.onRowBlur();
2693
+ }
2694
+ };
2695
+ }
2696
+ //#endregion
1689
2697
  //#region src/Table/rowPatch.ts
1690
2698
  /**
1691
2699
  * 把多个插件的行事件合成一个处理器,按插件顺序依次调用。
@@ -2252,17 +3260,27 @@ const _sfc_main$10 = /*@__PURE__*/ defineComponent({
2252
3260
  });
2253
3261
  //#endregion
2254
3262
  //#region src/Table/TableScroll.vue
2255
- const _hoisted_1$6 = ["aria-label", "tabindex"];
3263
+ const _hoisted_1$6 = [
3264
+ "aria-label",
3265
+ "data-block-viewport",
3266
+ "tabindex"
3267
+ ];
2256
3268
  const _sfc_main$9 = /*@__PURE__*/ defineComponent({
2257
3269
  inheritAttrs: false,
2258
3270
  __name: "TableScroll",
2259
- props: { label: {} },
3271
+ props: {
3272
+ label: {},
3273
+ hasBlockViewport: { type: Boolean }
3274
+ },
2260
3275
  emits: ["viewport"],
2261
3276
  setup(__props, { emit: __emit }) {
3277
+ const props = __props;
2262
3278
  const emit = __emit;
2263
3279
  const attrs = useAttrs();
2264
3280
  const scroll = useScrollableArea({
2265
- axis: "inline",
3281
+ get axis() {
3282
+ return props.hasBlockViewport ? "both" : "inline";
3283
+ },
2266
3284
  overscroll: "contain",
2267
3285
  keyboardAccess: { owner: "content" }
2268
3286
  });
@@ -2274,15 +3292,20 @@ const _sfc_main$9 = /*@__PURE__*/ defineComponent({
2274
3292
  emit("viewport", node);
2275
3293
  }
2276
3294
  useScrollbars(viewportEl);
2277
- const tabindex = computed(() => scroll.state.value.inline.isScrollable ? 0 : void 0);
3295
+ const tabindex = computed(() => scroll.state.value.inline.isScrollable || scroll.state.value.block.isScrollable ? 0 : void 0);
2278
3296
  const rootClass = computed(() => ["astryx-table-scroll", attrs.class]);
2279
- const rootStyle = computed(() => [attrs.style, scroll.viewportStyle.value]);
3297
+ const rootStyle = computed(() => [
3298
+ attrs.style,
3299
+ scroll.viewportStyle.value,
3300
+ props.hasBlockViewport ? { overscrollBehaviorY: "auto" } : void 0
3301
+ ]);
2280
3302
  return (_ctx, _cache) => {
2281
3303
  return openBlock(), createElementBlock("div", mergeProps({
2282
3304
  ref: bindViewport,
2283
3305
  class: rootClass.value,
2284
3306
  role: "group",
2285
3307
  "aria-label": __props.label,
3308
+ "data-block-viewport": __props.hasBlockViewport || void 0,
2286
3309
  tabindex: tabindex.value
2287
3310
  }, unref(scroll).viewportAttrs.value, { style: rootStyle.value }), [createCommentVNode("\n 表格的直接父元素永远不滚动:外层滚动区是唯一的视口。有的页面宿主给每个表格的父元素都写了\n 不在层叠层里的 overflow-x: auto,只有内联样式压得住它;两个方向都写 visible,免得一边 visible\n 一边滚动时被算成 auto。\n "), createElementVNode("div", {
2288
3311
  ref: unref(scroll).content,
@@ -2595,9 +3618,13 @@ function useTableDataModel(options) {
2595
3618
  };
2596
3619
  }
2597
3620
  const resizeContributions = computed(() => new Map(resolvedColumns.value.map((column) => [column.key, resizeContribution(column)])));
3621
+ function widthOverride(column) {
3622
+ if (column.key === selectionColumn.value.key) return void 0;
3623
+ return options.plugins().map((plugin) => plugin.widthFor?.(column)).find((value) => value != null) ?? resizeContributions.value.get(column.key)?.currentWidth;
3624
+ }
2598
3625
  function styleFor(column) {
2599
3626
  const base = { ...widths.value.columns.get(column.key)?.style ?? {} };
2600
- const override = options.plugins().map((plugin) => plugin.widthFor?.(column)).find((value) => value != null) ?? resizeContributions.value.get(column.key)?.currentWidth;
3627
+ const override = widthOverride(column);
2601
3628
  if (override != null) {
2602
3629
  base.width = `${override}px`;
2603
3630
  base.minWidth = `${override}px`;
@@ -2685,6 +3712,7 @@ function useTableDataModel(options) {
2685
3712
  filterAt,
2686
3713
  mergeCell,
2687
3714
  headerStyle,
3715
+ widthOverride,
2688
3716
  bodyStyle,
2689
3717
  selectCellPatch
2690
3718
  };
@@ -2698,42 +3726,40 @@ const _hoisted_1$5 = [
2698
3726
  "data-hover",
2699
3727
  "data-overflow",
2700
3728
  "data-valign",
2701
- "data-row-highlight",
2702
- "aria-rowcount"
3729
+ "data-row-highlight"
2703
3730
  ];
2704
- const _hoisted_2 = {
2705
- class: "astryx-table-row",
2706
- "data-header-row": ""
2707
- };
2708
- const _hoisted_3 = [
3731
+ const _hoisted_2 = ["aria-rowindex"];
3732
+ const _hoisted_3 = ["aria-colindex"];
3733
+ const _hoisted_4 = [
2709
3734
  "data-column",
2710
3735
  "data-align",
3736
+ "aria-colindex",
2711
3737
  "aria-sort",
2712
3738
  "aria-labelledby"
2713
3739
  ];
2714
- const _hoisted_4 = ["id"];
2715
- const _hoisted_5 = { class: "astryx-table__header-line" };
2716
- const _hoisted_6 = [
3740
+ const _hoisted_5 = ["id"];
3741
+ const _hoisted_6 = { class: "astryx-table__header-line" };
3742
+ const _hoisted_7 = [
2717
3743
  "data-align",
2718
3744
  "aria-describedby",
2719
3745
  "onClick"
2720
3746
  ];
2721
- const _hoisted_7 = {
3747
+ const _hoisted_8 = {
2722
3748
  key: 1,
2723
3749
  class: "astryx-table__header-label"
2724
3750
  };
2725
- const _hoisted_8 = ["data-active"];
2726
- const _hoisted_9 = {
3751
+ const _hoisted_9 = ["data-active"];
3752
+ const _hoisted_10 = {
2727
3753
  key: 2,
2728
3754
  class: "astryx-table__sort-rank",
2729
3755
  "aria-hidden": "true"
2730
3756
  };
2731
- const _hoisted_10 = ["id"];
2732
- const _hoisted_11 = {
3757
+ const _hoisted_11 = ["id"];
3758
+ const _hoisted_12 = {
2733
3759
  key: 2,
2734
3760
  class: "astryx-table__header-label"
2735
3761
  };
2736
- const _hoisted_12 = [
3762
+ const _hoisted_13 = [
2737
3763
  "aria-label",
2738
3764
  "aria-valuenow",
2739
3765
  "aria-valuemin",
@@ -2742,25 +3768,38 @@ const _hoisted_12 = [
2742
3768
  "onPointerdown",
2743
3769
  "onKeydown"
2744
3770
  ];
2745
- const _hoisted_13 = { key: 0 };
2746
- const _hoisted_14 = ["colspan"];
2747
- const _hoisted_15 = [
3771
+ const _hoisted_14 = { key: 0 };
3772
+ const _hoisted_15 = ["colspan"];
3773
+ const _hoisted_16 = {
3774
+ key: 0,
3775
+ "aria-hidden": "true",
3776
+ "data-window-gap": ""
3777
+ };
3778
+ const _hoisted_17 = ["colspan"];
3779
+ const _hoisted_18 = [
2748
3780
  "aria-selected",
2749
3781
  "aria-rowindex",
2750
3782
  "data-parity",
2751
3783
  "data-striped",
2752
3784
  "data-selected",
3785
+ "data-window-row",
2753
3786
  "onBlur",
2754
3787
  "onClick",
2755
3788
  "onContextmenu",
2756
3789
  "onFocus",
3790
+ "onFocusin",
2757
3791
  "onMouseenter",
2758
3792
  "onMouseleave"
2759
3793
  ];
2760
- const _hoisted_16 = ["colspan"];
2761
- const _hoisted_17 = ["data-column", "data-align"];
2762
- const _hoisted_18 = ["data-variant"];
2763
3794
  const _hoisted_19 = ["colspan"];
3795
+ const _hoisted_20 = ["aria-colindex"];
3796
+ const _hoisted_21 = [
3797
+ "data-column",
3798
+ "data-align",
3799
+ "aria-colindex"
3800
+ ];
3801
+ const _hoisted_22 = ["data-variant"];
3802
+ const _hoisted_23 = ["colspan"];
2764
3803
  const _sfc_main$8 = /*@__PURE__*/ defineComponent({
2765
3804
  inheritAttrs: false,
2766
3805
  __name: "TableData",
@@ -2788,12 +3827,33 @@ const _sfc_main$8 = /*@__PURE__*/ defineComponent({
2788
3827
  /** 排序按钮描述(多列排序时的优先级)的 id 前缀,后面接列的序号。 */
2789
3828
  const sortIdBase = useId();
2790
3829
  const scrollRoot = ref(null);
3830
+ const tableEl = ref(null);
3831
+ const bodyEl = ref(null);
2791
3832
  const menu = ref(null);
2792
3833
  const scrollStyle = computed(() => splitStyleMinWidth(attrs.style).style);
2793
- const { resolvedColumns, layoutColumns, selection, widths, resizeContributions, sortFor, filterAt, mergeCell, headerStyle, bodyStyle, selectCellPatch } = useTableDataModel({
3834
+ const { layoutColumns, selection, widths, resizeContributions, sortFor, filterAt, mergeCell, headerStyle, widthOverride, bodyStyle, selectCellPatch } = useTableDataModel({
2794
3835
  columns: () => props.columns,
2795
3836
  plugins: () => props.plugins
2796
3837
  });
3838
+ const windowing = useTableWindowing({
3839
+ rows: () => props.rows,
3840
+ plugins: () => props.plugins,
3841
+ idKey: () => props.idKey,
3842
+ textOverflow: () => props.textOverflow,
3843
+ rowIndexStart: () => props.rowIndexStart,
3844
+ rowCount: () => props.rowCount,
3845
+ layoutColumns: () => layoutColumns.value,
3846
+ hasSelection: () => selection.value != null,
3847
+ widthOverride,
3848
+ consumerMinWidth: () => splitStyleMinWidth(attrs.style).minWidth,
3849
+ viewport: () => scrollRoot.value,
3850
+ table: () => tableEl.value,
3851
+ body: () => bodyEl.value
3852
+ });
3853
+ const { textOverflow: resolvedTextOverflow, hasBlockViewport, rowSlots, columnSlots, cellCount, widthStyle, tableAttrs, headerRowIndex, rowAriaIndex, colAriaIndex, onRowFocusin, onRowFocusout } = windowing;
3854
+ const isRowWindowed = windowing.rows.isWindowed;
3855
+ const minRowHeight = windowing.rows.minRowHeight;
3856
+ const columnWindow = windowing.columns;
2797
3857
  const { startResize, onResizeKeydown, resizeLabel } = useTableColumnResizeSession({
2798
3858
  plugins: () => props.plugins,
2799
3859
  contributions: () => resizeContributions.value,
@@ -2803,10 +3863,6 @@ const _sfc_main$8 = /*@__PURE__*/ defineComponent({
2803
3863
  const tableStyle = computed(() => ({ minWidth: resolveTableMinWidth(splitStyleMinWidth(attrs.style).minWidth, widths.value.tableMinWidth) }));
2804
3864
  const columnCount = computed(() => layoutColumns.value.length);
2805
3865
  const trackRows = computed(() => props.rowCount != null || props.rowIndexStart != null);
2806
- const ariaRowCount = computed(() => {
2807
- if (!trackRows.value) return void 0;
2808
- return String(props.rowCount ?? -1);
2809
- });
2810
3866
  function bindScroll(element) {
2811
3867
  for (const plugin of props.plugins) plugin.bindScrollRoot?.(element);
2812
3868
  }
@@ -2843,17 +3899,22 @@ const _sfc_main$8 = /*@__PURE__*/ defineComponent({
2843
3899
  callback(element);
2844
3900
  };
2845
3901
  }
3902
+ /** 要渲染的行:窗口化时只有挂载的行,中间夹着占位行。 */
2846
3903
  const entries = computed(() => {
2847
3904
  let ordinal = 0;
2848
3905
  const start = props.rowIndexStart ?? 1;
2849
- return props.rows.map((row, index) => {
3906
+ return rowSlots.value.map((slot) => {
3907
+ if (slot.kind === "gap") return slot;
3908
+ const index = slot.index;
3909
+ const row = props.rows[index];
2850
3910
  const patch = mergeRowPatches(props.plugins, row, index, columnCount.value);
2851
- let rowIndex;
3911
+ let rowIndex = rowAriaIndex(index);
2852
3912
  if (trackRows.value && !patch.skipRowIndex) {
2853
3913
  rowIndex = start + ordinal;
2854
3914
  ordinal += 1;
2855
3915
  }
2856
3916
  return {
3917
+ kind: "row",
2857
3918
  key: rowKey(row, index),
2858
3919
  row,
2859
3920
  index,
@@ -2863,6 +3924,15 @@ const _sfc_main$8 = /*@__PURE__*/ defineComponent({
2863
3924
  };
2864
3925
  });
2865
3926
  });
3927
+ const rowStyle = computed(() => isRowWindowed.value ? { height: `${minRowHeight.value}px` } : void 0);
3928
+ function gapStyle(size, axis) {
3929
+ const value = `${size}px`;
3930
+ return axis === "block" ? { height: value } : {
3931
+ width: value,
3932
+ minWidth: value,
3933
+ maxWidth: value
3934
+ };
3935
+ }
2866
3936
  function openMenu(event, items) {
2867
3937
  if (items == null || items.length === 0) return;
2868
3938
  event.preventDefault();
@@ -2885,6 +3955,7 @@ const _sfc_main$8 = /*@__PURE__*/ defineComponent({
2885
3955
  class: normalizeClass(unref(attrs).class),
2886
3956
  style: normalizeStyle(scrollStyle.value),
2887
3957
  label: __props.label,
3958
+ "has-block-viewport": unref(hasBlockViewport),
2888
3959
  onViewport
2889
3960
  }, {
2890
3961
  default: withCtx(() => [
@@ -2895,197 +3966,241 @@ const _sfc_main$8 = /*@__PURE__*/ defineComponent({
2895
3966
  place: "above"
2896
3967
  }, null, 8, ["plugin"]);
2897
3968
  }), 128)),
2898
- createElementVNode("table", {
3969
+ createElementVNode("table", mergeProps({
3970
+ ref_key: "tableEl",
3971
+ ref: tableEl,
2899
3972
  class: "astryx-table",
2900
3973
  "data-layout": "fixed",
2901
3974
  "data-density": __props.density,
2902
3975
  "data-dividers": __props.dividers,
2903
3976
  "data-striped": __props.isStriped || void 0,
2904
3977
  "data-hover": __props.hasHover || void 0,
2905
- "data-overflow": __props.textOverflow,
3978
+ "data-overflow": unref(resolvedTextOverflow),
2906
3979
  "data-valign": __props.verticalAlign,
2907
- "data-row-highlight": unref(selection)?.hasRowHighlight === false ? "off" : void 0,
2908
- "aria-rowcount": ariaRowCount.value,
2909
- style: normalizeStyle(tableStyle.value)
2910
- }, [createElementVNode("thead", {
3980
+ "data-row-highlight": unref(selection)?.hasRowHighlight === false ? "off" : void 0
3981
+ }, unref(tableAttrs), {
3982
+ style: tableStyle.value,
3983
+ onFocusin: _cache[6] || (_cache[6] = (...args) => unref(columnWindow).onFocusin && unref(columnWindow).onFocusin(...args)),
3984
+ onFocusout: _cache[7] || (_cache[7] = (...args) => unref(columnWindow).onFocusout && unref(columnWindow).onFocusout(...args))
3985
+ }), [createElementVNode("thead", {
2911
3986
  onFocusin: _cache[1] || (_cache[1] = (...args) => unref(headerCutText).onFocusin && unref(headerCutText).onFocusin(...args)),
2912
3987
  onFocusout: _cache[2] || (_cache[2] = (...args) => unref(headerCutText).onFocusout && unref(headerCutText).onFocusout(...args)),
2913
3988
  onPointerdown: _cache[3] || (_cache[3] = (...args) => unref(headerCutText).onPointerdown && unref(headerCutText).onPointerdown(...args)),
2914
3989
  onKeydown: _cache[4] || (_cache[4] = (...args) => unref(headerCutText).onKeydown && unref(headerCutText).onKeydown(...args))
2915
- }, [createElementVNode("tr", _hoisted_2, [unref(selection) ? (openBlock(), createElementBlock("th", mergeProps({
2916
- key: 0,
2917
- class: ["astryx-table__select", unref(selectCellPatch)("header", null).class],
2918
- scope: "col"
2919
- }, unref(selectCellPatch)("header", null).attrs, { style: unref(selectCellPatch)("header", null).style }), [createVNode(_sfc_main$21, {
2920
- "model-value": unref(selection).isIndeterminate() ? "indeterminate" : unref(selection).isAllSelected(),
2921
- label: unref(messages).table.selectAllRows,
2922
- "is-label-hidden": "",
2923
- size: "sm",
2924
- "onUpdate:modelValue": _cache[0] || (_cache[0] = (value) => unref(selection)?.selectAll(value === true))
2925
- }, null, 8, ["model-value", "label"])], 16)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(resolvedColumns), (column, columnIndex) => {
2926
- return openBlock(), createElementBlock("th", mergeProps({
2927
- key: column.key,
3990
+ }, [createElementVNode("tr", {
3991
+ class: "astryx-table-row",
3992
+ "data-header-row": "",
3993
+ "aria-rowindex": unref(headerRowIndex)
3994
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(columnSlots), (slot) => {
3995
+ return openBlock(), createElementBlock(Fragment, { key: slot.key }, [createCommentVNode(" eslint-disable-next-line vue-a11y/no-aria-hidden-on-focusable -- 占位格不可聚焦,只替没挂载的行列占位置;规则把所有 td 都当成可交互的格子。 "), slot.kind === "gap" ? (openBlock(), createElementBlock("td", {
3996
+ key: 0,
3997
+ "aria-hidden": "true",
3998
+ "data-window-gap": "",
3999
+ style: normalizeStyle(gapStyle(slot.width, "inline"))
4000
+ }, null, 4)) : slot.kind === "select" && unref(selection) ? (openBlock(), createElementBlock("th", mergeProps({
4001
+ key: 1,
4002
+ class: ["astryx-table__select", unref(selectCellPatch)("header", null).class],
4003
+ scope: "col"
4004
+ }, { ref_for: true }, unref(selectCellPatch)("header", null).attrs, {
4005
+ "aria-colindex": unref(colAriaIndex)(slot.position),
4006
+ style: unref(selectCellPatch)("header", null).style
4007
+ }), [createVNode(_sfc_main$21, {
4008
+ "model-value": unref(selection).isIndeterminate() ? "indeterminate" : unref(selection).isAllSelected(),
4009
+ label: unref(messages).table.selectAllRows,
4010
+ "is-label-hidden": "",
4011
+ size: "sm",
4012
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = (value) => unref(selection)?.selectAll(value === true))
4013
+ }, null, 8, ["model-value", "label"])], 16, _hoisted_3)) : slot.kind === "column" ? (openBlock(), createElementBlock("th", mergeProps({
4014
+ key: 2,
2928
4015
  scope: "col",
2929
- "data-column": column.key,
2930
- "data-align": column.align,
2931
- class: unref(mergeCell)(column, null, "header").class
2932
- }, { ref_for: true }, unref(mergeCell)(column, null, "header").attrs, {
2933
- style: unref(headerStyle)(column),
2934
- "aria-sort": unref(sortFor)(column)?.direction ?? void 0,
2935
- "aria-labelledby": unref(resizeContributions).get(column.key)?.hasHandle ? headerContentId(columnIndex) : void 0
4016
+ "data-column": slot.column.key,
4017
+ "data-align": slot.column.align,
4018
+ class: unref(mergeCell)(slot.column, null, "header").class
4019
+ }, { ref_for: true }, unref(mergeCell)(slot.column, null, "header").attrs, {
4020
+ "aria-colindex": unref(colAriaIndex)(slot.position),
4021
+ style: [unref(headerStyle)(slot.column), unref(widthStyle)(slot.position)],
4022
+ "aria-sort": unref(sortFor)(slot.column)?.direction ?? void 0,
4023
+ "aria-labelledby": unref(resizeContributions).get(slot.column.key)?.hasHandle ? headerContentId(slot.position) : void 0
2936
4024
  }), [
2937
4025
  createElementVNode("div", {
2938
- id: headerContentId(columnIndex),
4026
+ id: headerContentId(slot.position),
2939
4027
  class: "astryx-table__header"
2940
- }, [createElementVNode("div", _hoisted_5, [
4028
+ }, [createElementVNode("div", _hoisted_6, [
2941
4029
  createVNode(unref(HeaderAddon), {
2942
- column,
4030
+ column: slot.column,
2943
4031
  plugins: __props.plugins
2944
4032
  }, null, 8, ["column", "plugins"]),
2945
- unref(sortFor)(column) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("button", {
4033
+ unref(sortFor)(slot.column) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("button", {
2946
4034
  type: "button",
2947
4035
  class: "astryx-table__sort",
2948
- "data-align": column.align,
2949
- "aria-describedby": unref(sortFor)(column)?.description ? `${unref(sortIdBase)}-${columnIndex}` : void 0,
2950
- onClick: ($event) => unref(sortFor)(column)?.onClick($event)
4036
+ "data-align": slot.column.align,
4037
+ "aria-describedby": unref(sortFor)(slot.column)?.description ? `${unref(sortIdBase)}-${slot.position}` : void 0,
4038
+ onClick: ($event) => unref(sortFor)(slot.column)?.onClick($event)
2951
4039
  }, [
2952
- column.headerHidden ? (openBlock(), createBlock(_sfc_main$19, { key: 0 }, {
2953
- default: withCtx(() => [createTextVNode(toDisplayString(unref(columnHeaderText)(column)), 1)]),
4040
+ slot.column.headerHidden ? (openBlock(), createBlock(_sfc_main$19, { key: 0 }, {
4041
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(columnHeaderText)(slot.column)), 1)]),
2954
4042
  _: 2
2955
- }, 1024)) : (openBlock(), createElementBlock("span", _hoisted_7, [createVNode(HeaderContent, { column }, null, 8, ["column"])])),
4043
+ }, 1024)) : (openBlock(), createElementBlock("span", _hoisted_8, [createVNode(HeaderContent, { column: slot.column }, null, 8, ["column"])])),
2956
4044
  createElementVNode("span", {
2957
4045
  class: "astryx-table__sort-icon",
2958
- "data-active": unref(sortFor)(column)?.direction != null || void 0
4046
+ "data-active": unref(sortFor)(slot.column)?.direction != null || void 0
2959
4047
  }, [createVNode(_sfc_main$22, {
2960
4048
  "icon-slot": "table-sort-indicator",
2961
- state: { direction: unref(sortFor)(column)?.direction ?? "none" },
4049
+ state: { direction: unref(sortFor)(slot.column)?.direction ?? "none" },
2962
4050
  fallback: {
2963
- icon: unref(sortFor)(column)?.direction === "descending" ? "arrowDown" : "arrowUp",
4051
+ icon: unref(sortFor)(slot.column)?.direction === "descending" ? "arrowDown" : "arrowUp",
2964
4052
  size: "xsm"
2965
4053
  }
2966
- }, null, 8, ["state", "fallback"])], 8, _hoisted_8),
2967
- unref(sortFor)(column)?.rank ? (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString(unref(sortFor)(column)?.rank), 1)) : createCommentVNode("v-if", true)
2968
- ], 8, _hoisted_6), unref(sortFor)(column)?.description ? (openBlock(), createElementBlock("span", {
4054
+ }, null, 8, ["state", "fallback"])], 8, _hoisted_9),
4055
+ unref(sortFor)(slot.column)?.rank ? (openBlock(), createElementBlock("span", _hoisted_10, toDisplayString(unref(sortFor)(slot.column)?.rank), 1)) : createCommentVNode("v-if", true)
4056
+ ], 8, _hoisted_7), unref(sortFor)(slot.column)?.description ? (openBlock(), createElementBlock("span", {
2969
4057
  key: 0,
2970
- id: `${unref(sortIdBase)}-${columnIndex}`,
4058
+ id: `${unref(sortIdBase)}-${slot.position}`,
2971
4059
  hidden: ""
2972
- }, toDisplayString(unref(sortFor)(column)?.description), 9, _hoisted_10)) : createCommentVNode("v-if", true)], 64)) : column.headerHidden ? (openBlock(), createBlock(_sfc_main$19, { key: 1 }, {
2973
- default: withCtx(() => [createTextVNode(toDisplayString(unref(columnHeaderText)(column)), 1)]),
4060
+ }, toDisplayString(unref(sortFor)(slot.column)?.description), 9, _hoisted_11)) : createCommentVNode("v-if", true)], 64)) : slot.column.headerHidden ? (openBlock(), createBlock(_sfc_main$19, { key: 1 }, {
4061
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(columnHeaderText)(slot.column)), 1)]),
2974
4062
  _: 2
2975
- }, 1024)) : (openBlock(), createElementBlock("span", _hoisted_11, [createVNode(HeaderContent, { column }, null, 8, ["column"])])),
2976
- unref(filterAt)(column, "line") ? (openBlock(), createBlock(_sfc_main$12, {
4063
+ }, 1024)) : (openBlock(), createElementBlock("span", _hoisted_12, [createVNode(HeaderContent, { column: slot.column }, null, 8, ["column"])])),
4064
+ unref(filterAt)(slot.column, "line") ? (openBlock(), createBlock(_sfc_main$12, {
2977
4065
  key: 3,
2978
- filter: unref(filterAt)(column, "line")
4066
+ filter: unref(filterAt)(slot.column, "line")
2979
4067
  }, null, 8, ["filter"])) : createCommentVNode("v-if", true)
2980
- ]), unref(filterAt)(column, "below") ? (openBlock(), createBlock(_sfc_main$12, {
4068
+ ]), unref(filterAt)(slot.column, "below") ? (openBlock(), createBlock(_sfc_main$12, {
2981
4069
  key: 0,
2982
- filter: unref(filterAt)(column, "below")
2983
- }, null, 8, ["filter"])) : createCommentVNode("v-if", true)], 8, _hoisted_4),
4070
+ filter: unref(filterAt)(slot.column, "below")
4071
+ }, null, 8, ["filter"])) : createCommentVNode("v-if", true)], 8, _hoisted_5),
2984
4072
  createCommentVNode(" eslint-disable-next-line vue-a11y/no-static-element-interactions -- role=\"separator\" 是 WAI-ARIA 的分隔条:自己可聚焦,方向键也归它处理。 "),
2985
- unref(resizeContributions).get(column.key)?.hasHandle ? (openBlock(), createElementBlock("span", {
4073
+ unref(resizeContributions).get(slot.column.key)?.hasHandle ? (openBlock(), createElementBlock("span", {
2986
4074
  key: 0,
2987
4075
  ref_for: true,
2988
- ref: (element) => unref(resizeAria).observeHandle(column.key, element),
4076
+ ref: (element) => unref(resizeAria).observeHandle(slot.column.key, element),
2989
4077
  class: "astryx-table__resize",
2990
4078
  role: "separator",
2991
4079
  "aria-orientation": "vertical",
2992
- "aria-label": unref(resizeLabel)(column),
2993
- "aria-valuenow": unref(resizeAria).ariaValue(column.key, unref(resizeContributions).get(column.key)).now,
2994
- "aria-valuemin": unref(resizeAria).ariaValue(column.key, unref(resizeContributions).get(column.key)).min,
2995
- "aria-valuemax": unref(resizeAria).ariaValue(column.key, unref(resizeContributions).get(column.key)).max,
2996
- "aria-valuetext": unref(resizeAria).ariaValue(column.key, unref(resizeContributions).get(column.key)).text,
4080
+ "aria-label": unref(resizeLabel)(slot.column),
4081
+ "aria-valuenow": unref(resizeAria).ariaValue(slot.column.key, unref(resizeContributions).get(slot.column.key)).now,
4082
+ "aria-valuemin": unref(resizeAria).ariaValue(slot.column.key, unref(resizeContributions).get(slot.column.key)).min,
4083
+ "aria-valuemax": unref(resizeAria).ariaValue(slot.column.key, unref(resizeContributions).get(slot.column.key)).max,
4084
+ "aria-valuetext": unref(resizeAria).ariaValue(slot.column.key, unref(resizeContributions).get(slot.column.key)).text,
2997
4085
  tabindex: "0",
2998
- onPointerdown: ($event) => unref(startResize)($event, column),
2999
- onKeydown: ($event) => unref(onResizeKeydown)($event, column)
3000
- }, null, 40, _hoisted_12)) : createCommentVNode("v-if", true)
3001
- ], 16, _hoisted_3);
3002
- }), 128))]), unref(headerCutText).cutText.value != null ? (openBlock(), createBlock(_sfc_main$18, {
4086
+ onPointerdown: ($event) => unref(startResize)($event, slot.column),
4087
+ onKeydown: ($event) => unref(onResizeKeydown)($event, slot.column)
4088
+ }, null, 40, _hoisted_13)) : createCommentVNode("v-if", true)
4089
+ ], 16, _hoisted_4)) : createCommentVNode("v-if", true)], 64);
4090
+ }), 128))], 8, _hoisted_2), unref(headerCutText).cutText.value != null ? (openBlock(), createBlock(_sfc_main$18, {
3003
4091
  key: 0,
3004
4092
  anchor: unref(headerCutText).cell.value,
3005
4093
  text: unref(headerCutText).cutText.value
3006
- }, null, 8, ["anchor", "text"])) : createCommentVNode("v-if", true)], 32), createElementVNode("tbody", null, [__props.rows.length === 0 && !isLoadingRows.value ? (openBlock(), createElementBlock("tr", _hoisted_13, [createElementVNode("td", {
4094
+ }, null, 8, ["anchor", "text"])) : createCommentVNode("v-if", true)], 32), createElementVNode("tbody", {
4095
+ ref_key: "bodyEl",
4096
+ ref: bodyEl
4097
+ }, [__props.rows.length === 0 && !isLoadingRows.value ? (openBlock(), createElementBlock("tr", _hoisted_14, [createElementVNode("td", {
3007
4098
  class: "astryx-table__empty",
3008
- colspan: columnCount.value
3009
- }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(unref(messages).table.noData), 1)])], 8, _hoisted_14)])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(entries.value, (entry) => {
3010
- return openBlock(), createElementBlock(Fragment, { key: entry.key }, [createElementVNode("tr", mergeProps({
3011
- ref_for: true,
3012
- ref: entry.ref,
3013
- "aria-selected": !entry.patch.group && isSelected(entry.row) ? "true" : void 0,
3014
- "aria-rowindex": entry.rowIndex,
3015
- class: ["astryx-table-row", entry.patch.class],
3016
- "data-parity": entry.index % 2 === 0 ? "odd" : "even",
3017
- "data-striped": __props.isStriped ? "striped" : void 0,
3018
- "data-selected": !entry.patch.group && isSelected(entry.row) ? "selected" : void 0
3019
- }, { ref_for: true }, entry.patch.attrs, {
3020
- onBlur: ($event) => entry.patch.listeners?.onBlur?.($event),
3021
- onClick: ($event) => entry.patch.onClick?.($event),
3022
- onContextmenu: ($event) => openMenu($event, entry.patch.menu),
3023
- onFocus: ($event) => entry.patch.listeners?.onFocus?.($event),
3024
- onMouseenter: ($event) => entry.patch.listeners?.onMouseenter?.($event),
3025
- onMouseleave: ($event) => entry.patch.listeners?.onMouseleave?.($event)
3026
- }), [entry.patch.group ? (openBlock(), createElementBlock("td", {
3027
- key: 0,
3028
- class: "astryx-table__group",
3029
- colspan: columnCount.value
3030
- }, [createVNode(_sfc_main$11, {
3031
- "group-key": entry.patch.group.groupKey,
3032
- count: entry.patch.group.count,
3033
- collapsed: entry.patch.group.collapsed,
3034
- custom: entry.patch.group.render != null,
3035
- onToggle: ($event) => entry.patch.group.onToggle()
3036
- }, {
3037
- default: withCtx(() => [entry.patch.group.render ? (openBlock(), createBlock(unref(RenderFn), {
4099
+ colspan: unref(cellCount)
4100
+ }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(unref(messages).table.noData), 1)])], 8, _hoisted_15)])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(entries.value, (entry) => {
4101
+ return openBlock(), createElementBlock(Fragment, { key: entry.key }, [
4102
+ createCommentVNode(" eslint-disable-next-line vue-a11y/no-aria-hidden-on-focusable -- 占位格不可聚焦,只替没挂载的行列占位置;规则把所有 td 都当成可交互的格子。 "),
4103
+ entry.kind === "gap" ? (openBlock(), createElementBlock("tr", _hoisted_16, [createElementVNode("td", {
4104
+ "data-window-gap": "",
4105
+ colspan: unref(cellCount),
4106
+ style: normalizeStyle(gapStyle(entry.height, "block"))
4107
+ }, null, 12, _hoisted_17)])) : (openBlock(), createElementBlock("tr", mergeProps({
4108
+ key: 1,
4109
+ ref_for: true,
4110
+ ref: entry.ref,
4111
+ "aria-selected": !entry.patch.group && isSelected(entry.row) ? "true" : void 0,
4112
+ "aria-rowindex": entry.rowIndex,
4113
+ class: ["astryx-table-row", entry.patch.class],
4114
+ "data-parity": entry.index % 2 === 0 ? "odd" : "even",
4115
+ "data-striped": __props.isStriped ? "striped" : void 0,
4116
+ "data-selected": !entry.patch.group && isSelected(entry.row) ? "selected" : void 0,
4117
+ "data-window-row": unref(isRowWindowed) || void 0,
4118
+ style: rowStyle.value
4119
+ }, { ref_for: true }, entry.patch.attrs, {
4120
+ onBlur: ($event) => entry.patch.listeners?.onBlur?.($event),
4121
+ onClick: ($event) => entry.patch.onClick?.($event),
4122
+ onContextmenu: ($event) => openMenu($event, entry.patch.menu),
4123
+ onFocus: ($event) => entry.patch.listeners?.onFocus?.($event),
4124
+ onFocusin: ($event) => unref(onRowFocusin)(entry.index),
4125
+ onFocusout: _cache[5] || (_cache[5] = (...args) => unref(onRowFocusout) && unref(onRowFocusout)(...args)),
4126
+ onMouseenter: ($event) => entry.patch.listeners?.onMouseenter?.($event),
4127
+ onMouseleave: ($event) => entry.patch.listeners?.onMouseleave?.($event)
4128
+ }), [entry.patch.group ? (openBlock(), createElementBlock("td", {
3038
4129
  key: 0,
3039
- render: entry.patch.group.render
3040
- }, null, 8, ["render"])) : createCommentVNode("v-if", true)]),
3041
- _: 2
3042
- }, 1032, [
3043
- "group-key",
3044
- "count",
3045
- "collapsed",
3046
- "custom",
3047
- "onToggle"
3048
- ])], 8, _hoisted_16)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [unref(selection) && !entry.patch.suppressSelection ? (openBlock(), createElementBlock("td", mergeProps({
3049
- key: 0,
3050
- class: ["astryx-table__select", unref(selectCellPatch)("body", entry.row).class]
3051
- }, { ref_for: true }, unref(selectCellPatch)("body", entry.row).attrs, { style: unref(selectCellPatch)("body", entry.row).style }), [unref(selection).isSelectable?.(entry.row) !== false ? (openBlock(), createBlock(_sfc_main$21, {
3052
- key: 0,
3053
- "model-value": unref(selection).isSelected(entry.row),
3054
- label: unref(selection).rowLabel?.(entry.row) ? unref(messages).table.selectRowNamed(unref(selection).rowLabel(entry.row)) : unref(messages).table.selectRow,
3055
- "is-label-hidden": "",
3056
- size: "sm",
3057
- "is-disabled": !isEnabled(entry.row),
3058
- "onUpdate:modelValue": (value) => unref(selection)?.selectRow(entry.row, value === true)
3059
- }, null, 8, [
3060
- "model-value",
3061
- "label",
3062
- "is-disabled",
3063
- "onUpdate:modelValue"
3064
- ])) : createCommentVNode("v-if", true)], 16)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(resolvedColumns), (column) => {
3065
- return openBlock(), createElementBlock("td", mergeProps({
3066
- key: column.key,
3067
- "data-column": column.key,
3068
- "data-align": column.align,
3069
- class: unref(mergeCell)(column, entry.row, "body").class
3070
- }, { ref_for: true }, unref(mergeCell)(column, entry.row, "body").attrs, { style: unref(bodyStyle)(column, entry.row) }), [createVNode(unref(CellContent), {
3071
- column,
3072
- row: entry.row,
3073
- index: entry.index
3074
- }, null, 8, [
3075
- "column",
3076
- "row",
3077
- "index"
3078
- ])], 16, _hoisted_17);
3079
- }), 128))], 64))], 16, _hoisted_15), entry.patch.panel ? (openBlock(), createElementBlock("tr", {
3080
- key: 0,
3081
- "data-expansion-panel": "",
3082
- class: "astryx-table__panel-row",
3083
- "data-variant": entry.patch.panel.variant
3084
- }, [createElementVNode("td", {
3085
- class: "astryx-table__panel",
3086
- colspan: columnCount.value
3087
- }, [createVNode(unref(RenderFn), { render: entry.patch.panel.render }, null, 8, ["render"])], 8, _hoisted_19)], 8, _hoisted_18)) : createCommentVNode("v-if", true)], 64);
3088
- }), 128))])], 12, _hoisted_1$5),
4130
+ class: "astryx-table__group",
4131
+ colspan: unref(cellCount)
4132
+ }, [createVNode(_sfc_main$11, {
4133
+ "group-key": entry.patch.group.groupKey,
4134
+ count: entry.patch.group.count,
4135
+ collapsed: entry.patch.group.collapsed,
4136
+ custom: entry.patch.group.render != null,
4137
+ onToggle: ($event) => entry.patch.group.onToggle()
4138
+ }, {
4139
+ default: withCtx(() => [entry.patch.group.render ? (openBlock(), createBlock(unref(RenderFn), {
4140
+ key: 0,
4141
+ render: entry.patch.group.render
4142
+ }, null, 8, ["render"])) : createCommentVNode("v-if", true)]),
4143
+ _: 2
4144
+ }, 1032, [
4145
+ "group-key",
4146
+ "count",
4147
+ "collapsed",
4148
+ "custom",
4149
+ "onToggle"
4150
+ ])], 8, _hoisted_19)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(entry.patch.group ? [] : unref(columnSlots), (slot) => {
4151
+ return openBlock(), createElementBlock(Fragment, { key: slot.key }, [createCommentVNode(" eslint-disable-next-line vue-a11y/no-aria-hidden-on-focusable -- 占位格不可聚焦,只替没挂载的行列占位置;规则把所有 td 都当成可交互的格子。 "), slot.kind === "gap" ? (openBlock(), createElementBlock("td", {
4152
+ key: 0,
4153
+ "aria-hidden": "true",
4154
+ "data-window-gap": "",
4155
+ style: normalizeStyle(gapStyle(slot.width, "inline"))
4156
+ }, null, 4)) : slot.kind === "select" && unref(selection) && !entry.patch.suppressSelection ? (openBlock(), createElementBlock("td", mergeProps({
4157
+ key: 1,
4158
+ class: ["astryx-table__select", unref(selectCellPatch)("body", entry.row).class]
4159
+ }, { ref_for: true }, unref(selectCellPatch)("body", entry.row).attrs, {
4160
+ "aria-colindex": unref(colAriaIndex)(slot.position),
4161
+ style: unref(selectCellPatch)("body", entry.row).style
4162
+ }), [unref(selection).isSelectable?.(entry.row) !== false ? (openBlock(), createBlock(_sfc_main$21, {
4163
+ key: 0,
4164
+ "model-value": unref(selection).isSelected(entry.row),
4165
+ label: unref(selection).rowLabel?.(entry.row) ? unref(messages).table.selectRowNamed(unref(selection).rowLabel(entry.row)) : unref(messages).table.selectRow,
4166
+ "is-label-hidden": "",
4167
+ size: "sm",
4168
+ "is-disabled": !isEnabled(entry.row),
4169
+ "onUpdate:modelValue": (value) => unref(selection)?.selectRow(entry.row, value === true)
4170
+ }, null, 8, [
4171
+ "model-value",
4172
+ "label",
4173
+ "is-disabled",
4174
+ "onUpdate:modelValue"
4175
+ ])) : createCommentVNode("v-if", true)], 16, _hoisted_20)) : slot.kind === "column" ? (openBlock(), createElementBlock("td", mergeProps({
4176
+ key: 2,
4177
+ "data-column": slot.column.key,
4178
+ "data-align": slot.column.align,
4179
+ class: unref(mergeCell)(slot.column, entry.row, "body").class
4180
+ }, { ref_for: true }, unref(mergeCell)(slot.column, entry.row, "body").attrs, {
4181
+ "aria-colindex": unref(colAriaIndex)(slot.position),
4182
+ style: unref(bodyStyle)(slot.column, entry.row)
4183
+ }), [createVNode(unref(CellContent), {
4184
+ column: slot.column,
4185
+ row: entry.row,
4186
+ index: entry.index
4187
+ }, null, 8, [
4188
+ "column",
4189
+ "row",
4190
+ "index"
4191
+ ])], 16, _hoisted_21)) : createCommentVNode("v-if", true)], 64);
4192
+ }), 128))], 16, _hoisted_18)),
4193
+ entry.kind === "row" && entry.patch.panel ? (openBlock(), createElementBlock("tr", {
4194
+ key: 2,
4195
+ "data-expansion-panel": "",
4196
+ class: "astryx-table__panel-row",
4197
+ "data-variant": entry.patch.panel.variant
4198
+ }, [createElementVNode("td", {
4199
+ class: "astryx-table__panel",
4200
+ colspan: unref(cellCount)
4201
+ }, [createVNode(unref(RenderFn), { render: entry.patch.panel.render }, null, 8, ["render"])], 8, _hoisted_23)], 8, _hoisted_22)) : createCommentVNode("v-if", true)
4202
+ ], 64);
4203
+ }), 128))], 512)], 16, _hoisted_1$5),
3089
4204
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.plugins.filter((item) => item.below), (plugin, index) => {
3090
4205
  return openBlock(), createBlock(unref(PluginFooter), {
3091
4206
  key: `below-${index}`,
@@ -3098,7 +4213,7 @@ const _sfc_main$8 = /*@__PURE__*/ defineComponent({
3098
4213
  x: menu.value.x,
3099
4214
  y: menu.value.y,
3100
4215
  items: menu.value.items,
3101
- onClose: _cache[5] || (_cache[5] = ($event) => menu.value = null)
4216
+ onClose: _cache[8] || (_cache[8] = ($event) => menu.value = null)
3102
4217
  }, null, 8, [
3103
4218
  "x",
3104
4219
  "y",
@@ -3109,7 +4224,8 @@ const _sfc_main$8 = /*@__PURE__*/ defineComponent({
3109
4224
  }, 8, [
3110
4225
  "class",
3111
4226
  "style",
3112
- "label"
4227
+ "label",
4228
+ "has-block-viewport"
3113
4229
  ]);
3114
4230
  };
3115
4231
  }
@@ -3166,7 +4282,7 @@ const _sfc_main$7 = /*@__PURE__*/ defineComponent({
3166
4282
  default: false
3167
4283
  },
3168
4284
  verticalAlign: { default: "middle" },
3169
- textOverflow: { default: "wrap" },
4285
+ textOverflow: { default: void 0 },
3170
4286
  plugins: {},
3171
4287
  label: {}
3172
4288
  },
@@ -3232,7 +4348,7 @@ const _sfc_main$7 = /*@__PURE__*/ defineComponent({
3232
4348
  "data-dividers": __props.dividers,
3233
4349
  "data-striped": __props.isStriped || void 0,
3234
4350
  "data-hover": __props.hasHover || void 0,
3235
- "data-overflow": __props.textOverflow,
4351
+ "data-overflow": __props.textOverflow ?? "wrap",
3236
4352
  "data-valign": __props.verticalAlign
3237
4353
  }, [renderSlot(_ctx.$slots, "default")], 14, _hoisted_1$4)]),
3238
4354
  _: 3
@@ -3418,4 +4534,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
3418
4534
  }
3419
4535
  });
3420
4536
  //#endregion
3421
- export { useTableFiltering as A, cellText as B, isInteractiveRowClick as C, useTableGroupedRows as D, isTableGroupHeader as E, columnResizeStep as F, resolveColumnFloorWidths as G, paginateData as H, isProportionalColumnWidth as I, resolveColumnWidths as K, resizeColumnWidths as L, useTableColumnSettingsState as M, columnResizeDirectionSign as N, applyTableFilters as O, columnResizeMinWidth as P, useTableColumnResize as R, useTablePagination as S, buildGroupedRows as T, pixel as U, generateColumns as V, proportional as W, useTableSelection as _, _sfc_main$4 as a, useTableRowIndex as b, _sfc_main$7 as c, useTableTreeState as d, resolveStickySide as f, useTableSortableState as g, useTableSortable as h, _sfc_main$3 as i, useTableColumnSettings as j, useTableFilterState as k, flattenTree as l, useTableStickyColumns as m, _sfc_main$1 as n, _sfc_main$5 as o, stickyOffsets as p, sortRows as q, _sfc_main$2 as r, _sfc_main$6 as s, _sfc_main as t, useTableTreeData as u, useTableSelectionState as v, useTableInfiniteScroll as w, useTableRowExpansion as x, useTableRowStatus as y, capitalize as z };
4537
+ export { applyTableFilters as A, useTableColumnResize as B, useTableRowExpansion as C, buildGroupedRows as D, useTableInfiniteScroll as E, columnResizeDirectionSign as F, pixel as G, cellText as H, columnResizeMinWidth as I, resolveColumnWidths as J, proportional as K, columnResizeStep as L, useTableFiltering as M, useTableColumnSettings as N, isTableGroupHeader as O, useTableColumnSettingsState as P, isProportionalColumnWidth as R, useTableRowIndex as S, isInteractiveRowClick as T, generateColumns as U, capitalize as V, paginateData as W, sortRows as Y, useTableSortable as _, _sfc_main$4 as a, useTableSelectionState as b, _sfc_main$7 as c, flattenTree as d, useTableTreeData as f, useTableStickyColumns as g, stickyOffsets as h, _sfc_main$3 as i, useTableFilterState as j, useTableGroupedRows as k, useTableColumnsVirtualization as l, resolveStickySide as m, _sfc_main$1 as n, _sfc_main$5 as o, useTableTreeState as p, resolveColumnFloorWidths as q, _sfc_main$2 as r, _sfc_main$6 as s, _sfc_main as t, useTableRowsVirtualization as u, useTableSortableState as v, useTablePagination as w, useTableRowStatus as x, useTableSelection as y, resizeColumnWidths as z };