@m4l/components 3.1.8 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/export.d-l0sNRNKZ.js +1 -0
- package/@types/export.d.ts +263 -266
- package/@types/types.d-l0sNRNKZ.js +1 -0
- package/@types/types.d.ts +88 -70
- package/components/AccountPopover/AccountPopover-CU7gMvzI.js +69 -0
- package/components/AccountPopover/classes/constants-Bh4Ddb0Q.js +4 -0
- package/components/AccountPopover/classes/index-BPokei6j.js +59 -0
- package/components/AccountPopover/dictionary-BUSBiVvV.js +6 -0
- package/components/AccountPopover/index-l0sNRNKZ.js +1 -0
- package/components/AccountPopover/style-KJYhN6c4.js +7 -0
- package/components/AccountPopover/subcomponents/MyAvatar/index-B5TQqcPH.js +21 -0
- package/components/AccountPopover/subcomponents/PopOver/index-BUuhXVtS.js +200 -0
- package/components/AppBar/AppBar-DDoSggi7.js +57 -0
- package/components/AppBar/classes/constants-BMVeFXZd.js +4 -0
- package/components/AppBar/classes/index-DrzQShzd.js +33 -0
- package/components/AppBar/dictionary-DxNEDzLB.js +6 -0
- package/components/AppBar/index-l0sNRNKZ.js +1 -0
- package/components/AppBar/styles-DEP7cqpd.js +7 -0
- package/components/AppBar/tests/constants-RDOlKZ0s.js +4 -0
- package/components/AppBar/tests/utils-B28LDbSp.js +7 -0
- package/components/BaseModule/BaseModule-ut5-cA-D.js +30 -0
- package/components/BaseModule/index-l0sNRNKZ.js +1 -0
- package/components/CommonActions/classes/constants-BrkHp2Ia.js +4 -0
- package/components/CommonActions/classes/index-BnG1pLyl.js +33 -0
- package/components/CommonActions/components/ActionCancel/index-CI0Yqh5P.js +12 -0
- package/components/CommonActions/components/ActionFormCancel/index-Dkolr_FN.js +56 -0
- package/components/CommonActions/components/ActionFormIntro/index-DW0XnDza.js +33 -0
- package/components/CommonActions/components/ActionIntro/index-CCc2O0ve.js +25 -0
- package/components/CommonActions/components/ActionIntro/test/contants-Dw8KcIHV.js +4 -0
- package/components/CommonActions/components/Actions/index-B4L6Y4pL.js +24 -0
- package/components/CommonActions/components/Actions/styles-BTRPY3jS.js +14 -0
- package/components/CommonActions/dictionary-YlCVMypc.js +15 -0
- package/components/CommonActions/index-l0sNRNKZ.js +1 -0
- package/components/CommonActions/tests/constants-CoE1Qxif.js +4 -0
- package/components/CommonActions/tests/utils-cD_DQm4p.js +7 -0
- package/components/DataGrid/assets/icons/datagrid.svg +4 -4
- package/components/DataGrid/classes/constants-Dgj06XTw.js +4 -0
- package/components/DataGrid/classes/index-ugl1vhoP.js +71 -0
- package/components/DataGrid/constants-BIS3UfHs.js +8 -0
- package/components/DataGrid/contexts/DataGridContext/index-7snUVrBX.js +228 -0
- package/components/DataGrid/contexts/FilterContext/index-DgNGxy-0.js +47 -0
- package/components/DataGrid/dictionary-AjA8KM_q.js +14 -0
- package/components/DataGrid/formatters/ColumnBooleanFormatter/index-aMhUEXUt.js +26 -0
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index-Cj4z0rAl.js +22 -0
- package/components/DataGrid/formatters/ColumnDateFormatter/index-CKg8CJ6A.js +19 -0
- package/components/DataGrid/formatters/ColumnIconFormatter/index-D0TWPMAj.js +13 -0
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index-8LLfJGSu.js +23 -0
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/index-BslXGK-A.js +14 -0
- package/components/DataGrid/formatters/ColumnPointsFormatter/index-BXGW2CsK.js +10 -0
- package/components/DataGrid/formatters/ColumnPriceFormatter/index-O11tBykn.js +10 -0
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/index-BaCawLr1.js +36 -0
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index-Cq7a-jnE.js +10 -0
- package/components/DataGrid/formatters/index-l0sNRNKZ.js +1 -0
- package/components/DataGrid/hooks/useDataGrid-BKzuMtRC.js +10 -0
- package/components/DataGrid/hooks/useFilters-C-5BfOb8.js +6 -0
- package/components/DataGrid/index-BYLZs2D_.js +87 -0
- package/components/DataGrid/styles-rOw1DTul.js +13 -0
- package/components/DataGrid/subcomponents/Actions/index-DRjK2q9k.js +48 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index-CoxFMgPk.js +71 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/index-BqWQh-9Q.js +26 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index-B6LDVt_q.js +59 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/index-CyeBbxLE.js +19 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/index-2nWUDQM7.js +23 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/index-CB3e1Dot.js +260 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles-B6HR4Y1G.js +50 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index-Dzhdpkqd.js +63 -0
- package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer-CBcDkRBr.js +11 -0
- package/components/DataGrid/subcomponents/Table/hooks/useFocusRef-RLFiIJjj.js +15 -0
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows-BYcDjTMV.js +187 -0
- package/components/DataGrid/subcomponents/Table/index-BHTTWwD5.js +77 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn-CeQtGeiI.js +46 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/CheckboxFormatter-tKqOCQR4.js +27 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/CustomIcons-BhLC9sP9.js +16 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer-BZFaMZdE.js +106 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn-CSAGDW93.js +77 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/index-DcPsCY_n.js +11 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles-C0ERM6Cs.js +10 -0
- package/components/DataGrid/subcomponents/editors/TextEditor/index-BIFm8akr.js +80 -0
- package/components/DataGrid/types-12wiiAcO.js +6 -0
- package/components/DataGrid/utils/getDataGridRowsFromSet-DOYDyyxy.js +20 -0
- package/components/DragResizeWindow/DragResizeWindow-Z2CHiH4f.js +429 -0
- package/components/DragResizeWindow/DragResizeWindow.d.ts +1 -1
- package/components/DragResizeWindow/classes/index-0-6CStrp.js +18 -0
- package/components/DragResizeWindow/constants-DwokrcI4.js +6 -0
- package/components/DragResizeWindow/helpers/index-3o_XEYfS.js +40 -0
- package/components/DragResizeWindow/index-l0sNRNKZ.js +1 -0
- package/components/DragResizeWindow/styled-UWXrBRaK.js +18 -0
- package/components/DragResizeWindow/utils-DECvGPap.js +17 -0
- package/components/DynamicFilter/DynamicFilter-vZR24GvS.js +14 -0
- package/components/DynamicFilter/constants-ByqmFATV.js +31 -0
- package/components/DynamicFilter/dictionary-CNZO5wD-.js +51 -0
- package/components/DynamicFilter/helpers/formatToInitialFilters-zMnd3Z8B.js +31 -0
- package/components/DynamicFilter/helpers/formatToRowFilter-m6xHKcg4.js +18 -0
- package/components/DynamicFilter/helpers/getPurgedInitialFiltersApplied-DE8zLnRV.js +59 -0
- package/components/DynamicFilter/index-l0sNRNKZ.js +1 -0
- package/components/DynamicFilter/slots/SlotsEnum-cawFeNzx.js +34 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots-X11BZr2l.js +151 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +1 -1
- package/components/DynamicFilter/slots/index-l0sNRNKZ.js +1 -0
- package/components/DynamicFilter/store/DynamicFilterContext-CS7_IuRy.js +84 -0
- package/components/DynamicFilter/store/DynamicFilterStore-bUFXqmpr.js +171 -0
- package/components/DynamicFilter/store/useDynamicFilterStore-DD7gt64u.js +13 -0
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip-D2MLp5cX.js +28 -0
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/index-l0sNRNKZ.js +1 -0
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/useAppliedFilterChip-AS2w8Z3r.js +36 -0
- package/components/DynamicFilter/subcomponents/AppliedFilters/AppliedFilters-CWEyV8G3.js +15 -0
- package/components/DynamicFilter/subcomponents/AppliedFilters/index-l0sNRNKZ.js +1 -0
- package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters-c25Omyrn.js +15 -0
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase-C5n2TZpu.js +35 -0
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/index-l0sNRNKZ.js +1 -0
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/useDynamicFilterBase-DBbB5mOa.js +9 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/helpers-CzYmgeiA.js +77 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index-CF94dpNF.js +58 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/DataTypeComponent-DfsPn9Mq.js +16 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/helpers-B4Deuvv0.js +123 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index-B2dtTF7_.js +54 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/helpers-BtrHTHPy.js +103 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index-BFs8woiX.js +56 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/helpers-jwqBQ3NZ.js +103 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index-Cflyl1ZC.js +49 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/helpers-qx6nCnOJ.js +79 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index-CiX6SO16.js +41 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/fieldFactory-DeCMgNgI.js +25 -0
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions-DRj7Zs_9.js +43 -0
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActionsSkeleton-DHRvCHMh.js +12 -0
- package/components/DynamicFilter/subcomponents/FilterActions/index-l0sNRNKZ.js +1 -0
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions-DcZS-D-1.js +43 -0
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilter-CJsQx8h1.js +38 -0
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilterSkeleton-BV7OwUgY.js +19 -0
- package/components/DynamicFilter/subcomponents/InputFilter/index-l0sNRNKZ.js +1 -0
- package/components/DynamicFilter/subcomponents/InputFilter/useInputFilter-dcL8863x.js +140 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter-X1ufrLMU.js +64 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/index-l0sNRNKZ.js +1 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter-BVgOcmzX.js +99 -0
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields-BNeKq7zb.js +38 -0
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/index-l0sNRNKZ.js +1 -0
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/usePopoverMenuFields-CsmoUVrX.js +29 -0
- package/components/DynamicSort/constants.d.ts +12 -0
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +84 -0
- package/components/DynamicSort/slots/SlotsEnum.d.ts +30 -0
- package/components/DynamicSort/slots/index.d.ts +2 -0
- package/components/DynamicSort/types.d.ts +183 -0
- package/components/FieldLabel/FieldLabel-B85v09Pe.js +36 -0
- package/components/FieldLabel/classes/constants-dhh5xNOX.js +4 -0
- package/components/FieldLabel/classes/index-CqpbNDZs.js +31 -0
- package/components/FieldLabel/index-l0sNRNKZ.js +1 -0
- package/components/FieldLabel/styles-D7QEXOIM.js +7 -0
- package/components/FieldLabel/types.d.ts +1 -0
- package/components/GridLayout/GridLayout-CYwAPA42.js +534 -0
- package/components/GridLayout/calculateUtils-wGPJ2spi.js +71 -0
- package/components/GridLayout/classes/index-qNqBA3Jg.js +24 -0
- package/components/GridLayout/constants-BOQgOrZA.js +26 -0
- package/components/GridLayout/index-l0sNRNKZ.js +1 -0
- package/components/GridLayout/styles-BqM7s5fd.js +163 -0
- package/components/GridLayout/subcomponents/GridItem/index-B2wGJ3pz.js +398 -0
- package/components/GridLayout/subcomponents/Responsive/helper-6U-MAGmf.js +62 -0
- package/components/GridLayout/subcomponents/Responsive/index-Co4cLAS4.js +160 -0
- package/components/GridLayout/subcomponents/Responsive/responsiveUtils-Bn3nVJDm.js +144 -0
- package/components/GridLayout/subcomponents/withSizeProvider/index-DXbMA_Cf.js +71 -0
- package/components/GridLayout/utils-CF3BArf2.js +408 -0
- package/components/HelmetPage/index-CbpwSvMa.js +21 -0
- package/components/HelperText/index-DZCj76Dl.js +20 -0
- package/components/HelperText/styles-CQTg9ZuH.js +7 -0
- package/components/HelperText/utils/Clases/constant-Cikvtg7M.js +4 -0
- package/components/HelperText/utils/Clases/index-BHBSnukJ.js +34 -0
- package/components/Icon/Icon-_wceDYwV.js +35 -0
- package/components/Icon/classes/constants-BzUJxCsS.js +4 -0
- package/components/Icon/classes/index-CpBgKs2U.js +48 -0
- package/components/Icon/index-l0sNRNKZ.js +1 -0
- package/components/Icon/styles-CYoc5wsG.js +26 -0
- package/components/Icon/tests/constants-C7QTHvgZ.js +4 -0
- package/components/Icon/tests/utils-BUwmUA2N.js +7 -0
- package/components/Icon/types-l0sNRNKZ.js +1 -0
- package/components/Image/Image-BjqOt3pz.js +38 -0
- package/components/Image/classes/constant-D4zChr5r.js +4 -0
- package/components/Image/classes/index-1OpZlCW5.js +25 -0
- package/components/Image/index-l0sNRNKZ.js +1 -0
- package/components/Image/styles-BicLK1dh.js +7 -0
- package/components/Image/tests/constants-DRfnGNKj.js +4 -0
- package/components/Image/tests/utils-BCQiWwtM.js +7 -0
- package/components/Image/types-DYvT-C_T.js +49 -0
- package/components/Image/utils/getRatioValues-Cyvn3Ee3.js +19 -0
- package/components/LanguagePopover/LanguagePopover-D84zk1E6.js +148 -0
- package/components/LanguagePopover/classes/constants-Bfc3xGwi.js +4 -0
- package/components/LanguagePopover/classes/index-BK-vZgR3.js +33 -0
- package/components/LanguagePopover/index-l0sNRNKZ.js +1 -0
- package/components/LanguagePopover/styles-s7-3z7wM.js +30 -0
- package/components/LanguagePopover/tests/constants-C9mf14VM.js +4 -0
- package/components/LanguagePopover/tests/utils-Df2OFfOB.js +7 -0
- package/components/LanguagePopover/types-l0sNRNKZ.js +1 -0
- package/components/LinearProgressIndeterminate/LinearProgressIndeterminate--VicNz4N.js +28 -0
- package/components/LinearProgressIndeterminate/classes/constants-CecllKOT.js +4 -0
- package/components/LinearProgressIndeterminate/classes/index-BIhUKJSv.js +28 -0
- package/components/LinearProgressIndeterminate/index-l0sNRNKZ.js +1 -0
- package/components/LinearProgressIndeterminate/styles-mliQXZjI.js +7 -0
- package/components/LinearProgressIndeterminate/tests/constants-C9ZRibu9.js +4 -0
- package/components/LinearProgressIndeterminate/tests/utils-CEbG-cfY.js +7 -0
- package/components/Loadable/index-aNEylxCd.js +9 -0
- package/components/LoadingError/LoadingError-B3XRg-pT.js +50 -0
- package/components/LoadingError/classes/constants-BuFMGaME.js +4 -0
- package/components/LoadingError/classes/index-C_bckEjI.js +39 -0
- package/components/LoadingError/dictionary-EvQUxYRt.js +6 -0
- package/components/LoadingError/index-l0sNRNKZ.js +1 -0
- package/components/LoadingError/styles-JDmaMF_4.js +7 -0
- package/components/MFIsolationApp/MFIsolationApp-gs8L4yRC.js +123 -0
- package/components/MFIsolationApp/constants-pKuV2ytz.js +4 -0
- package/components/MFIsolationApp/index-l0sNRNKZ.js +1 -0
- package/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp-_B9NLBK_.js +55 -0
- package/components/MFIsolationApp/subcomponents/MFAuthApp/index-l0sNRNKZ.js +1 -0
- package/components/MFLoader/MFLoader-D8pXQmRc.js +153 -0
- package/components/MFLoader/classes/constants-CrKFBCVk.js +4 -0
- package/components/MFLoader/classes/index-C4jyh98a.js +26 -0
- package/components/MFLoader/dictionary-CXND9TXx.js +6 -0
- package/components/MFLoader/helper-DIBUdU2j.js +115 -0
- package/components/MFLoader/index-l0sNRNKZ.js +1 -0
- package/components/MFLoader/styles-CtS4rdXD.js +7 -0
- package/components/MFLoader/subcomponents/ProggessLoadingMF/index-D8tU4EJM.js +16 -0
- package/components/NavLink/NavLink-DdBc-kD8.js +33 -0
- package/components/NavLink/classes/constant-C5HMQmiK.js +4 -0
- package/components/NavLink/classes/index-CGAMfugg.js +23 -0
- package/components/NavLink/index-l0sNRNKZ.js +1 -0
- package/components/NavLink/styles-DL9dFk6r.js +7 -0
- package/components/NavLink/tests/constants-9o3PPR1T.js +4 -0
- package/components/NavLink/tests/utils-CHu-fVih.js +7 -0
- package/components/NoItemSelected/classes/constants-NX4P7zJx.js +4 -0
- package/components/NoItemSelected/classes/index-CGh0_XXI.js +26 -0
- package/components/NoItemSelected/dictionary-DhPDgHyg.js +12 -0
- package/components/NoItemSelected/index-M2NHb7cH.js +23 -0
- package/components/NoItemSelected/styles-BSNyzRVO.js +26 -0
- package/components/ObjectLogs/components/DetailDialog/index-D6biuT7s.js +42 -0
- package/components/ObjectLogs/components/DetailFormatter/index-CoENw787.js +32 -0
- package/components/ObjectLogs/dictionary-DwDsJzPq.js +20 -0
- package/components/ObjectLogs/index-CwW-4TZy.js +156 -0
- package/components/ObjectLogs/styles-PxnVTC5y.js +35 -0
- package/components/ObjectLogs/types.d.ts +1 -1
- package/components/PDFViewer/PDFViewer-qhATZVpK.js +30 -0
- package/components/PDFViewer/classes/constants-CLf5ENnM.js +4 -0
- package/components/PDFViewer/classes/index-CBAuCPeO.js +25 -0
- package/components/PDFViewer/index-l0sNRNKZ.js +1 -0
- package/components/PDFViewer/styles-DyV0Ma4x.js +7 -0
- package/components/PaperForm/PaperForm-DiHt7C4n.js +18 -0
- package/components/PaperForm/classes/constants-BG56eJ8L.js +4 -0
- package/components/PaperForm/classes/index-C6y8jsT8.js +33 -0
- package/components/PaperForm/components/Header-DnBLQnp4.js +19 -0
- package/components/PaperForm/styles-cMJgA-Av.js +51 -0
- package/components/Period/Period-DaRcVvl_.js +167 -0
- package/components/Period/classes/constants-CJmYGNwp.js +4 -0
- package/components/Period/classes/index-DkjGk_tK.js +53 -0
- package/components/Period/classes/index.d.ts +1 -1
- package/components/Period/dictionary-C8KmrFfD.js +13 -0
- package/components/Period/index-l0sNRNKZ.js +1 -0
- package/components/Period/styles-DFD4XOFf.js +45 -0
- package/components/Period/subcomponents/SkeletonPeriod/index-CDuo-ffk.js +12 -0
- package/components/Period/tests/constants-QkzdD2rw.js +4 -0
- package/components/Period/tests/utils-Bxi-Tv3y.js +7 -0
- package/components/Period/types-Dwobeg_U.js +9 -0
- package/components/PrintingSystem/PrintingSystem-OExztirN.js +59 -0
- package/components/PrintingSystem/classes/constants-Br6vixRY.js +4 -0
- package/components/PrintingSystem/classes/index-B2TXqpjh.js +76 -0
- package/components/PrintingSystem/index-l0sNRNKZ.js +1 -0
- package/components/PrintingSystem/styles-C_CkDcO5.js +7 -0
- package/components/PrintingSystem/subcomponents/BodyNode/index-CBZB6ZED.js +50 -0
- package/components/PrintingSystem/subcomponents/ChartNode/index-BFM6Xg0V.js +105 -0
- package/components/PrintingSystem/subcomponents/DividerNode/index-B56zhHQh.js +20 -0
- package/components/PrintingSystem/subcomponents/FooterNode/index-Nu6qOa_q.js +50 -0
- package/components/PrintingSystem/subcomponents/GridNode/index-DHSxKLLX.js +75 -0
- package/components/PrintingSystem/subcomponents/HeaderNode/index-C6__LEhO.js +50 -0
- package/components/PrintingSystem/subcomponents/ImageNode/index-B0lG8wnZ.js +29 -0
- package/components/PrintingSystem/subcomponents/PageNode/index-CtF6V__x.js +42 -0
- package/components/PrintingSystem/subcomponents/Pager/index-BJTEG0zA.js +22 -0
- package/components/PrintingSystem/subcomponents/PaperNode/index-CQ0yGxm7.js +30 -0
- package/components/PrintingSystem/subcomponents/PropertyValueNode/index-zwZA1a-x.js +48 -0
- package/components/PrintingSystem/subcomponents/QRImageNode/index-zUUTN4vG.js +33 -0
- package/components/PrintingSystem/subcomponents/SectionNode/index-dPkVEbsH.js +50 -0
- package/components/PrintingSystem/subcomponents/TextBoxNode/index-CcKnlIQM.js +24 -0
- package/components/PrintingSystem/utils/FactoryRender/index-D1eHDozv.js +54 -0
- package/components/PrintingSystem/utils/PageRender/index-CmeJqCuC.js +50 -0
- package/components/PrintingSystem/utils/getSize/index-Dxtlljfm.js +10 -0
- package/components/PropertyValue/PropertyValue-Bhg-8bDL.js +223 -0
- package/components/PropertyValue/classes/constants-s39PnPag.js +4 -0
- package/components/PropertyValue/classes/index-BHr6HAGY.js +44 -0
- package/components/PropertyValue/constants-EBZEdYQ_.js +6 -0
- package/components/PropertyValue/styles-Bw7yBmcr.js +7 -0
- package/components/ResizeableWindow/index-DYuuK8W8.js +20 -0
- package/components/ResizeableWindow/styles-CytuNlAA.js +112 -0
- package/components/ScrollBar/classes/constants-COftye4M.js +4 -0
- package/components/ScrollBar/classes/index-vfd-Uri5.js +23 -0
- package/components/ScrollBar/index-DfNXWPHm.js +17 -0
- package/components/ScrollBar/styles-DfiimGnj.js +49 -0
- package/components/ScrollToTop/index-TxORk5dB.js +12 -0
- package/components/SideBar/SideBar-CcPeSyPl.js +78 -0
- package/components/SideBar/classes/constants-CuvqF81L.js +4 -0
- package/components/SideBar/classes/index-DwK5vHib.js +131 -0
- package/components/SideBar/classes/index.d.ts +1 -1
- package/components/SideBar/constants-BRWf1smn.js +6 -0
- package/components/SideBar/context/sideBarContext/index-MO7cOTFM.js +75 -0
- package/components/SideBar/hooks/useSideBar/index-CZiP3QRh.js +6 -0
- package/components/SideBar/index-l0sNRNKZ.js +1 -0
- package/components/SideBar/styles-CfanC4Xb.js +16 -0
- package/components/SideBar/subcomponents/ContentDesktop/index-DEDTBa3D.js +12 -0
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/index-UhoigWQy.js +29 -0
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/styles-Da6-kSdo.js +10 -0
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/ContentComponent/index-MxIpbLF6.js +74 -0
- package/components/SideBar/subcomponents/ContentGroups/index-S2HkF6xA.js +55 -0
- package/components/SideBar/subcomponents/ContentGroups/styles-BejiSnJt.js +29 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/index-BwPVd-42.js +95 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/styles-_I13xqtq.js +9 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/index-BFSPWIQ2.js +29 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/ArrowIcon/styles-XF6qlczg.js +9 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/index-c8ZHSm8O.js +44 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/styles-B-bKLBgN.js +29 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/subcomponents/NavItemRootContent/index-NbDs8ek_.js +44 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/index-C8DIt_9z.js +78 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/styles-DufcL0vH.js +8 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/index-balvzY2-.js +20 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/index-CqBv7uIS.js +57 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles-BpxvDTCo.js +39 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +1 -1
- package/components/SideBar/subcomponents/ContentMobile/index-26xDb69z.js +81 -0
- package/components/SideBar/subcomponents/ContentMobile/styles-CRzFPD56.js +18 -0
- package/components/SideBar/subcomponents/ContentMobile/subcomponents/Drawer-C1SYx_3y.js +9 -0
- package/components/SideBar/tests/constants-DIIH2Sct.js +4 -0
- package/components/SideBar/tests/utils-tW-XG1xE.js +7 -0
- package/components/SplitLayout/SplitLayout-B8bP0kvQ.js +57 -0
- package/components/SplitLayout/classes/constants-C_O42A4G.js +4 -0
- package/components/SplitLayout/classes/index-Bi71dnD5.js +33 -0
- package/components/SplitLayout/styles-Cw_bnund.js +29 -0
- package/components/SplitLayout/tests/constants-w_t_rd0V.js +4 -0
- package/components/SplitLayout/tests/utils-Qs_xtytB.js +7 -0
- package/components/ToastContainer/ToastContainer-CbeZ1op9.js +35 -0
- package/components/ToastContainer/constants-BrwLWG5c.js +8 -0
- package/components/ToastContainer/helpers/toaster-DzYEKmB3.js +40 -0
- package/components/ToastContainer/icons-CuE5RTrU.js +12 -0
- package/components/ToastContainer/index-l0sNRNKZ.js +1 -0
- package/components/ToastContainer/slots/ToastContainerEnum-mpJBAxqc.js +17 -0
- package/components/ToastContainer/slots/index-l0sNRNKZ.js +1 -0
- package/components/ToastContainer/slots/toastContainerSlots-CFxsbGFM.js +62 -0
- package/components/ToastContainer/subcomponents/ToastMessage/ToastMessage-CuWJpRHm.js +58 -0
- package/components/ToastContainer/subcomponents/ToastMessage/index-l0sNRNKZ.js +1 -0
- package/components/WrapperComponent/index-BHV-CsDU.js +14 -0
- package/components/animate/AnimatedScroll/animatedScroll-B3q14b-A.js +53 -0
- package/components/animate/AnimatedScroll/index-l0sNRNKZ.js +1 -0
- package/components/animate/AnimatedScroll/styles-Ckh1Z4tM.js +43 -0
- package/components/animate/IconButtonAnimate/index-jaVqrJOf.js +40 -0
- package/components/animate/LoadingScreen/index-D_1KtCi0.js +70 -0
- package/components/animate/LoadingScreen/styles-Ca3896Rd.js +22 -0
- package/components/animate/MotionContainer/index-eartnWyO.js +34 -0
- package/components/animate/MotionLazyContainer/index-Be8osTiG.js +9 -0
- package/components/animate/PropagateLoader/index-Dmd61b9N.js +11 -0
- package/components/animate/PropagateLoader/syles-B-d-wxy-.js +16 -0
- package/components/animate/features-BbnE33u3.js +5 -0
- package/components/animate/index-l0sNRNKZ.js +1 -0
- package/components/animate/variants/bounce-DanQqHAX.js +101 -0
- package/components/animate/variants/container-Dmpr6tg5.js +22 -0
- package/components/animate/variants/fade-CAOJNn06.js +65 -0
- package/components/animate/variants/index-l0sNRNKZ.js +1 -0
- package/components/animate/variants/transition-B9W5SWTa.js +20 -0
- package/components/areas/components/AreasAdmin/classes/index-CryauVAw.js +70 -0
- package/components/areas/components/AreasAdmin/index-eNrxak8D.js +95 -0
- package/components/areas/components/AreasAdmin/styles-BkiAuWPY.js +17 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/index-Y8z944qU.js +211 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles-CScNS_dH.js +29 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/index-BJgnvkTZ.js +47 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/index-DklBPhoL.js +93 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile-BsAN3n21.js +211 -0
- package/components/areas/components/AreasAdmin/subcomponents/PanelWindowPopUp/index-DsVHcBGl.js +53 -0
- package/components/areas/components/AreasViewer/classes/index-Kuh5obMP.js +93 -0
- package/components/areas/components/AreasViewer/index-Bz_d-5Fn.js +46 -0
- package/components/areas/components/AreasViewer/styles-CThRq33E.js +124 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/index-DawSNkN1.js +28 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/index-AmBS9Uk1.js +64 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/subcomponents/ResizeHandle/index-DStAG9ZF.js +23 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/InnerForHooks/index-B0owbalS.js +30 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/PanelWindows/index-WtuGbyR0.js +99 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/index-BwqYKnS_.js +140 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/styles-Fhh_Vsf1.js +69 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Component/index-C2PLbKW-.js +13 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper-CcYCGF7x.js +66 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/index-qUlGZKEM.js +150 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/MainActions/index-BeHKYIE7.js +44 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowHeaderSkeleton/index--6bXZbbQ.js +57 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/index-BWs04HXB.js +10 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/index-B8owcxU9.js +69 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/styles-CAgHbRyV.js +26 -0
- package/components/areas/components/index-l0sNRNKZ.js +1 -0
- package/components/areas/constants-rqODZNZe.js +6 -0
- package/components/areas/contexts/AreasContext/helper-C7Cw4wso.js +220 -0
- package/components/areas/contexts/AreasContext/helper.d.ts +3 -0
- package/components/areas/contexts/AreasContext/index-CII5Xc1a.js +84 -0
- package/components/areas/contexts/AreasContext/store-BiKwIQJY.js +832 -0
- package/components/areas/contexts/DynamicMFParmsContext/index-SHbC_49A.js +13 -0
- package/components/areas/contexts/DynamicMFParmsContext/store-8_SPgo06.js +25 -0
- package/components/areas/contexts/WindowToolsMFContext/index-DkE30fhm.js +12 -0
- package/components/areas/contexts/index-l0sNRNKZ.js +1 -0
- package/components/areas/dictionary-YUsP9beq.js +36 -0
- package/components/areas/hooks/index-l0sNRNKZ.js +1 -0
- package/components/areas/hooks/useAreas/index-BSiQCHAL.js +11 -0
- package/components/areas/hooks/useDynamicMFParameters/index-CyAquEeF.js +12 -0
- package/components/areas/hooks/useSetWindowsTitle/index-l0sNRNKZ.js +1 -0
- package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle-C-wV4gzi.js +31 -0
- package/components/areas/hooks/useWindowToolsMF/index-BECQfhbC.js +10 -0
- package/components/areas/icons-CwFr-alN.js +24 -0
- package/components/areas/index-l0sNRNKZ.js +1 -0
- package/components/areas/utils/useOnClickOutside/index-B_Odny9h.js +22 -0
- package/components/commercial/AppBarCommercial/classes/constants-a6toCdwm.js +4 -0
- package/components/commercial/AppBarCommercial/classes/index-3fKT0VDA.js +21 -0
- package/components/commercial/AppBarCommercial/index-BbLE2KQv.js +11 -0
- package/components/commercial/AppBarCommercial/styles-Na-n2IN5.js +7 -0
- package/components/commercial/HamburgerMenu/HamburgerMenu-B_wv12aV.js +62 -0
- package/components/commercial/HamburgerMenu/classes/constants-CDvIZc4M.js +4 -0
- package/components/commercial/HamburgerMenu/classes/index-CHCHg7y_.js +20 -0
- package/components/commercial/HamburgerMenu/index-l0sNRNKZ.js +1 -0
- package/components/commercial/HamburgerMenu/styles-CZVKrFuY.js +7 -0
- package/components/commercial/HamburgerMenu/test/constants-RULsMuXW.js +4 -0
- package/components/commercial/HamburgerMenu/test/utils-CBm5WN6w.js +7 -0
- package/components/commercial/SectionCommercial/classes/constants-DygZ7A8l.js +4 -0
- package/components/commercial/SectionCommercial/classes/index-CiX147QD.js +29 -0
- package/components/commercial/SectionCommercial/index-A54Y957q.js +31 -0
- package/components/commercial/SectionCommercial/styles-CuINxIVl.js +8 -0
- package/components/commercial/TopBar/TopBar-CQBs7prv.js +23 -0
- package/components/commercial/TopBar/classes/constants-CyLEa28Q.js +4 -0
- package/components/commercial/TopBar/classes/index-DlgA6Hxv.js +37 -0
- package/components/commercial/TopBar/component/ConteinItem/index-CCQx14dv.js +21 -0
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/index-Bx5U_gz5.js +135 -0
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/subcomponents/ArrowIcon/index-BPMUSSow.js +19 -0
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/subcomponents/ArrowIcon/styles-XF6qlczg.js +9 -0
- package/components/commercial/TopBar/context/index-C3gQXnyy.js +24 -0
- package/components/commercial/TopBar/hook/topBarContext/index-CPVriCPX.js +6 -0
- package/components/commercial/TopBar/index-l0sNRNKZ.js +1 -0
- package/components/commercial/TopBar/style-pAcnajRT.js +7 -0
- package/components/commercial/TopBar/utils/isActive/index-Dz_LJEy8.js +13 -0
- package/components/commercial/index-l0sNRNKZ.js +1 -0
- package/components/formatters/BooleanFormatter/dictionary-2kuXB56a.js +12 -0
- package/components/formatters/BooleanFormatter/index-BzbdxBDt.js +40 -0
- package/components/formatters/ConcatenatedFormatter/index-CrK614TS.js +33 -0
- package/components/formatters/DateFormatter/index-CGcRZ8BA.js +43 -0
- package/components/formatters/FormatterRoot/index-CKgqNRGN.js +10 -0
- package/components/formatters/FormatterRoot/styles-BxglnnaF.js +7 -0
- package/components/formatters/PeriodFormatter/dictionary-BP3VKj5x.js +13 -0
- package/components/formatters/PeriodFormatter/index-D3I0SO_V.js +50 -0
- package/components/formatters/PointsFormatter/index-C7sR8iqk.js +25 -0
- package/components/formatters/PriceFormatter/index-CsvRawmc.js +35 -0
- package/components/formatters/UncertaintyFormatter/index-B9ESVEVp.js +29 -0
- package/components/formatters/classes/index-CMYKz7Wg.js +13 -0
- package/components/formatters/constants-BTQiqzvp.js +4 -0
- package/components/formatters/dictionary-Bnb5E97X.js +8 -0
- package/components/formatters/index-l0sNRNKZ.js +1 -0
- package/components/formatters/types-l0sNRNKZ.js +1 -0
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete-BvMZ5C3-.js +9 -0
- package/components/hook-form/RHFAutocomplete/classes/constant-CbsrkIJR.js +4 -0
- package/components/hook-form/RHFAutocomplete/classes/index-CyWmAbmI.js +77 -0
- package/components/hook-form/RHFAutocomplete/dictionary-C5ATeyRM.js +6 -0
- package/components/hook-form/RHFAutocomplete/index-l0sNRNKZ.js +1 -0
- package/components/hook-form/RHFAutocomplete/styles-DSo9SpWu.js +7 -0
- package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeImage/index-xTlNOvIH.js +294 -0
- package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeText/index-Cvo7OiG5.js +266 -0
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/index-Da0ufkAL.js +25 -0
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles-DQUg_XpC.js +9 -0
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/index-CLFtsqKV.js +28 -0
- package/components/hook-form/RHFAutocomplete/test/constants-DCSmDx2a.js +6 -0
- package/components/hook-form/RHFAutocomplete/test/utils-BPSzDgdt.js +7 -0
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync-J_KBBOLP.js +9 -0
- package/components/hook-form/RHFAutocompleteAsync/classes/constant-DBkc_HaL.js +4 -0
- package/components/hook-form/RHFAutocompleteAsync/classes/index-CaX9i9pu.js +26 -0
- package/components/hook-form/RHFAutocompleteAsync/dictionary-B25jINK8.js +7 -0
- package/components/hook-form/RHFAutocompleteAsync/styles-DYrJNdlP.js +34 -0
- package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeImage/index-BeSD7yHi.js +103 -0
- package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeText/index-BPm_mhP4.js +103 -0
- package/components/hook-form/RHFAutocompleteAsync/tests/constants-RQuYFbii.js +4 -0
- package/components/hook-form/RHFAutocompleteAsync/tests/utils-8Tj-i2Qq.js +7 -0
- package/components/hook-form/RHFCheckbox/RHFCheckbox-CkmkrQnp.js +89 -0
- package/components/hook-form/RHFCheckbox/classes/index-jiQEHNY0.js +44 -0
- package/components/hook-form/RHFCheckbox/styles-BjwlDvb3.js +24 -0
- package/components/hook-form/RHFCheckbox/test/constants-C1yRrJw-.js +4 -0
- package/components/hook-form/RHFCheckbox/test/utils-BVQ6B9tx.js +7 -0
- package/components/hook-form/RHFColorPicker/RFHColorPicker-coxS2j4c.js +134 -0
- package/components/hook-form/RHFColorPicker/classes/constants-CyffuaRF.js +4 -0
- package/components/hook-form/RHFColorPicker/classes/index-RGuHpPSk.js +44 -0
- package/components/hook-form/RHFColorPicker/dictionary-D6kRH-6k.js +6 -0
- package/components/hook-form/RHFColorPicker/index-l0sNRNKZ.js +1 -0
- package/components/hook-form/RHFColorPicker/styles-Drw8N4oO.js +7 -0
- package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/indext-BasQE4Nq.js +21 -0
- package/components/hook-form/RHFDateTime/RHFDateTime-B3neDyBy.js +137 -0
- package/components/hook-form/RHFDateTime/classes/constants-B6JI2ChT.js +4 -0
- package/components/hook-form/RHFDateTime/classes/index-BFb3xSvy.js +45 -0
- package/components/hook-form/RHFDateTime/index-l0sNRNKZ.js +1 -0
- package/components/hook-form/RHFDateTime/styles-LccnWyQx.js +7 -0
- package/components/hook-form/RHFDateTime/subcomponents/Skeleton/index-BvRhzX7g.js +15 -0
- package/components/hook-form/RHFDateTime/test/constants-BBsdSHVf.js +4 -0
- package/components/hook-form/RHFDateTime/test/utils-GZSfgD8t.js +7 -0
- package/components/hook-form/RHFHelperError/index-BEgm7Q1Q.js +19 -0
- package/components/hook-form/RHFMultiCheckbox/index-BARudV1A.js +34 -0
- package/components/hook-form/RHFPeriod/classes/constants-Bg-k42kR.js +4 -0
- package/components/hook-form/RHFPeriod/classes/index-BxD4YD0r.js +25 -0
- package/components/hook-form/RHFPeriod/index-Dw8JJR5H.js +77 -0
- package/components/hook-form/RHFPeriod/styles-CG-W_sFO.js +13 -0
- package/components/hook-form/RHFRadioGroup/RHFRadioGroup-B77oI0Yo.js +41 -0
- package/components/hook-form/RHFRadioGroup/formatters/OptionIconLabelFormatter/index-Dl2Tm7Io.js +16 -0
- package/components/hook-form/RHFRadioGroup/index-l0sNRNKZ.js +1 -0
- package/components/hook-form/RHFSelect-LdwRuFz-.js +29 -0
- package/components/hook-form/RHFTextField/RHFTextField-B2nYzR3E.js +170 -0
- package/components/hook-form/RHFTextField/constant-74c4jM8M.js +4 -0
- package/components/hook-form/RHFTextField/constant.d.ts +1 -0
- package/components/hook-form/RHFTextField/index-l0sNRNKZ.js +1 -0
- package/components/hook-form/RHFTextField/index.d.ts +0 -1
- package/components/hook-form/RHFTextField/slots/RHFTextFieldEnum-tmHlZYP6.js +11 -0
- package/components/hook-form/RHFTextField/slots/RHFTextFieldEnum.d.ts +7 -0
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots-CQImCPW0.js +33 -0
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +18 -0
- package/components/hook-form/RHFTextField/slots/index-l0sNRNKZ.js +1 -0
- package/components/hook-form/RHFTextField/slots/index.d.ts +2 -0
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/index-BHSW3i5M.js +29 -0
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/types.d.ts +3 -4
- package/components/hook-form/RHFTextField/types-l0sNRNKZ.js +1 -0
- package/components/hook-form/RHFTextField/types.d.ts +11 -3
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword-UB2U_py1.js +69 -0
- package/components/hook-form/RHFTextFieldPassword/classes/index-ChETGcDs.js +25 -0
- package/components/hook-form/RHFTextFieldPassword/index-l0sNRNKZ.js +1 -0
- package/components/hook-form/RHFTextFieldPassword/styles-DzaQqbnr.js +7 -0
- package/components/hook-form/RHFTextFieldPassword/tests/constants-CR4_xi7F.js +4 -0
- package/components/hook-form/RHFTextFieldPassword/tests/utils-C_pwVXk0.js +7 -0
- package/components/hook-form/RHFTextFieldPassword/types-l0sNRNKZ.js +1 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage-CdmvNkmC.js +40 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/classes/constants-i7zaDQ2G.js +4 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/classes/index-DkF66IeJ.js +57 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/styles-CR3RCTAQ.js +9 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/index-ByQEvyxe.js +148 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/styles-BsnWuH-r.js +7 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/subcomponents/Skeleton/index-BDvEWltE.js +23 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/tests/constants-F0myRw5Z.js +4 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/tests/utils-Y3oEheq4.js +7 -0
- package/components/hook-form/RHFUpload/index-l0sNRNKZ.js +1 -0
- package/components/hook-form/index-l0sNRNKZ.js +1 -0
- package/components/index-l0sNRNKZ.js +1 -0
- package/components/maps/components/Map/Map-4BNCT-Qx.js +34 -0
- package/components/maps/components/Map/classes/index-DHIpfj2O.js +110 -0
- package/components/maps/components/Map/constants-B0E5r9Iy.js +49 -0
- package/components/maps/components/Map/contexts/MapContext/MapContext-Dtqt0G-8.js +51 -0
- package/components/maps/components/Map/contexts/MapContext/helper-l0sNRNKZ.js +1 -0
- package/components/maps/components/Map/contexts/MapContext/store-Dqx2V1Ee.js +303 -0
- package/components/maps/components/Map/dictionary-BNALtcTf.js +87 -0
- package/components/maps/components/Map/external/Control/index-B9L3AeDC.js +42 -0
- package/components/maps/components/Map/external/googleMutant/index-l0sNRNKZ.js +1 -0
- package/components/maps/components/Map/external/googleMutant/index.d.ts +159 -159
- package/components/maps/components/Map/featureRenders/CommonFeatureRender/index-fXNvmjtf.js +244 -0
- package/components/maps/components/Map/featureRenders/CommonFeatureRender/subcomponents/FeatureDivIconLabel/index-CwrOev8l.js +33 -0
- package/components/maps/components/Map/featureRenders/CommonFeatureRender/subcomponents/MarkerIconLabel/index-Dd9MQGTY.js +48 -0
- package/components/maps/components/Map/featureRenders/MarkerFeatureRender/index-D-Qob8oZ.js +79 -0
- package/components/maps/components/Map/featureRenders/index-l0sNRNKZ.js +1 -0
- package/components/maps/components/Map/hooks/useAutoFocus/index-B5V3HGJv.js +78 -0
- package/components/maps/components/Map/hooks/useDisableZoomEvents/index-BCJgjs0e.js +19 -0
- package/components/maps/components/Map/hooks/useMapStore/index-Dvztupfk.js +11 -0
- package/components/maps/components/Map/icons-CSYh7uR4.js +60 -0
- package/components/maps/components/Map/index-l0sNRNKZ.js +1 -0
- package/components/maps/components/Map/pluginLayers/PolylineWithArrows/index-Dm_IBUkq.js +74 -0
- package/components/maps/components/Map/pluginLayers/index-l0sNRNKZ.js +1 -0
- package/components/maps/components/Map/styled-1N0XapIp.js +9 -0
- package/components/maps/components/Map/subcomponents/Controls/index-C5gYiv6s.js +50 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/index-C0OW47W_.js +13 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/index-D4MXI7nY.js +59 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useCheckedLayers-0DO0RtyK.js +17 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useColumns-GdkaIDsT.js +129 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useMaster-BCFOeN0s.js +52 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter-BU_aVyXe.js +40 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/index-BIJXesGZ.js +30 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index-BRRqPAf3.js +134 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/bing-54s62f3m.js +36 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/google-jSjEc0an.js +73 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/osm-j-4aemf0.js +25 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/sourceTypes/utils-_uVZP84b.js +19 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/index-B32XOyuj.js +101 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/constants-DxjFRbA_.js +34 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/helpers-FT0mJBnO.js +45 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useMeasure/index-_uxJUZCW.js +243 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/hooks/useValidation-DiK7VJqP.js +17 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/index-DNg8v3Sm.js +41 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/index-8JEW46YS.js +33 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/validations-C99vbJmF.js +6 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MyActions/index-BKEadPSt.js +26 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/ZoomButtons/index-CFr3XeB5.js +52 -0
- package/components/maps/components/Map/subcomponents/LayersContainer/index-DQItXTgO.js +33 -0
- package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/index-CfurUH1f.js +132 -0
- package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/MarkerClusterGroup/index-DbEbhjX5.js +24 -0
- package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/subcomponents/RenderByEachFeatureComponent/index-uX_7GNKr.js +14 -0
- package/components/maps/components/Map/subcomponents/TileLayers/index-3luovNVA.js +13 -0
- package/components/maps/components/Map/subcomponents/TileLayers/subcomponents/TileLayerGoogle/index-CwwgLmb1.js +100 -0
- package/components/maps/components/Map/subcomponents/TileLayers/subcomponents/TileLayerOthers/index-COI8fu28.js +35 -0
- package/components/maps/components/MapGpsTools/MapGpsTools-pEe1ocS-.js +10 -0
- package/components/maps/components/MapGpsTools/classes/index-oE5Q9Oa0.js +21 -0
- package/components/maps/components/MapGpsTools/constants-BtQVGkL6.js +71 -0
- package/components/maps/components/MapGpsTools/contexts/GpsToolsContext/index-0Z4JP4xL.js +48 -0
- package/components/maps/components/MapGpsTools/contexts/GpsToolsContext/store-B7tH76Xi.js +116 -0
- package/components/maps/components/MapGpsTools/dictionary-BZWDA1RN.js +68 -0
- package/components/maps/components/MapGpsTools/hooks/useGpsToolsStore/index-BCw7XNS9.js +11 -0
- package/components/maps/components/MapGpsTools/hooks/useLayers/index-BT80Q0Jp.js +57 -0
- package/components/maps/components/MapGpsTools/icons-BXKX8nl1.js +26 -0
- package/components/maps/components/MapGpsTools/index-l0sNRNKZ.js +1 -0
- package/components/maps/components/MapGpsTools/styles-Dcg_ULaS.js +21 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/index-CnYHbA2S.js +89 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/constants-D0Z5Tw8t.js +40 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/helpers-B76zvEoG.js +77 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useDrawing-D34tJeeW.js +214 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSubmit-CXwCD5g0.js +63 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useSumbitErrorsFocus-CwqFUFOe.js +36 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/hooks/useValidation-C96AKUO1.js +19 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/index-CGozDl-s.js +73 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/styles-G3zCBsBA.js +8 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/index-_uBDfWzl.js +52 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/ConfigData/validations-BVCUuvYM.js +11 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/index-SWq20r-w.js +140 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/validations-KeFtG-AL.js +12 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index-C9CEt334.js +61 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/index-Drbg_LwU.js +82 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/index-8T9OZmrg.js +12 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/FillData/index-Dn3oeMUV.js +49 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/StyleData/subcomponents/StrokeData/index-C2XjEnZ8.js +89 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedFeatures-BnfneLdw.js +86 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useCheckedGeofences-Bbaxt3cV.js +85 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useColumns-DpbzLwKJ.js +103 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useMaster-BJHJ8OSx.js +162 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useRowActionsGetter-Dt122uHL.js +109 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/index-BVN2qC6X.js +75 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/styles-x5ildRoz.js +8 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/subcomponents/Filter/index-C2beZTQp.js +49 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/constants-BruLA0T6.js +13 -0
- package/components/maps/index-l0sNRNKZ.js +1 -0
- package/components/maps/leaflet-geoman.d.ts +1476 -1476
- package/components/maps/utils-Ci-7-FHg.js +7 -0
- package/components/modal/ModalDialog/dictionary-78n49n4k.js +11 -0
- package/components/modal/ModalDialog/index-BNGUfoeW.js +68 -0
- package/components/modal/WindowBase/index-C4XTCJiI.js +20 -0
- package/components/modal/WindowBase/subcomponents/Header/index-Dfpzfg4s.js +29 -0
- package/components/modal/WindowConfirm/dictionary-C3q_uVRu.js +6 -0
- package/components/modal/WindowConfirm/index-BDPjUFc8.js +43 -0
- package/components/modal/WindowConfirm/subcomponents/MessageIlustration/index-D-6hv0IG.js +35 -0
- package/components/modal/classes/constants-ooYcOm9V.js +4 -0
- package/components/modal/classes/index-D0YtxRAA.js +61 -0
- package/components/modal/dictionary-BbB421K3.js +6 -0
- package/components/modal/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/Accordion/Accordion-DA0052xC.js +98 -0
- package/components/mui_extended/Accordion/classes/constants-BbNUZ90I.js +4 -0
- package/components/mui_extended/Accordion/classes/index-DHKU3hBj.js +31 -0
- package/components/mui_extended/Accordion/constants-B65mBw1m.js +4 -0
- package/components/mui_extended/Accordion/styles-DM7IoVDU.js +25 -0
- package/components/mui_extended/Avatar/Avatar-D1P1ad6r.js +29 -0
- package/components/mui_extended/Avatar/classes/constants-BpnJiik1.js +4 -0
- package/components/mui_extended/Avatar/classes/index-BrvGF8oc.js +25 -0
- package/components/mui_extended/Avatar/styles-KjEAAqUI.js +7 -0
- package/components/mui_extended/Avatar/subcomponents/SkeletonAvatar/index-Ch4vNKXO.js +20 -0
- package/components/mui_extended/Avatar/tests/constants-CghCle17.js +4 -0
- package/components/mui_extended/Avatar/tests/utils-6-9wz0A4.js +7 -0
- package/components/mui_extended/Badge/Badge-Biq_OWgS.js +20 -0
- package/components/mui_extended/Badge/classes/constants-DlnqcKYD.js +4 -0
- package/components/mui_extended/Badge/classes/index-CuU9aS6l.js +11 -0
- package/components/mui_extended/Badge/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/Badge/styles-DsJNuQOg.js +8 -0
- package/components/mui_extended/Badge/tests/constants-C3VjWMuz.js +4 -0
- package/components/mui_extended/Badge/tests/utils-DbLo5baT.js +7 -0
- package/components/mui_extended/BoxIcon/index-BUTJ2tKw.js +22 -0
- package/components/mui_extended/Breadcrumbs/components/LinkItem/index-DDA0Kdga.js +31 -0
- package/components/mui_extended/Breadcrumbs/index-DeOXctna.js +62 -0
- package/components/mui_extended/Button/Button-BdusSjEV.js +52 -0
- package/components/mui_extended/Button/classes/constants-CRpfsm9H.js +4 -0
- package/components/mui_extended/Button/classes/index-Cckcp1Au.js +49 -0
- package/components/mui_extended/Button/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/Button/styles-ByKSzMzT.js +12 -0
- package/components/mui_extended/Button/types-l0sNRNKZ.js +1 -0
- package/components/mui_extended/CheckBox/CheckBox--uPcBvng.js +45 -0
- package/components/mui_extended/CheckBox/classes/constants-Bi13LVtk.js +4 -0
- package/components/mui_extended/CheckBox/classes/index-DMl7iW7p.js +33 -0
- package/components/mui_extended/CheckBox/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/CheckBox/styles-DR7AesqE.js +7 -0
- package/components/mui_extended/CheckBox/subcomponents/Skeleton/index-BDQI6wc3.js +9 -0
- package/components/mui_extended/CircularProgress/index-Bnnti_G6.js +8 -0
- package/components/mui_extended/IconButton/IconButton-1jvQBFbH.js +87 -0
- package/components/mui_extended/IconButton/classes/constants-ChY2jKkp.js +4 -0
- package/components/mui_extended/IconButton/classes/index-BxjJGAqZ.js +45 -0
- package/components/mui_extended/IconButton/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/IconButton/styledIconButton-fAsbGoFS.js +7 -0
- package/components/mui_extended/IconButton/subcomponents/SkeletonIconButton/index-DhZR7g_D.js +16 -0
- package/components/mui_extended/ImageButton/ImageButton-BhT8454W.js +33 -0
- package/components/mui_extended/ImageButton/styles-Cfy6gS1h.js +7 -0
- package/components/mui_extended/ImageButton/tests/constants-DuWNiVqE.js +4 -0
- package/components/mui_extended/ImageButton/tests/utils-qHKbsv7D.js +7 -0
- package/components/mui_extended/ImageButton/utils/Clases/constants-mNTU_W7V.js +4 -0
- package/components/mui_extended/ImageButton/utils/Clases/index-DyJX4pUM.js +23 -0
- package/components/mui_extended/LinearProgress/index-CGgW8jq2.js +9 -0
- package/components/mui_extended/LinkWithRoute/index-BC2miUjR.js +15 -0
- package/components/mui_extended/LoadingButton/classes/constants-DoqO1UIR.js +4 -0
- package/components/mui_extended/LoadingButton/classes/index-CSSvvOFZ.js +42 -0
- package/components/mui_extended/LoadingButton/index-CXen1vSI.js +47 -0
- package/components/mui_extended/LoadingButton/styles-CD49KkUX.js +8 -0
- package/components/mui_extended/LoadingButton/tests/constants-gEsUcotE.js +4 -0
- package/components/mui_extended/LoadingButton/tests/utils-Cjb5KZsM.js +7 -0
- package/components/mui_extended/MenuActions/MenuActions-BJROCJX9.js +149 -0
- package/components/mui_extended/MenuActions/constants-BwsU9chA.js +10 -0
- package/components/mui_extended/MenuActions/dictionary-Dj_07puT.js +11 -0
- package/components/mui_extended/MenuActions/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/MenuActions/slots/MenuActionsEnum-Bu-L6eWU.js +13 -0
- package/components/mui_extended/MenuActions/slots/MenuActionsSlots-Btd5Gm5A.js +46 -0
- package/components/mui_extended/MenuActions/slots/MenuActionsSlots.d.ts +1 -1
- package/components/mui_extended/MenuActions/slots/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/Pager/classes/constants-eX3Vlvw2.js +4 -0
- package/components/mui_extended/Pager/classes/index-mA6A7WH8.js +55 -0
- package/components/mui_extended/Pager/dicctionary-3aKDfjGi.js +6 -0
- package/components/mui_extended/Pager/index-Bzaq1M3i.js +49 -0
- package/components/mui_extended/Pager/styles-Biu_TsjO.js +7 -0
- package/components/mui_extended/Pager/subcomponents/CustomTablePagination/index-CGvReF6i.js +97 -0
- package/components/mui_extended/Pager/subcomponents/PagerActions/index-BZ9_1X-L.js +68 -0
- package/components/mui_extended/Popover/Popover-B9KxhzxZ.js +49 -0
- package/components/mui_extended/Popover/classes/index-tducv5Pv.js +51 -0
- package/components/mui_extended/Popover/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/Popover/styles-C9Nthch6.js +8 -0
- package/components/mui_extended/Popover/subcomponts/ArrowIcon/index-ByQJACx6.js +61 -0
- package/components/mui_extended/Stack/Stack-C79qEBpg.js +12 -0
- package/components/mui_extended/Stack/classes/constants-B1W5MMsv.js +4 -0
- package/components/mui_extended/Stack/classes/index-QUxnFiFE.js +23 -0
- package/components/mui_extended/Stack/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/Stack/styles-D2BmWohB.js +7 -0
- package/components/mui_extended/Tab/classes/constants-BpZsYFH1.js +4 -0
- package/components/mui_extended/Tab/classes/index-FZs3FfU3.js +25 -0
- package/components/mui_extended/Tab/constant-CNNQnnU7.js +4 -0
- package/components/mui_extended/Tab/index-BwGxBuKl.js +40 -0
- package/components/mui_extended/Tab/styles-Cdbd2r-5.js +11 -0
- package/components/mui_extended/TabContent/TabContent-C3MBMFLj.js +12 -0
- package/components/mui_extended/TabContent/classes/constants-Dqgn21fC.js +4 -0
- package/components/mui_extended/TabContent/classes/index-CSWrmuDb.js +23 -0
- package/components/mui_extended/TabContent/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/TabContent/styles-CC5P___c.js +7 -0
- package/components/mui_extended/TabContext/index-fsl0KiAB.js +24 -0
- package/components/mui_extended/Tabs/Tabs-D5gZ-JCI.js +12 -0
- package/components/mui_extended/Tabs/classes/constants-osELi6DL.js +4 -0
- package/components/mui_extended/Tabs/classes/index-DKw-pkgO.js +23 -0
- package/components/mui_extended/Tabs/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/Tabs/styles-DcjVHXXO.js +7 -0
- package/components/mui_extended/ToggleButton/ToggleButton-Bcdm1gSN.js +19 -0
- package/components/mui_extended/ToggleButton/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/ToggleButton/types-l0sNRNKZ.js +1 -0
- package/components/mui_extended/ToggleIconButton/ToggleIconButton-BgjBFujZ.js +26 -0
- package/components/mui_extended/ToggleIconButton/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/ToggleIconButton/types-l0sNRNKZ.js +1 -0
- package/components/mui_extended/Tooltip/Tooltip-B88QZsCW.js +24 -0
- package/components/mui_extended/Tooltip/classes/constants-BpV-2w5k.js +4 -0
- package/components/mui_extended/Tooltip/classes/index-B5UQq91B.js +23 -0
- package/components/mui_extended/Tooltip/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/Typography/Typography-C_rG8K21.js +31 -0
- package/components/mui_extended/Typography/index-l0sNRNKZ.js +1 -0
- package/components/mui_extended/Typography/styles-CJWtZKnm.js +7 -0
- package/components/mui_extended/Typography/subcomponents/index-iHnfUTTd.js +9 -0
- package/components/mui_extended/Typography/tests/constants-a-7au6t-.js +4 -0
- package/components/mui_extended/Typography/tests/utils-gCB7BF8a.js +7 -0
- package/components/mui_extended/Typography/utils/Clases/index-BCQz-htY.js +22 -0
- package/components/mui_extended/index-l0sNRNKZ.js +1 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext-CahdzSly.js +38 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/index-l0sNRNKZ.js +1 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store-BZQUUcQl.js +133 -0
- package/components/popups/components/PopupsProvider/hooks/usePopupsStore/index-DBMhBXk-.js +11 -0
- package/components/popups/components/PopupsProvider/index-l0sNRNKZ.js +1 -0
- package/components/popups/components/PopupsViewer/PopupsViewer-GV9DK-G8.js +53 -0
- package/components/popups/components/PopupsViewer/constants-DuyD7aCn.js +4 -0
- package/components/popups/components/PopupsViewer/icons-BUujqqbu.js +7 -0
- package/components/popups/components/PopupsViewer/index-l0sNRNKZ.js +1 -0
- package/components/popups/components/PopupsViewer/slots/popupsViewerSlots-DNUP9U4r.js +46 -0
- package/components/popups/components/PopupsViewer/slots/slots-B98CiRLa.js +14 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/index-DxeapRi_.js +69 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/EditionInfo/index-DNeltbK1.js +22 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/subcomponents/Header/index-BTZoPIzY.js +53 -0
- package/components/popups/index-l0sNRNKZ.js +1 -0
- package/contexts/ModalContext/index-B7tc4o1X.js +39 -0
- package/contexts/ModalContext/types-l0sNRNKZ.js +1 -0
- package/contexts/RHFormContext/classes/constants-Bg61Kz1S.js +4 -0
- package/contexts/RHFormContext/classes/index-CXQ6_8rw.js +29 -0
- package/contexts/RHFormContext/dictionary-Dsuwh7PB.js +6 -0
- package/contexts/RHFormContext/index-DE-wmCBw.js +49 -0
- package/contexts/RHFormContext/styles-DAsa8vSY.js +7 -0
- package/contexts/index-l0sNRNKZ.js +1 -0
- package/helpers/cookies/cookies-B61qmA_e.js +45 -0
- package/helpers/cookies/cookies.d.ts +4 -0
- package/helpers/cookies/index-l0sNRNKZ.js +1 -0
- package/helpers/cookies/index.d.ts +1 -0
- package/helpers/cookies/types.d.ts +42 -0
- package/hocs/index-l0sNRNKZ.js +1 -0
- package/hocs/withToggle/index-C1_DMZD3.js +14 -0
- package/hooks/index-l0sNRNKZ.js +1 -0
- package/hooks/useFormAddEdit/dictionary-DFRDT91K.js +6 -0
- package/hooks/useFormAddEdit/index-BNAXqhmd.js +86 -0
- package/hooks/useFormFocus/index-B1F2sySJ.js +21 -0
- package/hooks/useFormReadyForUpdate/index-B3HygFCM.js +20 -0
- package/hooks/useInterval/index-CVxgquG2.js +22 -0
- package/hooks/useModal/index-CvlomTtY.js +10 -0
- package/hooks/useSizeContainer/contants-Cuu-FBTT.js +4 -0
- package/hooks/useSizeContainer/index-BrtvS2vO.js +37 -0
- package/hooks/useStateRef/index-C3P6ZK3m.js +15 -0
- package/hooks/useTab/index-CRVh_6kE.js +12 -0
- package/index.js +342 -182
- package/package.json +3 -3
- package/react-data-grid-BfYuZ6AK.js +2606 -0
- package/react-draggable-lPKOvvDX.js +1231 -0
- package/react-json-view-bhqIAaNg.js +2576 -0
- package/react-resizable-Dpx4PV2R.js +677 -0
- package/react-spinners-TpKN9lZg.js +123 -0
- package/react-splitter-layout-C-JTsNGs.js +158 -0
- package/styles/DynamicFilter.styles-D8LjTKKv.js +319 -0
- package/styles/DynamicSort.styles.d.ts +2 -0
- package/styles/MenuActions.styles-D_CcLWux.js +41 -0
- package/styles/MenuActions.styles.d.ts +1 -1
- package/styles/PopupViewer.styles-BO9qka2A.js +101 -0
- package/styles/RHFTextField.styles-DwXqdTof.js +107 -0
- package/styles/RHFTextField.styles.d.ts +2 -0
- package/styles/ToastContainer.styles-TDFVsYNR.js +202 -0
- package/test/constants_no_mock-CF-669v-.js +4 -0
- package/test/getNameDataTestId-BaBTWhBr.js +10 -0
- package/utils/capitalizeFirstLetter-l0sNRNKZ.js +1 -0
- package/utils/containerQuery--I7HldoT.js +6 -0
- package/utils/index-WXiWKKyo.js +11 -0
- package/utils/index.d.ts +1 -1
- package/vite-env.d.ts +4 -4
- package/components/hook-form/RHFTextField/classes/constants.d.ts +0 -1
- package/components/hook-form/RHFTextField/classes/index.d.ts +0 -8
- package/components/hook-form/RHFTextField/classes/types.d.ts +0 -17
- package/components/hook-form/RHFTextField/styles.d.ts +0 -3
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +0 -3
- package/components/hook-form/RHFTextField/tests/constants.d.ts +0 -3
- package/components/hook-form/RHFTextField/tests/utils.d.ts +0 -2
- package/node_modules-CQtkw0uG.js +0 -7350
- package/vendor-AfIOyqRr.js +0 -24636
|
@@ -0,0 +1,2606 @@
|
|
|
1
|
+
import { forwardRef, useRef, createContext, useContext, useState, useMemo, useImperativeHandle, useCallback, useEffect, useLayoutEffect as useLayoutEffect$1, memo } from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
4
|
+
function styleInject(css, ref) {
|
|
5
|
+
if (ref === void 0) ref = {};
|
|
6
|
+
var insertAt = ref.insertAt;
|
|
7
|
+
if (!css || typeof document === "undefined") {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
var head = document.head || document.getElementsByTagName("head")[0];
|
|
11
|
+
var style = document.createElement("style");
|
|
12
|
+
style.type = "text/css";
|
|
13
|
+
if (insertAt === "top") {
|
|
14
|
+
if (head.firstChild) {
|
|
15
|
+
head.insertBefore(style, head.firstChild);
|
|
16
|
+
} else {
|
|
17
|
+
head.appendChild(style);
|
|
18
|
+
}
|
|
19
|
+
} else {
|
|
20
|
+
head.appendChild(style);
|
|
21
|
+
}
|
|
22
|
+
if (style.styleSheet) {
|
|
23
|
+
style.styleSheet.cssText = css;
|
|
24
|
+
} else {
|
|
25
|
+
style.appendChild(document.createTextNode(css));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
var css_248z$f = ".c1wupbe700-beta13{background-color:inherit;border-block-end:1px solid var(--rdg-border-color);border-inline-end:1px solid var(--rdg-border-color);contain:size style;grid-row-start:var(--rdg-grid-row-start);outline:none;overflow:hidden;overflow:clip;padding-block:0;padding-inline:8px;position:relative;text-overflow:ellipsis;white-space:nowrap}.c1wupbe700-beta13[aria-selected=true]{outline:2px solid var(--rdg-selection-color);outline-offset:-2px}.cd0kgiy700-beta13 .c1wupbe700-beta13{contain:content}.c1730fa4700-beta13{position:sticky;z-index:1}.c9dpaye700-beta13{box-shadow:calc(2px*var(--rdg-sign)) 0 5px -2px hsla(0,0%,53%,.3)}";
|
|
29
|
+
styleInject(css_248z$f, { "insertAt": "top" });
|
|
30
|
+
const cell = "c1wupbe700-beta13";
|
|
31
|
+
const cellClassname = `rdg-cell ${cell}`;
|
|
32
|
+
const cellAutoResizeClassname = "cd0kgiy700-beta13";
|
|
33
|
+
const cellFrozen = "c1730fa4700-beta13";
|
|
34
|
+
const cellFrozenClassname = `rdg-cell-frozen ${cellFrozen}`;
|
|
35
|
+
const cellFrozenLast = "c9dpaye700-beta13";
|
|
36
|
+
const cellFrozenLastClassname = `rdg-cell-frozen-last ${cellFrozenLast}`;
|
|
37
|
+
var css_248z$e = '.r104f42s700-beta13{--rdg-color:#000;--rdg-border-color:#ddd;--rdg-summary-border-color:#aaa;--rdg-background-color:#fff;--rdg-header-background-color:#f9f9f9;--rdg-row-hover-background-color:#f5f5f5;--rdg-row-selected-background-color:#dbecfa;--row-selected-hover-background-color:#c9e3f8;--rdg-checkbox-color:#005194;--rdg-checkbox-focus-color:#61b8ff;--rdg-checkbox-disabled-border-color:#ccc;--rdg-checkbox-disabled-background-color:#ddd;--rdg-selection-color:#66afe9;--rdg-font-size:14px;content-visibility:auto;background-color:var(--rdg-background-color);block-size:350px;border:1px solid var(--rdg-border-color);box-sizing:border-box;color:var(--rdg-color);color-scheme:var(--rdg-color-scheme,light dark);contain:strict;contain:size layout style paint;display:grid;font-size:var(--rdg-font-size);overflow:auto;user-select:none}@supports not (contain:strict){.r104f42s700-beta13{position:relative;z-index:0}}.r104f42s700-beta13 *,.r104f42s700-beta13 :after,.r104f42s700-beta13 :before{box-sizing:inherit}.r104f42s700-beta13:before{content:"";grid-column:1/-1;grid-row:1/-1}.r104f42s700-beta13.rdg-dark{--rdg-color-scheme:dark;--rdg-color:#ddd;--rdg-border-color:#444;--rdg-summary-border-color:#555;--rdg-background-color:#212121;--rdg-header-background-color:#1b1b1b;--rdg-row-hover-background-color:#171717;--rdg-row-selected-background-color:#1a73bc;--row-selected-hover-background-color:#1768ab;--rdg-checkbox-color:#94cfff;--rdg-checkbox-focus-color:#c7e6ff;--rdg-checkbox-disabled-border-color:#000;--rdg-checkbox-disabled-background-color:#333}.r104f42s700-beta13.rdg-light{--rdg-color-scheme:light}@media (prefers-color-scheme:dark){.r104f42s700-beta13:not(.rdg-light){--rdg-color:#ddd;--rdg-border-color:#444;--rdg-summary-border-color:#555;--rdg-background-color:#212121;--rdg-header-background-color:#1b1b1b;--rdg-row-hover-background-color:#171717;--rdg-row-selected-background-color:#1a73bc;--row-selected-hover-background-color:#1768ab;--rdg-checkbox-color:#94cfff;--rdg-checkbox-focus-color:#c7e6ff;--rdg-checkbox-disabled-border-color:#000;--rdg-checkbox-disabled-background-color:#333}}.v7ly7s700-beta13.r1otpg64700-beta13{cursor:move}.fc4f4zb700-beta13{grid-column:1/-1;pointer-events:none;z-index:4}';
|
|
38
|
+
styleInject(css_248z$e, { "insertAt": "top" });
|
|
39
|
+
const root = "r104f42s700-beta13";
|
|
40
|
+
const rootClassname = `rdg ${root}`;
|
|
41
|
+
const viewportDragging = "v7ly7s700-beta13";
|
|
42
|
+
const viewportDraggingClassname = `rdg-viewport-dragging ${viewportDragging}`;
|
|
43
|
+
const focusSinkClassname = "fc4f4zb700-beta13";
|
|
44
|
+
var css_248z$d = '.r1otpg64700-beta13{background-color:var(--rdg-background-color);display:contents;line-height:var(--rdg-row-height)}.r1otpg64700-beta13:hover{background-color:var(--rdg-row-hover-background-color)}.r1otpg64700-beta13[aria-selected=true]{background-color:var(--rdg-row-selected-background-color)}.r1otpg64700-beta13[aria-selected=true]:hover{background-color:var(--row-selected-hover-background-color)}.rel5gk2700-beta13{outline:2px solid var(--rdg-selection-color);outline-offset:-2px}.r1qymf1z700-beta13:before{border-inline-start:2px solid var(--rdg-selection-color);content:"";display:inline-block;height:100%;inset-inline-start:0;position:sticky}';
|
|
45
|
+
styleInject(css_248z$d, { "insertAt": "top" });
|
|
46
|
+
const row = "r1otpg64700-beta13";
|
|
47
|
+
const rowClassname = `rdg-row ${row}`;
|
|
48
|
+
const rowSelected = "rel5gk2700-beta13";
|
|
49
|
+
const rowSelectedClassname = `rdg-row-selected`;
|
|
50
|
+
const rowSelectedWithFrozenCell = "r1qymf1z700-beta13";
|
|
51
|
+
var css_248z$c = '.cd9l4jz700-beta13{align-items:center;cursor:pointer;display:flex;inset:0;justify-content:center;margin-inline-end:1px;position:absolute}.c1noyk41700-beta13{all:unset}.cdwjxv8700-beta13{background-color:var(--rdg-background-color);block-size:20px;border:2px solid var(--rdg-border-color);content:"";inline-size:20px}.c1noyk41700-beta13:checked+.cdwjxv8700-beta13{background-color:var(--rdg-checkbox-color);outline:4px solid var(--rdg-background-color);outline-offset:-6px}.c1noyk41700-beta13:focus+.cdwjxv8700-beta13{border-color:var(--rdg-checkbox-focus-color)}.cca4mwn700-beta13{cursor:default}.cca4mwn700-beta13 .cdwjxv8700-beta13{background-color:var(--rdg-checkbox-disabled-background-color);border-color:var(--rdg-checkbox-disabled-border-color)}';
|
|
52
|
+
styleInject(css_248z$c, { "insertAt": "top" });
|
|
53
|
+
const checkboxLabel = "cd9l4jz700-beta13";
|
|
54
|
+
const checkboxLabelClassname = `rdg-checkbox-label ${checkboxLabel}`;
|
|
55
|
+
const checkboxInput = "c1noyk41700-beta13";
|
|
56
|
+
const checkboxInputClassname = `rdg-checkbox-input ${checkboxInput}`;
|
|
57
|
+
const checkbox = "cdwjxv8700-beta13";
|
|
58
|
+
const checkboxClassname = `rdg-checkbox ${checkbox}`;
|
|
59
|
+
const checkboxLabelDisabled = "cca4mwn700-beta13";
|
|
60
|
+
const checkboxLabelDisabledClassname = `rdg-checkbox-label-disabled ${checkboxLabelDisabled}`;
|
|
61
|
+
const CheckboxFormatter = /* @__PURE__ */ forwardRef(function CheckboxFormatter2({
|
|
62
|
+
onChange,
|
|
63
|
+
...props
|
|
64
|
+
}, ref) {
|
|
65
|
+
function handleChange(e) {
|
|
66
|
+
onChange(e.target.checked, e.nativeEvent.shiftKey);
|
|
67
|
+
}
|
|
68
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
69
|
+
className: clsx(checkboxLabelClassname, props.disabled && checkboxLabelDisabledClassname),
|
|
70
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
71
|
+
type: "checkbox",
|
|
72
|
+
ref,
|
|
73
|
+
...props,
|
|
74
|
+
className: checkboxInputClassname,
|
|
75
|
+
onChange: handleChange
|
|
76
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
77
|
+
className: checkboxClassname
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
const useLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect$1;
|
|
82
|
+
function useFocusRef(isSelected) {
|
|
83
|
+
const ref = useRef(null);
|
|
84
|
+
useLayoutEffect(() => {
|
|
85
|
+
if (!isSelected) return;
|
|
86
|
+
ref.current?.focus({
|
|
87
|
+
preventScroll: true
|
|
88
|
+
});
|
|
89
|
+
}, [isSelected]);
|
|
90
|
+
return {
|
|
91
|
+
ref,
|
|
92
|
+
tabIndex: isSelected ? 0 : -1
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
const DataGridDefaultComponentsContext = /* @__PURE__ */ createContext(void 0);
|
|
96
|
+
const DataGridDefaultComponentsProvider = DataGridDefaultComponentsContext.Provider;
|
|
97
|
+
function useDefaultComponents() {
|
|
98
|
+
return useContext(DataGridDefaultComponentsContext);
|
|
99
|
+
}
|
|
100
|
+
function SelectCellFormatter({
|
|
101
|
+
value,
|
|
102
|
+
isCellSelected,
|
|
103
|
+
disabled,
|
|
104
|
+
onChange,
|
|
105
|
+
"aria-label": ariaLabel,
|
|
106
|
+
"aria-labelledby": ariaLabelledBy
|
|
107
|
+
}) {
|
|
108
|
+
const {
|
|
109
|
+
ref,
|
|
110
|
+
tabIndex
|
|
111
|
+
} = useFocusRef(isCellSelected);
|
|
112
|
+
const Formatter = useDefaultComponents().checkboxFormatter;
|
|
113
|
+
return /* @__PURE__ */ jsx(Formatter, {
|
|
114
|
+
"aria-label": ariaLabel,
|
|
115
|
+
"aria-labelledby": ariaLabelledBy,
|
|
116
|
+
ref,
|
|
117
|
+
tabIndex,
|
|
118
|
+
disabled,
|
|
119
|
+
checked: value,
|
|
120
|
+
onChange
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function ValueFormatter(props) {
|
|
124
|
+
try {
|
|
125
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
126
|
+
children: props.row[props.column.key]
|
|
127
|
+
});
|
|
128
|
+
} catch {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
var css_248z$b = ".gch972y700-beta13{outline:none}.cz2qf0d700-beta13{stroke:currentColor;stroke-width:1.5px;fill:transparent;margin-inline-start:4px;vertical-align:middle}.cz2qf0d700-beta13>path{transition:d .1s}";
|
|
133
|
+
styleInject(css_248z$b, { "insertAt": "top" });
|
|
134
|
+
const groupCellContent = "gch972y700-beta13";
|
|
135
|
+
const groupCellContentClassname = `rdg-group-cell-content ${groupCellContent}`;
|
|
136
|
+
const caret = "cz2qf0d700-beta13";
|
|
137
|
+
const caretClassname = `rdg-caret ${caret}`;
|
|
138
|
+
function ToggleGroupFormatter({
|
|
139
|
+
groupKey,
|
|
140
|
+
isExpanded,
|
|
141
|
+
isCellSelected,
|
|
142
|
+
toggleGroup
|
|
143
|
+
}) {
|
|
144
|
+
const {
|
|
145
|
+
ref,
|
|
146
|
+
tabIndex
|
|
147
|
+
} = useFocusRef(isCellSelected);
|
|
148
|
+
function handleKeyDown({
|
|
149
|
+
key
|
|
150
|
+
}) {
|
|
151
|
+
if (key === "Enter") {
|
|
152
|
+
toggleGroup();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const d = isExpanded ? "M1 1 L 7 7 L 13 1" : "M1 7 L 7 1 L 13 7";
|
|
156
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
157
|
+
ref,
|
|
158
|
+
className: groupCellContentClassname,
|
|
159
|
+
tabIndex,
|
|
160
|
+
onKeyDown: handleKeyDown,
|
|
161
|
+
children: [groupKey, /* @__PURE__ */ jsx("svg", {
|
|
162
|
+
viewBox: "0 0 14 8",
|
|
163
|
+
width: "14",
|
|
164
|
+
height: "8",
|
|
165
|
+
className: caretClassname,
|
|
166
|
+
"aria-hidden": true,
|
|
167
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
168
|
+
d
|
|
169
|
+
})
|
|
170
|
+
})]
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
const RowSelectionContext = /* @__PURE__ */ createContext(void 0);
|
|
174
|
+
const RowSelectionProvider = RowSelectionContext.Provider;
|
|
175
|
+
const RowSelectionChangeContext = /* @__PURE__ */ createContext(void 0);
|
|
176
|
+
const RowSelectionChangeProvider = RowSelectionChangeContext.Provider;
|
|
177
|
+
function useRowSelection() {
|
|
178
|
+
const rowSelectionContext = useContext(RowSelectionContext);
|
|
179
|
+
const rowSelectionChangeContext = useContext(RowSelectionChangeContext);
|
|
180
|
+
if (rowSelectionContext === void 0 || rowSelectionChangeContext === void 0) {
|
|
181
|
+
throw new Error("useRowSelection must be used within DataGrid cells");
|
|
182
|
+
}
|
|
183
|
+
return [rowSelectionContext, rowSelectionChangeContext];
|
|
184
|
+
}
|
|
185
|
+
const SELECT_COLUMN_KEY = "select-row";
|
|
186
|
+
function getColSpan(column, lastFrozenColumnIndex, args) {
|
|
187
|
+
const colSpan = typeof column.colSpan === "function" ? column.colSpan(args) : 1;
|
|
188
|
+
if (Number.isInteger(colSpan) && colSpan > 1 && (!column.frozen || column.idx + colSpan - 1 <= lastFrozenColumnIndex)) {
|
|
189
|
+
return colSpan;
|
|
190
|
+
}
|
|
191
|
+
return void 0;
|
|
192
|
+
}
|
|
193
|
+
function scrollIntoView(element) {
|
|
194
|
+
element?.scrollIntoView({
|
|
195
|
+
inline: "nearest",
|
|
196
|
+
block: "nearest"
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
const nonInputKeys = /* @__PURE__ */ new Set(["Unidentified", "Alt", "AltGraph", "CapsLock", "Control", "Fn", "FnLock", "Meta", "NumLock", "ScrollLock", "Shift", "Tab", "ArrowDown", "ArrowLeft", "ArrowRight", "ArrowUp", "End", "Home", "PageDown", "PageUp", "Insert", "ContextMenu", "Escape", "Pause", "Play", "PrintScreen", "F1", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12"]);
|
|
200
|
+
function isCtrlKeyHeldDown(e) {
|
|
201
|
+
return (e.ctrlKey || e.metaKey) && e.key !== "Control";
|
|
202
|
+
}
|
|
203
|
+
function isDefaultCellInput(event) {
|
|
204
|
+
return !nonInputKeys.has(event.key);
|
|
205
|
+
}
|
|
206
|
+
function onEditorNavigation({
|
|
207
|
+
key,
|
|
208
|
+
target
|
|
209
|
+
}) {
|
|
210
|
+
if (key === "Tab" && (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement || target instanceof HTMLSelectElement)) {
|
|
211
|
+
return target.matches(".rdg-editor-container > :only-child, .rdg-editor-container > label:only-child > :only-child");
|
|
212
|
+
}
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
function isSelectedCellEditable({
|
|
216
|
+
selectedPosition,
|
|
217
|
+
columns,
|
|
218
|
+
rows,
|
|
219
|
+
isGroupRow
|
|
220
|
+
}) {
|
|
221
|
+
const column = columns[selectedPosition.idx];
|
|
222
|
+
const row2 = rows[selectedPosition.rowIdx];
|
|
223
|
+
return !isGroupRow(row2) && isCellEditable(column, row2);
|
|
224
|
+
}
|
|
225
|
+
function isCellEditable(column, row2) {
|
|
226
|
+
return column.editor != null && !column.rowGroup && (typeof column.editable === "function" ? column.editable(row2) : column.editable) !== false;
|
|
227
|
+
}
|
|
228
|
+
function getSelectedCellColSpan({
|
|
229
|
+
rows,
|
|
230
|
+
summaryRows,
|
|
231
|
+
rowIdx,
|
|
232
|
+
lastFrozenColumnIndex,
|
|
233
|
+
column,
|
|
234
|
+
isGroupRow
|
|
235
|
+
}) {
|
|
236
|
+
if (rowIdx === -1) {
|
|
237
|
+
return getColSpan(column, lastFrozenColumnIndex, {
|
|
238
|
+
type: "HEADER"
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
if (rowIdx >= 0 && rowIdx < rows.length) {
|
|
242
|
+
const row2 = rows[rowIdx];
|
|
243
|
+
if (!isGroupRow(row2)) {
|
|
244
|
+
return getColSpan(column, lastFrozenColumnIndex, {
|
|
245
|
+
type: "ROW",
|
|
246
|
+
row: row2
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
return void 0;
|
|
250
|
+
}
|
|
251
|
+
if (summaryRows) {
|
|
252
|
+
return getColSpan(column, lastFrozenColumnIndex, {
|
|
253
|
+
type: "SUMMARY",
|
|
254
|
+
row: summaryRows[rowIdx - rows.length]
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
return void 0;
|
|
258
|
+
}
|
|
259
|
+
function getNextSelectedCellPosition({
|
|
260
|
+
cellNavigationMode,
|
|
261
|
+
columns,
|
|
262
|
+
colSpanColumns,
|
|
263
|
+
rows,
|
|
264
|
+
summaryRows,
|
|
265
|
+
minRowIdx,
|
|
266
|
+
maxRowIdx,
|
|
267
|
+
currentPosition: {
|
|
268
|
+
idx: currentIdx
|
|
269
|
+
},
|
|
270
|
+
nextPosition,
|
|
271
|
+
lastFrozenColumnIndex,
|
|
272
|
+
isCellWithinBounds,
|
|
273
|
+
isGroupRow
|
|
274
|
+
}) {
|
|
275
|
+
let {
|
|
276
|
+
idx: nextIdx,
|
|
277
|
+
rowIdx: nextRowIdx
|
|
278
|
+
} = nextPosition;
|
|
279
|
+
const setColSpan = (moveRight) => {
|
|
280
|
+
if (nextRowIdx >= 0 && nextRowIdx < rows.length) {
|
|
281
|
+
const row2 = rows[nextRowIdx];
|
|
282
|
+
if (isGroupRow(row2)) return;
|
|
283
|
+
}
|
|
284
|
+
for (const column of colSpanColumns) {
|
|
285
|
+
const colIdx = column.idx;
|
|
286
|
+
if (colIdx > nextIdx) break;
|
|
287
|
+
const colSpan = getSelectedCellColSpan({
|
|
288
|
+
rows,
|
|
289
|
+
summaryRows,
|
|
290
|
+
rowIdx: nextRowIdx,
|
|
291
|
+
lastFrozenColumnIndex,
|
|
292
|
+
column,
|
|
293
|
+
isGroupRow
|
|
294
|
+
});
|
|
295
|
+
if (colSpan && nextIdx > colIdx && nextIdx < colSpan + colIdx) {
|
|
296
|
+
nextIdx = colIdx + (moveRight ? colSpan : 0);
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
if (isCellWithinBounds(nextPosition)) {
|
|
302
|
+
setColSpan(nextIdx - currentIdx > 0);
|
|
303
|
+
}
|
|
304
|
+
if (cellNavigationMode !== "NONE") {
|
|
305
|
+
const columnsCount = columns.length;
|
|
306
|
+
const isAfterLastColumn = nextIdx === columnsCount;
|
|
307
|
+
const isBeforeFirstColumn = nextIdx === -1;
|
|
308
|
+
if (isAfterLastColumn) {
|
|
309
|
+
if (cellNavigationMode === "CHANGE_ROW") {
|
|
310
|
+
const isLastRow = nextRowIdx === maxRowIdx;
|
|
311
|
+
if (!isLastRow) {
|
|
312
|
+
nextIdx = 0;
|
|
313
|
+
nextRowIdx += 1;
|
|
314
|
+
}
|
|
315
|
+
} else {
|
|
316
|
+
nextIdx = 0;
|
|
317
|
+
}
|
|
318
|
+
} else if (isBeforeFirstColumn) {
|
|
319
|
+
if (cellNavigationMode === "CHANGE_ROW") {
|
|
320
|
+
const isFirstRow = nextRowIdx === minRowIdx;
|
|
321
|
+
if (!isFirstRow) {
|
|
322
|
+
nextRowIdx -= 1;
|
|
323
|
+
nextIdx = columnsCount - 1;
|
|
324
|
+
}
|
|
325
|
+
} else {
|
|
326
|
+
nextIdx = columnsCount - 1;
|
|
327
|
+
}
|
|
328
|
+
setColSpan(false);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return {
|
|
332
|
+
idx: nextIdx,
|
|
333
|
+
rowIdx: nextRowIdx
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
function canExitGrid({
|
|
337
|
+
cellNavigationMode,
|
|
338
|
+
maxColIdx,
|
|
339
|
+
minRowIdx,
|
|
340
|
+
maxRowIdx,
|
|
341
|
+
selectedPosition: {
|
|
342
|
+
rowIdx,
|
|
343
|
+
idx
|
|
344
|
+
},
|
|
345
|
+
shiftKey
|
|
346
|
+
}) {
|
|
347
|
+
if (cellNavigationMode === "NONE" || cellNavigationMode === "CHANGE_ROW") {
|
|
348
|
+
const atLastCellInRow = idx === maxColIdx;
|
|
349
|
+
const atFirstCellInRow = idx === 0;
|
|
350
|
+
const atLastRow = rowIdx === maxRowIdx;
|
|
351
|
+
const atFirstRow = rowIdx === minRowIdx;
|
|
352
|
+
return shiftKey ? atFirstCellInRow && atFirstRow : atLastCellInRow && atLastRow;
|
|
353
|
+
}
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
function getRowStyle(rowIdx, height) {
|
|
357
|
+
if (height !== void 0) {
|
|
358
|
+
return {
|
|
359
|
+
"--rdg-grid-row-start": rowIdx,
|
|
360
|
+
"--rdg-row-height": `${height}px`
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
return {
|
|
364
|
+
"--rdg-grid-row-start": rowIdx
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
function getCellStyle(column, colSpan) {
|
|
368
|
+
return {
|
|
369
|
+
gridColumnStart: column.idx + 1,
|
|
370
|
+
gridColumnEnd: colSpan !== void 0 ? `span ${colSpan}` : void 0,
|
|
371
|
+
insetInlineStart: column.frozen ? `var(--rdg-frozen-left-${column.idx})` : void 0
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
function getCellClassname(column, ...extraClasses) {
|
|
375
|
+
return clsx(cellClassname, ...extraClasses, column.frozen && cellFrozenClassname, column.isLastFrozenColumn && cellFrozenLastClassname);
|
|
376
|
+
}
|
|
377
|
+
const {
|
|
378
|
+
min,
|
|
379
|
+
max,
|
|
380
|
+
round,
|
|
381
|
+
floor,
|
|
382
|
+
sign,
|
|
383
|
+
abs,
|
|
384
|
+
ceil
|
|
385
|
+
} = Math;
|
|
386
|
+
function assertIsValidKeyGetter(keyGetter) {
|
|
387
|
+
if (typeof keyGetter !== "function") {
|
|
388
|
+
throw new Error("Please specify the rowKeyGetter prop to use selection");
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
function clampColumnWidth(width, {
|
|
392
|
+
minWidth,
|
|
393
|
+
maxWidth
|
|
394
|
+
}) {
|
|
395
|
+
width = max(width, minWidth);
|
|
396
|
+
if (typeof maxWidth === "number" && maxWidth >= minWidth) {
|
|
397
|
+
return min(width, maxWidth);
|
|
398
|
+
}
|
|
399
|
+
return width;
|
|
400
|
+
}
|
|
401
|
+
function useCalculatedColumns({
|
|
402
|
+
rawColumns,
|
|
403
|
+
columnWidths,
|
|
404
|
+
viewportWidth,
|
|
405
|
+
scrollLeft,
|
|
406
|
+
defaultColumnOptions,
|
|
407
|
+
rawGroupBy,
|
|
408
|
+
enableVirtualization
|
|
409
|
+
}) {
|
|
410
|
+
const defaultWidth = defaultColumnOptions?.width;
|
|
411
|
+
const defaultMinWidth = defaultColumnOptions?.minWidth ?? 80;
|
|
412
|
+
const defaultMaxWidth = defaultColumnOptions?.maxWidth;
|
|
413
|
+
const defaultFormatter = defaultColumnOptions?.formatter ?? ValueFormatter;
|
|
414
|
+
const defaultSortable = defaultColumnOptions?.sortable ?? false;
|
|
415
|
+
const defaultResizable = defaultColumnOptions?.resizable ?? false;
|
|
416
|
+
const {
|
|
417
|
+
columns,
|
|
418
|
+
colSpanColumns,
|
|
419
|
+
lastFrozenColumnIndex,
|
|
420
|
+
groupBy
|
|
421
|
+
} = useMemo(() => {
|
|
422
|
+
const groupBy2 = [];
|
|
423
|
+
let lastFrozenColumnIndex2 = -1;
|
|
424
|
+
const columns2 = rawColumns.map((rawColumn) => {
|
|
425
|
+
const rowGroup = rawGroupBy?.includes(rawColumn.key) ?? false;
|
|
426
|
+
const frozen = rowGroup || rawColumn.frozen || false;
|
|
427
|
+
const column = {
|
|
428
|
+
...rawColumn,
|
|
429
|
+
idx: 0,
|
|
430
|
+
frozen,
|
|
431
|
+
isLastFrozenColumn: false,
|
|
432
|
+
rowGroup,
|
|
433
|
+
width: rawColumn.width ?? defaultWidth,
|
|
434
|
+
minWidth: rawColumn.minWidth ?? defaultMinWidth,
|
|
435
|
+
maxWidth: rawColumn.maxWidth ?? defaultMaxWidth,
|
|
436
|
+
sortable: rawColumn.sortable ?? defaultSortable,
|
|
437
|
+
resizable: rawColumn.resizable ?? defaultResizable,
|
|
438
|
+
formatter: rawColumn.formatter ?? defaultFormatter
|
|
439
|
+
};
|
|
440
|
+
if (rowGroup) {
|
|
441
|
+
column.groupFormatter ?? (column.groupFormatter = ToggleGroupFormatter);
|
|
442
|
+
}
|
|
443
|
+
if (frozen) {
|
|
444
|
+
lastFrozenColumnIndex2++;
|
|
445
|
+
}
|
|
446
|
+
return column;
|
|
447
|
+
});
|
|
448
|
+
columns2.sort(({
|
|
449
|
+
key: aKey,
|
|
450
|
+
frozen: frozenA
|
|
451
|
+
}, {
|
|
452
|
+
key: bKey,
|
|
453
|
+
frozen: frozenB
|
|
454
|
+
}) => {
|
|
455
|
+
if (aKey === SELECT_COLUMN_KEY) return -1;
|
|
456
|
+
if (bKey === SELECT_COLUMN_KEY) return 1;
|
|
457
|
+
if (rawGroupBy?.includes(aKey)) {
|
|
458
|
+
if (rawGroupBy.includes(bKey)) {
|
|
459
|
+
return rawGroupBy.indexOf(aKey) - rawGroupBy.indexOf(bKey);
|
|
460
|
+
}
|
|
461
|
+
return -1;
|
|
462
|
+
}
|
|
463
|
+
if (rawGroupBy?.includes(bKey)) return 1;
|
|
464
|
+
if (frozenA) {
|
|
465
|
+
if (frozenB) return 0;
|
|
466
|
+
return -1;
|
|
467
|
+
}
|
|
468
|
+
if (frozenB) return 1;
|
|
469
|
+
return 0;
|
|
470
|
+
});
|
|
471
|
+
const colSpanColumns2 = [];
|
|
472
|
+
columns2.forEach((column, idx) => {
|
|
473
|
+
column.idx = idx;
|
|
474
|
+
if (column.rowGroup) {
|
|
475
|
+
groupBy2.push(column.key);
|
|
476
|
+
}
|
|
477
|
+
if (column.colSpan != null) {
|
|
478
|
+
colSpanColumns2.push(column);
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
if (lastFrozenColumnIndex2 !== -1) {
|
|
482
|
+
columns2[lastFrozenColumnIndex2].isLastFrozenColumn = true;
|
|
483
|
+
}
|
|
484
|
+
return {
|
|
485
|
+
columns: columns2,
|
|
486
|
+
colSpanColumns: colSpanColumns2,
|
|
487
|
+
lastFrozenColumnIndex: lastFrozenColumnIndex2,
|
|
488
|
+
groupBy: groupBy2
|
|
489
|
+
};
|
|
490
|
+
}, [rawColumns, defaultWidth, defaultMinWidth, defaultMaxWidth, defaultFormatter, defaultResizable, defaultSortable, rawGroupBy]);
|
|
491
|
+
const {
|
|
492
|
+
layoutCssVars,
|
|
493
|
+
totalFrozenColumnWidth,
|
|
494
|
+
columnMetrics
|
|
495
|
+
} = useMemo(() => {
|
|
496
|
+
const columnMetrics2 = /* @__PURE__ */ new Map();
|
|
497
|
+
let left = 0;
|
|
498
|
+
let totalFrozenColumnWidth2 = 0;
|
|
499
|
+
let templateColumns = "";
|
|
500
|
+
let allocatedWidth = 0;
|
|
501
|
+
let unassignedColumnsCount = 0;
|
|
502
|
+
for (const column of columns) {
|
|
503
|
+
let width = getSpecifiedWidth(column, columnWidths, viewportWidth);
|
|
504
|
+
if (width === void 0) {
|
|
505
|
+
unassignedColumnsCount++;
|
|
506
|
+
} else {
|
|
507
|
+
width = clampColumnWidth(width, column);
|
|
508
|
+
allocatedWidth += width;
|
|
509
|
+
columnMetrics2.set(column, {
|
|
510
|
+
width,
|
|
511
|
+
left: 0
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
for (const column of columns) {
|
|
516
|
+
let width;
|
|
517
|
+
if (columnMetrics2.has(column)) {
|
|
518
|
+
const columnMetric = columnMetrics2.get(column);
|
|
519
|
+
columnMetric.left = left;
|
|
520
|
+
({
|
|
521
|
+
width
|
|
522
|
+
} = columnMetric);
|
|
523
|
+
} else {
|
|
524
|
+
const unallocatedWidth = viewportWidth - allocatedWidth;
|
|
525
|
+
const unallocatedColumnWidth = round(unallocatedWidth / unassignedColumnsCount);
|
|
526
|
+
width = clampColumnWidth(unallocatedColumnWidth, column);
|
|
527
|
+
allocatedWidth += width;
|
|
528
|
+
unassignedColumnsCount--;
|
|
529
|
+
columnMetrics2.set(column, {
|
|
530
|
+
width,
|
|
531
|
+
left
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
left += width;
|
|
535
|
+
templateColumns += `${width}px `;
|
|
536
|
+
}
|
|
537
|
+
if (lastFrozenColumnIndex !== -1) {
|
|
538
|
+
const columnMetric = columnMetrics2.get(columns[lastFrozenColumnIndex]);
|
|
539
|
+
totalFrozenColumnWidth2 = columnMetric.left + columnMetric.width;
|
|
540
|
+
}
|
|
541
|
+
const layoutCssVars2 = {
|
|
542
|
+
gridTemplateColumns: templateColumns
|
|
543
|
+
};
|
|
544
|
+
for (let i = 0; i <= lastFrozenColumnIndex; i++) {
|
|
545
|
+
const column = columns[i];
|
|
546
|
+
layoutCssVars2[`--rdg-frozen-left-${column.idx}`] = `${columnMetrics2.get(column).left}px`;
|
|
547
|
+
}
|
|
548
|
+
return {
|
|
549
|
+
layoutCssVars: layoutCssVars2,
|
|
550
|
+
totalFrozenColumnWidth: totalFrozenColumnWidth2,
|
|
551
|
+
columnMetrics: columnMetrics2
|
|
552
|
+
};
|
|
553
|
+
}, [columnWidths, columns, viewportWidth, lastFrozenColumnIndex]);
|
|
554
|
+
const [colOverscanStartIdx, colOverscanEndIdx] = useMemo(() => {
|
|
555
|
+
if (!enableVirtualization) {
|
|
556
|
+
return [0, columns.length - 1];
|
|
557
|
+
}
|
|
558
|
+
const viewportLeft = scrollLeft + totalFrozenColumnWidth;
|
|
559
|
+
const viewportRight = scrollLeft + viewportWidth;
|
|
560
|
+
const lastColIdx = columns.length - 1;
|
|
561
|
+
const firstUnfrozenColumnIdx = min(lastFrozenColumnIndex + 1, lastColIdx);
|
|
562
|
+
if (viewportLeft >= viewportRight) {
|
|
563
|
+
return [firstUnfrozenColumnIdx, firstUnfrozenColumnIdx];
|
|
564
|
+
}
|
|
565
|
+
let colVisibleStartIdx = firstUnfrozenColumnIdx;
|
|
566
|
+
while (colVisibleStartIdx < lastColIdx) {
|
|
567
|
+
const {
|
|
568
|
+
left,
|
|
569
|
+
width
|
|
570
|
+
} = columnMetrics.get(columns[colVisibleStartIdx]);
|
|
571
|
+
if (left + width > viewportLeft) {
|
|
572
|
+
break;
|
|
573
|
+
}
|
|
574
|
+
colVisibleStartIdx++;
|
|
575
|
+
}
|
|
576
|
+
let colVisibleEndIdx = colVisibleStartIdx;
|
|
577
|
+
while (colVisibleEndIdx < lastColIdx) {
|
|
578
|
+
const {
|
|
579
|
+
left,
|
|
580
|
+
width
|
|
581
|
+
} = columnMetrics.get(columns[colVisibleEndIdx]);
|
|
582
|
+
if (left + width >= viewportRight) {
|
|
583
|
+
break;
|
|
584
|
+
}
|
|
585
|
+
colVisibleEndIdx++;
|
|
586
|
+
}
|
|
587
|
+
const colOverscanStartIdx2 = max(firstUnfrozenColumnIdx, colVisibleStartIdx - 1);
|
|
588
|
+
const colOverscanEndIdx2 = min(lastColIdx, colVisibleEndIdx + 1);
|
|
589
|
+
return [colOverscanStartIdx2, colOverscanEndIdx2];
|
|
590
|
+
}, [columnMetrics, columns, lastFrozenColumnIndex, scrollLeft, totalFrozenColumnWidth, viewportWidth, enableVirtualization]);
|
|
591
|
+
return {
|
|
592
|
+
columns,
|
|
593
|
+
colSpanColumns,
|
|
594
|
+
colOverscanStartIdx,
|
|
595
|
+
colOverscanEndIdx,
|
|
596
|
+
layoutCssVars,
|
|
597
|
+
columnMetrics,
|
|
598
|
+
lastFrozenColumnIndex,
|
|
599
|
+
totalFrozenColumnWidth,
|
|
600
|
+
groupBy
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
function getSpecifiedWidth({
|
|
604
|
+
key,
|
|
605
|
+
width
|
|
606
|
+
}, columnWidths, viewportWidth) {
|
|
607
|
+
if (columnWidths.has(key)) {
|
|
608
|
+
return columnWidths.get(key);
|
|
609
|
+
}
|
|
610
|
+
if (typeof width === "number") {
|
|
611
|
+
return width;
|
|
612
|
+
}
|
|
613
|
+
if (typeof width === "string" && /^\d+%$/.test(width)) {
|
|
614
|
+
return floor(viewportWidth * parseInt(width, 10) / 100);
|
|
615
|
+
}
|
|
616
|
+
return void 0;
|
|
617
|
+
}
|
|
618
|
+
function useGridDimensions() {
|
|
619
|
+
const gridRef = useRef(null);
|
|
620
|
+
const [inlineSize, setInlineSize] = useState(1);
|
|
621
|
+
const [blockSize, setBlockSize] = useState(1);
|
|
622
|
+
useLayoutEffect(() => {
|
|
623
|
+
const {
|
|
624
|
+
ResizeObserver
|
|
625
|
+
} = window;
|
|
626
|
+
if (ResizeObserver == null) return;
|
|
627
|
+
const {
|
|
628
|
+
clientWidth,
|
|
629
|
+
clientHeight,
|
|
630
|
+
offsetWidth,
|
|
631
|
+
offsetHeight
|
|
632
|
+
} = gridRef.current;
|
|
633
|
+
const {
|
|
634
|
+
width,
|
|
635
|
+
height
|
|
636
|
+
} = gridRef.current.getBoundingClientRect();
|
|
637
|
+
const initialWidth = width - offsetWidth + clientWidth;
|
|
638
|
+
const initialHeight = height - offsetHeight + clientHeight;
|
|
639
|
+
setInlineSize(handleDevicePixelRatio(initialWidth));
|
|
640
|
+
setBlockSize(initialHeight);
|
|
641
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
642
|
+
const size = entries[0].contentBoxSize[0];
|
|
643
|
+
setInlineSize(handleDevicePixelRatio(size.inlineSize));
|
|
644
|
+
setBlockSize(size.blockSize);
|
|
645
|
+
});
|
|
646
|
+
resizeObserver.observe(gridRef.current);
|
|
647
|
+
return () => {
|
|
648
|
+
resizeObserver.disconnect();
|
|
649
|
+
};
|
|
650
|
+
}, []);
|
|
651
|
+
return [gridRef, inlineSize, blockSize];
|
|
652
|
+
}
|
|
653
|
+
function handleDevicePixelRatio(size) {
|
|
654
|
+
return size - (devicePixelRatio === 1 ? 0 : ceil(devicePixelRatio));
|
|
655
|
+
}
|
|
656
|
+
function useLatestFunc(fn) {
|
|
657
|
+
const ref = useRef(fn);
|
|
658
|
+
useEffect(() => {
|
|
659
|
+
ref.current = fn;
|
|
660
|
+
});
|
|
661
|
+
return useCallback((...args) => {
|
|
662
|
+
ref.current(...args);
|
|
663
|
+
}, []);
|
|
664
|
+
}
|
|
665
|
+
function useRovingCellRef(isSelected) {
|
|
666
|
+
const [isChildFocused, setIsChildFocused] = useState(false);
|
|
667
|
+
if (isChildFocused && !isSelected) {
|
|
668
|
+
setIsChildFocused(false);
|
|
669
|
+
}
|
|
670
|
+
const ref = useCallback((cell2) => {
|
|
671
|
+
if (cell2 === null) return;
|
|
672
|
+
scrollIntoView(cell2);
|
|
673
|
+
if (cell2.contains(document.activeElement)) return;
|
|
674
|
+
cell2.focus({
|
|
675
|
+
preventScroll: true
|
|
676
|
+
});
|
|
677
|
+
}, []);
|
|
678
|
+
function onFocus(event) {
|
|
679
|
+
if (event.target !== event.currentTarget) {
|
|
680
|
+
setIsChildFocused(true);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
const isFocused = isSelected && !isChildFocused;
|
|
684
|
+
return {
|
|
685
|
+
ref: isSelected ? ref : void 0,
|
|
686
|
+
tabIndex: isFocused ? 0 : -1,
|
|
687
|
+
onFocus: isSelected ? onFocus : void 0
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
function useViewportColumns({
|
|
691
|
+
columns,
|
|
692
|
+
colSpanColumns,
|
|
693
|
+
rows,
|
|
694
|
+
summaryRows,
|
|
695
|
+
colOverscanStartIdx,
|
|
696
|
+
colOverscanEndIdx,
|
|
697
|
+
lastFrozenColumnIndex,
|
|
698
|
+
rowOverscanStartIdx,
|
|
699
|
+
rowOverscanEndIdx,
|
|
700
|
+
isGroupRow
|
|
701
|
+
}) {
|
|
702
|
+
const startIdx = useMemo(() => {
|
|
703
|
+
if (colOverscanStartIdx === 0) return 0;
|
|
704
|
+
let startIdx2 = colOverscanStartIdx;
|
|
705
|
+
const updateStartIdx = (colIdx, colSpan) => {
|
|
706
|
+
if (colSpan !== void 0 && colIdx + colSpan > colOverscanStartIdx) {
|
|
707
|
+
startIdx2 = colIdx;
|
|
708
|
+
return true;
|
|
709
|
+
}
|
|
710
|
+
return false;
|
|
711
|
+
};
|
|
712
|
+
for (const column of colSpanColumns) {
|
|
713
|
+
const colIdx = column.idx;
|
|
714
|
+
if (colIdx >= startIdx2) break;
|
|
715
|
+
if (updateStartIdx(colIdx, getColSpan(column, lastFrozenColumnIndex, {
|
|
716
|
+
type: "HEADER"
|
|
717
|
+
}))) {
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
for (let rowIdx = rowOverscanStartIdx; rowIdx <= rowOverscanEndIdx; rowIdx++) {
|
|
721
|
+
const row2 = rows[rowIdx];
|
|
722
|
+
if (isGroupRow(row2)) continue;
|
|
723
|
+
if (updateStartIdx(colIdx, getColSpan(column, lastFrozenColumnIndex, {
|
|
724
|
+
type: "ROW",
|
|
725
|
+
row: row2
|
|
726
|
+
}))) {
|
|
727
|
+
break;
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
if (summaryRows != null) {
|
|
731
|
+
for (const row2 of summaryRows) {
|
|
732
|
+
if (updateStartIdx(colIdx, getColSpan(column, lastFrozenColumnIndex, {
|
|
733
|
+
type: "SUMMARY",
|
|
734
|
+
row: row2
|
|
735
|
+
}))) {
|
|
736
|
+
break;
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
return startIdx2;
|
|
742
|
+
}, [rowOverscanStartIdx, rowOverscanEndIdx, rows, summaryRows, colOverscanStartIdx, lastFrozenColumnIndex, colSpanColumns, isGroupRow]);
|
|
743
|
+
return useMemo(() => {
|
|
744
|
+
const viewportColumns = [];
|
|
745
|
+
for (let colIdx = 0; colIdx <= colOverscanEndIdx; colIdx++) {
|
|
746
|
+
const column = columns[colIdx];
|
|
747
|
+
if (colIdx < startIdx && !column.frozen) continue;
|
|
748
|
+
viewportColumns.push(column);
|
|
749
|
+
}
|
|
750
|
+
return viewportColumns;
|
|
751
|
+
}, [startIdx, colOverscanEndIdx, columns]);
|
|
752
|
+
}
|
|
753
|
+
function isReadonlyArray(arr) {
|
|
754
|
+
return Array.isArray(arr);
|
|
755
|
+
}
|
|
756
|
+
function useViewportRows({
|
|
757
|
+
rawRows,
|
|
758
|
+
rowHeight,
|
|
759
|
+
clientHeight,
|
|
760
|
+
scrollTop,
|
|
761
|
+
groupBy,
|
|
762
|
+
rowGrouper,
|
|
763
|
+
expandedGroupIds,
|
|
764
|
+
enableVirtualization
|
|
765
|
+
}) {
|
|
766
|
+
const [groupedRows, rowsCount] = useMemo(() => {
|
|
767
|
+
if (groupBy.length === 0 || rowGrouper == null) return [void 0, rawRows.length];
|
|
768
|
+
const groupRows = (rows2, [groupByKey, ...remainingGroupByKeys], startRowIndex) => {
|
|
769
|
+
let groupRowsCount = 0;
|
|
770
|
+
const groups = {};
|
|
771
|
+
for (const [key, childRows] of Object.entries(rowGrouper(rows2, groupByKey))) {
|
|
772
|
+
const [childGroups, childRowsCount] = remainingGroupByKeys.length === 0 ? [childRows, childRows.length] : groupRows(childRows, remainingGroupByKeys, startRowIndex + groupRowsCount + 1);
|
|
773
|
+
groups[key] = {
|
|
774
|
+
childRows,
|
|
775
|
+
childGroups,
|
|
776
|
+
startRowIndex: startRowIndex + groupRowsCount
|
|
777
|
+
};
|
|
778
|
+
groupRowsCount += childRowsCount + 1;
|
|
779
|
+
}
|
|
780
|
+
return [groups, groupRowsCount];
|
|
781
|
+
};
|
|
782
|
+
return groupRows(rawRows, groupBy, 0);
|
|
783
|
+
}, [groupBy, rowGrouper, rawRows]);
|
|
784
|
+
const [rows, isGroupRow] = useMemo(() => {
|
|
785
|
+
const allGroupRows = /* @__PURE__ */ new Set();
|
|
786
|
+
if (!groupedRows) return [rawRows, isGroupRow2];
|
|
787
|
+
const flattenedRows = [];
|
|
788
|
+
const expandGroup = (rows2, parentId, level) => {
|
|
789
|
+
if (isReadonlyArray(rows2)) {
|
|
790
|
+
flattenedRows.push(...rows2);
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
Object.keys(rows2).forEach((groupKey, posInSet, keys) => {
|
|
794
|
+
const id = parentId !== void 0 ? `${parentId}__${groupKey}` : groupKey;
|
|
795
|
+
const isExpanded = expandedGroupIds?.has(id) ?? false;
|
|
796
|
+
const {
|
|
797
|
+
childRows,
|
|
798
|
+
childGroups,
|
|
799
|
+
startRowIndex
|
|
800
|
+
} = rows2[groupKey];
|
|
801
|
+
const groupRow2 = {
|
|
802
|
+
id,
|
|
803
|
+
parentId,
|
|
804
|
+
groupKey,
|
|
805
|
+
isExpanded,
|
|
806
|
+
childRows,
|
|
807
|
+
level,
|
|
808
|
+
posInSet,
|
|
809
|
+
startRowIndex,
|
|
810
|
+
setSize: keys.length
|
|
811
|
+
};
|
|
812
|
+
flattenedRows.push(groupRow2);
|
|
813
|
+
allGroupRows.add(groupRow2);
|
|
814
|
+
if (isExpanded) {
|
|
815
|
+
expandGroup(childGroups, id, level + 1);
|
|
816
|
+
}
|
|
817
|
+
});
|
|
818
|
+
};
|
|
819
|
+
expandGroup(groupedRows, void 0, 0);
|
|
820
|
+
return [flattenedRows, isGroupRow2];
|
|
821
|
+
function isGroupRow2(row2) {
|
|
822
|
+
return allGroupRows.has(row2);
|
|
823
|
+
}
|
|
824
|
+
}, [expandedGroupIds, groupedRows, rawRows]);
|
|
825
|
+
const {
|
|
826
|
+
totalRowHeight,
|
|
827
|
+
gridTemplateRows,
|
|
828
|
+
getRowTop,
|
|
829
|
+
getRowHeight,
|
|
830
|
+
findRowIdx
|
|
831
|
+
} = useMemo(() => {
|
|
832
|
+
if (typeof rowHeight === "number") {
|
|
833
|
+
return {
|
|
834
|
+
totalRowHeight: rowHeight * rows.length,
|
|
835
|
+
gridTemplateRows: ` repeat(${rows.length}, ${rowHeight}px)`,
|
|
836
|
+
getRowTop: (rowIdx) => rowIdx * rowHeight,
|
|
837
|
+
getRowHeight: () => rowHeight,
|
|
838
|
+
findRowIdx: (offset) => floor(offset / rowHeight)
|
|
839
|
+
};
|
|
840
|
+
}
|
|
841
|
+
let totalRowHeight2 = 0;
|
|
842
|
+
let gridTemplateRows2 = " ";
|
|
843
|
+
const rowPositions = rows.map((row2) => {
|
|
844
|
+
const currentRowHeight = isGroupRow(row2) ? rowHeight({
|
|
845
|
+
type: "GROUP",
|
|
846
|
+
row: row2
|
|
847
|
+
}) : rowHeight({
|
|
848
|
+
type: "ROW",
|
|
849
|
+
row: row2
|
|
850
|
+
});
|
|
851
|
+
const position = {
|
|
852
|
+
top: totalRowHeight2,
|
|
853
|
+
height: currentRowHeight
|
|
854
|
+
};
|
|
855
|
+
gridTemplateRows2 += `${currentRowHeight}px `;
|
|
856
|
+
totalRowHeight2 += currentRowHeight;
|
|
857
|
+
return position;
|
|
858
|
+
});
|
|
859
|
+
const validateRowIdx = (rowIdx) => {
|
|
860
|
+
return max(0, min(rows.length - 1, rowIdx));
|
|
861
|
+
};
|
|
862
|
+
return {
|
|
863
|
+
totalRowHeight: totalRowHeight2,
|
|
864
|
+
gridTemplateRows: gridTemplateRows2,
|
|
865
|
+
getRowTop: (rowIdx) => rowPositions[validateRowIdx(rowIdx)].top,
|
|
866
|
+
getRowHeight: (rowIdx) => rowPositions[validateRowIdx(rowIdx)].height,
|
|
867
|
+
findRowIdx(offset) {
|
|
868
|
+
let start = 0;
|
|
869
|
+
let end = rowPositions.length - 1;
|
|
870
|
+
while (start <= end) {
|
|
871
|
+
const middle = start + floor((end - start) / 2);
|
|
872
|
+
const currentOffset = rowPositions[middle].top;
|
|
873
|
+
if (currentOffset === offset) return middle;
|
|
874
|
+
if (currentOffset < offset) {
|
|
875
|
+
start = middle + 1;
|
|
876
|
+
} else if (currentOffset > offset) {
|
|
877
|
+
end = middle - 1;
|
|
878
|
+
}
|
|
879
|
+
if (start > end) return end;
|
|
880
|
+
}
|
|
881
|
+
return 0;
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
}, [isGroupRow, rowHeight, rows]);
|
|
885
|
+
let rowOverscanStartIdx = 0;
|
|
886
|
+
let rowOverscanEndIdx = rows.length - 1;
|
|
887
|
+
if (enableVirtualization) {
|
|
888
|
+
const overscanThreshold = 4;
|
|
889
|
+
const rowVisibleStartIdx = findRowIdx(scrollTop);
|
|
890
|
+
const rowVisibleEndIdx = findRowIdx(scrollTop + clientHeight);
|
|
891
|
+
rowOverscanStartIdx = max(0, rowVisibleStartIdx - overscanThreshold);
|
|
892
|
+
rowOverscanEndIdx = min(rows.length - 1, rowVisibleEndIdx + overscanThreshold);
|
|
893
|
+
}
|
|
894
|
+
return {
|
|
895
|
+
rowOverscanStartIdx,
|
|
896
|
+
rowOverscanEndIdx,
|
|
897
|
+
rows,
|
|
898
|
+
rowsCount,
|
|
899
|
+
totalRowHeight,
|
|
900
|
+
gridTemplateRows,
|
|
901
|
+
isGroupRow,
|
|
902
|
+
getRowTop,
|
|
903
|
+
getRowHeight,
|
|
904
|
+
findRowIdx
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
var css_248z$a = ".h1tr5c9i700-beta13{cursor:pointer;display:flex}.h1tr5c9i700-beta13:focus{outline:none}.h19r0msv700-beta13{flex-grow:1;overflow:hidden;overflow:clip;text-overflow:ellipsis}";
|
|
908
|
+
styleInject(css_248z$a, { "insertAt": "top" });
|
|
909
|
+
const headerSortCell = "h1tr5c9i700-beta13";
|
|
910
|
+
const headerSortCellClassname = `rdg-header-sort-cell ${headerSortCell}`;
|
|
911
|
+
const headerSortName = "h19r0msv700-beta13";
|
|
912
|
+
const headerSortNameClassname = `rdg-header-sort-name ${headerSortName}`;
|
|
913
|
+
function HeaderRenderer({
|
|
914
|
+
column,
|
|
915
|
+
sortDirection,
|
|
916
|
+
priority,
|
|
917
|
+
onSort,
|
|
918
|
+
isCellSelected
|
|
919
|
+
}) {
|
|
920
|
+
if (!column.sortable) return /* @__PURE__ */ jsx(Fragment, {
|
|
921
|
+
children: column.name
|
|
922
|
+
});
|
|
923
|
+
return /* @__PURE__ */ jsx(SortableHeaderCell, {
|
|
924
|
+
onSort,
|
|
925
|
+
sortDirection,
|
|
926
|
+
priority,
|
|
927
|
+
isCellSelected,
|
|
928
|
+
children: column.name
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
function SortableHeaderCell({
|
|
932
|
+
onSort,
|
|
933
|
+
sortDirection,
|
|
934
|
+
priority,
|
|
935
|
+
children,
|
|
936
|
+
isCellSelected
|
|
937
|
+
}) {
|
|
938
|
+
const SortIcon2 = useDefaultComponents().sortIcon;
|
|
939
|
+
const {
|
|
940
|
+
ref,
|
|
941
|
+
tabIndex
|
|
942
|
+
} = useFocusRef(isCellSelected);
|
|
943
|
+
function handleKeyDown(event) {
|
|
944
|
+
if (event.key === " " || event.key === "Enter") {
|
|
945
|
+
event.preventDefault();
|
|
946
|
+
onSort(event.ctrlKey || event.metaKey);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
function handleClick(event) {
|
|
950
|
+
onSort(event.ctrlKey || event.metaKey);
|
|
951
|
+
}
|
|
952
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
953
|
+
ref,
|
|
954
|
+
tabIndex,
|
|
955
|
+
className: headerSortCellClassname,
|
|
956
|
+
onClick: handleClick,
|
|
957
|
+
onKeyDown: handleKeyDown,
|
|
958
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
959
|
+
className: headerSortNameClassname,
|
|
960
|
+
children
|
|
961
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
962
|
+
children: [/* @__PURE__ */ jsx(SortIcon2, {
|
|
963
|
+
sortDirection
|
|
964
|
+
}), priority]
|
|
965
|
+
})]
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
var css_248z$9 = '.celq7o9700-beta13{touch-action:none}.celq7o9700-beta13:after{content:"";cursor:col-resize;inline-size:10px;inset-block-end:0;inset-block-start:0;inset-inline-end:0;position:absolute}';
|
|
969
|
+
styleInject(css_248z$9, { "insertAt": "top" });
|
|
970
|
+
const cellResizable = "celq7o9700-beta13";
|
|
971
|
+
const cellResizableClassname = `rdg-cell-resizable ${cellResizable}`;
|
|
972
|
+
function HeaderCell({
|
|
973
|
+
column,
|
|
974
|
+
colSpan,
|
|
975
|
+
isCellSelected,
|
|
976
|
+
onColumnResize,
|
|
977
|
+
allRowsSelected,
|
|
978
|
+
onAllRowsSelectionChange,
|
|
979
|
+
sortColumns,
|
|
980
|
+
onSortColumnsChange,
|
|
981
|
+
selectCell,
|
|
982
|
+
shouldFocusGrid,
|
|
983
|
+
direction
|
|
984
|
+
}) {
|
|
985
|
+
const isRtl = direction === "rtl";
|
|
986
|
+
const {
|
|
987
|
+
ref,
|
|
988
|
+
tabIndex,
|
|
989
|
+
onFocus
|
|
990
|
+
} = useRovingCellRef(isCellSelected);
|
|
991
|
+
const sortIndex = sortColumns?.findIndex((sort) => sort.columnKey === column.key);
|
|
992
|
+
const sortColumn = sortIndex !== void 0 && sortIndex > -1 ? sortColumns[sortIndex] : void 0;
|
|
993
|
+
const sortDirection = sortColumn?.direction;
|
|
994
|
+
const priority = sortColumn !== void 0 && sortColumns.length > 1 ? sortIndex + 1 : void 0;
|
|
995
|
+
const ariaSort = sortDirection && !priority ? sortDirection === "ASC" ? "ascending" : "descending" : void 0;
|
|
996
|
+
const className = getCellClassname(column, column.headerCellClass, column.resizable && cellResizableClassname);
|
|
997
|
+
const HeaderRenderer$1 = column.headerRenderer ?? HeaderRenderer;
|
|
998
|
+
function onPointerDown(event) {
|
|
999
|
+
if (event.pointerType === "mouse" && event.buttons !== 1) {
|
|
1000
|
+
return;
|
|
1001
|
+
}
|
|
1002
|
+
const {
|
|
1003
|
+
currentTarget,
|
|
1004
|
+
pointerId
|
|
1005
|
+
} = event;
|
|
1006
|
+
const {
|
|
1007
|
+
right,
|
|
1008
|
+
left
|
|
1009
|
+
} = currentTarget.getBoundingClientRect();
|
|
1010
|
+
const offset = isRtl ? event.clientX - left : right - event.clientX;
|
|
1011
|
+
if (offset > 11) {
|
|
1012
|
+
return;
|
|
1013
|
+
}
|
|
1014
|
+
function onPointerMove(event2) {
|
|
1015
|
+
const {
|
|
1016
|
+
right: right2,
|
|
1017
|
+
left: left2
|
|
1018
|
+
} = currentTarget.getBoundingClientRect();
|
|
1019
|
+
const width = isRtl ? right2 + offset - event2.clientX : event2.clientX + offset - left2;
|
|
1020
|
+
if (width > 0) {
|
|
1021
|
+
onColumnResize(column, clampColumnWidth(width, column));
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
function onLostPointerCapture() {
|
|
1025
|
+
currentTarget.removeEventListener("pointermove", onPointerMove);
|
|
1026
|
+
currentTarget.removeEventListener("lostpointercapture", onLostPointerCapture);
|
|
1027
|
+
}
|
|
1028
|
+
currentTarget.setPointerCapture(pointerId);
|
|
1029
|
+
currentTarget.addEventListener("pointermove", onPointerMove);
|
|
1030
|
+
currentTarget.addEventListener("lostpointercapture", onLostPointerCapture);
|
|
1031
|
+
}
|
|
1032
|
+
function onSort(ctrlClick) {
|
|
1033
|
+
if (onSortColumnsChange == null) return;
|
|
1034
|
+
const {
|
|
1035
|
+
sortDescendingFirst
|
|
1036
|
+
} = column;
|
|
1037
|
+
if (sortColumn === void 0) {
|
|
1038
|
+
const nextSort = {
|
|
1039
|
+
columnKey: column.key,
|
|
1040
|
+
direction: sortDescendingFirst ? "DESC" : "ASC"
|
|
1041
|
+
};
|
|
1042
|
+
onSortColumnsChange(sortColumns && ctrlClick ? [...sortColumns, nextSort] : [nextSort]);
|
|
1043
|
+
} else {
|
|
1044
|
+
let nextSortColumn;
|
|
1045
|
+
if (sortDescendingFirst && sortDirection === "DESC" || !sortDescendingFirst && sortDirection === "ASC") {
|
|
1046
|
+
nextSortColumn = {
|
|
1047
|
+
columnKey: column.key,
|
|
1048
|
+
direction: sortDirection === "ASC" ? "DESC" : "ASC"
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
if (ctrlClick) {
|
|
1052
|
+
const nextSortColumns = [...sortColumns];
|
|
1053
|
+
if (nextSortColumn) {
|
|
1054
|
+
nextSortColumns[sortIndex] = nextSortColumn;
|
|
1055
|
+
} else {
|
|
1056
|
+
nextSortColumns.splice(sortIndex, 1);
|
|
1057
|
+
}
|
|
1058
|
+
onSortColumnsChange(nextSortColumns);
|
|
1059
|
+
} else {
|
|
1060
|
+
onSortColumnsChange(nextSortColumn ? [nextSortColumn] : []);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
function onClick() {
|
|
1065
|
+
selectCell(column.idx);
|
|
1066
|
+
}
|
|
1067
|
+
function onDoubleClick(event) {
|
|
1068
|
+
const {
|
|
1069
|
+
right,
|
|
1070
|
+
left
|
|
1071
|
+
} = event.currentTarget.getBoundingClientRect();
|
|
1072
|
+
const offset = isRtl ? event.clientX - left : right - event.clientX;
|
|
1073
|
+
if (offset > 11) {
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
onColumnResize(column, "auto");
|
|
1077
|
+
}
|
|
1078
|
+
function handleFocus(event) {
|
|
1079
|
+
onFocus?.(event);
|
|
1080
|
+
if (shouldFocusGrid) {
|
|
1081
|
+
selectCell(0);
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1085
|
+
role: "columnheader",
|
|
1086
|
+
"aria-colindex": column.idx + 1,
|
|
1087
|
+
"aria-selected": isCellSelected,
|
|
1088
|
+
"aria-sort": ariaSort,
|
|
1089
|
+
"aria-colspan": colSpan,
|
|
1090
|
+
ref,
|
|
1091
|
+
tabIndex: shouldFocusGrid ? 0 : tabIndex,
|
|
1092
|
+
className,
|
|
1093
|
+
style: {
|
|
1094
|
+
...getCellStyle(column, colSpan),
|
|
1095
|
+
minWidth: column.minWidth,
|
|
1096
|
+
maxWidth: column.maxWidth ?? void 0
|
|
1097
|
+
},
|
|
1098
|
+
onFocus: handleFocus,
|
|
1099
|
+
onClick,
|
|
1100
|
+
onDoubleClick: column.resizable ? onDoubleClick : void 0,
|
|
1101
|
+
onPointerDown: column.resizable ? onPointerDown : void 0,
|
|
1102
|
+
children: /* @__PURE__ */ jsx(HeaderRenderer$1, {
|
|
1103
|
+
column,
|
|
1104
|
+
sortDirection,
|
|
1105
|
+
priority,
|
|
1106
|
+
onSort,
|
|
1107
|
+
allRowsSelected,
|
|
1108
|
+
onAllRowsSelectionChange,
|
|
1109
|
+
isCellSelected
|
|
1110
|
+
})
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
var css_248z$8 = ".h197vzie700-beta13{background-color:var(--rdg-header-background-color);display:contents;font-weight:700;line-height:var(--rdg-header-row-height)}.h197vzie700-beta13>.c1wupbe700-beta13{inset-block-start:0;position:sticky;z-index:2}.h197vzie700-beta13>.c1730fa4700-beta13{z-index:3}";
|
|
1114
|
+
styleInject(css_248z$8, { "insertAt": "top" });
|
|
1115
|
+
const headerRow = "h197vzie700-beta13";
|
|
1116
|
+
const headerRowClassname = `rdg-header-row ${headerRow}`;
|
|
1117
|
+
function HeaderRow({
|
|
1118
|
+
columns,
|
|
1119
|
+
allRowsSelected,
|
|
1120
|
+
onAllRowsSelectionChange,
|
|
1121
|
+
onColumnResize,
|
|
1122
|
+
sortColumns,
|
|
1123
|
+
onSortColumnsChange,
|
|
1124
|
+
lastFrozenColumnIndex,
|
|
1125
|
+
selectedCellIdx,
|
|
1126
|
+
selectCell,
|
|
1127
|
+
shouldFocusGrid,
|
|
1128
|
+
direction
|
|
1129
|
+
}) {
|
|
1130
|
+
const cells = [];
|
|
1131
|
+
for (let index = 0; index < columns.length; index++) {
|
|
1132
|
+
const column = columns[index];
|
|
1133
|
+
const colSpan = getColSpan(column, lastFrozenColumnIndex, {
|
|
1134
|
+
type: "HEADER"
|
|
1135
|
+
});
|
|
1136
|
+
if (colSpan !== void 0) {
|
|
1137
|
+
index += colSpan - 1;
|
|
1138
|
+
}
|
|
1139
|
+
cells.push(/* @__PURE__ */ jsx(HeaderCell, {
|
|
1140
|
+
column,
|
|
1141
|
+
colSpan,
|
|
1142
|
+
isCellSelected: selectedCellIdx === column.idx,
|
|
1143
|
+
onColumnResize,
|
|
1144
|
+
allRowsSelected,
|
|
1145
|
+
onAllRowsSelectionChange,
|
|
1146
|
+
onSortColumnsChange,
|
|
1147
|
+
sortColumns,
|
|
1148
|
+
selectCell,
|
|
1149
|
+
shouldFocusGrid: shouldFocusGrid && index === 0,
|
|
1150
|
+
direction
|
|
1151
|
+
}, column.key));
|
|
1152
|
+
}
|
|
1153
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1154
|
+
role: "row",
|
|
1155
|
+
"aria-rowindex": 1,
|
|
1156
|
+
className: clsx(headerRowClassname, selectedCellIdx === -1 && rowSelectedClassname),
|
|
1157
|
+
style: getRowStyle(1),
|
|
1158
|
+
children: cells
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
1161
|
+
const HeaderRow$1 = /* @__PURE__ */ memo(HeaderRow);
|
|
1162
|
+
var css_248z$7 = ".c1bmg16t700-beta13,.ccpfvsn700-beta13{background-color:#ccf}.c1bmg16t700-beta13.ccpfvsn700-beta13{background-color:#99f}";
|
|
1163
|
+
styleInject(css_248z$7, { "insertAt": "top" });
|
|
1164
|
+
const cellCopied = "ccpfvsn700-beta13";
|
|
1165
|
+
const cellCopiedClassname = `rdg-cell-copied ${cellCopied}`;
|
|
1166
|
+
const cellDraggedOver = "c1bmg16t700-beta13";
|
|
1167
|
+
const cellDraggedOverClassname = `rdg-cell-dragged-over ${cellDraggedOver}`;
|
|
1168
|
+
function Cell({
|
|
1169
|
+
column,
|
|
1170
|
+
colSpan,
|
|
1171
|
+
isCellSelected,
|
|
1172
|
+
isCopied,
|
|
1173
|
+
isDraggedOver,
|
|
1174
|
+
row: row2,
|
|
1175
|
+
dragHandle,
|
|
1176
|
+
onRowClick,
|
|
1177
|
+
onRowDoubleClick,
|
|
1178
|
+
onRowChange,
|
|
1179
|
+
selectCell,
|
|
1180
|
+
...props
|
|
1181
|
+
}) {
|
|
1182
|
+
const {
|
|
1183
|
+
ref,
|
|
1184
|
+
tabIndex,
|
|
1185
|
+
onFocus
|
|
1186
|
+
} = useRovingCellRef(isCellSelected);
|
|
1187
|
+
const {
|
|
1188
|
+
cellClass
|
|
1189
|
+
} = column;
|
|
1190
|
+
const className = getCellClassname(column, typeof cellClass === "function" ? cellClass(row2) : cellClass, isCopied && cellCopiedClassname, isDraggedOver && cellDraggedOverClassname);
|
|
1191
|
+
function selectCellWrapper(openEditor) {
|
|
1192
|
+
selectCell(row2, column, openEditor);
|
|
1193
|
+
}
|
|
1194
|
+
function handleClick() {
|
|
1195
|
+
selectCellWrapper(column.editorOptions?.editOnClick);
|
|
1196
|
+
onRowClick?.(row2, column);
|
|
1197
|
+
}
|
|
1198
|
+
function handleContextMenu() {
|
|
1199
|
+
selectCellWrapper();
|
|
1200
|
+
}
|
|
1201
|
+
function handleDoubleClick() {
|
|
1202
|
+
selectCellWrapper(true);
|
|
1203
|
+
onRowDoubleClick?.(row2, column);
|
|
1204
|
+
}
|
|
1205
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1206
|
+
role: "gridcell",
|
|
1207
|
+
"aria-colindex": column.idx + 1,
|
|
1208
|
+
"aria-selected": isCellSelected,
|
|
1209
|
+
"aria-colspan": colSpan,
|
|
1210
|
+
"aria-readonly": !isCellEditable(column, row2) || void 0,
|
|
1211
|
+
ref,
|
|
1212
|
+
tabIndex,
|
|
1213
|
+
className,
|
|
1214
|
+
style: getCellStyle(column, colSpan),
|
|
1215
|
+
onClick: handleClick,
|
|
1216
|
+
onDoubleClick: handleDoubleClick,
|
|
1217
|
+
onContextMenu: handleContextMenu,
|
|
1218
|
+
onFocus,
|
|
1219
|
+
...props,
|
|
1220
|
+
children: !column.rowGroup && /* @__PURE__ */ jsxs(Fragment, {
|
|
1221
|
+
children: [/* @__PURE__ */ jsx(column.formatter, {
|
|
1222
|
+
column,
|
|
1223
|
+
row: row2,
|
|
1224
|
+
isCellSelected,
|
|
1225
|
+
onRowChange
|
|
1226
|
+
}), dragHandle]
|
|
1227
|
+
})
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
const Cell$1 = /* @__PURE__ */ memo(Cell);
|
|
1231
|
+
function Row({
|
|
1232
|
+
className,
|
|
1233
|
+
rowIdx,
|
|
1234
|
+
gridRowStart,
|
|
1235
|
+
height,
|
|
1236
|
+
selectedCellIdx,
|
|
1237
|
+
isRowSelected,
|
|
1238
|
+
copiedCellIdx,
|
|
1239
|
+
draggedOverCellIdx,
|
|
1240
|
+
lastFrozenColumnIndex,
|
|
1241
|
+
row: row2,
|
|
1242
|
+
viewportColumns,
|
|
1243
|
+
selectedCellEditor,
|
|
1244
|
+
selectedCellDragHandle,
|
|
1245
|
+
onRowClick,
|
|
1246
|
+
onRowDoubleClick,
|
|
1247
|
+
rowClass,
|
|
1248
|
+
setDraggedOverRowIdx,
|
|
1249
|
+
onMouseEnter,
|
|
1250
|
+
onRowChange,
|
|
1251
|
+
selectCell,
|
|
1252
|
+
...props
|
|
1253
|
+
}, ref) {
|
|
1254
|
+
const handleRowChange = useLatestFunc((newRow) => {
|
|
1255
|
+
onRowChange(rowIdx, newRow);
|
|
1256
|
+
});
|
|
1257
|
+
function handleDragEnter(event) {
|
|
1258
|
+
setDraggedOverRowIdx?.(rowIdx);
|
|
1259
|
+
onMouseEnter?.(event);
|
|
1260
|
+
}
|
|
1261
|
+
className = clsx(rowClassname, `rdg-row-${rowIdx % 2 === 0 ? "even" : "odd"}`, rowClass?.(row2), className, selectedCellIdx === -1 && rowSelectedClassname);
|
|
1262
|
+
const cells = [];
|
|
1263
|
+
for (let index = 0; index < viewportColumns.length; index++) {
|
|
1264
|
+
const column = viewportColumns[index];
|
|
1265
|
+
const {
|
|
1266
|
+
idx
|
|
1267
|
+
} = column;
|
|
1268
|
+
const colSpan = getColSpan(column, lastFrozenColumnIndex, {
|
|
1269
|
+
type: "ROW",
|
|
1270
|
+
row: row2
|
|
1271
|
+
});
|
|
1272
|
+
if (colSpan !== void 0) {
|
|
1273
|
+
index += colSpan - 1;
|
|
1274
|
+
}
|
|
1275
|
+
const isCellSelected = selectedCellIdx === idx;
|
|
1276
|
+
if (isCellSelected && selectedCellEditor) {
|
|
1277
|
+
cells.push(selectedCellEditor);
|
|
1278
|
+
} else {
|
|
1279
|
+
cells.push(/* @__PURE__ */ jsx(Cell$1, {
|
|
1280
|
+
column,
|
|
1281
|
+
colSpan,
|
|
1282
|
+
row: row2,
|
|
1283
|
+
isCopied: copiedCellIdx === idx,
|
|
1284
|
+
isDraggedOver: draggedOverCellIdx === idx,
|
|
1285
|
+
isCellSelected,
|
|
1286
|
+
dragHandle: isCellSelected ? selectedCellDragHandle : void 0,
|
|
1287
|
+
onRowClick,
|
|
1288
|
+
onRowDoubleClick,
|
|
1289
|
+
onRowChange: handleRowChange,
|
|
1290
|
+
selectCell
|
|
1291
|
+
}, column.key));
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
return /* @__PURE__ */ jsx(RowSelectionProvider, {
|
|
1295
|
+
value: isRowSelected,
|
|
1296
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1297
|
+
role: "row",
|
|
1298
|
+
ref,
|
|
1299
|
+
className,
|
|
1300
|
+
onMouseEnter: handleDragEnter,
|
|
1301
|
+
style: getRowStyle(gridRowStart, height),
|
|
1302
|
+
...props,
|
|
1303
|
+
children: cells
|
|
1304
|
+
})
|
|
1305
|
+
});
|
|
1306
|
+
}
|
|
1307
|
+
const Row$1 = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef(Row));
|
|
1308
|
+
function GroupCell({
|
|
1309
|
+
id,
|
|
1310
|
+
groupKey,
|
|
1311
|
+
childRows,
|
|
1312
|
+
isExpanded,
|
|
1313
|
+
isCellSelected,
|
|
1314
|
+
column,
|
|
1315
|
+
row: row2,
|
|
1316
|
+
groupColumnIndex,
|
|
1317
|
+
toggleGroup: toggleGroupWrapper
|
|
1318
|
+
}) {
|
|
1319
|
+
const {
|
|
1320
|
+
ref,
|
|
1321
|
+
tabIndex,
|
|
1322
|
+
onFocus
|
|
1323
|
+
} = useRovingCellRef(isCellSelected);
|
|
1324
|
+
function toggleGroup() {
|
|
1325
|
+
toggleGroupWrapper(id);
|
|
1326
|
+
}
|
|
1327
|
+
const isLevelMatching = column.rowGroup && groupColumnIndex === column.idx;
|
|
1328
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1329
|
+
role: "gridcell",
|
|
1330
|
+
"aria-colindex": column.idx + 1,
|
|
1331
|
+
"aria-selected": isCellSelected,
|
|
1332
|
+
ref,
|
|
1333
|
+
tabIndex,
|
|
1334
|
+
className: getCellClassname(column),
|
|
1335
|
+
style: {
|
|
1336
|
+
...getCellStyle(column),
|
|
1337
|
+
cursor: isLevelMatching ? "pointer" : "default"
|
|
1338
|
+
},
|
|
1339
|
+
onClick: isLevelMatching ? toggleGroup : void 0,
|
|
1340
|
+
onFocus,
|
|
1341
|
+
children: (!column.rowGroup || groupColumnIndex === column.idx) && column.groupFormatter && /* @__PURE__ */ jsx(column.groupFormatter, {
|
|
1342
|
+
groupKey,
|
|
1343
|
+
childRows,
|
|
1344
|
+
column,
|
|
1345
|
+
row: row2,
|
|
1346
|
+
isExpanded,
|
|
1347
|
+
isCellSelected,
|
|
1348
|
+
toggleGroup
|
|
1349
|
+
})
|
|
1350
|
+
}, column.key);
|
|
1351
|
+
}
|
|
1352
|
+
const GroupCell$1 = /* @__PURE__ */ memo(GroupCell);
|
|
1353
|
+
var css_248z$6 = ".gyxx7e9700-beta13:not([aria-selected=true]){background-color:var(--rdg-header-background-color)}.gyxx7e9700-beta13>.c1wupbe700-beta13:not(:last-child):not(.c9dpaye700-beta13){border-inline-end:none}";
|
|
1354
|
+
styleInject(css_248z$6, { "insertAt": "top" });
|
|
1355
|
+
const groupRow = "gyxx7e9700-beta13";
|
|
1356
|
+
const groupRowClassname = `rdg-group-row ${groupRow}`;
|
|
1357
|
+
function GroupedRow({
|
|
1358
|
+
id,
|
|
1359
|
+
groupKey,
|
|
1360
|
+
viewportColumns,
|
|
1361
|
+
childRows,
|
|
1362
|
+
rowIdx,
|
|
1363
|
+
row: row2,
|
|
1364
|
+
gridRowStart,
|
|
1365
|
+
height,
|
|
1366
|
+
level,
|
|
1367
|
+
isExpanded,
|
|
1368
|
+
selectedCellIdx,
|
|
1369
|
+
isRowSelected,
|
|
1370
|
+
selectGroup,
|
|
1371
|
+
toggleGroup,
|
|
1372
|
+
...props
|
|
1373
|
+
}) {
|
|
1374
|
+
const idx = viewportColumns[0].key === SELECT_COLUMN_KEY ? level + 1 : level;
|
|
1375
|
+
function handleSelectGroup() {
|
|
1376
|
+
selectGroup(rowIdx);
|
|
1377
|
+
}
|
|
1378
|
+
return /* @__PURE__ */ jsx(RowSelectionProvider, {
|
|
1379
|
+
value: isRowSelected,
|
|
1380
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1381
|
+
role: "row",
|
|
1382
|
+
"aria-level": level,
|
|
1383
|
+
"aria-expanded": isExpanded,
|
|
1384
|
+
className: clsx(rowClassname, groupRowClassname, `rdg-row-${rowIdx % 2 === 0 ? "even" : "odd"}`, selectedCellIdx === -1 && rowSelectedClassname),
|
|
1385
|
+
onClick: handleSelectGroup,
|
|
1386
|
+
style: getRowStyle(gridRowStart, height),
|
|
1387
|
+
...props,
|
|
1388
|
+
children: viewportColumns.map((column) => /* @__PURE__ */ jsx(GroupCell$1, {
|
|
1389
|
+
id,
|
|
1390
|
+
groupKey,
|
|
1391
|
+
childRows,
|
|
1392
|
+
isExpanded,
|
|
1393
|
+
isCellSelected: selectedCellIdx === column.idx,
|
|
1394
|
+
column,
|
|
1395
|
+
row: row2,
|
|
1396
|
+
groupColumnIndex: idx,
|
|
1397
|
+
toggleGroup
|
|
1398
|
+
}, column.key))
|
|
1399
|
+
})
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1402
|
+
const GroupRowRenderer = /* @__PURE__ */ memo(GroupedRow);
|
|
1403
|
+
var css_248z$5 = ".s1n3hxke700-beta13{inset-block-end:var(--rdg-summary-row-bottom);inset-block-start:var(--rdg-summary-row-top)}";
|
|
1404
|
+
styleInject(css_248z$5, { "insertAt": "top" });
|
|
1405
|
+
const summaryCellClassname = "s1n3hxke700-beta13";
|
|
1406
|
+
function SummaryCell({
|
|
1407
|
+
column,
|
|
1408
|
+
colSpan,
|
|
1409
|
+
row: row2,
|
|
1410
|
+
isCellSelected,
|
|
1411
|
+
selectCell
|
|
1412
|
+
}) {
|
|
1413
|
+
const {
|
|
1414
|
+
ref,
|
|
1415
|
+
tabIndex,
|
|
1416
|
+
onFocus
|
|
1417
|
+
} = useRovingCellRef(isCellSelected);
|
|
1418
|
+
const {
|
|
1419
|
+
summaryFormatter: SummaryFormatter,
|
|
1420
|
+
summaryCellClass
|
|
1421
|
+
} = column;
|
|
1422
|
+
const className = getCellClassname(column, summaryCellClassname, typeof summaryCellClass === "function" ? summaryCellClass(row2) : summaryCellClass);
|
|
1423
|
+
function onClick() {
|
|
1424
|
+
selectCell(row2, column);
|
|
1425
|
+
}
|
|
1426
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1427
|
+
role: "gridcell",
|
|
1428
|
+
"aria-colindex": column.idx + 1,
|
|
1429
|
+
"aria-colspan": colSpan,
|
|
1430
|
+
"aria-selected": isCellSelected,
|
|
1431
|
+
ref,
|
|
1432
|
+
tabIndex,
|
|
1433
|
+
className,
|
|
1434
|
+
style: getCellStyle(column, colSpan),
|
|
1435
|
+
onClick,
|
|
1436
|
+
onFocus,
|
|
1437
|
+
children: SummaryFormatter && /* @__PURE__ */ jsx(SummaryFormatter, {
|
|
1438
|
+
column,
|
|
1439
|
+
row: row2,
|
|
1440
|
+
isCellSelected
|
|
1441
|
+
})
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
const SummaryCell$1 = /* @__PURE__ */ memo(SummaryCell);
|
|
1445
|
+
var css_248z$4 = ".snfqesz700-beta13.r1otpg64700-beta13{line-height:var(--rdg-summary-row-height)}.snfqesz700-beta13.r1otpg64700-beta13>.c1wupbe700-beta13{position:sticky}.s1jijrjz700-beta13>.c1wupbe700-beta13{border-block-start:2px solid var(--rdg-summary-border-color)}";
|
|
1446
|
+
styleInject(css_248z$4, { "insertAt": "top" });
|
|
1447
|
+
const summaryRow = "snfqesz700-beta13";
|
|
1448
|
+
const summaryRowBorderClassname = "s1jijrjz700-beta13";
|
|
1449
|
+
const summaryRowClassname = `rdg-summary-row ${summaryRow}`;
|
|
1450
|
+
function SummaryRow({
|
|
1451
|
+
rowIdx,
|
|
1452
|
+
gridRowStart,
|
|
1453
|
+
row: row2,
|
|
1454
|
+
viewportColumns,
|
|
1455
|
+
top,
|
|
1456
|
+
bottom,
|
|
1457
|
+
lastFrozenColumnIndex,
|
|
1458
|
+
selectedCellIdx,
|
|
1459
|
+
selectCell,
|
|
1460
|
+
"aria-rowindex": ariaRowIndex
|
|
1461
|
+
}) {
|
|
1462
|
+
const cells = [];
|
|
1463
|
+
for (let index = 0; index < viewportColumns.length; index++) {
|
|
1464
|
+
const column = viewportColumns[index];
|
|
1465
|
+
const colSpan = getColSpan(column, lastFrozenColumnIndex, {
|
|
1466
|
+
type: "SUMMARY",
|
|
1467
|
+
row: row2
|
|
1468
|
+
});
|
|
1469
|
+
if (colSpan !== void 0) {
|
|
1470
|
+
index += colSpan - 1;
|
|
1471
|
+
}
|
|
1472
|
+
const isCellSelected = selectedCellIdx === column.idx;
|
|
1473
|
+
cells.push(/* @__PURE__ */ jsx(SummaryCell$1, {
|
|
1474
|
+
column,
|
|
1475
|
+
colSpan,
|
|
1476
|
+
row: row2,
|
|
1477
|
+
isCellSelected,
|
|
1478
|
+
selectCell
|
|
1479
|
+
}, column.key));
|
|
1480
|
+
}
|
|
1481
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1482
|
+
role: "row",
|
|
1483
|
+
"aria-rowindex": ariaRowIndex,
|
|
1484
|
+
className: clsx(rowClassname, `rdg-row-${rowIdx % 2 === 0 ? "even" : "odd"}`, summaryRowClassname, rowIdx === 0 && summaryRowBorderClassname, selectedCellIdx === -1 && rowSelectedClassname),
|
|
1485
|
+
style: {
|
|
1486
|
+
...getRowStyle(gridRowStart),
|
|
1487
|
+
"--rdg-summary-row-top": top !== void 0 ? `${top}px` : void 0,
|
|
1488
|
+
"--rdg-summary-row-bottom": bottom !== void 0 ? `${bottom}px` : void 0
|
|
1489
|
+
},
|
|
1490
|
+
children: cells
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1493
|
+
const SummaryRow$1 = /* @__PURE__ */ memo(SummaryRow);
|
|
1494
|
+
var css_248z$3 = ".c1tngyp1700-beta13.rdg-cell{padding:0}";
|
|
1495
|
+
styleInject(css_248z$3, { "insertAt": "top" });
|
|
1496
|
+
const cellEditing = "c1tngyp1700-beta13";
|
|
1497
|
+
function EditCell({
|
|
1498
|
+
column,
|
|
1499
|
+
colSpan,
|
|
1500
|
+
row: row2,
|
|
1501
|
+
onRowChange,
|
|
1502
|
+
closeEditor
|
|
1503
|
+
}) {
|
|
1504
|
+
const frameRequestRef = useRef();
|
|
1505
|
+
const commitOnOutsideClick = column.editorOptions?.commitOnOutsideClick !== false;
|
|
1506
|
+
const commitOnOutsideMouseDown = useLatestFunc(() => {
|
|
1507
|
+
onClose(true);
|
|
1508
|
+
});
|
|
1509
|
+
useEffect(() => {
|
|
1510
|
+
if (!commitOnOutsideClick) return;
|
|
1511
|
+
function onWindowCaptureMouseDown() {
|
|
1512
|
+
frameRequestRef.current = requestAnimationFrame(commitOnOutsideMouseDown);
|
|
1513
|
+
}
|
|
1514
|
+
addEventListener("mousedown", onWindowCaptureMouseDown, {
|
|
1515
|
+
capture: true
|
|
1516
|
+
});
|
|
1517
|
+
return () => {
|
|
1518
|
+
removeEventListener("mousedown", onWindowCaptureMouseDown, {
|
|
1519
|
+
capture: true
|
|
1520
|
+
});
|
|
1521
|
+
cancelFrameRequest();
|
|
1522
|
+
};
|
|
1523
|
+
}, [commitOnOutsideClick, commitOnOutsideMouseDown]);
|
|
1524
|
+
function cancelFrameRequest() {
|
|
1525
|
+
cancelAnimationFrame(frameRequestRef.current);
|
|
1526
|
+
}
|
|
1527
|
+
function onKeyDown(event) {
|
|
1528
|
+
if (event.key === "Escape") {
|
|
1529
|
+
event.stopPropagation();
|
|
1530
|
+
onClose();
|
|
1531
|
+
} else if (event.key === "Enter") {
|
|
1532
|
+
event.stopPropagation();
|
|
1533
|
+
onClose(true);
|
|
1534
|
+
} else {
|
|
1535
|
+
const onNavigation = column.editorOptions?.onNavigation ?? onEditorNavigation;
|
|
1536
|
+
if (!onNavigation(event)) {
|
|
1537
|
+
event.stopPropagation();
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
function onClose(commitChanges) {
|
|
1542
|
+
if (commitChanges) {
|
|
1543
|
+
onRowChange(row2, true);
|
|
1544
|
+
} else {
|
|
1545
|
+
closeEditor();
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
const {
|
|
1549
|
+
cellClass
|
|
1550
|
+
} = column;
|
|
1551
|
+
const className = getCellClassname(column, "rdg-editor-container", typeof cellClass === "function" ? cellClass(row2) : cellClass, !column.editorOptions?.renderFormatter && cellEditing);
|
|
1552
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1553
|
+
role: "gridcell",
|
|
1554
|
+
"aria-colindex": column.idx + 1,
|
|
1555
|
+
"aria-colspan": colSpan,
|
|
1556
|
+
"aria-selected": true,
|
|
1557
|
+
className,
|
|
1558
|
+
style: getCellStyle(column, colSpan),
|
|
1559
|
+
onKeyDown,
|
|
1560
|
+
onMouseDownCapture: commitOnOutsideClick ? cancelFrameRequest : void 0,
|
|
1561
|
+
children: column.editor != null && /* @__PURE__ */ jsxs(Fragment, {
|
|
1562
|
+
children: [/* @__PURE__ */ jsx(column.editor, {
|
|
1563
|
+
column,
|
|
1564
|
+
row: row2,
|
|
1565
|
+
onRowChange,
|
|
1566
|
+
onClose
|
|
1567
|
+
}), column.editorOptions?.renderFormatter && /* @__PURE__ */ jsx(column.formatter, {
|
|
1568
|
+
column,
|
|
1569
|
+
row: row2,
|
|
1570
|
+
isCellSelected: true,
|
|
1571
|
+
onRowChange
|
|
1572
|
+
})]
|
|
1573
|
+
})
|
|
1574
|
+
});
|
|
1575
|
+
}
|
|
1576
|
+
var css_248z$2 = ".cadd3bp700-beta13{background-color:var(--rdg-selection-color);block-size:8px;cursor:move;inline-size:8px;inset-block-end:0;inset-inline-end:0;position:absolute}.cadd3bp700-beta13:hover{background-color:var(--rdg-background-color);block-size:16px;border:2px solid var(--rdg-selection-color);inline-size:16px}";
|
|
1577
|
+
styleInject(css_248z$2, { "insertAt": "top" });
|
|
1578
|
+
const cellDragHandle = "cadd3bp700-beta13";
|
|
1579
|
+
const cellDragHandleClassname = `rdg-cell-drag-handle ${cellDragHandle}`;
|
|
1580
|
+
function DragHandle({
|
|
1581
|
+
rows,
|
|
1582
|
+
columns,
|
|
1583
|
+
selectedPosition,
|
|
1584
|
+
latestDraggedOverRowIdx,
|
|
1585
|
+
isCellEditable: isCellEditable2,
|
|
1586
|
+
onRowsChange,
|
|
1587
|
+
onFill,
|
|
1588
|
+
setDragging,
|
|
1589
|
+
setDraggedOverRowIdx
|
|
1590
|
+
}) {
|
|
1591
|
+
function handleMouseDown(event) {
|
|
1592
|
+
if (event.buttons !== 1) return;
|
|
1593
|
+
setDragging(true);
|
|
1594
|
+
window.addEventListener("mouseover", onMouseOver);
|
|
1595
|
+
window.addEventListener("mouseup", onMouseUp);
|
|
1596
|
+
function onMouseOver(event2) {
|
|
1597
|
+
if (event2.buttons !== 1) onMouseUp();
|
|
1598
|
+
}
|
|
1599
|
+
function onMouseUp() {
|
|
1600
|
+
window.removeEventListener("mouseover", onMouseOver);
|
|
1601
|
+
window.removeEventListener("mouseup", onMouseUp);
|
|
1602
|
+
setDragging(false);
|
|
1603
|
+
handleDragEnd();
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
function handleDragEnd() {
|
|
1607
|
+
const overRowIdx = latestDraggedOverRowIdx.current;
|
|
1608
|
+
if (overRowIdx === void 0) return;
|
|
1609
|
+
const {
|
|
1610
|
+
rowIdx
|
|
1611
|
+
} = selectedPosition;
|
|
1612
|
+
const startRowIndex = rowIdx < overRowIdx ? rowIdx + 1 : overRowIdx;
|
|
1613
|
+
const endRowIndex = rowIdx < overRowIdx ? overRowIdx + 1 : rowIdx;
|
|
1614
|
+
updateRows(startRowIndex, endRowIndex);
|
|
1615
|
+
setDraggedOverRowIdx(void 0);
|
|
1616
|
+
}
|
|
1617
|
+
function handleDoubleClick(event) {
|
|
1618
|
+
event.stopPropagation();
|
|
1619
|
+
updateRows(selectedPosition.rowIdx + 1, rows.length);
|
|
1620
|
+
}
|
|
1621
|
+
function updateRows(startRowIdx, endRowIdx) {
|
|
1622
|
+
const {
|
|
1623
|
+
idx,
|
|
1624
|
+
rowIdx
|
|
1625
|
+
} = selectedPosition;
|
|
1626
|
+
const column = columns[idx];
|
|
1627
|
+
const sourceRow = rows[rowIdx];
|
|
1628
|
+
const updatedRows = [...rows];
|
|
1629
|
+
const indexes = [];
|
|
1630
|
+
for (let i = startRowIdx; i < endRowIdx; i++) {
|
|
1631
|
+
if (isCellEditable2({
|
|
1632
|
+
rowIdx: i,
|
|
1633
|
+
idx
|
|
1634
|
+
})) {
|
|
1635
|
+
const updatedRow = onFill({
|
|
1636
|
+
columnKey: column.key,
|
|
1637
|
+
sourceRow,
|
|
1638
|
+
targetRow: rows[i]
|
|
1639
|
+
});
|
|
1640
|
+
if (updatedRow !== rows[i]) {
|
|
1641
|
+
updatedRows[i] = updatedRow;
|
|
1642
|
+
indexes.push(i);
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
if (indexes.length > 0) {
|
|
1647
|
+
onRowsChange?.(updatedRows, {
|
|
1648
|
+
indexes,
|
|
1649
|
+
column
|
|
1650
|
+
});
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1654
|
+
className: cellDragHandleClassname,
|
|
1655
|
+
onMouseDown: handleMouseDown,
|
|
1656
|
+
onDoubleClick: handleDoubleClick
|
|
1657
|
+
});
|
|
1658
|
+
}
|
|
1659
|
+
var css_248z$1 = ".a888944700-beta13{fill:currentColor}.a888944700-beta13>path{transition:d .1s}";
|
|
1660
|
+
styleInject(css_248z$1, { "insertAt": "top" });
|
|
1661
|
+
const arrow = "a888944700-beta13";
|
|
1662
|
+
const arrowClassname = `rdg-sort-arrow ${arrow}`;
|
|
1663
|
+
function SortIcon({
|
|
1664
|
+
sortDirection
|
|
1665
|
+
}) {
|
|
1666
|
+
return sortDirection !== void 0 ? /* @__PURE__ */ jsx("svg", {
|
|
1667
|
+
viewBox: "0 0 12 8",
|
|
1668
|
+
width: "12",
|
|
1669
|
+
height: "8",
|
|
1670
|
+
className: arrowClassname,
|
|
1671
|
+
"aria-hidden": true,
|
|
1672
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
1673
|
+
d: sortDirection === "ASC" ? "M0 8 6 0 12 8" : "M0 0 6 8 12 0"
|
|
1674
|
+
})
|
|
1675
|
+
}) : null;
|
|
1676
|
+
}
|
|
1677
|
+
const initialPosition = {
|
|
1678
|
+
idx: -1,
|
|
1679
|
+
rowIdx: -2,
|
|
1680
|
+
mode: "SELECT"
|
|
1681
|
+
};
|
|
1682
|
+
function DataGrid({
|
|
1683
|
+
columns: rawColumns,
|
|
1684
|
+
rows: rawRows,
|
|
1685
|
+
summaryRows,
|
|
1686
|
+
rowKeyGetter,
|
|
1687
|
+
onRowsChange,
|
|
1688
|
+
rowHeight,
|
|
1689
|
+
headerRowHeight: rawHeaderRowHeight,
|
|
1690
|
+
summaryRowHeight: rawSummaryRowHeight,
|
|
1691
|
+
selectedRows,
|
|
1692
|
+
onSelectedRowsChange,
|
|
1693
|
+
sortColumns,
|
|
1694
|
+
onSortColumnsChange,
|
|
1695
|
+
defaultColumnOptions,
|
|
1696
|
+
groupBy: rawGroupBy,
|
|
1697
|
+
rowGrouper,
|
|
1698
|
+
expandedGroupIds,
|
|
1699
|
+
onExpandedGroupIdsChange,
|
|
1700
|
+
onRowClick,
|
|
1701
|
+
onRowDoubleClick,
|
|
1702
|
+
onScroll,
|
|
1703
|
+
onColumnResize,
|
|
1704
|
+
onFill,
|
|
1705
|
+
onCopy,
|
|
1706
|
+
onPaste,
|
|
1707
|
+
cellNavigationMode: rawCellNavigationMode,
|
|
1708
|
+
enableVirtualization,
|
|
1709
|
+
components,
|
|
1710
|
+
className,
|
|
1711
|
+
style,
|
|
1712
|
+
rowClass,
|
|
1713
|
+
direction,
|
|
1714
|
+
"aria-label": ariaLabel,
|
|
1715
|
+
"aria-labelledby": ariaLabelledBy,
|
|
1716
|
+
"aria-describedby": ariaDescribedBy,
|
|
1717
|
+
"data-testid": testId
|
|
1718
|
+
}, ref) {
|
|
1719
|
+
const defaultComponents = useDefaultComponents();
|
|
1720
|
+
rowHeight ?? (rowHeight = 35);
|
|
1721
|
+
const headerRowHeight = rawHeaderRowHeight ?? (typeof rowHeight === "number" ? rowHeight : 35);
|
|
1722
|
+
const summaryRowHeight = rawSummaryRowHeight ?? (typeof rowHeight === "number" ? rowHeight : 35);
|
|
1723
|
+
const RowRenderer = components?.rowRenderer ?? defaultComponents?.rowRenderer ?? Row$1;
|
|
1724
|
+
const sortIcon = components?.sortIcon ?? defaultComponents?.sortIcon ?? SortIcon;
|
|
1725
|
+
const checkboxFormatter = components?.checkboxFormatter ?? defaultComponents?.checkboxFormatter ?? CheckboxFormatter;
|
|
1726
|
+
const noRowsFallback = components?.noRowsFallback ?? defaultComponents?.noRowsFallback;
|
|
1727
|
+
const cellNavigationMode = rawCellNavigationMode ?? "NONE";
|
|
1728
|
+
enableVirtualization ?? (enableVirtualization = true);
|
|
1729
|
+
direction ?? (direction = "ltr");
|
|
1730
|
+
const [scrollTop, setScrollTop] = useState(0);
|
|
1731
|
+
const [scrollLeft, setScrollLeft] = useState(0);
|
|
1732
|
+
const [columnWidths, setColumnWidths] = useState(() => /* @__PURE__ */ new Map());
|
|
1733
|
+
const [selectedPosition, setSelectedPosition] = useState(initialPosition);
|
|
1734
|
+
const [copiedCell, setCopiedCell] = useState(null);
|
|
1735
|
+
const [isDragging, setDragging] = useState(false);
|
|
1736
|
+
const [draggedOverRowIdx, setOverRowIdx] = useState(void 0);
|
|
1737
|
+
const [autoResizeColumn, setAutoResizeColumn] = useState(null);
|
|
1738
|
+
const prevSelectedPosition = useRef(selectedPosition);
|
|
1739
|
+
const latestDraggedOverRowIdx = useRef(draggedOverRowIdx);
|
|
1740
|
+
const lastSelectedRowIdx = useRef(-1);
|
|
1741
|
+
const rowRef = useRef(null);
|
|
1742
|
+
const [gridRef, gridWidth, gridHeight] = useGridDimensions();
|
|
1743
|
+
const headerRowsCount = 1;
|
|
1744
|
+
const summaryRowsCount = summaryRows?.length ?? 0;
|
|
1745
|
+
const clientHeight = gridHeight - headerRowHeight - summaryRowsCount * summaryRowHeight;
|
|
1746
|
+
const isSelectable = selectedRows != null && onSelectedRowsChange != null;
|
|
1747
|
+
const isHeaderRowSelected = selectedPosition.rowIdx === -1;
|
|
1748
|
+
const isRtl = direction === "rtl";
|
|
1749
|
+
const leftKey = isRtl ? "ArrowRight" : "ArrowLeft";
|
|
1750
|
+
const rightKey = isRtl ? "ArrowLeft" : "ArrowRight";
|
|
1751
|
+
const defaultGridComponents = useMemo(() => ({
|
|
1752
|
+
sortIcon,
|
|
1753
|
+
checkboxFormatter
|
|
1754
|
+
}), [sortIcon, checkboxFormatter]);
|
|
1755
|
+
const allRowsSelected = useMemo(() => {
|
|
1756
|
+
const {
|
|
1757
|
+
length
|
|
1758
|
+
} = rawRows;
|
|
1759
|
+
return length !== 0 && selectedRows != null && rowKeyGetter != null && selectedRows.size >= length && rawRows.every((row2) => selectedRows.has(rowKeyGetter(row2)));
|
|
1760
|
+
}, [rawRows, selectedRows, rowKeyGetter]);
|
|
1761
|
+
const {
|
|
1762
|
+
columns,
|
|
1763
|
+
colSpanColumns,
|
|
1764
|
+
colOverscanStartIdx,
|
|
1765
|
+
colOverscanEndIdx,
|
|
1766
|
+
layoutCssVars,
|
|
1767
|
+
columnMetrics,
|
|
1768
|
+
lastFrozenColumnIndex,
|
|
1769
|
+
totalFrozenColumnWidth,
|
|
1770
|
+
groupBy
|
|
1771
|
+
} = useCalculatedColumns({
|
|
1772
|
+
rawColumns,
|
|
1773
|
+
columnWidths,
|
|
1774
|
+
scrollLeft,
|
|
1775
|
+
viewportWidth: gridWidth,
|
|
1776
|
+
defaultColumnOptions,
|
|
1777
|
+
rawGroupBy: rowGrouper ? rawGroupBy : void 0,
|
|
1778
|
+
enableVirtualization
|
|
1779
|
+
});
|
|
1780
|
+
const {
|
|
1781
|
+
rowOverscanStartIdx,
|
|
1782
|
+
rowOverscanEndIdx,
|
|
1783
|
+
rows,
|
|
1784
|
+
rowsCount,
|
|
1785
|
+
totalRowHeight,
|
|
1786
|
+
gridTemplateRows,
|
|
1787
|
+
isGroupRow,
|
|
1788
|
+
getRowTop,
|
|
1789
|
+
getRowHeight,
|
|
1790
|
+
findRowIdx
|
|
1791
|
+
} = useViewportRows({
|
|
1792
|
+
rawRows,
|
|
1793
|
+
groupBy,
|
|
1794
|
+
rowGrouper,
|
|
1795
|
+
rowHeight,
|
|
1796
|
+
clientHeight,
|
|
1797
|
+
scrollTop,
|
|
1798
|
+
expandedGroupIds,
|
|
1799
|
+
enableVirtualization
|
|
1800
|
+
});
|
|
1801
|
+
const viewportColumns = useViewportColumns({
|
|
1802
|
+
columns,
|
|
1803
|
+
colSpanColumns,
|
|
1804
|
+
colOverscanStartIdx,
|
|
1805
|
+
colOverscanEndIdx,
|
|
1806
|
+
lastFrozenColumnIndex,
|
|
1807
|
+
rowOverscanStartIdx,
|
|
1808
|
+
rowOverscanEndIdx,
|
|
1809
|
+
rows,
|
|
1810
|
+
summaryRows,
|
|
1811
|
+
isGroupRow
|
|
1812
|
+
});
|
|
1813
|
+
const hasGroups = groupBy.length > 0 && typeof rowGrouper === "function";
|
|
1814
|
+
const minColIdx = hasGroups ? -1 : 0;
|
|
1815
|
+
const maxColIdx = columns.length - 1;
|
|
1816
|
+
const minRowIdx = -1;
|
|
1817
|
+
const maxRowIdx = headerRowsCount + rows.length + summaryRowsCount - 2;
|
|
1818
|
+
const selectedCellIsWithinSelectionBounds = isCellWithinSelectionBounds(selectedPosition);
|
|
1819
|
+
const selectedCellIsWithinViewportBounds = isCellWithinViewportBounds(selectedPosition);
|
|
1820
|
+
const selectRowLatest = useLatestFunc(selectRow);
|
|
1821
|
+
const selectAllRowsLatest = useLatestFunc(selectAllRows);
|
|
1822
|
+
const handleFormatterRowChangeLatest = useLatestFunc(updateRow);
|
|
1823
|
+
const selectViewportCellLatest = useLatestFunc((row2, column, enableEditor) => {
|
|
1824
|
+
const rowIdx = rows.indexOf(row2);
|
|
1825
|
+
selectCell({
|
|
1826
|
+
rowIdx,
|
|
1827
|
+
idx: column.idx
|
|
1828
|
+
}, enableEditor);
|
|
1829
|
+
});
|
|
1830
|
+
const selectGroupLatest = useLatestFunc((rowIdx) => {
|
|
1831
|
+
selectCell({
|
|
1832
|
+
rowIdx,
|
|
1833
|
+
idx: -1
|
|
1834
|
+
});
|
|
1835
|
+
});
|
|
1836
|
+
const selectHeaderCellLatest = useLatestFunc((idx) => {
|
|
1837
|
+
selectCell({
|
|
1838
|
+
rowIdx: -1,
|
|
1839
|
+
idx
|
|
1840
|
+
});
|
|
1841
|
+
});
|
|
1842
|
+
const selectSummaryCellLatest = useLatestFunc((summaryRow2, column) => {
|
|
1843
|
+
const rowIdx = summaryRows.indexOf(summaryRow2) + headerRowsCount + rows.length - 1;
|
|
1844
|
+
selectCell({
|
|
1845
|
+
rowIdx,
|
|
1846
|
+
idx: column.idx
|
|
1847
|
+
});
|
|
1848
|
+
});
|
|
1849
|
+
const toggleGroupLatest = useLatestFunc(toggleGroup);
|
|
1850
|
+
useLayoutEffect(() => {
|
|
1851
|
+
if (!selectedCellIsWithinSelectionBounds || isSamePosition(selectedPosition, prevSelectedPosition.current)) {
|
|
1852
|
+
prevSelectedPosition.current = selectedPosition;
|
|
1853
|
+
return;
|
|
1854
|
+
}
|
|
1855
|
+
prevSelectedPosition.current = selectedPosition;
|
|
1856
|
+
if (selectedPosition.idx === -1) {
|
|
1857
|
+
rowRef.current.focus({
|
|
1858
|
+
preventScroll: true
|
|
1859
|
+
});
|
|
1860
|
+
scrollIntoView(rowRef.current);
|
|
1861
|
+
}
|
|
1862
|
+
});
|
|
1863
|
+
useLayoutEffect(() => {
|
|
1864
|
+
if (autoResizeColumn === null) return;
|
|
1865
|
+
const columnElement = gridRef.current.querySelector(`[aria-colindex="${autoResizeColumn.idx + 1}"]`);
|
|
1866
|
+
const {
|
|
1867
|
+
width
|
|
1868
|
+
} = columnElement.getBoundingClientRect();
|
|
1869
|
+
setColumnWidths((columnWidths2) => {
|
|
1870
|
+
const newColumnWidths = new Map(columnWidths2);
|
|
1871
|
+
newColumnWidths.set(autoResizeColumn.key, width);
|
|
1872
|
+
return newColumnWidths;
|
|
1873
|
+
});
|
|
1874
|
+
setAutoResizeColumn(null);
|
|
1875
|
+
onColumnResize?.(autoResizeColumn.idx, width);
|
|
1876
|
+
}, [autoResizeColumn, gridRef, onColumnResize]);
|
|
1877
|
+
useImperativeHandle(ref, () => ({
|
|
1878
|
+
element: gridRef.current,
|
|
1879
|
+
scrollToColumn,
|
|
1880
|
+
scrollToRow(rowIdx) {
|
|
1881
|
+
const {
|
|
1882
|
+
current
|
|
1883
|
+
} = gridRef;
|
|
1884
|
+
if (!current) return;
|
|
1885
|
+
current.scrollTo({
|
|
1886
|
+
top: getRowTop(rowIdx),
|
|
1887
|
+
behavior: "smooth"
|
|
1888
|
+
});
|
|
1889
|
+
},
|
|
1890
|
+
selectCell
|
|
1891
|
+
}));
|
|
1892
|
+
const handleColumnResize = useCallback((column, width) => {
|
|
1893
|
+
if (width === "auto") {
|
|
1894
|
+
setAutoResizeColumn(column);
|
|
1895
|
+
return;
|
|
1896
|
+
}
|
|
1897
|
+
setColumnWidths((columnWidths2) => {
|
|
1898
|
+
const newColumnWidths = new Map(columnWidths2);
|
|
1899
|
+
newColumnWidths.set(column.key, width);
|
|
1900
|
+
return newColumnWidths;
|
|
1901
|
+
});
|
|
1902
|
+
onColumnResize?.(column.idx, width);
|
|
1903
|
+
}, [onColumnResize]);
|
|
1904
|
+
const setDraggedOverRowIdx = useCallback((rowIdx) => {
|
|
1905
|
+
setOverRowIdx(rowIdx);
|
|
1906
|
+
latestDraggedOverRowIdx.current = rowIdx;
|
|
1907
|
+
}, []);
|
|
1908
|
+
function selectRow({
|
|
1909
|
+
row: row2,
|
|
1910
|
+
checked,
|
|
1911
|
+
isShiftClick
|
|
1912
|
+
}) {
|
|
1913
|
+
if (!onSelectedRowsChange) return;
|
|
1914
|
+
assertIsValidKeyGetter(rowKeyGetter);
|
|
1915
|
+
const newSelectedRows = new Set(selectedRows);
|
|
1916
|
+
if (isGroupRow(row2)) {
|
|
1917
|
+
for (const childRow of row2.childRows) {
|
|
1918
|
+
const rowKey2 = rowKeyGetter(childRow);
|
|
1919
|
+
if (checked) {
|
|
1920
|
+
newSelectedRows.add(rowKey2);
|
|
1921
|
+
} else {
|
|
1922
|
+
newSelectedRows.delete(rowKey2);
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
onSelectedRowsChange(newSelectedRows);
|
|
1926
|
+
return;
|
|
1927
|
+
}
|
|
1928
|
+
const rowKey = rowKeyGetter(row2);
|
|
1929
|
+
if (checked) {
|
|
1930
|
+
newSelectedRows.add(rowKey);
|
|
1931
|
+
const previousRowIdx = lastSelectedRowIdx.current;
|
|
1932
|
+
const rowIdx = rows.indexOf(row2);
|
|
1933
|
+
lastSelectedRowIdx.current = rowIdx;
|
|
1934
|
+
if (isShiftClick && previousRowIdx !== -1 && previousRowIdx !== rowIdx) {
|
|
1935
|
+
const step = sign(rowIdx - previousRowIdx);
|
|
1936
|
+
for (let i = previousRowIdx + step; i !== rowIdx; i += step) {
|
|
1937
|
+
const row3 = rows[i];
|
|
1938
|
+
if (isGroupRow(row3)) continue;
|
|
1939
|
+
newSelectedRows.add(rowKeyGetter(row3));
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
} else {
|
|
1943
|
+
newSelectedRows.delete(rowKey);
|
|
1944
|
+
lastSelectedRowIdx.current = -1;
|
|
1945
|
+
}
|
|
1946
|
+
onSelectedRowsChange(newSelectedRows);
|
|
1947
|
+
}
|
|
1948
|
+
function selectAllRows(checked) {
|
|
1949
|
+
if (!onSelectedRowsChange) return;
|
|
1950
|
+
assertIsValidKeyGetter(rowKeyGetter);
|
|
1951
|
+
const newSelectedRows = new Set(selectedRows);
|
|
1952
|
+
for (const row2 of rawRows) {
|
|
1953
|
+
const rowKey = rowKeyGetter(row2);
|
|
1954
|
+
if (checked) {
|
|
1955
|
+
newSelectedRows.add(rowKey);
|
|
1956
|
+
} else {
|
|
1957
|
+
newSelectedRows.delete(rowKey);
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
onSelectedRowsChange(newSelectedRows);
|
|
1961
|
+
}
|
|
1962
|
+
function toggleGroup(expandedGroupId) {
|
|
1963
|
+
if (!onExpandedGroupIdsChange) return;
|
|
1964
|
+
const newExpandedGroupIds = new Set(expandedGroupIds);
|
|
1965
|
+
if (newExpandedGroupIds.has(expandedGroupId)) {
|
|
1966
|
+
newExpandedGroupIds.delete(expandedGroupId);
|
|
1967
|
+
} else {
|
|
1968
|
+
newExpandedGroupIds.add(expandedGroupId);
|
|
1969
|
+
}
|
|
1970
|
+
onExpandedGroupIdsChange(newExpandedGroupIds);
|
|
1971
|
+
}
|
|
1972
|
+
function handleKeyDown(event) {
|
|
1973
|
+
if (!(event.target instanceof Element)) return;
|
|
1974
|
+
const isCellEvent = event.target.closest(".rdg-cell") !== null;
|
|
1975
|
+
const isRowEvent = hasGroups && event.target === rowRef.current;
|
|
1976
|
+
if (!isCellEvent && !isRowEvent) return;
|
|
1977
|
+
const {
|
|
1978
|
+
key,
|
|
1979
|
+
keyCode
|
|
1980
|
+
} = event;
|
|
1981
|
+
const {
|
|
1982
|
+
rowIdx
|
|
1983
|
+
} = selectedPosition;
|
|
1984
|
+
if (selectedCellIsWithinViewportBounds && (onPaste != null || onCopy != null) && isCtrlKeyHeldDown(event) && !isGroupRow(rows[rowIdx]) && selectedPosition.mode === "SELECT") {
|
|
1985
|
+
const cKey = 67;
|
|
1986
|
+
const vKey = 86;
|
|
1987
|
+
if (keyCode === cKey) {
|
|
1988
|
+
handleCopy();
|
|
1989
|
+
return;
|
|
1990
|
+
}
|
|
1991
|
+
if (keyCode === vKey) {
|
|
1992
|
+
handlePaste();
|
|
1993
|
+
return;
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
if (isRowIdxWithinViewportBounds(rowIdx)) {
|
|
1997
|
+
const row2 = rows[rowIdx];
|
|
1998
|
+
if (isGroupRow(row2) && selectedPosition.idx === -1 && (key === leftKey && row2.isExpanded || key === rightKey && !row2.isExpanded)) {
|
|
1999
|
+
event.preventDefault();
|
|
2000
|
+
toggleGroup(row2.id);
|
|
2001
|
+
return;
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
switch (event.key) {
|
|
2005
|
+
case "Escape":
|
|
2006
|
+
setCopiedCell(null);
|
|
2007
|
+
return;
|
|
2008
|
+
case "ArrowUp":
|
|
2009
|
+
case "ArrowDown":
|
|
2010
|
+
case "ArrowLeft":
|
|
2011
|
+
case "ArrowRight":
|
|
2012
|
+
case "Tab":
|
|
2013
|
+
case "Home":
|
|
2014
|
+
case "End":
|
|
2015
|
+
case "PageUp":
|
|
2016
|
+
case "PageDown":
|
|
2017
|
+
navigate(event);
|
|
2018
|
+
break;
|
|
2019
|
+
default:
|
|
2020
|
+
handleCellInput(event);
|
|
2021
|
+
break;
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
function handleScroll(event) {
|
|
2025
|
+
const {
|
|
2026
|
+
scrollTop: scrollTop2,
|
|
2027
|
+
scrollLeft: scrollLeft2
|
|
2028
|
+
} = event.currentTarget;
|
|
2029
|
+
setScrollTop(scrollTop2);
|
|
2030
|
+
setScrollLeft(abs(scrollLeft2));
|
|
2031
|
+
onScroll?.(event);
|
|
2032
|
+
}
|
|
2033
|
+
function getRawRowIdx(rowIdx) {
|
|
2034
|
+
return hasGroups ? rawRows.indexOf(rows[rowIdx]) : rowIdx;
|
|
2035
|
+
}
|
|
2036
|
+
function updateRow(rowIdx, row2) {
|
|
2037
|
+
if (typeof onRowsChange !== "function") return;
|
|
2038
|
+
const rawRowIdx = getRawRowIdx(rowIdx);
|
|
2039
|
+
if (row2 === rawRows[rawRowIdx]) return;
|
|
2040
|
+
const updatedRows = [...rawRows];
|
|
2041
|
+
updatedRows[rawRowIdx] = row2;
|
|
2042
|
+
onRowsChange(updatedRows, {
|
|
2043
|
+
indexes: [rawRowIdx],
|
|
2044
|
+
column: columns[selectedPosition.idx]
|
|
2045
|
+
});
|
|
2046
|
+
}
|
|
2047
|
+
function commitEditorChanges() {
|
|
2048
|
+
if (selectedPosition.mode !== "EDIT") return;
|
|
2049
|
+
updateRow(selectedPosition.rowIdx, selectedPosition.row);
|
|
2050
|
+
}
|
|
2051
|
+
function handleCopy() {
|
|
2052
|
+
const {
|
|
2053
|
+
idx,
|
|
2054
|
+
rowIdx
|
|
2055
|
+
} = selectedPosition;
|
|
2056
|
+
const sourceRow = rawRows[getRawRowIdx(rowIdx)];
|
|
2057
|
+
const sourceColumnKey = columns[idx].key;
|
|
2058
|
+
setCopiedCell({
|
|
2059
|
+
row: sourceRow,
|
|
2060
|
+
columnKey: sourceColumnKey
|
|
2061
|
+
});
|
|
2062
|
+
onCopy?.({
|
|
2063
|
+
sourceRow,
|
|
2064
|
+
sourceColumnKey
|
|
2065
|
+
});
|
|
2066
|
+
}
|
|
2067
|
+
function handlePaste() {
|
|
2068
|
+
if (!onPaste || !onRowsChange || copiedCell === null || !isCellEditable2(selectedPosition)) {
|
|
2069
|
+
return;
|
|
2070
|
+
}
|
|
2071
|
+
const {
|
|
2072
|
+
idx,
|
|
2073
|
+
rowIdx
|
|
2074
|
+
} = selectedPosition;
|
|
2075
|
+
const targetRow = rawRows[getRawRowIdx(rowIdx)];
|
|
2076
|
+
const updatedTargetRow = onPaste({
|
|
2077
|
+
sourceRow: copiedCell.row,
|
|
2078
|
+
sourceColumnKey: copiedCell.columnKey,
|
|
2079
|
+
targetRow,
|
|
2080
|
+
targetColumnKey: columns[idx].key
|
|
2081
|
+
});
|
|
2082
|
+
updateRow(rowIdx, updatedTargetRow);
|
|
2083
|
+
}
|
|
2084
|
+
function handleCellInput(event) {
|
|
2085
|
+
if (!selectedCellIsWithinViewportBounds) return;
|
|
2086
|
+
const row2 = rows[selectedPosition.rowIdx];
|
|
2087
|
+
if (isGroupRow(row2)) return;
|
|
2088
|
+
const {
|
|
2089
|
+
key,
|
|
2090
|
+
shiftKey
|
|
2091
|
+
} = event;
|
|
2092
|
+
if (isSelectable && shiftKey && key === " ") {
|
|
2093
|
+
assertIsValidKeyGetter(rowKeyGetter);
|
|
2094
|
+
const rowKey = rowKeyGetter(row2);
|
|
2095
|
+
selectRow({
|
|
2096
|
+
row: row2,
|
|
2097
|
+
checked: !selectedRows.has(rowKey),
|
|
2098
|
+
isShiftClick: false
|
|
2099
|
+
});
|
|
2100
|
+
event.preventDefault();
|
|
2101
|
+
return;
|
|
2102
|
+
}
|
|
2103
|
+
const column = columns[selectedPosition.idx];
|
|
2104
|
+
column.editorOptions?.onCellKeyDown?.(event);
|
|
2105
|
+
if (event.isDefaultPrevented()) return;
|
|
2106
|
+
if (isCellEditable2(selectedPosition) && isDefaultCellInput(event)) {
|
|
2107
|
+
setSelectedPosition(({
|
|
2108
|
+
idx,
|
|
2109
|
+
rowIdx
|
|
2110
|
+
}) => ({
|
|
2111
|
+
idx,
|
|
2112
|
+
rowIdx,
|
|
2113
|
+
mode: "EDIT",
|
|
2114
|
+
row: row2,
|
|
2115
|
+
originalRow: row2
|
|
2116
|
+
}));
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
function isColIdxWithinSelectionBounds(idx) {
|
|
2120
|
+
return idx >= minColIdx && idx <= maxColIdx;
|
|
2121
|
+
}
|
|
2122
|
+
function isRowIdxWithinViewportBounds(rowIdx) {
|
|
2123
|
+
return rowIdx >= 0 && rowIdx < rows.length;
|
|
2124
|
+
}
|
|
2125
|
+
function isCellWithinSelectionBounds({
|
|
2126
|
+
idx,
|
|
2127
|
+
rowIdx
|
|
2128
|
+
}) {
|
|
2129
|
+
return rowIdx >= minRowIdx && rowIdx <= maxRowIdx && isColIdxWithinSelectionBounds(idx);
|
|
2130
|
+
}
|
|
2131
|
+
function isCellWithinViewportBounds({
|
|
2132
|
+
idx,
|
|
2133
|
+
rowIdx
|
|
2134
|
+
}) {
|
|
2135
|
+
return isRowIdxWithinViewportBounds(rowIdx) && isColIdxWithinSelectionBounds(idx);
|
|
2136
|
+
}
|
|
2137
|
+
function isCellEditable2(position) {
|
|
2138
|
+
return isCellWithinViewportBounds(position) && isSelectedCellEditable({
|
|
2139
|
+
columns,
|
|
2140
|
+
rows,
|
|
2141
|
+
selectedPosition: position,
|
|
2142
|
+
isGroupRow
|
|
2143
|
+
});
|
|
2144
|
+
}
|
|
2145
|
+
function selectCell(position, enableEditor) {
|
|
2146
|
+
if (!isCellWithinSelectionBounds(position)) return;
|
|
2147
|
+
commitEditorChanges();
|
|
2148
|
+
if (enableEditor && isCellEditable2(position)) {
|
|
2149
|
+
const row2 = rows[position.rowIdx];
|
|
2150
|
+
setSelectedPosition({
|
|
2151
|
+
...position,
|
|
2152
|
+
mode: "EDIT",
|
|
2153
|
+
row: row2,
|
|
2154
|
+
originalRow: row2
|
|
2155
|
+
});
|
|
2156
|
+
} else if (isSamePosition(selectedPosition, position)) {
|
|
2157
|
+
scrollIntoView(gridRef.current?.querySelector('[tabindex="0"]'));
|
|
2158
|
+
} else {
|
|
2159
|
+
setSelectedPosition({
|
|
2160
|
+
...position,
|
|
2161
|
+
mode: "SELECT"
|
|
2162
|
+
});
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
function scrollToColumn(idx) {
|
|
2166
|
+
const {
|
|
2167
|
+
current
|
|
2168
|
+
} = gridRef;
|
|
2169
|
+
if (!current) return;
|
|
2170
|
+
if (idx > lastFrozenColumnIndex) {
|
|
2171
|
+
const {
|
|
2172
|
+
rowIdx
|
|
2173
|
+
} = selectedPosition;
|
|
2174
|
+
if (!isCellWithinSelectionBounds({
|
|
2175
|
+
rowIdx,
|
|
2176
|
+
idx
|
|
2177
|
+
})) return;
|
|
2178
|
+
const {
|
|
2179
|
+
clientWidth
|
|
2180
|
+
} = current;
|
|
2181
|
+
const column = columns[idx];
|
|
2182
|
+
const {
|
|
2183
|
+
left,
|
|
2184
|
+
width
|
|
2185
|
+
} = columnMetrics.get(column);
|
|
2186
|
+
let right = left + width;
|
|
2187
|
+
const colSpan = getSelectedCellColSpan({
|
|
2188
|
+
rows,
|
|
2189
|
+
summaryRows,
|
|
2190
|
+
rowIdx,
|
|
2191
|
+
lastFrozenColumnIndex,
|
|
2192
|
+
column,
|
|
2193
|
+
isGroupRow
|
|
2194
|
+
});
|
|
2195
|
+
if (colSpan !== void 0) {
|
|
2196
|
+
const {
|
|
2197
|
+
left: left2,
|
|
2198
|
+
width: width2
|
|
2199
|
+
} = columnMetrics.get(columns[column.idx + colSpan - 1]);
|
|
2200
|
+
right = left2 + width2;
|
|
2201
|
+
}
|
|
2202
|
+
const isCellAtLeftBoundary = left < scrollLeft + totalFrozenColumnWidth;
|
|
2203
|
+
const isCellAtRightBoundary = right > clientWidth + scrollLeft;
|
|
2204
|
+
const sign2 = isRtl ? -1 : 1;
|
|
2205
|
+
if (isCellAtLeftBoundary) {
|
|
2206
|
+
current.scrollLeft = (left - totalFrozenColumnWidth) * sign2;
|
|
2207
|
+
} else if (isCellAtRightBoundary) {
|
|
2208
|
+
current.scrollLeft = (right - clientWidth) * sign2;
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
function getNextPosition(key, ctrlKey, shiftKey) {
|
|
2213
|
+
const {
|
|
2214
|
+
idx,
|
|
2215
|
+
rowIdx
|
|
2216
|
+
} = selectedPosition;
|
|
2217
|
+
const row2 = rows[rowIdx];
|
|
2218
|
+
const isRowSelected = selectedCellIsWithinSelectionBounds && idx === -1;
|
|
2219
|
+
if (key === leftKey && isRowSelected && isGroupRow(row2) && !row2.isExpanded && row2.level !== 0) {
|
|
2220
|
+
let parentRowIdx = -1;
|
|
2221
|
+
for (let i = selectedPosition.rowIdx - 1; i >= 0; i--) {
|
|
2222
|
+
const parentRow = rows[i];
|
|
2223
|
+
if (isGroupRow(parentRow) && parentRow.id === row2.parentId) {
|
|
2224
|
+
parentRowIdx = i;
|
|
2225
|
+
break;
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
if (parentRowIdx !== -1) {
|
|
2229
|
+
return {
|
|
2230
|
+
idx,
|
|
2231
|
+
rowIdx: parentRowIdx
|
|
2232
|
+
};
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
switch (key) {
|
|
2236
|
+
case "ArrowUp":
|
|
2237
|
+
return {
|
|
2238
|
+
idx,
|
|
2239
|
+
rowIdx: rowIdx - 1
|
|
2240
|
+
};
|
|
2241
|
+
case "ArrowDown":
|
|
2242
|
+
return {
|
|
2243
|
+
idx,
|
|
2244
|
+
rowIdx: rowIdx + 1
|
|
2245
|
+
};
|
|
2246
|
+
case leftKey:
|
|
2247
|
+
return {
|
|
2248
|
+
idx: idx - 1,
|
|
2249
|
+
rowIdx
|
|
2250
|
+
};
|
|
2251
|
+
case rightKey:
|
|
2252
|
+
return {
|
|
2253
|
+
idx: idx + 1,
|
|
2254
|
+
rowIdx
|
|
2255
|
+
};
|
|
2256
|
+
case "Tab":
|
|
2257
|
+
return {
|
|
2258
|
+
idx: idx + (shiftKey ? -1 : 1),
|
|
2259
|
+
rowIdx
|
|
2260
|
+
};
|
|
2261
|
+
case "Home":
|
|
2262
|
+
if (isRowSelected) return {
|
|
2263
|
+
idx,
|
|
2264
|
+
rowIdx: 0
|
|
2265
|
+
};
|
|
2266
|
+
return {
|
|
2267
|
+
idx: 0,
|
|
2268
|
+
rowIdx: ctrlKey ? minRowIdx : rowIdx
|
|
2269
|
+
};
|
|
2270
|
+
case "End":
|
|
2271
|
+
if (isRowSelected) return {
|
|
2272
|
+
idx,
|
|
2273
|
+
rowIdx: rows.length - 1
|
|
2274
|
+
};
|
|
2275
|
+
return {
|
|
2276
|
+
idx: maxColIdx,
|
|
2277
|
+
rowIdx: ctrlKey ? maxRowIdx : rowIdx
|
|
2278
|
+
};
|
|
2279
|
+
case "PageUp": {
|
|
2280
|
+
if (selectedPosition.rowIdx === minRowIdx) return selectedPosition;
|
|
2281
|
+
const nextRowY = getRowTop(rowIdx) + getRowHeight(rowIdx) - clientHeight;
|
|
2282
|
+
return {
|
|
2283
|
+
idx,
|
|
2284
|
+
rowIdx: nextRowY > 0 ? findRowIdx(nextRowY) : 0
|
|
2285
|
+
};
|
|
2286
|
+
}
|
|
2287
|
+
case "PageDown": {
|
|
2288
|
+
if (selectedPosition.rowIdx >= rows.length) return selectedPosition;
|
|
2289
|
+
const nextRowY = getRowTop(rowIdx) + clientHeight;
|
|
2290
|
+
return {
|
|
2291
|
+
idx,
|
|
2292
|
+
rowIdx: nextRowY < totalRowHeight ? findRowIdx(nextRowY) : rows.length - 1
|
|
2293
|
+
};
|
|
2294
|
+
}
|
|
2295
|
+
default:
|
|
2296
|
+
return selectedPosition;
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
function navigate(event) {
|
|
2300
|
+
const {
|
|
2301
|
+
key,
|
|
2302
|
+
shiftKey
|
|
2303
|
+
} = event;
|
|
2304
|
+
let mode = cellNavigationMode;
|
|
2305
|
+
if (key === "Tab") {
|
|
2306
|
+
if (canExitGrid({
|
|
2307
|
+
shiftKey,
|
|
2308
|
+
cellNavigationMode,
|
|
2309
|
+
maxColIdx,
|
|
2310
|
+
minRowIdx,
|
|
2311
|
+
maxRowIdx,
|
|
2312
|
+
selectedPosition
|
|
2313
|
+
})) {
|
|
2314
|
+
commitEditorChanges();
|
|
2315
|
+
return;
|
|
2316
|
+
}
|
|
2317
|
+
mode = cellNavigationMode === "NONE" ? "CHANGE_ROW" : cellNavigationMode;
|
|
2318
|
+
}
|
|
2319
|
+
event.preventDefault();
|
|
2320
|
+
const ctrlKey = isCtrlKeyHeldDown(event);
|
|
2321
|
+
const nextPosition = getNextPosition(key, ctrlKey, shiftKey);
|
|
2322
|
+
if (isSamePosition(selectedPosition, nextPosition)) return;
|
|
2323
|
+
const nextSelectedCellPosition = getNextSelectedCellPosition({
|
|
2324
|
+
columns,
|
|
2325
|
+
colSpanColumns,
|
|
2326
|
+
rows,
|
|
2327
|
+
summaryRows,
|
|
2328
|
+
minRowIdx,
|
|
2329
|
+
maxRowIdx,
|
|
2330
|
+
lastFrozenColumnIndex,
|
|
2331
|
+
cellNavigationMode: mode,
|
|
2332
|
+
currentPosition: selectedPosition,
|
|
2333
|
+
nextPosition,
|
|
2334
|
+
isCellWithinBounds: isCellWithinSelectionBounds,
|
|
2335
|
+
isGroupRow
|
|
2336
|
+
});
|
|
2337
|
+
selectCell(nextSelectedCellPosition);
|
|
2338
|
+
}
|
|
2339
|
+
function getDraggedOverCellIdx(currentRowIdx) {
|
|
2340
|
+
if (draggedOverRowIdx === void 0) return;
|
|
2341
|
+
const {
|
|
2342
|
+
rowIdx
|
|
2343
|
+
} = selectedPosition;
|
|
2344
|
+
const isDraggedOver = rowIdx < draggedOverRowIdx ? rowIdx < currentRowIdx && currentRowIdx <= draggedOverRowIdx : rowIdx > currentRowIdx && currentRowIdx >= draggedOverRowIdx;
|
|
2345
|
+
return isDraggedOver ? selectedPosition.idx : void 0;
|
|
2346
|
+
}
|
|
2347
|
+
function getLayoutCssVars() {
|
|
2348
|
+
if (autoResizeColumn === null) return layoutCssVars;
|
|
2349
|
+
const {
|
|
2350
|
+
gridTemplateColumns
|
|
2351
|
+
} = layoutCssVars;
|
|
2352
|
+
const newSizes = gridTemplateColumns.split(" ");
|
|
2353
|
+
newSizes[autoResizeColumn.idx] = "max-content";
|
|
2354
|
+
return {
|
|
2355
|
+
...layoutCssVars,
|
|
2356
|
+
gridTemplateColumns: newSizes.join(" ")
|
|
2357
|
+
};
|
|
2358
|
+
}
|
|
2359
|
+
function getDragHandle(rowIdx) {
|
|
2360
|
+
if (selectedPosition.rowIdx !== rowIdx || selectedPosition.mode === "EDIT" || hasGroups || onFill == null) {
|
|
2361
|
+
return;
|
|
2362
|
+
}
|
|
2363
|
+
return /* @__PURE__ */ jsx(DragHandle, {
|
|
2364
|
+
rows: rawRows,
|
|
2365
|
+
columns,
|
|
2366
|
+
selectedPosition,
|
|
2367
|
+
isCellEditable: isCellEditable2,
|
|
2368
|
+
latestDraggedOverRowIdx,
|
|
2369
|
+
onRowsChange,
|
|
2370
|
+
onFill,
|
|
2371
|
+
setDragging,
|
|
2372
|
+
setDraggedOverRowIdx
|
|
2373
|
+
});
|
|
2374
|
+
}
|
|
2375
|
+
function getCellEditor(rowIdx) {
|
|
2376
|
+
if (selectedPosition.rowIdx !== rowIdx || selectedPosition.mode === "SELECT") return;
|
|
2377
|
+
const {
|
|
2378
|
+
idx,
|
|
2379
|
+
row: row2
|
|
2380
|
+
} = selectedPosition;
|
|
2381
|
+
const column = columns[idx];
|
|
2382
|
+
const colSpan = getColSpan(column, lastFrozenColumnIndex, {
|
|
2383
|
+
type: "ROW",
|
|
2384
|
+
row: row2
|
|
2385
|
+
});
|
|
2386
|
+
const closeEditor = () => {
|
|
2387
|
+
setSelectedPosition(({
|
|
2388
|
+
idx: idx2,
|
|
2389
|
+
rowIdx: rowIdx2
|
|
2390
|
+
}) => ({
|
|
2391
|
+
idx: idx2,
|
|
2392
|
+
rowIdx: rowIdx2,
|
|
2393
|
+
mode: "SELECT"
|
|
2394
|
+
}));
|
|
2395
|
+
};
|
|
2396
|
+
const onRowChange = (row3, commitChanges) => {
|
|
2397
|
+
if (commitChanges) {
|
|
2398
|
+
updateRow(selectedPosition.rowIdx, row3);
|
|
2399
|
+
closeEditor();
|
|
2400
|
+
} else {
|
|
2401
|
+
setSelectedPosition((position) => ({
|
|
2402
|
+
...position,
|
|
2403
|
+
row: row3
|
|
2404
|
+
}));
|
|
2405
|
+
}
|
|
2406
|
+
};
|
|
2407
|
+
if (rows[selectedPosition.rowIdx] !== selectedPosition.originalRow) {
|
|
2408
|
+
closeEditor();
|
|
2409
|
+
}
|
|
2410
|
+
return /* @__PURE__ */ jsx(EditCell, {
|
|
2411
|
+
column,
|
|
2412
|
+
colSpan,
|
|
2413
|
+
row: row2,
|
|
2414
|
+
onRowChange,
|
|
2415
|
+
closeEditor
|
|
2416
|
+
}, column.key);
|
|
2417
|
+
}
|
|
2418
|
+
function getRowViewportColumns(rowIdx) {
|
|
2419
|
+
const selectedColumn = columns[selectedPosition.idx];
|
|
2420
|
+
if (selectedColumn !== void 0 && selectedPosition.rowIdx === rowIdx && !viewportColumns.includes(selectedColumn)) {
|
|
2421
|
+
return selectedPosition.idx > colOverscanEndIdx ? [...viewportColumns, selectedColumn] : [...viewportColumns.slice(0, lastFrozenColumnIndex + 1), selectedColumn, ...viewportColumns.slice(lastFrozenColumnIndex + 1)];
|
|
2422
|
+
}
|
|
2423
|
+
return viewportColumns;
|
|
2424
|
+
}
|
|
2425
|
+
function getViewportRows() {
|
|
2426
|
+
const rowElements = [];
|
|
2427
|
+
let startRowIndex = 0;
|
|
2428
|
+
const {
|
|
2429
|
+
idx: selectedIdx,
|
|
2430
|
+
rowIdx: selectedRowIdx
|
|
2431
|
+
} = selectedPosition;
|
|
2432
|
+
const startRowIdx = selectedCellIsWithinViewportBounds && selectedRowIdx < rowOverscanStartIdx ? rowOverscanStartIdx - 1 : rowOverscanStartIdx;
|
|
2433
|
+
const endRowIdx = selectedCellIsWithinViewportBounds && selectedRowIdx > rowOverscanEndIdx ? rowOverscanEndIdx + 1 : rowOverscanEndIdx;
|
|
2434
|
+
for (let viewportRowIdx = startRowIdx; viewportRowIdx <= endRowIdx; viewportRowIdx++) {
|
|
2435
|
+
const isRowOutsideViewport = viewportRowIdx === rowOverscanStartIdx - 1 || viewportRowIdx === rowOverscanEndIdx + 1;
|
|
2436
|
+
const rowIdx = isRowOutsideViewport ? selectedRowIdx : viewportRowIdx;
|
|
2437
|
+
let rowColumns = viewportColumns;
|
|
2438
|
+
const selectedColumn = columns[selectedIdx];
|
|
2439
|
+
if (selectedColumn !== void 0) {
|
|
2440
|
+
if (isRowOutsideViewport) {
|
|
2441
|
+
rowColumns = [selectedColumn];
|
|
2442
|
+
} else {
|
|
2443
|
+
rowColumns = getRowViewportColumns(rowIdx);
|
|
2444
|
+
}
|
|
2445
|
+
}
|
|
2446
|
+
const row2 = rows[rowIdx];
|
|
2447
|
+
const gridRowStart = headerRowsCount + rowIdx + 1;
|
|
2448
|
+
if (isGroupRow(row2)) {
|
|
2449
|
+
({
|
|
2450
|
+
startRowIndex
|
|
2451
|
+
} = row2);
|
|
2452
|
+
const isGroupRowSelected = isSelectable && row2.childRows.every((cr) => selectedRows.has(rowKeyGetter(cr)));
|
|
2453
|
+
rowElements.push(/* @__PURE__ */ jsx(GroupRowRenderer, {
|
|
2454
|
+
"aria-level": row2.level + 1,
|
|
2455
|
+
"aria-setsize": row2.setSize,
|
|
2456
|
+
"aria-posinset": row2.posInSet + 1,
|
|
2457
|
+
"aria-rowindex": headerRowsCount + startRowIndex + 1,
|
|
2458
|
+
"aria-selected": isSelectable ? isGroupRowSelected : void 0,
|
|
2459
|
+
id: row2.id,
|
|
2460
|
+
groupKey: row2.groupKey,
|
|
2461
|
+
viewportColumns: rowColumns,
|
|
2462
|
+
childRows: row2.childRows,
|
|
2463
|
+
rowIdx,
|
|
2464
|
+
row: row2,
|
|
2465
|
+
gridRowStart,
|
|
2466
|
+
height: getRowHeight(rowIdx),
|
|
2467
|
+
level: row2.level,
|
|
2468
|
+
isExpanded: row2.isExpanded,
|
|
2469
|
+
selectedCellIdx: selectedRowIdx === rowIdx ? selectedIdx : void 0,
|
|
2470
|
+
isRowSelected: isGroupRowSelected,
|
|
2471
|
+
selectGroup: selectGroupLatest,
|
|
2472
|
+
toggleGroup: toggleGroupLatest
|
|
2473
|
+
}, row2.id));
|
|
2474
|
+
continue;
|
|
2475
|
+
}
|
|
2476
|
+
startRowIndex++;
|
|
2477
|
+
let key;
|
|
2478
|
+
let isRowSelected = false;
|
|
2479
|
+
if (typeof rowKeyGetter === "function") {
|
|
2480
|
+
key = rowKeyGetter(row2);
|
|
2481
|
+
isRowSelected = selectedRows?.has(key) ?? false;
|
|
2482
|
+
} else {
|
|
2483
|
+
key = hasGroups ? startRowIndex : rowIdx;
|
|
2484
|
+
}
|
|
2485
|
+
rowElements.push(/* @__PURE__ */ jsx(RowRenderer, {
|
|
2486
|
+
"aria-rowindex": headerRowsCount + (hasGroups ? startRowIndex : rowIdx) + 1,
|
|
2487
|
+
"aria-selected": isSelectable ? isRowSelected : void 0,
|
|
2488
|
+
rowIdx,
|
|
2489
|
+
row: row2,
|
|
2490
|
+
viewportColumns: rowColumns,
|
|
2491
|
+
isRowSelected,
|
|
2492
|
+
onRowClick,
|
|
2493
|
+
onRowDoubleClick,
|
|
2494
|
+
rowClass,
|
|
2495
|
+
gridRowStart,
|
|
2496
|
+
height: getRowHeight(rowIdx),
|
|
2497
|
+
copiedCellIdx: copiedCell !== null && copiedCell.row === row2 ? columns.findIndex((c) => c.key === copiedCell.columnKey) : void 0,
|
|
2498
|
+
selectedCellIdx: selectedRowIdx === rowIdx ? selectedIdx : void 0,
|
|
2499
|
+
draggedOverCellIdx: getDraggedOverCellIdx(rowIdx),
|
|
2500
|
+
setDraggedOverRowIdx: isDragging ? setDraggedOverRowIdx : void 0,
|
|
2501
|
+
lastFrozenColumnIndex,
|
|
2502
|
+
onRowChange: handleFormatterRowChangeLatest,
|
|
2503
|
+
selectCell: selectViewportCellLatest,
|
|
2504
|
+
selectedCellDragHandle: getDragHandle(rowIdx),
|
|
2505
|
+
selectedCellEditor: getCellEditor(rowIdx)
|
|
2506
|
+
}, key));
|
|
2507
|
+
}
|
|
2508
|
+
return rowElements;
|
|
2509
|
+
}
|
|
2510
|
+
if (selectedPosition.idx > maxColIdx || selectedPosition.rowIdx > maxRowIdx) {
|
|
2511
|
+
setSelectedPosition(initialPosition);
|
|
2512
|
+
setDraggedOverRowIdx(void 0);
|
|
2513
|
+
}
|
|
2514
|
+
let templateRows = `${headerRowHeight}px`;
|
|
2515
|
+
if (rows.length > 0) {
|
|
2516
|
+
templateRows += gridTemplateRows;
|
|
2517
|
+
}
|
|
2518
|
+
if (summaryRowsCount > 0) {
|
|
2519
|
+
templateRows += ` repeat(${summaryRowsCount}, ${summaryRowHeight}px)`;
|
|
2520
|
+
}
|
|
2521
|
+
const isGroupRowFocused = selectedPosition.idx === -1 && selectedPosition.rowIdx !== -2;
|
|
2522
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2523
|
+
role: hasGroups ? "treegrid" : "grid",
|
|
2524
|
+
"aria-label": ariaLabel,
|
|
2525
|
+
"aria-labelledby": ariaLabelledBy,
|
|
2526
|
+
"aria-describedby": ariaDescribedBy,
|
|
2527
|
+
"aria-multiselectable": isSelectable ? true : void 0,
|
|
2528
|
+
"aria-colcount": columns.length,
|
|
2529
|
+
"aria-rowcount": headerRowsCount + rowsCount + summaryRowsCount,
|
|
2530
|
+
className: clsx(rootClassname, className, isDragging && viewportDraggingClassname, autoResizeColumn !== null && cellAutoResizeClassname),
|
|
2531
|
+
style: {
|
|
2532
|
+
...style,
|
|
2533
|
+
scrollPaddingInlineStart: selectedPosition.idx > lastFrozenColumnIndex ? `${totalFrozenColumnWidth}px` : void 0,
|
|
2534
|
+
scrollPaddingBlock: selectedPosition.rowIdx >= 0 && selectedPosition.rowIdx < rows.length ? `${headerRowHeight}px ${summaryRowsCount * summaryRowHeight}px` : void 0,
|
|
2535
|
+
gridTemplateRows: templateRows,
|
|
2536
|
+
"--rdg-header-row-height": `${headerRowHeight}px`,
|
|
2537
|
+
"--rdg-summary-row-height": `${summaryRowHeight}px`,
|
|
2538
|
+
"--rdg-sign": isRtl ? -1 : 1,
|
|
2539
|
+
...getLayoutCssVars()
|
|
2540
|
+
},
|
|
2541
|
+
dir: direction,
|
|
2542
|
+
ref: gridRef,
|
|
2543
|
+
onScroll: handleScroll,
|
|
2544
|
+
onKeyDown: handleKeyDown,
|
|
2545
|
+
"data-testid": testId,
|
|
2546
|
+
children: [hasGroups && /* @__PURE__ */ jsx("div", {
|
|
2547
|
+
ref: rowRef,
|
|
2548
|
+
tabIndex: isGroupRowFocused ? 0 : -1,
|
|
2549
|
+
className: clsx(focusSinkClassname, isGroupRowFocused && [rowSelected, lastFrozenColumnIndex !== -1 && rowSelectedWithFrozenCell]),
|
|
2550
|
+
style: {
|
|
2551
|
+
gridRowStart: selectedPosition.rowIdx + 2
|
|
2552
|
+
},
|
|
2553
|
+
onKeyDown: handleKeyDown
|
|
2554
|
+
}), /* @__PURE__ */ jsxs(DataGridDefaultComponentsProvider, {
|
|
2555
|
+
value: defaultGridComponents,
|
|
2556
|
+
children: [/* @__PURE__ */ jsx(HeaderRow$1, {
|
|
2557
|
+
columns: getRowViewportColumns(-1),
|
|
2558
|
+
onColumnResize: handleColumnResize,
|
|
2559
|
+
allRowsSelected,
|
|
2560
|
+
onAllRowsSelectionChange: selectAllRowsLatest,
|
|
2561
|
+
sortColumns,
|
|
2562
|
+
onSortColumnsChange,
|
|
2563
|
+
lastFrozenColumnIndex,
|
|
2564
|
+
selectedCellIdx: isHeaderRowSelected ? selectedPosition.idx : void 0,
|
|
2565
|
+
selectCell: selectHeaderCellLatest,
|
|
2566
|
+
shouldFocusGrid: !selectedCellIsWithinSelectionBounds,
|
|
2567
|
+
direction
|
|
2568
|
+
}), rows.length === 0 && noRowsFallback ? noRowsFallback : /* @__PURE__ */ jsxs(Fragment, {
|
|
2569
|
+
children: [/* @__PURE__ */ jsx(RowSelectionChangeProvider, {
|
|
2570
|
+
value: selectRowLatest,
|
|
2571
|
+
children: getViewportRows()
|
|
2572
|
+
}), summaryRows?.map((row2, rowIdx) => {
|
|
2573
|
+
const gridRowStart = headerRowsCount + rows.length + rowIdx + 1;
|
|
2574
|
+
const summaryRowIdx = headerRowsCount + rows.length + rowIdx - 1;
|
|
2575
|
+
const isSummaryRowSelected = selectedPosition.rowIdx === summaryRowIdx;
|
|
2576
|
+
const top = clientHeight > totalRowHeight ? gridHeight - summaryRowHeight * (summaryRows.length - rowIdx) : void 0;
|
|
2577
|
+
const bottom = top === void 0 ? summaryRowHeight * (summaryRows.length - 1 - rowIdx) : void 0;
|
|
2578
|
+
return /* @__PURE__ */ jsx(SummaryRow$1, {
|
|
2579
|
+
"aria-rowindex": headerRowsCount + rowsCount + rowIdx + 1,
|
|
2580
|
+
rowIdx,
|
|
2581
|
+
gridRowStart,
|
|
2582
|
+
row: row2,
|
|
2583
|
+
top,
|
|
2584
|
+
bottom,
|
|
2585
|
+
viewportColumns: getRowViewportColumns(summaryRowIdx),
|
|
2586
|
+
lastFrozenColumnIndex,
|
|
2587
|
+
selectedCellIdx: isSummaryRowSelected ? selectedPosition.idx : void 0,
|
|
2588
|
+
selectCell: selectSummaryCellLatest
|
|
2589
|
+
}, rowIdx);
|
|
2590
|
+
})]
|
|
2591
|
+
})]
|
|
2592
|
+
})]
|
|
2593
|
+
});
|
|
2594
|
+
}
|
|
2595
|
+
function isSamePosition(p1, p2) {
|
|
2596
|
+
return p1.idx === p2.idx && p1.rowIdx === p2.rowIdx;
|
|
2597
|
+
}
|
|
2598
|
+
const DataGrid$1 = /* @__PURE__ */ forwardRef(DataGrid);
|
|
2599
|
+
var css_248z = ".t16y9g8l700-beta13{appearance:none;background-color:var(--rdg-background-color);block-size:100%;border:2px solid #ccc;box-sizing:border-box;color:var(--rdg-color);font-family:inherit;font-size:var(--rdg-font-size);inline-size:100%;padding-block:0;padding-inline:6px;vertical-align:top}.t16y9g8l700-beta13:focus{border-color:var(--rdg-selection-color);outline:none}.t16y9g8l700-beta13::placeholder{color:#999;opacity:1}";
|
|
2600
|
+
styleInject(css_248z, { "insertAt": "top" });
|
|
2601
|
+
export {
|
|
2602
|
+
DataGrid$1 as D,
|
|
2603
|
+
HeaderRenderer as H,
|
|
2604
|
+
SelectCellFormatter as S,
|
|
2605
|
+
useRowSelection as u
|
|
2606
|
+
};
|