@mui/x-data-grid-pro 5.4.0 → 5.6.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/CHANGELOG.md +321 -113
- package/DataGridPro/DataGridPro.d.ts +3 -0
- package/DataGridPro/DataGridPro.js +896 -0
- package/DataGridPro/index.d.ts +2 -0
- package/DataGridPro/index.js +2 -0
- package/DataGridPro/package.json +6 -0
- package/DataGridPro/useDataGridProComponent.d.ts +4 -0
- package/DataGridPro/useDataGridProComponent.js +72 -0
- package/DataGridPro/useDataGridProProps.d.ts +6 -0
- package/DataGridPro/useDataGridProProps.js +49 -0
- package/components/DataGridProColumnHeaders.d.ts +6 -0
- package/components/DataGridProColumnHeaders.js +165 -0
- package/components/DataGridProVirtualScroller.d.ts +8 -0
- package/components/DataGridProVirtualScroller.js +281 -0
- package/components/GridColumnPinningMenuItems.d.ts +11 -0
- package/components/GridColumnPinningMenuItems.js +71 -0
- package/components/GridDetailPanelToggleCell.d.ts +7 -0
- package/components/GridDetailPanelToggleCell.js +124 -0
- package/components/GridGroupingColumnLeafCell.d.ts +4 -0
- package/components/GridGroupingColumnLeafCell.js +22 -0
- package/components/GridGroupingCriteriaCell.d.ts +10 -0
- package/components/GridGroupingCriteriaCell.js +150 -0
- package/components/GridRowGroupableColumnMenuItems.d.ts +11 -0
- package/components/GridRowGroupableColumnMenuItems.js +63 -0
- package/components/GridRowGroupingColumnMenuItems.d.ts +11 -0
- package/components/GridRowGroupingColumnMenuItems.js +58 -0
- package/components/GridTreeDataGroupingCell.d.ts +10 -0
- package/components/GridTreeDataGroupingCell.js +159 -0
- package/components/Watermark.d.ts +2 -0
- package/components/Watermark.js +43 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +3 -0
- package/components/package.json +6 -0
- package/hooks/features/columnPinning/gridColumnPinningInterface.d.ts +42 -0
- package/hooks/features/columnPinning/gridColumnPinningInterface.js +11 -0
- package/hooks/features/columnPinning/gridColumnPinningSelector.d.ts +2 -0
- package/hooks/features/columnPinning/gridColumnPinningSelector.js +1 -0
- package/hooks/features/columnPinning/index.d.ts +2 -0
- package/hooks/features/columnPinning/index.js +2 -0
- package/hooks/features/columnPinning/useGridColumnPinning.d.ts +6 -0
- package/hooks/features/columnPinning/useGridColumnPinning.js +274 -0
- package/hooks/features/columnPinning/useGridColumnPinningPreProcessors.d.ts +4 -0
- package/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +45 -0
- package/hooks/features/columnReorder/columnReorderInterfaces.d.ts +6 -0
- package/hooks/features/columnReorder/columnReorderInterfaces.js +1 -0
- package/hooks/features/columnReorder/columnReorderSelector.d.ts +3 -0
- package/hooks/features/columnReorder/columnReorderSelector.js +3 -0
- package/hooks/features/columnReorder/index.d.ts +2 -0
- package/hooks/features/columnReorder/index.js +2 -0
- package/hooks/features/columnReorder/useGridColumnReorder.d.ts +8 -0
- package/hooks/features/columnReorder/useGridColumnReorder.js +166 -0
- package/hooks/features/columnResize/columnResizeSelector.d.ts +3 -0
- package/hooks/features/columnResize/columnResizeSelector.js +3 -0
- package/hooks/features/columnResize/columnResizeState.d.ts +3 -0
- package/hooks/features/columnResize/columnResizeState.js +1 -0
- package/hooks/features/columnResize/index.d.ts +2 -0
- package/hooks/features/columnResize/index.js +2 -0
- package/hooks/features/columnResize/useGridColumnResize.d.ts +9 -0
- package/hooks/features/columnResize/useGridColumnResize.js +305 -0
- package/hooks/features/detailPanel/gridDetailPanelInterface.d.ts +28 -0
- package/hooks/features/detailPanel/gridDetailPanelInterface.js +1 -0
- package/hooks/features/detailPanel/gridDetailPanelSelector.d.ts +5 -0
- package/hooks/features/detailPanel/gridDetailPanelSelector.js +3 -0
- package/hooks/features/detailPanel/gridDetailPanelToggleColDef.d.ts +3 -0
- package/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +26 -0
- package/hooks/features/detailPanel/index.d.ts +3 -0
- package/hooks/features/detailPanel/index.js +3 -0
- package/hooks/features/detailPanel/useGridDetailPanel.d.ts +4 -0
- package/hooks/features/detailPanel/useGridDetailPanel.js +109 -0
- package/hooks/features/detailPanel/useGridDetailPanelCache.d.ts +4 -0
- package/hooks/features/detailPanel/useGridDetailPanelCache.js +57 -0
- package/hooks/features/detailPanel/useGridDetailPanelPreProcessors.d.ts +4 -0
- package/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +28 -0
- package/hooks/features/index.d.ts +6 -0
- package/hooks/features/index.js +7 -0
- package/hooks/features/infiniteLoader/useGridInfiniteLoader.d.ts +10 -0
- package/hooks/features/infiniteLoader/useGridInfiniteLoader.js +52 -0
- package/hooks/features/rowGrouping/createGroupingColDef.d.ts +43 -0
- package/hooks/features/rowGrouping/createGroupingColDef.js +318 -0
- package/hooks/features/rowGrouping/gridRowGroupingInterfaces.d.ts +31 -0
- package/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +1 -0
- package/hooks/features/rowGrouping/gridRowGroupingSelector.d.ts +4 -0
- package/hooks/features/rowGrouping/gridRowGroupingSelector.js +5 -0
- package/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +24 -0
- package/hooks/features/rowGrouping/gridRowGroupingUtils.js +124 -0
- package/hooks/features/rowGrouping/index.d.ts +3 -0
- package/hooks/features/rowGrouping/index.js +3 -0
- package/hooks/features/rowGrouping/useGridRowGrouping.d.ts +13 -0
- package/hooks/features/rowGrouping/useGridRowGrouping.js +325 -0
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +4 -0
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +76 -0
- package/hooks/features/treeData/gridTreeDataGroupColDef.d.ts +7 -0
- package/hooks/features/treeData/gridTreeDataGroupColDef.js +22 -0
- package/hooks/features/treeData/gridTreeDataUtils.d.ts +14 -0
- package/hooks/features/treeData/gridTreeDataUtils.js +86 -0
- package/hooks/features/treeData/index.d.ts +1 -0
- package/hooks/features/treeData/index.js +1 -0
- package/hooks/features/treeData/useGridTreeData.d.ts +10 -0
- package/hooks/features/treeData/useGridTreeData.js +108 -0
- package/hooks/features/treeData/useGridTreeDataPreProcessors.d.ts +4 -0
- package/hooks/features/treeData/useGridTreeDataPreProcessors.js +69 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +1 -0
- package/hooks/package.json +6 -0
- package/hooks/utils/useGridApiContext.d.ts +4 -0
- package/hooks/utils/useGridApiContext.js +2 -0
- package/hooks/utils/useGridApiRef.d.ts +4 -0
- package/hooks/utils/useGridApiRef.js +2 -0
- package/hooks/utils/useGridRootProps.d.ts +2 -0
- package/hooks/utils/useGridRootProps.js +2 -0
- package/index.d.ts +15 -0
- package/index.js +19 -0
- package/legacy/DataGridPro/DataGridPro.js +896 -0
- package/legacy/DataGridPro/index.js +2 -0
- package/legacy/DataGridPro/useDataGridProComponent.js +72 -0
- package/legacy/DataGridPro/useDataGridProProps.js +53 -0
- package/legacy/components/DataGridProColumnHeaders.js +173 -0
- package/legacy/components/DataGridProVirtualScroller.js +297 -0
- package/legacy/components/GridColumnPinningMenuItems.js +71 -0
- package/legacy/components/GridDetailPanelToggleCell.js +120 -0
- package/legacy/components/GridGroupingColumnLeafCell.js +20 -0
- package/legacy/components/GridGroupingCriteriaCell.js +146 -0
- package/legacy/components/GridRowGroupableColumnMenuItems.js +61 -0
- package/legacy/components/GridRowGroupingColumnMenuItems.js +56 -0
- package/legacy/components/GridTreeDataGroupingCell.js +155 -0
- package/legacy/components/Watermark.js +43 -0
- package/legacy/components/index.js +3 -0
- package/legacy/hooks/features/columnPinning/gridColumnPinningInterface.js +11 -0
- package/legacy/hooks/features/columnPinning/gridColumnPinningSelector.js +3 -0
- package/legacy/hooks/features/columnPinning/index.js +2 -0
- package/legacy/hooks/features/columnPinning/useGridColumnPinning.js +298 -0
- package/legacy/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +48 -0
- package/legacy/hooks/features/columnReorder/columnReorderInterfaces.js +1 -0
- package/legacy/hooks/features/columnReorder/columnReorderSelector.js +7 -0
- package/legacy/hooks/features/columnReorder/index.js +2 -0
- package/legacy/hooks/features/columnReorder/useGridColumnReorder.js +172 -0
- package/legacy/hooks/features/columnResize/columnResizeSelector.js +7 -0
- package/legacy/hooks/features/columnResize/columnResizeState.js +1 -0
- package/legacy/hooks/features/columnResize/index.js +2 -0
- package/legacy/hooks/features/columnResize/useGridColumnResize.js +310 -0
- package/legacy/hooks/features/detailPanel/gridDetailPanelInterface.js +1 -0
- package/legacy/hooks/features/detailPanel/gridDetailPanelSelector.js +9 -0
- package/legacy/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +28 -0
- package/legacy/hooks/features/detailPanel/index.js +3 -0
- package/legacy/hooks/features/detailPanel/useGridDetailPanel.js +114 -0
- package/legacy/hooks/features/detailPanel/useGridDetailPanelCache.js +57 -0
- package/legacy/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +31 -0
- package/legacy/hooks/features/index.js +7 -0
- package/legacy/hooks/features/infiniteLoader/useGridInfiniteLoader.js +51 -0
- package/legacy/hooks/features/rowGrouping/createGroupingColDef.js +319 -0
- package/legacy/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +1 -0
- package/legacy/hooks/features/rowGrouping/gridRowGroupingSelector.js +13 -0
- package/legacy/hooks/features/rowGrouping/gridRowGroupingUtils.js +130 -0
- package/legacy/hooks/features/rowGrouping/index.js +3 -0
- package/legacy/hooks/features/rowGrouping/useGridRowGrouping.js +334 -0
- package/legacy/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +83 -0
- package/legacy/hooks/features/treeData/gridTreeDataGroupColDef.js +24 -0
- package/legacy/hooks/features/treeData/gridTreeDataUtils.js +84 -0
- package/legacy/hooks/features/treeData/index.js +1 -0
- package/legacy/hooks/features/treeData/useGridTreeData.js +116 -0
- package/legacy/hooks/features/treeData/useGridTreeDataPreProcessors.js +72 -0
- package/legacy/hooks/index.js +1 -0
- package/legacy/hooks/utils/useGridApiContext.js +2 -0
- package/legacy/hooks/utils/useGridApiRef.js +2 -0
- package/legacy/hooks/utils/useGridRootProps.js +2 -0
- package/legacy/index.js +19 -0
- package/legacy/models/dataGridProProps.js +1 -0
- package/legacy/models/gridApiPro.js +1 -0
- package/legacy/models/gridGroupingColDefOverride.js +1 -0
- package/legacy/models/gridGroupingValueGetterParams.js +1 -0
- package/legacy/models/gridRowScrollEndParams.js +1 -0
- package/legacy/models/gridStatePro.js +1 -0
- package/legacy/models/index.js +4 -0
- package/legacy/themeAugmentation/index.js +3 -0
- package/legacy/themeAugmentation/overrides.js +1 -0
- package/legacy/themeAugmentation/props.js +1 -0
- package/legacy/typeOverloads/modules.js +1 -0
- package/legacy/typeOverloads/reexports.js +6 -0
- package/legacy/utils/domUtils.js +19 -0
- package/legacy/utils/tree/buildRowTree.js +188 -0
- package/legacy/utils/tree/sortRowTree.js +63 -0
- package/models/dataGridProProps.d.ts +174 -0
- package/models/dataGridProProps.js +1 -0
- package/models/gridApiPro.d.ts +12 -0
- package/models/gridApiPro.js +1 -0
- package/models/gridGroupingColDefOverride.d.ts +30 -0
- package/models/gridGroupingColDefOverride.js +1 -0
- package/models/gridGroupingValueGetterParams.d.ts +31 -0
- package/models/gridGroupingValueGetterParams.js +1 -0
- package/models/gridRowScrollEndParams.d.ts +18 -0
- package/models/gridRowScrollEndParams.js +1 -0
- package/models/gridStatePro.d.ts +20 -0
- package/models/gridStatePro.js +1 -0
- package/models/index.d.ts +4 -0
- package/models/index.js +4 -0
- package/models/package.json +6 -0
- package/modern/DataGridPro/DataGridPro.js +896 -0
- package/modern/DataGridPro/index.js +2 -0
- package/modern/DataGridPro/useDataGridProComponent.js +72 -0
- package/modern/DataGridPro/useDataGridProProps.js +45 -0
- package/modern/components/DataGridProColumnHeaders.js +163 -0
- package/modern/components/DataGridProVirtualScroller.js +279 -0
- package/modern/components/GridColumnPinningMenuItems.js +71 -0
- package/modern/components/GridDetailPanelToggleCell.js +124 -0
- package/modern/components/GridGroupingColumnLeafCell.js +20 -0
- package/modern/components/GridGroupingCriteriaCell.js +148 -0
- package/modern/components/GridRowGroupableColumnMenuItems.js +61 -0
- package/modern/components/GridRowGroupingColumnMenuItems.js +56 -0
- package/modern/components/GridTreeDataGroupingCell.js +157 -0
- package/modern/components/Watermark.js +43 -0
- package/modern/components/index.js +3 -0
- package/modern/hooks/features/columnPinning/gridColumnPinningInterface.js +11 -0
- package/modern/hooks/features/columnPinning/gridColumnPinningSelector.js +1 -0
- package/modern/hooks/features/columnPinning/index.js +2 -0
- package/modern/hooks/features/columnPinning/useGridColumnPinning.js +268 -0
- package/modern/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +45 -0
- package/modern/hooks/features/columnReorder/columnReorderInterfaces.js +1 -0
- package/modern/hooks/features/columnReorder/columnReorderSelector.js +3 -0
- package/modern/hooks/features/columnReorder/index.js +2 -0
- package/modern/hooks/features/columnReorder/useGridColumnReorder.js +166 -0
- package/modern/hooks/features/columnResize/columnResizeSelector.js +3 -0
- package/modern/hooks/features/columnResize/columnResizeState.js +1 -0
- package/modern/hooks/features/columnResize/index.js +2 -0
- package/modern/hooks/features/columnResize/useGridColumnResize.js +295 -0
- package/modern/hooks/features/detailPanel/gridDetailPanelInterface.js +1 -0
- package/modern/hooks/features/detailPanel/gridDetailPanelSelector.js +3 -0
- package/modern/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +26 -0
- package/modern/hooks/features/detailPanel/index.js +3 -0
- package/modern/hooks/features/detailPanel/useGridDetailPanel.js +105 -0
- package/modern/hooks/features/detailPanel/useGridDetailPanelCache.js +57 -0
- package/modern/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +28 -0
- package/modern/hooks/features/index.js +7 -0
- package/modern/hooks/features/infiniteLoader/useGridInfiniteLoader.js +52 -0
- package/modern/hooks/features/rowGrouping/createGroupingColDef.js +302 -0
- package/modern/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +1 -0
- package/modern/hooks/features/rowGrouping/gridRowGroupingSelector.js +5 -0
- package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +122 -0
- package/modern/hooks/features/rowGrouping/index.js +3 -0
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +317 -0
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +76 -0
- package/modern/hooks/features/treeData/gridTreeDataGroupColDef.js +22 -0
- package/modern/hooks/features/treeData/gridTreeDataUtils.js +82 -0
- package/modern/hooks/features/treeData/index.js +1 -0
- package/modern/hooks/features/treeData/useGridTreeData.js +106 -0
- package/modern/hooks/features/treeData/useGridTreeDataPreProcessors.js +67 -0
- package/modern/hooks/index.js +1 -0
- package/modern/hooks/utils/useGridApiContext.js +2 -0
- package/modern/hooks/utils/useGridApiRef.js +2 -0
- package/modern/hooks/utils/useGridRootProps.js +2 -0
- package/modern/index.js +19 -0
- package/modern/models/dataGridProProps.js +1 -0
- package/modern/models/gridApiPro.js +1 -0
- package/modern/models/gridGroupingColDefOverride.js +1 -0
- package/modern/models/gridGroupingValueGetterParams.js +1 -0
- package/modern/models/gridRowScrollEndParams.js +1 -0
- package/modern/models/gridStatePro.js +1 -0
- package/modern/models/index.js +4 -0
- package/modern/themeAugmentation/index.js +3 -0
- package/modern/themeAugmentation/overrides.js +1 -0
- package/modern/themeAugmentation/props.js +1 -0
- package/modern/typeOverloads/modules.js +1 -0
- package/modern/typeOverloads/reexports.js +6 -0
- package/modern/utils/domUtils.js +19 -0
- package/modern/utils/tree/buildRowTree.js +167 -0
- package/modern/utils/tree/sortRowTree.js +60 -0
- package/node/DataGridPro/DataGridPro.js +921 -0
- package/node/DataGridPro/index.js +30 -0
- package/node/DataGridPro/useDataGridProComponent.js +94 -0
- package/node/DataGridPro/useDataGridProProps.js +69 -0
- package/node/components/DataGridProColumnHeaders.js +189 -0
- package/node/components/DataGridProVirtualScroller.js +308 -0
- package/node/components/GridColumnPinningMenuItems.js +88 -0
- package/node/components/GridDetailPanelToggleCell.js +145 -0
- package/node/components/GridGroupingColumnLeafCell.js +38 -0
- package/node/components/GridGroupingCriteriaCell.js +170 -0
- package/node/components/GridRowGroupableColumnMenuItems.js +82 -0
- package/node/components/GridRowGroupingColumnMenuItems.js +78 -0
- package/node/components/GridTreeDataGroupingCell.js +180 -0
- package/node/components/Watermark.js +56 -0
- package/node/components/index.js +31 -0
- package/node/hooks/features/columnPinning/gridColumnPinningInterface.js +17 -0
- package/node/hooks/features/columnPinning/gridColumnPinningSelector.js +10 -0
- package/node/hooks/features/columnPinning/index.js +31 -0
- package/node/hooks/features/columnPinning/useGridColumnPinning.js +297 -0
- package/node/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +66 -0
- package/node/hooks/features/columnReorder/columnReorderInterfaces.js +5 -0
- package/node/hooks/features/columnReorder/columnReorderSelector.js +14 -0
- package/node/hooks/features/columnReorder/index.js +18 -0
- package/node/hooks/features/columnReorder/useGridColumnReorder.js +187 -0
- package/node/hooks/features/columnResize/columnResizeSelector.js +14 -0
- package/node/hooks/features/columnResize/columnResizeState.js +5 -0
- package/node/hooks/features/columnResize/index.js +31 -0
- package/node/hooks/features/columnResize/useGridColumnResize.js +326 -0
- package/node/hooks/features/detailPanel/gridDetailPanelInterface.js +5 -0
- package/node/hooks/features/detailPanel/gridDetailPanelSelector.js +18 -0
- package/node/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +47 -0
- package/node/hooks/features/detailPanel/index.js +44 -0
- package/node/hooks/features/detailPanel/useGridDetailPanel.js +130 -0
- package/node/hooks/features/detailPanel/useGridDetailPanelCache.js +74 -0
- package/node/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +44 -0
- package/node/hooks/features/index.js +83 -0
- package/node/hooks/features/infiniteLoader/useGridInfiniteLoader.js +67 -0
- package/node/hooks/features/rowGrouping/createGroupingColDef.js +341 -0
- package/node/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +5 -0
- package/node/hooks/features/rowGrouping/gridRowGroupingSelector.js +18 -0
- package/node/hooks/features/rowGrouping/gridRowGroupingUtils.js +153 -0
- package/node/hooks/features/rowGrouping/index.js +51 -0
- package/node/hooks/features/rowGrouping/useGridRowGrouping.js +355 -0
- package/node/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +94 -0
- package/node/hooks/features/treeData/gridTreeDataGroupColDef.js +35 -0
- package/node/hooks/features/treeData/gridTreeDataUtils.js +95 -0
- package/node/hooks/features/treeData/index.js +13 -0
- package/node/hooks/features/treeData/useGridTreeData.js +132 -0
- package/node/hooks/features/treeData/useGridTreeDataPreProcessors.js +92 -0
- package/node/hooks/index.js +18 -0
- package/node/hooks/utils/useGridApiContext.js +11 -0
- package/node/hooks/utils/useGridApiRef.js +11 -0
- package/node/hooks/utils/useGridRootProps.js +11 -0
- package/node/index.js +200 -0
- package/node/models/dataGridProProps.js +5 -0
- package/node/models/gridApiPro.js +5 -0
- package/node/models/gridGroupingColDefOverride.js +5 -0
- package/node/models/gridGroupingValueGetterParams.js +5 -0
- package/node/models/gridRowScrollEndParams.js +5 -0
- package/node/models/gridStatePro.js +5 -0
- package/node/models/index.js +44 -0
- package/node/themeAugmentation/index.js +31 -0
- package/node/themeAugmentation/overrides.js +5 -0
- package/node/themeAugmentation/props.js +5 -0
- package/node/typeOverloads/modules.js +5 -0
- package/node/typeOverloads/reexports.js +29 -0
- package/node/utils/domUtils.js +32 -0
- package/node/utils/tree/buildRowTree.js +185 -0
- package/node/utils/tree/sortRowTree.js +69 -0
- package/package.json +12 -14
- package/themeAugmentation/index.d.ts +2 -2
- package/themeAugmentation/index.js +3 -0
- package/themeAugmentation/overrides.d.ts +8 -8
- package/themeAugmentation/overrides.js +1 -0
- package/themeAugmentation/package.json +6 -0
- package/themeAugmentation/props.d.ts +19 -19
- package/themeAugmentation/props.js +1 -0
- package/typeOverloads/modules.d.ts +41 -0
- package/typeOverloads/modules.js +1 -0
- package/typeOverloads/reexports.d.ts +22 -0
- package/typeOverloads/reexports.js +6 -0
- package/utils/domUtils.d.ts +3 -0
- package/utils/domUtils.js +19 -0
- package/utils/tree/buildRowTree.d.ts +47 -0
- package/utils/tree/buildRowTree.js +179 -0
- package/utils/tree/sortRowTree.d.ts +10 -0
- package/utils/tree/sortRowTree.js +60 -0
- package/LICENSE +0 -12
- package/index-cjs.js +0 -15
- package/index-esm.js +0 -15
- package/x-data-grid-pro.d.ts +0 -5251
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.GridGroupingCriteriaCell = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _material = require("@mui/material");
|
|
15
|
+
|
|
16
|
+
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
17
|
+
|
|
18
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
19
|
+
|
|
20
|
+
var _xDataGrid = require("@mui/x-data-grid");
|
|
21
|
+
|
|
22
|
+
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
23
|
+
|
|
24
|
+
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
25
|
+
|
|
26
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
+
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
+
|
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
+
|
|
32
|
+
const useUtilityClasses = ownerState => {
|
|
33
|
+
const {
|
|
34
|
+
classes
|
|
35
|
+
} = ownerState;
|
|
36
|
+
const slots = {
|
|
37
|
+
root: ['groupingCriteriaCell'],
|
|
38
|
+
toggle: ['groupingCriteriaCellToggle']
|
|
39
|
+
};
|
|
40
|
+
return (0, _material.unstable_composeClasses)(slots, _xDataGrid.getDataGridUtilityClass, classes);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const GridGroupingCriteriaCell = props => {
|
|
44
|
+
var _filteredDescendantCo;
|
|
45
|
+
|
|
46
|
+
const {
|
|
47
|
+
id,
|
|
48
|
+
field,
|
|
49
|
+
rowNode,
|
|
50
|
+
hideDescendantCount,
|
|
51
|
+
formattedValue
|
|
52
|
+
} = props;
|
|
53
|
+
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
54
|
+
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
55
|
+
const ownerState = {
|
|
56
|
+
classes: rootProps.classes
|
|
57
|
+
};
|
|
58
|
+
const classes = useUtilityClasses(ownerState);
|
|
59
|
+
const filteredDescendantCountLookup = (0, _xDataGrid.useGridSelector)(apiRef, _xDataGrid.gridFilteredDescendantCountLookupSelector);
|
|
60
|
+
const filteredDescendantCount = (_filteredDescendantCo = filteredDescendantCountLookup[rowNode.id]) != null ? _filteredDescendantCo : 0;
|
|
61
|
+
const Icon = rowNode.childrenExpanded ? rootProps.components.GroupingCriteriaCollapseIcon : rootProps.components.GroupingCriteriaExpandIcon;
|
|
62
|
+
|
|
63
|
+
const handleKeyDown = event => {
|
|
64
|
+
if (event.key === ' ') {
|
|
65
|
+
event.stopPropagation();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
apiRef.current.publishEvent(_xDataGrid.GridEvents.cellKeyDown, props, event);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const handleClick = event => {
|
|
72
|
+
apiRef.current.setRowChildrenExpansion(id, !rowNode.childrenExpanded);
|
|
73
|
+
apiRef.current.setCellFocus(id, field);
|
|
74
|
+
event.stopPropagation();
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const marginLeft = rootProps.rowGroupingColumnMode === 'multiple' ? 0 : rowNode.depth * 2;
|
|
78
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
79
|
+
className: classes.root,
|
|
80
|
+
sx: {
|
|
81
|
+
ml: marginLeft
|
|
82
|
+
},
|
|
83
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
84
|
+
className: classes.toggle,
|
|
85
|
+
children: filteredDescendantCount > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
86
|
+
size: "small",
|
|
87
|
+
onClick: handleClick,
|
|
88
|
+
onKeyDown: handleKeyDown,
|
|
89
|
+
tabIndex: -1,
|
|
90
|
+
"aria-label": rowNode.childrenExpanded ? apiRef.current.getLocaleText('treeDataCollapse') : apiRef.current.getLocaleText('treeDataExpand'),
|
|
91
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
|
|
92
|
+
fontSize: "inherit"
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
96
|
+
children: [formattedValue === undefined ? rowNode.groupingKey : formattedValue, !hideDescendantCount && filteredDescendantCount > 0 ? ` (${filteredDescendantCount})` : '']
|
|
97
|
+
})]
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
exports.GridGroupingCriteriaCell = GridGroupingCriteriaCell;
|
|
102
|
+
process.env.NODE_ENV !== "production" ? GridGroupingCriteriaCell.propTypes = {
|
|
103
|
+
// ----------------------------- Warning --------------------------------
|
|
104
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
105
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
106
|
+
// ----------------------------------------------------------------------
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* GridApi that let you manipulate the grid.
|
|
110
|
+
*/
|
|
111
|
+
api: _propTypes.default.any.isRequired,
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The mode of the cell.
|
|
115
|
+
*/
|
|
116
|
+
cellMode: _propTypes.default.oneOf(['edit', 'view']).isRequired,
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The column of the row that the current cell belongs to.
|
|
120
|
+
*/
|
|
121
|
+
colDef: _propTypes.default.object.isRequired,
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The column field of the cell that triggered the event.
|
|
125
|
+
*/
|
|
126
|
+
field: _propTypes.default.string.isRequired,
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The cell value formatted with the column valueFormatter.
|
|
130
|
+
*/
|
|
131
|
+
formattedValue: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string, _propTypes.default.bool]),
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Get the cell value of a row and field.
|
|
135
|
+
* @param {GridRowId} id The row id.
|
|
136
|
+
* @param {string} field The field.
|
|
137
|
+
* @returns {GridCellValue} The cell value.
|
|
138
|
+
*/
|
|
139
|
+
getValue: _propTypes.default.func.isRequired,
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* If true, the cell is the active element.
|
|
143
|
+
*/
|
|
144
|
+
hasFocus: _propTypes.default.bool.isRequired,
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The grid row id.
|
|
148
|
+
*/
|
|
149
|
+
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* If true, the cell is editable.
|
|
153
|
+
*/
|
|
154
|
+
isEditable: _propTypes.default.bool,
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The row model of the row that the current cell belongs to.
|
|
158
|
+
*/
|
|
159
|
+
row: _propTypes.default.object.isRequired,
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* the tabIndex value.
|
|
163
|
+
*/
|
|
164
|
+
tabIndex: _propTypes.default.oneOf([-1, 0]).isRequired,
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The cell value, but if the column has valueGetter, use getValue.
|
|
168
|
+
*/
|
|
169
|
+
value: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string, _propTypes.default.bool])
|
|
170
|
+
} : void 0;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.GridRowGroupableColumnMenuItems = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
15
|
+
|
|
16
|
+
var _xDataGrid = require("@mui/x-data-grid");
|
|
17
|
+
|
|
18
|
+
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
19
|
+
|
|
20
|
+
var _gridRowGroupingSelector = require("../hooks/features/rowGrouping/gridRowGroupingSelector");
|
|
21
|
+
|
|
22
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
const GridRowGroupableColumnMenuItems = props => {
|
|
29
|
+
var _columnsLookup$column;
|
|
30
|
+
|
|
31
|
+
const {
|
|
32
|
+
column,
|
|
33
|
+
onClick
|
|
34
|
+
} = props;
|
|
35
|
+
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
36
|
+
const rowGroupingModel = (0, _xDataGrid.useGridSelector)(apiRef, _gridRowGroupingSelector.gridRowGroupingSanitizedModelSelector);
|
|
37
|
+
const columnsLookup = (0, _xDataGrid.useGridSelector)(apiRef, _xDataGrid.gridColumnLookupSelector);
|
|
38
|
+
|
|
39
|
+
if (!(column != null && column.groupable)) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const ungroupColumn = event => {
|
|
44
|
+
apiRef.current.removeRowGroupingCriteria(column.field);
|
|
45
|
+
|
|
46
|
+
if (onClick) {
|
|
47
|
+
onClick(event);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const groupColumn = event => {
|
|
52
|
+
apiRef.current.addRowGroupingCriteria(column.field);
|
|
53
|
+
|
|
54
|
+
if (onClick) {
|
|
55
|
+
onClick(event);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const name = (_columnsLookup$column = columnsLookup[column.field].headerName) != null ? _columnsLookup$column : column.field;
|
|
60
|
+
|
|
61
|
+
if (rowGroupingModel.includes(column.field)) {
|
|
62
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuItem.default, {
|
|
63
|
+
onClick: ungroupColumn,
|
|
64
|
+
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuItem.default, {
|
|
69
|
+
onClick: groupColumn,
|
|
70
|
+
children: apiRef.current.getLocaleText('groupColumn')(name)
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
exports.GridRowGroupableColumnMenuItems = GridRowGroupableColumnMenuItems;
|
|
75
|
+
process.env.NODE_ENV !== "production" ? GridRowGroupableColumnMenuItems.propTypes = {
|
|
76
|
+
// ----------------------------- Warning --------------------------------
|
|
77
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
78
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
79
|
+
// ----------------------------------------------------------------------
|
|
80
|
+
column: _propTypes.default.object,
|
|
81
|
+
onClick: _propTypes.default.func
|
|
82
|
+
} : void 0;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.GridRowGroupingColumnMenuItems = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
15
|
+
|
|
16
|
+
var _xDataGrid = require("@mui/x-data-grid");
|
|
17
|
+
|
|
18
|
+
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
19
|
+
|
|
20
|
+
var _gridRowGroupingSelector = require("../hooks/features/rowGrouping/gridRowGroupingSelector");
|
|
21
|
+
|
|
22
|
+
var _gridRowGroupingUtils = require("../hooks/features/rowGrouping/gridRowGroupingUtils");
|
|
23
|
+
|
|
24
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
+
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
|
|
30
|
+
const GridRowGroupingColumnMenuItems = props => {
|
|
31
|
+
const {
|
|
32
|
+
column,
|
|
33
|
+
onClick
|
|
34
|
+
} = props;
|
|
35
|
+
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
36
|
+
const rowGroupingModel = (0, _xDataGrid.useGridSelector)(apiRef, _gridRowGroupingSelector.gridRowGroupingSanitizedModelSelector);
|
|
37
|
+
const columnsLookup = (0, _xDataGrid.useGridSelector)(apiRef, _xDataGrid.gridColumnLookupSelector);
|
|
38
|
+
|
|
39
|
+
const renderUnGroupingMenuItem = field => {
|
|
40
|
+
var _columnsLookup$field$;
|
|
41
|
+
|
|
42
|
+
const ungroupColumn = event => {
|
|
43
|
+
apiRef.current.removeRowGroupingCriteria(field);
|
|
44
|
+
|
|
45
|
+
if (onClick) {
|
|
46
|
+
onClick(event);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const name = (_columnsLookup$field$ = columnsLookup[field].headerName) != null ? _columnsLookup$field$ : field;
|
|
51
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuItem.default, {
|
|
52
|
+
onClick: ungroupColumn,
|
|
53
|
+
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
54
|
+
}, field);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
if (!column || !(0, _gridRowGroupingUtils.isGroupingColumn)(column.field)) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (column.field === _gridRowGroupingUtils.GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD) {
|
|
62
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
|
|
63
|
+
children: rowGroupingModel.map(renderUnGroupingMenuItem)
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return renderUnGroupingMenuItem((0, _gridRowGroupingUtils.getRowGroupingCriteriaFromGroupingField)(column.field));
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
exports.GridRowGroupingColumnMenuItems = GridRowGroupingColumnMenuItems;
|
|
71
|
+
process.env.NODE_ENV !== "production" ? GridRowGroupingColumnMenuItems.propTypes = {
|
|
72
|
+
// ----------------------------- Warning --------------------------------
|
|
73
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
74
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
75
|
+
// ----------------------------------------------------------------------
|
|
76
|
+
column: _propTypes.default.object,
|
|
77
|
+
onClick: _propTypes.default.func
|
|
78
|
+
} : void 0;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.GridTreeDataGroupingCell = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _material = require("@mui/material");
|
|
15
|
+
|
|
16
|
+
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
17
|
+
|
|
18
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
19
|
+
|
|
20
|
+
var _xDataGrid = require("@mui/x-data-grid");
|
|
21
|
+
|
|
22
|
+
var _internals = require("@mui/x-data-grid/internals");
|
|
23
|
+
|
|
24
|
+
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
25
|
+
|
|
26
|
+
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
27
|
+
|
|
28
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
|
+
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
34
|
+
const useUtilityClasses = ownerState => {
|
|
35
|
+
const {
|
|
36
|
+
classes
|
|
37
|
+
} = ownerState;
|
|
38
|
+
const slots = {
|
|
39
|
+
root: ['treeDataGroupingCell'],
|
|
40
|
+
toggle: ['treeDataGroupingCellToggle']
|
|
41
|
+
};
|
|
42
|
+
return (0, _material.unstable_composeClasses)(slots, _xDataGrid.getDataGridUtilityClass, classes);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const GridTreeDataGroupingCell = props => {
|
|
46
|
+
var _filteredDescendantCo;
|
|
47
|
+
|
|
48
|
+
const {
|
|
49
|
+
id,
|
|
50
|
+
field,
|
|
51
|
+
formattedValue,
|
|
52
|
+
rowNode,
|
|
53
|
+
hideDescendantCount
|
|
54
|
+
} = props;
|
|
55
|
+
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
56
|
+
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
57
|
+
const ownerState = {
|
|
58
|
+
classes: rootProps.classes
|
|
59
|
+
};
|
|
60
|
+
const classes = useUtilityClasses(ownerState);
|
|
61
|
+
const filteredDescendantCountLookup = (0, _xDataGrid.useGridSelector)(apiRef, _xDataGrid.gridFilteredDescendantCountLookupSelector);
|
|
62
|
+
const filteredDescendantCount = (_filteredDescendantCo = filteredDescendantCountLookup[rowNode.id]) != null ? _filteredDescendantCo : 0;
|
|
63
|
+
const Icon = rowNode.childrenExpanded ? rootProps.components.TreeDataCollapseIcon : rootProps.components.TreeDataExpandIcon;
|
|
64
|
+
|
|
65
|
+
const handleKeyDown = event => {
|
|
66
|
+
if (event.key === ' ') {
|
|
67
|
+
event.stopPropagation();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if ((0, _internals.isNavigationKey)(event.key) && !event.shiftKey) {
|
|
71
|
+
apiRef.current.publishEvent(_xDataGrid.GridEvents.cellNavigationKeyDown, props, event);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const handleClick = event => {
|
|
76
|
+
apiRef.current.setRowChildrenExpansion(id, !rowNode.childrenExpanded);
|
|
77
|
+
apiRef.current.setCellFocus(id, field);
|
|
78
|
+
event.stopPropagation(); // TODO remove event.stopPropagation
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
82
|
+
className: classes.root,
|
|
83
|
+
sx: {
|
|
84
|
+
ml: rowNode.depth * 2
|
|
85
|
+
},
|
|
86
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
87
|
+
className: classes.toggle,
|
|
88
|
+
children: filteredDescendantCount > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
89
|
+
size: "small",
|
|
90
|
+
onClick: handleClick,
|
|
91
|
+
onKeyDown: handleKeyDown,
|
|
92
|
+
tabIndex: -1,
|
|
93
|
+
"aria-label": rowNode.childrenExpanded ? apiRef.current.getLocaleText('treeDataCollapse') : apiRef.current.getLocaleText('treeDataExpand'),
|
|
94
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
|
|
95
|
+
fontSize: "inherit"
|
|
96
|
+
})
|
|
97
|
+
})
|
|
98
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
99
|
+
children: [formattedValue === undefined ? rowNode.groupingKey : formattedValue, !hideDescendantCount && filteredDescendantCount > 0 ? ` (${filteredDescendantCount})` : '']
|
|
100
|
+
})]
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
exports.GridTreeDataGroupingCell = GridTreeDataGroupingCell;
|
|
105
|
+
process.env.NODE_ENV !== "production" ? GridTreeDataGroupingCell.propTypes = {
|
|
106
|
+
// ----------------------------- Warning --------------------------------
|
|
107
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
108
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
109
|
+
// ----------------------------------------------------------------------
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* GridApi that let you manipulate the grid.
|
|
113
|
+
*/
|
|
114
|
+
api: _propTypes.default.object.isRequired,
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The mode of the cell.
|
|
118
|
+
*/
|
|
119
|
+
cellMode: _propTypes.default.oneOf(['edit', 'view']).isRequired,
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The column of the row that the current cell belongs to.
|
|
123
|
+
*/
|
|
124
|
+
colDef: _propTypes.default.object.isRequired,
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The column field of the cell that triggered the event.
|
|
128
|
+
*/
|
|
129
|
+
field: _propTypes.default.string.isRequired,
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The cell value formatted with the column valueFormatter.
|
|
133
|
+
*/
|
|
134
|
+
formattedValue: _propTypes.default.any.isRequired,
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Get the cell value of a row and field.
|
|
138
|
+
* @param {GridRowId} id The row id.
|
|
139
|
+
* @param {string} field The field.
|
|
140
|
+
* @returns {GridCellValue} The cell value.
|
|
141
|
+
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
142
|
+
*/
|
|
143
|
+
getValue: _propTypes.default.func.isRequired,
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* If true, the cell is the active element.
|
|
147
|
+
*/
|
|
148
|
+
hasFocus: _propTypes.default.bool.isRequired,
|
|
149
|
+
hideDescendantCount: _propTypes.default.bool,
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The grid row id.
|
|
153
|
+
*/
|
|
154
|
+
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* If true, the cell is editable.
|
|
158
|
+
*/
|
|
159
|
+
isEditable: _propTypes.default.bool,
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The row model of the row that the current cell belongs to.
|
|
163
|
+
*/
|
|
164
|
+
row: _propTypes.default.any.isRequired,
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The node of the row that the current cell belongs to.
|
|
168
|
+
*/
|
|
169
|
+
rowNode: _propTypes.default.object.isRequired,
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* the tabIndex value.
|
|
173
|
+
*/
|
|
174
|
+
tabIndex: _propTypes.default.oneOf([-1, 0]).isRequired,
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The cell value, but if the column has valueGetter, use getValue.
|
|
178
|
+
*/
|
|
179
|
+
value: _propTypes.default.any.isRequired
|
|
180
|
+
} : void 0;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Watermark = Watermark;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _xLicensePro = require("@mui/x-license-pro");
|
|
11
|
+
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
function getLicenseErrorMessage(licenseStatus) {
|
|
19
|
+
switch (licenseStatus) {
|
|
20
|
+
case _xLicensePro.LicenseStatus.Expired:
|
|
21
|
+
return 'MUI X: License key expired';
|
|
22
|
+
|
|
23
|
+
case _xLicensePro.LicenseStatus.Invalid:
|
|
24
|
+
return 'MUI X: Invalid license key';
|
|
25
|
+
|
|
26
|
+
case _xLicensePro.LicenseStatus.NotFound:
|
|
27
|
+
return 'MUI X: Missing license key';
|
|
28
|
+
|
|
29
|
+
default:
|
|
30
|
+
throw new Error('MUI: Unhandled MUI X license status.');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function Watermark() {
|
|
35
|
+
const licenseStatus = (0, _xLicensePro.useLicenseVerifier)();
|
|
36
|
+
|
|
37
|
+
if (licenseStatus === _xLicensePro.LicenseStatus.Valid) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
42
|
+
style: {
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
pointerEvents: 'none',
|
|
45
|
+
color: '#8282829e',
|
|
46
|
+
zIndex: 100000,
|
|
47
|
+
width: '100%',
|
|
48
|
+
textAlign: 'center',
|
|
49
|
+
bottom: '50%',
|
|
50
|
+
right: 0,
|
|
51
|
+
letterSpacing: 5,
|
|
52
|
+
fontSize: 24
|
|
53
|
+
},
|
|
54
|
+
children: getLicenseErrorMessage(licenseStatus)
|
|
55
|
+
});
|
|
56
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _GridTreeDataGroupingCell = require("./GridTreeDataGroupingCell");
|
|
8
|
+
|
|
9
|
+
Object.keys(_GridTreeDataGroupingCell).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _GridTreeDataGroupingCell[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _GridTreeDataGroupingCell[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var _GridColumnPinningMenuItems = require("./GridColumnPinningMenuItems");
|
|
21
|
+
|
|
22
|
+
Object.keys(_GridColumnPinningMenuItems).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _GridColumnPinningMenuItems[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _GridColumnPinningMenuItems[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GridPinnedPosition = void 0;
|
|
7
|
+
var GridPinnedPosition;
|
|
8
|
+
/**
|
|
9
|
+
* The column pinning API interface that is available in the grid [[apiRef]].
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
exports.GridPinnedPosition = GridPinnedPosition;
|
|
13
|
+
|
|
14
|
+
(function (GridPinnedPosition) {
|
|
15
|
+
GridPinnedPosition["left"] = "left";
|
|
16
|
+
GridPinnedPosition["right"] = "right";
|
|
17
|
+
})(GridPinnedPosition || (exports.GridPinnedPosition = GridPinnedPosition = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.gridPinnedColumnsSelector = void 0;
|
|
7
|
+
|
|
8
|
+
const gridPinnedColumnsSelector = state => state.pinnedColumns;
|
|
9
|
+
|
|
10
|
+
exports.gridPinnedColumnsSelector = gridPinnedColumnsSelector;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _gridColumnPinningSelector = require("./gridColumnPinningSelector");
|
|
8
|
+
|
|
9
|
+
Object.keys(_gridColumnPinningSelector).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _gridColumnPinningSelector[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _gridColumnPinningSelector[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var _gridColumnPinningInterface = require("./gridColumnPinningInterface");
|
|
21
|
+
|
|
22
|
+
Object.keys(_gridColumnPinningInterface).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _gridColumnPinningInterface[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _gridColumnPinningInterface[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|