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