@expcat/tigercat-react 0.4.2 → 1.0.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.
- package/dist/chunk-24RUEJWB.js +293 -0
- package/dist/{chunk-S4GNTA7V.mjs → chunk-2H43QM4B.mjs} +1 -1
- package/dist/{chunk-WGRYO5HX.mjs → chunk-2UQC3WOI.mjs} +63 -49
- package/dist/{chunk-V5NIFF2F.mjs → chunk-2WBPUW75.mjs} +7 -7
- package/dist/{chunk-QL6UEG3U.js → chunk-2XOFRGY6.js} +16 -3
- package/dist/chunk-333325LH.mjs +87 -0
- package/dist/{chunk-IGE44BIS.mjs → chunk-34DLDOGP.mjs} +105 -19
- package/dist/chunk-3EB42WFR.mjs +35 -0
- package/dist/{chunk-Z7SXK2KO.js → chunk-3JGOTJZM.js} +10 -7
- package/dist/{chunk-ENSLMM3L.mjs → chunk-3KMKMAE3.mjs} +15 -10
- package/dist/{chunk-SFALTVPS.js → chunk-3USEV7EV.js} +2 -2
- package/dist/chunk-45H3JEI3.js +155 -0
- package/dist/chunk-4APNERYR.js +212 -0
- package/dist/chunk-4GV7UQJJ.js +96 -0
- package/dist/chunk-4MKMM2OI.js +112 -0
- package/dist/{chunk-QM4GOQDT.js → chunk-4QJZT6QK.js} +44 -6
- package/dist/chunk-4QQZ5H4V.mjs +213 -0
- package/dist/{chunk-QFYS5QIZ.mjs → chunk-5BBZBI2V.mjs} +3 -3
- package/dist/chunk-5CGXFQND.mjs +100 -0
- package/dist/{chunk-Q7GUWWG5.js → chunk-5CQEXJF2.js} +9 -9
- package/dist/chunk-5EVHVZG5.js +119 -0
- package/dist/chunk-5ZYZQXEM.mjs +167 -0
- package/dist/{chunk-PEGJ2KHC.js → chunk-65VXCN5N.js} +50 -68
- package/dist/{chunk-6PXNWGR5.mjs → chunk-6744DTEB.mjs} +9 -4
- package/dist/chunk-6E7FPBRR.mjs +192 -0
- package/dist/{chunk-NQFHS4W2.mjs → chunk-6KKUJT6B.mjs} +1 -1
- package/dist/{chunk-OXT5RN55.mjs → chunk-6P3JIUSI.mjs} +3 -3
- package/dist/{chunk-FX2IBA4W.mjs → chunk-6SDLSIAO.mjs} +4 -4
- package/dist/chunk-73BP3WQN.mjs +210 -0
- package/dist/{chunk-77PE7OFK.mjs → chunk-7MASYF4S.mjs} +1 -1
- package/dist/{chunk-VCNZEQEB.mjs → chunk-7QZ4XT2P.mjs} +6 -5
- package/dist/chunk-7YLVAZJQ.mjs +47 -0
- package/dist/{chunk-NV3JUZ3N.js → chunk-AGR3FM3V.js} +4 -4
- package/dist/{chunk-MWH6FCSE.js → chunk-AJQPGAYL.js} +8 -8
- package/dist/{chunk-3PV2MDST.mjs → chunk-AMOH5AMN.mjs} +8 -8
- package/dist/chunk-AOZLBASY.mjs +38 -0
- package/dist/chunk-ASALMHFI.js +34 -0
- package/dist/chunk-AYDPWKSW.mjs +186 -0
- package/dist/chunk-B53R2U2R.mjs +86 -0
- package/dist/chunk-BALJCZ62.mjs +147 -0
- package/dist/{chunk-F24IF2QL.js → chunk-BCNKTT5C.js} +14 -9
- package/dist/{chunk-JNLX47UL.mjs → chunk-BJ2GUKPU.mjs} +74 -36
- package/dist/chunk-BKYE77F2.js +171 -0
- package/dist/chunk-BR5OSUZT.mjs +55 -0
- package/dist/chunk-BZ3AXFLG.js +149 -0
- package/dist/{chunk-SOC74QA2.js → chunk-C6WJ4GQW.js} +8 -8
- package/dist/{chunk-LXQOQJMU.js → chunk-CDT3P2ZN.js} +5 -12
- package/dist/chunk-CHH7DWIO.js +121 -0
- package/dist/{chunk-3T7L3MHX.js → chunk-CKFE2B36.js} +76 -38
- package/dist/{chunk-QNRAM3CM.js → chunk-CMGI5WHZ.js} +3 -2
- package/dist/chunk-CQGAZ5JQ.js +61 -0
- package/dist/chunk-CRSMECWE.mjs +33 -0
- package/dist/{chunk-KAWE5LQZ.js → chunk-D6BHFGTN.js} +29 -0
- package/dist/chunk-DAR2BMMV.js +150 -0
- package/dist/{chunk-OCVQ3LOT.mjs → chunk-DKT2EYVM.mjs} +3 -5
- package/dist/{chunk-EHYSER2Z.js → chunk-DR2DFFNQ.js} +6 -6
- package/dist/chunk-DZGDCRBH.mjs +30 -0
- package/dist/chunk-EEF26RBA.mjs +48 -0
- package/dist/{chunk-PJCY45UP.mjs → chunk-EHU3J4B2.mjs} +1 -1
- package/dist/{chunk-RKB2VUQO.js → chunk-EOYJLBFD.js} +24 -21
- package/dist/{chunk-DTQZPZSJ.mjs → chunk-EPN7QWP6.mjs} +16 -2
- package/dist/{chunk-M46L73HR.js → chunk-ET5YJELZ.js} +14 -14
- package/dist/{chunk-NTODO3Q3.mjs → chunk-EV6KRX6F.mjs} +38 -8
- package/dist/{chunk-GB5G2CJY.js → chunk-F2OF6XZ6.js} +36 -6
- package/dist/chunk-F6KHZNRS.js +32 -0
- package/dist/{chunk-URM7QDHH.js → chunk-F7H4ALKN.js} +2 -2
- package/dist/{chunk-RGFSY3S2.mjs → chunk-FPURO6QB.mjs} +16 -3
- package/dist/{chunk-FMF2G6BJ.js → chunk-FRHGRKKT.js} +2 -2
- package/dist/{chunk-LL6B4BHF.mjs → chunk-FT6TEMUF.mjs} +3 -3
- package/dist/chunk-GBTKAKUD.mjs +300 -0
- package/dist/chunk-GOUMB34F.mjs +168 -0
- package/dist/chunk-H5CAIMVL.js +45 -0
- package/dist/chunk-HADBETZG.js +94 -0
- package/dist/{chunk-6W6CRBBG.mjs → chunk-HCZA4LV6.mjs} +8 -5
- package/dist/{chunk-5CLXOFRZ.mjs → chunk-HLJQZUIY.mjs} +11 -10
- package/dist/chunk-HLS4CHWX.mjs +29 -0
- package/dist/{chunk-MTL2QUM3.mjs → chunk-HSHVLIEL.mjs} +2 -2
- package/dist/{chunk-SW4I4X6E.mjs → chunk-HUCBHFSL.mjs} +24 -21
- package/dist/{chunk-Q57BYUUW.js → chunk-HWWNBCFB.js} +39 -8
- package/dist/{chunk-MDZDPGRK.mjs → chunk-HZ5Z5Y2J.mjs} +29 -10
- package/dist/chunk-HZHFFVP7.mjs +63 -0
- package/dist/chunk-I4SKKEU3.js +151 -0
- package/dist/{chunk-RCNTRSUA.mjs → chunk-INBSKSZG.mjs} +51 -69
- package/dist/chunk-IOHPB4CF.js +148 -0
- package/dist/{chunk-QIJG42YQ.mjs → chunk-IPLK4AIE.mjs} +3 -3
- package/dist/{chunk-XWRJVNB6.js → chunk-IWP22YTF.js} +104 -18
- package/dist/{chunk-NJCKTIWB.mjs → chunk-IWTY32AW.mjs} +5 -5
- package/dist/{chunk-6OVVMHZJ.js → chunk-J23B66DJ.js} +327 -172
- package/dist/{chunk-DQNA57CA.js → chunk-JLM4LBUS.js} +5 -12
- package/dist/{chunk-TJFS44SH.js → chunk-JLRRXRZO.js} +2 -4
- package/dist/chunk-JR7L67Q3.mjs +186 -0
- package/dist/{chunk-GNMOOYHG.js → chunk-KNBNE74O.js} +11 -10
- package/dist/chunk-L6WOLPV7.mjs +123 -0
- package/dist/chunk-LODDAS62.js +173 -0
- package/dist/{chunk-IP3MAJSH.mjs → chunk-MQ5ZP5RW.mjs} +5 -12
- package/dist/{chunk-KMTERPME.mjs → chunk-MSHCPJIJ.mjs} +1 -1
- package/dist/chunk-N66WEQ6M.js +240 -0
- package/dist/{chunk-TDRINUMH.js → chunk-NZNSUKPT.js} +29 -10
- package/dist/{chunk-EFLIFXZH.js → chunk-P3XVLJYD.js} +15 -1
- package/dist/chunk-P6E3DILH.mjs +51 -0
- package/dist/{chunk-HPXLUJFJ.mjs → chunk-PN33UCWB.mjs} +3 -5
- package/dist/chunk-PNAWOJ32.js +54 -0
- package/dist/{chunk-72MWKUBC.js → chunk-PUYT62KC.js} +17 -4
- package/dist/chunk-Q4JMAQXJ.js +41 -0
- package/dist/chunk-QBZODEIG.js +49 -0
- package/dist/chunk-QHG7KJH6.js +302 -0
- package/dist/chunk-QIXQYLH5.js +44 -0
- package/dist/chunk-QNFSZYTZ.js +188 -0
- package/dist/chunk-QO3GGQAV.mjs +148 -0
- package/dist/{chunk-RGZYYVQF.mjs → chunk-QPGL4YEO.mjs} +39 -11
- package/dist/{chunk-6IH5QPTR.mjs → chunk-QPOH6SOO.mjs} +44 -6
- package/dist/chunk-QVZTZHCJ.mjs +148 -0
- package/dist/{chunk-C7UKFKVY.js → chunk-QYGBT4NL.js} +40 -12
- package/dist/chunk-R5P72RIT.js +180 -0
- package/dist/chunk-R5XY4EQL.js +56 -0
- package/dist/chunk-RRJTIKU6.mjs +238 -0
- package/dist/{chunk-PJ7NS7NX.mjs → chunk-RU6YS4LZ.mjs} +291 -140
- package/dist/{chunk-ZFHTSHXS.mjs → chunk-RUROWRB5.mjs} +30 -1
- package/dist/{chunk-SAZ6V6DX.js → chunk-RVCUNEBU.js} +2 -4
- package/dist/{chunk-HB2UYJBY.js → chunk-RYW4CV7U.js} +61 -47
- package/dist/chunk-S5Y6UHAK.mjs +116 -0
- package/dist/{chunk-YV6Y7C43.js → chunk-SDWJSALH.js} +8 -3
- package/dist/chunk-SJ5GT7Y4.mjs +58 -0
- package/dist/chunk-SKJXVYYF.js +188 -0
- package/dist/chunk-SQK2CPSV.mjs +59 -0
- package/dist/{chunk-XKDWDANG.js → chunk-SULHTYSV.js} +6 -6
- package/dist/chunk-SVASEF6K.js +125 -0
- package/dist/chunk-T5FAKJ6C.mjs +49 -0
- package/dist/chunk-T6KZ73VM.js +198 -0
- package/dist/chunk-TFPIRBHL.js +103 -0
- package/dist/chunk-TKZO5UBH.js +65 -0
- package/dist/chunk-TMQA74FM.js +215 -0
- package/dist/chunk-TQEIMVJD.mjs +94 -0
- package/dist/chunk-TYCRDHE6.mjs +143 -0
- package/dist/chunk-TZNTHABR.js +58 -0
- package/dist/chunk-UBKOITHT.mjs +142 -0
- package/dist/{chunk-RDIEZKV2.js → chunk-UEJHVPE2.js} +2 -2
- package/dist/chunk-UF3DXKCI.js +35 -0
- package/dist/chunk-UIO6O4MI.js +57 -0
- package/dist/chunk-UKGQ7256.js +13 -0
- package/dist/chunk-UPQGB5NQ.mjs +38 -0
- package/dist/chunk-UQMPEMY7.mjs +11 -0
- package/dist/chunk-V3P4ZAGL.mjs +110 -0
- package/dist/{chunk-TGPQ4KET.mjs → chunk-VAQDUVBP.mjs} +29 -2
- package/dist/chunk-VHHEP5G7.js +123 -0
- package/dist/{chunk-J3HKED4B.js → chunk-VHWTMNQN.js} +8 -8
- package/dist/{chunk-56KTCMRE.mjs → chunk-VONFSF4S.mjs} +5 -12
- package/dist/chunk-VUD4BU4K.mjs +192 -0
- package/dist/{chunk-XWNVBCJA.js → chunk-VWMVWZMD.js} +13 -13
- package/dist/{chunk-JWFEJ4XG.js → chunk-WGPUGPYE.js} +2 -2
- package/dist/chunk-WIWTY74F.mjs +44 -0
- package/dist/chunk-WNLUUD5N.mjs +179 -0
- package/dist/{chunk-VCOBBJLP.js → chunk-WVVXZKNI.js} +5 -4
- package/dist/chunk-XEYP62CR.js +194 -0
- package/dist/chunk-XFJ5Q5PF.mjs +30 -0
- package/dist/chunk-XODGTE2Y.js +61 -0
- package/dist/chunk-Y3NDP56G.mjs +174 -0
- package/dist/chunk-YID7J6ZK.js +37 -0
- package/dist/chunk-YLZEOXFS.mjs +116 -0
- package/dist/chunk-YPHOVEVU.mjs +118 -0
- package/dist/chunk-YXWRSEP5.mjs +286 -0
- package/dist/chunk-Z6CRXABX.js +88 -0
- package/dist/chunk-ZCBKAOAX.mjs +40 -0
- package/dist/{chunk-24U2DQRP.mjs → chunk-ZD4BVRYG.mjs} +2 -1
- package/dist/chunk-ZRHDNGWO.js +46 -0
- package/dist/chunk-ZYJTHGQW.js +181 -0
- package/dist/components/ActivityFeed.js +5 -5
- package/dist/components/ActivityFeed.mjs +3 -3
- package/dist/components/Affix.d.mts +11 -0
- package/dist/components/Affix.d.ts +11 -0
- package/dist/components/Affix.js +10 -0
- package/dist/components/Affix.mjs +1 -0
- package/dist/components/Alert.js +2 -2
- package/dist/components/Alert.mjs +1 -1
- package/dist/components/AreaChart.js +5 -5
- package/dist/components/AreaChart.mjs +3 -3
- package/dist/components/AutoComplete.d.mts +16 -0
- package/dist/components/AutoComplete.d.ts +16 -0
- package/dist/components/AutoComplete.js +10 -0
- package/dist/components/AutoComplete.mjs +1 -0
- package/dist/components/AvatarGroup.d.mts +14 -0
- package/dist/components/AvatarGroup.d.ts +14 -0
- package/dist/components/AvatarGroup.js +14 -0
- package/dist/components/AvatarGroup.mjs +1 -0
- package/dist/components/Badge.js +2 -2
- package/dist/components/Badge.mjs +1 -1
- package/dist/components/BarChart.js +5 -5
- package/dist/components/BarChart.mjs +3 -3
- package/dist/components/Button.d.mts +2 -1
- package/dist/components/Button.d.ts +2 -1
- package/dist/components/Button.js +2 -2
- package/dist/components/Button.mjs +1 -1
- package/dist/components/ButtonGroup.d.mts +15 -0
- package/dist/components/ButtonGroup.d.ts +15 -0
- package/dist/components/ButtonGroup.js +18 -0
- package/dist/components/ButtonGroup.mjs +1 -0
- package/dist/components/Calendar.d.mts +15 -0
- package/dist/components/Calendar.d.ts +15 -0
- package/dist/components/Calendar.js +16 -0
- package/dist/components/Calendar.mjs +1 -0
- package/dist/components/Card.js +2 -2
- package/dist/components/Card.mjs +1 -1
- package/dist/components/Cascader.d.mts +15 -0
- package/dist/components/Cascader.d.ts +15 -0
- package/dist/components/Cascader.js +10 -0
- package/dist/components/Cascader.mjs +1 -0
- package/dist/components/ChatWindow.js +7 -6
- package/dist/components/ChatWindow.mjs +5 -4
- package/dist/components/Checkbox.js +4 -3
- package/dist/components/Checkbox.mjs +3 -2
- package/dist/components/CheckboxGroup.js +4 -3
- package/dist/components/CheckboxGroup.mjs +2 -1
- package/dist/components/CodeEditor.d.mts +11 -0
- package/dist/components/CodeEditor.d.ts +11 -0
- package/dist/components/CodeEditor.js +16 -0
- package/dist/components/CodeEditor.mjs +1 -0
- package/dist/components/ColorPicker.d.mts +12 -0
- package/dist/components/ColorPicker.d.ts +12 -0
- package/dist/components/ColorPicker.js +10 -0
- package/dist/components/ColorPicker.mjs +1 -0
- package/dist/components/CommentThread.js +7 -6
- package/dist/components/CommentThread.mjs +5 -4
- package/dist/components/ConfigProvider.d.mts +5 -1
- package/dist/components/ConfigProvider.d.ts +5 -1
- package/dist/components/ConfigProvider.js +3 -3
- package/dist/components/ConfigProvider.mjs +1 -1
- package/dist/components/CropUpload.js +4 -4
- package/dist/components/CropUpload.mjs +3 -3
- package/dist/components/DataTableWithToolbar.js +7 -7
- package/dist/components/DataTableWithToolbar.mjs +5 -5
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/DatePicker.mjs +1 -1
- package/dist/components/Descriptions.d.mts +3 -3
- package/dist/components/Descriptions.d.ts +3 -3
- package/dist/components/Descriptions.js +3 -3
- package/dist/components/Descriptions.mjs +1 -1
- package/dist/components/Divider.js +2 -2
- package/dist/components/Divider.mjs +1 -1
- package/dist/components/DonutChart.js +5 -5
- package/dist/components/DonutChart.mjs +3 -3
- package/dist/components/Drawer.js +2 -2
- package/dist/components/Drawer.mjs +1 -1
- package/dist/components/Dropdown.d.mts +1 -1
- package/dist/components/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown.js +3 -3
- package/dist/components/Dropdown.mjs +1 -1
- package/dist/components/DropdownItem.js +3 -3
- package/dist/components/DropdownItem.mjs +2 -2
- package/dist/components/Empty.d.mts +14 -0
- package/dist/components/Empty.d.ts +14 -0
- package/dist/components/Empty.js +10 -0
- package/dist/components/Empty.mjs +1 -0
- package/dist/components/FileManager.d.mts +29 -0
- package/dist/components/FileManager.d.ts +29 -0
- package/dist/components/FileManager.js +16 -0
- package/dist/components/FileManager.mjs +1 -0
- package/dist/components/FloatButton.d.mts +21 -0
- package/dist/components/FloatButton.d.ts +21 -0
- package/dist/components/FloatButton.js +14 -0
- package/dist/components/FloatButton.mjs +1 -0
- package/dist/components/Form.d.mts +24 -0
- package/dist/components/Form.d.ts +24 -0
- package/dist/components/Form.js +3 -3
- package/dist/components/Form.mjs +1 -1
- package/dist/components/FormItem.js +3 -3
- package/dist/components/FormItem.mjs +2 -2
- package/dist/components/FormWizard.d.mts +1 -1
- package/dist/components/FormWizard.d.ts +1 -1
- package/dist/components/FormWizard.js +5 -5
- package/dist/components/FormWizard.mjs +3 -3
- package/dist/components/FunnelChart.d.mts +15 -0
- package/dist/components/FunnelChart.d.ts +15 -0
- package/dist/components/FunnelChart.js +14 -0
- package/dist/components/FunnelChart.mjs +5 -0
- package/dist/components/GaugeChart.d.mts +9 -0
- package/dist/components/GaugeChart.d.ts +9 -0
- package/dist/components/GaugeChart.js +11 -0
- package/dist/components/GaugeChart.mjs +2 -0
- package/dist/components/HeatmapChart.d.mts +13 -0
- package/dist/components/HeatmapChart.d.ts +13 -0
- package/dist/components/HeatmapChart.js +13 -0
- package/dist/components/HeatmapChart.mjs +4 -0
- package/dist/components/Image.d.mts +4 -0
- package/dist/components/Image.d.ts +4 -0
- package/dist/components/Image.js +4 -4
- package/dist/components/Image.mjs +3 -3
- package/dist/components/ImageGroup.js +4 -4
- package/dist/components/ImageGroup.mjs +2 -2
- package/dist/components/ImagePreview.d.mts +3 -2
- package/dist/components/ImagePreview.d.ts +3 -2
- package/dist/components/ImagePreview.js +2 -2
- package/dist/components/ImagePreview.mjs +1 -1
- package/dist/components/ImageViewer.d.mts +20 -0
- package/dist/components/ImageViewer.d.ts +20 -0
- package/dist/components/ImageViewer.js +10 -0
- package/dist/components/ImageViewer.mjs +1 -0
- package/dist/components/InfiniteScroll.d.mts +20 -0
- package/dist/components/InfiniteScroll.d.ts +20 -0
- package/dist/components/InfiniteScroll.js +16 -0
- package/dist/components/InfiniteScroll.mjs +1 -0
- package/dist/components/Input.d.mts +5 -0
- package/dist/components/Input.d.ts +5 -0
- package/dist/components/Input.js +2 -2
- package/dist/components/Input.mjs +1 -1
- package/dist/components/InputGroup.d.mts +20 -0
- package/dist/components/InputGroup.d.ts +20 -0
- package/dist/components/InputGroup.js +22 -0
- package/dist/components/InputGroup.mjs +1 -0
- package/dist/components/InputNumber.js +2 -2
- package/dist/components/InputNumber.mjs +1 -1
- package/dist/components/Kanban.d.mts +46 -0
- package/dist/components/Kanban.d.ts +46 -0
- package/dist/components/Kanban.js +17 -0
- package/dist/components/Kanban.mjs +2 -0
- package/dist/components/LineChart.js +5 -5
- package/dist/components/LineChart.mjs +3 -3
- package/dist/components/List.d.mts +9 -1
- package/dist/components/List.d.ts +9 -1
- package/dist/components/List.js +2 -2
- package/dist/components/List.mjs +1 -1
- package/dist/components/Mentions.d.mts +18 -0
- package/dist/components/Mentions.d.ts +18 -0
- package/dist/components/Mentions.js +16 -0
- package/dist/components/Mentions.mjs +1 -0
- package/dist/components/Modal.d.mts +2 -2
- package/dist/components/Modal.d.ts +2 -2
- package/dist/components/Modal.js +3 -3
- package/dist/components/Modal.mjs +2 -2
- package/dist/components/NotificationCenter.js +8 -8
- package/dist/components/NotificationCenter.mjs +6 -6
- package/dist/components/PieChart.js +4 -4
- package/dist/components/PieChart.mjs +2 -2
- package/dist/components/Popconfirm.d.mts +1 -1
- package/dist/components/Popconfirm.d.ts +1 -1
- package/dist/components/Popconfirm.js +3 -3
- package/dist/components/Popconfirm.mjs +2 -2
- package/dist/components/Popover.d.mts +1 -1
- package/dist/components/Popover.d.ts +1 -1
- package/dist/components/Popover.js +3 -3
- package/dist/components/Popover.mjs +2 -2
- package/dist/components/PrintLayout.d.mts +22 -0
- package/dist/components/PrintLayout.d.ts +22 -0
- package/dist/components/PrintLayout.js +14 -0
- package/dist/components/PrintLayout.mjs +1 -0
- package/dist/components/Progress.js +2 -2
- package/dist/components/Progress.mjs +1 -1
- package/dist/components/QRCode.d.mts +16 -0
- package/dist/components/QRCode.d.ts +16 -0
- package/dist/components/QRCode.js +16 -0
- package/dist/components/QRCode.mjs +1 -0
- package/dist/components/RadarChart.js +4 -4
- package/dist/components/RadarChart.mjs +2 -2
- package/dist/components/Radio.js +4 -3
- package/dist/components/Radio.mjs +3 -2
- package/dist/components/RadioGroup.js +4 -3
- package/dist/components/RadioGroup.mjs +2 -1
- package/dist/components/Rate.d.mts +14 -0
- package/dist/components/Rate.d.ts +14 -0
- package/dist/components/Rate.js +10 -0
- package/dist/components/Rate.mjs +1 -0
- package/dist/components/Resizable.d.mts +13 -0
- package/dist/components/Resizable.d.ts +13 -0
- package/dist/components/Resizable.js +16 -0
- package/dist/components/Resizable.mjs +1 -0
- package/dist/components/Result.d.mts +14 -0
- package/dist/components/Result.d.ts +14 -0
- package/dist/components/Result.js +11 -0
- package/dist/components/Result.mjs +2 -0
- package/dist/components/RichTextEditor.d.mts +26 -0
- package/dist/components/RichTextEditor.d.ts +26 -0
- package/dist/components/RichTextEditor.js +17 -0
- package/dist/components/RichTextEditor.mjs +2 -0
- package/dist/components/ScatterChart.js +5 -5
- package/dist/components/ScatterChart.mjs +3 -3
- package/dist/components/Segmented.d.mts +12 -0
- package/dist/components/Segmented.d.ts +12 -0
- package/dist/components/Segmented.js +10 -0
- package/dist/components/Segmented.mjs +1 -0
- package/dist/components/Select.js +2 -2
- package/dist/components/Select.mjs +1 -1
- package/dist/components/Splitter.d.mts +18 -0
- package/dist/components/Splitter.d.ts +18 -0
- package/dist/components/Splitter.js +16 -0
- package/dist/components/Splitter.mjs +1 -0
- package/dist/components/Statistic.d.mts +8 -0
- package/dist/components/Statistic.d.ts +8 -0
- package/dist/components/Statistic.js +10 -0
- package/dist/components/Statistic.mjs +1 -0
- package/dist/components/Stepper.d.mts +12 -0
- package/dist/components/Stepper.d.ts +12 -0
- package/dist/components/Stepper.js +10 -0
- package/dist/components/Stepper.mjs +1 -0
- package/dist/components/SunburstChart.d.mts +15 -0
- package/dist/components/SunburstChart.d.ts +15 -0
- package/dist/components/SunburstChart.js +14 -0
- package/dist/components/SunburstChart.mjs +5 -0
- package/dist/components/TabPane.js +2 -2
- package/dist/components/TabPane.mjs +1 -1
- package/dist/components/Table.d.mts +15 -3
- package/dist/components/Table.d.ts +15 -3
- package/dist/components/Table.js +2 -2
- package/dist/components/Table.mjs +1 -1
- package/dist/components/Tabs.d.mts +7 -0
- package/dist/components/Tabs.d.ts +7 -0
- package/dist/components/Tabs.js +3 -3
- package/dist/components/Tabs.mjs +1 -1
- package/dist/components/TaskBoard.js +4 -4
- package/dist/components/TaskBoard.mjs +2 -2
- package/dist/components/Text.js +2 -2
- package/dist/components/Text.mjs +1 -1
- package/dist/components/Textarea.js +3 -2
- package/dist/components/Textarea.mjs +2 -1
- package/dist/components/Tooltip.d.mts +1 -1
- package/dist/components/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/Tooltip.mjs +2 -2
- package/dist/components/Tour.d.mts +14 -0
- package/dist/components/Tour.d.ts +14 -0
- package/dist/components/Tour.js +11 -0
- package/dist/components/Tour.mjs +2 -0
- package/dist/components/Transfer.d.mts +12 -0
- package/dist/components/Transfer.d.ts +12 -0
- package/dist/components/Transfer.js +10 -0
- package/dist/components/Transfer.mjs +1 -0
- package/dist/components/Tree.d.mts +18 -0
- package/dist/components/Tree.d.ts +18 -0
- package/dist/components/Tree.js +3 -3
- package/dist/components/Tree.mjs +1 -1
- package/dist/components/TreeMapChart.d.mts +15 -0
- package/dist/components/TreeMapChart.d.ts +15 -0
- package/dist/components/TreeMapChart.js +14 -0
- package/dist/components/TreeMapChart.mjs +5 -0
- package/dist/components/TreeSelect.d.mts +12 -0
- package/dist/components/TreeSelect.d.ts +12 -0
- package/dist/components/TreeSelect.js +10 -0
- package/dist/components/TreeSelect.mjs +1 -0
- package/dist/components/Upload.js +3 -3
- package/dist/components/Upload.mjs +2 -2
- package/dist/components/VirtualList.d.mts +14 -0
- package/dist/components/VirtualList.d.ts +14 -0
- package/dist/components/VirtualList.js +10 -0
- package/dist/components/VirtualList.mjs +1 -0
- package/dist/components/VirtualTable.d.mts +26 -0
- package/dist/components/VirtualTable.d.ts +26 -0
- package/dist/components/VirtualTable.js +16 -0
- package/dist/components/VirtualTable.mjs +1 -0
- package/dist/components/Watermark.d.mts +9 -0
- package/dist/components/Watermark.d.ts +9 -0
- package/dist/components/Watermark.js +10 -0
- package/dist/components/Watermark.mjs +1 -0
- package/dist/index.d.mts +85 -2
- package/dist/index.d.ts +85 -2
- package/dist/index.js +504 -181
- package/dist/index.mjs +223 -64
- package/package.json +2 -2
- package/dist/chunk-3M2IG6IN.mjs +0 -34
- package/dist/chunk-4Y7YH32A.mjs +0 -157
- package/dist/chunk-FPNT7FV5.mjs +0 -44
- package/dist/chunk-FSDZJD7M.js +0 -159
- package/dist/chunk-I5TCE5E7.js +0 -32
- package/dist/chunk-LIV33O73.mjs +0 -26
- package/dist/chunk-O3W3OZ6V.js +0 -37
- package/dist/chunk-OYCMGKQ7.js +0 -111
- package/dist/chunk-RPTLVIBF.mjs +0 -109
- package/dist/chunk-RYWGELJ7.js +0 -46
- package/dist/chunk-SSQOCZ6O.js +0 -36
- package/dist/chunk-UZ7SBFQV.mjs +0 -35
- package/dist/chunk-VEGBO77D.mjs +0 -20
- package/dist/{chunk-2DW3WFZI.mjs → chunk-2LUDQBVY.mjs} +2 -2
- package/dist/{chunk-JQNKI2ZZ.js → chunk-C443YA4U.js} +2 -2
- package/dist/{chunk-QGCQAJGL.mjs → chunk-DEQWHJLQ.mjs} +2 -2
- package/dist/{chunk-N4EMXCRQ.mjs → chunk-FXX3GD35.mjs} +1 -1
- package/dist/{chunk-GASFXURT.js → chunk-KQJYSG23.js} +2 -2
- package/dist/{chunk-NEP3CS6S.js → chunk-OE6WTZES.js} +2 -2
- package/dist/{chunk-SH6O6LDJ.mjs → chunk-QQDKQLHJ.mjs} +1 -1
- package/dist/{chunk-F4Q5QMX2.js → chunk-TVJZB7ZC.js} +1 -1
- package/dist/{chunk-SM7RDJFB.js → chunk-VILZFNR7.js} +2 -2
- package/dist/{chunk-W4TFISRK.js → chunk-WK5QJO57.js} +1 -1
- package/dist/{chunk-CYZLGYY4.mjs → chunk-XNMSECO4.mjs} +2 -2
- package/dist/{chunk-763M6U5U.mjs → chunk-ZDL3GE3Q.mjs} +2 -2
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
var tigercatCore = require('@expcat/tigercat-core');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
10
|
+
|
|
7
11
|
// src/components/Table.tsx
|
|
8
12
|
var spinnerSvg = tigercatCore.getSpinnerSVG("spinner");
|
|
9
13
|
var SortIcon = ({ direction }) => {
|
|
@@ -24,6 +28,20 @@ var SortIcon = ({ direction }) => {
|
|
|
24
28
|
var LockIcon = ({ locked }) => {
|
|
25
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 }) });
|
|
26
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
|
+
};
|
|
27
45
|
var LoadingSpinner = () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
28
46
|
"svg",
|
|
29
47
|
{
|
|
@@ -61,19 +79,35 @@ function Table({
|
|
|
61
79
|
showTotal: true
|
|
62
80
|
},
|
|
63
81
|
rowSelection,
|
|
82
|
+
expandable,
|
|
64
83
|
rowKey = "id",
|
|
65
84
|
rowClassName,
|
|
66
85
|
stickyHeader = false,
|
|
67
86
|
maxHeight,
|
|
68
87
|
tableLayout = "auto",
|
|
69
|
-
|
|
88
|
+
// v0.6.0 props
|
|
89
|
+
virtual = false,
|
|
90
|
+
virtualHeight = 400,
|
|
91
|
+
virtualItemHeight = 40,
|
|
92
|
+
editable = false,
|
|
93
|
+
editableCells,
|
|
94
|
+
filterMode = "basic",
|
|
95
|
+
advancedFilterRules = [],
|
|
96
|
+
columnDraggable = false,
|
|
97
|
+
summaryRow,
|
|
98
|
+
groupBy,
|
|
99
|
+
exportable = false,
|
|
100
|
+
exportFilename = "export",
|
|
70
101
|
onChange,
|
|
71
102
|
onRowClick,
|
|
72
103
|
onSelectionChange,
|
|
73
104
|
onSortChange,
|
|
74
105
|
onFilterChange,
|
|
75
106
|
onPageChange,
|
|
76
|
-
|
|
107
|
+
onExpandChange,
|
|
108
|
+
onCellChange,
|
|
109
|
+
onColumnOrderChange,
|
|
110
|
+
onExport,
|
|
77
111
|
className,
|
|
78
112
|
...props
|
|
79
113
|
}) {
|
|
@@ -83,69 +117,59 @@ function Table({
|
|
|
83
117
|
const isCurrentPageControlled = paginationConfig?.current !== void 0;
|
|
84
118
|
const isPageSizeControlled = paginationConfig?.pageSize !== void 0;
|
|
85
119
|
const isSelectionControlled = rowSelection?.selectedRowKeys !== void 0 && Array.isArray(rowSelection.selectedRowKeys);
|
|
86
|
-
const
|
|
120
|
+
const isExpandControlled = expandable?.expandedRowKeys !== void 0 && Array.isArray(expandable.expandedRowKeys);
|
|
121
|
+
const [uncontrolledSortState, setUncontrolledSortState] = React.useState(
|
|
87
122
|
defaultSort ?? { key: null, direction: null }
|
|
88
123
|
);
|
|
89
|
-
const [uncontrolledFilterState, setUncontrolledFilterState] =
|
|
124
|
+
const [uncontrolledFilterState, setUncontrolledFilterState] = React.useState(
|
|
90
125
|
defaultFilters ?? {}
|
|
91
126
|
);
|
|
92
|
-
const [uncontrolledCurrentPage, setUncontrolledCurrentPage] =
|
|
127
|
+
const [uncontrolledCurrentPage, setUncontrolledCurrentPage] = React.useState(
|
|
93
128
|
() => paginationConfig?.defaultCurrent ?? paginationConfig?.current ?? 1
|
|
94
129
|
);
|
|
95
|
-
const [uncontrolledCurrentPageSize, setUncontrolledCurrentPageSize] =
|
|
130
|
+
const [uncontrolledCurrentPageSize, setUncontrolledCurrentPageSize] = React.useState(
|
|
96
131
|
() => paginationConfig?.defaultPageSize ?? paginationConfig?.pageSize ?? 10
|
|
97
132
|
);
|
|
98
|
-
const [uncontrolledSelectedRowKeys, setUncontrolledSelectedRowKeys] =
|
|
133
|
+
const [uncontrolledSelectedRowKeys, setUncontrolledSelectedRowKeys] = React.useState(rowSelection?.defaultSelectedRowKeys ?? rowSelection?.selectedRowKeys ?? []);
|
|
134
|
+
const [uncontrolledExpandedRowKeys, setUncontrolledExpandedRowKeys] = React.useState(expandable?.defaultExpandedRowKeys ?? expandable?.expandedRowKeys ?? []);
|
|
99
135
|
const sortState = isSortControlled ? sort : uncontrolledSortState;
|
|
100
136
|
const filterState = isFiltersControlled ? filters : uncontrolledFilterState;
|
|
101
137
|
const currentPage = isCurrentPageControlled ? paginationConfig.current : uncontrolledCurrentPage;
|
|
102
138
|
const currentPageSize = isPageSizeControlled ? paginationConfig.pageSize : uncontrolledCurrentPageSize;
|
|
103
139
|
const selectedRowKeys = isSelectionControlled ? rowSelection.selectedRowKeys : uncontrolledSelectedRowKeys;
|
|
104
|
-
|
|
140
|
+
const expandedRowKeys = isExpandControlled ? expandable.expandedRowKeys : uncontrolledExpandedRowKeys;
|
|
141
|
+
React.useEffect(() => {
|
|
105
142
|
if (isSortControlled && sort) {
|
|
106
143
|
setUncontrolledSortState(sort);
|
|
107
144
|
}
|
|
108
145
|
}, [isSortControlled, sort?.key, sort?.direction]);
|
|
109
|
-
|
|
146
|
+
React.useEffect(() => {
|
|
110
147
|
if (isFiltersControlled && filters) {
|
|
111
148
|
setUncontrolledFilterState(filters);
|
|
112
149
|
}
|
|
113
150
|
}, [isFiltersControlled, filters]);
|
|
114
|
-
|
|
151
|
+
React.useEffect(() => {
|
|
115
152
|
if (isCurrentPageControlled) {
|
|
116
153
|
setUncontrolledCurrentPage(paginationConfig.current);
|
|
117
154
|
}
|
|
118
155
|
}, [isCurrentPageControlled, paginationConfig?.current]);
|
|
119
|
-
|
|
156
|
+
React.useEffect(() => {
|
|
120
157
|
if (isPageSizeControlled) {
|
|
121
158
|
setUncontrolledCurrentPageSize(paginationConfig.pageSize);
|
|
122
159
|
}
|
|
123
160
|
}, [isPageSizeControlled, paginationConfig?.pageSize]);
|
|
124
|
-
|
|
161
|
+
React.useEffect(() => {
|
|
125
162
|
if (isSelectionControlled) {
|
|
126
163
|
setUncontrolledSelectedRowKeys(rowSelection?.selectedRowKeys ?? []);
|
|
127
164
|
}
|
|
128
165
|
}, [isSelectionControlled, rowSelection?.selectedRowKeys]);
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
)
|
|
136
|
-
const handleToggleExpand = react.useCallback(
|
|
137
|
-
(key) => {
|
|
138
|
-
const isExp = expandedRowKeySet.has(key);
|
|
139
|
-
const next = isExp ? expandedRowKeys.filter((k) => k !== key) : [...expandedRowKeys, key];
|
|
140
|
-
if (!isExpandControlled) {
|
|
141
|
-
setUncontrolledExpandedRowKeys(next);
|
|
142
|
-
}
|
|
143
|
-
onExpandedRowsChange?.(next);
|
|
144
|
-
},
|
|
145
|
-
[expandedRowKeys, expandedRowKeySet, isExpandControlled, onExpandedRowsChange]
|
|
146
|
-
);
|
|
147
|
-
const [fixedOverrides, setFixedOverrides] = react.useState({});
|
|
148
|
-
const displayColumns = react.useMemo(() => {
|
|
166
|
+
React.useEffect(() => {
|
|
167
|
+
if (isExpandControlled) {
|
|
168
|
+
setUncontrolledExpandedRowKeys(expandable?.expandedRowKeys ?? []);
|
|
169
|
+
}
|
|
170
|
+
}, [isExpandControlled, expandable?.expandedRowKeys]);
|
|
171
|
+
const [fixedOverrides, setFixedOverrides] = React.useState({});
|
|
172
|
+
const displayColumns = React.useMemo(() => {
|
|
149
173
|
return columns.map((column) => {
|
|
150
174
|
const hasOverride = Object.prototype.hasOwnProperty.call(fixedOverrides, column.key);
|
|
151
175
|
return {
|
|
@@ -154,23 +178,23 @@ function Table({
|
|
|
154
178
|
};
|
|
155
179
|
});
|
|
156
180
|
}, [columns, fixedOverrides]);
|
|
157
|
-
const totalColumnCount =
|
|
181
|
+
const totalColumnCount = React.useMemo(() => {
|
|
158
182
|
let count = displayColumns.length;
|
|
159
183
|
if (rowSelection && rowSelection.showCheckbox !== false) count++;
|
|
160
184
|
if (expandable) count++;
|
|
161
185
|
return count;
|
|
162
186
|
}, [displayColumns.length, rowSelection, expandable]);
|
|
163
|
-
const columnByKey =
|
|
187
|
+
const columnByKey = React.useMemo(() => {
|
|
164
188
|
const map = {};
|
|
165
189
|
for (const column of displayColumns) {
|
|
166
190
|
map[column.key] = column;
|
|
167
191
|
}
|
|
168
192
|
return map;
|
|
169
193
|
}, [displayColumns]);
|
|
170
|
-
const fixedColumnsInfo =
|
|
194
|
+
const fixedColumnsInfo = React.useMemo(() => {
|
|
171
195
|
return tigercatCore.getFixedColumnOffsets(displayColumns);
|
|
172
196
|
}, [displayColumns]);
|
|
173
|
-
const toggleColumnLock =
|
|
197
|
+
const toggleColumnLock = React.useCallback(
|
|
174
198
|
(columnKey) => {
|
|
175
199
|
setFixedOverrides((prev) => {
|
|
176
200
|
const original = columns.find((c) => c.key === columnKey)?.fixed;
|
|
@@ -184,37 +208,45 @@ function Table({
|
|
|
184
208
|
},
|
|
185
209
|
[columns]
|
|
186
210
|
);
|
|
187
|
-
const processedData =
|
|
211
|
+
const processedData = React.useMemo(() => {
|
|
188
212
|
let data = dataSource;
|
|
189
|
-
|
|
213
|
+
if (filterMode === "advanced" && advancedFilterRules.length > 0) {
|
|
214
|
+
data = tigercatCore.filterDataAdvanced(data, advancedFilterRules);
|
|
215
|
+
} else {
|
|
216
|
+
data = tigercatCore.filterData(data, filterState);
|
|
217
|
+
}
|
|
190
218
|
if (sortState.key && sortState.direction) {
|
|
191
219
|
const column = columnByKey[sortState.key];
|
|
192
220
|
data = tigercatCore.sortData(data, sortState.key, sortState.direction, column?.sortFn);
|
|
193
221
|
}
|
|
194
222
|
return data;
|
|
195
|
-
}, [dataSource, filterState, sortState, columnByKey]);
|
|
196
|
-
const paginatedData =
|
|
223
|
+
}, [dataSource, filterState, sortState, columnByKey, filterMode, advancedFilterRules]);
|
|
224
|
+
const paginatedData = React.useMemo(() => {
|
|
197
225
|
if (pagination === false) {
|
|
198
226
|
return processedData;
|
|
199
227
|
}
|
|
200
228
|
return tigercatCore.paginateData(processedData, currentPage, currentPageSize);
|
|
201
229
|
}, [processedData, currentPage, currentPageSize, pagination]);
|
|
202
|
-
const pageRowKeys =
|
|
230
|
+
const pageRowKeys = React.useMemo(
|
|
203
231
|
() => paginatedData.map((record, index) => tigercatCore.getRowKey(record, rowKey, index)),
|
|
204
232
|
[paginatedData, rowKey]
|
|
205
233
|
);
|
|
206
|
-
const selectedRowKeySet =
|
|
234
|
+
const selectedRowKeySet = React.useMemo(
|
|
207
235
|
() => new Set(selectedRowKeys),
|
|
208
236
|
[selectedRowKeys]
|
|
209
237
|
);
|
|
210
|
-
const
|
|
238
|
+
const expandedRowKeySet = React.useMemo(
|
|
239
|
+
() => new Set(expandedRowKeys),
|
|
240
|
+
[expandedRowKeys]
|
|
241
|
+
);
|
|
242
|
+
const paginationInfo = React.useMemo(() => {
|
|
211
243
|
if (pagination === false) {
|
|
212
244
|
return null;
|
|
213
245
|
}
|
|
214
246
|
const total = processedData.length;
|
|
215
247
|
return tigercatCore.calculatePagination(total, currentPage, currentPageSize);
|
|
216
248
|
}, [processedData.length, currentPage, currentPageSize, pagination]);
|
|
217
|
-
const handleSort =
|
|
249
|
+
const handleSort = React.useCallback(
|
|
218
250
|
(columnKey) => {
|
|
219
251
|
const column = columnByKey[columnKey];
|
|
220
252
|
if (!column || !column.sortable) {
|
|
@@ -257,7 +289,7 @@ function Table({
|
|
|
257
289
|
onChange
|
|
258
290
|
]
|
|
259
291
|
);
|
|
260
|
-
const handleFilter =
|
|
292
|
+
const handleFilter = React.useCallback(
|
|
261
293
|
(columnKey, value) => {
|
|
262
294
|
const newFilterState = {
|
|
263
295
|
...filterState,
|
|
@@ -287,7 +319,7 @@ function Table({
|
|
|
287
319
|
onChange
|
|
288
320
|
]
|
|
289
321
|
);
|
|
290
|
-
const handlePageChange =
|
|
322
|
+
const handlePageChange = React.useCallback(
|
|
291
323
|
(page) => {
|
|
292
324
|
setUncontrolledCurrentPage(page);
|
|
293
325
|
onPageChange?.({ current: page, pageSize: currentPageSize });
|
|
@@ -302,7 +334,7 @@ function Table({
|
|
|
302
334
|
},
|
|
303
335
|
[currentPageSize, sortState, filterState, onPageChange, onChange]
|
|
304
336
|
);
|
|
305
|
-
const handlePageSizeChange =
|
|
337
|
+
const handlePageSizeChange = React.useCallback(
|
|
306
338
|
(pageSize) => {
|
|
307
339
|
setUncontrolledCurrentPageSize(pageSize);
|
|
308
340
|
setUncontrolledCurrentPage(1);
|
|
@@ -318,13 +350,31 @@ function Table({
|
|
|
318
350
|
},
|
|
319
351
|
[sortState, filterState, onPageChange, onChange]
|
|
320
352
|
);
|
|
321
|
-
const
|
|
353
|
+
const handleToggleExpand = React.useCallback(
|
|
354
|
+
(key, record) => {
|
|
355
|
+
const isExpanded = expandedRowKeySet.has(key);
|
|
356
|
+
const newKeys = isExpanded ? expandedRowKeys.filter((k) => k !== key) : [...expandedRowKeys, key];
|
|
357
|
+
if (!isExpandControlled) {
|
|
358
|
+
setUncontrolledExpandedRowKeys(newKeys);
|
|
359
|
+
}
|
|
360
|
+
onExpandChange?.(newKeys, record, !isExpanded);
|
|
361
|
+
},
|
|
362
|
+
[expandedRowKeySet, expandedRowKeys, isExpandControlled, onExpandChange]
|
|
363
|
+
);
|
|
364
|
+
const handleRowClick = React.useCallback(
|
|
322
365
|
(record, index) => {
|
|
323
366
|
onRowClick?.(record, index);
|
|
367
|
+
if (expandable?.expandRowByClick) {
|
|
368
|
+
const key = tigercatCore.getRowKey(record, rowKey, index);
|
|
369
|
+
const isExpandableRow = expandable?.rowExpandable ? expandable.rowExpandable(record) : true;
|
|
370
|
+
if (isExpandableRow) {
|
|
371
|
+
handleToggleExpand(key, record);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
324
374
|
},
|
|
325
|
-
[onRowClick]
|
|
375
|
+
[onRowClick, expandable, rowKey, handleToggleExpand]
|
|
326
376
|
);
|
|
327
|
-
const handleSelectRow =
|
|
377
|
+
const handleSelectRow = React.useCallback(
|
|
328
378
|
(key, checked) => {
|
|
329
379
|
let newKeys;
|
|
330
380
|
if (rowSelection?.type === "radio") {
|
|
@@ -343,7 +393,7 @@ function Table({
|
|
|
343
393
|
},
|
|
344
394
|
[rowSelection, selectedRowKeys, isSelectionControlled, onSelectionChange]
|
|
345
395
|
);
|
|
346
|
-
const handleSelectAll =
|
|
396
|
+
const handleSelectAll = React.useCallback(
|
|
347
397
|
(checked) => {
|
|
348
398
|
if (checked) {
|
|
349
399
|
const newKeys = pageRowKeys;
|
|
@@ -360,18 +410,73 @@ function Table({
|
|
|
360
410
|
},
|
|
361
411
|
[pageRowKeys, isSelectionControlled, onSelectionChange]
|
|
362
412
|
);
|
|
363
|
-
const allSelected =
|
|
413
|
+
const allSelected = React.useMemo(() => {
|
|
364
414
|
if (pageRowKeys.length === 0) {
|
|
365
415
|
return false;
|
|
366
416
|
}
|
|
367
417
|
return pageRowKeys.every((key) => selectedRowKeySet.has(key));
|
|
368
418
|
}, [pageRowKeys, selectedRowKeySet]);
|
|
369
|
-
const someSelected =
|
|
419
|
+
const someSelected = React.useMemo(() => {
|
|
370
420
|
return selectedRowKeys.length > 0 && !allSelected;
|
|
371
421
|
}, [selectedRowKeys.length, allSelected]);
|
|
372
|
-
const
|
|
422
|
+
const [editingCell, setEditingCell] = React.useState(
|
|
423
|
+
null
|
|
424
|
+
);
|
|
425
|
+
const [editingValue, setEditingValue] = React.useState("");
|
|
426
|
+
const isCellEditable = React.useCallback(
|
|
427
|
+
(columnKey, rowIndex) => {
|
|
428
|
+
if (!editable) return false;
|
|
429
|
+
if (!editableCells) return true;
|
|
430
|
+
return !!editableCells.get(columnKey)?.has(rowIndex);
|
|
431
|
+
},
|
|
432
|
+
[editable, editableCells]
|
|
433
|
+
);
|
|
434
|
+
const startEditing = React.useCallback((rowIndex, columnKey, currentValue) => {
|
|
435
|
+
setEditingCell({ rowIndex, columnKey });
|
|
436
|
+
setEditingValue(String(currentValue ?? ""));
|
|
437
|
+
}, []);
|
|
438
|
+
const commitEdit = React.useCallback(() => {
|
|
439
|
+
if (editingCell) {
|
|
440
|
+
onCellChange?.(editingCell.rowIndex, editingCell.columnKey, editingValue);
|
|
441
|
+
setEditingCell(null);
|
|
442
|
+
}
|
|
443
|
+
}, [editingCell, editingValue, onCellChange]);
|
|
444
|
+
const cancelEdit = React.useCallback(() => {
|
|
445
|
+
setEditingCell(null);
|
|
446
|
+
}, []);
|
|
447
|
+
const handleExport = React.useCallback(() => {
|
|
448
|
+
const csv = tigercatCore.exportTableToCsv(displayColumns, processedData);
|
|
449
|
+
tigercatCore.downloadCsv(csv, exportFilename);
|
|
450
|
+
onExport?.(csv);
|
|
451
|
+
}, [displayColumns, processedData, exportFilename, onExport]);
|
|
452
|
+
const [dragColumnKey, setDragColumnKey] = React.useState(null);
|
|
453
|
+
const handleDragStart = React.useCallback((columnKey) => {
|
|
454
|
+
setDragColumnKey(columnKey);
|
|
455
|
+
}, []);
|
|
456
|
+
const handleDrop = React.useCallback(
|
|
457
|
+
(targetKey) => {
|
|
458
|
+
if (!dragColumnKey || dragColumnKey === targetKey) return;
|
|
459
|
+
const cols = [...displayColumns];
|
|
460
|
+
const fromIdx = cols.findIndex((c) => c.key === dragColumnKey);
|
|
461
|
+
const toIdx = cols.findIndex((c) => c.key === targetKey);
|
|
462
|
+
if (fromIdx >= 0 && toIdx >= 0) {
|
|
463
|
+
const [moved] = cols.splice(fromIdx, 1);
|
|
464
|
+
cols.splice(toIdx, 0, moved);
|
|
465
|
+
onColumnOrderChange?.(cols);
|
|
466
|
+
}
|
|
467
|
+
setDragColumnKey(null);
|
|
468
|
+
},
|
|
469
|
+
[dragColumnKey, displayColumns, onColumnOrderChange]
|
|
470
|
+
);
|
|
471
|
+
const groupedData = React.useMemo(() => {
|
|
472
|
+
if (!groupBy) return null;
|
|
473
|
+
return tigercatCore.groupDataByColumn(paginatedData, groupBy);
|
|
474
|
+
}, [groupBy, paginatedData]);
|
|
475
|
+
const renderTableHeader = React.useCallback(() => {
|
|
476
|
+
const expandHeaderTh = expandable ? /* @__PURE__ */ jsxRuntime.jsx("th", { className: tigercatCore.getExpandIconCellClasses(size), "aria-label": "Expand" }) : null;
|
|
477
|
+
const expandAtStart = expandable?.expandIconPosition !== "end";
|
|
373
478
|
return /* @__PURE__ */ jsxRuntime.jsx("thead", { className: tigercatCore.getTableHeaderClasses(stickyHeader), children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
374
|
-
|
|
479
|
+
expandAtStart && expandHeaderTh,
|
|
375
480
|
rowSelection && rowSelection.showCheckbox !== false && rowSelection.type !== "radio" && /* @__PURE__ */ jsxRuntime.jsx("th", { className: tigercatCore.getCheckboxCellClasses(size), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
376
481
|
"input",
|
|
377
482
|
{
|
|
@@ -417,6 +522,10 @@ function Table({
|
|
|
417
522
|
(isFixedLeft || isFixedRight) && "bg-[var(--tiger-surface-muted,#f9fafb)]"
|
|
418
523
|
),
|
|
419
524
|
style,
|
|
525
|
+
draggable: columnDraggable ? true : void 0,
|
|
526
|
+
onDragStart: columnDraggable ? () => handleDragStart(column.key) : void 0,
|
|
527
|
+
onDragOver: columnDraggable ? (e) => e.preventDefault() : void 0,
|
|
528
|
+
onDrop: columnDraggable ? () => handleDrop(column.key) : void 0,
|
|
420
529
|
onClick: column.sortable ? () => handleSort(column.key) : void 0,
|
|
421
530
|
children: [
|
|
422
531
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -465,7 +574,7 @@ function Table({
|
|
|
465
574
|
column.key
|
|
466
575
|
);
|
|
467
576
|
}),
|
|
468
|
-
|
|
577
|
+
!expandAtStart && expandHeaderTh
|
|
469
578
|
] }) });
|
|
470
579
|
}, [
|
|
471
580
|
displayColumns,
|
|
@@ -473,6 +582,7 @@ function Table({
|
|
|
473
582
|
stickyHeader,
|
|
474
583
|
sortState,
|
|
475
584
|
rowSelection,
|
|
585
|
+
expandable,
|
|
476
586
|
allSelected,
|
|
477
587
|
someSelected,
|
|
478
588
|
handleSort,
|
|
@@ -481,142 +591,169 @@ function Table({
|
|
|
481
591
|
columnLockable,
|
|
482
592
|
toggleColumnLock,
|
|
483
593
|
fixedColumnsInfo,
|
|
484
|
-
|
|
594
|
+
columnDraggable,
|
|
595
|
+
handleDragStart,
|
|
596
|
+
handleDrop
|
|
485
597
|
]);
|
|
486
|
-
const renderTableBody =
|
|
598
|
+
const renderTableBody = React.useCallback(() => {
|
|
487
599
|
if (loading) {
|
|
488
600
|
return null;
|
|
489
601
|
}
|
|
490
602
|
if (paginatedData.length === 0) {
|
|
491
603
|
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: totalColumnCount, className: tigercatCore.tableEmptyStateClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { role: "status", "aria-live": "polite", children: emptyText }) }) }) });
|
|
492
604
|
}
|
|
493
|
-
const
|
|
494
|
-
"button",
|
|
495
|
-
{
|
|
496
|
-
className: tigercatCore.classNames(tigercatCore.expandIconButtonClasses, tigercatCore.getExpandIconRotationClasses(expanded)),
|
|
497
|
-
"aria-label": expanded ? "Collapse row" : "Expand row",
|
|
498
|
-
onClick: (e) => {
|
|
499
|
-
e.stopPropagation();
|
|
500
|
-
handleToggleExpand(rk);
|
|
501
|
-
},
|
|
502
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
503
|
-
"svg",
|
|
504
|
-
{
|
|
505
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
506
|
-
viewBox: tigercatCore.icon16ViewBox,
|
|
507
|
-
fill: "currentColor",
|
|
508
|
-
className: "w-4 h-4",
|
|
509
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 3l6 5-6 5V3z" })
|
|
510
|
-
}
|
|
511
|
-
)
|
|
512
|
-
}
|
|
513
|
-
) : null;
|
|
514
|
-
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: paginatedData.map((record, index) => {
|
|
605
|
+
const renderDataRow = (record, index) => {
|
|
515
606
|
const key = pageRowKeys[index];
|
|
516
607
|
const isSelected = selectedRowKeySet.has(key);
|
|
517
608
|
const isExpanded = expandedRowKeySet.has(key);
|
|
518
|
-
const
|
|
609
|
+
const isRowExpandable = expandable ? expandable.rowExpandable ? expandable.rowExpandable(record) : true : false;
|
|
519
610
|
const rowClass = typeof rowClassName === "function" ? rowClassName(record, index) : rowClassName;
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
);
|
|
584
|
-
}),
|
|
585
|
-
expandable && expandable.expandIconPosition === "end" && /* @__PURE__ */ jsxRuntime.jsx("td", { className: tigercatCore.getExpandCellClasses(size), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
586
|
-
ExpandToggle,
|
|
611
|
+
const expandToggleCell = expandable ? /* @__PURE__ */ jsxRuntime.jsx("td", { className: tigercatCore.getExpandIconCellClasses(size), children: isRowExpandable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
612
|
+
"button",
|
|
613
|
+
{
|
|
614
|
+
type: "button",
|
|
615
|
+
className: "inline-flex items-center justify-center",
|
|
616
|
+
"aria-label": isExpanded ? "Collapse row" : "Expand row",
|
|
617
|
+
"aria-expanded": isExpanded,
|
|
618
|
+
onClick: (e) => {
|
|
619
|
+
e.stopPropagation();
|
|
620
|
+
handleToggleExpand(key, record);
|
|
621
|
+
},
|
|
622
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ExpandIcon, { expanded: isExpanded })
|
|
623
|
+
}
|
|
624
|
+
) }) : null;
|
|
625
|
+
const expandAtStart = expandable?.expandIconPosition !== "end";
|
|
626
|
+
const rowNode = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
627
|
+
"tr",
|
|
628
|
+
{
|
|
629
|
+
className: tigercatCore.classNames(
|
|
630
|
+
tigercatCore.getTableRowClasses(hoverable, striped, index % 2 === 0, rowClass),
|
|
631
|
+
fixedColumnsInfo.hasFixedColumns && "group"
|
|
632
|
+
),
|
|
633
|
+
onClick: () => handleRowClick(record, index),
|
|
634
|
+
children: [
|
|
635
|
+
expandAtStart && expandToggleCell,
|
|
636
|
+
rowSelection && rowSelection.showCheckbox !== false && /* @__PURE__ */ jsxRuntime.jsx("td", { className: tigercatCore.getCheckboxCellClasses(size), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
637
|
+
"input",
|
|
638
|
+
{
|
|
639
|
+
type: rowSelection?.type === "radio" ? "radio" : "checkbox",
|
|
640
|
+
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)]",
|
|
641
|
+
checked: isSelected,
|
|
642
|
+
disabled: rowSelection?.getCheckboxProps?.(record)?.disabled,
|
|
643
|
+
onChange: (e) => handleSelectRow(key, e.target.checked),
|
|
644
|
+
onClick: (e) => e.stopPropagation()
|
|
645
|
+
}
|
|
646
|
+
) }),
|
|
647
|
+
displayColumns.map((column) => {
|
|
648
|
+
const dataKey = column.dataKey || column.key;
|
|
649
|
+
const cellValue = record[dataKey];
|
|
650
|
+
const isFixedLeft = column.fixed === "left";
|
|
651
|
+
const isFixedRight = column.fixed === "right";
|
|
652
|
+
const fixedStyle = isFixedLeft ? {
|
|
653
|
+
position: "sticky",
|
|
654
|
+
left: `${fixedColumnsInfo.leftOffsets[column.key] || 0}px`,
|
|
655
|
+
zIndex: 10
|
|
656
|
+
} : isFixedRight ? {
|
|
657
|
+
position: "sticky",
|
|
658
|
+
right: `${fixedColumnsInfo.rightOffsets[column.key] || 0}px`,
|
|
659
|
+
zIndex: 10
|
|
660
|
+
} : void 0;
|
|
661
|
+
const widthStyle = column.width ? {
|
|
662
|
+
width: typeof column.width === "number" ? `${column.width}px` : column.width
|
|
663
|
+
} : void 0;
|
|
664
|
+
const style = fixedStyle ? { ...widthStyle, ...fixedStyle } : widthStyle;
|
|
665
|
+
const stickyBgClass = striped && index % 2 === 0 ? "bg-[var(--tiger-surface-muted,#f9fafb)]/50" : "bg-[var(--tiger-surface,#ffffff)]";
|
|
666
|
+
const stickyCellClass = isFixedLeft || isFixedRight ? tigercatCore.classNames(
|
|
667
|
+
stickyBgClass,
|
|
668
|
+
hoverable && "group-hover:bg-[var(--tiger-surface-muted,#f9fafb)]"
|
|
669
|
+
) : void 0;
|
|
670
|
+
const isEditing = editingCell?.rowIndex === index && editingCell?.columnKey === column.key;
|
|
671
|
+
const cellEditable = isCellEditable(column.key, index);
|
|
672
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
673
|
+
"td",
|
|
587
674
|
{
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
675
|
+
className: tigercatCore.classNames(
|
|
676
|
+
tigercatCore.getTableCellClasses(size, column.align || "left", column.className),
|
|
677
|
+
stickyCellClass,
|
|
678
|
+
cellEditable && tigercatCore.getEditableCellClasses(!!isEditing)
|
|
679
|
+
),
|
|
680
|
+
style,
|
|
681
|
+
onDoubleClick: cellEditable ? () => startEditing(index, column.key, cellValue) : void 0,
|
|
682
|
+
children: isEditing ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
683
|
+
"input",
|
|
684
|
+
{
|
|
685
|
+
className: tigercatCore.editableCellInputClasses,
|
|
686
|
+
value: editingValue,
|
|
687
|
+
onChange: (e) => setEditingValue(e.target.value),
|
|
688
|
+
onBlur: commitEdit,
|
|
689
|
+
onKeyDown: (e) => {
|
|
690
|
+
if (e.key === "Enter") commitEdit();
|
|
691
|
+
if (e.key === "Escape") cancelEdit();
|
|
692
|
+
},
|
|
693
|
+
autoFocus: true
|
|
694
|
+
}
|
|
695
|
+
) : column.render ? column.render(record, index) : cellValue
|
|
696
|
+
},
|
|
697
|
+
column.key
|
|
698
|
+
);
|
|
699
|
+
}),
|
|
700
|
+
!expandAtStart && expandToggleCell
|
|
701
|
+
]
|
|
702
|
+
},
|
|
703
|
+
key
|
|
704
|
+
);
|
|
705
|
+
if (expandable && isExpanded && isRowExpandable) {
|
|
706
|
+
const expandedContent = expandable.expandedRowRender ? expandable.expandedRowRender(record, index) : null;
|
|
707
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React__default.default.Fragment, { children: [
|
|
708
|
+
rowNode,
|
|
709
|
+
/* @__PURE__ */ jsxRuntime.jsx("tr", { className: tigercatCore.getExpandedRowClasses(), children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: totalColumnCount, className: tigercatCore.getExpandedRowContentClasses(size), children: expandedContent }) }, `${key}-expanded`)
|
|
710
|
+
] }, key);
|
|
711
|
+
}
|
|
712
|
+
return rowNode;
|
|
713
|
+
};
|
|
714
|
+
if (groupedData) {
|
|
715
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from(groupedData.entries()).map(([groupKey, groupItems]) => /* @__PURE__ */ jsxRuntime.jsxs(React__default.default.Fragment, { children: [
|
|
716
|
+
/* @__PURE__ */ jsxRuntime.jsx("tr", { className: tigercatCore.tableGroupHeaderClasses, children: /* @__PURE__ */ jsxRuntime.jsxs("td", { colSpan: totalColumnCount, className: tigercatCore.getGroupHeaderCellClasses(size), children: [
|
|
717
|
+
groupKey,
|
|
718
|
+
" (",
|
|
719
|
+
groupItems.length,
|
|
720
|
+
")"
|
|
721
|
+
] }) }),
|
|
722
|
+
groupItems.map((record, idx) => {
|
|
723
|
+
const globalIndex = paginatedData.indexOf(record);
|
|
724
|
+
return renderDataRow(record, globalIndex >= 0 ? globalIndex : idx);
|
|
725
|
+
})
|
|
726
|
+
] }, `group-${groupKey}`)) });
|
|
727
|
+
}
|
|
728
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: paginatedData.map((record, index) => renderDataRow(record, index)) });
|
|
599
729
|
}, [
|
|
600
730
|
loading,
|
|
601
731
|
paginatedData,
|
|
602
732
|
displayColumns,
|
|
603
733
|
rowSelection,
|
|
734
|
+
expandable,
|
|
604
735
|
emptyText,
|
|
605
736
|
pageRowKeys,
|
|
606
737
|
selectedRowKeySet,
|
|
738
|
+
expandedRowKeySet,
|
|
739
|
+
totalColumnCount,
|
|
607
740
|
rowClassName,
|
|
608
741
|
hoverable,
|
|
609
742
|
striped,
|
|
610
743
|
size,
|
|
611
744
|
handleRowClick,
|
|
612
745
|
handleSelectRow,
|
|
613
|
-
fixedColumnsInfo,
|
|
614
|
-
expandable,
|
|
615
|
-
expandedRowKeySet,
|
|
616
746
|
handleToggleExpand,
|
|
617
|
-
|
|
747
|
+
fixedColumnsInfo,
|
|
748
|
+
groupedData,
|
|
749
|
+
editingCell,
|
|
750
|
+
editingValue,
|
|
751
|
+
isCellEditable,
|
|
752
|
+
startEditing,
|
|
753
|
+
commitEdit,
|
|
754
|
+
cancelEdit
|
|
618
755
|
]);
|
|
619
|
-
const renderPagination =
|
|
756
|
+
const renderPagination = React.useCallback(() => {
|
|
620
757
|
if (pagination === false || !paginationInfo) {
|
|
621
758
|
return null;
|
|
622
759
|
}
|
|
@@ -675,19 +812,36 @@ function Table({
|
|
|
675
812
|
handlePageChange,
|
|
676
813
|
handlePageSizeChange
|
|
677
814
|
]);
|
|
678
|
-
const
|
|
679
|
-
()
|
|
815
|
+
const renderSummaryRow = React.useCallback(() => {
|
|
816
|
+
if (!summaryRow?.show) return null;
|
|
817
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tfoot", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: tigercatCore.tableSummaryRowClasses, children: [
|
|
818
|
+
rowSelection && rowSelection.showCheckbox !== false && /* @__PURE__ */ jsxRuntime.jsx("td", { className: tigercatCore.getTableCellClasses(size, "left") }),
|
|
819
|
+
expandable && /* @__PURE__ */ jsxRuntime.jsx("td", { className: tigercatCore.getTableCellClasses(size, "left") }),
|
|
820
|
+
displayColumns.map((column) => /* @__PURE__ */ jsxRuntime.jsx("td", { className: tigercatCore.getTableCellClasses(size, column.align || "left"), children: summaryRow.data[column.dataKey || column.key] ?? "" }, column.key))
|
|
821
|
+
] }) });
|
|
822
|
+
}, [summaryRow, displayColumns, size, rowSelection, expandable]);
|
|
823
|
+
const wrapperStyle = React.useMemo(() => {
|
|
824
|
+
if (virtual) {
|
|
825
|
+
return {
|
|
826
|
+
height: typeof virtualHeight === "number" ? `${virtualHeight}px` : virtualHeight,
|
|
827
|
+
overflow: "auto"
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
return maxHeight ? {
|
|
680
831
|
maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight
|
|
681
|
-
} : void 0
|
|
682
|
-
|
|
683
|
-
);
|
|
832
|
+
} : void 0;
|
|
833
|
+
}, [maxHeight, virtual, virtualHeight]);
|
|
684
834
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
685
835
|
"div",
|
|
686
836
|
{
|
|
687
|
-
className: tigercatCore.getTableWrapperClasses(
|
|
837
|
+
className: tigercatCore.getTableWrapperClasses(
|
|
838
|
+
bordered,
|
|
839
|
+
maxHeight || (virtual ? virtualHeight : void 0)
|
|
840
|
+
),
|
|
688
841
|
style: wrapperStyle,
|
|
689
842
|
"aria-busy": loading,
|
|
690
843
|
children: [
|
|
844
|
+
exportable && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: tigercatCore.tableExportButtonClasses, onClick: handleExport, children: "Export CSV" }) }),
|
|
691
845
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
692
846
|
"table",
|
|
693
847
|
{
|
|
@@ -703,7 +857,8 @@ function Table({
|
|
|
703
857
|
} : props.style,
|
|
704
858
|
children: [
|
|
705
859
|
renderTableHeader(),
|
|
706
|
-
renderTableBody()
|
|
860
|
+
renderTableBody(),
|
|
861
|
+
renderSummaryRow()
|
|
707
862
|
]
|
|
708
863
|
}
|
|
709
864
|
),
|