@mui/x-data-grid-pro 9.0.0-alpha.1 → 9.0.0-alpha.3
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/CHANGELOG.md +240 -0
- package/DataGridPro/DataGrid.js +4 -2
- package/DataGridPro/DataGrid.mjs +20 -0
- package/{esm/DataGridPro/DataGridPro.d.ts → DataGridPro/DataGridPro.d.mts} +2 -2
- package/DataGridPro/DataGridPro.js +72 -11
- package/{esm/DataGridPro/DataGridPro.js → DataGridPro/DataGridPro.mjs} +72 -11
- package/DataGridPro/index.d.mts +3 -0
- package/DataGridPro/index.mjs +3 -0
- package/{esm/DataGridPro/useDataGridProComponent.d.ts → DataGridPro/useDataGridProComponent.d.mts} +2 -2
- package/{esm/DataGridPro/useDataGridProComponent.js → DataGridPro/useDataGridProComponent.mjs} +18 -18
- package/{esm/DataGridPro/useDataGridProProps.d.ts → DataGridPro/useDataGridProProps.d.mts} +1 -1
- package/{esm/DataGridPro/useDataGridProProps.js → DataGridPro/useDataGridProProps.mjs} +1 -1
- package/{esm/components/GridColumnHeaders.js → components/GridColumnHeaders.mjs} +1 -1
- package/{esm/components/GridColumnMenuPinningItem.js → components/GridColumnMenuPinningItem.mjs} +2 -2
- package/{esm/components/GridDataSourceTreeDataGroupingCell.js → components/GridDataSourceTreeDataGroupingCell.mjs} +3 -3
- package/{esm/components/GridDetailPanel.js → components/GridDetailPanel.mjs} +2 -2
- package/{esm/components/GridDetailPanelToggleCell.js → components/GridDetailPanelToggleCell.mjs} +3 -3
- package/{esm/components/GridDetailPanels.js → components/GridDetailPanels.mjs} +5 -5
- package/{esm/components/GridProColumnMenu.d.ts → components/GridProColumnMenu.d.mts} +1 -1
- package/{esm/components/GridProColumnMenu.js → components/GridProColumnMenu.mjs} +1 -1
- package/{esm/components/GridRowReorderCell.js → components/GridRowReorderCell.mjs} +1 -1
- package/{esm/components/GridTreeDataGroupingCell.js → components/GridTreeDataGroupingCell.mjs} +2 -2
- package/components/headerFiltering/GridHeaderFilterCell.js +3 -2
- package/{esm/components/headerFiltering/GridHeaderFilterCell.js → components/headerFiltering/GridHeaderFilterCell.mjs} +6 -5
- package/{esm/components/headerFiltering/GridHeaderFilterClearButton.js → components/headerFiltering/GridHeaderFilterClearButton.mjs} +1 -1
- package/components/headerFiltering/GridHeaderFilterMenu.js +2 -1
- package/{esm/components/headerFiltering/GridHeaderFilterMenu.js → components/headerFiltering/GridHeaderFilterMenu.mjs} +2 -1
- package/components/headerFiltering/GridHeaderFilterMenuContainer.js +2 -1
- package/{esm/components/headerFiltering/GridHeaderFilterMenuContainer.js → components/headerFiltering/GridHeaderFilterMenuContainer.mjs} +3 -2
- package/components/headerFiltering/index.d.mts +3 -0
- package/components/headerFiltering/index.mjs +3 -0
- package/components/index.d.mts +6 -0
- package/components/index.mjs +7 -0
- package/{esm/components/reexports.d.ts → components/reexports.d.mts} +1 -1
- package/{esm/components/reexports.js → components/reexports.mjs} +1 -1
- package/constants/dataGridProDefaultSlotsComponents.d.mts +2 -0
- package/{esm/constants/dataGridProDefaultSlotsComponents.js → constants/dataGridProDefaultSlotsComponents.mjs} +7 -7
- package/{esm/hooks/features/columnHeaders/useGridColumnHeaders.js → hooks/features/columnHeaders/useGridColumnHeaders.mjs} +1 -1
- package/hooks/features/columnPinning/index.d.mts +1 -0
- package/hooks/features/columnPinning/index.mjs +1 -0
- package/{esm/hooks/features/columnPinning/useGridColumnPinning.d.ts → hooks/features/columnPinning/useGridColumnPinning.d.mts} +2 -2
- package/{esm/hooks/features/columnPinning/useGridColumnPinningPreProcessors.d.ts → hooks/features/columnPinning/useGridColumnPinningPreProcessors.d.mts} +2 -2
- package/{esm/hooks/features/columnReorder/columnReorderSelector.d.ts → hooks/features/columnReorder/columnReorderSelector.d.mts} +2 -2
- package/{esm/hooks/features/columnReorder/index.d.ts → hooks/features/columnReorder/index.d.mts} +2 -2
- package/hooks/features/columnReorder/index.mjs +2 -0
- package/{esm/hooks/features/columnReorder/useGridColumnReorder.d.ts → hooks/features/columnReorder/useGridColumnReorder.d.mts} +2 -2
- package/{esm/hooks/features/columnReorder/useGridColumnReorder.js → hooks/features/columnReorder/useGridColumnReorder.mjs} +1 -1
- package/{esm/hooks/features/dataSource/gridDataSourceSelector.d.ts → hooks/features/dataSource/gridDataSourceSelector.d.mts} +2 -2
- package/hooks/features/dataSource/index.d.mts +1 -0
- package/{esm/hooks/features/dataSource/useGridDataSourceBasePro.d.ts → hooks/features/dataSource/useGridDataSourceBasePro.d.mts} +3 -3
- package/hooks/features/dataSource/useGridDataSourceBasePro.js +13 -15
- package/{esm/hooks/features/dataSource/useGridDataSourceBasePro.js → hooks/features/dataSource/useGridDataSourceBasePro.mjs} +16 -18
- package/{esm/hooks/features/dataSource/useGridDataSourcePro.d.ts → hooks/features/dataSource/useGridDataSourcePro.d.mts} +2 -2
- package/{esm/hooks/features/dataSource/useGridDataSourcePro.js → hooks/features/dataSource/useGridDataSourcePro.mjs} +1 -1
- package/{esm/hooks/features/dataSource/utils.d.ts → hooks/features/dataSource/utils.d.mts} +1 -1
- package/{esm/hooks/features/detailPanel/gridDetailPanelSelector.d.ts → hooks/features/detailPanel/gridDetailPanelSelector.d.mts} +2 -2
- package/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +2 -1
- package/{esm/hooks/features/detailPanel/gridDetailPanelToggleColDef.js → hooks/features/detailPanel/gridDetailPanelToggleColDef.mjs} +4 -3
- package/{esm/hooks/features/detailPanel/index.d.ts → hooks/features/detailPanel/index.d.mts} +3 -3
- package/{esm/hooks/features/detailPanel/index.js → hooks/features/detailPanel/index.mjs} +3 -3
- package/{esm/hooks/features/detailPanel/useGridDetailPanel.d.ts → hooks/features/detailPanel/useGridDetailPanel.d.mts} +2 -2
- package/{esm/hooks/features/detailPanel/useGridDetailPanel.js → hooks/features/detailPanel/useGridDetailPanel.mjs} +2 -2
- package/{esm/hooks/features/detailPanel/useGridDetailPanelPreProcessors.d.ts → hooks/features/detailPanel/useGridDetailPanelPreProcessors.d.mts} +2 -2
- package/{esm/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js → hooks/features/detailPanel/useGridDetailPanelPreProcessors.mjs} +2 -2
- package/hooks/features/index.d.mts +7 -0
- package/hooks/features/index.mjs +8 -0
- package/{esm/hooks/features/infiniteLoader/useGridInfiniteLoader.d.ts → hooks/features/infiniteLoader/useGridInfiniteLoader.d.mts} +2 -2
- package/{esm/hooks/features/lazyLoader/useGridLazyLoader.d.ts → hooks/features/lazyLoader/useGridLazyLoader.d.mts} +2 -2
- package/{esm/hooks/features/lazyLoader/useGridLazyLoader.js → hooks/features/lazyLoader/useGridLazyLoader.mjs} +1 -1
- package/{esm/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.d.ts → hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.d.mts} +2 -2
- package/{esm/hooks/features/lazyLoader/utils.d.ts → hooks/features/lazyLoader/utils.d.mts} +1 -1
- package/hooks/features/rowPinning/index.d.mts +1 -0
- package/hooks/features/rowPinning/index.mjs +1 -0
- package/{esm/hooks/features/rowPinning/useGridRowPinning.d.ts → hooks/features/rowPinning/useGridRowPinning.d.mts} +2 -2
- package/{esm/hooks/features/rowPinning/useGridRowPinningPreProcessors.d.ts → hooks/features/rowPinning/useGridRowPinningPreProcessors.d.mts} +2 -2
- package/{esm/hooks/features/rowPinning/useGridRowPinningPreProcessors.js → hooks/features/rowPinning/useGridRowPinningPreProcessors.mjs} +1 -1
- package/{esm/hooks/features/rowReorder/commonReorderConditions.d.ts → hooks/features/rowReorder/commonReorderConditions.d.mts} +1 -1
- package/{esm/hooks/features/rowReorder/gridRowReorderColDef.js → hooks/features/rowReorder/gridRowReorderColDef.mjs} +1 -1
- package/hooks/features/rowReorder/index.d.mts +2 -0
- package/hooks/features/rowReorder/index.mjs +2 -0
- package/{esm/hooks/features/rowReorder/models.d.ts → hooks/features/rowReorder/models.d.mts} +1 -1
- package/{esm/hooks/features/rowReorder/reorderExecutor.d.ts → hooks/features/rowReorder/reorderExecutor.d.mts} +1 -1
- package/{esm/hooks/features/rowReorder/reorderValidator.d.ts → hooks/features/rowReorder/reorderValidator.d.mts} +1 -1
- package/{esm/hooks/features/rowReorder/types.d.ts → hooks/features/rowReorder/types.d.mts} +2 -2
- package/{esm/hooks/features/rowReorder/useGridRowReorder.d.ts → hooks/features/rowReorder/useGridRowReorder.d.mts} +2 -2
- package/hooks/features/rowReorder/useGridRowReorder.js +3 -2
- package/{esm/hooks/features/rowReorder/useGridRowReorder.js → hooks/features/rowReorder/useGridRowReorder.mjs} +5 -4
- package/{esm/hooks/features/rowReorder/useGridRowReorderPreProcessors.d.ts → hooks/features/rowReorder/useGridRowReorderPreProcessors.d.mts} +2 -2
- package/{esm/hooks/features/rowReorder/useGridRowReorderPreProcessors.js → hooks/features/rowReorder/useGridRowReorderPreProcessors.mjs} +1 -1
- package/{esm/hooks/features/rowReorder/utils.d.ts → hooks/features/rowReorder/utils.d.mts} +4 -4
- package/{esm/hooks/features/rowReorder/utils.js → hooks/features/rowReorder/utils.mjs} +1 -1
- package/hooks/features/rows/index.d.mts +1 -0
- package/hooks/features/rows/index.mjs +1 -0
- package/{esm/hooks/features/rows/useGridRowAriaAttributes.js → hooks/features/rows/useGridRowAriaAttributes.mjs} +2 -2
- package/{esm/hooks/features/rows/useGridRowsOverridableMethods.d.ts → hooks/features/rows/useGridRowsOverridableMethods.d.mts} +2 -2
- package/hooks/features/rows/useGridRowsOverridableMethods.js +7 -5
- package/{esm/hooks/features/rows/useGridRowsOverridableMethods.js → hooks/features/rows/useGridRowsOverridableMethods.mjs} +7 -6
- package/{esm/hooks/features/serverSideLazyLoader/useGridDataSourceLazyLoader.d.ts → hooks/features/serverSideLazyLoader/useGridDataSourceLazyLoader.d.mts} +2 -2
- package/{esm/hooks/features/serverSideLazyLoader/useGridDataSourceLazyLoader.js → hooks/features/serverSideLazyLoader/useGridDataSourceLazyLoader.mjs} +2 -2
- package/{esm/hooks/features/serverSideLazyLoader/useGridInfiniteLoadingIntersection.d.ts → hooks/features/serverSideLazyLoader/useGridInfiniteLoadingIntersection.d.mts} +2 -2
- package/{esm/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.d.ts → hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.d.mts} +2 -2
- package/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.js +4 -3
- package/{esm/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.js → hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.mjs} +11 -10
- package/{esm/hooks/features/treeData/gridTreeDataUtils.d.ts → hooks/features/treeData/gridTreeDataUtils.d.mts} +1 -1
- package/{esm/hooks/features/treeData/index.d.ts → hooks/features/treeData/index.d.mts} +1 -1
- package/{esm/hooks/features/treeData/index.js → hooks/features/treeData/index.mjs} +1 -1
- package/{esm/hooks/features/treeData/treeDataReorderExecutor.d.ts → hooks/features/treeData/treeDataReorderExecutor.d.mts} +2 -2
- package/{esm/hooks/features/treeData/treeDataReorderExecutor.js → hooks/features/treeData/treeDataReorderExecutor.mjs} +3 -3
- package/{esm/hooks/features/treeData/treeDataReorderValidator.d.ts → hooks/features/treeData/treeDataReorderValidator.d.mts} +1 -1
- package/{esm/hooks/features/treeData/treeDataReorderValidator.js → hooks/features/treeData/treeDataReorderValidator.mjs} +2 -2
- package/{esm/hooks/features/treeData/useGridTreeData.d.ts → hooks/features/treeData/useGridTreeData.d.mts} +2 -2
- package/{esm/hooks/features/treeData/useGridTreeData.js → hooks/features/treeData/useGridTreeData.mjs} +2 -2
- package/{esm/hooks/features/treeData/useGridTreeDataPreProcessors.d.ts → hooks/features/treeData/useGridTreeDataPreProcessors.d.mts} +2 -2
- package/hooks/features/treeData/useGridTreeDataPreProcessors.js +3 -2
- package/{esm/hooks/features/treeData/useGridTreeDataPreProcessors.js → hooks/features/treeData/useGridTreeDataPreProcessors.mjs} +10 -9
- package/{esm/hooks/features/treeData/utils.d.ts → hooks/features/treeData/utils.d.mts} +1 -1
- package/{esm/hooks/features/treeData/utils.js → hooks/features/treeData/utils.mjs} +1 -1
- package/hooks/index.d.mts +1 -0
- package/hooks/index.mjs +1 -0
- package/{esm/hooks/utils/useGridApiContext.d.ts → hooks/utils/useGridApiContext.d.mts} +1 -1
- package/{esm/hooks/utils/useGridApiRef.d.ts → hooks/utils/useGridApiRef.d.mts} +1 -1
- package/{esm/hooks/utils/useGridAriaAttributes.js → hooks/utils/useGridAriaAttributes.mjs} +1 -1
- package/{esm/hooks/utils/useGridPrivateApiContext.d.ts → hooks/utils/useGridPrivateApiContext.d.mts} +1 -1
- package/{esm/hooks/utils/useGridRootProps.d.ts → hooks/utils/useGridRootProps.d.mts} +1 -1
- package/{esm/index.d.ts → index.d.mts} +14 -14
- package/index.js +1 -1
- package/{esm/index.js → index.mjs} +10 -10
- package/{esm/internals/index.d.ts → internals/index.d.mts} +44 -44
- package/{esm/internals/index.js → internals/index.mjs} +38 -38
- package/{esm/internals/propValidation.d.ts → internals/propValidation.d.mts} +1 -1
- package/{esm/material/index.js → material/index.mjs} +1 -1
- package/{esm/models/dataGridProProps.d.ts → models/dataGridProProps.d.mts} +9 -9
- package/{esm/models/gridApiPro.d.ts → models/gridApiPro.d.mts} +5 -5
- package/{esm/models/gridProSlotProps.d.ts → models/gridProSlotProps.d.mts} +1 -1
- package/{esm/models/gridProSlotsComponent.d.ts → models/gridProSlotsComponent.d.mts} +1 -1
- package/{esm/models/gridStatePro.d.ts → models/gridStatePro.d.mts} +2 -2
- package/models/index.d.mts +7 -0
- package/models/index.mjs +7 -0
- package/package.json +141 -16
- package/themeAugmentation/index.d.mts +2 -0
- package/themeAugmentation/index.mjs +4 -0
- package/{esm/themeAugmentation/props.d.ts → themeAugmentation/props.d.mts} +1 -1
- package/typeOverloads/index.d.mts +1 -0
- package/typeOverloads/index.mjs +1 -0
- package/{esm/typeOverloads/modules.d.ts → typeOverloads/modules.d.mts} +5 -5
- package/{esm/typeOverloads/reexports.d.ts → typeOverloads/reexports.d.mts} +5 -5
- package/{esm/typeOverloads/reexports.js → typeOverloads/reexports.mjs} +3 -3
- package/utils/index.d.mts +1 -0
- package/utils/index.mjs +1 -0
- package/{esm/utils/tree/createRowTree.d.ts → utils/tree/createRowTree.d.mts} +2 -2
- package/{esm/utils/tree/createRowTree.js → utils/tree/createRowTree.mjs} +1 -1
- package/utils/tree/index.d.mts +1 -0
- package/utils/tree/index.mjs +1 -0
- package/{esm/utils/tree/insertDataRowInTree.d.ts → utils/tree/insertDataRowInTree.d.mts} +2 -2
- package/{esm/utils/tree/insertDataRowInTree.js → utils/tree/insertDataRowInTree.mjs} +1 -1
- package/{esm/utils/tree/removeDataRowFromTree.js → utils/tree/removeDataRowFromTree.mjs} +3 -3
- package/{esm/utils/tree/updateRowTree.d.ts → utils/tree/updateRowTree.d.mts} +1 -1
- package/{esm/utils/tree/updateRowTree.js → utils/tree/updateRowTree.mjs} +3 -3
- package/{esm/utils/tree/utils.d.ts → utils/tree/utils.d.mts} +3 -3
- package/esm/DataGridPro/DataGrid.js +0 -19
- package/esm/DataGridPro/index.d.ts +0 -3
- package/esm/DataGridPro/index.js +0 -3
- package/esm/components/headerFiltering/index.d.ts +0 -3
- package/esm/components/headerFiltering/index.js +0 -3
- package/esm/components/index.d.ts +0 -6
- package/esm/components/index.js +0 -7
- package/esm/constants/dataGridProDefaultSlotsComponents.d.ts +0 -2
- package/esm/hooks/features/columnPinning/index.d.ts +0 -1
- package/esm/hooks/features/columnPinning/index.js +0 -1
- package/esm/hooks/features/columnReorder/index.js +0 -2
- package/esm/hooks/features/dataSource/index.d.ts +0 -1
- package/esm/hooks/features/index.d.ts +0 -7
- package/esm/hooks/features/index.js +0 -8
- package/esm/hooks/features/rowPinning/index.d.ts +0 -1
- package/esm/hooks/features/rowPinning/index.js +0 -1
- package/esm/hooks/features/rowReorder/index.d.ts +0 -2
- package/esm/hooks/features/rowReorder/index.js +0 -2
- package/esm/hooks/features/rows/index.d.ts +0 -1
- package/esm/hooks/features/rows/index.js +0 -1
- package/esm/hooks/index.d.ts +0 -1
- package/esm/hooks/index.js +0 -1
- package/esm/models/index.d.ts +0 -7
- package/esm/models/index.js +0 -7
- package/esm/package.json +0 -1
- package/esm/themeAugmentation/index.d.ts +0 -2
- package/esm/themeAugmentation/index.js +0 -4
- package/esm/typeOverloads/index.d.ts +0 -1
- package/esm/typeOverloads/index.js +0 -1
- package/esm/utils/index.d.ts +0 -1
- package/esm/utils/index.js +0 -1
- package/esm/utils/tree/index.d.ts +0 -1
- package/esm/utils/tree/index.js +0 -1
- /package/{esm/DataGridPro/DataGrid.d.ts → DataGridPro/DataGrid.d.mts} +0 -0
- /package/{esm/components/GridColumnHeaders.d.ts → components/GridColumnHeaders.d.mts} +0 -0
- /package/{esm/components/GridColumnMenuPinningItem.d.ts → components/GridColumnMenuPinningItem.d.mts} +0 -0
- /package/{esm/components/GridDataSourceTreeDataGroupingCell.d.ts → components/GridDataSourceTreeDataGroupingCell.d.mts} +0 -0
- /package/{esm/components/GridDetailPanel.d.ts → components/GridDetailPanel.d.mts} +0 -0
- /package/{esm/components/GridDetailPanelToggleCell.d.ts → components/GridDetailPanelToggleCell.d.mts} +0 -0
- /package/{esm/components/GridDetailPanels.d.ts → components/GridDetailPanels.d.mts} +0 -0
- /package/{esm/components/GridPinnedRows.d.ts → components/GridPinnedRows.d.mts} +0 -0
- /package/{esm/components/GridPinnedRows.js → components/GridPinnedRows.mjs} +0 -0
- /package/{esm/components/GridRowReorderCell.d.ts → components/GridRowReorderCell.d.mts} +0 -0
- /package/{esm/components/GridTreeDataGroupingCell.d.ts → components/GridTreeDataGroupingCell.d.mts} +0 -0
- /package/{esm/components/headerFiltering/GridHeaderFilterCell.d.ts → components/headerFiltering/GridHeaderFilterCell.d.mts} +0 -0
- /package/{esm/components/headerFiltering/GridHeaderFilterClearButton.d.ts → components/headerFiltering/GridHeaderFilterClearButton.d.mts} +0 -0
- /package/{esm/components/headerFiltering/GridHeaderFilterMenu.d.ts → components/headerFiltering/GridHeaderFilterMenu.d.mts} +0 -0
- /package/{esm/components/headerFiltering/GridHeaderFilterMenuContainer.d.ts → components/headerFiltering/GridHeaderFilterMenuContainer.d.mts} +0 -0
- /package/{esm/hooks/features/columnHeaders/useGridColumnHeaders.d.ts → hooks/features/columnHeaders/useGridColumnHeaders.d.mts} +0 -0
- /package/{esm/hooks/features/columnPinning/gridColumnPinningInterface.d.ts → hooks/features/columnPinning/gridColumnPinningInterface.d.mts} +0 -0
- /package/{esm/hooks/features/columnPinning/gridColumnPinningInterface.js → hooks/features/columnPinning/gridColumnPinningInterface.mjs} +0 -0
- /package/{esm/hooks/features/columnPinning/useGridColumnPinning.js → hooks/features/columnPinning/useGridColumnPinning.mjs} +0 -0
- /package/{esm/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js → hooks/features/columnPinning/useGridColumnPinningPreProcessors.mjs} +0 -0
- /package/{esm/hooks/features/columnReorder/columnReorderInterfaces.d.ts → hooks/features/columnReorder/columnReorderInterfaces.d.mts} +0 -0
- /package/{esm/hooks/features/columnReorder/columnReorderInterfaces.js → hooks/features/columnReorder/columnReorderInterfaces.mjs} +0 -0
- /package/{esm/hooks/features/columnReorder/columnReorderSelector.js → hooks/features/columnReorder/columnReorderSelector.mjs} +0 -0
- /package/{esm/hooks/features/dataSource/gridDataSourceSelector.js → hooks/features/dataSource/gridDataSourceSelector.mjs} +0 -0
- /package/{esm/hooks/features/dataSource/index.js → hooks/features/dataSource/index.mjs} +0 -0
- /package/{esm/hooks/features/dataSource/models.d.ts → hooks/features/dataSource/models.d.mts} +0 -0
- /package/{esm/hooks/features/dataSource/models.js → hooks/features/dataSource/models.mjs} +0 -0
- /package/{esm/hooks/features/dataSource/utils.js → hooks/features/dataSource/utils.mjs} +0 -0
- /package/{esm/hooks/features/detailPanel/gridDetailPanelInterface.d.ts → hooks/features/detailPanel/gridDetailPanelInterface.d.mts} +0 -0
- /package/{esm/hooks/features/detailPanel/gridDetailPanelInterface.js → hooks/features/detailPanel/gridDetailPanelInterface.mjs} +0 -0
- /package/{esm/hooks/features/detailPanel/gridDetailPanelSelector.js → hooks/features/detailPanel/gridDetailPanelSelector.mjs} +0 -0
- /package/{esm/hooks/features/detailPanel/gridDetailPanelToggleColDef.d.ts → hooks/features/detailPanel/gridDetailPanelToggleColDef.d.mts} +0 -0
- /package/{esm/hooks/features/infiniteLoader/useGridInfiniteLoader.js → hooks/features/infiniteLoader/useGridInfiniteLoader.mjs} +0 -0
- /package/{esm/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js → hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.mjs} +0 -0
- /package/{esm/hooks/features/lazyLoader/utils.js → hooks/features/lazyLoader/utils.mjs} +0 -0
- /package/{esm/hooks/features/rowPinning/gridRowPinningInterface.d.ts → hooks/features/rowPinning/gridRowPinningInterface.d.mts} +0 -0
- /package/{esm/hooks/features/rowPinning/gridRowPinningInterface.js → hooks/features/rowPinning/gridRowPinningInterface.mjs} +0 -0
- /package/{esm/hooks/features/rowPinning/gridRowPinningSelector.d.ts → hooks/features/rowPinning/gridRowPinningSelector.d.mts} +0 -0
- /package/{esm/hooks/features/rowPinning/gridRowPinningSelector.js → hooks/features/rowPinning/gridRowPinningSelector.mjs} +0 -0
- /package/{esm/hooks/features/rowPinning/useGridRowPinning.js → hooks/features/rowPinning/useGridRowPinning.mjs} +0 -0
- /package/{esm/hooks/features/rowReorder/commonReorderConditions.js → hooks/features/rowReorder/commonReorderConditions.mjs} +0 -0
- /package/{esm/hooks/features/rowReorder/gridRowReorderColDef.d.ts → hooks/features/rowReorder/gridRowReorderColDef.d.mts} +0 -0
- /package/{esm/hooks/features/rowReorder/models.js → hooks/features/rowReorder/models.mjs} +0 -0
- /package/{esm/hooks/features/rowReorder/reorderExecutor.js → hooks/features/rowReorder/reorderExecutor.mjs} +0 -0
- /package/{esm/hooks/features/rowReorder/reorderValidator.js → hooks/features/rowReorder/reorderValidator.mjs} +0 -0
- /package/{esm/hooks/features/rowReorder/types.js → hooks/features/rowReorder/types.mjs} +0 -0
- /package/{esm/hooks/features/rows/useGridRowAriaAttributes.d.ts → hooks/features/rows/useGridRowAriaAttributes.d.mts} +0 -0
- /package/{esm/hooks/features/serverSideLazyLoader/useGridInfiniteLoadingIntersection.js → hooks/features/serverSideLazyLoader/useGridInfiniteLoadingIntersection.mjs} +0 -0
- /package/{esm/hooks/features/serverSideTreeData/utils.d.ts → hooks/features/serverSideTreeData/utils.d.mts} +0 -0
- /package/{esm/hooks/features/serverSideTreeData/utils.js → hooks/features/serverSideTreeData/utils.mjs} +0 -0
- /package/{esm/hooks/features/treeData/gridTreeDataGroupColDef.d.ts → hooks/features/treeData/gridTreeDataGroupColDef.d.mts} +0 -0
- /package/{esm/hooks/features/treeData/gridTreeDataGroupColDef.js → hooks/features/treeData/gridTreeDataGroupColDef.mjs} +0 -0
- /package/{esm/hooks/features/treeData/gridTreeDataUtils.js → hooks/features/treeData/gridTreeDataUtils.mjs} +0 -0
- /package/{esm/hooks/utils/useGridApiContext.js → hooks/utils/useGridApiContext.mjs} +0 -0
- /package/{esm/hooks/utils/useGridApiRef.js → hooks/utils/useGridApiRef.mjs} +0 -0
- /package/{esm/hooks/utils/useGridAriaAttributes.d.ts → hooks/utils/useGridAriaAttributes.d.mts} +0 -0
- /package/{esm/hooks/utils/useGridPrivateApiContext.js → hooks/utils/useGridPrivateApiContext.mjs} +0 -0
- /package/{esm/hooks/utils/useGridRootProps.js → hooks/utils/useGridRootProps.mjs} +0 -0
- /package/{esm/internals/propValidation.js → internals/propValidation.mjs} +0 -0
- /package/{esm/locales/index.d.ts → locales/index.d.mts} +0 -0
- /package/{esm/locales/index.js → locales/index.mjs} +0 -0
- /package/{esm/material/icons.d.ts → material/icons.d.mts} +0 -0
- /package/{esm/material/icons.js → material/icons.mjs} +0 -0
- /package/{esm/material/index.d.ts → material/index.d.mts} +0 -0
- /package/{esm/models/dataGridProProps.js → models/dataGridProProps.mjs} +0 -0
- /package/{esm/models/gridApiPro.js → models/gridApiPro.mjs} +0 -0
- /package/{esm/models/gridFetchRowsParams.d.ts → models/gridFetchRowsParams.d.mts} +0 -0
- /package/{esm/models/gridFetchRowsParams.js → models/gridFetchRowsParams.mjs} +0 -0
- /package/{esm/models/gridGroupingColDefOverride.d.ts → models/gridGroupingColDefOverride.d.mts} +0 -0
- /package/{esm/models/gridGroupingColDefOverride.js → models/gridGroupingColDefOverride.mjs} +0 -0
- /package/{esm/models/gridProIconSlotsComponent.d.ts → models/gridProIconSlotsComponent.d.mts} +0 -0
- /package/{esm/models/gridProIconSlotsComponent.js → models/gridProIconSlotsComponent.mjs} +0 -0
- /package/{esm/models/gridProSlotProps.js → models/gridProSlotProps.mjs} +0 -0
- /package/{esm/models/gridProSlotsComponent.js → models/gridProSlotsComponent.mjs} +0 -0
- /package/{esm/models/gridRowOrderChangeParams.d.ts → models/gridRowOrderChangeParams.d.mts} +0 -0
- /package/{esm/models/gridRowOrderChangeParams.js → models/gridRowOrderChangeParams.mjs} +0 -0
- /package/{esm/models/gridRowReorderApi.d.ts → models/gridRowReorderApi.d.mts} +0 -0
- /package/{esm/models/gridRowReorderApi.js → models/gridRowReorderApi.mjs} +0 -0
- /package/{esm/models/gridRowScrollEndParams.d.ts → models/gridRowScrollEndParams.d.mts} +0 -0
- /package/{esm/models/gridRowScrollEndParams.js → models/gridRowScrollEndParams.mjs} +0 -0
- /package/{esm/models/gridStatePro.js → models/gridStatePro.mjs} +0 -0
- /package/{esm/themeAugmentation/overrides.d.ts → themeAugmentation/overrides.d.mts} +0 -0
- /package/{esm/themeAugmentation/overrides.js → themeAugmentation/overrides.mjs} +0 -0
- /package/{esm/themeAugmentation/props.js → themeAugmentation/props.mjs} +0 -0
- /package/{esm/typeOverloads/modules.js → typeOverloads/modules.mjs} +0 -0
- /package/{esm/utils/tree/models.d.ts → utils/tree/models.d.mts} +0 -0
- /package/{esm/utils/tree/models.js → utils/tree/models.mjs} +0 -0
- /package/{esm/utils/tree/removeDataRowFromTree.d.ts → utils/tree/removeDataRowFromTree.d.mts} +0 -0
- /package/{esm/utils/tree/sortRowTree.d.ts → utils/tree/sortRowTree.d.mts} +0 -0
- /package/{esm/utils/tree/sortRowTree.js → utils/tree/sortRowTree.mjs} +0 -0
- /package/{esm/utils/tree/utils.js → utils/tree/utils.mjs} +0 -0
|
@@ -3,9 +3,9 @@ import * as React from 'react';
|
|
|
3
3
|
import composeClasses from '@mui/utils/composeClasses';
|
|
4
4
|
import { getDataGridUtilityClass, useGridSelector } from '@mui/x-data-grid';
|
|
5
5
|
import { vars, gridRowSelector } from '@mui/x-data-grid/internals';
|
|
6
|
-
import { useGridRootProps } from "../hooks/utils/useGridRootProps.
|
|
7
|
-
import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.
|
|
8
|
-
import { gridDataSourceErrorSelector, gridDataSourceLoadingIdSelector } from "../hooks/features/dataSource/gridDataSourceSelector.
|
|
6
|
+
import { useGridRootProps } from "../hooks/utils/useGridRootProps.mjs";
|
|
7
|
+
import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.mjs";
|
|
8
|
+
import { gridDataSourceErrorSelector, gridDataSourceLoadingIdSelector } from "../hooks/features/dataSource/gridDataSourceSelector.mjs";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const useUtilityClasses = ownerState => {
|
|
11
11
|
const {
|
|
@@ -5,8 +5,8 @@ import { styled } from '@mui/material/styles';
|
|
|
5
5
|
import { gridRowNodeSelector } from '@mui/x-data-grid';
|
|
6
6
|
import { vars } from '@mui/x-data-grid/internals';
|
|
7
7
|
import { useResizeObserver } from '@mui/x-internals/useResizeObserver';
|
|
8
|
-
import { useGridRootProps } from "../hooks/utils/useGridRootProps.
|
|
9
|
-
import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.
|
|
8
|
+
import { useGridRootProps } from "../hooks/utils/useGridRootProps.mjs";
|
|
9
|
+
import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.mjs";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
const DetailPanel = styled('div', {
|
|
12
12
|
name: 'MuiDataGrid',
|
package/{esm/components/GridDetailPanelToggleCell.js → components/GridDetailPanelToggleCell.mjs}
RENAMED
|
@@ -4,9 +4,9 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import composeClasses from '@mui/utils/composeClasses';
|
|
5
5
|
import { getDataGridUtilityClass, useGridSelector } from '@mui/x-data-grid';
|
|
6
6
|
import { createSelector } from '@mui/x-data-grid/internals';
|
|
7
|
-
import { useGridRootProps } from "../hooks/utils/useGridRootProps.
|
|
8
|
-
import { useGridApiContext } from "../hooks/utils/useGridApiContext.
|
|
9
|
-
import { gridDetailPanelExpandedRowIdsSelector, gridDetailPanelExpandedRowsContentCacheSelector } from "../hooks/features/detailPanel/gridDetailPanelSelector.
|
|
7
|
+
import { useGridRootProps } from "../hooks/utils/useGridRootProps.mjs";
|
|
8
|
+
import { useGridApiContext } from "../hooks/utils/useGridApiContext.mjs";
|
|
9
|
+
import { gridDetailPanelExpandedRowIdsSelector, gridDetailPanelExpandedRowsContentCacheSelector } from "../hooks/features/detailPanel/gridDetailPanelSelector.mjs";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
const useUtilityClasses = ownerState => {
|
|
12
12
|
const {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import composeClasses from '@mui/utils/composeClasses';
|
|
5
5
|
import { getDataGridUtilityClass, useGridSelector } from '@mui/x-data-grid';
|
|
6
|
-
import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.
|
|
7
|
-
import { useGridRootProps } from "../hooks/utils/useGridRootProps.
|
|
8
|
-
import { gridDetailPanelExpandedRowsContentCacheSelector, gridDetailPanelExpandedRowIdsSelector } from "../hooks/features/detailPanel/index.
|
|
9
|
-
import { GridDetailPanel } from "./GridDetailPanel.
|
|
10
|
-
import { gridDetailPanelRawHeightCacheSelector } from "../hooks/features/detailPanel/gridDetailPanelSelector.
|
|
6
|
+
import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.mjs";
|
|
7
|
+
import { useGridRootProps } from "../hooks/utils/useGridRootProps.mjs";
|
|
8
|
+
import { gridDetailPanelExpandedRowsContentCacheSelector, gridDetailPanelExpandedRowIdsSelector } from "../hooks/features/detailPanel/index.mjs";
|
|
9
|
+
import { GridDetailPanel } from "./GridDetailPanel.mjs";
|
|
10
|
+
import { gridDetailPanelRawHeightCacheSelector } from "../hooks/features/detailPanel/gridDetailPanelSelector.mjs";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
const useUtilityClasses = () => {
|
|
13
13
|
const slots = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GridColumnMenuComponent } from '@mui/x-data-grid/internals';
|
|
2
|
-
import { GridColumnMenuPinningItem } from "./GridColumnMenuPinningItem.
|
|
2
|
+
import { GridColumnMenuPinningItem } from "./GridColumnMenuPinningItem.mjs";
|
|
3
3
|
export declare const GRID_COLUMN_MENU_SLOTS_PRO: {
|
|
4
4
|
columnMenuPinningItem: typeof GridColumnMenuPinningItem;
|
|
5
5
|
columnMenuSortItem: typeof import("@mui/x-data-grid").GridColumnMenuSortItem;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import { GridGenericColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from '@mui/x-data-grid';
|
|
5
5
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
6
|
-
import { GridColumnMenuPinningItem } from "./GridColumnMenuPinningItem.
|
|
6
|
+
import { GridColumnMenuPinningItem } from "./GridColumnMenuPinningItem.mjs";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
export const GRID_COLUMN_MENU_SLOTS_PRO = _extends({}, GRID_COLUMN_MENU_SLOTS, {
|
|
9
9
|
columnMenuPinningItem: GridColumnMenuPinningItem
|
|
@@ -7,7 +7,7 @@ import { styled } from '@mui/material/styles';
|
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { gridSortModelSelector, useGridApiContext, useGridSelector, getDataGridUtilityClass, gridClasses } from '@mui/x-data-grid';
|
|
9
9
|
import { gridEditRowsStateSelector, isEventTargetInPortal, vars } from '@mui/x-data-grid/internals';
|
|
10
|
-
import { useGridRootProps } from "../hooks/utils/useGridRootProps.
|
|
10
|
+
import { useGridRootProps } from "../hooks/utils/useGridRootProps.mjs";
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
const useUtilityClasses = ownerState => {
|
|
13
13
|
const {
|
package/{esm/components/GridTreeDataGroupingCell.js → components/GridTreeDataGroupingCell.mjs}
RENAMED
|
@@ -4,8 +4,8 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import composeClasses from '@mui/utils/composeClasses';
|
|
5
5
|
import { useGridSelector, gridFilteredDescendantCountLookupSelector, getDataGridUtilityClass } from '@mui/x-data-grid';
|
|
6
6
|
import { vars } from '@mui/x-data-grid/internals';
|
|
7
|
-
import { useGridRootProps } from "../hooks/utils/useGridRootProps.
|
|
8
|
-
import { useGridApiContext } from "../hooks/utils/useGridApiContext.
|
|
7
|
+
import { useGridRootProps } from "../hooks/utils/useGridRootProps.mjs";
|
|
8
|
+
import { useGridApiContext } from "../hooks/utils/useGridApiContext.mjs";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const useUtilityClasses = ownerState => {
|
|
11
11
|
const {
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
9
|
exports.GridHeaderFilterCell = void 0;
|
|
10
|
+
var _formatErrorMessage2 = _interopRequireDefault(require("@mui/x-internals/formatErrorMessage"));
|
|
10
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
12
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
13
|
var React = _interopRequireWildcard(require("react"));
|
|
@@ -68,7 +69,7 @@ const useUtilityClasses = ownerState => {
|
|
|
68
69
|
pinnedPosition
|
|
69
70
|
} = ownerState;
|
|
70
71
|
const slots = {
|
|
71
|
-
root: ['columnHeader', 'columnHeader--filter', colDef.headerAlign
|
|
72
|
+
root: ['columnHeader', 'columnHeader--filter', colDef.headerAlign && `columnHeader--align${(0, _capitalize.default)(colDef.headerAlign)}`, 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition === _internals.PinnedColumnPosition.LEFT && 'columnHeader--pinnedLeft', pinnedPosition === _internals.PinnedColumnPosition.RIGHT && 'columnHeader--pinnedRight'],
|
|
72
73
|
input: ['columnHeaderFilterInput'],
|
|
73
74
|
operatorLabel: ['columnHeaderFilterOperatorLabel']
|
|
74
75
|
};
|
|
@@ -337,7 +338,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
337
338
|
return null;
|
|
338
339
|
}
|
|
339
340
|
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
340
|
-
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
341
|
+
return new Error(process.env.NODE_ENV !== "production" ? `Expected prop '${propName}' to be of type Element` : (0, _formatErrorMessage2.default)(49, propName));
|
|
341
342
|
}
|
|
342
343
|
return null;
|
|
343
344
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
|
|
3
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
5
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
6
|
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "pinnedOffset", "style", "showLeftBorder", "showRightBorder"];
|
|
@@ -16,9 +17,9 @@ import { PinnedColumnPosition, useGridPrivateApiContext, gridHeaderFilteringEdit
|
|
|
16
17
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
17
18
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
18
19
|
import { inputBaseClasses } from '@mui/material/InputBase';
|
|
19
|
-
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.
|
|
20
|
-
import { GridHeaderFilterMenuContainer } from "./GridHeaderFilterMenuContainer.
|
|
21
|
-
import { GridHeaderFilterClearButton } from "./GridHeaderFilterClearButton.
|
|
20
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.mjs";
|
|
21
|
+
import { GridHeaderFilterMenuContainer } from "./GridHeaderFilterMenuContainer.mjs";
|
|
22
|
+
import { GridHeaderFilterClearButton } from "./GridHeaderFilterClearButton.mjs";
|
|
22
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
24
|
const StyledInputComponent = styled(GridFilterInputValue, {
|
|
24
25
|
name: 'MuiDataGrid',
|
|
@@ -61,7 +62,7 @@ const useUtilityClasses = ownerState => {
|
|
|
61
62
|
pinnedPosition
|
|
62
63
|
} = ownerState;
|
|
63
64
|
const slots = {
|
|
64
|
-
root: ['columnHeader', 'columnHeader--filter', colDef.headerAlign
|
|
65
|
+
root: ['columnHeader', 'columnHeader--filter', colDef.headerAlign && `columnHeader--align${capitalize(colDef.headerAlign)}`, 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition === PinnedColumnPosition.LEFT && 'columnHeader--pinnedLeft', pinnedPosition === PinnedColumnPosition.RIGHT && 'columnHeader--pinnedRight'],
|
|
65
66
|
input: ['columnHeaderFilterInput'],
|
|
66
67
|
operatorLabel: ['columnHeaderFilterOperatorLabel']
|
|
67
68
|
};
|
|
@@ -330,7 +331,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
330
331
|
return null;
|
|
331
332
|
}
|
|
332
333
|
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
333
|
-
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
334
|
+
return new Error(process.env.NODE_ENV !== "production" ? `Expected prop '${propName}' to be of type Element` : _formatErrorMessage(49, propName));
|
|
334
335
|
}
|
|
335
336
|
return null;
|
|
336
337
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.
|
|
2
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.mjs";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
function GridHeaderFilterClearButton(props) {
|
|
5
5
|
const rootProps = useGridRootProps();
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.GridHeaderFilterMenu = GridHeaderFilterMenu;
|
|
9
|
+
var _formatErrorMessage2 = _interopRequireDefault(require("@mui/x-internals/formatErrorMessage"));
|
|
9
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
11
|
var React = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -110,7 +111,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenu.propTypes = {
|
|
|
110
111
|
return null;
|
|
111
112
|
}
|
|
112
113
|
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
113
|
-
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
114
|
+
return new Error(process.env.NODE_ENV !== "production" ? `Expected prop '${propName}' to be of type Element` : (0, _formatErrorMessage2.default)(49, propName));
|
|
114
115
|
}
|
|
115
116
|
return null;
|
|
116
117
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
@@ -102,7 +103,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenu.propTypes = {
|
|
|
102
103
|
return null;
|
|
103
104
|
}
|
|
104
105
|
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
105
|
-
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
106
|
+
return new Error(process.env.NODE_ENV !== "production" ? `Expected prop '${propName}' to be of type Element` : _formatErrorMessage(49, propName));
|
|
106
107
|
}
|
|
107
108
|
return null;
|
|
108
109
|
}
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
9
|
exports.GridHeaderFilterMenuContainer = GridHeaderFilterMenuContainer;
|
|
10
|
+
var _formatErrorMessage2 = _interopRequireDefault(require("@mui/x-internals/formatErrorMessage"));
|
|
10
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
12
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
13
|
var React = _interopRequireWildcard(require("react"));
|
|
@@ -122,7 +123,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenuContainer.propTypes
|
|
|
122
123
|
return null;
|
|
123
124
|
}
|
|
124
125
|
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
125
|
-
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
126
|
+
return new Error(process.env.NODE_ENV !== "production" ? `Expected prop '${propName}' to be of type Element` : (0, _formatErrorMessage2.default)(49, propName));
|
|
126
127
|
}
|
|
127
128
|
return null;
|
|
128
129
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
|
|
3
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
5
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
6
|
const _excluded = ["operators", "item", "field", "buttonRef", "headerFilterMenuRef", "disabled", "showClearItem", "clearFilterItem"];
|
|
@@ -9,7 +10,7 @@ import { useGridApiContext, useGridSelector } from '@mui/x-data-grid';
|
|
|
9
10
|
import refType from '@mui/utils/refType';
|
|
10
11
|
import useId from '@mui/utils/useId';
|
|
11
12
|
import { gridHeaderFilteringMenuSelector } from '@mui/x-data-grid/internals';
|
|
12
|
-
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.
|
|
13
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.mjs";
|
|
13
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
function GridHeaderFilterMenuContainer(props) {
|
|
15
16
|
const {
|
|
@@ -115,7 +116,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenuContainer.propTypes
|
|
|
115
116
|
return null;
|
|
116
117
|
}
|
|
117
118
|
if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
118
|
-
return new Error(`Expected prop '${propName}' to be of type Element`);
|
|
119
|
+
return new Error(process.env.NODE_ENV !== "production" ? `Expected prop '${propName}' to be of type Element` : _formatErrorMessage(49, propName));
|
|
119
120
|
}
|
|
120
121
|
return null;
|
|
121
122
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./GridTreeDataGroupingCell.mjs";
|
|
2
|
+
export * from "./GridColumnMenuPinningItem.mjs";
|
|
3
|
+
export * from "./GridDetailPanelToggleCell.mjs";
|
|
4
|
+
export * from "./GridRowReorderCell.mjs";
|
|
5
|
+
export * from "../material/icons.mjs";
|
|
6
|
+
export * from "./headerFiltering/index.mjs";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Only export the variable and types that should be publicly exposed and re-exported from `@mui/x-data-grid-pro`
|
|
2
|
+
export * from "./GridTreeDataGroupingCell.mjs";
|
|
3
|
+
export * from "./GridColumnMenuPinningItem.mjs";
|
|
4
|
+
export * from "./GridDetailPanelToggleCell.mjs";
|
|
5
|
+
export * from "./GridRowReorderCell.mjs";
|
|
6
|
+
export * from "../material/icons.mjs";
|
|
7
|
+
export * from "./headerFiltering/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS } from "./GridProColumnMenu.
|
|
1
|
+
export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS } from "./GridProColumnMenu.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS } from "./GridProColumnMenu.
|
|
1
|
+
export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS } from "./GridProColumnMenu.mjs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from '@mui/x-data-grid/internals';
|
|
3
|
-
import { GridProColumnMenu } from "../components/GridProColumnMenu.
|
|
4
|
-
import { GridColumnHeaders } from "../components/GridColumnHeaders.
|
|
5
|
-
import { GridHeaderFilterMenu } from "../components/headerFiltering/GridHeaderFilterMenu.
|
|
6
|
-
import { GridHeaderFilterCell } from "../components/headerFiltering/GridHeaderFilterCell.
|
|
7
|
-
import { GridDetailPanels } from "../components/GridDetailPanels.
|
|
8
|
-
import { GridPinnedRows } from "../components/GridPinnedRows.
|
|
9
|
-
import materialSlots from "../material/index.
|
|
3
|
+
import { GridProColumnMenu } from "../components/GridProColumnMenu.mjs";
|
|
4
|
+
import { GridColumnHeaders } from "../components/GridColumnHeaders.mjs";
|
|
5
|
+
import { GridHeaderFilterMenu } from "../components/headerFiltering/GridHeaderFilterMenu.mjs";
|
|
6
|
+
import { GridHeaderFilterCell } from "../components/headerFiltering/GridHeaderFilterCell.mjs";
|
|
7
|
+
import { GridDetailPanels } from "../components/GridDetailPanels.mjs";
|
|
8
|
+
import { GridPinnedRows } from "../components/GridPinnedRows.mjs";
|
|
9
|
+
import materialSlots from "../material/index.mjs";
|
|
10
10
|
export const DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS = _extends({}, DATA_GRID_DEFAULT_SLOTS_COMPONENTS, materialSlots, {
|
|
11
11
|
columnMenu: GridProColumnMenu,
|
|
12
12
|
columnHeaders: GridColumnHeaders,
|
|
@@ -7,7 +7,7 @@ import * as React from 'react';
|
|
|
7
7
|
import { gridFocusColumnHeaderFilterSelector, useGridSelector, gridFilterModelSelector, gridTabIndexColumnHeaderFilterSelector, getDataGridUtilityClass } from '@mui/x-data-grid';
|
|
8
8
|
import { gridColumnsTotalWidthSelector, gridHasFillerSelector, gridHeaderFilterHeightSelector, gridVerticalScrollbarWidthSelector, useGridColumnHeaders as useGridColumnHeadersCommunity, useGridPrivateApiContext, getGridFilter, GridColumnHeaderRow, shouldCellShowLeftBorder, shouldCellShowRightBorder, PinnedColumnPosition } from '@mui/x-data-grid/internals';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
-
import { useGridRootProps } from "../../utils/useGridRootProps.
|
|
10
|
+
import { useGridRootProps } from "../../utils/useGridRootProps.mjs";
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
const useUtilityClasses = ownerState => {
|
|
13
13
|
const {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./gridColumnPinningInterface.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./gridColumnPinningInterface.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { type GridStateInitializer } from '@mui/x-data-grid/internals';
|
|
3
|
-
import type { GridPrivateApiPro } from "../../../models/gridApiPro.
|
|
4
|
-
import type { DataGridProProcessedProps } from "../../../models/dataGridProProps.
|
|
3
|
+
import type { GridPrivateApiPro } from "../../../models/gridApiPro.mjs";
|
|
4
|
+
import type { DataGridProProcessedProps } from "../../../models/dataGridProProps.mjs";
|
|
5
5
|
export declare const columnPinningStateInitializer: GridStateInitializer<Pick<DataGridProProcessedProps, 'pinnedColumns' | 'initialState'>>;
|
|
6
6
|
export declare const useGridColumnPinning: (apiRef: RefObject<GridPrivateApiPro>, props: Pick<DataGridProProcessedProps, "disableColumnPinning" | "initialState" | "pinnedColumns" | "onPinnedColumnsChange" | "slotProps" | "slots">) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import type { DataGridProProcessedProps } from "../../../models/dataGridProProps.
|
|
3
|
-
import type { GridPrivateApiPro } from "../../../models/gridApiPro.
|
|
2
|
+
import type { DataGridProProcessedProps } from "../../../models/dataGridProProps.mjs";
|
|
3
|
+
import type { GridPrivateApiPro } from "../../../models/gridApiPro.mjs";
|
|
4
4
|
export declare const useGridColumnPinningPreProcessors: (apiRef: RefObject<GridPrivateApiPro>, props: DataGridProProcessedProps) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GridStatePro } from "../../../models/gridStatePro.
|
|
2
|
-
export declare const gridColumnReorderSelector: import("@mui/x-data-grid").OutputSelector<GridStatePro, unknown, import("./columnReorderInterfaces.
|
|
1
|
+
import type { GridStatePro } from "../../../models/gridStatePro.mjs";
|
|
2
|
+
export declare const gridColumnReorderSelector: import("@mui/x-data-grid").OutputSelector<GridStatePro, unknown, import("./columnReorderInterfaces.mjs").GridColumnReorderState>;
|
|
3
3
|
export declare const gridColumnReorderDragColSelector: (args_0: import("react").RefObject<{
|
|
4
4
|
state: GridStatePro;
|
|
5
5
|
} | null>) => string;
|
package/{esm/hooks/features/columnReorder/index.d.ts → hooks/features/columnReorder/index.d.mts}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./columnReorderSelector.
|
|
2
|
-
export type { GridColumnReorderState } from "./columnReorderInterfaces.
|
|
1
|
+
export * from "./columnReorderSelector.mjs";
|
|
2
|
+
export type { GridColumnReorderState } from "./columnReorderInterfaces.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import type { GridStateInitializer } from '@mui/x-data-grid/internals';
|
|
3
|
-
import type { GridPrivateApiPro } from "../../../models/gridApiPro.
|
|
4
|
-
import type { DataGridProProcessedProps } from "../../../models/dataGridProProps.
|
|
3
|
+
import type { GridPrivateApiPro } from "../../../models/gridApiPro.mjs";
|
|
4
|
+
import type { DataGridProProcessedProps } from "../../../models/dataGridProProps.mjs";
|
|
5
5
|
export declare const columnReorderStateInitializer: GridStateInitializer;
|
|
6
6
|
/**
|
|
7
7
|
* @requires useGridColumns (method)
|
|
@@ -6,7 +6,7 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
6
6
|
import ownerDocument from '@mui/utils/ownerDocument';
|
|
7
7
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
8
8
|
import { useGridEvent, getDataGridUtilityClass, useGridLogger, useGridEventPriority } from '@mui/x-data-grid';
|
|
9
|
-
import { gridColumnReorderDragColSelector } from "./columnReorderSelector.
|
|
9
|
+
import { gridColumnReorderDragColSelector } from "./columnReorderSelector.mjs";
|
|
10
10
|
const CURSOR_MOVE_DIRECTION_LEFT = 'left';
|
|
11
11
|
const CURSOR_MOVE_DIRECTION_RIGHT = 'right';
|
|
12
12
|
const getCursorMoveDirectionX = (currentCoordinates, nextCoordinates) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GridRowId } from '@mui/x-data-grid';
|
|
2
|
-
import type { GridStatePro } from "../../../models/gridStatePro.
|
|
3
|
-
export declare const gridDataSourceStateSelector: import("@mui/x-data-grid").OutputSelector<GridStatePro, unknown, import("./models.
|
|
2
|
+
import type { GridStatePro } from "../../../models/gridStatePro.mjs";
|
|
3
|
+
export declare const gridDataSourceStateSelector: import("@mui/x-data-grid").OutputSelector<GridStatePro, unknown, import("./models.mjs").GridDataSourceState>;
|
|
4
4
|
export declare const gridDataSourceLoadingSelector: (args_0: import("react").RefObject<{
|
|
5
5
|
state: GridStatePro;
|
|
6
6
|
} | null>) => Record<GridRowId, boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type GridDataSourceState } from "./models.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { type GridRowId } from '@mui/x-data-grid';
|
|
3
3
|
import { CacheChunkManager, DataSourceRowsUpdateStrategy, type GridDataSourceBaseOptions, type GridStrategyProcessor } from '@mui/x-data-grid/internals';
|
|
4
|
-
import type { GridPrivateApiPro } from "../../../models/gridApiPro.
|
|
5
|
-
import type { DataGridProProcessedProps } from "../../../models/dataGridProProps.
|
|
6
|
-
import type { GridDataSourceApiPro, GridDataSourcePrivateApiPro } from "./models.
|
|
4
|
+
import type { GridPrivateApiPro } from "../../../models/gridApiPro.mjs";
|
|
5
|
+
import type { DataGridProProcessedProps } from "../../../models/dataGridProProps.mjs";
|
|
6
|
+
import type { GridDataSourceApiPro, GridDataSourcePrivateApiPro } from "./models.mjs";
|
|
7
7
|
export declare const INITIAL_STATE: {
|
|
8
8
|
loading: {};
|
|
9
9
|
errors: {};
|
|
@@ -63,6 +63,7 @@ const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
63
63
|
const onDataSourceErrorProp = props.onDataSourceError;
|
|
64
64
|
const replaceGroupRows = React.useCallback((groupId, groupPath, rows) => {
|
|
65
65
|
const tree = (0, _xDataGrid.gridRowTreeSelector)(apiRef);
|
|
66
|
+
const rowsLookup = (0, _xDataGrid.gridRowsLookupSelector)(apiRef);
|
|
66
67
|
const fetchedRowIds = new Set(rows.map(row => (0, _xDataGrid.gridRowIdSelector)(apiRef, row)));
|
|
67
68
|
const currentGroupRows = (0, _internals.getTreeNodeDescendants)(tree, groupId, false, true);
|
|
68
69
|
const rowsToDelete = [];
|
|
@@ -76,15 +77,13 @@ const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
76
77
|
if (fetchedRowIds.has(descendantId)) {
|
|
77
78
|
continue;
|
|
78
79
|
}
|
|
79
|
-
rowsToDelete.push({
|
|
80
|
-
id: descendantId,
|
|
80
|
+
rowsToDelete.push((0, _extends2.default)({}, rowsLookup[descendantId], {
|
|
81
81
|
_action: 'delete'
|
|
82
|
-
});
|
|
82
|
+
}));
|
|
83
83
|
}
|
|
84
|
-
rowsToDelete.push({
|
|
85
|
-
id: rowId,
|
|
84
|
+
rowsToDelete.push((0, _extends2.default)({}, rowsLookup[rowId], {
|
|
86
85
|
_action: 'delete'
|
|
87
|
-
});
|
|
86
|
+
}));
|
|
88
87
|
});
|
|
89
88
|
if (rowsToDelete.length > 0) {
|
|
90
89
|
apiRef.current.updateNestedRows(rowsToDelete, groupPath);
|
|
@@ -207,6 +206,7 @@ const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
207
206
|
});
|
|
208
207
|
}, [apiRef]);
|
|
209
208
|
const removeChildrenRows = React.useCallback(parentId => {
|
|
209
|
+
const rowsLookup = (0, _xDataGrid.gridRowsLookupSelector)(apiRef);
|
|
210
210
|
const rowNode = (0, _xDataGrid.gridRowNodeSelector)(apiRef, parentId);
|
|
211
211
|
if (!rowNode || rowNode.type !== 'group' || rowNode.children.length === 0) {
|
|
212
212
|
return;
|
|
@@ -220,10 +220,9 @@ const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
220
220
|
if (node.type === 'group' && node.children.length > 0) {
|
|
221
221
|
node.children.forEach(traverse);
|
|
222
222
|
}
|
|
223
|
-
removedRows.push({
|
|
224
|
-
id: nodeId,
|
|
223
|
+
removedRows.push((0, _extends2.default)({}, rowsLookup[nodeId], {
|
|
225
224
|
_action: 'delete'
|
|
226
|
-
});
|
|
225
|
+
}));
|
|
227
226
|
};
|
|
228
227
|
rowNode.children.forEach(traverse);
|
|
229
228
|
if (removedRows.length > 0) {
|
|
@@ -248,6 +247,7 @@ const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
248
247
|
apiRef.current.setRows(response.rows);
|
|
249
248
|
} else {
|
|
250
249
|
const tree = (0, _xDataGrid.gridRowTreeSelector)(apiRef);
|
|
250
|
+
const rowsLookup = (0, _xDataGrid.gridRowsLookupSelector)(apiRef);
|
|
251
251
|
// Remove existing outdated rows before setting the new ones
|
|
252
252
|
// Create a set of the current root rows
|
|
253
253
|
const parentRowsToDelete = new Set((0, _internals.getTreeNodeDescendants)(tree, _xDataGrid.GRID_ROOT_GROUP_ID, false, true));
|
|
@@ -261,15 +261,13 @@ const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
261
261
|
const descendants = (0, _internals.getTreeNodeDescendants)(tree, parentRowId, false, false);
|
|
262
262
|
for (let i = descendants.length - 1; i >= 0; i -= 1) {
|
|
263
263
|
// delete deepest descendants first
|
|
264
|
-
rowsToDelete.push({
|
|
265
|
-
id: descendants[i],
|
|
264
|
+
rowsToDelete.push((0, _extends2.default)({}, rowsLookup[descendants[i]], {
|
|
266
265
|
_action: 'delete'
|
|
267
|
-
});
|
|
266
|
+
}));
|
|
268
267
|
}
|
|
269
|
-
rowsToDelete.push({
|
|
270
|
-
id: parentRowId,
|
|
268
|
+
rowsToDelete.push((0, _extends2.default)({}, rowsLookup[parentRowId], {
|
|
271
269
|
_action: 'delete'
|
|
272
|
-
});
|
|
270
|
+
}));
|
|
273
271
|
});
|
|
274
272
|
}
|
|
275
273
|
apiRef.current.updateRows(response.rows.concat(rowsToDelete));
|
|
@@ -4,11 +4,11 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
|
|
6
6
|
import useLazyRef from '@mui/utils/useLazyRef';
|
|
7
|
-
import { useGridSelector, GridGetRowsError, gridRowIdSelector, gridRowNodeSelector, gridRowTreeSelector, GRID_ROOT_GROUP_ID } from '@mui/x-data-grid';
|
|
7
|
+
import { useGridSelector, GridGetRowsError, gridRowIdSelector, gridRowNodeSelector, gridRowTreeSelector, GRID_ROOT_GROUP_ID, gridRowsLookupSelector } from '@mui/x-data-grid';
|
|
8
8
|
import { gridRowGroupsToFetchSelector, useGridDataSourceBase, CacheChunkManager, gridGetRowsParamsSelector, DataSourceRowsUpdateStrategy, GridStrategyGroup, getTreeNodeDescendants } from '@mui/x-data-grid/internals';
|
|
9
9
|
import { warnOnce } from '@mui/x-internals/warning';
|
|
10
|
-
import { NestedDataManager, RequestStatus, getGroupKeys } from "./utils.
|
|
11
|
-
import { gridDataSourceErrorsSelector } from "./gridDataSourceSelector.
|
|
10
|
+
import { NestedDataManager, RequestStatus, getGroupKeys } from "./utils.mjs";
|
|
11
|
+
import { gridDataSourceErrorsSelector } from "./gridDataSourceSelector.mjs";
|
|
12
12
|
export const INITIAL_STATE = {
|
|
13
13
|
loading: {},
|
|
14
14
|
errors: {}
|
|
@@ -56,6 +56,7 @@ export const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
56
56
|
const onDataSourceErrorProp = props.onDataSourceError;
|
|
57
57
|
const replaceGroupRows = React.useCallback((groupId, groupPath, rows) => {
|
|
58
58
|
const tree = gridRowTreeSelector(apiRef);
|
|
59
|
+
const rowsLookup = gridRowsLookupSelector(apiRef);
|
|
59
60
|
const fetchedRowIds = new Set(rows.map(row => gridRowIdSelector(apiRef, row)));
|
|
60
61
|
const currentGroupRows = getTreeNodeDescendants(tree, groupId, false, true);
|
|
61
62
|
const rowsToDelete = [];
|
|
@@ -69,15 +70,13 @@ export const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
69
70
|
if (fetchedRowIds.has(descendantId)) {
|
|
70
71
|
continue;
|
|
71
72
|
}
|
|
72
|
-
rowsToDelete.push({
|
|
73
|
-
id: descendantId,
|
|
73
|
+
rowsToDelete.push(_extends({}, rowsLookup[descendantId], {
|
|
74
74
|
_action: 'delete'
|
|
75
|
-
});
|
|
75
|
+
}));
|
|
76
76
|
}
|
|
77
|
-
rowsToDelete.push({
|
|
78
|
-
id: rowId,
|
|
77
|
+
rowsToDelete.push(_extends({}, rowsLookup[rowId], {
|
|
79
78
|
_action: 'delete'
|
|
80
|
-
});
|
|
79
|
+
}));
|
|
81
80
|
});
|
|
82
81
|
if (rowsToDelete.length > 0) {
|
|
83
82
|
apiRef.current.updateNestedRows(rowsToDelete, groupPath);
|
|
@@ -200,6 +199,7 @@ export const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
200
199
|
});
|
|
201
200
|
}, [apiRef]);
|
|
202
201
|
const removeChildrenRows = React.useCallback(parentId => {
|
|
202
|
+
const rowsLookup = gridRowsLookupSelector(apiRef);
|
|
203
203
|
const rowNode = gridRowNodeSelector(apiRef, parentId);
|
|
204
204
|
if (!rowNode || rowNode.type !== 'group' || rowNode.children.length === 0) {
|
|
205
205
|
return;
|
|
@@ -213,10 +213,9 @@ export const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
213
213
|
if (node.type === 'group' && node.children.length > 0) {
|
|
214
214
|
node.children.forEach(traverse);
|
|
215
215
|
}
|
|
216
|
-
removedRows.push({
|
|
217
|
-
id: nodeId,
|
|
216
|
+
removedRows.push(_extends({}, rowsLookup[nodeId], {
|
|
218
217
|
_action: 'delete'
|
|
219
|
-
});
|
|
218
|
+
}));
|
|
220
219
|
};
|
|
221
220
|
rowNode.children.forEach(traverse);
|
|
222
221
|
if (removedRows.length > 0) {
|
|
@@ -241,6 +240,7 @@ export const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
241
240
|
apiRef.current.setRows(response.rows);
|
|
242
241
|
} else {
|
|
243
242
|
const tree = gridRowTreeSelector(apiRef);
|
|
243
|
+
const rowsLookup = gridRowsLookupSelector(apiRef);
|
|
244
244
|
// Remove existing outdated rows before setting the new ones
|
|
245
245
|
// Create a set of the current root rows
|
|
246
246
|
const parentRowsToDelete = new Set(getTreeNodeDescendants(tree, GRID_ROOT_GROUP_ID, false, true));
|
|
@@ -254,15 +254,13 @@ export const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
254
254
|
const descendants = getTreeNodeDescendants(tree, parentRowId, false, false);
|
|
255
255
|
for (let i = descendants.length - 1; i >= 0; i -= 1) {
|
|
256
256
|
// delete deepest descendants first
|
|
257
|
-
rowsToDelete.push({
|
|
258
|
-
id: descendants[i],
|
|
257
|
+
rowsToDelete.push(_extends({}, rowsLookup[descendants[i]], {
|
|
259
258
|
_action: 'delete'
|
|
260
|
-
});
|
|
259
|
+
}));
|
|
261
260
|
}
|
|
262
|
-
rowsToDelete.push({
|
|
263
|
-
id: parentRowId,
|
|
261
|
+
rowsToDelete.push(_extends({}, rowsLookup[parentRowId], {
|
|
264
262
|
_action: 'delete'
|
|
265
|
-
});
|
|
263
|
+
}));
|
|
266
264
|
});
|
|
267
265
|
}
|
|
268
266
|
apiRef.current.updateRows(response.rows.concat(rowsToDelete));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { type GridStateInitializer } from '@mui/x-data-grid/internals';
|
|
3
|
-
import type { GridPrivateApiPro } from "../../../models/gridApiPro.
|
|
4
|
-
import type { DataGridProProcessedProps } from "../../../models/dataGridProProps.
|
|
3
|
+
import type { GridPrivateApiPro } from "../../../models/gridApiPro.mjs";
|
|
4
|
+
import type { DataGridProProcessedProps } from "../../../models/dataGridProProps.mjs";
|
|
5
5
|
export declare const dataSourceStateInitializer: GridStateInitializer;
|
|
6
6
|
export declare const useGridDataSourcePro: (apiRef: RefObject<GridPrivateApiPro>, props: DataGridProProcessedProps) => void;
|