@feugene/granularity 0.49.0 → 0.50.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/README.md +3 -3
- package/dist/chunks/chevron-up-BhW6hi8L.js +23 -0
- package/dist/chunks/chevron-up-BhW6hi8L.js.map +1 -0
- package/dist/chunks/{config-E1cTyRVV.js → config-8n1VR0ju.js} +1 -1
- package/dist/chunks/{config-E1cTyRVV.js.map → config-8n1VR0ju.js.map} +1 -1
- package/dist/chunks/{config-DIDz_E5m.js → config-B34mkd53.js} +66 -1
- package/dist/chunks/config-B34mkd53.js.map +1 -0
- package/dist/chunks/{config-B5SBUa6u.js → config-B7qZqiUB.js} +28 -1
- package/dist/chunks/config-B7qZqiUB.js.map +1 -0
- package/dist/chunks/config-BBrPUEye.js +8 -0
- package/dist/chunks/config-BBrPUEye.js.map +1 -0
- package/dist/chunks/{config-CT4lP6S4.js → config-BOCzHqWh.js} +2 -2
- package/dist/chunks/{config-CT4lP6S4.js.map → config-BOCzHqWh.js.map} +1 -1
- package/dist/chunks/{config-iemgzS4x.js → config-BP1ktzwh.js} +2 -24
- package/dist/chunks/config-BP1ktzwh.js.map +1 -0
- package/dist/chunks/config-BTxmdRzT.js +28 -0
- package/dist/chunks/config-BTxmdRzT.js.map +1 -0
- package/dist/chunks/{config-CjWOTgLL.js → config-Bk52xd5l.js} +12 -5
- package/dist/chunks/config-Bk52xd5l.js.map +1 -0
- package/dist/chunks/{config-D3HOuHDe.js → config-C3SqBqSQ.js} +3 -1
- package/dist/chunks/config-C3SqBqSQ.js.map +1 -0
- package/dist/chunks/{config-2ZHRsdOc.js → config-C3uqd-sW.js} +1 -1
- package/dist/chunks/config-C3uqd-sW.js.map +1 -0
- package/dist/chunks/{config-BXRmsn3t.js → config-CPhcZzHi.js} +72 -10
- package/dist/chunks/config-CPhcZzHi.js.map +1 -0
- package/dist/chunks/config-CWtfxkM9.js.map +1 -1
- package/dist/chunks/{config--t2dxj0t.js → config-CmLTCmY9.js} +2 -2
- package/dist/chunks/{config--t2dxj0t.js.map → config-CmLTCmY9.js.map} +1 -1
- package/dist/chunks/{config-BAse0laT.js → config-CvtqB4ki.js} +8 -3
- package/dist/chunks/config-CvtqB4ki.js.map +1 -0
- package/dist/chunks/{config-BcXX7S7B.js → config-D-JgqV0J.js} +5 -1
- package/dist/chunks/{config-BcXX7S7B.js.map → config-D-JgqV0J.js.map} +1 -1
- package/dist/chunks/{config-BHLMTJaR.js → config-D1oVht-E.js} +8 -3
- package/dist/chunks/config-D1oVht-E.js.map +1 -0
- package/dist/chunks/{config-B42iJ48O.js → config-DG41PD9i.js} +13 -1
- package/dist/chunks/config-DG41PD9i.js.map +1 -0
- package/dist/chunks/{config-Bs1HwUcx.js → config-DPJ3jtiB.js} +12 -2
- package/dist/chunks/config-DPJ3jtiB.js.map +1 -0
- package/dist/chunks/{config-tNqtapcT.js → config-DpqjlCfB.js} +2 -2
- package/dist/chunks/{config-tNqtapcT.js.map → config-DpqjlCfB.js.map} +1 -1
- package/dist/chunks/{config-DNDgp9bB.js → config-DpzFoSIh.js} +64 -2
- package/dist/chunks/config-DpzFoSIh.js.map +1 -0
- package/dist/chunks/config-SPugeaHT.js +37 -0
- package/dist/chunks/config-SPugeaHT.js.map +1 -0
- package/dist/chunks/{en-CsQUoBS2.js → en-mIFywnV2.js} +22 -6
- package/dist/chunks/en-mIFywnV2.js.map +1 -0
- package/dist/chunks/{es-9nbkPvdA.js → es-CvthYwtB.js} +22 -6
- package/dist/chunks/es-CvthYwtB.js.map +1 -0
- package/dist/chunks/{es-DrUz5J6I.js → es-DlGd6Mrj.js} +3 -3
- package/dist/chunks/{es-DrUz5J6I.js.map → es-DlGd6Mrj.js.map} +1 -1
- package/dist/chunks/{generated-CxvC5O0V.js → generated-Cx4C7GRN.js} +84 -0
- package/dist/chunks/{generated-CxvC5O0V.js.map → generated-Cx4C7GRN.js.map} +1 -1
- package/dist/chunks/{grPopoverStyles-CYAeO3Ov.js → grPopoverStyles-CncEkiPu.js} +1 -1
- package/dist/chunks/{grPopoverStyles-CYAeO3Ov.js.map → grPopoverStyles-CncEkiPu.js.map} +1 -1
- package/dist/chunks/{grSelectStyles-D9EQ-pgK.js → grSelectStyles-Cam-IG9s.js} +3 -2
- package/dist/chunks/grSelectStyles-Cam-IG9s.js.map +1 -0
- package/dist/chunks/{grSliderStyles-kaz6VXZ3.js → grSliderStyles-CqzV0hll.js} +1 -1
- package/dist/chunks/grSliderStyles-CqzV0hll.js.map +1 -0
- package/dist/chunks/{config-CbEbLyDE.js → grSortableListStyles-CxieDmpe.js} +1 -27
- package/dist/chunks/grSortableListStyles-CxieDmpe.js.map +1 -0
- package/dist/chunks/grTableStyles-CPSxDTOW.js +66 -0
- package/dist/chunks/grTableStyles-CPSxDTOW.js.map +1 -0
- package/dist/chunks/{config-CMNfZO7S.js → grTabsStyles-DIz2VdIm.js} +1 -36
- package/dist/chunks/grTabsStyles-DIz2VdIm.js.map +1 -0
- package/dist/chunks/grTooltipStyles-CtbGEEGV.js +24 -0
- package/dist/chunks/grTooltipStyles-CtbGEEGV.js.map +1 -0
- package/dist/chunks/{granular-provider-B6xomapW.js → granular-provider-cv5vaM1a.js} +21 -19
- package/dist/chunks/granular-provider-cv5vaM1a.js.map +1 -0
- package/dist/chunks/hotkeySequence-BTHIM_5A.js +46 -0
- package/dist/chunks/hotkeySequence-BTHIM_5A.js.map +1 -0
- package/dist/chunks/{keyboard-DE2yhz_b.js → keyboard-BiFSgWLt.js} +70 -1
- package/dist/chunks/keyboard-BiFSgWLt.js.map +1 -0
- package/dist/chunks/optionPanel-DvY7Tv_4.js +182 -0
- package/dist/chunks/optionPanel-DvY7Tv_4.js.map +1 -0
- package/dist/chunks/overlayListPanel-D91jBCHU.js +21 -0
- package/dist/chunks/overlayListPanel-D91jBCHU.js.map +1 -0
- package/dist/chunks/{overlayStack-DH4Z7am1.js → overlayStack-DCkCgXZP.js} +1 -1
- package/dist/chunks/{overlayStack-DH4Z7am1.js.map → overlayStack-DCkCgXZP.js.map} +1 -1
- package/dist/chunks/{overlayPanelSurface-BKeMhRx4.js → overlayTransition-C0FDMx7Q.js} +24 -24
- package/dist/chunks/overlayTransition-C0FDMx7Q.js.map +1 -0
- package/dist/chunks/{ru-88i1WG0b.js → ru-CQKDR-kD.js} +22 -6
- package/dist/chunks/ru-CQKDR-kD.js.map +1 -0
- package/dist/chunks/{useMenuItemsFocus-B7Bl_aFA.js → useMenuItemsFocus-C031blYS.js} +1 -1
- package/dist/chunks/{useMenuItemsFocus-B7Bl_aFA.js.map → useMenuItemsFocus-C031blYS.js.map} +1 -1
- package/dist/chunks/{useModalOverlay-ACRkflzx.js → useModalOverlay-CKCQkGdB.js} +1 -1
- package/dist/chunks/{useModalOverlay-ACRkflzx.js.map → useModalOverlay-CKCQkGdB.js.map} +1 -1
- package/dist/components/GrAutocomplete/chunks/{GrAutocomplete-Chhw65pI.js → GrAutocomplete-Cyr1-ENw.js} +181 -123
- package/dist/components/GrAutocomplete/chunks/GrAutocomplete-Cyr1-ENw.js.map +1 -0
- package/dist/components/GrAutocomplete/index.js +2 -2
- package/dist/components/GrAutocomplete/styles.css +1 -1
- package/dist/components/GrCarousel/chunks/{GrCarousel-ByuughtI.js → GrCarousel-CBj-PEPB.js} +186 -37
- package/dist/components/GrCarousel/chunks/GrCarousel-CBj-PEPB.js.map +1 -0
- package/dist/components/GrCarousel/index.js +2 -2
- package/dist/components/GrCarousel/styles.css +1 -1
- package/dist/components/GrCheckbox/chunks/{GrCheckbox-Dp201frb.js → GrCheckbox-B4NJc7Ur.js} +2 -1
- package/dist/components/GrCheckbox/chunks/GrCheckbox-B4NJc7Ur.js.map +1 -0
- package/dist/components/GrCheckbox/index.js +1 -1
- package/dist/components/GrCheckboxGroup/chunks/{GrCheckboxGroup-IpqG5qwm.js → GrCheckboxGroup-qZHpNFCX.js} +1 -1
- package/dist/components/GrCheckboxGroup/chunks/{GrCheckboxGroup-IpqG5qwm.js.map → GrCheckboxGroup-qZHpNFCX.js.map} +1 -1
- package/dist/components/GrCheckboxGroup/index.js +1 -1
- package/dist/components/GrColorPicker/chunks/{GrColorPicker-BRM_4lyI.js → GrColorPicker-vGSgpUV9.js} +353 -38
- package/dist/components/GrColorPicker/chunks/GrColorPicker-vGSgpUV9.js.map +1 -0
- package/dist/components/GrColorPicker/index.js +2 -2
- package/dist/components/GrColorPicker/styles.css +1 -1
- package/dist/components/GrCommandPalette/chunks/{GrCommandPalette-BJHmkDQv.js → GrCommandPalette-CAHgj0Aa.js} +23 -7
- package/dist/components/GrCommandPalette/chunks/GrCommandPalette-CAHgj0Aa.js.map +1 -0
- package/dist/components/GrCommandPalette/index.js +1 -1
- package/dist/components/GrCommandPalette/styles.css +1 -1
- package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-BzUQwbec.js → GrConfirmDialog-dg021BMd.js} +1 -1
- package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-BzUQwbec.js.map → GrConfirmDialog-dg021BMd.js.map} +1 -1
- package/dist/components/GrConfirmDialog/index.js +1 -1
- package/dist/components/GrContextMenu/chunks/{GrContextMenu-RpxMHQXH.js → GrContextMenu-bQ1Vvy2c.js} +3 -3
- package/dist/components/GrContextMenu/chunks/{GrContextMenu-RpxMHQXH.js.map → GrContextMenu-bQ1Vvy2c.js.map} +1 -1
- package/dist/components/GrContextMenu/index.js +1 -1
- package/dist/components/GrDataTable/chunks/{GrDataTable-DQxYYgQk.js → GrDataTable-Bb2jWnRG.js} +576 -136
- package/dist/components/GrDataTable/chunks/GrDataTable-Bb2jWnRG.js.map +1 -0
- package/dist/components/GrDataTable/index.js +2 -2
- package/dist/components/GrDelta/chunks/{GrDelta-CgTvfoIN.js → GrDelta-BSv1KdMy.js} +0 -0
- package/dist/components/GrDelta/chunks/{GrDelta-CgTvfoIN.js.map → GrDelta-BSv1KdMy.js.map} +1 -1
- package/dist/components/GrDelta/index.js +2 -2
- package/dist/components/GrDialog/chunks/{GrDialog-DDz_OEhk.js → GrDialog-C9Zu72jB.js} +1 -1
- package/dist/components/GrDialog/chunks/{GrDialog-DDz_OEhk.js.map → GrDialog-C9Zu72jB.js.map} +1 -1
- package/dist/components/GrDialog/index.js +1 -1
- package/dist/components/GrDialogService/chunks/{GrDialogService-Dtq0ZCN5.js → GrDialogService-DLBifO61.js} +2 -2
- package/dist/components/GrDialogService/chunks/{GrDialogService-Dtq0ZCN5.js.map → GrDialogService-DLBifO61.js.map} +1 -1
- package/dist/components/GrDialogService/index.js +1 -1
- package/dist/components/GrDrawer/chunks/{GrDrawer-CNpSMuN-.js → GrDrawer-DOcRTE8G.js} +1 -1
- package/dist/components/GrDrawer/chunks/{GrDrawer-CNpSMuN-.js.map → GrDrawer-DOcRTE8G.js.map} +1 -1
- package/dist/components/GrDrawer/index.js +1 -1
- package/dist/components/GrDropdown/chunks/{GrDropdown-cLZuZMEY.js → GrDropdown-kxwmgfSe.js} +2 -2
- package/dist/components/GrDropdown/chunks/{GrDropdown-cLZuZMEY.js.map → GrDropdown-kxwmgfSe.js.map} +1 -1
- package/dist/components/GrDropdown/index.js +2 -2
- package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-Dxkz_ry4.js → GrDropdownMenu--VoK3VY0.js} +3 -34
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu--VoK3VY0.js.map +1 -0
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-CkM3BFPL.js +34 -0
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-CkM3BFPL.js.map +1 -0
- package/dist/components/GrDropdownMenu/index.js +2 -1
- package/dist/components/GrEmptyState/chunks/{GrEmptyState-BbvwE-E0.js → GrEmptyState-Bz6-_ED4.js} +42 -6
- package/dist/components/GrEmptyState/chunks/GrEmptyState-Bz6-_ED4.js.map +1 -0
- package/dist/components/GrEmptyState/index.js +1 -1
- package/dist/components/GrFileUpload/chunks/{GrFileUpload-BwMR71zN.js → GrFileUpload-Bgdfnkd8.js} +5 -2
- package/dist/components/GrFileUpload/chunks/GrFileUpload-Bgdfnkd8.js.map +1 -0
- package/dist/components/GrFileUpload/index.js +1 -1
- package/dist/components/GrFormFile/chunks/{GrFormFile-Dlxx-9zi.js → GrFormFile-Ctq1isz-.js} +78 -11
- package/dist/components/GrFormFile/chunks/GrFormFile-Ctq1isz-.js.map +1 -0
- package/dist/components/GrFormFile/index.js +2 -2
- package/dist/components/GrFormFile/styles.css +1 -1
- package/dist/components/GrImageViewer/chunks/{GrImageViewer-DK-iVHHC.js → GrImageViewer-Bnql_dNP.js} +1 -1
- package/dist/components/GrImageViewer/chunks/{GrImageViewer-DK-iVHHC.js.map → GrImageViewer-Bnql_dNP.js.map} +1 -1
- package/dist/components/GrImageViewer/index.js +1 -1
- package/dist/components/GrInput/chunks/{GrInput-DV4gMWPR.js → GrInput-CoaFLpaU.js} +43 -22
- package/dist/components/GrInput/chunks/GrInput-CoaFLpaU.js.map +1 -0
- package/dist/components/GrInput/index.js +1 -1
- package/dist/components/GrInputTag/chunks/{GrInputTag-qnRdAZnn.js → GrInputTag-BzzNRBe3.js} +245 -18
- package/dist/components/GrInputTag/chunks/GrInputTag-BzzNRBe3.js.map +1 -0
- package/dist/components/GrInputTag/index.js +2 -2
- package/dist/components/GrJsonViewer/chunks/{GrJsonViewer-D7CyWzhT.js → GrJsonViewer-B6ZJ3GFH.js} +2 -2
- package/dist/components/GrJsonViewer/chunks/{GrJsonViewer-D7CyWzhT.js.map → GrJsonViewer-B6ZJ3GFH.js.map} +1 -1
- package/dist/components/GrJsonViewer/index.js +1 -1
- package/dist/components/GrKbd/chunks/{GrKbd-BNMeoaLV.js → GrKbd-D2rHDkQv.js} +42 -37
- package/dist/components/GrKbd/chunks/GrKbd-D2rHDkQv.js.map +1 -0
- package/dist/components/GrKbd/index.js +1 -1
- package/dist/components/GrModal/chunks/{GrModal-Cm0mtSXk.js → GrModal-SHb1U2qx.js} +1 -1
- package/dist/components/GrModal/chunks/{GrModal-Cm0mtSXk.js.map → GrModal-SHb1U2qx.js.map} +1 -1
- package/dist/components/GrModal/index.js +1 -1
- package/dist/components/GrNavbar/chunks/{GrNavbar-BRGuksiy.js → GrNavbar-IEIHC5Vt.js} +10 -4
- package/dist/components/GrNavbar/chunks/GrNavbar-IEIHC5Vt.js.map +1 -0
- package/dist/components/GrNavbar/index.js +2 -2
- package/dist/components/GrNumberInput/chunks/{GrNumberInput-BI6-vkcs.js → GrNumberInput-CmnUDaKi.js} +2 -22
- package/dist/components/GrNumberInput/chunks/{GrNumberInput-BI6-vkcs.js.map → GrNumberInput-CmnUDaKi.js.map} +1 -1
- package/dist/components/GrNumberInput/index.js +1 -1
- package/dist/components/GrPagination/chunks/{GrPagination-CMrLPzvL.js → GrPagination-AMbn5D8I.js} +1 -1
- package/dist/components/GrPagination/chunks/{GrPagination-CMrLPzvL.js.map → GrPagination-AMbn5D8I.js.map} +1 -1
- package/dist/components/GrPagination/index.js +1 -1
- package/dist/components/GrPopover/chunks/{GrPopover-CcWvr1ZA.js → GrPopover-DjVxt8bf.js} +3 -3
- package/dist/components/GrPopover/chunks/{GrPopover-CcWvr1ZA.js.map → GrPopover-DjVxt8bf.js.map} +1 -1
- package/dist/components/GrPopover/index.js +2 -2
- package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-BEL-QgwE.js → GrPromptDialog-BhbIZP1f.js} +3 -3
- package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-BEL-QgwE.js.map → GrPromptDialog-BhbIZP1f.js.map} +1 -1
- package/dist/components/GrPromptDialog/index.js +1 -1
- package/dist/components/GrSelect/chunks/{GrSelect-DvSq-nV-.js → GrSelect-B-ykrHpL.js} +24 -180
- package/dist/components/GrSelect/chunks/GrSelect-B-ykrHpL.js.map +1 -0
- package/dist/components/GrSelect/index.js +2 -2
- package/dist/components/GrSelect/styles.css +1 -1
- package/dist/components/GrSidebar/chunks/GrSidebar-jVvoLGDO.js +543 -0
- package/dist/components/GrSidebar/chunks/GrSidebar-jVvoLGDO.js.map +1 -0
- package/dist/components/GrSidebar/index.js +2 -2
- package/dist/components/GrSlider/chunks/{GrSlider-CO8N9SF6.js → GrSlider-DF2Cq0rV.js} +29 -4
- package/dist/components/GrSlider/chunks/GrSlider-DF2Cq0rV.js.map +1 -0
- package/dist/components/GrSlider/index.js +2 -2
- package/dist/components/GrSortableList/chunks/{GrSortableList-NKriuGm_.js → GrSortableList-ChH9nQBv.js} +1 -1
- package/dist/components/GrSortableList/chunks/{GrSortableList-NKriuGm_.js.map → GrSortableList-ChH9nQBv.js.map} +1 -1
- package/dist/components/GrSortableList/index.js +2 -2
- package/dist/components/GrTabPanels/chunks/GrTabPanels-BDt5oVdd.js +30 -0
- package/dist/components/GrTabPanels/chunks/GrTabPanels-BDt5oVdd.js.map +1 -0
- package/dist/components/GrTabPanels/chunks/GrTabPanels-BJvAflnA.js +83 -0
- package/dist/components/GrTabPanels/chunks/GrTabPanels-BJvAflnA.js.map +1 -0
- package/dist/components/GrTabPanels/index.js +2 -1
- package/dist/components/GrTable/chunks/{GrTable-CKJ-HrsN.js → GrTable-BQitSDep.js} +52 -16
- package/dist/components/GrTable/chunks/GrTable-BQitSDep.js.map +1 -0
- package/dist/components/GrTable/index.js +2 -2
- package/dist/components/GrTabs/chunks/{GrTabs-s9RzC1WX.js → GrTabs-DVC6nfWB.js} +1 -1
- package/dist/components/GrTabs/chunks/{GrTabs-s9RzC1WX.js.map → GrTabs-DVC6nfWB.js.map} +1 -1
- package/dist/components/GrTabs/index.js +2 -2
- package/dist/components/GrTabsWithPanels/chunks/GrTabsWithPanels-BYtuzouj.js +98 -0
- package/dist/components/GrTabsWithPanels/chunks/GrTabsWithPanels-BYtuzouj.js.map +1 -0
- package/dist/components/GrTabsWithPanels/index.js +3 -0
- package/dist/components/GrTextarea/chunks/{GrTextarea-Bfgc0DD2.js → GrTextarea-BFwyqcHB.js} +22 -5
- package/dist/components/GrTextarea/chunks/GrTextarea-BFwyqcHB.js.map +1 -0
- package/dist/components/GrTextarea/index.js +1 -1
- package/dist/components/GrToaster/chunks/{GrToaster-CZixNk0l.js → GrToaster-OzT1VKcp.js} +163 -32
- package/dist/components/GrToaster/chunks/GrToaster-OzT1VKcp.js.map +1 -0
- package/dist/components/GrToaster/index.js +2 -2
- package/dist/components/GrToaster/styles.css +1 -1
- package/dist/components/GrTooltip/chunks/{GrTooltip-DkMMM0uq.js → GrTooltip-BDcFycvW.js} +26 -13
- package/dist/components/GrTooltip/chunks/GrTooltip-BDcFycvW.js.map +1 -0
- package/dist/components/GrTooltip/index.js +2 -2
- package/dist/components/GrTransfer/chunks/{GrTransfer-DdfBUf35.js → GrTransfer-CV7BL5UK.js} +114 -12
- package/dist/components/GrTransfer/chunks/GrTransfer-CV7BL5UK.js.map +1 -0
- package/dist/components/GrTransfer/index.js +1 -1
- package/dist/components/GrTransfer/styles.css +1 -1
- package/dist/components/GrTree/chunks/{GrTree-6yZrncJE.js → GrTree-DpgaP8hk.js} +39 -1
- package/dist/components/GrTree/chunks/GrTree-DpgaP8hk.js.map +1 -0
- package/dist/components/GrTree/index.js +1 -1
- package/dist/components/GrTree/styles.css +1 -1
- package/dist/components/GrTreeSections/chunks/{GrTreeSections-DcmDcLwj.js → GrTreeSections-BeOj__44.js} +1 -1
- package/dist/components/GrTreeSections/chunks/{GrTreeSections-DcmDcLwj.js.map → GrTreeSections-BeOj__44.js.map} +1 -1
- package/dist/components/GrTreeSections/index.js +1 -1
- package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-B6KoDYiZ.js → GrTreeSelect-BHq-T8wH.js} +113 -14
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect-BHq-T8wH.js.map +1 -0
- package/dist/components/GrTreeSelect/index.js +2 -2
- package/dist/composables/useFloating.js +1 -1
- package/dist/composables/useHotkeys.js +89 -0
- package/dist/composables/useHotkeys.js.map +1 -0
- package/dist/composables/useOverlayLayer.js +1 -1
- package/dist/directives/hotkey.js +19 -46
- package/dist/directives/hotkey.js.map +1 -1
- package/dist/granular-provider-node.js +1 -1
- package/dist/granular-provider.js +1 -1
- package/dist/i18n/all.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/index.js +71 -63
- package/dist/theme.js +1 -1
- package/dist/tokens.js +1 -1
- package/dist/types/components/GrAutocomplete/GrAutocomplete.vue.d.ts +4 -4
- package/dist/types/components/GrAutocomplete/composables/useAutocompleteNavigation.d.ts +12 -3
- package/dist/types/components/GrAutocomplete/composables/useAutocompletePanel.d.ts +12 -2
- package/dist/types/components/GrAutocomplete/composables/useAutocompleteValues.d.ts +7 -4
- package/dist/types/components/GrAutocomplete/composables/useRemoteOptions.d.ts +4 -4
- package/dist/types/components/GrAutocomplete/grAutocompleteStyles.d.ts +15 -1
- package/dist/types/components/GrAutocomplete/index.d.ts +1 -1
- package/dist/types/components/GrCarousel/GrCarousel.vue.d.ts +29 -1
- package/dist/types/components/GrCarousel/composables/useCarouselSwipe.d.ts +5 -0
- package/dist/types/components/GrCarousel/grCarouselContext.d.ts +21 -0
- package/dist/types/components/GrCarousel/grCarouselStyles.d.ts +39 -9
- package/dist/types/components/GrCheckbox/GrCheckbox.vue.d.ts +13 -0
- package/dist/types/components/GrColorPicker/GrColorPicker.vue.d.ts +18 -2
- package/dist/types/components/GrColorPicker/color.d.ts +13 -1
- package/dist/types/components/GrColorPicker/colorArea.d.ts +59 -0
- package/dist/types/components/GrColorPicker/defaults.d.ts +3 -1
- package/dist/types/components/GrColorPicker/eyeDropper.d.ts +21 -0
- package/dist/types/components/GrColorPicker/grColorPickerStyles.d.ts +42 -0
- package/dist/types/components/GrCommandPalette/GrCommandPalette.vue.d.ts +10 -1
- package/dist/types/components/GrDataTable/GrDataTable.vue.d.ts +41 -1
- package/dist/types/components/GrDataTable/composables/useDataTableGridNavigation.d.ts +53 -0
- package/dist/types/components/GrDataTable/grDataTableStyles.d.ts +8 -0
- package/dist/types/components/GrDataTable/index.d.ts +1 -1
- package/dist/types/components/GrDelta/grDeltaStyles.d.ts +10 -3
- package/dist/types/components/GrEmptyState/GrEmptyState.vue.d.ts +11 -2
- package/dist/types/components/GrEmptyState/grEmptyStateStyles.d.ts +10 -0
- package/dist/types/components/GrEmptyState/index.d.ts +1 -1
- package/dist/types/components/GrFileUpload/GrFileUpload.vue.d.ts +2 -1
- package/dist/types/components/GrFormFile/GrFormFile.vue.d.ts +10 -0
- package/dist/types/components/GrInput/GrInput.vue.d.ts +15 -0
- package/dist/types/components/GrInputTag/GrInputTag.vue.d.ts +16 -0
- package/dist/types/components/GrInputTag/grInputTagStyles.d.ts +11 -0
- package/dist/types/components/GrKbd/GrKbd.vue.d.ts +14 -0
- package/dist/types/components/GrNavbar/GrNavbar.vue.d.ts +18 -0
- package/dist/types/components/GrNavbar/grNavbarStyles.d.ts +10 -1
- package/dist/types/components/GrNavbar/index.d.ts +1 -0
- package/dist/types/components/GrSelect/composables/useSelectPanelItems.d.ts +8 -34
- package/dist/types/components/GrSelect/composables/useSelectVirtualization.d.ts +7 -0
- package/dist/types/components/GrSelect/grSelectStyles.d.ts +1 -1
- package/dist/types/components/GrSidebar/GrSidebar.vue.d.ts +20 -0
- package/dist/types/components/GrSidebar/GrSidebarItem.vue.d.ts +39 -5
- package/dist/types/components/GrSidebar/grSidebarStyles.d.ts +32 -0
- package/dist/types/components/GrSidebar/index.d.ts +1 -1
- package/dist/types/components/GrSidebar/sidebarContext.d.ts +23 -1
- package/dist/types/components/GrSlider/GrSlider.vue.d.ts +39 -1
- package/dist/types/components/GrSlider/grSliderStyles.d.ts +1 -1
- package/dist/types/components/GrTabPanels/context.d.ts +6 -0
- package/dist/types/components/GrTable/GrTable.vue.d.ts +37 -0
- package/dist/types/components/GrTable/grTableStyles.d.ts +16 -7
- package/dist/types/components/GrTabsWithPanels/GrTabsWithPanels.vue.d.ts +77 -0
- package/dist/types/components/GrTabsWithPanels/config.d.ts +1 -0
- package/dist/types/components/GrTabsWithPanels/index.d.ts +4 -0
- package/dist/types/components/GrTextarea/GrTextarea.vue.d.ts +19 -1
- package/dist/types/components/GrToaster/GrToaster.vue.d.ts +12 -0
- package/dist/types/components/GrToaster/grToasterStyles.d.ts +26 -0
- package/dist/types/components/GrTooltip/GrTooltip.vue.d.ts +22 -0
- package/dist/types/components/GrTransfer/GrTransfer.vue.d.ts +23 -0
- package/dist/types/components/GrTreeSelect/grTreeSelectStyles.d.ts +1 -1
- package/dist/types/components/GrTreeSelect/grTreeSelectTypes.d.ts +20 -0
- package/dist/types/components/shared/hotkey.d.ts +8 -9
- package/dist/types/components/shared/optionPanel.d.ts +100 -0
- package/dist/types/components/shared/overlayListPanel.d.ts +18 -0
- package/dist/types/composables/useHotkeys.d.ts +43 -0
- package/dist/types/granular-provider/shared.d.ts +1 -0
- package/dist/types/i18n/messages/en.d.ts +28 -0
- package/dist/types/i18n/messages/es.d.ts +28 -0
- package/dist/types/i18n/messages/ru.d.ts +28 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/internal/hotkeySequence.d.ts +22 -0
- package/dist/types/internal/keyboard.d.ts +45 -0
- package/dist/web-types.json +463 -26
- package/package.json +9 -1
- package/dist/chunks/config-2ZHRsdOc.js.map +0 -1
- package/dist/chunks/config-B42iJ48O.js.map +0 -1
- package/dist/chunks/config-B5SBUa6u.js.map +0 -1
- package/dist/chunks/config-BAse0laT.js.map +0 -1
- package/dist/chunks/config-BHLMTJaR.js.map +0 -1
- package/dist/chunks/config-BXRmsn3t.js.map +0 -1
- package/dist/chunks/config-Bs1HwUcx.js.map +0 -1
- package/dist/chunks/config-CMNfZO7S.js.map +0 -1
- package/dist/chunks/config-CbEbLyDE.js.map +0 -1
- package/dist/chunks/config-CjWOTgLL.js.map +0 -1
- package/dist/chunks/config-D3HOuHDe.js.map +0 -1
- package/dist/chunks/config-DIDz_E5m.js.map +0 -1
- package/dist/chunks/config-DNDgp9bB.js.map +0 -1
- package/dist/chunks/config-iemgzS4x.js.map +0 -1
- package/dist/chunks/en-CsQUoBS2.js.map +0 -1
- package/dist/chunks/es-9nbkPvdA.js.map +0 -1
- package/dist/chunks/grSelectStyles-D9EQ-pgK.js.map +0 -1
- package/dist/chunks/grSliderStyles-kaz6VXZ3.js.map +0 -1
- package/dist/chunks/grTableStyles-DkQPMfx9.js +0 -39
- package/dist/chunks/grTableStyles-DkQPMfx9.js.map +0 -1
- package/dist/chunks/granular-provider-B6xomapW.js.map +0 -1
- package/dist/chunks/keyboard-DE2yhz_b.js.map +0 -1
- package/dist/chunks/overlayPanelSurface-BKeMhRx4.js.map +0 -1
- package/dist/chunks/ru-88i1WG0b.js.map +0 -1
- package/dist/components/GrAutocomplete/chunks/GrAutocomplete-Chhw65pI.js.map +0 -1
- package/dist/components/GrCarousel/chunks/GrCarousel-ByuughtI.js.map +0 -1
- package/dist/components/GrCheckbox/chunks/GrCheckbox-Dp201frb.js.map +0 -1
- package/dist/components/GrColorPicker/chunks/GrColorPicker-BRM_4lyI.js.map +0 -1
- package/dist/components/GrCommandPalette/chunks/GrCommandPalette-BJHmkDQv.js.map +0 -1
- package/dist/components/GrDataTable/chunks/GrDataTable-DQxYYgQk.js.map +0 -1
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-Dxkz_ry4.js.map +0 -1
- package/dist/components/GrEmptyState/chunks/GrEmptyState-BbvwE-E0.js.map +0 -1
- package/dist/components/GrFileUpload/chunks/GrFileUpload-BwMR71zN.js.map +0 -1
- package/dist/components/GrFormFile/chunks/GrFormFile-Dlxx-9zi.js.map +0 -1
- package/dist/components/GrInput/chunks/GrInput-DV4gMWPR.js.map +0 -1
- package/dist/components/GrInputTag/chunks/GrInputTag-qnRdAZnn.js.map +0 -1
- package/dist/components/GrKbd/chunks/GrKbd-BNMeoaLV.js.map +0 -1
- package/dist/components/GrNavbar/chunks/GrNavbar-BRGuksiy.js.map +0 -1
- package/dist/components/GrSelect/chunks/GrSelect-DvSq-nV-.js.map +0 -1
- package/dist/components/GrSidebar/chunks/GrSidebar-DoKLlHSw.js +0 -264
- package/dist/components/GrSidebar/chunks/GrSidebar-DoKLlHSw.js.map +0 -1
- package/dist/components/GrSlider/chunks/GrSlider-CO8N9SF6.js.map +0 -1
- package/dist/components/GrTabPanels/chunks/GrTabPanels-5zsbqS1v.js +0 -92
- package/dist/components/GrTabPanels/chunks/GrTabPanels-5zsbqS1v.js.map +0 -1
- package/dist/components/GrTable/chunks/GrTable-CKJ-HrsN.js.map +0 -1
- package/dist/components/GrTextarea/chunks/GrTextarea-Bfgc0DD2.js.map +0 -1
- package/dist/components/GrToaster/chunks/GrToaster-CZixNk0l.js.map +0 -1
- package/dist/components/GrTooltip/chunks/GrTooltip-DkMMM0uq.js.map +0 -1
- package/dist/components/GrTransfer/chunks/GrTransfer-DdfBUf35.js.map +0 -1
- package/dist/components/GrTree/chunks/GrTree-6yZrncJE.js.map +0 -1
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect-B6KoDYiZ.js.map +0 -1
- package/dist/types/components/GrAutocomplete/composables/useAutocompleteVirtual.d.ts +0 -33
package/dist/components/GrDataTable/chunks/{GrDataTable-DQxYYgQk.js → GrDataTable-Bb2jWnRG.js}
RENAMED
|
@@ -9,11 +9,12 @@ import { t as GrButton_default } from "../../GrButton/chunks/GrButton-CS4TqMtG.j
|
|
|
9
9
|
import { useAnnouncer } from "../../../composables/useAnnouncer.js";
|
|
10
10
|
import { useDragGesture } from "../../../composables/useDragGesture.js";
|
|
11
11
|
import { t as chevron_right_default } from "../../../chunks/chevron-right-C6Z01h0X.js";
|
|
12
|
-
import { t as GrCheckbox_default } from "../../GrCheckbox/chunks/GrCheckbox-
|
|
13
|
-
import { t as GrTable_default } from "../../GrTable/chunks/GrTable-
|
|
12
|
+
import { t as GrCheckbox_default } from "../../GrCheckbox/chunks/GrCheckbox-B4NJc7Ur.js";
|
|
13
|
+
import { t as GrTable_default } from "../../GrTable/chunks/GrTable-BQitSDep.js";
|
|
14
|
+
import { t as GrDropdownMenu_default } from "../../GrDropdownMenu/chunks/GrDropdownMenu--VoK3VY0.js";
|
|
14
15
|
import { i as moveItem, r as insertionIndex } from "../../../chunks/dragSortGeometry-CY-llfrQ.js";
|
|
15
16
|
import { useDragSort } from "../../../composables/useDragSort.js";
|
|
16
|
-
import { A as
|
|
17
|
+
import { A as rowSelectedClass, C as expandColumnWidths, D as headerTextSizes, E as headerGaps, F as summaryRowClass, M as selectColumnWidths, N as sortIconSizes, O as placeholderPaddings, P as spinnerSizes, S as expandButtonClass, T as expandIconOpenClass, _ as detailCellClass, a as columnDropAfterClass, b as detailPaddings, c as columnHandleClass, d as columnPinnedLeftEdgeClass, f as columnPinnedRightEdgeClass, g as columnResizerLineClass, h as columnResizerLineActiveClass, i as columnDraggingClass, j as selectCheckboxSizes, k as rowHeightEstimates, l as columnMenuTriggerClass, m as columnResizerHoverClass, o as columnDropBeforeClass, p as columnResizerClass, r as cellPaddings, s as columnHandleActiveClass, u as columnPinnedClass, v as detailContentClass, w as expandIconClass, x as detailRowClass, y as detailErrorClass } from "../../../chunks/config-DPJ3jtiB.js";
|
|
17
18
|
import { t as arrow_up_default } from "../../../chunks/arrow-up-C_G4jg8M.js";
|
|
18
19
|
import { t as grip_vertical_default } from "../../../chunks/grip-vertical-lRha2S7q.js";
|
|
19
20
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, markRaw, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useId, watch, watchEffect, withCtx, withModifiers } from "vue";
|
|
@@ -660,15 +661,130 @@ function useDataTableExpansion(options) {
|
|
|
660
661
|
invalidateDetail
|
|
661
662
|
};
|
|
662
663
|
}
|
|
664
|
+
function gridCellKey(row, column) {
|
|
665
|
+
return `${row}:${column}`;
|
|
666
|
+
}
|
|
667
|
+
function parseGridCellKey(key) {
|
|
668
|
+
const [row, column] = key.split(":");
|
|
669
|
+
return {
|
|
670
|
+
row: Number(row),
|
|
671
|
+
column: Number(column)
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
/** Что внутри ячейки может принять фокус. Порядок обхода — документный. */
|
|
675
|
+
var FOCUSABLE = [
|
|
676
|
+
"a[href]",
|
|
677
|
+
"button:not([disabled])",
|
|
678
|
+
"input:not([disabled])",
|
|
679
|
+
"select:not([disabled])",
|
|
680
|
+
"textarea:not([disabled])",
|
|
681
|
+
"[tabindex]:not([tabindex=\"-1\"])"
|
|
682
|
+
].join(",");
|
|
683
|
+
function useDataTableGridNavigation(options) {
|
|
684
|
+
/**
|
|
685
|
+
* Ячейки окна плюс шапка, по строкам. Порядок обязан совпадать с показом:
|
|
686
|
+
* примитив считает соседа сдвигом по этому массиву.
|
|
687
|
+
*/
|
|
688
|
+
const cellKeys = computed(() => {
|
|
689
|
+
if (!options.enabled()) return [];
|
|
690
|
+
const width = options.columns();
|
|
691
|
+
return [-1, ...options.renderedRows()].flatMap((row) => Array.from({ length: width }, (_, column) => gridCellKey(row, column)));
|
|
692
|
+
});
|
|
693
|
+
const roving = useRovingFocus({
|
|
694
|
+
items: () => cellKeys.value,
|
|
695
|
+
elementFor: (key) => options.cellEls.get(key),
|
|
696
|
+
orientation: () => "grid",
|
|
697
|
+
columns: () => options.columns(),
|
|
698
|
+
wrap: () => false,
|
|
699
|
+
beforeFocus: (key) => options.cellEls.has(key) ? void 0 : nextTick()
|
|
700
|
+
});
|
|
701
|
+
/**
|
|
702
|
+
* Шаг за край **окна** при виртуализации.
|
|
703
|
+
*
|
|
704
|
+
* Примитиву это доверить нельзя, и не из-за его устройства: шапка всегда
|
|
705
|
+
* стоит в наборе первой, поэтому стрелка вверх из первой отрисованной строки
|
|
706
|
+
* уходит в шапку — а должна уводить к строке выше окна. Край набора и край
|
|
707
|
+
* таблицы здесь разные вещи, и различить их может только тот, кто знает
|
|
708
|
+
* общее число строк.
|
|
709
|
+
*
|
|
710
|
+
* Возвращает строку, к которой надо прокрутить, или `null` — тогда клавишу
|
|
711
|
+
* разбирает примитив.
|
|
712
|
+
*/
|
|
713
|
+
function windowStep(event) {
|
|
714
|
+
if (!options.scrollToRow || event.key !== "ArrowDown" && event.key !== "ArrowUp") return null;
|
|
715
|
+
const active = roving.rovingKey.value;
|
|
716
|
+
if (!active) return null;
|
|
717
|
+
const { row } = parseGridCellKey(active);
|
|
718
|
+
const rendered = options.renderedRows();
|
|
719
|
+
if (rendered.length === 0) return null;
|
|
720
|
+
if (event.key === "ArrowDown") {
|
|
721
|
+
const last = rendered.at(-1);
|
|
722
|
+
if (row !== last) return null;
|
|
723
|
+
return last + 1 < options.totalRows() ? last + 1 : null;
|
|
724
|
+
}
|
|
725
|
+
const first = rendered[0];
|
|
726
|
+
if (row !== first) return null;
|
|
727
|
+
return first > 0 ? first - 1 : null;
|
|
728
|
+
}
|
|
729
|
+
/** Ячейка, в которой сейчас фокус (или которая его держит). */
|
|
730
|
+
function activeCell() {
|
|
731
|
+
const key = roving.rovingKey.value;
|
|
732
|
+
return key ? options.cellEls.get(key) : void 0;
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Вход в ячейку: `Enter` или `F2` отдают фокус тому, что внутри.
|
|
736
|
+
*
|
|
737
|
+
* Без этого шага паттерн неполон, а не «упрощён»: сетка забирает `Tab` себе,
|
|
738
|
+
* и кнопка сортировки, чекбокс или ссылка в ячейке иначе становятся
|
|
739
|
+
* недостижимы с клавиатуры вовсе.
|
|
740
|
+
*/
|
|
741
|
+
function enterCell(event) {
|
|
742
|
+
if (event.key !== "Enter" && event.key !== "F2") return false;
|
|
743
|
+
const cell = activeCell();
|
|
744
|
+
if (!cell || document.activeElement && document.activeElement !== cell && cell.contains(document.activeElement)) return false;
|
|
745
|
+
const target = cell.querySelector(FOCUSABLE);
|
|
746
|
+
if (!target) return false;
|
|
747
|
+
event.preventDefault();
|
|
748
|
+
target.focus();
|
|
749
|
+
return true;
|
|
750
|
+
}
|
|
751
|
+
/** Выход из ячейки: `Escape` возвращает фокус самой ячейке. */
|
|
752
|
+
function leaveCell(event) {
|
|
753
|
+
if (event.key !== "Escape") return false;
|
|
754
|
+
const cell = activeCell();
|
|
755
|
+
if (!cell || !document.activeElement || document.activeElement === cell || !cell.contains(document.activeElement)) return false;
|
|
756
|
+
event.preventDefault();
|
|
757
|
+
cell.focus();
|
|
758
|
+
return true;
|
|
759
|
+
}
|
|
760
|
+
return {
|
|
761
|
+
rovingKey: roving.rovingKey,
|
|
762
|
+
tabindexFor: (row, column) => options.enabled() ? roving.tabindexFor(gridCellKey(row, column)) : -1,
|
|
763
|
+
setActive: (row, column) => roving.setActive(gridCellKey(row, column)),
|
|
764
|
+
onKeydown: (event) => {
|
|
765
|
+
if (!options.enabled()) return false;
|
|
766
|
+
if (enterCell(event) || leaveCell(event)) return true;
|
|
767
|
+
const row = windowStep(event);
|
|
768
|
+
if (row !== null) {
|
|
769
|
+
event.preventDefault();
|
|
770
|
+
options.scrollToRow?.(row);
|
|
771
|
+
const { column } = parseGridCellKey(roving.rovingKey.value);
|
|
772
|
+
nextTick(() => roving.focusKey(gridCellKey(row, column)));
|
|
773
|
+
return true;
|
|
774
|
+
}
|
|
775
|
+
return roving.handleNavigationKeys(event);
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
}
|
|
663
779
|
//#endregion
|
|
664
780
|
//#region ~icons/lucide/arrow-down
|
|
665
|
-
var _hoisted_1$
|
|
781
|
+
var _hoisted_1$5 = {
|
|
666
782
|
viewBox: "0 0 24 24",
|
|
667
783
|
width: "1.2em",
|
|
668
784
|
height: "1.2em"
|
|
669
785
|
};
|
|
670
|
-
function render$
|
|
671
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
786
|
+
function render$5(_ctx, _cache) {
|
|
787
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$5, [..._cache[0] || (_cache[0] = [createElementVNode("path", {
|
|
672
788
|
fill: "none",
|
|
673
789
|
stroke: "currentColor",
|
|
674
790
|
"stroke-linecap": "round",
|
|
@@ -679,14 +795,120 @@ function render$1(_ctx, _cache) {
|
|
|
679
795
|
}
|
|
680
796
|
var arrow_down_default = markRaw({
|
|
681
797
|
name: "lucide-arrow-down",
|
|
798
|
+
render: render$5
|
|
799
|
+
});
|
|
800
|
+
//#endregion
|
|
801
|
+
//#region ~icons/lucide/ellipsis-vertical
|
|
802
|
+
var _hoisted_1$4 = {
|
|
803
|
+
viewBox: "0 0 24 24",
|
|
804
|
+
width: "1.2em",
|
|
805
|
+
height: "1.2em"
|
|
806
|
+
};
|
|
807
|
+
function render$4(_ctx, _cache) {
|
|
808
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [createElementVNode("g", {
|
|
809
|
+
fill: "none",
|
|
810
|
+
stroke: "currentColor",
|
|
811
|
+
"stroke-linecap": "round",
|
|
812
|
+
"stroke-linejoin": "round",
|
|
813
|
+
"stroke-width": "2"
|
|
814
|
+
}, [
|
|
815
|
+
createElementVNode("circle", {
|
|
816
|
+
cx: "12",
|
|
817
|
+
cy: "12",
|
|
818
|
+
r: "1"
|
|
819
|
+
}),
|
|
820
|
+
createElementVNode("circle", {
|
|
821
|
+
cx: "12",
|
|
822
|
+
cy: "5",
|
|
823
|
+
r: "1"
|
|
824
|
+
}),
|
|
825
|
+
createElementVNode("circle", {
|
|
826
|
+
cx: "12",
|
|
827
|
+
cy: "19",
|
|
828
|
+
r: "1"
|
|
829
|
+
})
|
|
830
|
+
], -1)])]);
|
|
831
|
+
}
|
|
832
|
+
var ellipsis_vertical_default = markRaw({
|
|
833
|
+
name: "lucide-ellipsis-vertical",
|
|
834
|
+
render: render$4
|
|
835
|
+
});
|
|
836
|
+
//#endregion
|
|
837
|
+
//#region ~icons/lucide/arrow-left-to-line
|
|
838
|
+
var _hoisted_1$3 = {
|
|
839
|
+
viewBox: "0 0 24 24",
|
|
840
|
+
width: "1.2em",
|
|
841
|
+
height: "1.2em"
|
|
842
|
+
};
|
|
843
|
+
function render$3(_ctx, _cache) {
|
|
844
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [createElementVNode("path", {
|
|
845
|
+
fill: "none",
|
|
846
|
+
stroke: "currentColor",
|
|
847
|
+
"stroke-linecap": "round",
|
|
848
|
+
"stroke-linejoin": "round",
|
|
849
|
+
"stroke-width": "2",
|
|
850
|
+
d: "M3 19V5m10 1l-6 6l6 6m-6-6h14"
|
|
851
|
+
}, null, -1)])]);
|
|
852
|
+
}
|
|
853
|
+
var arrow_left_to_line_default = markRaw({
|
|
854
|
+
name: "lucide-arrow-left-to-line",
|
|
855
|
+
render: render$3
|
|
856
|
+
});
|
|
857
|
+
//#endregion
|
|
858
|
+
//#region ~icons/lucide/arrow-right-to-line
|
|
859
|
+
var _hoisted_1$2 = {
|
|
860
|
+
viewBox: "0 0 24 24",
|
|
861
|
+
width: "1.2em",
|
|
862
|
+
height: "1.2em"
|
|
863
|
+
};
|
|
864
|
+
function render$2(_ctx, _cache) {
|
|
865
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [createElementVNode("path", {
|
|
866
|
+
fill: "none",
|
|
867
|
+
stroke: "currentColor",
|
|
868
|
+
"stroke-linecap": "round",
|
|
869
|
+
"stroke-linejoin": "round",
|
|
870
|
+
"stroke-width": "2",
|
|
871
|
+
d: "M17 12H3m8 6l6-6l-6-6m10-1v14"
|
|
872
|
+
}, null, -1)])]);
|
|
873
|
+
}
|
|
874
|
+
var arrow_right_to_line_default = markRaw({
|
|
875
|
+
name: "lucide-arrow-right-to-line",
|
|
876
|
+
render: render$2
|
|
877
|
+
});
|
|
878
|
+
//#endregion
|
|
879
|
+
//#region ~icons/lucide/pin-off
|
|
880
|
+
var _hoisted_1$1 = {
|
|
881
|
+
viewBox: "0 0 24 24",
|
|
882
|
+
width: "1.2em",
|
|
883
|
+
height: "1.2em"
|
|
884
|
+
};
|
|
885
|
+
function render$1(_ctx, _cache) {
|
|
886
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$1, [..._cache[0] || (_cache[0] = [createElementVNode("path", {
|
|
887
|
+
fill: "none",
|
|
888
|
+
stroke: "currentColor",
|
|
889
|
+
"stroke-linecap": "round",
|
|
890
|
+
"stroke-linejoin": "round",
|
|
891
|
+
"stroke-width": "2",
|
|
892
|
+
d: "M12 17v5m3-12.66V7a1 1 0 0 1 1-1a2 2 0 0 0 0-4H7.89M2 2l20 20M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11"
|
|
893
|
+
}, null, -1)])]);
|
|
894
|
+
}
|
|
895
|
+
var pin_off_default = markRaw({
|
|
896
|
+
name: "lucide-pin-off",
|
|
682
897
|
render: render$1
|
|
683
898
|
});
|
|
684
899
|
//#endregion
|
|
685
900
|
//#region src/components/GrDataTable/GrDataTable.vue?vue&type=script&setup=true&lang.ts
|
|
686
901
|
var _hoisted_1 = ["id"];
|
|
687
902
|
var _hoisted_2 = ["aria-rowindex"];
|
|
688
|
-
var _hoisted_3 = ["
|
|
689
|
-
var _hoisted_4 = [
|
|
903
|
+
var _hoisted_3 = ["tabindex"];
|
|
904
|
+
var _hoisted_4 = ["tabindex"];
|
|
905
|
+
var _hoisted_5 = [
|
|
906
|
+
"tabindex",
|
|
907
|
+
"data-column-key",
|
|
908
|
+
"aria-sort",
|
|
909
|
+
"onFocus"
|
|
910
|
+
];
|
|
911
|
+
var _hoisted_6 = [
|
|
690
912
|
"tabindex",
|
|
691
913
|
"aria-label",
|
|
692
914
|
"disabled",
|
|
@@ -694,17 +916,23 @@ var _hoisted_4 = [
|
|
|
694
916
|
"onKeydown",
|
|
695
917
|
"onFocus"
|
|
696
918
|
];
|
|
697
|
-
var
|
|
698
|
-
var
|
|
699
|
-
var
|
|
919
|
+
var _hoisted_7 = ["tabindex", "onClick"];
|
|
920
|
+
var _hoisted_8 = { class: "sr-only" };
|
|
921
|
+
var _hoisted_9 = {
|
|
700
922
|
class: "inline-flex",
|
|
701
923
|
"aria-hidden": "true"
|
|
702
924
|
};
|
|
703
|
-
var
|
|
925
|
+
var _hoisted_10 = {
|
|
704
926
|
key: 2,
|
|
705
927
|
class: "text-[var(--gr-muted-fg)]"
|
|
706
928
|
};
|
|
707
|
-
var
|
|
929
|
+
var _hoisted_11 = [
|
|
930
|
+
"tabindex",
|
|
931
|
+
"aria-label",
|
|
932
|
+
"disabled"
|
|
933
|
+
];
|
|
934
|
+
var _hoisted_12 = [
|
|
935
|
+
"tabindex",
|
|
708
936
|
"aria-label",
|
|
709
937
|
"aria-valuenow",
|
|
710
938
|
"aria-valuemin",
|
|
@@ -713,53 +941,85 @@ var _hoisted_9 = [
|
|
|
713
941
|
"onKeydown",
|
|
714
942
|
"onDblclick"
|
|
715
943
|
];
|
|
716
|
-
var
|
|
944
|
+
var _hoisted_13 = { key: 0 };
|
|
945
|
+
var _hoisted_14 = { "data-gr-datatable-loading": "" };
|
|
946
|
+
var _hoisted_15 = ["colspan"];
|
|
947
|
+
var _hoisted_16 = { class: "inline-flex items-center gap-2" };
|
|
948
|
+
var _hoisted_17 = { key: 1 };
|
|
949
|
+
var _hoisted_18 = { "data-gr-datatable-empty": "" };
|
|
950
|
+
var _hoisted_19 = ["colspan"];
|
|
951
|
+
var _hoisted_20 = {
|
|
717
952
|
key: 0,
|
|
718
|
-
"data-gr-
|
|
719
|
-
};
|
|
720
|
-
var _hoisted_11 = ["colspan"];
|
|
721
|
-
var _hoisted_12 = { class: "inline-flex items-center gap-2" };
|
|
722
|
-
var _hoisted_13 = {
|
|
723
|
-
key: 1,
|
|
724
|
-
"data-gr-datatable-empty": ""
|
|
953
|
+
"data-gr-table-off-grid": ""
|
|
725
954
|
};
|
|
726
|
-
var
|
|
727
|
-
var _hoisted_15 = {
|
|
728
|
-
key: 0,
|
|
955
|
+
var _hoisted_21 = {
|
|
729
956
|
"aria-hidden": "true",
|
|
730
957
|
"data-gr-datatable-spacer": "before",
|
|
731
958
|
"data-gr-table-off-grid": "",
|
|
732
959
|
style: { pointerEvents: "none" }
|
|
733
960
|
};
|
|
734
|
-
var
|
|
735
|
-
var
|
|
961
|
+
var _hoisted_22 = ["colspan"];
|
|
962
|
+
var _hoisted_23 = [
|
|
736
963
|
"data-row-key",
|
|
737
964
|
"data-selected",
|
|
738
965
|
"aria-rowindex",
|
|
739
966
|
"onClick"
|
|
740
967
|
];
|
|
741
|
-
var
|
|
968
|
+
var _hoisted_24 = ["tabindex", "onFocus"];
|
|
969
|
+
var _hoisted_25 = [
|
|
970
|
+
"tabindex",
|
|
742
971
|
"aria-expanded",
|
|
743
972
|
"aria-controls",
|
|
744
973
|
"aria-label",
|
|
745
974
|
"onClick"
|
|
746
975
|
];
|
|
747
|
-
var
|
|
748
|
-
var
|
|
749
|
-
var
|
|
976
|
+
var _hoisted_26 = ["tabindex", "onFocus"];
|
|
977
|
+
var _hoisted_27 = ["tabindex", "onFocus"];
|
|
978
|
+
var _hoisted_28 = ["id"];
|
|
979
|
+
var _hoisted_29 = ["colspan"];
|
|
980
|
+
var _hoisted_30 = {
|
|
750
981
|
key: 0,
|
|
751
982
|
"data-gr-datatable-detail-loading": ""
|
|
752
983
|
};
|
|
753
|
-
var
|
|
984
|
+
var _hoisted_31 = {
|
|
754
985
|
key: 1,
|
|
986
|
+
"data-gr-table-off-grid": ""
|
|
987
|
+
};
|
|
988
|
+
var _hoisted_32 = {
|
|
755
989
|
"aria-hidden": "true",
|
|
756
990
|
"data-gr-datatable-spacer": "after",
|
|
757
991
|
"data-gr-table-off-grid": "",
|
|
758
992
|
style: { pointerEvents: "none" }
|
|
759
993
|
};
|
|
760
|
-
var
|
|
761
|
-
var
|
|
762
|
-
var
|
|
994
|
+
var _hoisted_33 = ["colspan"];
|
|
995
|
+
var _hoisted_34 = ["aria-rowindex"];
|
|
996
|
+
var _hoisted_35 = ["data-column-key"];
|
|
997
|
+
/**
|
|
998
|
+
* `GrDataTable` — data-таблица поверх `GrTable` с сортировкой по клику
|
|
999
|
+
* на заголовок и scoped-слотами ячеек (`#cell-<key>`), `#header-<key>`,
|
|
1000
|
+
* `#caption`, `#footer`, `#empty`, `#loading`.
|
|
1001
|
+
*
|
|
1002
|
+
* Итоговая строка объявляется пропом `summaryRow` и оформляется слотами
|
|
1003
|
+
* `#summary-<key>`: она встаёт по той же колоночной сетке, что и тело.
|
|
1004
|
+
*
|
|
1005
|
+
* `#footer` — для свободной разметки под итогом: несколько строк, примечание,
|
|
1006
|
+
* `colspan`. Рендерится внутрь того же `<tfoot>`, то есть его содержимое тоже
|
|
1007
|
+
* строки таблицы (`<tr><td>`), а скоуп отдаёт `columns` (в текущем порядке) и
|
|
1008
|
+
* `totalColumns` (со служебными колонками выбора и раскрытия).
|
|
1009
|
+
*
|
|
1010
|
+
* Сортировка, включая крайние случаи с пустыми и смешанными значениями, живёт
|
|
1011
|
+
* в `grDataTableSort.ts` — см. `docs/components/GrDataTable.md`.
|
|
1012
|
+
*/
|
|
1013
|
+
var COLUMN_MENU_WIDTH = 240;
|
|
1014
|
+
/**
|
|
1015
|
+
* Пункты меню колонки.
|
|
1016
|
+
*
|
|
1017
|
+
* Три состояния закрепления — это выбор одного из трёх, поэтому пункты
|
|
1018
|
+
* `menuitemradio` с `checked`, а не три команды: так диктор называет текущее
|
|
1019
|
+
* положение сам, и «открепить» у незакреплённой колонки видно выключенным, а
|
|
1020
|
+
* не пропадает.
|
|
1021
|
+
*/
|
|
1022
|
+
var expandColumnIndex = 0;
|
|
763
1023
|
//#endregion
|
|
764
1024
|
//#region src/components/GrDataTable/GrDataTable.vue
|
|
765
1025
|
var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
@@ -828,6 +1088,15 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
828
1088
|
default: false
|
|
829
1089
|
},
|
|
830
1090
|
columnWidths: { default: void 0 },
|
|
1091
|
+
pinnableColumns: {
|
|
1092
|
+
type: Boolean,
|
|
1093
|
+
default: false
|
|
1094
|
+
},
|
|
1095
|
+
pinnedColumns: { default: void 0 },
|
|
1096
|
+
cellNavigation: {
|
|
1097
|
+
type: Boolean,
|
|
1098
|
+
default: false
|
|
1099
|
+
},
|
|
831
1100
|
expandable: {
|
|
832
1101
|
type: Boolean,
|
|
833
1102
|
default: false
|
|
@@ -860,6 +1129,8 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
860
1129
|
"columnReorder",
|
|
861
1130
|
"update:columnWidths",
|
|
862
1131
|
"columnResize",
|
|
1132
|
+
"update:pinnedColumns",
|
|
1133
|
+
"columnPin",
|
|
863
1134
|
"update:expandedKeys",
|
|
864
1135
|
"expand",
|
|
865
1136
|
"collapse",
|
|
@@ -953,7 +1224,7 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
953
1224
|
* Раскрытие выключено при виртуализации целиком — см. предупреждение ниже.
|
|
954
1225
|
* Объявлено здесь, а не рядом с ним: от него зависит `colspan` служебных строк.
|
|
955
1226
|
*/
|
|
956
|
-
const expandEnabled = computed(() => props.expandable
|
|
1227
|
+
const expandEnabled = computed(() => props.expandable);
|
|
957
1228
|
/** Своя колонка с кнопкой: её может не быть, если кнопку ставит потребитель. */
|
|
958
1229
|
const expandColumnVisible = computed(() => expandEnabled.value && props.expandColumn);
|
|
959
1230
|
const totalColumns = computed(() => props.columns.length + (props.selectable ? 1 : 0) + (expandColumnVisible.value ? 1 : 0));
|
|
@@ -972,8 +1243,32 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
972
1243
|
const previous = store.get(key);
|
|
973
1244
|
if (previous && !previous.isConnected) store.delete(key);
|
|
974
1245
|
}
|
|
1246
|
+
/**
|
|
1247
|
+
* Закрепление, выбранное пользователем, поверх объявленного в конфиге колонки.
|
|
1248
|
+
*
|
|
1249
|
+
* Отсутствие ключа означает «решает конфиг», а `null` — «откреплена»: без
|
|
1250
|
+
* различия снять закрепление, объявленное у колонки, было бы нечем.
|
|
1251
|
+
*/
|
|
1252
|
+
const pinnedState = ref({});
|
|
1253
|
+
const pinnedOverrides = computed(() => props.pinnedColumns ?? pinnedState.value);
|
|
1254
|
+
/**
|
|
1255
|
+
* Колонки с уже разрешённым закреплением.
|
|
1256
|
+
*
|
|
1257
|
+
* Дальше по компоненту `col.pinned` читают порядок, раскладка и все три яруса
|
|
1258
|
+
* ячеек. Разрешать выбор пользователя в каждом из этих мест значило бы завести
|
|
1259
|
+
* четыре места, где он может разойтись, — поэтому он разрешается один раз
|
|
1260
|
+
* здесь, а ниже по течению ничего не знает о том, откуда взялось значение.
|
|
1261
|
+
*/
|
|
1262
|
+
const resolvedColumns = computed(() => props.columns.map((col) => {
|
|
1263
|
+
const key = String(col.key);
|
|
1264
|
+
if (!(key in pinnedOverrides.value)) return col;
|
|
1265
|
+
return {
|
|
1266
|
+
...col,
|
|
1267
|
+
pinned: pinnedOverrides.value[key] ?? void 0
|
|
1268
|
+
};
|
|
1269
|
+
}));
|
|
975
1270
|
const { orderedColumns, columnKeys, draggingColumnKey, columnDropClass, onColumnHandleKeydown, columnSort, columnRoving } = useDataTableColumnOrder({
|
|
976
|
-
columns: () =>
|
|
1271
|
+
columns: () => resolvedColumns.value,
|
|
977
1272
|
columnOrder: () => props.columnOrder,
|
|
978
1273
|
reorderableColumns: () => props.reorderableColumns,
|
|
979
1274
|
loading: () => props.loading,
|
|
@@ -991,6 +1286,50 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
991
1286
|
}));
|
|
992
1287
|
}
|
|
993
1288
|
});
|
|
1289
|
+
/**
|
|
1290
|
+
* Ширина меню колонки.
|
|
1291
|
+
*
|
|
1292
|
+
* Панель ужимается по содержимому, и самой длинной подписи не хватало пяти
|
|
1293
|
+
* пикселей: «Закрепить справа» переносилось на вторую строку. Ширина задана
|
|
1294
|
+
* явно и с запасом — она обязана держать все три локали, а не ту, на которой
|
|
1295
|
+
* её замерили.
|
|
1296
|
+
*/
|
|
1297
|
+
function columnMenuItems(col) {
|
|
1298
|
+
const current = col.pinned ?? null;
|
|
1299
|
+
const item = (pinned, label, icon) => ({
|
|
1300
|
+
key: pinned ?? "none",
|
|
1301
|
+
label,
|
|
1302
|
+
icon,
|
|
1303
|
+
role: "menuitemradio",
|
|
1304
|
+
checked: current === pinned
|
|
1305
|
+
});
|
|
1306
|
+
return [
|
|
1307
|
+
item("left", t("gr.dataTable.pinLeft", "Pin to the left"), arrow_left_to_line_default),
|
|
1308
|
+
item("right", t("gr.dataTable.pinRight", "Pin to the right"), arrow_right_to_line_default),
|
|
1309
|
+
item(null, t("gr.dataTable.unpin", "Unpin"), pin_off_default)
|
|
1310
|
+
];
|
|
1311
|
+
}
|
|
1312
|
+
function columnMenuLabel(col) {
|
|
1313
|
+
return t("gr.dataTable.columnMenu", "Options for column {label}", { label: col.label });
|
|
1314
|
+
}
|
|
1315
|
+
function onColumnMenuSelect(col, item) {
|
|
1316
|
+
const pinned = item.key === "left" || item.key === "right" ? item.key : null;
|
|
1317
|
+
if ((col.pinned ?? null) === pinned) return;
|
|
1318
|
+
pinColumn(String(col.key), pinned);
|
|
1319
|
+
announce(pinned === "left" ? t("gr.dataTable.columnPinnedLeft", "Column {label} pinned to the left", { label: col.label }) : pinned === "right" ? t("gr.dataTable.columnPinnedRight", "Column {label} pinned to the right", { label: col.label }) : t("gr.dataTable.columnUnpinned", "Column {label} unpinned", { label: col.label }));
|
|
1320
|
+
}
|
|
1321
|
+
function pinColumn(key, pinned) {
|
|
1322
|
+
const next = {
|
|
1323
|
+
...pinnedOverrides.value,
|
|
1324
|
+
[key]: pinned
|
|
1325
|
+
};
|
|
1326
|
+
pinnedState.value = next;
|
|
1327
|
+
emit("update:pinnedColumns", next);
|
|
1328
|
+
emit("columnPin", {
|
|
1329
|
+
key,
|
|
1330
|
+
pinned
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
994
1333
|
const { columnWidths, setMeasuredWidths, widthOf, tableMinWidth, resizingKey, onResizerPointerDown, onResizerKeydown, resetColumnWidth, resizerValue } = useDataTableColumnWidths({
|
|
995
1334
|
orderedColumns: () => orderedColumns.value,
|
|
996
1335
|
columnWidths: () => props.columnWidths,
|
|
@@ -1051,6 +1390,14 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
1051
1390
|
if (isEmpty.value) return resolvedEmptyText.value;
|
|
1052
1391
|
return "";
|
|
1053
1392
|
});
|
|
1393
|
+
/**
|
|
1394
|
+
* В режиме сетки регион таблицы не рендерится, и объявлять состояние некому —
|
|
1395
|
+
* берёт на себя общий объявитель. Вне режима ничего не меняется: там регион на
|
|
1396
|
+
* месте, и второе объявление было бы дублем.
|
|
1397
|
+
*/
|
|
1398
|
+
watch(liveMessage, (next) => {
|
|
1399
|
+
if (props.cellNavigation && next) announce(next);
|
|
1400
|
+
});
|
|
1054
1401
|
function cellValue(row, key) {
|
|
1055
1402
|
return row[key];
|
|
1056
1403
|
}
|
|
@@ -1105,15 +1452,6 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
1105
1452
|
function detailRowId(row) {
|
|
1106
1453
|
return `${expandDetailId}-${rowKeyValue(row)}`;
|
|
1107
1454
|
}
|
|
1108
|
-
/**
|
|
1109
|
-
* Раскрытие и виртуализация вместе пока не работают: замер виртуализатора висит
|
|
1110
|
-
* на самой строке, и высота второго яруса в него не попадает — распорка
|
|
1111
|
-
* разъедется молча. Запрет снимется, когда пара строк переедет в свою группу
|
|
1112
|
-
* `<tbody>`; до тех пор лучше предупредить, чем показать прыгающую таблицу.
|
|
1113
|
-
*/
|
|
1114
|
-
if (process.env.NODE_ENV !== "production") watchEffect(() => {
|
|
1115
|
-
if (props.expandable && props.virtual) console.warn("[granularity] GrDataTable: `expandable` вместе с `virtual` пока не поддержан — раскрытие выключено. Замер виртуализатора висит на строке и не видит высоту подробностей, поэтому распорки разъезжаются.");
|
|
1116
|
-
});
|
|
1117
1455
|
const tableRef = ref(null);
|
|
1118
1456
|
const rootId = useId();
|
|
1119
1457
|
function rootEl() {
|
|
@@ -1156,6 +1494,40 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
1156
1494
|
index: start + offset
|
|
1157
1495
|
}));
|
|
1158
1496
|
});
|
|
1497
|
+
/**
|
|
1498
|
+
* Порядок ячеек в строке: раскрытие, выбор, колонки. Шапка и тело рисуют его
|
|
1499
|
+
* одинаково, поэтому индекс колонки в сетке считается один раз здесь.
|
|
1500
|
+
*/
|
|
1501
|
+
const serviceColumnCount = computed(() => (expandColumnVisible.value ? 1 : 0) + (props.selectable ? 1 : 0));
|
|
1502
|
+
const selectColumnIndex = computed(() => expandColumnVisible.value ? 1 : 0);
|
|
1503
|
+
const dataColumnIndex = (index) => serviceColumnCount.value + index;
|
|
1504
|
+
/** Узлы ячеек по ключу сетки. Заполняется `:ref` в разметке. */
|
|
1505
|
+
const cellEls = /* @__PURE__ */ new Map();
|
|
1506
|
+
/**
|
|
1507
|
+
* Индексы отрисованных строк. При виртуализации это окно, без неё — весь
|
|
1508
|
+
* набор: сетке нужно то, что действительно есть в разметке.
|
|
1509
|
+
*/
|
|
1510
|
+
const renderedRowIndexes = computed(() => renderedRows.value.map((item) => item.index));
|
|
1511
|
+
const grid = useDataTableGridNavigation({
|
|
1512
|
+
enabled: () => props.cellNavigation,
|
|
1513
|
+
columns: () => totalColumns.value,
|
|
1514
|
+
renderedRows: () => renderedRowIndexes.value,
|
|
1515
|
+
totalRows: () => sortedRows.value.length,
|
|
1516
|
+
cellEls,
|
|
1517
|
+
scrollToRow: props.virtual ? (index) => virtualizer.scrollToIndex(index) : void 0
|
|
1518
|
+
});
|
|
1519
|
+
function registerCell(row, column, el) {
|
|
1520
|
+
registerEl(cellEls, gridCellKey(row, column), el);
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Остановка `Tab` у контролов внутри ячеек.
|
|
1524
|
+
*
|
|
1525
|
+
* При навигации по ячейкам их в таб-порядке быть не должно: `Tab` принадлежит
|
|
1526
|
+
* сетке целиком, а до кнопки добираются стрелкой до ячейки и `Enter`. Иначе
|
|
1527
|
+
* остановок было бы столько же, сколько контролов, — то есть паттерн не
|
|
1528
|
+
* выполнялся бы вовсе.
|
|
1529
|
+
*/
|
|
1530
|
+
const cellControlTabindex = computed(() => props.cellNavigation ? -1 : void 0);
|
|
1159
1531
|
const spacerBefore = computed(() => props.virtual ? virtualizer.offset.value : 0);
|
|
1160
1532
|
const spacerAfter = computed(() => props.virtual ? virtualizer.offsetEnd.value : 0);
|
|
1161
1533
|
/** Ширина колонки: число трактуем как пиксели. */
|
|
@@ -1216,36 +1588,49 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
1216
1588
|
return openBlock(), createBlock(GrTable_default, mergeProps(tableProps.value, {
|
|
1217
1589
|
ref_key: "tableRef",
|
|
1218
1590
|
ref: tableRef,
|
|
1219
|
-
"
|
|
1591
|
+
"row-groups": "",
|
|
1592
|
+
"data-gr-datatable": "",
|
|
1593
|
+
role: __props.cellNavigation ? "grid" : "table",
|
|
1594
|
+
onKeydown: unref(grid).onKeydown
|
|
1220
1595
|
}), createSlots({
|
|
1221
|
-
caption: withCtx(() => [renderSlot(_ctx.$slots, "caption", {}, () => [createTextVNode(toDisplayString(__props.caption), 1)]),
|
|
1596
|
+
caption: withCtx(() => [renderSlot(_ctx.$slots, "caption", {}, () => [createTextVNode(toDisplayString(__props.caption), 1)]), !__props.cellNavigation ? (openBlock(), createElementBlock("span", {
|
|
1597
|
+
key: 0,
|
|
1222
1598
|
id: `${unref(rootId)}-live`,
|
|
1223
1599
|
"data-gr-datatable-live": "",
|
|
1224
1600
|
role: "status",
|
|
1225
1601
|
"aria-live": "polite"
|
|
1226
|
-
}, toDisplayString(liveMessage.value), 9, _hoisted_1)]),
|
|
1602
|
+
}, toDisplayString(liveMessage.value), 9, _hoisted_1)) : createCommentVNode("", true)]),
|
|
1227
1603
|
header: withCtx(() => [createElementVNode("tr", {
|
|
1228
1604
|
"data-gr-datatable-header": "",
|
|
1229
1605
|
"aria-rowindex": __props.virtual ? 1 : void 0
|
|
1230
1606
|
}, [
|
|
1231
1607
|
expandColumnVisible.value ? (openBlock(), createElementBlock("th", {
|
|
1232
1608
|
key: 0,
|
|
1609
|
+
ref: (el) => registerCell(unref(-1), expandColumnIndex, el),
|
|
1233
1610
|
"data-gr-datatable-expand-head": "",
|
|
1234
1611
|
scope: "col",
|
|
1235
|
-
class: normalizeClass([unref(expandColumnWidths)[unref(resolvedSize)], cellClass.value])
|
|
1236
|
-
|
|
1612
|
+
class: normalizeClass([unref(expandColumnWidths)[unref(resolvedSize)], cellClass.value]),
|
|
1613
|
+
tabindex: __props.cellNavigation ? unref(grid).tabindexFor(unref(-1), expandColumnIndex) : void 0,
|
|
1614
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => unref(grid).setActive(unref(-1), expandColumnIndex))
|
|
1615
|
+
}, null, 42, _hoisted_3)) : createCommentVNode("", true),
|
|
1237
1616
|
__props.selectable ? (openBlock(), createElementBlock("th", {
|
|
1238
1617
|
key: 1,
|
|
1239
|
-
ref: (el) =>
|
|
1618
|
+
ref: (el) => {
|
|
1619
|
+
registerEl(unref(headerCellEls), unref(SELECT_COLUMN_KEY), el);
|
|
1620
|
+
registerCell(unref(-1), selectColumnIndex.value, el);
|
|
1621
|
+
},
|
|
1240
1622
|
class: normalizeClass(["text-left", [
|
|
1241
1623
|
selectColumnClass.value,
|
|
1242
1624
|
cellClass.value,
|
|
1243
1625
|
unref(hasPinnedLeft) ? unref(columnPinnedClass) : ""
|
|
1244
1626
|
]]),
|
|
1627
|
+
tabindex: __props.cellNavigation ? unref(grid).tabindexFor(unref(-1), selectColumnIndex.value) : void 0,
|
|
1245
1628
|
style: normalizeStyle(unref(hasPinnedLeft) ? { left: "0px" } : void 0),
|
|
1246
|
-
scope: "col"
|
|
1629
|
+
scope: "col",
|
|
1630
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => unref(grid).setActive(unref(-1), selectColumnIndex.value))
|
|
1247
1631
|
}, [createVNode(GrCheckbox_default, {
|
|
1248
1632
|
"data-gr-datatable-select-all": "",
|
|
1633
|
+
tabindex: cellControlTabindex.value,
|
|
1249
1634
|
"model-value": unref(allSelected),
|
|
1250
1635
|
indeterminate: unref(someSelected),
|
|
1251
1636
|
size: checkboxSize.value,
|
|
@@ -1253,120 +1638,160 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
1253
1638
|
"aria-label": unref(t)("gr.dataTable.selectAll", "Select all rows"),
|
|
1254
1639
|
"onUpdate:modelValue": unref(toggleAll)
|
|
1255
1640
|
}, null, 8, [
|
|
1641
|
+
"tabindex",
|
|
1256
1642
|
"model-value",
|
|
1257
1643
|
"indeterminate",
|
|
1258
1644
|
"size",
|
|
1259
1645
|
"disabled",
|
|
1260
1646
|
"aria-label",
|
|
1261
1647
|
"onUpdate:modelValue"
|
|
1262
|
-
])],
|
|
1648
|
+
])], 46, _hoisted_4)) : createCommentVNode("", true),
|
|
1263
1649
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(orderedColumns), (col, colIndex) => {
|
|
1264
1650
|
return openBlock(), createElementBlock("th", {
|
|
1265
1651
|
key: col.key,
|
|
1266
1652
|
ref_for: true,
|
|
1267
|
-
ref: (el) =>
|
|
1653
|
+
ref: (el) => {
|
|
1654
|
+
registerEl(unref(headerCellEls), String(col.key), el);
|
|
1655
|
+
registerCell(unref(-1), dataColumnIndex(colIndex), el);
|
|
1656
|
+
},
|
|
1268
1657
|
class: normalizeClass(["font-700", [
|
|
1269
1658
|
headerTextClass.value,
|
|
1270
1659
|
cellClass.value,
|
|
1271
1660
|
cellAlign(col),
|
|
1272
|
-
__props.reorderableColumns || __props.resizableColumns ? "group relative" : "",
|
|
1661
|
+
__props.reorderableColumns || __props.resizableColumns || __props.pinnableColumns ? "group relative" : "",
|
|
1273
1662
|
unref(draggingColumnKey) === String(col.key) ? unref(columnDraggingClass) : "",
|
|
1274
1663
|
unref(columnDropClass)(colIndex),
|
|
1275
1664
|
...unref(pinnedCellClass)(col, colIndex)
|
|
1276
1665
|
]]),
|
|
1666
|
+
tabindex: __props.cellNavigation ? unref(grid).tabindexFor(unref(-1), dataColumnIndex(colIndex)) : void 0,
|
|
1277
1667
|
"data-column-key": col.key,
|
|
1278
1668
|
style: normalizeStyle({
|
|
1279
1669
|
...columnWidthStyle(unref(widthOf)(col)),
|
|
1280
1670
|
...unref(pinnedStyleOf)(col)
|
|
1281
1671
|
}),
|
|
1282
1672
|
"aria-sort": unref(ariaSortFor)(col),
|
|
1283
|
-
scope: "col"
|
|
1284
|
-
|
|
1285
|
-
key: 0,
|
|
1286
|
-
ref_for: true,
|
|
1287
|
-
ref: (el) => registerEl(unref(columnHandleEls), String(col.key), el),
|
|
1288
|
-
type: "button",
|
|
1289
|
-
"data-gr-datatable-column-handle": "",
|
|
1290
|
-
class: normalizeClass([unref(columnHandleClass), unref(columnSort).isActive.value ? unref(columnHandleActiveClass) : ""]),
|
|
1291
|
-
tabindex: unref(columnRoving).tabindexFor(String(col.key)),
|
|
1292
|
-
"aria-label": columnHandleLabel(col),
|
|
1293
|
-
disabled: __props.loading,
|
|
1294
|
-
onPointerdown: ($event) => unref(columnSort).startFrom(String(col.key))($event),
|
|
1295
|
-
onKeydown: ($event) => unref(onColumnHandleKeydown)($event, String(col.key)),
|
|
1296
|
-
onFocus: ($event) => unref(columnRoving).setActive(String(col.key)),
|
|
1297
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
|
|
1298
|
-
}, [createVNode(unref(grip_vertical_default), {
|
|
1299
|
-
class: "block",
|
|
1300
|
-
"aria-hidden": "true"
|
|
1301
|
-
})], 42, _hoisted_4)) : createCommentVNode("", true), col.sortable ? (openBlock(), createElementBlock("button", {
|
|
1302
|
-
key: 1,
|
|
1303
|
-
type: "button",
|
|
1304
|
-
"data-gr-datatable-sort": "",
|
|
1305
|
-
class: normalizeClass(["inline-flex items-center text-[var(--gr-muted-fg)] hover:text-[var(--gr-fg)] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--gr-ring)] rounded-[var(--gr-radius-sm)]", headerGapClass.value]),
|
|
1306
|
-
onClick: ($event) => unref(toggleSort)(col)
|
|
1673
|
+
scope: "col",
|
|
1674
|
+
onFocus: ($event) => unref(grid).setActive(unref(-1), dataColumnIndex(colIndex))
|
|
1307
1675
|
}, [
|
|
1308
|
-
createElementVNode("
|
|
1309
|
-
createElementVNode("span", _hoisted_6, toDisplayString(sortHint(col)), 1),
|
|
1310
|
-
createElementVNode("span", _hoisted_7, [unref(currentSortKey) === col.key && unref(currentSortDir) === "asc" ? (openBlock(), createBlock(GrIcon_default, {
|
|
1676
|
+
createElementVNode("div", { class: normalizeClass(["inline-flex items-center", headerGapClass.value]) }, [__props.reorderableColumns ? (openBlock(), createElementBlock("button", {
|
|
1311
1677
|
key: 0,
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1678
|
+
ref_for: true,
|
|
1679
|
+
ref: (el) => registerEl(unref(columnHandleEls), String(col.key), el),
|
|
1680
|
+
type: "button",
|
|
1681
|
+
"data-gr-datatable-column-handle": "",
|
|
1682
|
+
class: normalizeClass([unref(columnHandleClass), unref(columnSort).isActive.value ? unref(columnHandleActiveClass) : ""]),
|
|
1683
|
+
tabindex: __props.cellNavigation ? -1 : unref(columnRoving).tabindexFor(String(col.key)),
|
|
1684
|
+
"aria-label": columnHandleLabel(col),
|
|
1685
|
+
disabled: __props.loading,
|
|
1686
|
+
onPointerdown: ($event) => unref(columnSort).startFrom(String(col.key))($event),
|
|
1687
|
+
onKeydown: ($event) => unref(onColumnHandleKeydown)($event, String(col.key)),
|
|
1688
|
+
onFocus: ($event) => unref(columnRoving).setActive(String(col.key)),
|
|
1689
|
+
onClick: _cache[2] || (_cache[2] = withModifiers(() => {}, ["stop"]))
|
|
1690
|
+
}, [createVNode(unref(grip_vertical_default), {
|
|
1691
|
+
class: "block",
|
|
1692
|
+
"aria-hidden": "true"
|
|
1693
|
+
})], 42, _hoisted_6)) : createCommentVNode("", true), col.sortable ? (openBlock(), createElementBlock("button", {
|
|
1317
1694
|
key: 1,
|
|
1318
|
-
|
|
1695
|
+
type: "button",
|
|
1696
|
+
"data-gr-datatable-sort": "",
|
|
1697
|
+
tabindex: cellControlTabindex.value,
|
|
1698
|
+
class: normalizeClass(["inline-flex items-center text-[var(--gr-muted-fg)] hover:text-[var(--gr-fg)] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--gr-ring)] rounded-[var(--gr-radius-sm)]", headerGapClass.value]),
|
|
1699
|
+
onClick: ($event) => unref(toggleSort)(col)
|
|
1700
|
+
}, [
|
|
1701
|
+
createElementVNode("span", null, [renderSlot(_ctx.$slots, `header-${col.key}`, { column: col }, () => [createTextVNode(toDisplayString(col.label), 1)])]),
|
|
1702
|
+
createElementVNode("span", _hoisted_8, toDisplayString(sortHint(col)), 1),
|
|
1703
|
+
createElementVNode("span", _hoisted_9, [unref(currentSortKey) === col.key && unref(currentSortDir) === "asc" ? (openBlock(), createBlock(GrIcon_default, {
|
|
1704
|
+
key: 0,
|
|
1705
|
+
size: sortIconSize.value
|
|
1706
|
+
}, {
|
|
1707
|
+
default: withCtx(() => [createVNode(unref(arrow_up_default))]),
|
|
1708
|
+
_: 1
|
|
1709
|
+
}, 8, ["size"])) : unref(currentSortKey) === col.key && unref(currentSortDir) === "desc" ? (openBlock(), createBlock(GrIcon_default, {
|
|
1710
|
+
key: 1,
|
|
1711
|
+
size: sortIconSize.value
|
|
1712
|
+
}, {
|
|
1713
|
+
default: withCtx(() => [createVNode(unref(arrow_down_default))]),
|
|
1714
|
+
_: 1
|
|
1715
|
+
}, 8, ["size"])) : createCommentVNode("", true)])
|
|
1716
|
+
], 10, _hoisted_7)) : (openBlock(), createElementBlock("span", _hoisted_10, [renderSlot(_ctx.$slots, `header-${col.key}`, { column: col }, () => [createTextVNode(toDisplayString(col.label), 1)])]))], 2),
|
|
1717
|
+
__props.pinnableColumns ? (openBlock(), createBlock(GrDropdownMenu_default, {
|
|
1718
|
+
key: 0,
|
|
1719
|
+
"data-gr-datatable-column-menu": "",
|
|
1720
|
+
items: columnMenuItems(col),
|
|
1721
|
+
placement: "bottom-end",
|
|
1722
|
+
width: COLUMN_MENU_WIDTH,
|
|
1723
|
+
"aria-label": columnMenuLabel(col),
|
|
1724
|
+
onSelect: ($event) => onColumnMenuSelect(col, $event)
|
|
1319
1725
|
}, {
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1726
|
+
trigger: withCtx(({ triggerProps }) => [createElementVNode("button", mergeProps({ ref_for: true }, triggerProps, {
|
|
1727
|
+
type: "button",
|
|
1728
|
+
"data-gr-datatable-column-menu-trigger": "",
|
|
1729
|
+
tabindex: cellControlTabindex.value,
|
|
1730
|
+
class: unref(columnMenuTriggerClass),
|
|
1731
|
+
"aria-label": columnMenuLabel(col),
|
|
1732
|
+
disabled: __props.loading,
|
|
1733
|
+
onClick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"]))
|
|
1734
|
+
}), [createVNode(unref(ellipsis_vertical_default), {
|
|
1735
|
+
class: "block",
|
|
1736
|
+
"aria-hidden": "true"
|
|
1737
|
+
})], 16, _hoisted_11)]),
|
|
1738
|
+
_: 2
|
|
1739
|
+
}, 1032, [
|
|
1740
|
+
"items",
|
|
1741
|
+
"aria-label",
|
|
1742
|
+
"onSelect"
|
|
1743
|
+
])) : createCommentVNode("", true),
|
|
1744
|
+
__props.resizableColumns ? (openBlock(), createElementBlock("span", {
|
|
1745
|
+
key: 1,
|
|
1746
|
+
"data-gr-datatable-column-resizer": "",
|
|
1747
|
+
role: "separator",
|
|
1748
|
+
tabindex: __props.cellNavigation ? -1 : 0,
|
|
1749
|
+
"aria-orientation": "vertical",
|
|
1750
|
+
class: normalizeClass(unref(columnResizerClass)),
|
|
1751
|
+
"aria-label": resizerLabel(col),
|
|
1752
|
+
"aria-valuenow": unref(resizerValue)(col),
|
|
1753
|
+
"aria-valuemin": unref(48),
|
|
1754
|
+
"aria-valuetext": `${unref(resizerValue)(col)}px`,
|
|
1755
|
+
onPointerdown: ($event) => unref(onResizerPointerDown)($event, String(col.key)),
|
|
1756
|
+
onKeydown: ($event) => unref(onResizerKeydown)($event, String(col.key)),
|
|
1757
|
+
onDblclick: ($event) => unref(resetColumnWidth)(String(col.key)),
|
|
1758
|
+
onClick: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
|
|
1759
|
+
}, [createElementVNode("span", {
|
|
1760
|
+
class: normalizeClass([
|
|
1761
|
+
unref(columnResizerLineClass),
|
|
1762
|
+
unref(columnResizerHoverClass),
|
|
1763
|
+
unref(resizingKey) === String(col.key) ? unref(columnResizerLineActiveClass) : ""
|
|
1764
|
+
]),
|
|
1765
|
+
"aria-hidden": "true"
|
|
1766
|
+
}, null, 2)], 42, _hoisted_12)) : createCommentVNode("", true)
|
|
1767
|
+
], 46, _hoisted_5);
|
|
1346
1768
|
}), 128))
|
|
1347
1769
|
], 8, _hoisted_2)]),
|
|
1348
|
-
default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock("tr",
|
|
1770
|
+
default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock("tbody", _hoisted_13, [createElementVNode("tr", _hoisted_14, [createElementVNode("td", {
|
|
1349
1771
|
colspan: totalColumns.value,
|
|
1350
1772
|
class: normalizeClass(["text-center text-[var(--gr-muted-fg)]", placeholderClass.value])
|
|
1351
|
-
}, [renderSlot(_ctx.$slots, "loading", {}, () => [createElementVNode("span",
|
|
1773
|
+
}, [renderSlot(_ctx.$slots, "loading", {}, () => [createElementVNode("span", _hoisted_16, [createVNode(unref(loader_circle_default), {
|
|
1352
1774
|
class: normalizeClass(["block animate-spin", spinnerClass.value]),
|
|
1353
1775
|
"aria-hidden": "true"
|
|
1354
|
-
}, null, 8, ["class"]), createElementVNode("span", null, toDisplayString(resolvedLoadingText.value), 1)])])], 10,
|
|
1776
|
+
}, null, 8, ["class"]), createElementVNode("span", null, toDisplayString(resolvedLoadingText.value), 1)])])], 10, _hoisted_15)])])) : isEmpty.value ? (openBlock(), createElementBlock("tbody", _hoisted_17, [createElementVNode("tr", _hoisted_18, [createElementVNode("td", {
|
|
1355
1777
|
colspan: totalColumns.value,
|
|
1356
1778
|
class: normalizeClass(["text-center text-[var(--gr-muted-fg)]", placeholderClass.value])
|
|
1357
|
-
}, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(resolvedEmptyText.value), 1)])], 10,
|
|
1358
|
-
__props.virtual && spacerBefore.value > 0 ? (openBlock(), createElementBlock("tr",
|
|
1779
|
+
}, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(resolvedEmptyText.value), 1)])], 10, _hoisted_19)])])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
1780
|
+
__props.virtual && spacerBefore.value > 0 ? (openBlock(), createElementBlock("tbody", _hoisted_20, [createElementVNode("tr", _hoisted_21, [createElementVNode("td", {
|
|
1359
1781
|
colspan: totalColumns.value,
|
|
1360
1782
|
style: normalizeStyle({
|
|
1361
1783
|
height: `${spacerBefore.value}px`,
|
|
1362
1784
|
padding: "0",
|
|
1363
1785
|
border: "0"
|
|
1364
1786
|
})
|
|
1365
|
-
}, null, 12,
|
|
1787
|
+
}, null, 12, _hoisted_22)])])) : createCommentVNode("", true),
|
|
1366
1788
|
(openBlock(true), createElementBlock(Fragment, null, renderList(renderedRows.value, ({ row, index }) => {
|
|
1367
|
-
return openBlock(), createElementBlock(
|
|
1789
|
+
return openBlock(), createElementBlock("tbody", {
|
|
1790
|
+
key: unref(rowKeyValue)(row),
|
|
1368
1791
|
ref_for: true,
|
|
1369
1792
|
ref: (el) => __props.virtual && unref(virtualizer).measure(index, el),
|
|
1793
|
+
"data-gr-datatable-row-group": ""
|
|
1794
|
+
}, [createElementVNode("tr", mergeProps({
|
|
1370
1795
|
class: ["border-t border-[var(--gr-brd)]", [unref(isRowSelected)(row) ? unref(rowSelectedClass) : "", rowClassName(row, index)]],
|
|
1371
1796
|
"data-gr-datatable-row": "",
|
|
1372
1797
|
"data-row-key": unref(rowKeyValue)(row),
|
|
@@ -1375,12 +1800,17 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
1375
1800
|
}, { ref_for: true }, __props.rowProps?.(row, index), { onClick: ($event) => onRowClick(row, index, $event) }), [
|
|
1376
1801
|
expandColumnVisible.value ? (openBlock(), createElementBlock("td", {
|
|
1377
1802
|
key: 0,
|
|
1803
|
+
ref_for: true,
|
|
1804
|
+
ref: (el) => registerCell(index, expandColumnIndex, el),
|
|
1378
1805
|
"data-gr-datatable-expand-cell": "",
|
|
1379
|
-
class: normalizeClass(["text-left", [unref(expandColumnWidths)[unref(resolvedSize)], cellClass.value]])
|
|
1806
|
+
class: normalizeClass(["text-left", [unref(expandColumnWidths)[unref(resolvedSize)], cellClass.value]]),
|
|
1807
|
+
tabindex: __props.cellNavigation ? unref(grid).tabindexFor(index, expandColumnIndex) : void 0,
|
|
1808
|
+
onFocus: ($event) => unref(grid).setActive(index, expandColumnIndex)
|
|
1380
1809
|
}, [unref(isRowExpandable)(row) ? (openBlock(), createElementBlock("button", {
|
|
1381
1810
|
key: 0,
|
|
1382
1811
|
type: "button",
|
|
1383
1812
|
"data-gr-datatable-expand": "",
|
|
1813
|
+
tabindex: cellControlTabindex.value,
|
|
1384
1814
|
class: normalizeClass([unref(expandButtonClass), checkboxSize.value === "xs" ? "h-5 w-5" : "h-6 w-6"]),
|
|
1385
1815
|
"aria-expanded": unref(isRowExpanded)(row),
|
|
1386
1816
|
"aria-controls": detailRowId(row),
|
|
@@ -1389,33 +1819,41 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
1389
1819
|
}, [renderSlot(_ctx.$slots, "expand-icon", {
|
|
1390
1820
|
expanded: unref(isRowExpanded)(row),
|
|
1391
1821
|
row
|
|
1392
|
-
}, () => [createVNode(unref(chevron_right_default), { class: normalizeClass([unref(expandIconClass), unref(isRowExpanded)(row) ? unref(expandIconOpenClass) : ""]) }, null, 8, ["class"])])], 10,
|
|
1822
|
+
}, () => [createVNode(unref(chevron_right_default), { class: normalizeClass([unref(expandIconClass), unref(isRowExpanded)(row) ? unref(expandIconOpenClass) : ""]) }, null, 8, ["class"])])], 10, _hoisted_25)) : createCommentVNode("", true)], 42, _hoisted_24)) : createCommentVNode("", true),
|
|
1393
1823
|
__props.selectable ? (openBlock(), createElementBlock("td", {
|
|
1394
1824
|
key: 1,
|
|
1825
|
+
ref_for: true,
|
|
1826
|
+
ref: (el) => registerCell(index, selectColumnIndex.value, el),
|
|
1395
1827
|
class: normalizeClass(["text-left", [
|
|
1396
1828
|
selectColumnClass.value,
|
|
1397
1829
|
cellClass.value,
|
|
1398
1830
|
unref(hasPinnedLeft) ? unref(columnPinnedClass) : "",
|
|
1399
1831
|
unref(hasPinnedLeft) && unref(isRowSelected)(row) ? unref(rowSelectedClass) : ""
|
|
1400
1832
|
]]),
|
|
1401
|
-
style: normalizeStyle(unref(hasPinnedLeft) ? { left: "0px" } : void 0)
|
|
1833
|
+
style: normalizeStyle(unref(hasPinnedLeft) ? { left: "0px" } : void 0),
|
|
1834
|
+
tabindex: __props.cellNavigation ? unref(grid).tabindexFor(index, selectColumnIndex.value) : void 0,
|
|
1835
|
+
onFocus: ($event) => unref(grid).setActive(index, selectColumnIndex.value)
|
|
1402
1836
|
}, [unref(isRowSelectable)(row) ? (openBlock(), createBlock(GrCheckbox_default, {
|
|
1403
1837
|
key: 0,
|
|
1404
1838
|
"data-gr-datatable-select-row": "",
|
|
1839
|
+
tabindex: cellControlTabindex.value,
|
|
1405
1840
|
"model-value": unref(isRowSelected)(row),
|
|
1406
1841
|
size: checkboxSize.value,
|
|
1407
1842
|
"aria-label": unref(t)("gr.dataTable.selectRow", "Select row"),
|
|
1408
|
-
onClick: _cache[
|
|
1843
|
+
onClick: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"])),
|
|
1409
1844
|
"onUpdate:modelValue": ($event) => unref(toggleRow)(row)
|
|
1410
1845
|
}, null, 8, [
|
|
1846
|
+
"tabindex",
|
|
1411
1847
|
"model-value",
|
|
1412
1848
|
"size",
|
|
1413
1849
|
"aria-label",
|
|
1414
1850
|
"onUpdate:modelValue"
|
|
1415
|
-
])) : createCommentVNode("", true)],
|
|
1851
|
+
])) : createCommentVNode("", true)], 46, _hoisted_26)) : createCommentVNode("", true),
|
|
1416
1852
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(orderedColumns), (col, colIndex) => {
|
|
1417
1853
|
return openBlock(), createElementBlock("td", {
|
|
1418
1854
|
key: col.key,
|
|
1855
|
+
ref_for: true,
|
|
1856
|
+
ref: (el) => registerCell(index, dataColumnIndex(colIndex), el),
|
|
1419
1857
|
class: normalizeClass([
|
|
1420
1858
|
cellClass.value,
|
|
1421
1859
|
cellAlign(col),
|
|
@@ -1425,15 +1863,17 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
1425
1863
|
style: normalizeStyle({
|
|
1426
1864
|
...columnWidthStyle(unref(widthOf)(col)),
|
|
1427
1865
|
...unref(pinnedStyleOf)(col)
|
|
1428
|
-
})
|
|
1866
|
+
}),
|
|
1867
|
+
tabindex: __props.cellNavigation ? unref(grid).tabindexFor(index, dataColumnIndex(colIndex)) : void 0,
|
|
1868
|
+
onFocus: ($event) => unref(grid).setActive(index, dataColumnIndex(colIndex))
|
|
1429
1869
|
}, [renderSlot(_ctx.$slots, `cell-${col.key}`, {
|
|
1430
1870
|
row,
|
|
1431
1871
|
index,
|
|
1432
1872
|
expanded: unref(isRowExpanded)(row),
|
|
1433
1873
|
toggleExpand: () => unref(toggleRowExpanded)(row)
|
|
1434
|
-
}, () => [createElementVNode("span", null, toDisplayString(cellValue(row, col.key)), 1)])],
|
|
1874
|
+
}, () => [createElementVNode("span", null, toDisplayString(cellValue(row, col.key)), 1)])], 46, _hoisted_27);
|
|
1435
1875
|
}), 128))
|
|
1436
|
-
], 16,
|
|
1876
|
+
], 16, _hoisted_23), unref(isRowExpanded)(row) ? (openBlock(), createElementBlock("tr", {
|
|
1437
1877
|
key: 0,
|
|
1438
1878
|
id: detailRowId(row),
|
|
1439
1879
|
"data-gr-datatable-detail": "",
|
|
@@ -1442,7 +1882,7 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
1442
1882
|
}, [createElementVNode("td", {
|
|
1443
1883
|
colspan: totalColumns.value,
|
|
1444
1884
|
class: normalizeClass([unref(detailCellClass), unref(detailPaddings)[unref(resolvedSize)]])
|
|
1445
|
-
}, [createElementVNode("div", { class: normalizeClass(unref(detailContentClass)) }, [unref(detailStateOf)(row) === "loading" ? (openBlock(), createElementBlock("div",
|
|
1885
|
+
}, [createElementVNode("div", { class: normalizeClass(unref(detailContentClass)) }, [unref(detailStateOf)(row) === "loading" ? (openBlock(), createElementBlock("div", _hoisted_30, [renderSlot(_ctx.$slots, "detail-loading", { row }, () => [createVNode(GrSkeleton_default, { count: 2 })])])) : unref(detailStateOf)(row) === "error" ? (openBlock(), createElementBlock("div", {
|
|
1446
1886
|
key: 1,
|
|
1447
1887
|
class: normalizeClass(unref(detailErrorClass)),
|
|
1448
1888
|
"data-gr-datatable-detail-error": ""
|
|
@@ -1462,16 +1902,16 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
1462
1902
|
index,
|
|
1463
1903
|
data: unref(detailDataOf)(row),
|
|
1464
1904
|
state: unref(detailStateOf)(row)
|
|
1465
|
-
}, void 0, void 0, 2)], 2)], 10,
|
|
1905
|
+
}, void 0, void 0, 2)], 2)], 10, _hoisted_29)], 10, _hoisted_28)) : createCommentVNode("", true)]);
|
|
1466
1906
|
}), 128)),
|
|
1467
|
-
__props.virtual && spacerAfter.value > 0 ? (openBlock(), createElementBlock("tr",
|
|
1907
|
+
__props.virtual && spacerAfter.value > 0 ? (openBlock(), createElementBlock("tbody", _hoisted_31, [createElementVNode("tr", _hoisted_32, [createElementVNode("td", {
|
|
1468
1908
|
colspan: totalColumns.value,
|
|
1469
1909
|
style: normalizeStyle({
|
|
1470
1910
|
height: `${spacerAfter.value}px`,
|
|
1471
1911
|
padding: "0",
|
|
1472
1912
|
border: "0"
|
|
1473
1913
|
})
|
|
1474
|
-
}, null, 12,
|
|
1914
|
+
}, null, 12, _hoisted_33)])])) : createCommentVNode("", true)
|
|
1475
1915
|
], 64))]),
|
|
1476
1916
|
_: 2
|
|
1477
1917
|
}, [_ctx.$slots.footer || hasSummary.value ? {
|
|
@@ -1505,13 +1945,13 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
|
|
|
1505
1945
|
}, [renderSlot(_ctx.$slots, `summary-${col.key}`, {
|
|
1506
1946
|
value: summaryValue(col.key),
|
|
1507
1947
|
column: col
|
|
1508
|
-
}, () => [createElementVNode("span", null, toDisplayString(summaryValue(col.key)), 1)])], 14,
|
|
1509
|
-
}), 128))], 10,
|
|
1948
|
+
}, () => [createElementVNode("span", null, toDisplayString(summaryValue(col.key)), 1)])], 14, _hoisted_35);
|
|
1949
|
+
}), 128))], 10, _hoisted_34)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "footer", {
|
|
1510
1950
|
columns: unref(orderedColumns),
|
|
1511
1951
|
totalColumns: totalColumns.value
|
|
1512
1952
|
})]),
|
|
1513
1953
|
key: "0"
|
|
1514
|
-
} : void 0]), 1040);
|
|
1954
|
+
} : void 0]), 1040, ["role", "onKeydown"]);
|
|
1515
1955
|
};
|
|
1516
1956
|
}
|
|
1517
1957
|
});
|