@apple-pie/slice 0.1.43 → 0.1.45
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/cjs/chunks/{AudioBubble-DVv8x7ei.js → AudioBubble-DSKLRflw.js} +3 -4
- package/dist/cjs/chunks/{Avatar-C_RcdMan.js → Avatar-CFcsdTuN.js} +1 -1
- package/dist/cjs/chunks/{AvatarGroup-BJ5FA1xz.js → AvatarGroup-CMd6AE9B.js} +1 -1
- package/dist/cjs/chunks/{Badge-CcJjIIq3.js → Badge-C__w6y3X.js} +1 -1
- package/dist/cjs/chunks/{Button-C8_--WPm.js → Button-BLdW3YU9.js} +1 -1
- package/dist/cjs/chunks/{ButtonBar-DrF6u8kP.js → ButtonBar-CL4kiqgc.js} +1 -1
- package/dist/cjs/chunks/{Camera-DLDdaks3.js → Camera-BmLMOBRg.js} +4 -5
- package/dist/cjs/chunks/{CheckBox-cBC2ogLO.js → CheckBox-Cihl0IrF.js} +1 -1
- package/dist/cjs/chunks/{Chip-NEJWWZe1.js → Chip-BfD_0Cig.js} +1 -1
- package/dist/cjs/chunks/{DivInput-CoCYWefH.js → DivInput-LIJ7zv8H.js} +1 -1
- package/dist/cjs/chunks/{Dot-PUjIvbKa.js → Dot-Bj2a76Ta.js} +1 -1
- package/dist/cjs/chunks/{DrggablePanel-Vq4bAKu1.js → DrggablePanel-CqzMpyGs.js} +3 -4
- package/dist/cjs/chunks/{DropDown-JInjqB5Y.js → DropDown-pWYMxruM.js} +1 -1
- package/dist/cjs/chunks/{ErrorSummary-AVYbEF_g.js → ErrorSummary-ClLL68U3.js} +3 -4
- package/dist/cjs/chunks/{FileIcon-BPAzaXAt.js → FileIcon-z21zrEc2.js} +4 -5
- package/dist/cjs/chunks/{FileList-CQhbZHbY.js → FileList-qY-irjP-.js} +1 -1
- package/dist/cjs/chunks/{FlexDiv-Dql7iTFb.js → FlexDiv-DgR6u9Jv.js} +1 -1
- package/dist/cjs/chunks/{Grouper-DnWExqjo.js → Grouper-DeYMKA1T.js} +4 -4
- package/dist/cjs/chunks/{Icon-8QuM6PRf.js → Icon-tc6LQovS.js} +3 -4
- package/dist/cjs/chunks/{IconButton-BfvKRPF0.js → IconButton-LoaWO9zY.js} +1 -1
- package/dist/cjs/chunks/{IndexedDB-Bje9-zII.js → IndexedDB-CYqvMLuZ.js} +1 -1
- package/dist/cjs/chunks/{Label-Cj7pPrQE.js → Label-T84i3rWo.js} +1 -1
- package/dist/cjs/chunks/{Level-BQroVfP-.js → Level-OEsy5yT2.js} +1 -1
- package/dist/cjs/chunks/{Modal-B1zBYZNA.js → Modal-DqXuXPge.js} +1 -1
- package/dist/cjs/chunks/{ModalController-QKGEcYWI.js → ModalController-C91kCSxO.js} +2 -3
- package/dist/cjs/chunks/{Overlay-CWb4rAdA.js → Overlay-D3QPWT8O.js} +1 -1
- package/dist/cjs/chunks/{Pager-zWKzABAT.js → Pager-CLtuO3Sv.js} +1 -1
- package/dist/cjs/chunks/{ProgressIndicator-C9bvLrck.js → ProgressIndicator-DI1fY8vp.js} +3 -4
- package/dist/cjs/chunks/{PromptInput-C93NLI6t.js → PromptInput-BMnpfTXt.js} +4 -5
- package/dist/cjs/chunks/{RadioButton-68n0J1td.js → RadioButton-CzkQTfqG.js} +1 -1
- package/dist/cjs/chunks/{RadioButtonList-BhikIgcw.js → RadioButtonList-CVkww1_P.js} +1 -1
- package/dist/cjs/chunks/{Slider-UDlSHjiR.js → Slider-9ze6h-KZ.js} +3 -4
- package/dist/cjs/chunks/{Spacer-C-jTTNMg.js → Spacer-DuipTdw1.js} +1 -1
- package/dist/cjs/chunks/{Switch-BGr505Fu.js → Switch-Bug1jQu4.js} +1 -1
- package/dist/cjs/chunks/{TabBar-BfxEzaa4.js → TabBar-CLDId1LR.js} +4 -5
- package/dist/cjs/chunks/{TextArea-BX5K4g86.js → TextArea-DyQZBTPs.js} +1 -1
- package/dist/cjs/chunks/{TextField-CcQD_y3l.js → TextField-BR-pQK87.js} +4 -5
- package/dist/cjs/chunks/{Tip-CgCUNWWg.js → Tip-BvGX_YgV.js} +1 -1
- package/dist/cjs/chunks/{Toast-5l4r8cdV.js → Toast-D7pGWE3h.js} +4 -5
- package/dist/cjs/chunks/{ToggleButton-C0ZYea67.js → ToggleButton-8NaB4UUl.js} +1 -1
- package/dist/cjs/chunks/{UploadArea-DrsgfDME.js → UploadArea-G-mBqjb7.js} +1 -1
- package/dist/cjs/chunks/{Video-_nIf0Wt-.js → Video-Ba3wg6jb.js} +1 -1
- package/dist/cjs/chunks/{VideoController-CV2tnTh0.js → VideoController-BKzIJmMa.js} +3 -4
- package/dist/cjs/chunks/{WSConnection-EjlOlufP.js → WSConnection-DMrqNo3k.js} +1 -1
- package/dist/cjs/chunks/{WebRTCConnection-72YFnMm3.js → WebRTCConnection-DNnDh6-M.js} +1 -1
- package/dist/cjs/chunks/{localDBStore-BHHiMyZH.js → localDBStore-BTA4H5xb.js} +1 -1
- package/dist/cjs/chunks/{microphoneStore-BdACzgmA.js → microphoneStore-Gd9Pi7xk.js} +1 -1
- package/dist/cjs/chunks/{misc-BD1HRncd.js → misc-DwqTFwbJ.js} +1 -1
- package/dist/cjs/chunks/rafThrottle-CUFIaObP.js +22 -0
- package/dist/cjs/chunks/{sseStore-m-W_RKIO.js → sseStore-BLzihLI9.js} +2 -2
- package/dist/cjs/chunks/{uploads-worker-CS_q2jkr.js → uploads-worker-b6jenaeT.js} +1 -1
- package/dist/cjs/chunks/{uploadsStore-B9vUKZH5.js → uploadsStore-BdD0blGO.js} +2 -2
- package/dist/cjs/chunks/viewState-DgJIoERG.js +493 -0
- package/dist/cjs/chunks/{volumeStore-uuVL43b7.js → volumeStore-BU9B-kDV.js} +1 -1
- package/dist/cjs/chunks/{webRTCStore-B-E2J01f.js → webRTCStore-U1mlk90q.js} +1 -1
- package/dist/cjs/chunks/{windowStore-CQhMrEf5.js → windowStore-qDiDW4v-.js} +1 -1
- package/dist/cjs/components/AudioBubble/index.js +6 -7
- package/dist/cjs/components/Avatar/index.js +3 -3
- package/dist/cjs/components/AvatarGroup/index.js +3 -3
- package/dist/cjs/components/Badge/index.js +2 -2
- package/dist/cjs/components/Button/index.js +9 -9
- package/dist/cjs/components/ButtonBar/index.js +6 -7
- package/dist/cjs/components/Camera/index.js +7 -8
- package/dist/cjs/components/CheckBox/index.js +6 -7
- package/dist/cjs/components/Chip/index.js +7 -7
- package/dist/cjs/components/DataTable/index.js +10 -9
- package/dist/cjs/components/DivInput/index.js +3 -3
- package/dist/cjs/components/Dot/index.js +2 -2
- package/dist/cjs/components/DraggablePanel/index.js +6 -7
- package/dist/cjs/components/DropDown/index.js +6 -7
- package/dist/cjs/components/ErrorSummary/index.js +6 -6
- package/dist/cjs/components/FileIcon/index.js +6 -6
- package/dist/cjs/components/FileList/index.js +6 -7
- package/dist/cjs/components/FlexDiv/index.js +2 -2
- package/dist/cjs/components/Grouper/index.js +7 -7
- package/dist/cjs/components/Icon/index.js +6 -6
- package/dist/cjs/components/IconButton/index.js +8 -9
- package/dist/cjs/components/Label/index.js +3 -3
- package/dist/cjs/components/Level/index.js +3 -3
- package/dist/cjs/components/Modal/index.js +10 -10
- package/dist/cjs/components/ModalController/index.js +5 -6
- package/dist/cjs/components/Overlay/index.js +2 -2
- package/dist/cjs/components/Pager/index.js +3 -3
- package/dist/cjs/components/Progress/index.js +5 -5
- package/dist/cjs/components/PromptInput/index.js +9 -10
- package/dist/cjs/components/RadioButton/index.js +6 -7
- package/dist/cjs/components/RadioButtonList/index.js +7 -8
- package/dist/cjs/components/Slider/index.js +6 -7
- package/dist/cjs/components/Spacer/index.js +2 -2
- package/dist/cjs/components/Switch/index.js +2 -2
- package/dist/cjs/components/TabBar/index.js +8 -9
- package/dist/cjs/components/TextArea/index.js +9 -9
- package/dist/cjs/components/Textfield/index.js +9 -10
- package/dist/cjs/components/Tip/index.js +3 -3
- package/dist/cjs/components/Toast/index.js +6 -6
- package/dist/cjs/components/ToggleButton/index.js +9 -9
- package/dist/cjs/components/UploadArea/index.js +11 -11
- package/dist/cjs/components/Video/index.js +11 -12
- package/dist/cjs/components/VideoController/index.js +9 -10
- package/dist/cjs/hooks/useAudioRecorder.js +1 -1
- package/dist/cjs/hooks/useBindWebRTC.js +2 -2
- package/dist/cjs/hooks/useMdStreamBuffer.js +1 -1
- package/dist/cjs/hooks/useMicrophone.js +1 -1
- package/dist/cjs/hooks/useTrackRenders.js +2 -2
- package/dist/cjs/hooks.js +3 -3
- package/dist/cjs/index.js +10 -10
- package/dist/cjs/stores/LocalDB.js +3 -3
- package/dist/cjs/stores/SSE.js +2 -2
- package/dist/cjs/stores/WS.js +2 -2
- package/dist/cjs/stores/WebRTC.js +2 -2
- package/dist/cjs/stores/microphone.js +2 -2
- package/dist/cjs/stores/modal.js +1 -1
- package/dist/cjs/stores/tip.js +1 -1
- package/dist/cjs/stores/toast.js +1 -1
- package/dist/cjs/stores/uploads.js +2 -2
- package/dist/cjs/stores/video.js +1 -1
- package/dist/cjs/stores/volume.js +2 -2
- package/dist/cjs/stores/window.js +2 -2
- package/dist/cjs/stores.js +40 -39
- package/dist/cjs/utils/index.js +7 -7
- package/dist/cjs/utils/objects/index.js +2 -2
- package/dist/cjs/workers/uploads/uploads.js +2 -2
- package/dist/esm/chunks/{AudioBubble-BRFQseqk.mjs → AudioBubble-C8RHNRZ_.mjs} +5 -7
- package/dist/esm/chunks/{Avatar-Dt-n9rrn.mjs → Avatar-B5dBNLzt.mjs} +2 -2
- package/dist/esm/chunks/{AvatarGroup-JrdUh_a7.mjs → AvatarGroup-CXIojYDR.mjs} +2 -2
- package/dist/esm/chunks/{Badge-BW2WxvHN.mjs → Badge-CMEuRMVe.mjs} +1 -1
- package/dist/esm/chunks/{Button-BZytiaR4.mjs → Button-DvW5z2Fy.mjs} +6 -6
- package/dist/esm/chunks/{ButtonBar-CEzCaqZt.mjs → ButtonBar-CFxfVpe3.mjs} +3 -3
- package/dist/esm/chunks/{Camera-BN_0XAyY.mjs → Camera-BV_CFREh.mjs} +7 -9
- package/dist/esm/chunks/{CheckBox-BOdyteu-.mjs → CheckBox-DHFFL-Jq.mjs} +3 -3
- package/dist/esm/chunks/{Chip-DWeMn4tL.mjs → Chip-Cuh20guW.mjs} +4 -4
- package/dist/esm/chunks/{DivInput-6L3RHNX_.mjs → DivInput-BxW5ri5Q.mjs} +2 -2
- package/dist/esm/chunks/{Dot-fbFT4OcE.mjs → Dot-zriuPgn8.mjs} +1 -1
- package/dist/esm/chunks/{DrggablePanel-D19CBxPI.mjs → DrggablePanel-hAxQGwCH.mjs} +4 -6
- package/dist/esm/chunks/{DropDown-Brh1fgQU.mjs → DropDown-B0CYM8o5.mjs} +3 -3
- package/dist/esm/chunks/{ErrorSummary-MdyM8CA2.mjs → ErrorSummary-I17C5u75.mjs} +4 -6
- package/dist/esm/chunks/{FileIcon-BfFmvS11.mjs → FileIcon-CuIzwDJs.mjs} +4 -6
- package/dist/esm/chunks/{FileList-e8S9kUTk.mjs → FileList-DhitNTMJ.mjs} +5 -5
- package/dist/esm/chunks/{FlexDiv-CE6OmTvi.mjs → FlexDiv-DMXeGSEr.mjs} +1 -1
- package/dist/esm/chunks/{Grouper-HI6jgRE5.mjs → Grouper-BfkNOB5K.mjs} +5 -7
- package/dist/esm/chunks/{Icon-qVUjH6UY.mjs → Icon-QUVzyYBt.mjs} +4 -6
- package/dist/esm/chunks/{IconButton-Ryf6VCg4.mjs → IconButton-DIodt9r2.mjs} +5 -5
- package/dist/esm/chunks/{IndexedDB-Vmrc6oKn.mjs → IndexedDB-DHk5y9UO.mjs} +1 -1
- package/dist/esm/chunks/{Label-CZZymU3Q.mjs → Label-DlYEhytS.mjs} +2 -2
- package/dist/esm/chunks/{Level-BP2OOuaF.mjs → Level-BpxVLm1m.mjs} +3 -3
- package/dist/esm/chunks/{Modal-BrzyEfxf.mjs → Modal-Dg3jWsON.mjs} +5 -5
- package/dist/esm/chunks/{ModalController-aDZJe3BJ.mjs → ModalController-CDaKXxq3.mjs} +4 -6
- package/dist/esm/chunks/{Overlay-Dc6fkzIf.mjs → Overlay-DfkhMYtD.mjs} +1 -1
- package/dist/esm/chunks/{Pager-DosqPH_L.mjs → Pager-C4aHLVBY.mjs} +2 -2
- package/dist/esm/chunks/{ProgressIndicator-BxIb1MFB.mjs → ProgressIndicator-BrLB_HEn.mjs} +4 -6
- package/dist/esm/chunks/{PromptInput-d8Lvl_Ba.mjs → PromptInput-BLs3B_Um.mjs} +6 -8
- package/dist/esm/chunks/{RadioButton-DFMeH18g.mjs → RadioButton-lGkQ2BjR.mjs} +3 -3
- package/dist/esm/chunks/{RadioButtonList-BiAwI9SI.mjs → RadioButtonList-Dwdbj7oq.mjs} +3 -3
- package/dist/esm/chunks/{Slider-BrTR3O9N.mjs → Slider-C5FcSmsD.mjs} +5 -7
- package/dist/esm/chunks/{Spacer-DrahdD7A.mjs → Spacer-CUub-zd9.mjs} +1 -1
- package/dist/esm/chunks/{Switch-Nwc1qX9C.mjs → Switch-BZx31_TC.mjs} +1 -1
- package/dist/esm/chunks/{TabBar-BxgRxUnA.mjs → TabBar-BUlSi-mM.mjs} +8 -10
- package/dist/esm/chunks/{TextArea-By89U19b.mjs → TextArea-CrTPPqPj.mjs} +2 -2
- package/dist/esm/chunks/{TextField-Bgi7vOIQ.mjs → TextField-DJqLzBpE.mjs} +7 -9
- package/dist/esm/chunks/{Tip-B_EP7Vmk.mjs → Tip-6Frqfzpi.mjs} +2 -2
- package/dist/esm/chunks/{Toast-kgJ0O4Oy.mjs → Toast-CphE3OkY.mjs} +6 -8
- package/dist/esm/chunks/{ToggleButton-fGSG0TE1.mjs → ToggleButton-BXB_VtB3.mjs} +2 -2
- package/dist/esm/chunks/{UploadArea-CiB2qjtR.mjs → UploadArea-B4jM32ER.mjs} +4 -4
- package/dist/esm/chunks/{Video-D-Idnpcz.mjs → Video-DgkfQgi8.mjs} +5 -5
- package/dist/esm/chunks/{VideoController-BKW28ojb.mjs → VideoController-M3g4Pwtc.mjs} +7 -9
- package/dist/esm/chunks/{WSConnection-zS21YO-b.mjs → WSConnection-M552mwWy.mjs} +1 -1
- package/dist/esm/chunks/{WebRTCConnection-YLZJFmHZ.mjs → WebRTCConnection-BZNdtUKO.mjs} +1 -1
- package/dist/esm/chunks/{localDBStore-BCBsWmHs.mjs → localDBStore-GmKJfODp.mjs} +2 -2
- package/dist/esm/chunks/{microphoneStore-B1Dtf36s.mjs → microphoneStore-CvhusEyi.mjs} +1 -1
- package/dist/esm/chunks/{misc--ZyHIQmL.mjs → misc-CWSDLgrI.mjs} +1 -1
- package/dist/esm/chunks/rafThrottle-BX_UbPqi.mjs +23 -0
- package/dist/esm/chunks/{sseStore-BZTuP42L.mjs → sseStore-CBd7nxYG.mjs} +2 -2
- package/dist/esm/chunks/{tslib.es6-BdBaT9_q.mjs → tslib.es6-ChkYAtDK.mjs} +1 -1
- package/dist/esm/chunks/{uploads-worker-BYZjIzhr.mjs → uploads-worker-Dg7tuCe8.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-C-G39tsH.mjs → uploadsStore-bAoNL5My.mjs} +1 -1
- package/dist/esm/chunks/viewState-C-AmMZQr.mjs +517 -0
- package/dist/esm/chunks/{volumeStore-B5cIgXFy.mjs → volumeStore-BnfcWvWI.mjs} +1 -1
- package/dist/esm/chunks/{webRTCStore-Dms1MoDQ.mjs → webRTCStore-BUW-j3A9.mjs} +2 -2
- package/dist/esm/chunks/{windowStore-DYGMzncy.mjs → windowStore-CW_UBAZc.mjs} +1 -1
- package/dist/esm/components/AudioBubble/index.mjs +7 -9
- package/dist/esm/components/Avatar/index.mjs +3 -3
- package/dist/esm/components/AvatarGroup/index.mjs +4 -4
- package/dist/esm/components/Badge/index.mjs +2 -2
- package/dist/esm/components/Button/index.mjs +11 -13
- package/dist/esm/components/ButtonBar/index.mjs +7 -9
- package/dist/esm/components/Camera/index.mjs +9 -11
- package/dist/esm/components/CheckBox/index.mjs +7 -9
- package/dist/esm/components/Chip/index.mjs +8 -10
- package/dist/esm/components/DataTable/index.mjs +11 -9
- package/dist/esm/components/DivInput/index.mjs +3 -3
- package/dist/esm/components/Dot/index.mjs +2 -2
- package/dist/esm/components/DraggablePanel/index.mjs +6 -8
- package/dist/esm/components/DropDown/index.mjs +7 -9
- package/dist/esm/components/ErrorSummary/index.mjs +6 -8
- package/dist/esm/components/FileIcon/index.mjs +6 -8
- package/dist/esm/components/FileList/index.mjs +9 -11
- package/dist/esm/components/FlexDiv/index.mjs +2 -2
- package/dist/esm/components/Grouper/index.mjs +8 -10
- package/dist/esm/components/Icon/index.mjs +7 -9
- package/dist/esm/components/IconButton/index.mjs +10 -12
- package/dist/esm/components/Label/index.mjs +3 -3
- package/dist/esm/components/Level/index.mjs +4 -4
- package/dist/esm/components/Modal/index.mjs +13 -15
- package/dist/esm/components/ModalController/index.mjs +7 -9
- package/dist/esm/components/Overlay/index.mjs +2 -2
- package/dist/esm/components/Pager/index.mjs +3 -3
- package/dist/esm/components/Progress/index.mjs +7 -9
- package/dist/esm/components/PromptInput/index.mjs +14 -16
- package/dist/esm/components/RadioButton/index.mjs +7 -9
- package/dist/esm/components/RadioButtonList/index.mjs +8 -10
- package/dist/esm/components/Slider/index.mjs +7 -9
- package/dist/esm/components/Spacer/index.mjs +2 -2
- package/dist/esm/components/Switch/index.mjs +2 -2
- package/dist/esm/components/TabBar/index.mjs +11 -13
- package/dist/esm/components/TextArea/index.mjs +12 -14
- package/dist/esm/components/Textfield/index.mjs +13 -15
- package/dist/esm/components/Tip/index.mjs +3 -3
- package/dist/esm/components/Toast/index.mjs +8 -10
- package/dist/esm/components/ToggleButton/index.mjs +12 -14
- package/dist/esm/components/UploadArea/index.mjs +12 -14
- package/dist/esm/components/Video/index.mjs +15 -17
- package/dist/esm/components/VideoController/index.mjs +13 -15
- package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
- package/dist/esm/hooks/useBindWebRTC.mjs +5 -5
- package/dist/esm/hooks/useMdStreamBuffer.mjs +2 -2
- package/dist/esm/hooks/useMicrophone.mjs +1 -1
- package/dist/esm/hooks/useTrackRenders.mjs +2 -2
- package/dist/esm/hooks.mjs +6 -6
- package/dist/esm/index.mjs +59 -57
- package/dist/esm/stores/LocalDB.mjs +3 -3
- package/dist/esm/stores/SSE.mjs +3 -3
- package/dist/esm/stores/WS.mjs +2 -2
- package/dist/esm/stores/WebRTC.mjs +3 -3
- package/dist/esm/stores/microphone.mjs +2 -2
- package/dist/esm/stores/modal.mjs +1 -1
- package/dist/esm/stores/tip.mjs +1 -1
- package/dist/esm/stores/toast.mjs +1 -1
- package/dist/esm/stores/uploads.mjs +3 -3
- package/dist/esm/stores/video.mjs +1 -1
- package/dist/esm/stores/volume.mjs +2 -2
- package/dist/esm/stores/window.mjs +2 -2
- package/dist/esm/stores.mjs +18 -18
- package/dist/esm/utils/index.mjs +12 -10
- package/dist/esm/utils/objects/index.mjs +7 -7
- package/dist/esm/workers/uploads/uploads.mjs +2 -2
- package/dist/styles.css +3269 -3203
- package/dist/types/components/AudioBubble/AudioBubble.d.ts +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +1 -1
- package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/types/components/Badge/Badge.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +4 -4
- package/dist/types/components/Camera/Camera.d.ts +2 -2
- package/dist/types/components/CheckBox/CheckBox.d.ts +1 -1
- package/dist/types/components/Chip/Chip.d.ts +1 -1
- package/dist/types/components/DataTable/DataTable.d.ts +7 -2
- package/dist/types/components/DataTable/_data.d.ts +3 -1
- package/dist/types/components/DataTable/_resolveVirtualizeRows.d.ts +1 -0
- package/dist/types/components/DataTable/_resolveVirtualizeRows.test.d.ts +1 -0
- package/dist/types/components/DataTable/_types.d.ts +23 -2
- package/dist/types/components/DataTable/_useReorderColumns.d.ts +7 -0
- package/dist/types/components/DataTable/_useReorderColumns.test.d.ts +1 -0
- package/dist/types/components/DataTable/_useResizeColumn.d.ts +18 -0
- package/dist/types/components/DataTable/_useRowWindow.d.ts +15 -0
- package/dist/types/components/DataTable/_useRowWindow.test.d.ts +1 -0
- package/dist/types/components/DataTable/columnHelper.d.ts +4 -2
- package/dist/types/components/DivInput/DivInput.d.ts +1 -1
- package/dist/types/components/Dot/Dot.d.ts +1 -1
- package/dist/types/components/DraggablePanel/DrggablePanel.d.ts +2 -2
- package/dist/types/components/ErrorSummary/ErrorSummary.d.ts +1 -1
- package/dist/types/components/FileIcon/FileIcon.d.ts +1 -1
- package/dist/types/components/FileList/FileList.d.ts +1 -1
- package/dist/types/components/FlexDiv/FlexDiv.d.ts +2 -2
- package/dist/types/components/Grouper/Grouper.d.ts +1 -1
- package/dist/types/components/Icon/Icon.d.ts +1 -1
- package/dist/types/components/IconButton/IconButton.d.ts +1 -1
- package/dist/types/components/Label/Label.d.ts +2 -1
- package/dist/types/components/Level/Level.d.ts +1 -1
- package/dist/types/components/ModalController/ModalController.d.ts +2 -1
- package/dist/types/components/Overlay/Overlay.d.ts +1 -1
- package/dist/types/components/Pager/Pager.d.ts +1 -1
- package/dist/types/components/Progress/DoneCheck/DoneCheck.d.ts +1 -1
- package/dist/types/components/Progress/ProgressIndicator/ProgressIndicator.d.ts +3 -2
- package/dist/types/components/Slider/Slider.d.ts +1 -1
- package/dist/types/components/Spacer/Spacer.d.ts +1 -1
- package/dist/types/components/TabBar/TabBar.d.ts +1 -1
- package/dist/types/components/TextArea/TextArea.d.ts +1 -1
- package/dist/types/components/Textfield/TextField.d.ts +1 -1
- package/dist/types/components/ToggleButton/ToggleButton.d.ts +2 -1
- package/dist/types/components/VideoController/VideoController.d.ts +2 -1
- package/dist/types/providers/ThemeProvider.d.ts +1 -1
- package/dist/types/utils/functions/rafThrottle.d.ts +13 -0
- package/dist/types/utils/functions/rafThrottle.test.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/chunks/viewState-DmgjHoOp.js +0 -332
- package/dist/esm/chunks/viewState-94AhBeDg.mjs +0 -350
- package/dist/types/components/DataTable/_useDragColumn.d.ts +0 -14
- /package/dist/cjs/chunks/{MdStreamBuffer-lmh4kxgB.js → MdStreamBuffer-CGJnTgCw.js} +0 -0
- /package/dist/cjs/chunks/{SSEConnection-CV7OvpUR.js → SSEConnection-BMf8pqRz.js} +0 -0
- /package/dist/cjs/chunks/{_types-BYTz9zqz.js → _types-CrX297Zz.js} +0 -0
- /package/dist/cjs/chunks/{audioVisualizer-D8KXW3Vw.js → audioVisualizer-C-2yYuy_.js} +0 -0
- /package/dist/cjs/chunks/{colors-CZopyRJo.js → colors-BXuIv_3Q.js} +0 -0
- /package/dist/cjs/chunks/{debounce-BzxHYGvJ.js → debounce-COjctjMe.js} +0 -0
- /package/dist/cjs/chunks/{modalStore-BYGXd9_f.js → modalStore-dUsnPsMX.js} +0 -0
- /package/dist/cjs/chunks/{sharedTypes-DNjkrmLh.js → sharedTypes-gCKfLc_F.js} +0 -0
- /package/dist/cjs/chunks/{tipStore-BRQZT8Pj.js → tipStore-D8rVy17f.js} +0 -0
- /package/dist/cjs/chunks/{toastStore-GXggV-O_.js → toastStore-B-KcGjfs.js} +0 -0
- /package/dist/cjs/chunks/{tslib.es6-CY7UXVzV.js → tslib.es6-1b_WVOSx.js} +0 -0
- /package/dist/cjs/chunks/{videoStore-B43SSkDF.js → videoStore-CEvD64Je.js} +0 -0
- /package/dist/esm/chunks/{MdStreamBuffer-C3z6-LpW.mjs → MdStreamBuffer-D5RvMu84.mjs} +0 -0
- /package/dist/esm/chunks/{SSEConnection-BtDJoiup.mjs → SSEConnection-CgipQWUg.mjs} +0 -0
- /package/dist/esm/chunks/{_types-CBHVqX6q.mjs → _types-DJdJTzFY.mjs} +0 -0
- /package/dist/esm/chunks/{audioVisualizer-CXLuOPl4.mjs → audioVisualizer-PV2YALCi.mjs} +0 -0
- /package/dist/esm/chunks/{colors-70dW0TWM.mjs → colors-BuApx_ML.mjs} +0 -0
- /package/dist/esm/chunks/{debounce-Dr96LW_R.mjs → debounce-DcUXZUBL.mjs} +0 -0
- /package/dist/esm/chunks/{modalStore-llQRAaUx.mjs → modalStore-CxNd2bGs.mjs} +0 -0
- /package/dist/esm/chunks/{sharedTypes-C_JoMrsd.mjs → sharedTypes-BPqmyLRY.mjs} +0 -0
- /package/dist/esm/chunks/{tipStore-BUNXJpGv.mjs → tipStore-kz1SU1W0.mjs} +0 -0
- /package/dist/esm/chunks/{toastStore-CHi4PnhN.mjs → toastStore-gM8d8pIo.mjs} +0 -0
- /package/dist/esm/chunks/{videoStore-BHPpyl3e.mjs → videoStore-Tv0qujkr.mjs} +0 -0
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-BD1HRncd.js"), Icon = require("./Icon-8QuM6PRf.js"), styles = {
|
|
4
|
-
tableWrapper: "DataTable-module_tableWrapper__BzoJE",
|
|
5
|
-
resizeBar: "DataTable-module_resizeBar__LmzEF",
|
|
6
|
-
table: "DataTable-module_table__oL4Dz",
|
|
7
|
-
baseCell: "DataTable-module_baseCell__DQl-z",
|
|
8
|
-
baseCellWrapper: "DataTable-module_baseCellWrapper__WMgNm",
|
|
9
|
-
headerCellWrapper: "DataTable-module_headerCellWrapper__ytVYY",
|
|
10
|
-
colResizeHandle: "DataTable-module_colResizeHandle__dF5Es",
|
|
11
|
-
m: "DataTable-module_m__G9QOp type-module_body-m-regular__LuQBA",
|
|
12
|
-
scroll: "DataTable-module_scroll__grEU0 scrollBars-module_scrollbars__c-ZPl"
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const resolveAlignValue = value => {
|
|
16
|
-
switch (value) {
|
|
17
|
-
case "start":
|
|
18
|
-
return "flex-start";
|
|
19
|
-
|
|
20
|
-
case "center":
|
|
21
|
-
default:
|
|
22
|
-
return "center";
|
|
23
|
-
|
|
24
|
-
case "end":
|
|
25
|
-
return "flex-end";
|
|
26
|
-
}
|
|
27
|
-
}, resolveDragHandleXPos = elements => {
|
|
28
|
-
const {cell: cell, handle: handle, parent: parent} = null != elements ? elements : {};
|
|
29
|
-
if (!cell || !parent || !handle) return;
|
|
30
|
-
const {left: left, width: width} = cell.getBoundingClientRect(), x = left - parent.getBoundingClientRect().left - parent.clientLeft + parent.scrollLeft;
|
|
31
|
-
handle.style.left = `${x + width}px`;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
function DefaultHeaderRenderer(props) {
|
|
35
|
-
const {col: col, sortKey: sortKey} = props, sortable = !!col.sort, sorted = !(!(null == sortKey ? void 0 : sortKey.key) || sortKey.key !== col.sort), sortIcon = "asc" === (null == sortKey ? void 0 : sortKey.dir) ? "arrow up" : "arrow down", justifyContent = sortable ? "space-between" : resolveAlignValue(col.justify);
|
|
36
|
-
return jsxRuntime.jsxs("div", {
|
|
37
|
-
style: {
|
|
38
|
-
display: "flex",
|
|
39
|
-
alignItems: "center",
|
|
40
|
-
justifyContent: justifyContent,
|
|
41
|
-
width: "100%"
|
|
42
|
-
},
|
|
43
|
-
children: [ jsxRuntime.jsx("span", {
|
|
44
|
-
style: {
|
|
45
|
-
fontWeight: 540
|
|
46
|
-
},
|
|
47
|
-
children: col.title
|
|
48
|
-
}), sortable && jsxRuntime.jsx(Icon.Icon, {
|
|
49
|
-
name: sorted ? sortIcon : "blank",
|
|
50
|
-
size: 16
|
|
51
|
-
}) ]
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
exports.DataTable = function(props) {
|
|
56
|
-
const {backgroundColor: backgroundColor = "var(--core-surface-primary)", headerBackgroundColor: headerBackgroundColor = "var(--core-surface-secondary)", candyStripeBackgroundColor: candyStripeBackgroundColor = "var(--core-surface-primary-tint)", backgroundColorHoverRow: backgroundColorHoverRow = "var(--core-surface-primary-tint)", handleHoverColor: handleHoverColor = "var(--core-outline-special)", freezeColumn: freezeColumn = !1, headerSticky: headerSticky = !0, height: height = "auto", width: width = "100%", colResize: colResize = !0, borderColor: borderColor = "var(--core-outline-primary)", borderStyle: borderStyle = "box", columnDefinitions: columnDefinitions = [], tableData: tableData = [], getRowId: getRowId, filter: filter, caption: caption = "Data Table", onDoubleClick: onDoubleClick, onClick: onClick, onMouseOut: onMouseOut, onMouseOver: onMouseOver, sort: sort, onSortChange: onSortChange, onColumnResize: onColumnResize} = props, [hScroll, setHScroll] = React.useState(!1), [vScroll, setVScroll] = React.useState(!1), [hoveredRow, setHoveredRow] = React.useState(null), [sortKey, setSortKey] = React.useState(sort), [draggingCol, setDraggingCol] = React.useState(null), [columnWidths, setColumnWidths] = React.useState({}), wrapperRef = React.useRef(null), resizeBarRef = React.useRef(null), colRefs = React.useRef({}), handleResizeEnd = React.useCallback((id, width) => {
|
|
57
|
-
setColumnWidths(prev => Object.assign(Object.assign({}, prev), {
|
|
58
|
-
[id]: width
|
|
59
|
-
})), setDraggingCol(null), null == onColumnResize || onColumnResize(id, width);
|
|
60
|
-
}, [ onColumnResize ]);
|
|
61
|
-
!function(element, onResizeEnd) {
|
|
62
|
-
const [client, setClient] = React.useState(null), [dragging, setDragging] = React.useState(!1), didSetListenersRef = React.useRef(!1), colStartX = React.useRef(0), lastWidthRef = React.useRef(0), hasMovedRef = React.useRef(!1), resolveStartingXPos = React.useCallback(() => (null == element ? void 0 : element.cell) ? element.cell.getBoundingClientRect().left : 0, [ element ]), applyHandlePos = React.useCallback(show => {
|
|
63
|
-
const {cell: cell, handle: handle, parent: parent} = null != element ? element : {};
|
|
64
|
-
!show && handle ? handle.style.left = "-500px" : resolveDragHandleXPos({
|
|
65
|
-
cell: cell,
|
|
66
|
-
handle: handle,
|
|
67
|
-
parent: parent
|
|
68
|
-
});
|
|
69
|
-
}, [ element ]), applyWidth = React.useCallback(clientX => {
|
|
70
|
-
if (!(null == element ? void 0 : element.col)) return;
|
|
71
|
-
const newWidth = Math.max(0, clientX - colStartX.current);
|
|
72
|
-
element.col.style.width = `${newWidth}px`, lastWidthRef.current = newWidth, hasMovedRef.current = !0;
|
|
73
|
-
}, [ element ]), handleMouseMove = React.useCallback(e => {
|
|
74
|
-
e.stopPropagation(), e.preventDefault(), setDragging(!0);
|
|
75
|
-
const nextClientPos = (e => {
|
|
76
|
-
if (e.type.startsWith("touch")) {
|
|
77
|
-
const touchEvent = e;
|
|
78
|
-
return {
|
|
79
|
-
x: touchEvent.touches[0].clientX,
|
|
80
|
-
y: touchEvent.touches[0].clientY
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
const mouseEvent = e;
|
|
84
|
-
return {
|
|
85
|
-
x: mouseEvent.clientX,
|
|
86
|
-
y: mouseEvent.clientY
|
|
87
|
-
};
|
|
88
|
-
})(e);
|
|
89
|
-
setClient(nextClientPos), applyWidth(nextClientPos.x), applyHandlePos(!0);
|
|
90
|
-
}, [ applyWidth, applyHandlePos ]), handleMouseUp = React.useCallback(e => {
|
|
91
|
-
e.stopPropagation(), e.preventDefault(), setDragging(!1), setClient(null), element && hasMovedRef.current && (null == onResizeEnd || onResizeEnd(element.id, lastWidthRef.current)),
|
|
92
|
-
applyHandlePos(!1), clearListeners();
|
|
93
|
-
}, [ element, onResizeEnd, applyHandlePos ]), initListeners = React.useCallback(() => {
|
|
94
|
-
didSetListenersRef.current || (document.documentElement.addEventListener("mousemove", handleMouseMove, !1),
|
|
95
|
-
document.documentElement.addEventListener("mouseup", handleMouseUp, !1), document.documentElement.addEventListener("touchmove", handleMouseMove, !1),
|
|
96
|
-
document.documentElement.addEventListener("touchend", handleMouseUp, !1), document.documentElement.style.userSelect = "none",
|
|
97
|
-
document.documentElement.style.webkitUserSelect = "none", document.documentElement.style.cursor = "col-resize",
|
|
98
|
-
colStartX.current = resolveStartingXPos(), didSetListenersRef.current = !0);
|
|
99
|
-
}, [ handleMouseMove, handleMouseUp, resolveStartingXPos ]), clearListeners = React.useCallback(() => {
|
|
100
|
-
didSetListenersRef.current && (document.documentElement.removeEventListener("mousemove", handleMouseMove),
|
|
101
|
-
document.documentElement.removeEventListener("mouseup", handleMouseUp), document.documentElement.removeEventListener("touchmove", handleMouseMove, !1),
|
|
102
|
-
document.documentElement.removeEventListener("touchend", handleMouseUp, !1), document.documentElement.style.userSelect = "auto",
|
|
103
|
-
document.documentElement.style.webkitUserSelect = "auto", document.documentElement.style.cursor = "default",
|
|
104
|
-
colStartX.current = 0, lastWidthRef.current = 0, hasMovedRef.current = !1, didSetListenersRef.current = !1);
|
|
105
|
-
}, [ handleMouseMove, handleMouseUp ]);
|
|
106
|
-
React.useEffect(() => (element ? initListeners() : clearListeners(), () => clearListeners()), [ element, initListeners, clearListeners ]);
|
|
107
|
-
}(draggingCol, handleResizeEnd);
|
|
108
|
-
const cornerBoxShadow = React.useMemo(() => {
|
|
109
|
-
const shadows = [];
|
|
110
|
-
return hScroll && freezeColumn && shadows.push("1px 0 0 var(--core-outline-primary)", "5px 0 0 rgba(0,0,0,0.1)"),
|
|
111
|
-
vScroll && headerSticky && shadows.push("0 1px 0 var(--core-outline-primary)"),
|
|
112
|
-
vScroll && headerSticky && !hScroll && shadows.push("0 5px 0 rgba(0,0,0,0.1)"),
|
|
113
|
-
shadows.length > 0 ? shadows.join(",") : "none";
|
|
114
|
-
}, [ hScroll, vScroll, freezeColumn, headerSticky ]), columnBoxShadow = React.useMemo(() => {
|
|
115
|
-
const shadows = [];
|
|
116
|
-
return hScroll && freezeColumn && shadows.push("1px 0 0 var(--core-outline-primary)", "5px 0 0 rgba(0,0,0,0.1)"),
|
|
117
|
-
shadows.length > 0 ? shadows.join(",") : "none";
|
|
118
|
-
}, [ hScroll, freezeColumn ]), headerBoxShadow = React.useMemo(() => {
|
|
119
|
-
const shadows = [];
|
|
120
|
-
return vScroll && headerSticky && shadows.push("0 1px 0 var(--core-outline-primary)", "0 5px 0 rgba(0,0,0,0.1)"),
|
|
121
|
-
shadows.length > 0 ? shadows.join(",") : "none";
|
|
122
|
-
}, [ vScroll, headerSticky ]), cssVars = React.useMemo(() => ({
|
|
123
|
-
"--table-width": misc.setStyle(width),
|
|
124
|
-
"--table-height": misc.setStyle(height),
|
|
125
|
-
"--table-background-color": backgroundColor,
|
|
126
|
-
"--table-column-box-shadow": columnBoxShadow,
|
|
127
|
-
"--table-header-box-shadow": headerBoxShadow,
|
|
128
|
-
"--table-corner-box-shadow": cornerBoxShadow,
|
|
129
|
-
"--table-header-background-color": headerBackgroundColor,
|
|
130
|
-
"--table-candy-stripe-background-color": candyStripeBackgroundColor,
|
|
131
|
-
"--table-freeze-column-position": freezeColumn ? "sticky" : "relative",
|
|
132
|
-
"--table-header-sticky-position": headerSticky ? "sticky" : "relative",
|
|
133
|
-
"--table-border-color": borderColor,
|
|
134
|
-
"--table-corner-position": freezeColumn || headerSticky ? "sticky" : "relative",
|
|
135
|
-
"--table-corner-left": freezeColumn ? "0px" : "unset",
|
|
136
|
-
"--table-border-width": "none" === borderStyle ? "0" : "1px",
|
|
137
|
-
"--table-border-sides": "box" === borderStyle ? "1px" : "0",
|
|
138
|
-
"--table-handle-hover-color": handleHoverColor
|
|
139
|
-
}), [ backgroundColor, headerBackgroundColor, candyStripeBackgroundColor, cornerBoxShadow, columnBoxShadow, headerBoxShadow, freezeColumn, headerSticky, width, height, borderColor, borderStyle, handleHoverColor ]), handleScroll = React.useCallback(() => {
|
|
140
|
-
var _a, _b, _c, _d;
|
|
141
|
-
const hScrollAmount = null !== (_b = null === (_a = wrapperRef.current) || void 0 === _a ? void 0 : _a.scrollLeft) && void 0 !== _b ? _b : 0, vScrollAmount = null !== (_d = null === (_c = wrapperRef.current) || void 0 === _c ? void 0 : _c.scrollTop) && void 0 !== _d ? _d : 0;
|
|
142
|
-
setHScroll(hScrollAmount > 0), setVScroll(vScrollAmount > 0);
|
|
143
|
-
}, []), rows = React.useMemo(() => [ ...filter ? tableData.filter((row, index, array) => filter(row, index, array)) : tableData ].sort((a, b) => {
|
|
144
|
-
if (!(null == sortKey ? void 0 : sortKey.key)) return 0;
|
|
145
|
-
const {key: key, dir: dir} = sortKey;
|
|
146
|
-
if (a[key] === b[key]) return 0;
|
|
147
|
-
return (a[key] > b[key] ? 1 : -1) * ("desc" === dir ? -1 : 1);
|
|
148
|
-
}), [ tableData, filter, sortKey ]), handleCellHover = React.useCallback((col, colId, row, rowId, over) => {
|
|
149
|
-
over ? (setHoveredRow(rowId), onMouseOver && onMouseOver(col, colId, row, rowId)) : (setHoveredRow(prev => prev === rowId ? null : prev),
|
|
150
|
-
onMouseOut && onMouseOut(col, colId, row, rowId));
|
|
151
|
-
}, [ onMouseOut, onMouseOver ]), handleClick = React.useCallback((col, colId, row, rowId, dbl) => {
|
|
152
|
-
dbl && onDoubleClick ? onDoubleClick(col, colId, row, rowId) : onClick && onClick(col, colId, row, rowId);
|
|
153
|
-
}, [ onDoubleClick, onClick ]), resolveCellBG = React.useCallback(rowId => backgroundColorHoverRow && hoveredRow === rowId ? backgroundColorHoverRow : !!candyStripeBackgroundColor && rowId % 2 != 0 ? candyStripeBackgroundColor : backgroundColor, [ hoveredRow, backgroundColorHoverRow, candyStripeBackgroundColor, backgroundColor ]), handleSort = React.useCallback(key => {
|
|
154
|
-
if (!key) return;
|
|
155
|
-
const next = (null == sortKey ? void 0 : sortKey.key) === key ? {
|
|
156
|
-
key: key,
|
|
157
|
-
dir: "asc" === (null == sortKey ? void 0 : sortKey.dir) ? "desc" : "asc"
|
|
158
|
-
} : {
|
|
159
|
-
key: key,
|
|
160
|
-
dir: "asc"
|
|
161
|
-
};
|
|
162
|
-
let didChange = !0;
|
|
163
|
-
(null == sortKey ? void 0 : sortKey.key) === (null == next ? void 0 : next.key) && (null == sortKey ? void 0 : sortKey.dir) === (null == next ? void 0 : next.dir) && (didChange = !1),
|
|
164
|
-
didChange && (setSortKey(next), null == onSortChange || onSortChange(next));
|
|
165
|
-
}, [ sortKey, onSortChange ]), renderHeader = React.useCallback((col, sortKey) => col.renderHeader ? col.renderHeader({
|
|
166
|
-
column: col,
|
|
167
|
-
sortKey: sortKey
|
|
168
|
-
}) : jsxRuntime.jsx(DefaultHeaderRenderer, {
|
|
169
|
-
col: col,
|
|
170
|
-
sortKey: sortKey
|
|
171
|
-
}), []), resolveAriaSort = React.useCallback(column => {
|
|
172
|
-
const sortable = void 0 !== column.sort, isSortedColumn = sortable && (null == sortKey ? void 0 : sortKey.key) === column.sort;
|
|
173
|
-
if (sortable) return isSortedColumn ? "asc" === (null == sortKey ? void 0 : sortKey.dir) ? "ascending" : "descending" : void 0;
|
|
174
|
-
}, [ sortKey ]), handleStartDrag = React.useCallback((id, e) => {
|
|
175
|
-
if (!colResize) return;
|
|
176
|
-
const cell = e.currentTarget.parentElement, col = colRefs.current[id], handle = resizeBarRef.current, parent = wrapperRef.current;
|
|
177
|
-
cell && col && parent && setDraggingCol({
|
|
178
|
-
id: id,
|
|
179
|
-
cell: cell,
|
|
180
|
-
col: col,
|
|
181
|
-
handle: handle,
|
|
182
|
-
parent: parent
|
|
183
|
-
});
|
|
184
|
-
}, [ colResize ]), handleHoverDragHandle = React.useCallback((show, e) => {
|
|
185
|
-
if (!colResize || draggingCol) return;
|
|
186
|
-
const cell = e.currentTarget.parentElement, handle = resizeBarRef.current, parent = wrapperRef.current;
|
|
187
|
-
!show && handle ? handle.style.left = "-500px" : resolveDragHandleXPos({
|
|
188
|
-
cell: cell,
|
|
189
|
-
handle: handle,
|
|
190
|
-
parent: parent
|
|
191
|
-
});
|
|
192
|
-
}, [ draggingCol, colResize ]), handleCreateRefs = React.useCallback((el, id) => {
|
|
193
|
-
colRefs.current[id] = el;
|
|
194
|
-
}, []);
|
|
195
|
-
return React.useEffect(() => {
|
|
196
|
-
setSortKey(prev => (null == prev ? void 0 : prev.key) === (null == sort ? void 0 : sort.key) && (null == prev ? void 0 : prev.dir) === (null == sort ? void 0 : sort.dir) ? prev : sort);
|
|
197
|
-
}, [ sort ]), jsxRuntime.jsxs("div", {
|
|
198
|
-
ref: wrapperRef,
|
|
199
|
-
className: `${styles.tableWrapper} ${styles.scroll}`,
|
|
200
|
-
style: cssVars,
|
|
201
|
-
onScroll: handleScroll,
|
|
202
|
-
children: [ jsxRuntime.jsx("div", {
|
|
203
|
-
className: styles.resizeBar,
|
|
204
|
-
ref: resizeBarRef
|
|
205
|
-
}), jsxRuntime.jsxs("table", {
|
|
206
|
-
className: styles.table,
|
|
207
|
-
children: [ jsxRuntime.jsx("caption", {
|
|
208
|
-
children: caption
|
|
209
|
-
}), jsxRuntime.jsx("colgroup", {
|
|
210
|
-
children: columnDefinitions.map(column => {
|
|
211
|
-
var _a;
|
|
212
|
-
return jsxRuntime.jsx("col", {
|
|
213
|
-
ref: el => handleCreateRefs(el, column.id),
|
|
214
|
-
style: {
|
|
215
|
-
width: misc.setStyle(null !== (_a = columnWidths[column.id]) && void 0 !== _a ? _a : column.width)
|
|
216
|
-
}
|
|
217
|
-
}, column.id);
|
|
218
|
-
})
|
|
219
|
-
}), jsxRuntime.jsx("thead", {
|
|
220
|
-
children: jsxRuntime.jsx("tr", {
|
|
221
|
-
children: columnDefinitions.map(column => {
|
|
222
|
-
const padding = misc.setStyle(column.padding, 16), sortable = void 0 !== column.sort, cursor = sortable ? "pointer" : "default";
|
|
223
|
-
return jsxRuntime.jsx("th", {
|
|
224
|
-
"data-column-id": column.id,
|
|
225
|
-
className: `${styles.baseCell} ${styles.headerCell} ${styles.m}`,
|
|
226
|
-
onClick: () => handleSort(column.sort),
|
|
227
|
-
onKeyDown: e => misc.accessibleKeyDown(e, () => handleSort(column.sort)),
|
|
228
|
-
style: {
|
|
229
|
-
cursor: cursor
|
|
230
|
-
},
|
|
231
|
-
tabIndex: sortable ? 0 : void 0,
|
|
232
|
-
role: sortable ? "columnheader" : void 0,
|
|
233
|
-
"aria-sort": resolveAriaSort(column),
|
|
234
|
-
children: jsxRuntime.jsx("div", {
|
|
235
|
-
className: styles.headerCellWrapper,
|
|
236
|
-
style: {
|
|
237
|
-
padding: padding
|
|
238
|
-
},
|
|
239
|
-
children: renderHeader(column, sortKey)
|
|
240
|
-
})
|
|
241
|
-
}, column.id);
|
|
242
|
-
})
|
|
243
|
-
})
|
|
244
|
-
}), jsxRuntime.jsx("tbody", {
|
|
245
|
-
children: rows.map((row, rowIndex) => jsxRuntime.jsx("tr", {
|
|
246
|
-
children: columnDefinitions.map((col, colIndex) => {
|
|
247
|
-
var _a;
|
|
248
|
-
const value = col.accessor(row), justifyContent = resolveAlignValue(col.justify), alignItems = resolveAlignValue(col.align), padding = misc.setStyle(col.padding, 16), whiteSpace = col.nowrap ? "nowrap" : "", background = resolveCellBG(rowIndex), notLast = colIndex !== columnDefinitions.length - 1;
|
|
249
|
-
return jsxRuntime.jsxs("td", {
|
|
250
|
-
"data-column-id": `${colIndex}.${rowIndex}`,
|
|
251
|
-
className: `${styles.baseCell} ${styles.m}`,
|
|
252
|
-
onClick: () => handleClick(col, colIndex, row, rowIndex, !1),
|
|
253
|
-
onDoubleClick: () => handleClick(col, colIndex, row, rowIndex, !0),
|
|
254
|
-
onKeyDown: e => misc.accessibleKeyDown(e, () => handleClick(col, colIndex, row, rowIndex, !1)),
|
|
255
|
-
onMouseOver: () => handleCellHover(col, colIndex, row, rowIndex, !0),
|
|
256
|
-
onFocus: () => handleCellHover(col, colIndex, row, rowIndex, !0),
|
|
257
|
-
onMouseOut: () => handleCellHover(col, colIndex, row, rowIndex, !1),
|
|
258
|
-
onBlur: () => handleCellHover(col, colIndex, row, rowIndex, !1),
|
|
259
|
-
style: {
|
|
260
|
-
background: background
|
|
261
|
-
},
|
|
262
|
-
children: [ notLast && colResize && jsxRuntime.jsx("div", {
|
|
263
|
-
className: styles.colResizeHandle,
|
|
264
|
-
onMouseDown: e => handleStartDrag(col.id, e),
|
|
265
|
-
onMouseOver: e => handleHoverDragHandle(!0, e),
|
|
266
|
-
onFocus: e => handleHoverDragHandle(!0, e),
|
|
267
|
-
onMouseOut: e => handleHoverDragHandle(!1, e),
|
|
268
|
-
onBlur: e => handleHoverDragHandle(!1, e)
|
|
269
|
-
}), jsxRuntime.jsx("div", {
|
|
270
|
-
className: styles.baseCellWrapper,
|
|
271
|
-
style: {
|
|
272
|
-
justifyContent: justifyContent,
|
|
273
|
-
alignItems: alignItems,
|
|
274
|
-
padding: padding,
|
|
275
|
-
whiteSpace: whiteSpace
|
|
276
|
-
},
|
|
277
|
-
children: col.renderCell ? col.renderCell({
|
|
278
|
-
row: row,
|
|
279
|
-
value: value,
|
|
280
|
-
rowIndex: rowIndex
|
|
281
|
-
}) : null !== (_a = null == value ? void 0 : value.toString()) && void 0 !== _a ? _a : ""
|
|
282
|
-
}) ]
|
|
283
|
-
}, col.id);
|
|
284
|
-
})
|
|
285
|
-
}, getRowId ? getRowId(row, rowIndex) : rowIndex))
|
|
286
|
-
}) ]
|
|
287
|
-
}) ]
|
|
288
|
-
});
|
|
289
|
-
}, exports.applyDataTableViewState = function(columns, state) {
|
|
290
|
-
var _a;
|
|
291
|
-
if (!state) return columns;
|
|
292
|
-
const byId = new Map(columns.map(column => [ column.id, column ])), hidden = new Set(null !== (_a = state.hiddenColumns) && void 0 !== _a ? _a : []), seen = new Set, ordered = [];
|
|
293
|
-
for (const id of state.columnOrder) {
|
|
294
|
-
if (seen.has(id) || hidden.has(id)) continue;
|
|
295
|
-
const column = byId.get(id);
|
|
296
|
-
column && (seen.add(id), ordered.push(column));
|
|
297
|
-
}
|
|
298
|
-
for (const column of columns) seen.has(column.id) || hidden.has(column.id) || (seen.add(column.id),
|
|
299
|
-
ordered.push(column));
|
|
300
|
-
if (!state.columnWidths) return ordered;
|
|
301
|
-
const widths = state.columnWidths;
|
|
302
|
-
return ordered.map(column => column.id in widths ? Object.assign(Object.assign({}, column), {
|
|
303
|
-
width: widths[column.id]
|
|
304
|
-
}) : column);
|
|
305
|
-
}, exports.captureSortToViewState = function(columns, sort) {
|
|
306
|
-
if (!(null == sort ? void 0 : sort.key)) return;
|
|
307
|
-
const column = columns.find(c => c.sort === sort.key);
|
|
308
|
-
return column ? {
|
|
309
|
-
columnId: column.id,
|
|
310
|
-
dir: sort.dir
|
|
311
|
-
} : void 0;
|
|
312
|
-
}, exports.createColumnHelper = function() {
|
|
313
|
-
return {
|
|
314
|
-
accessor: (accessor, def) => Object.assign({
|
|
315
|
-
accessor: accessor
|
|
316
|
-
}, def)
|
|
317
|
-
};
|
|
318
|
-
}, exports.createDefaultViewState = function(columns) {
|
|
319
|
-
return {
|
|
320
|
-
columnOrder: columns.map(column => column.id)
|
|
321
|
-
};
|
|
322
|
-
}, exports.resolveSortFromViewState = function(columns, state) {
|
|
323
|
-
if (!(null == state ? void 0 : state.sort)) return;
|
|
324
|
-
const column = columns.find(c => {
|
|
325
|
-
var _a;
|
|
326
|
-
return c.id === (null === (_a = state.sort) || void 0 === _a ? void 0 : _a.columnId);
|
|
327
|
-
});
|
|
328
|
-
return (null == column ? void 0 : column.sort) ? {
|
|
329
|
-
key: column.sort,
|
|
330
|
-
dir: state.sort.dir
|
|
331
|
-
} : void 0;
|
|
332
|
-
};
|