@expcat/tigercat-react 1.0.7 → 1.1.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 (443) hide show
  1. package/dist/chunk-2EC4F7VG.js +134 -0
  2. package/dist/{chunk-NZNSUKPT.js → chunk-2HDQRMGU.js} +3 -21
  3. package/dist/{chunk-LVC43YX2.mjs → chunk-2IUTFPQQ.mjs} +6 -6
  4. package/dist/{chunk-LPNHBHS2.mjs → chunk-2LER76UK.mjs} +40 -5
  5. package/dist/{chunk-PXPUPQRO.js → chunk-2N3CQT4X.js} +23 -4
  6. package/dist/{chunk-BJ2GUKPU.mjs → chunk-2PLPUM5J.mjs} +7 -17
  7. package/dist/{chunk-C443YA4U.js → chunk-2QV56L36.js} +15 -11
  8. package/dist/{chunk-M375I56K.js → chunk-36ATCHP4.js} +5 -5
  9. package/dist/{chunk-AUP3PMDD.mjs → chunk-36WZNVQ5.mjs} +59 -50
  10. package/dist/{chunk-VHHEP5G7.js → chunk-3E76U2RG.js} +22 -2
  11. package/dist/chunk-3HPDLIX3.mjs +108 -0
  12. package/dist/{chunk-QHG7KJH6.js → chunk-3RRYDYVB.js} +23 -27
  13. package/dist/{chunk-3GW3UAKB.js → chunk-466OSPRM.js} +48 -8
  14. package/dist/{chunk-RUROWRB5.mjs → chunk-4G74P6YD.mjs} +4 -3
  15. package/dist/{chunk-AY5Z3NIW.js → chunk-4LIDROT4.js} +11 -7
  16. package/dist/chunk-4R5YXNU4.mjs +42 -0
  17. package/dist/{chunk-VVO4V4IK.js → chunk-4TEILQSN.js} +1 -1
  18. package/dist/{chunk-MQ5ZP5RW.mjs → chunk-4V2HSSQN.mjs} +5 -2
  19. package/dist/{chunk-D6BHFGTN.js → chunk-4YVXF45R.js} +3 -2
  20. package/dist/{chunk-HSHVLIEL.mjs → chunk-564WBQ77.mjs} +11 -11
  21. package/dist/{chunk-QO3GGQAV.mjs → chunk-5HFHHFQS.mjs} +25 -28
  22. package/dist/{chunk-SDWJSALH.js → chunk-5OLE7XM3.js} +156 -137
  23. package/dist/{chunk-DBNAL6G6.mjs → chunk-5OMSQ5PV.mjs} +72 -260
  24. package/dist/{chunk-YLZEOXFS.mjs → chunk-6GU5NH5F.mjs} +22 -2
  25. package/dist/{chunk-XEYP62CR.js → chunk-6LDJSFUQ.js} +71 -14
  26. package/dist/{chunk-RYW4CV7U.js → chunk-6N6CWBPP.js} +16 -6
  27. package/dist/{chunk-6P3JIUSI.mjs → chunk-6OOGL43U.mjs} +3 -2
  28. package/dist/{chunk-3CDAG4HD.mjs → chunk-6QML6T3Y.mjs} +20 -6
  29. package/dist/{chunk-BALJCZ62.mjs → chunk-6QQBMZQ6.mjs} +34 -43
  30. package/dist/{chunk-2XOFRGY6.js → chunk-6YBLWFP5.js} +34 -2
  31. package/dist/{chunk-VILZFNR7.js → chunk-7KNOOFRA.js} +70 -21
  32. package/dist/{chunk-ET5YJELZ.js → chunk-7P4MIU6I.js} +9 -8
  33. package/dist/{chunk-5CGXFQND.mjs → chunk-7Y5XUZJ4.mjs} +27 -11
  34. package/dist/{chunk-HU3VDVH6.js → chunk-A4PPPGJ5.js} +87 -60
  35. package/dist/{chunk-HCZA4LV6.mjs → chunk-A7DZX5X5.mjs} +2 -2
  36. package/dist/{chunk-VONFSF4S.mjs → chunk-AAI6EZZA.mjs} +19 -16
  37. package/dist/{chunk-KNBNE74O.js → chunk-ACQLSECT.js} +32 -4
  38. package/dist/{chunk-KQJYSG23.js → chunk-AIYOQ5MX.js} +8 -8
  39. package/dist/{chunk-EIMAQHCQ.mjs → chunk-AZDNGGV7.mjs} +14 -3
  40. package/dist/{chunk-67FVBKBC.js → chunk-B5TUTAVX.js} +72 -9
  41. package/dist/{chunk-2UQC3WOI.mjs → chunk-C745DPLU.mjs} +13 -4
  42. package/dist/chunk-CBWRSICK.mjs +929 -0
  43. package/dist/{chunk-N66WEQ6M.js → chunk-CBYJXDW4.js} +12 -13
  44. package/dist/{chunk-2EOXY2LP.mjs → chunk-CCDZLSOL.mjs} +70 -3
  45. package/dist/{chunk-4GV7UQJJ.js → chunk-CHPJPIW6.js} +26 -35
  46. package/dist/{chunk-ZD4BVRYG.mjs → chunk-CPQS3IFF.mjs} +1 -1
  47. package/dist/chunk-CVXDKGNX.mjs +312 -0
  48. package/dist/{chunk-YJ4W6DMX.mjs → chunk-D45GM4YH.mjs} +51 -29
  49. package/dist/{chunk-FXX3GD35.mjs → chunk-DAMJCFFS.mjs} +119 -15
  50. package/dist/{chunk-WK5QJO57.js → chunk-DBGPINKE.js} +74 -52
  51. package/dist/chunk-DKNVSQSV.mjs +64 -0
  52. package/dist/{chunk-CDT3P2ZN.js → chunk-DSLKTIPD.js} +20 -17
  53. package/dist/{chunk-4QJZT6QK.js → chunk-DUZM2SKR.js} +124 -99
  54. package/dist/{chunk-7BVXG3Z5.mjs → chunk-DVL53XDJ.mjs} +1 -1
  55. package/dist/{chunk-H3NLKNR4.mjs → chunk-DVUND2QM.mjs} +69 -46
  56. package/dist/{chunk-TMQA74FM.js → chunk-EF5ZTNHX.js} +34 -29
  57. package/dist/{chunk-RWZIWKZR.js → chunk-F7VY6ATM.js} +54 -32
  58. package/dist/{chunk-UBKOITHT.mjs → chunk-FQW26554.mjs} +30 -11
  59. package/dist/{chunk-DEQWHJLQ.mjs → chunk-FW3O54GP.mjs} +11 -7
  60. package/dist/chunk-G3PBQ4B4.mjs +60 -0
  61. package/dist/{chunk-HWWNBCFB.js → chunk-GAT4ZATZ.js} +17 -1
  62. package/dist/chunk-GDONQIOK.mjs +470 -0
  63. package/dist/{chunk-3KMKMAE3.mjs → chunk-GKJNQUTW.mjs} +20 -18
  64. package/dist/{chunk-TVJZB7ZC.js → chunk-GOGLPCUH.js} +122 -18
  65. package/dist/chunk-GOQ6ZG7H.mjs +56 -0
  66. package/dist/{chunk-BCNKTT5C.js → chunk-GRXBGL6Q.js} +18 -16
  67. package/dist/{chunk-XNMSECO4.mjs → chunk-GUHNLUZ3.mjs} +66 -16
  68. package/dist/{chunk-B3MNIAM5.mjs → chunk-GYQJJUJP.mjs} +29 -9
  69. package/dist/{chunk-IWP22YTF.js → chunk-HCKV7ONR.js} +3 -0
  70. package/dist/{chunk-I4SKKEU3.js → chunk-HR5GBE3P.js} +24 -27
  71. package/dist/{chunk-HUCBHFSL.mjs → chunk-HTXUF4RH.mjs} +6 -20
  72. package/dist/{chunk-EOYJLBFD.js → chunk-ITLA7OLQ.js} +6 -20
  73. package/dist/{chunk-INBSKSZG.mjs → chunk-ITVLIR7T.mjs} +57 -12
  74. package/dist/{chunk-FNDPGSEW.mjs → chunk-IXQAECFP.mjs} +87 -33
  75. package/dist/{chunk-34DLDOGP.mjs → chunk-IZTNHCIO.mjs} +5 -2
  76. package/dist/{chunk-73BP3WQN.mjs → chunk-J4OQ2VRH.mjs} +13 -31
  77. package/dist/{chunk-AJQPGAYL.js → chunk-JFOSDCCG.js} +5 -5
  78. package/dist/{chunk-6744DTEB.mjs → chunk-JSUDEK2D.mjs} +159 -140
  79. package/dist/{chunk-U3JOBIDU.js → chunk-K64M7IMP.js} +69 -2
  80. package/dist/{chunk-FPURO6QB.mjs → chunk-KGWPSVEQ.mjs} +5 -6
  81. package/dist/{chunk-OHIZYM65.mjs → chunk-KPACLRQH.mjs} +3 -6
  82. package/dist/chunk-KPRUZCKN.js +318 -0
  83. package/dist/{chunk-UE234MW4.mjs → chunk-KR3EVG7G.mjs} +4 -4
  84. package/dist/chunk-L5HVRTUO.js +935 -0
  85. package/dist/chunk-L6CL63GI.js +93 -0
  86. package/dist/{chunk-RNEL4XIO.js → chunk-LA3CJOWA.js} +13 -2
  87. package/dist/{chunk-EBLAM3YP.mjs → chunk-LE5VFMRR.mjs} +21 -12
  88. package/dist/{chunk-4QQZ5H4V.mjs → chunk-LQT6ZGME.mjs} +35 -30
  89. package/dist/{chunk-VAQDUVBP.mjs → chunk-LY2OTQ4E.mjs} +17 -1
  90. package/dist/{chunk-RRJTIKU6.mjs → chunk-M5GSLKUX.mjs} +13 -14
  91. package/dist/{chunk-TZNTHABR.js → chunk-M73NMNZX.js} +37 -6
  92. package/dist/{chunk-TKZO5UBH.js → chunk-MB3QU3US.js} +47 -2
  93. package/dist/{chunk-6E7FPBRR.mjs → chunk-ME5BLIFX.mjs} +73 -16
  94. package/dist/{chunk-ZDL3GE3Q.mjs → chunk-MO3V34YL.mjs} +67 -18
  95. package/dist/{chunk-H3JAEEEE.js → chunk-MOSVX52I.js} +72 -260
  96. package/dist/{chunk-2GKTVAAB.js → chunk-MPO7Y76D.js} +9 -3
  97. package/dist/{chunk-JLM4LBUS.js → chunk-MU6Z5DCI.js} +6 -3
  98. package/dist/{chunk-5MALB34H.js → chunk-MUUOE2NT.js} +31 -11
  99. package/dist/chunk-N2JYU4JI.js +62 -0
  100. package/dist/{chunk-C6WJ4GQW.js → chunk-NHBNPK5J.js} +40 -37
  101. package/dist/{chunk-JUWFVIDP.mjs → chunk-NQV2H4SC.mjs} +25 -6
  102. package/dist/{chunk-WAIXKROS.mjs → chunk-NSEO2B74.mjs} +12 -8
  103. package/dist/{chunk-2WBPUW75.mjs → chunk-O4JI4FC6.mjs} +39 -36
  104. package/dist/{chunk-SQ7OL2X5.mjs → chunk-OFTLPYYC.mjs} +30 -10
  105. package/dist/{chunk-JQK354YN.js → chunk-OFWK2B23.js} +234 -10
  106. package/dist/chunk-ONTRGV5T.js +159 -0
  107. package/dist/{chunk-IVGKPD2L.mjs → chunk-OPHYFC5W.mjs} +5 -5
  108. package/dist/{chunk-2LUDQBVY.mjs → chunk-OUARQFZ7.mjs} +4 -4
  109. package/dist/{chunk-DAR2BMMV.js → chunk-PFYK2V3E.js} +32 -41
  110. package/dist/{chunk-ZYPEO2KY.js → chunk-PGBKMW4Q.js} +30 -0
  111. package/dist/{chunk-DXXYPVJJ.js → chunk-PR5ZPB6J.js} +3 -3
  112. package/dist/{chunk-PNSWIJG3.mjs → chunk-PSYDHEXN.mjs} +36 -26
  113. package/dist/{chunk-CMGI5WHZ.js → chunk-PTWCIG3Y.js} +2 -2
  114. package/dist/{chunk-FHE4D56E.js → chunk-PVNHW3PY.js} +26 -9
  115. package/dist/{chunk-QLHFXYWA.mjs → chunk-QOEE2PW5.mjs} +73 -10
  116. package/dist/{chunk-AQ72JVUG.js → chunk-QQKP437L.js} +5 -5
  117. package/dist/{chunk-IOHPB4CF.js → chunk-QYJBMQ5P.js} +29 -10
  118. package/dist/{chunk-NZLOLMT2.mjs → chunk-RFB4M3WM.mjs} +50 -10
  119. package/dist/{chunk-TFPIRBHL.js → chunk-RLQITKTC.js} +26 -10
  120. package/dist/{chunk-7CAJK2ZK.mjs → chunk-RPSHILHD.mjs} +2 -2
  121. package/dist/{chunk-GX74TC62.js → chunk-RTHC4KWM.js} +2 -5
  122. package/dist/{chunk-65VXCN5N.js → chunk-SKMZTW3K.js} +56 -11
  123. package/dist/{chunk-VHWTMNQN.js → chunk-SO6POTSO.js} +10 -10
  124. package/dist/chunk-SQGFNVYT.js +222 -0
  125. package/dist/{chunk-RFPXIDAK.js → chunk-SR5OHSI7.js} +34 -24
  126. package/dist/{chunk-GBTKAKUD.mjs → chunk-SRNBEFJO.mjs} +24 -28
  127. package/dist/{chunk-SQK2CPSV.mjs → chunk-SXNHXUUF.mjs} +16 -5
  128. package/dist/{chunk-OE6WTZES.js → chunk-TLJD4GFY.js} +69 -19
  129. package/dist/{chunk-R5XY4EQL.js → chunk-TQOWIDQT.js} +8 -15
  130. package/dist/{chunk-IPLK4AIE.mjs → chunk-TR4DGL3U.mjs} +7 -6
  131. package/dist/{chunk-QAO5KANE.mjs → chunk-TULQETJ5.mjs} +4 -3
  132. package/dist/{chunk-4APNERYR.js → chunk-U356F7GU.js} +12 -30
  133. package/dist/{chunk-AGR3FM3V.js → chunk-UB6SHKPR.js} +8 -7
  134. package/dist/{chunk-Z6F67MJE.mjs → chunk-UBP7HZSU.mjs} +4 -3
  135. package/dist/{chunk-HZ5Z5Y2J.mjs → chunk-UJ5NMLZN.mjs} +13 -31
  136. package/dist/chunk-UKLVOR4E.js +67 -0
  137. package/dist/{chunk-CKFE2B36.js → chunk-ULODU52Q.js} +9 -19
  138. package/dist/{chunk-QQDKQLHJ.mjs → chunk-UPO4LLNK.mjs} +71 -49
  139. package/dist/chunk-V4JIZN3E.mjs +156 -0
  140. package/dist/{chunk-R3QWJ7GT.mjs → chunk-V5557VIB.mjs} +23 -6
  141. package/dist/{chunk-NG3GA5LF.js → chunk-VBBOH5HA.js} +2 -2
  142. package/dist/chunk-VBZE77VM.mjs +65 -0
  143. package/dist/{chunk-XLVEI7GS.js → chunk-VE3SYUMH.js} +3 -2
  144. package/dist/{chunk-SWF7GJYT.mjs → chunk-VHW7NWXM.mjs} +85 -58
  145. package/dist/{chunk-YHFBPSMF.js → chunk-VTOMFVSF.js} +72 -49
  146. package/dist/{chunk-QPGL4YEO.mjs → chunk-W7UGU2O6.mjs} +12 -24
  147. package/dist/{chunk-AYDTXJOR.mjs → chunk-WDRYAP7T.mjs} +18 -15
  148. package/dist/{chunk-AMOH5AMN.mjs → chunk-WFIQIBLC.mjs} +2 -2
  149. package/dist/{chunk-BR5OSUZT.mjs → chunk-WI4N5DD3.mjs} +38 -7
  150. package/dist/{chunk-TQEIMVJD.mjs → chunk-WK45IRP7.mjs} +28 -37
  151. package/dist/{chunk-HLJQZUIY.mjs → chunk-WNX4TH7U.mjs} +32 -4
  152. package/dist/{chunk-7MASYF4S.mjs → chunk-WT6CULN3.mjs} +12 -13
  153. package/dist/{chunk-6PBNFLM7.js → chunk-WV5XHYW6.js} +4 -3
  154. package/dist/{chunk-CQGAZ5JQ.js → chunk-X7WESYRG.js} +15 -4
  155. package/dist/{chunk-PUYT62KC.js → chunk-XAALCDGD.js} +5 -6
  156. package/dist/{chunk-YPHOVEVU.mjs → chunk-XATXFVKR.mjs} +8 -2
  157. package/dist/chunk-XHF3L4ET.mjs +132 -0
  158. package/dist/{chunk-QPOH6SOO.mjs → chunk-XISZACMA.mjs} +126 -101
  159. package/dist/{chunk-QYGBT4NL.js → chunk-XN43YK75.js} +16 -28
  160. package/dist/{chunk-H5MZ54PM.js → chunk-XPA2YCQO.js} +58 -49
  161. package/dist/{chunk-CHH7DWIO.js → chunk-XRNKHQTL.js} +7 -1
  162. package/dist/{chunk-WLIFEALE.mjs → chunk-XTSG362L.mjs} +29 -2
  163. package/dist/{chunk-KQZ4F7FZ.js → chunk-XTV5JLLC.js} +18 -4
  164. package/dist/{chunk-AHF6JE43.js → chunk-YACOKYDW.js} +21 -18
  165. package/dist/{chunk-4Q4GADHJ.js → chunk-YI6ORD3U.js} +40 -5
  166. package/dist/{chunk-ASALMHFI.js → chunk-YMKA4L3Z.js} +1 -6
  167. package/dist/{chunk-3JGOTJZM.js → chunk-YTLJPWXL.js} +4 -4
  168. package/dist/{chunk-XR6B2URW.js → chunk-Z52PUIAH.js} +22 -13
  169. package/dist/{chunk-AVUXDQYO.mjs → chunk-Z5B7VNEG.mjs} +10 -4
  170. package/dist/{chunk-3USEV7EV.js → chunk-ZDK4LEPB.js} +12 -13
  171. package/dist/chunk-ZDXIP33Y.js +58 -0
  172. package/dist/{chunk-XFJ5Q5PF.mjs → chunk-ZJWUBR2X.mjs} +2 -7
  173. package/dist/components/ActivityFeed.js +5 -4
  174. package/dist/components/ActivityFeed.mjs +3 -2
  175. package/dist/components/Affix.js +2 -2
  176. package/dist/components/Affix.mjs +1 -1
  177. package/dist/components/Anchor.d.mts +20 -1
  178. package/dist/components/Anchor.d.ts +20 -1
  179. package/dist/components/Anchor.js +8 -4
  180. package/dist/components/Anchor.mjs +1 -1
  181. package/dist/components/AnchorLink.d.mts +3 -23
  182. package/dist/components/AnchorLink.d.ts +3 -23
  183. package/dist/components/AnchorLink.js +3 -4
  184. package/dist/components/AnchorLink.mjs +1 -2
  185. package/dist/components/AreaChart.d.mts +2 -0
  186. package/dist/components/AreaChart.d.ts +2 -0
  187. package/dist/components/AreaChart.js +7 -7
  188. package/dist/components/AreaChart.mjs +5 -5
  189. package/dist/components/AutoComplete.js +2 -2
  190. package/dist/components/AutoComplete.mjs +1 -1
  191. package/dist/components/AvatarGroup.js +3 -3
  192. package/dist/components/AvatarGroup.mjs +1 -1
  193. package/dist/components/BackTop.js +3 -3
  194. package/dist/components/BackTop.mjs +1 -1
  195. package/dist/components/BarChart.js +7 -7
  196. package/dist/components/BarChart.mjs +5 -5
  197. package/dist/components/Breadcrumb.d.mts +18 -2
  198. package/dist/components/Breadcrumb.d.ts +18 -2
  199. package/dist/components/Breadcrumb.js +7 -3
  200. package/dist/components/Breadcrumb.mjs +1 -1
  201. package/dist/components/BreadcrumbItem.d.mts +3 -21
  202. package/dist/components/BreadcrumbItem.d.ts +3 -21
  203. package/dist/components/BreadcrumbItem.js +2 -3
  204. package/dist/components/BreadcrumbItem.mjs +1 -2
  205. package/dist/components/Button.js +2 -2
  206. package/dist/components/Button.mjs +1 -1
  207. package/dist/components/ButtonGroup.js +4 -4
  208. package/dist/components/ButtonGroup.mjs +1 -1
  209. package/dist/components/Carousel.js +2 -2
  210. package/dist/components/Carousel.mjs +1 -1
  211. package/dist/components/Cascader.js +2 -2
  212. package/dist/components/Cascader.mjs +1 -1
  213. package/dist/components/ChartCanvas.js +3 -3
  214. package/dist/components/ChartCanvas.mjs +1 -1
  215. package/dist/components/ChartLegend.js +3 -3
  216. package/dist/components/ChartLegend.mjs +1 -1
  217. package/dist/components/ChartTooltip.js +3 -3
  218. package/dist/components/ChartTooltip.mjs +1 -1
  219. package/dist/components/ChatWindow.js +5 -4
  220. package/dist/components/ChatWindow.mjs +3 -2
  221. package/dist/components/Code.js +3 -3
  222. package/dist/components/Code.mjs +1 -1
  223. package/dist/components/CodeEditor.d.mts +8 -1
  224. package/dist/components/CodeEditor.d.ts +8 -1
  225. package/dist/components/CodeEditor.js +3 -3
  226. package/dist/components/CodeEditor.mjs +1 -1
  227. package/dist/components/Col.js +3 -3
  228. package/dist/components/Col.mjs +2 -2
  229. package/dist/components/CollapsePanel.js +3 -3
  230. package/dist/components/CollapsePanel.mjs +1 -1
  231. package/dist/components/CommentThread.js +4 -4
  232. package/dist/components/CommentThread.mjs +2 -2
  233. package/dist/components/ConfigProvider.d.mts +3 -2
  234. package/dist/components/ConfigProvider.d.ts +3 -2
  235. package/dist/components/ConfigProvider.js +3 -3
  236. package/dist/components/ConfigProvider.mjs +1 -1
  237. package/dist/components/CropUpload.js +6 -6
  238. package/dist/components/CropUpload.mjs +5 -5
  239. package/dist/components/DataTableWithToolbar.d.mts +2 -7
  240. package/dist/components/DataTableWithToolbar.d.ts +2 -7
  241. package/dist/components/DataTableWithToolbar.js +6 -7
  242. package/dist/components/DataTableWithToolbar.mjs +4 -5
  243. package/dist/components/DatePicker.js +2 -2
  244. package/dist/components/DatePicker.mjs +1 -1
  245. package/dist/components/DonutChart.js +8 -8
  246. package/dist/components/DonutChart.mjs +6 -6
  247. package/dist/components/Drawer.js +3 -3
  248. package/dist/components/Drawer.mjs +2 -2
  249. package/dist/components/Dropdown.d.mts +10 -2
  250. package/dist/components/Dropdown.d.ts +10 -2
  251. package/dist/components/Dropdown.js +8 -5
  252. package/dist/components/Dropdown.mjs +2 -3
  253. package/dist/components/DropdownItem.js +4 -5
  254. package/dist/components/DropdownItem.mjs +3 -4
  255. package/dist/components/DropdownMenu.d.mts +3 -13
  256. package/dist/components/DropdownMenu.d.ts +3 -13
  257. package/dist/components/DropdownMenu.js +9 -2
  258. package/dist/components/DropdownMenu.mjs +2 -1
  259. package/dist/components/FileManager.js +3 -3
  260. package/dist/components/FileManager.mjs +1 -1
  261. package/dist/components/Form.d.mts +1 -0
  262. package/dist/components/Form.d.ts +1 -0
  263. package/dist/components/Form.js +3 -3
  264. package/dist/components/Form.mjs +1 -1
  265. package/dist/components/FormItem.js +3 -3
  266. package/dist/components/FormItem.mjs +2 -2
  267. package/dist/components/FormWizard.js +6 -6
  268. package/dist/components/FormWizard.mjs +4 -4
  269. package/dist/components/FunnelChart.js +6 -6
  270. package/dist/components/FunnelChart.mjs +5 -5
  271. package/dist/components/GaugeChart.js +3 -3
  272. package/dist/components/GaugeChart.mjs +2 -2
  273. package/dist/components/HeatmapChart.js +5 -5
  274. package/dist/components/HeatmapChart.mjs +4 -4
  275. package/dist/components/Image.js +5 -5
  276. package/dist/components/Image.mjs +4 -4
  277. package/dist/components/ImageCropper.js +2 -2
  278. package/dist/components/ImageCropper.mjs +1 -1
  279. package/dist/components/ImageGroup.js +5 -5
  280. package/dist/components/ImageGroup.mjs +3 -3
  281. package/dist/components/ImagePreview.js +3 -3
  282. package/dist/components/ImagePreview.mjs +2 -2
  283. package/dist/components/ImageViewer.js +2 -2
  284. package/dist/components/ImageViewer.mjs +1 -1
  285. package/dist/components/InfiniteScroll.js +3 -3
  286. package/dist/components/InfiniteScroll.mjs +1 -1
  287. package/dist/components/InputNumber.js +2 -2
  288. package/dist/components/InputNumber.mjs +1 -1
  289. package/dist/components/Kanban.js +5 -5
  290. package/dist/components/Kanban.mjs +3 -3
  291. package/dist/components/LineChart.js +7 -7
  292. package/dist/components/LineChart.mjs +5 -5
  293. package/dist/components/List.d.mts +22 -1
  294. package/dist/components/List.d.ts +22 -1
  295. package/dist/components/List.js +3 -2
  296. package/dist/components/List.mjs +2 -1
  297. package/dist/components/Loading.js +3 -2
  298. package/dist/components/Loading.mjs +2 -1
  299. package/dist/components/Mentions.js +3 -3
  300. package/dist/components/Mentions.mjs +1 -1
  301. package/dist/components/Menu.d.mts +43 -2
  302. package/dist/components/Menu.d.ts +43 -2
  303. package/dist/components/Menu.js +15 -3
  304. package/dist/components/Menu.mjs +1 -1
  305. package/dist/components/MenuItem.d.mts +3 -20
  306. package/dist/components/MenuItem.d.ts +3 -20
  307. package/dist/components/MenuItem.js +8 -3
  308. package/dist/components/MenuItem.mjs +1 -2
  309. package/dist/components/MenuItemGroup.d.mts +3 -16
  310. package/dist/components/MenuItemGroup.d.ts +3 -16
  311. package/dist/components/MenuItemGroup.js +8 -4
  312. package/dist/components/MenuItemGroup.mjs +1 -3
  313. package/dist/components/Modal.js +4 -4
  314. package/dist/components/Modal.mjs +3 -3
  315. package/dist/components/Notification.js +4 -4
  316. package/dist/components/Notification.mjs +1 -1
  317. package/dist/components/NotificationCenter.js +9 -7
  318. package/dist/components/NotificationCenter.mjs +7 -5
  319. package/dist/components/Pagination.d.mts +2 -2
  320. package/dist/components/Pagination.d.ts +2 -2
  321. package/dist/components/Pagination.js +3 -3
  322. package/dist/components/Pagination.mjs +1 -1
  323. package/dist/components/PieChart.js +7 -7
  324. package/dist/components/PieChart.mjs +5 -5
  325. package/dist/components/Popconfirm.js +4 -4
  326. package/dist/components/Popconfirm.mjs +3 -3
  327. package/dist/components/Popover.js +4 -4
  328. package/dist/components/Popover.mjs +3 -3
  329. package/dist/components/RadarChart.d.mts +3 -0
  330. package/dist/components/RadarChart.d.ts +3 -0
  331. package/dist/components/RadarChart.js +7 -7
  332. package/dist/components/RadarChart.mjs +5 -5
  333. package/dist/components/Resizable.js +3 -3
  334. package/dist/components/Resizable.mjs +1 -1
  335. package/dist/components/RichTextEditor.d.mts +10 -3
  336. package/dist/components/RichTextEditor.d.ts +10 -3
  337. package/dist/components/RichTextEditor.js +3 -3
  338. package/dist/components/RichTextEditor.mjs +1 -1
  339. package/dist/components/Row.js +3 -3
  340. package/dist/components/Row.mjs +1 -1
  341. package/dist/components/ScatterChart.js +7 -7
  342. package/dist/components/ScatterChart.mjs +5 -5
  343. package/dist/components/Segmented.js +2 -2
  344. package/dist/components/Segmented.mjs +1 -1
  345. package/dist/components/Select.js +2 -2
  346. package/dist/components/Select.mjs +1 -1
  347. package/dist/components/Splitter.js +3 -3
  348. package/dist/components/Splitter.mjs +1 -1
  349. package/dist/components/Statistic.js +2 -2
  350. package/dist/components/Statistic.mjs +1 -1
  351. package/dist/components/Stepper.js +2 -2
  352. package/dist/components/Stepper.mjs +1 -1
  353. package/dist/components/Steps.d.mts +32 -1
  354. package/dist/components/Steps.d.ts +32 -1
  355. package/dist/components/Steps.js +7 -3
  356. package/dist/components/Steps.mjs +1 -1
  357. package/dist/components/StepsItem.d.mts +3 -36
  358. package/dist/components/StepsItem.d.ts +3 -36
  359. package/dist/components/StepsItem.js +2 -2
  360. package/dist/components/StepsItem.mjs +1 -1
  361. package/dist/components/SubMenu.d.mts +3 -20
  362. package/dist/components/SubMenu.d.ts +3 -20
  363. package/dist/components/SubMenu.js +8 -5
  364. package/dist/components/SubMenu.mjs +1 -4
  365. package/dist/components/SunburstChart.js +6 -6
  366. package/dist/components/SunburstChart.mjs +5 -5
  367. package/dist/components/Switch.js +2 -2
  368. package/dist/components/Switch.mjs +1 -1
  369. package/dist/components/TabPane.d.mts +3 -57
  370. package/dist/components/TabPane.d.ts +3 -57
  371. package/dist/components/TabPane.js +2 -2
  372. package/dist/components/TabPane.mjs +1 -1
  373. package/dist/components/Table.d.mts +4 -59
  374. package/dist/components/Table.d.ts +4 -59
  375. package/dist/components/Table.js +2 -2
  376. package/dist/components/Table.mjs +1 -1
  377. package/dist/components/Tabs.d.mts +54 -1
  378. package/dist/components/Tabs.d.ts +54 -1
  379. package/dist/components/Tabs.js +7 -3
  380. package/dist/components/Tabs.mjs +1 -1
  381. package/dist/components/TaskBoard.js +4 -4
  382. package/dist/components/TaskBoard.mjs +2 -2
  383. package/dist/components/TimePicker.js +2 -2
  384. package/dist/components/TimePicker.mjs +1 -1
  385. package/dist/components/Tooltip.js +4 -4
  386. package/dist/components/Tooltip.mjs +3 -3
  387. package/dist/components/Transfer.js +2 -2
  388. package/dist/components/Transfer.mjs +1 -1
  389. package/dist/components/Tree.d.mts +19 -0
  390. package/dist/components/Tree.d.ts +19 -0
  391. package/dist/components/Tree.js +4 -3
  392. package/dist/components/Tree.mjs +2 -1
  393. package/dist/components/TreeMapChart.js +6 -6
  394. package/dist/components/TreeMapChart.mjs +5 -5
  395. package/dist/components/TreeSelect.js +2 -2
  396. package/dist/components/TreeSelect.mjs +1 -1
  397. package/dist/components/Upload.js +3 -3
  398. package/dist/components/Upload.mjs +2 -2
  399. package/dist/components/VirtualList.js +2 -2
  400. package/dist/components/VirtualList.mjs +1 -1
  401. package/dist/components/VirtualTable.js +3 -3
  402. package/dist/components/VirtualTable.mjs +1 -1
  403. package/dist/components/Watermark.js +2 -2
  404. package/dist/components/Watermark.mjs +1 -1
  405. package/dist/index.d.mts +32 -18
  406. package/dist/index.d.ts +32 -18
  407. package/dist/index.js +359 -210
  408. package/dist/index.mjs +243 -95
  409. package/dist/types-BT4oTXQ_.d.mts +31 -0
  410. package/dist/types-BT4oTXQ_.d.ts +31 -0
  411. package/package.json +13 -8
  412. package/dist/chunk-3NE6VZRY.js +0 -67
  413. package/dist/chunk-7YLVAZJQ.mjs +0 -47
  414. package/dist/chunk-A3PYG3D6.js +0 -107
  415. package/dist/chunk-B3LRUKXM.mjs +0 -65
  416. package/dist/chunk-B53R2U2R.mjs +0 -86
  417. package/dist/chunk-BKYE77F2.js +0 -171
  418. package/dist/chunk-CRSMECWE.mjs +0 -33
  419. package/dist/chunk-D5KYIQWB.mjs +0 -105
  420. package/dist/chunk-DUWAV47E.js +0 -42
  421. package/dist/chunk-DZGDCRBH.mjs +0 -30
  422. package/dist/chunk-EQWQXURG.js +0 -18
  423. package/dist/chunk-F6KHZNRS.js +0 -32
  424. package/dist/chunk-GJEWBALW.js +0 -38
  425. package/dist/chunk-GOUMB34F.mjs +0 -168
  426. package/dist/chunk-H36CWHUP.mjs +0 -30
  427. package/dist/chunk-HZHFFVP7.mjs +0 -63
  428. package/dist/chunk-IBYIPXIO.js +0 -88
  429. package/dist/chunk-IS467WAO.mjs +0 -39
  430. package/dist/chunk-MB7CJ32C.mjs +0 -878
  431. package/dist/chunk-OFBK35TK.mjs +0 -32
  432. package/dist/chunk-OWUGXP6K.js +0 -37
  433. package/dist/chunk-QBZODEIG.js +0 -49
  434. package/dist/chunk-R5P72RIT.js +0 -180
  435. package/dist/chunk-RARHRSPQ.js +0 -72
  436. package/dist/chunk-SIVJX7VU.mjs +0 -16
  437. package/dist/chunk-SMC2RV3V.mjs +0 -250
  438. package/dist/chunk-T5FAKJ6C.mjs +0 -49
  439. package/dist/chunk-XID6T65A.js +0 -163
  440. package/dist/chunk-XO6NSGV3.js +0 -884
  441. package/dist/chunk-Y3NDP56G.mjs +0 -174
  442. package/dist/chunk-Z6CRXABX.js +0 -88
  443. package/dist/chunk-ZIUOENTL.mjs +0 -85
@@ -0,0 +1,935 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var tigercatCore = require('@expcat/tigercat-core');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefault(React);
10
+
11
+ // src/components/Table.tsx
12
+ var spinnerSvg = tigercatCore.getSpinnerSVG("spinner");
13
+ var SortIcon = ({ direction }) => {
14
+ const active = direction !== null;
15
+ const pathD = direction === "asc" ? tigercatCore.sortAscIcon16PathD : direction === "desc" ? tigercatCore.sortDescIcon16PathD : tigercatCore.sortBothIcon16PathD;
16
+ return /* @__PURE__ */ jsxRuntime.jsx(
17
+ "svg",
18
+ {
19
+ className: tigercatCore.getSortIconClasses(active),
20
+ width: "16",
21
+ height: "16",
22
+ viewBox: tigercatCore.icon16ViewBox,
23
+ fill: "currentColor",
24
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: pathD })
25
+ }
26
+ );
27
+ };
28
+ var LockIcon = ({ locked }) => {
29
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: tigercatCore.icon24ViewBox, fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: locked ? tigercatCore.lockClosedIcon24PathD : tigercatCore.lockOpenIcon24PathD }) });
30
+ };
31
+ var ExpandIcon = ({ expanded }) => {
32
+ return /* @__PURE__ */ jsxRuntime.jsx(
33
+ "svg",
34
+ {
35
+ className: tigercatCore.getExpandIconClasses(expanded),
36
+ width: "16",
37
+ height: "16",
38
+ viewBox: tigercatCore.icon16ViewBox,
39
+ fill: "currentColor",
40
+ "aria-hidden": "true",
41
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: tigercatCore.expandChevronIcon16PathD })
42
+ }
43
+ );
44
+ };
45
+ var LoadingSpinner = () => /* @__PURE__ */ jsxRuntime.jsx(
46
+ "svg",
47
+ {
48
+ className: tigercatCore.getLoadingOverlaySpinnerClasses(),
49
+ xmlns: "http://www.w3.org/2000/svg",
50
+ fill: "none",
51
+ viewBox: spinnerSvg.viewBox,
52
+ children: spinnerSvg.elements.map((el, index) => {
53
+ if (el.type === "circle") return /* @__PURE__ */ jsxRuntime.jsx("circle", { ...el.attrs }, index);
54
+ if (el.type === "path") return /* @__PURE__ */ jsxRuntime.jsx("path", { ...el.attrs }, index);
55
+ return null;
56
+ })
57
+ }
58
+ );
59
+ function useTableState(input) {
60
+ const {
61
+ columns,
62
+ dataSource,
63
+ sort,
64
+ defaultSort,
65
+ filters,
66
+ defaultFilters,
67
+ pagination,
68
+ rowSelection,
69
+ expandable,
70
+ rowKey,
71
+ editable,
72
+ editableCells,
73
+ filterMode,
74
+ advancedFilterRules,
75
+ groupBy,
76
+ exportFilename,
77
+ measuredColumnWidths,
78
+ onChange,
79
+ onRowClick,
80
+ onSelectionChange,
81
+ onSortChange,
82
+ onFilterChange,
83
+ onPageChange,
84
+ onExpandChange,
85
+ onCellChange,
86
+ onColumnOrderChange,
87
+ onExport
88
+ } = input;
89
+ const isSortControlled = sort !== void 0;
90
+ const isFiltersControlled = filters !== void 0;
91
+ const paginationConfig = pagination !== false && typeof pagination === "object" ? pagination : null;
92
+ const isCurrentPageControlled = paginationConfig?.current !== void 0;
93
+ const isPageSizeControlled = paginationConfig?.pageSize !== void 0;
94
+ const isSelectionControlled = rowSelection?.selectedRowKeys !== void 0 && Array.isArray(rowSelection.selectedRowKeys);
95
+ const isExpandControlled = expandable?.expandedRowKeys !== void 0 && Array.isArray(expandable.expandedRowKeys);
96
+ const [uncontrolledSortState, setUncontrolledSortState] = React.useState(
97
+ defaultSort ?? { key: null, direction: null }
98
+ );
99
+ const [uncontrolledFilterState, setUncontrolledFilterState] = React.useState(
100
+ defaultFilters ?? {}
101
+ );
102
+ const [uncontrolledCurrentPage, setUncontrolledCurrentPage] = React.useState(
103
+ () => paginationConfig?.defaultCurrent ?? paginationConfig?.current ?? 1
104
+ );
105
+ const [uncontrolledCurrentPageSize, setUncontrolledCurrentPageSize] = React.useState(
106
+ () => paginationConfig?.defaultPageSize ?? paginationConfig?.pageSize ?? 10
107
+ );
108
+ const [uncontrolledSelectedRowKeys, setUncontrolledSelectedRowKeys] = React.useState(rowSelection?.defaultSelectedRowKeys ?? rowSelection?.selectedRowKeys ?? []);
109
+ const [uncontrolledExpandedRowKeys, setUncontrolledExpandedRowKeys] = React.useState(expandable?.defaultExpandedRowKeys ?? expandable?.expandedRowKeys ?? []);
110
+ const sortState = isSortControlled ? sort : uncontrolledSortState;
111
+ const filterState = isFiltersControlled ? filters : uncontrolledFilterState;
112
+ const currentPage = isCurrentPageControlled ? paginationConfig.current : uncontrolledCurrentPage;
113
+ const currentPageSize = isPageSizeControlled ? paginationConfig.pageSize : uncontrolledCurrentPageSize;
114
+ const selectedRowKeys = isSelectionControlled ? rowSelection.selectedRowKeys : uncontrolledSelectedRowKeys;
115
+ const expandedRowKeys = isExpandControlled ? expandable.expandedRowKeys : uncontrolledExpandedRowKeys;
116
+ React.useEffect(() => {
117
+ if (isSortControlled && sort) {
118
+ setUncontrolledSortState(sort);
119
+ }
120
+ }, [isSortControlled, sort?.key, sort?.direction]);
121
+ React.useEffect(() => {
122
+ if (isFiltersControlled && filters) {
123
+ setUncontrolledFilterState(filters);
124
+ }
125
+ }, [isFiltersControlled, filters]);
126
+ React.useEffect(() => {
127
+ if (isCurrentPageControlled) {
128
+ setUncontrolledCurrentPage(paginationConfig.current);
129
+ }
130
+ }, [isCurrentPageControlled, paginationConfig?.current]);
131
+ React.useEffect(() => {
132
+ if (isPageSizeControlled) {
133
+ setUncontrolledCurrentPageSize(paginationConfig.pageSize);
134
+ }
135
+ }, [isPageSizeControlled, paginationConfig?.pageSize]);
136
+ React.useEffect(() => {
137
+ if (isSelectionControlled) {
138
+ setUncontrolledSelectedRowKeys(rowSelection?.selectedRowKeys ?? []);
139
+ }
140
+ }, [isSelectionControlled, rowSelection?.selectedRowKeys]);
141
+ React.useEffect(() => {
142
+ if (isExpandControlled) {
143
+ setUncontrolledExpandedRowKeys(expandable?.expandedRowKeys ?? []);
144
+ }
145
+ }, [isExpandControlled, expandable?.expandedRowKeys]);
146
+ const [fixedOverrides, setFixedOverrides] = React.useState({});
147
+ const displayColumns = React.useMemo(() => {
148
+ return columns.map((column) => {
149
+ const hasOverride = Object.prototype.hasOwnProperty.call(fixedOverrides, column.key);
150
+ return {
151
+ ...column,
152
+ fixed: hasOverride ? fixedOverrides[column.key] : column.fixed
153
+ };
154
+ });
155
+ }, [columns, fixedOverrides]);
156
+ const totalColumnCount = React.useMemo(() => {
157
+ let count = displayColumns.length;
158
+ if (rowSelection && rowSelection.showCheckbox !== false) count++;
159
+ if (expandable) count++;
160
+ return count;
161
+ }, [displayColumns.length, rowSelection, expandable]);
162
+ const columnByKey = React.useMemo(() => {
163
+ const map = {};
164
+ for (const column of displayColumns) {
165
+ map[column.key] = column;
166
+ }
167
+ return map;
168
+ }, [displayColumns]);
169
+ const fixedColumnsInfo = React.useMemo(
170
+ () => tigercatCore.getFixedColumnOffsets(displayColumns, measuredColumnWidths),
171
+ [displayColumns, measuredColumnWidths]
172
+ );
173
+ function toggleColumnLock(columnKey) {
174
+ setFixedOverrides((prev) => {
175
+ const original = columns.find((c) => c.key === columnKey)?.fixed;
176
+ const current = Object.prototype.hasOwnProperty.call(prev, columnKey) ? prev[columnKey] : original;
177
+ const isLocked = current === "left" || current === "right";
178
+ return {
179
+ ...prev,
180
+ [columnKey]: isLocked ? false : "left"
181
+ };
182
+ });
183
+ }
184
+ const processedData = React.useMemo(() => {
185
+ let data = dataSource;
186
+ if (filterMode === "advanced" && advancedFilterRules.length > 0) {
187
+ data = tigercatCore.filterDataAdvanced(data, advancedFilterRules);
188
+ } else {
189
+ data = tigercatCore.filterData(data, filterState);
190
+ }
191
+ if (sortState.key && sortState.direction) {
192
+ const column = columnByKey[sortState.key];
193
+ data = tigercatCore.sortData(data, sortState.key, sortState.direction, column?.sortFn);
194
+ }
195
+ return data;
196
+ }, [dataSource, filterState, sortState, columnByKey, filterMode, advancedFilterRules]);
197
+ const paginatedData = React.useMemo(() => {
198
+ if (pagination === false) {
199
+ return processedData;
200
+ }
201
+ return tigercatCore.paginateData(processedData, currentPage, currentPageSize);
202
+ }, [processedData, currentPage, currentPageSize, pagination]);
203
+ const pageRowKeys = React.useMemo(
204
+ () => tigercatCore.createTableRowKeyCache(rowKey).getMany(paginatedData),
205
+ [paginatedData, rowKey]
206
+ );
207
+ const selectedRowKeySet = React.useMemo(
208
+ () => new Set(selectedRowKeys),
209
+ [selectedRowKeys]
210
+ );
211
+ const expandedRowKeySet = React.useMemo(
212
+ () => new Set(expandedRowKeys),
213
+ [expandedRowKeys]
214
+ );
215
+ const paginationInfo = React.useMemo(() => {
216
+ if (pagination === false) {
217
+ return null;
218
+ }
219
+ const total = paginationConfig?.total !== void 0 && paginationConfig.total > 0 ? paginationConfig.total : processedData.length;
220
+ return tigercatCore.calculatePagination(total, currentPage, currentPageSize);
221
+ }, [processedData.length, currentPage, currentPageSize, pagination, paginationConfig?.total]);
222
+ function handleSort(columnKey) {
223
+ const column = columnByKey[columnKey];
224
+ if (!column || !column.sortable) return;
225
+ let newDirection = "asc";
226
+ if (sortState.key === columnKey) {
227
+ if (sortState.direction === "asc") {
228
+ newDirection = "desc";
229
+ } else if (sortState.direction === "desc") {
230
+ newDirection = null;
231
+ }
232
+ }
233
+ const newSortState = {
234
+ key: newDirection ? columnKey : null,
235
+ direction: newDirection
236
+ };
237
+ if (!isSortControlled) {
238
+ setUncontrolledSortState(newSortState);
239
+ }
240
+ onSortChange?.(newSortState);
241
+ onChange?.({
242
+ sort: newSortState,
243
+ filters: filterState,
244
+ pagination: pagination !== false ? { current: currentPage, pageSize: currentPageSize } : null
245
+ });
246
+ }
247
+ function handleFilter(columnKey, value) {
248
+ const newFilterState = { ...filterState, [columnKey]: value };
249
+ if (!isFiltersControlled) {
250
+ setUncontrolledFilterState(newFilterState);
251
+ }
252
+ setUncontrolledCurrentPage(1);
253
+ onFilterChange?.(newFilterState);
254
+ onChange?.({
255
+ sort: sortState,
256
+ filters: newFilterState,
257
+ pagination: pagination !== false ? { current: 1, pageSize: currentPageSize } : null
258
+ });
259
+ }
260
+ function handlePageChange(page) {
261
+ setUncontrolledCurrentPage(page);
262
+ onPageChange?.({ current: page, pageSize: currentPageSize });
263
+ onChange?.({
264
+ sort: sortState,
265
+ filters: filterState,
266
+ pagination: { current: page, pageSize: currentPageSize }
267
+ });
268
+ }
269
+ function handlePageSizeChange(pageSize) {
270
+ setUncontrolledCurrentPageSize(pageSize);
271
+ setUncontrolledCurrentPage(1);
272
+ onPageChange?.({ current: 1, pageSize });
273
+ onChange?.({
274
+ sort: sortState,
275
+ filters: filterState,
276
+ pagination: { current: 1, pageSize }
277
+ });
278
+ }
279
+ function handleToggleExpand(key, record) {
280
+ const isExpanded = expandedRowKeySet.has(key);
281
+ const newKeys = isExpanded ? expandedRowKeys.filter((k) => k !== key) : [...expandedRowKeys, key];
282
+ if (!isExpandControlled) {
283
+ setUncontrolledExpandedRowKeys(newKeys);
284
+ }
285
+ onExpandChange?.(newKeys, record, !isExpanded);
286
+ }
287
+ function handleRowClick(record, index, key) {
288
+ onRowClick?.(record, index);
289
+ if (expandable?.expandRowByClick) {
290
+ const isExpandableRow = expandable?.rowExpandable ? expandable.rowExpandable(record) : true;
291
+ if (isExpandableRow) {
292
+ handleToggleExpand(key, record);
293
+ }
294
+ }
295
+ }
296
+ function handleSelectRow(key, checked) {
297
+ let newKeys;
298
+ if (rowSelection?.type === "radio") {
299
+ newKeys = checked ? [key] : [];
300
+ } else {
301
+ if (checked) {
302
+ newKeys = [...selectedRowKeys, key];
303
+ } else {
304
+ newKeys = selectedRowKeys.filter((k) => k !== key);
305
+ }
306
+ }
307
+ if (!isSelectionControlled) {
308
+ setUncontrolledSelectedRowKeys(newKeys);
309
+ }
310
+ onSelectionChange?.(newKeys);
311
+ }
312
+ function handleSelectAll(checked) {
313
+ if (checked) {
314
+ const newKeys = pageRowKeys;
315
+ if (!isSelectionControlled) {
316
+ setUncontrolledSelectedRowKeys(newKeys);
317
+ }
318
+ onSelectionChange?.(newKeys);
319
+ } else {
320
+ if (!isSelectionControlled) {
321
+ setUncontrolledSelectedRowKeys([]);
322
+ }
323
+ onSelectionChange?.([]);
324
+ }
325
+ }
326
+ const allSelected = React.useMemo(() => {
327
+ if (pageRowKeys.length === 0) return false;
328
+ return pageRowKeys.every((key) => selectedRowKeySet.has(key));
329
+ }, [pageRowKeys, selectedRowKeySet]);
330
+ const someSelected = React.useMemo(
331
+ () => selectedRowKeys.length > 0 && !allSelected,
332
+ [selectedRowKeys.length, allSelected]
333
+ );
334
+ const [editingCell, setEditingCell] = React.useState(
335
+ null
336
+ );
337
+ const [editingValue, setEditingValue] = React.useState("");
338
+ function isCellEditable(columnKey, rowIndex) {
339
+ if (!editable) return false;
340
+ if (!editableCells) return true;
341
+ return !!editableCells.get(columnKey)?.has(rowIndex);
342
+ }
343
+ function startEditing(rowIndex, columnKey, currentValue) {
344
+ setEditingCell({ rowIndex, columnKey });
345
+ setEditingValue(String(currentValue ?? ""));
346
+ }
347
+ function commitEdit() {
348
+ if (editingCell) {
349
+ onCellChange?.(editingCell.rowIndex, editingCell.columnKey, editingValue);
350
+ setEditingCell(null);
351
+ }
352
+ }
353
+ function cancelEdit() {
354
+ setEditingCell(null);
355
+ }
356
+ function handleExport() {
357
+ const csv = tigercatCore.exportTableToCsv(displayColumns, processedData);
358
+ tigercatCore.downloadCsv(csv, exportFilename);
359
+ onExport?.(csv);
360
+ }
361
+ const [dragColumnKey, setDragColumnKey] = React.useState(null);
362
+ function handleDragStart(columnKey) {
363
+ setDragColumnKey(columnKey);
364
+ }
365
+ function handleDrop(targetKey) {
366
+ if (!dragColumnKey || dragColumnKey === targetKey) return;
367
+ const cols = [...displayColumns];
368
+ const fromIdx = cols.findIndex((c) => c.key === dragColumnKey);
369
+ const toIdx = cols.findIndex((c) => c.key === targetKey);
370
+ if (fromIdx >= 0 && toIdx >= 0) {
371
+ const [moved] = cols.splice(fromIdx, 1);
372
+ cols.splice(toIdx, 0, moved);
373
+ onColumnOrderChange?.(cols);
374
+ }
375
+ setDragColumnKey(null);
376
+ }
377
+ const groupedData = React.useMemo(() => {
378
+ if (!groupBy) return null;
379
+ return tigercatCore.groupDataByColumn(paginatedData, groupBy);
380
+ }, [groupBy, paginatedData]);
381
+ return {
382
+ paginationConfig,
383
+ displayColumns,
384
+ fixedColumnsInfo,
385
+ processedData,
386
+ paginatedData,
387
+ pageRowKeys,
388
+ selectedRowKeySet,
389
+ expandedRowKeySet,
390
+ totalColumnCount,
391
+ paginationInfo,
392
+ allSelected,
393
+ someSelected,
394
+ groupedData,
395
+ sortState,
396
+ currentPage,
397
+ currentPageSize,
398
+ editingCell,
399
+ editingValue,
400
+ setEditingValue,
401
+ toggleColumnLock,
402
+ handleSort,
403
+ handleFilter,
404
+ handlePageChange,
405
+ handlePageSizeChange,
406
+ handleRowClick,
407
+ handleToggleExpand,
408
+ handleSelectRow,
409
+ handleSelectAll,
410
+ isCellEditable,
411
+ startEditing,
412
+ commitEdit,
413
+ cancelEdit,
414
+ handleExport,
415
+ handleDragStart,
416
+ handleDrop
417
+ };
418
+ }
419
+ function renderTableHeader(ctx, view) {
420
+ const { size, stickyHeader, rowSelection, expandable, columnLockable, columnDraggable } = view;
421
+ const expandHeaderTh = expandable ? /* @__PURE__ */ jsxRuntime.jsx("th", { className: tigercatCore.getExpandIconCellClasses(size), "aria-label": "Expand" }) : null;
422
+ const expandAtStart = expandable?.expandIconPosition !== "end";
423
+ return /* @__PURE__ */ jsxRuntime.jsx("thead", { className: tigercatCore.getTableHeaderClasses(stickyHeader), children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
424
+ expandAtStart && expandHeaderTh,
425
+ rowSelection && rowSelection.showCheckbox !== false && rowSelection.type !== "radio" && /* @__PURE__ */ jsxRuntime.jsx("th", { className: tigercatCore.getCheckboxCellClasses(size), children: /* @__PURE__ */ jsxRuntime.jsx(
426
+ "input",
427
+ {
428
+ type: "checkbox",
429
+ className: "rounded border-gray-300 text-[var(--tiger-primary,#2563eb)] focus:ring-[var(--tiger-primary,#2563eb)]",
430
+ checked: ctx.allSelected,
431
+ ref: (el) => {
432
+ if (el) el.indeterminate = ctx.someSelected;
433
+ },
434
+ onChange: (e) => ctx.handleSelectAll(e.target.checked)
435
+ }
436
+ ) }),
437
+ ctx.displayColumns.map((column) => {
438
+ const isSorted = ctx.sortState.key === column.key;
439
+ const sortDirection = isSorted ? ctx.sortState.direction : null;
440
+ const ariaSort = column.sortable ? sortDirection === "asc" ? "ascending" : sortDirection === "desc" ? "descending" : "none" : void 0;
441
+ const isFixedLeft = column.fixed === "left";
442
+ const isFixedRight = column.fixed === "right";
443
+ const fixedStyle = isFixedLeft ? {
444
+ position: "sticky",
445
+ left: `${ctx.fixedColumnsInfo.leftOffsets[column.key] || 0}px`,
446
+ zIndex: 15
447
+ } : isFixedRight ? {
448
+ position: "sticky",
449
+ right: `${ctx.fixedColumnsInfo.rightOffsets[column.key] || 0}px`,
450
+ zIndex: 15
451
+ } : void 0;
452
+ const widthStyle = column.width ? {
453
+ width: typeof column.width === "number" ? `${column.width}px` : column.width
454
+ } : void 0;
455
+ const style = fixedStyle ? { ...widthStyle, ...fixedStyle } : widthStyle;
456
+ return /* @__PURE__ */ jsxRuntime.jsxs(
457
+ "th",
458
+ {
459
+ "data-tiger-table-column-key": column.key,
460
+ "aria-sort": ariaSort,
461
+ className: tigercatCore.classNames(
462
+ tigercatCore.getTableHeaderCellClasses(
463
+ size,
464
+ column.align || "left",
465
+ !!column.sortable,
466
+ column.headerClassName
467
+ ),
468
+ (isFixedLeft || isFixedRight) && "bg-[var(--tiger-surface-muted,#f9fafb)]"
469
+ ),
470
+ style,
471
+ draggable: columnDraggable ? true : void 0,
472
+ onDragStart: columnDraggable ? () => ctx.handleDragStart(column.key) : void 0,
473
+ onDragOver: columnDraggable ? (e) => e.preventDefault() : void 0,
474
+ onDrop: columnDraggable ? () => ctx.handleDrop(column.key) : void 0,
475
+ onClick: column.sortable ? () => ctx.handleSort(column.key) : void 0,
476
+ children: [
477
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
478
+ column.renderHeader ? column.renderHeader() : column.title,
479
+ columnLockable && /* @__PURE__ */ jsxRuntime.jsx(
480
+ "button",
481
+ {
482
+ type: "button",
483
+ "aria-label": column.fixed === "left" || column.fixed === "right" ? `Unlock column ${column.title}` : `Lock column ${column.title}`,
484
+ className: tigercatCore.classNames(
485
+ "inline-flex items-center",
486
+ column.fixed === "left" || column.fixed === "right" ? "text-[var(--tiger-primary,#2563eb)]" : "text-gray-400 hover:text-gray-700"
487
+ ),
488
+ onClick: (e) => {
489
+ e.stopPropagation();
490
+ ctx.toggleColumnLock(column.key);
491
+ },
492
+ children: /* @__PURE__ */ jsxRuntime.jsx(LockIcon, { locked: column.fixed === "left" || column.fixed === "right" })
493
+ }
494
+ ),
495
+ column.sortable && /* @__PURE__ */ jsxRuntime.jsx(SortIcon, { direction: sortDirection })
496
+ ] }),
497
+ column.filter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: column.filter.type === "select" && column.filter.options ? /* @__PURE__ */ jsxRuntime.jsxs(
498
+ "select",
499
+ {
500
+ className: "w-full px-2 py-1 text-sm border border-gray-300 rounded",
501
+ onChange: (e) => ctx.handleFilter(column.key, e.target.value),
502
+ onClick: (e) => e.stopPropagation(),
503
+ children: [
504
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: "All" }),
505
+ column.filter.options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value))
506
+ ]
507
+ }
508
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
509
+ "input",
510
+ {
511
+ type: "text",
512
+ className: "w-full px-2 py-1 text-sm border border-gray-300 rounded",
513
+ placeholder: column.filter.placeholder || "Filter...",
514
+ onInput: (e) => ctx.handleFilter(column.key, e.target.value),
515
+ onClick: (e) => e.stopPropagation()
516
+ }
517
+ ) })
518
+ ]
519
+ },
520
+ column.key
521
+ );
522
+ }),
523
+ !expandAtStart && expandHeaderTh
524
+ ] }) });
525
+ }
526
+ function renderTableBody(ctx, view) {
527
+ const { size, hoverable, striped, loading, emptyText, rowSelection, expandable, rowClassName } = view;
528
+ if (loading) {
529
+ return null;
530
+ }
531
+ if (ctx.paginatedData.length === 0) {
532
+ return /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: ctx.totalColumnCount, className: tigercatCore.tableEmptyStateClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { role: "status", "aria-live": "polite", children: emptyText }) }) }) });
533
+ }
534
+ function renderDataRow(record, index) {
535
+ const key = ctx.pageRowKeys[index];
536
+ const isSelected = ctx.selectedRowKeySet.has(key);
537
+ const isExpanded = ctx.expandedRowKeySet.has(key);
538
+ const isRowExpandable = expandable ? expandable.rowExpandable ? expandable.rowExpandable(record) : true : false;
539
+ const rowClass = typeof rowClassName === "function" ? rowClassName(record, index) : rowClassName;
540
+ const expandToggleCell = expandable ? /* @__PURE__ */ jsxRuntime.jsx("td", { className: tigercatCore.getExpandIconCellClasses(size), children: isRowExpandable && /* @__PURE__ */ jsxRuntime.jsx(
541
+ "button",
542
+ {
543
+ type: "button",
544
+ className: "inline-flex items-center justify-center",
545
+ "aria-label": isExpanded ? "Collapse row" : "Expand row",
546
+ "aria-expanded": isExpanded,
547
+ onClick: (e) => {
548
+ e.stopPropagation();
549
+ ctx.handleToggleExpand(key, record);
550
+ },
551
+ children: /* @__PURE__ */ jsxRuntime.jsx(ExpandIcon, { expanded: isExpanded })
552
+ }
553
+ ) }) : null;
554
+ const expandAtStart = expandable?.expandIconPosition !== "end";
555
+ const rowNode = /* @__PURE__ */ jsxRuntime.jsxs(
556
+ "tr",
557
+ {
558
+ "data-tiger-table-row-index": index,
559
+ className: tigercatCore.classNames(
560
+ tigercatCore.getTableRowClasses(hoverable, striped, index % 2 === 0, rowClass),
561
+ ctx.fixedColumnsInfo.hasFixedColumns && "group"
562
+ ),
563
+ onClick: () => ctx.handleRowClick(record, index, key),
564
+ children: [
565
+ expandAtStart && expandToggleCell,
566
+ rowSelection && rowSelection.showCheckbox !== false && /* @__PURE__ */ jsxRuntime.jsx("td", { className: tigercatCore.getCheckboxCellClasses(size), children: /* @__PURE__ */ jsxRuntime.jsx(
567
+ "input",
568
+ {
569
+ type: rowSelection?.type === "radio" ? "radio" : "checkbox",
570
+ className: rowSelection?.type === "radio" ? "border-gray-300 text-[var(--tiger-primary,#2563eb)] focus:ring-[var(--tiger-primary,#2563eb)]" : "rounded border-gray-300 text-[var(--tiger-primary,#2563eb)] focus:ring-[var(--tiger-primary,#2563eb)]",
571
+ checked: isSelected,
572
+ disabled: rowSelection?.getCheckboxProps?.(record)?.disabled,
573
+ onChange: (e) => ctx.handleSelectRow(key, e.target.checked),
574
+ onClick: (e) => e.stopPropagation()
575
+ }
576
+ ) }),
577
+ ctx.displayColumns.map((column) => {
578
+ const dataKey = column.dataKey || column.key;
579
+ const cellValue = record[dataKey];
580
+ const isFixedLeft = column.fixed === "left";
581
+ const isFixedRight = column.fixed === "right";
582
+ const fixedStyle = isFixedLeft ? {
583
+ position: "sticky",
584
+ left: `${ctx.fixedColumnsInfo.leftOffsets[column.key] || 0}px`,
585
+ zIndex: 10
586
+ } : isFixedRight ? {
587
+ position: "sticky",
588
+ right: `${ctx.fixedColumnsInfo.rightOffsets[column.key] || 0}px`,
589
+ zIndex: 10
590
+ } : void 0;
591
+ const widthStyle = column.width ? {
592
+ width: typeof column.width === "number" ? `${column.width}px` : column.width
593
+ } : void 0;
594
+ const style = fixedStyle ? { ...widthStyle, ...fixedStyle } : widthStyle;
595
+ const stickyBgClass = striped && index % 2 === 0 ? "bg-[var(--tiger-surface-muted,#f9fafb)]/50" : "bg-[var(--tiger-surface,#ffffff)]";
596
+ const stickyCellClass = isFixedLeft || isFixedRight ? tigercatCore.classNames(
597
+ stickyBgClass,
598
+ hoverable && "group-hover:bg-[var(--tiger-surface-muted,#f9fafb)]"
599
+ ) : void 0;
600
+ const isEditing = ctx.editingCell?.rowIndex === index && ctx.editingCell?.columnKey === column.key;
601
+ const cellEditable = ctx.isCellEditable(column.key, index);
602
+ return /* @__PURE__ */ jsxRuntime.jsx(
603
+ "td",
604
+ {
605
+ className: tigercatCore.classNames(
606
+ tigercatCore.getTableCellClasses(size, column.align || "left", column.className),
607
+ stickyCellClass,
608
+ cellEditable && tigercatCore.getEditableCellClasses(!!isEditing)
609
+ ),
610
+ style,
611
+ onDoubleClick: cellEditable ? () => ctx.startEditing(index, column.key, cellValue) : void 0,
612
+ children: isEditing ? /* @__PURE__ */ jsxRuntime.jsx(
613
+ "input",
614
+ {
615
+ className: tigercatCore.editableCellInputClasses,
616
+ value: ctx.editingValue,
617
+ onChange: (e) => ctx.setEditingValue(e.target.value),
618
+ onBlur: ctx.commitEdit,
619
+ onKeyDown: (e) => {
620
+ if (e.key === "Enter") ctx.commitEdit();
621
+ if (e.key === "Escape") ctx.cancelEdit();
622
+ },
623
+ autoFocus: true
624
+ }
625
+ ) : column.render ? column.render(record, index) : cellValue
626
+ },
627
+ column.key
628
+ );
629
+ }),
630
+ !expandAtStart && expandToggleCell
631
+ ]
632
+ },
633
+ key
634
+ );
635
+ if (expandable && isExpanded && isRowExpandable) {
636
+ const expandedContent = expandable.expandedRowRender ? expandable.expandedRowRender(record, index) : null;
637
+ return /* @__PURE__ */ jsxRuntime.jsxs(React__default.default.Fragment, { children: [
638
+ rowNode,
639
+ /* @__PURE__ */ jsxRuntime.jsx("tr", { className: tigercatCore.getExpandedRowClasses(), children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: ctx.totalColumnCount, className: tigercatCore.getExpandedRowContentClasses(size), children: expandedContent }) }, `${key}-expanded`)
640
+ ] }, key);
641
+ }
642
+ return rowNode;
643
+ }
644
+ if (ctx.groupedData) {
645
+ return /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from(ctx.groupedData.entries()).map(([groupKey, groupItems]) => /* @__PURE__ */ jsxRuntime.jsxs(React__default.default.Fragment, { children: [
646
+ /* @__PURE__ */ jsxRuntime.jsx("tr", { className: tigercatCore.tableGroupHeaderClasses, children: /* @__PURE__ */ jsxRuntime.jsxs("td", { colSpan: ctx.totalColumnCount, className: tigercatCore.getGroupHeaderCellClasses(size), children: [
647
+ groupKey,
648
+ " (",
649
+ groupItems.length,
650
+ ")"
651
+ ] }) }),
652
+ groupItems.map((record, idx) => {
653
+ const globalIndex = ctx.paginatedData.indexOf(record);
654
+ return renderDataRow(record, globalIndex >= 0 ? globalIndex : idx);
655
+ })
656
+ ] }, `group-${groupKey}`)) });
657
+ }
658
+ return /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: ctx.paginatedData.map((record, index) => renderDataRow(record, index)) });
659
+ }
660
+ function renderSummaryRow(ctx, view) {
661
+ const { size, rowSelection, expandable, summaryRow } = view;
662
+ if (!summaryRow?.show) return null;
663
+ return /* @__PURE__ */ jsxRuntime.jsx("tfoot", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: tigercatCore.tableSummaryRowClasses, children: [
664
+ rowSelection && rowSelection.showCheckbox !== false && /* @__PURE__ */ jsxRuntime.jsx("td", { className: tigercatCore.getTableCellClasses(size, "left") }),
665
+ expandable && /* @__PURE__ */ jsxRuntime.jsx("td", { className: tigercatCore.getTableCellClasses(size, "left") }),
666
+ ctx.displayColumns.map((column) => /* @__PURE__ */ jsxRuntime.jsx("td", { className: tigercatCore.getTableCellClasses(size, column.align || "left"), children: summaryRow.data[column.dataKey || column.key] ?? "" }, column.key))
667
+ ] }) });
668
+ }
669
+ function renderPagination(ctx, view) {
670
+ const { pagination } = view;
671
+ if (pagination === false || !ctx.paginationInfo) {
672
+ return null;
673
+ }
674
+ const { totalPages, startIndex, endIndex, hasNext, hasPrev } = ctx.paginationInfo;
675
+ const paginationConfig = pagination;
676
+ const total = paginationConfig.total !== void 0 && paginationConfig.total > 0 ? paginationConfig.total : ctx.processedData.length;
677
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tigercatCore.getSimplePaginationContainerClasses(), children: [
678
+ paginationConfig.showTotal !== false && /* @__PURE__ */ jsxRuntime.jsx("div", { className: tigercatCore.getSimplePaginationTotalClasses(), children: paginationConfig.totalText ? paginationConfig.totalText(total, [startIndex, endIndex]) : `Showing ${startIndex} to ${endIndex} of ${total} results` }),
679
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tigercatCore.getSimplePaginationControlsClasses(), children: [
680
+ paginationConfig.showSizeChanger !== false && /* @__PURE__ */ jsxRuntime.jsx(
681
+ "select",
682
+ {
683
+ className: tigercatCore.getSimplePaginationSelectClasses(),
684
+ value: ctx.currentPageSize,
685
+ onChange: (e) => ctx.handlePageSizeChange(Number(e.target.value)),
686
+ children: (paginationConfig.pageSizeOptions || [10, 20, 50, 100]).map((size) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: size, children: [
687
+ size,
688
+ " / page"
689
+ ] }, size))
690
+ }
691
+ ),
692
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tigercatCore.getSimplePaginationButtonsWrapperClasses(), children: [
693
+ /* @__PURE__ */ jsxRuntime.jsx(
694
+ "button",
695
+ {
696
+ className: tigercatCore.getSimplePaginationButtonClasses(!hasPrev),
697
+ disabled: !hasPrev,
698
+ onClick: () => ctx.handlePageChange(ctx.currentPage - 1),
699
+ children: "Previous"
700
+ }
701
+ ),
702
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: tigercatCore.getSimplePaginationPageIndicatorClasses(), children: [
703
+ "Page ",
704
+ ctx.currentPage,
705
+ " of ",
706
+ totalPages
707
+ ] }),
708
+ /* @__PURE__ */ jsxRuntime.jsx(
709
+ "button",
710
+ {
711
+ className: tigercatCore.getSimplePaginationButtonClasses(!hasNext),
712
+ disabled: !hasNext,
713
+ onClick: () => ctx.handlePageChange(ctx.currentPage + 1),
714
+ children: "Next"
715
+ }
716
+ )
717
+ ] })
718
+ ] })
719
+ ] });
720
+ }
721
+ function Table({
722
+ columns,
723
+ columnLockable = false,
724
+ dataSource = [],
725
+ sort,
726
+ defaultSort,
727
+ filters,
728
+ defaultFilters,
729
+ size = "md",
730
+ bordered = false,
731
+ striped = false,
732
+ hoverable = true,
733
+ loading = false,
734
+ emptyText = "No data",
735
+ pagination = {
736
+ current: 1,
737
+ pageSize: 10,
738
+ total: 0,
739
+ pageSizeOptions: [10, 20, 50, 100],
740
+ showSizeChanger: true,
741
+ showTotal: true
742
+ },
743
+ rowSelection,
744
+ expandable,
745
+ rowKey = "id",
746
+ rowClassName,
747
+ stickyHeader = false,
748
+ maxHeight,
749
+ tableLayout = "auto",
750
+ // v0.6.0 props
751
+ virtual = false,
752
+ virtualHeight = 400,
753
+ virtualItemHeight: _virtualItemHeight = 40,
754
+ virtualThreshold = 1e3,
755
+ editable = false,
756
+ editableCells,
757
+ filterMode = "basic",
758
+ advancedFilterRules = [],
759
+ columnDraggable = false,
760
+ summaryRow,
761
+ groupBy,
762
+ exportable = false,
763
+ exportFilename = "export",
764
+ onChange,
765
+ onRowClick,
766
+ onSelectionChange,
767
+ onSortChange,
768
+ onFilterChange,
769
+ onPageChange,
770
+ onExpandChange,
771
+ onCellChange,
772
+ onColumnOrderChange,
773
+ onExport,
774
+ className,
775
+ ...props
776
+ }) {
777
+ const wrapperRef = React.useRef(null);
778
+ const tableRef = React.useRef(null);
779
+ const [measuredColumnWidths, setMeasuredColumnWidths] = React.useState({});
780
+ const [measuredRowHeights, setMeasuredRowHeights] = React.useState([]);
781
+ const internalRowSelection = rowSelection;
782
+ const internalExpandable = expandable;
783
+ const internalRowClassName = rowClassName;
784
+ const ctx = useTableState({
785
+ columns,
786
+ dataSource,
787
+ sort,
788
+ defaultSort,
789
+ filters,
790
+ defaultFilters,
791
+ pagination,
792
+ rowSelection: internalRowSelection,
793
+ expandable: internalExpandable,
794
+ rowKey,
795
+ editable,
796
+ editableCells,
797
+ filterMode,
798
+ advancedFilterRules,
799
+ groupBy,
800
+ exportFilename,
801
+ measuredColumnWidths,
802
+ onChange,
803
+ onRowClick,
804
+ onSelectionChange,
805
+ onSortChange,
806
+ onFilterChange,
807
+ onPageChange,
808
+ onExpandChange,
809
+ onCellChange,
810
+ onColumnOrderChange,
811
+ onExport
812
+ });
813
+ const wrapperStyle = React.useMemo(() => {
814
+ if (virtual) {
815
+ return {
816
+ height: typeof virtualHeight === "number" ? `${virtualHeight}px` : virtualHeight,
817
+ overflow: "auto"
818
+ };
819
+ }
820
+ return maxHeight ? {
821
+ maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight
822
+ } : void 0;
823
+ }, [maxHeight, virtual, virtualHeight]);
824
+ const virtualRecommendation = React.useMemo(
825
+ () => tigercatCore.getTableVirtualRecommendation({
826
+ virtual,
827
+ dataLength: dataSource.length,
828
+ threshold: virtualThreshold
829
+ }),
830
+ [dataSource.length, virtual, virtualThreshold]
831
+ );
832
+ React.useEffect(() => {
833
+ const wrapper = wrapperRef.current;
834
+ if (!wrapper) {
835
+ return void 0;
836
+ }
837
+ const controller = tigercatCore.createTableResizeObserverController({
838
+ onResize: (snapshot) => {
839
+ setMeasuredColumnWidths(
840
+ (prev) => areNumberRecordsEqual(prev, snapshot.columnWidths) ? prev : snapshot.columnWidths
841
+ );
842
+ setMeasuredRowHeights(
843
+ (prev) => areNumberArraysEqual(prev, snapshot.rowHeights) ? prev : snapshot.rowHeights
844
+ );
845
+ }
846
+ });
847
+ controller.observe(wrapper, tableRef.current);
848
+ return () => controller.disconnect();
849
+ }, [ctx.displayColumns.length, ctx.paginatedData.length]);
850
+ return /* @__PURE__ */ jsxRuntime.jsxs(
851
+ "div",
852
+ {
853
+ ref: wrapperRef,
854
+ className: tigercatCore.getTableWrapperClasses(
855
+ bordered,
856
+ maxHeight || (virtual ? virtualHeight : void 0)
857
+ ),
858
+ style: wrapperStyle,
859
+ "data-tiger-virtual": virtualRecommendation.enabled ? "enabled" : void 0,
860
+ "data-tiger-virtual-recommended": virtualRecommendation.recommended ? "true" : void 0,
861
+ "data-tiger-virtual-threshold": virtualRecommendation.recommended ? virtualRecommendation.threshold : void 0,
862
+ "data-tiger-measured-row-height": measuredRowHeights[0] || void 0,
863
+ "aria-busy": loading,
864
+ children: [
865
+ exportable && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: tigercatCore.tableExportButtonClasses, onClick: ctx.handleExport, children: "Export CSV" }) }),
866
+ /* @__PURE__ */ jsxRuntime.jsxs(
867
+ "table",
868
+ {
869
+ ref: tableRef,
870
+ className: tigercatCore.classNames(
871
+ tigercatCore.tableBaseClasses,
872
+ tableLayout === "fixed" ? "table-fixed" : "table-auto",
873
+ className
874
+ ),
875
+ ...props,
876
+ style: ctx.fixedColumnsInfo.hasFixedColumns && ctx.fixedColumnsInfo.minTableWidth ? {
877
+ ...props.style,
878
+ minWidth: `${ctx.fixedColumnsInfo.minTableWidth}px`
879
+ } : props.style,
880
+ children: [
881
+ renderTableHeader(ctx, {
882
+ size,
883
+ stickyHeader,
884
+ rowSelection: internalRowSelection,
885
+ expandable: internalExpandable,
886
+ columnLockable,
887
+ columnDraggable
888
+ }),
889
+ renderTableBody(ctx, {
890
+ size,
891
+ hoverable,
892
+ striped,
893
+ loading,
894
+ emptyText,
895
+ rowSelection: internalRowSelection,
896
+ expandable: internalExpandable,
897
+ rowClassName: internalRowClassName
898
+ }),
899
+ renderSummaryRow(ctx, {
900
+ size,
901
+ rowSelection: internalRowSelection,
902
+ expandable: internalExpandable,
903
+ summaryRow
904
+ })
905
+ ]
906
+ }
907
+ ),
908
+ loading && /* @__PURE__ */ jsxRuntime.jsxs(
909
+ "div",
910
+ {
911
+ className: tigercatCore.tableLoadingOverlayClasses,
912
+ role: "status",
913
+ "aria-live": "polite",
914
+ "aria-label": "Loading",
915
+ children: [
916
+ /* @__PURE__ */ jsxRuntime.jsx(LoadingSpinner, {}),
917
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading" })
918
+ ]
919
+ }
920
+ ),
921
+ renderPagination(ctx, { pagination })
922
+ ]
923
+ }
924
+ );
925
+ }
926
+ function areNumberRecordsEqual(current, next) {
927
+ const currentKeys = Object.keys(current);
928
+ const nextKeys = Object.keys(next);
929
+ return currentKeys.length === nextKeys.length && nextKeys.every((key) => current[key] === next[key]);
930
+ }
931
+ function areNumberArraysEqual(current, next) {
932
+ return current.length === next.length && next.every((value, index) => current[index] === value);
933
+ }
934
+
935
+ exports.Table = Table;