@mui/x-data-grid-premium 8.0.0-beta.2 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +423 -96
- package/DataGridPremium/DataGridPremium.js +188 -26
- package/DataGridPremium/useDataGridPremiumComponent.d.ts +2 -2
- package/DataGridPremium/useDataGridPremiumComponent.js +22 -3
- package/DataGridPremium/useDataGridPremiumProps.js +5 -1
- package/components/GridColumnMenuPivotItem.d.ts +3 -0
- package/components/GridColumnMenuPivotItem.js +33 -0
- package/components/GridEmptyPivotOverlay.d.ts +6 -0
- package/components/GridEmptyPivotOverlay.js +29 -0
- package/components/GridGroupingCriteriaCell.js +8 -3
- package/components/GridPremiumColumnMenu.d.ts +5 -0
- package/components/GridPremiumColumnMenu.js +6 -1
- package/components/GridPremiumToolbar.d.ts +1 -1
- package/components/GridPremiumToolbar.js +29 -1
- package/components/aiAssistantPanel/AiAssistantPanelTrigger.d.ts +33 -0
- package/components/aiAssistantPanel/AiAssistantPanelTrigger.js +107 -0
- package/components/aiAssistantPanel/GridAiAssistantPanel.d.ts +3 -0
- package/components/aiAssistantPanel/GridAiAssistantPanel.js +195 -0
- package/components/aiAssistantPanel/GridAiAssistantPanelConversation.d.ts +7 -0
- package/components/aiAssistantPanel/GridAiAssistantPanelConversation.js +71 -0
- package/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.d.ts +3 -0
- package/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.js +92 -0
- package/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.d.ts +7 -0
- package/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.js +86 -0
- package/components/aiAssistantPanel/index.d.ts +2 -0
- package/components/aiAssistantPanel/index.js +27 -0
- package/components/collapsible/Collapsible.d.ts +4 -0
- package/components/collapsible/Collapsible.js +70 -0
- package/components/collapsible/CollapsibleContext.d.ts +8 -0
- package/components/collapsible/CollapsibleContext.js +17 -0
- package/components/collapsible/CollapsiblePanel.d.ts +4 -0
- package/components/collapsible/CollapsiblePanel.js +64 -0
- package/components/collapsible/CollapsibleTrigger.d.ts +4 -0
- package/components/collapsible/CollapsibleTrigger.js +106 -0
- package/components/collapsible/index.d.ts +4 -0
- package/components/collapsible/index.js +49 -0
- package/components/export/ExportExcel.js +4 -129
- package/components/index.d.ts +5 -2
- package/components/index.js +40 -4
- package/components/pivotPanel/GridPivotPanel.d.ts +3 -0
- package/components/pivotPanel/GridPivotPanel.js +22 -0
- package/components/pivotPanel/GridPivotPanelBody.d.ts +11 -0
- package/components/pivotPanel/GridPivotPanelBody.js +368 -0
- package/components/pivotPanel/GridPivotPanelField.d.ts +22 -0
- package/components/pivotPanel/GridPivotPanelField.js +338 -0
- package/components/pivotPanel/GridPivotPanelFieldMenu.d.ts +8 -0
- package/components/pivotPanel/GridPivotPanelFieldMenu.js +177 -0
- package/components/pivotPanel/GridPivotPanelHeader.d.ts +7 -0
- package/components/pivotPanel/GridPivotPanelHeader.js +101 -0
- package/components/pivotPanel/GridPivotPanelSearch.d.ts +7 -0
- package/components/pivotPanel/GridPivotPanelSearch.js +77 -0
- package/components/pivotPanel/PivotPanelTrigger.d.ts +37 -0
- package/components/pivotPanel/PivotPanelTrigger.js +93 -0
- package/components/pivotPanel/index.d.ts +2 -0
- package/components/pivotPanel/index.js +27 -0
- package/components/prompt/GridPrompt.d.ts +7 -0
- package/components/prompt/GridPrompt.js +364 -0
- package/components/prompt/index.d.ts +1 -0
- package/components/prompt/index.js +12 -0
- package/components/promptField/GridPromptField.d.ts +4 -0
- package/components/promptField/GridPromptField.js +86 -0
- package/components/promptField/PromptField.d.ts +66 -0
- package/components/promptField/PromptField.js +95 -0
- package/components/promptField/PromptFieldContext.d.ts +16 -0
- package/components/promptField/PromptFieldContext.js +17 -0
- package/components/promptField/PromptFieldControl.d.ts +27 -0
- package/components/promptField/PromptFieldControl.js +102 -0
- package/components/promptField/PromptFieldRecord.d.ts +27 -0
- package/components/promptField/PromptFieldRecord.js +158 -0
- package/components/promptField/PromptFieldSend.d.ts +27 -0
- package/components/promptField/PromptFieldSend.js +83 -0
- package/components/promptField/index.d.ts +4 -0
- package/components/promptField/index.js +49 -0
- package/components/resizablePanel/ResizablePanel.d.ts +10 -0
- package/components/resizablePanel/ResizablePanel.js +59 -0
- package/components/resizablePanel/ResizablePanelContext.d.ts +7 -0
- package/components/resizablePanel/ResizablePanelContext.js +17 -0
- package/components/resizablePanel/ResizablePanelHandle.d.ts +4 -0
- package/components/resizablePanel/ResizablePanelHandle.js +115 -0
- package/components/resizablePanel/index.d.ts +3 -0
- package/components/resizablePanel/index.js +38 -0
- package/components/sidebar/Sidebar.d.ts +4 -0
- package/components/sidebar/Sidebar.js +54 -0
- package/components/sidebar/SidebarHeader.d.ts +4 -0
- package/components/sidebar/SidebarHeader.js +51 -0
- package/components/sidebar/index.d.ts +2 -0
- package/components/sidebar/index.js +27 -0
- package/constants/dataGridPremiumDefaultSlotsComponents.js +3 -0
- package/esm/DataGridPremium/DataGridPremium.js +190 -28
- package/esm/DataGridPremium/useDataGridPremiumComponent.d.ts +2 -2
- package/esm/DataGridPremium/useDataGridPremiumComponent.js +20 -3
- package/esm/DataGridPremium/useDataGridPremiumProps.js +5 -1
- package/esm/components/GridColumnMenuPivotItem.d.ts +3 -0
- package/esm/components/GridColumnMenuPivotItem.js +26 -0
- package/esm/components/GridEmptyPivotOverlay.d.ts +6 -0
- package/esm/components/GridEmptyPivotOverlay.js +22 -0
- package/esm/components/GridGroupingCriteriaCell.js +9 -4
- package/esm/components/GridPremiumColumnMenu.d.ts +5 -0
- package/esm/components/GridPremiumColumnMenu.js +6 -1
- package/esm/components/GridPremiumToolbar.d.ts +1 -1
- package/esm/components/GridPremiumToolbar.js +30 -2
- package/esm/components/aiAssistantPanel/AiAssistantPanelTrigger.d.ts +33 -0
- package/esm/components/aiAssistantPanel/AiAssistantPanelTrigger.js +100 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanel.d.ts +3 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanel.js +188 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversation.d.ts +7 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversation.js +64 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.d.ts +3 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.js +85 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.d.ts +7 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.js +80 -0
- package/esm/components/aiAssistantPanel/index.d.ts +2 -0
- package/esm/components/aiAssistantPanel/index.js +2 -0
- package/esm/components/collapsible/Collapsible.d.ts +4 -0
- package/esm/components/collapsible/Collapsible.js +63 -0
- package/esm/components/collapsible/CollapsibleContext.d.ts +8 -0
- package/esm/components/collapsible/CollapsibleContext.js +9 -0
- package/esm/components/collapsible/CollapsiblePanel.d.ts +4 -0
- package/esm/components/collapsible/CollapsiblePanel.js +57 -0
- package/esm/components/collapsible/CollapsibleTrigger.d.ts +4 -0
- package/esm/components/collapsible/CollapsibleTrigger.js +99 -0
- package/esm/components/collapsible/index.d.ts +4 -0
- package/esm/components/collapsible/index.js +4 -0
- package/esm/components/export/ExportExcel.js +4 -129
- package/esm/components/index.d.ts +5 -2
- package/esm/components/index.js +5 -2
- package/esm/components/pivotPanel/GridPivotPanel.d.ts +3 -0
- package/esm/components/pivotPanel/GridPivotPanel.js +16 -0
- package/esm/components/pivotPanel/GridPivotPanelBody.d.ts +11 -0
- package/esm/components/pivotPanel/GridPivotPanelBody.js +361 -0
- package/esm/components/pivotPanel/GridPivotPanelField.d.ts +22 -0
- package/esm/components/pivotPanel/GridPivotPanelField.js +331 -0
- package/esm/components/pivotPanel/GridPivotPanelFieldMenu.d.ts +8 -0
- package/esm/components/pivotPanel/GridPivotPanelFieldMenu.js +170 -0
- package/esm/components/pivotPanel/GridPivotPanelHeader.d.ts +7 -0
- package/esm/components/pivotPanel/GridPivotPanelHeader.js +94 -0
- package/esm/components/pivotPanel/GridPivotPanelSearch.d.ts +7 -0
- package/esm/components/pivotPanel/GridPivotPanelSearch.js +70 -0
- package/esm/components/pivotPanel/PivotPanelTrigger.d.ts +37 -0
- package/esm/components/pivotPanel/PivotPanelTrigger.js +86 -0
- package/esm/components/pivotPanel/index.d.ts +2 -0
- package/esm/components/pivotPanel/index.js +2 -0
- package/esm/components/prompt/GridPrompt.d.ts +7 -0
- package/esm/components/prompt/GridPrompt.js +357 -0
- package/esm/components/prompt/index.d.ts +1 -0
- package/esm/components/prompt/index.js +1 -0
- package/esm/components/promptField/GridPromptField.d.ts +4 -0
- package/esm/components/promptField/GridPromptField.js +79 -0
- package/esm/components/promptField/PromptField.d.ts +66 -0
- package/esm/components/promptField/PromptField.js +88 -0
- package/esm/components/promptField/PromptFieldContext.d.ts +16 -0
- package/esm/components/promptField/PromptFieldContext.js +9 -0
- package/esm/components/promptField/PromptFieldControl.d.ts +27 -0
- package/esm/components/promptField/PromptFieldControl.js +95 -0
- package/esm/components/promptField/PromptFieldRecord.d.ts +27 -0
- package/esm/components/promptField/PromptFieldRecord.js +151 -0
- package/esm/components/promptField/PromptFieldSend.d.ts +27 -0
- package/esm/components/promptField/PromptFieldSend.js +76 -0
- package/esm/components/promptField/index.d.ts +4 -0
- package/esm/components/promptField/index.js +4 -0
- package/esm/components/resizablePanel/ResizablePanel.d.ts +10 -0
- package/esm/components/resizablePanel/ResizablePanel.js +52 -0
- package/esm/components/resizablePanel/ResizablePanelContext.d.ts +7 -0
- package/esm/components/resizablePanel/ResizablePanelContext.js +9 -0
- package/esm/components/resizablePanel/ResizablePanelHandle.d.ts +4 -0
- package/esm/components/resizablePanel/ResizablePanelHandle.js +108 -0
- package/esm/components/resizablePanel/index.d.ts +3 -0
- package/esm/components/resizablePanel/index.js +3 -0
- package/esm/components/sidebar/Sidebar.d.ts +4 -0
- package/esm/components/sidebar/Sidebar.js +47 -0
- package/esm/components/sidebar/SidebarHeader.d.ts +4 -0
- package/esm/components/sidebar/SidebarHeader.js +44 -0
- package/esm/components/sidebar/index.d.ts +2 -0
- package/esm/components/sidebar/index.js +2 -0
- package/esm/constants/dataGridPremiumDefaultSlotsComponents.js +3 -0
- package/esm/hooks/features/aggregation/gridAggregationFunctions.js +13 -0
- package/esm/hooks/features/aggregation/gridAggregationSelectors.d.ts +10 -1
- package/esm/hooks/features/aggregation/gridAggregationSelectors.js +28 -1
- package/esm/hooks/features/aggregation/gridAggregationUtils.d.ts +1 -1
- package/esm/hooks/features/aggregation/index.d.ts +1 -1
- package/esm/hooks/features/aggregation/index.js +1 -1
- package/esm/hooks/features/aggregation/useGridAggregation.js +7 -11
- package/esm/hooks/features/aggregation/useGridAggregationPreProcessors.js +2 -8
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +5 -25
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.js +23 -10
- package/esm/hooks/features/aiAssistant/api.d.ts +12 -0
- package/esm/hooks/features/aiAssistant/api.js +31 -0
- package/esm/hooks/features/aiAssistant/gridAiAssistantInterfaces.d.ts +82 -0
- package/esm/hooks/features/aiAssistant/gridAiAssistantSelectors.d.ts +5 -0
- package/esm/hooks/features/aiAssistant/gridAiAssistantSelectors.js +5 -0
- package/esm/hooks/features/aiAssistant/index.d.ts +2 -0
- package/esm/hooks/features/aiAssistant/useGridAiAssistant.d.ts +6 -0
- package/esm/hooks/features/aiAssistant/useGridAiAssistant.js +293 -0
- package/esm/hooks/features/cellSelection/useGridCellSelection.js +6 -6
- package/esm/hooks/features/clipboard/useGridClipboardImport.js +4 -4
- package/esm/hooks/features/dataSource/useGridDataSourcePremium.js +4 -1
- package/esm/hooks/features/export/useGridExcelExport.js +2 -2
- package/esm/hooks/features/index.d.ts +1 -1
- package/esm/hooks/features/index.js +1 -1
- package/esm/hooks/features/pivoting/gridPivotingInterfaces.d.ts +69 -0
- package/esm/hooks/features/pivoting/gridPivotingSelectors.d.ts +4 -0
- package/esm/hooks/features/pivoting/gridPivotingSelectors.js +5 -0
- package/esm/hooks/features/pivoting/useGridPivoting.d.ts +7 -0
- package/esm/hooks/features/pivoting/useGridPivoting.js +339 -0
- package/esm/hooks/features/pivoting/utils.d.ts +21 -0
- package/esm/hooks/features/pivoting/utils.js +259 -0
- package/esm/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +1 -4
- package/esm/hooks/features/rowGrouping/useGridRowGrouping.js +4 -5
- package/esm/hooks/utils/useResize.d.ts +9 -0
- package/esm/hooks/utils/useResize.js +52 -0
- package/esm/index.d.ts +4 -1
- package/esm/index.js +4 -2
- package/esm/material/icons.d.ts +15 -15
- package/esm/material/icons.js +32 -5
- package/esm/material/index.d.ts +31 -5
- package/esm/material/index.js +31 -3
- package/esm/models/dataGridPremiumProps.d.ts +96 -2
- package/esm/models/gridApiPremium.d.ts +4 -2
- package/esm/models/gridPremiumIconSlotsComponent.d.ts +141 -8
- package/esm/models/gridPremiumSlotsComponent.d.ts +13 -1
- package/esm/models/gridStatePremium.d.ts +6 -0
- package/esm/package.json +1 -1
- package/esm/setupExcelExportWebWorker/index.d.ts +1 -0
- package/esm/setupExcelExportWebWorker/index.js +1 -0
- package/esm/typeOverloads/modules.d.ts +32 -1
- package/esm/utils/speechRecognition.d.ts +2 -0
- package/esm/utils/speechRecognition.js +2 -0
- package/hooks/features/aggregation/gridAggregationFunctions.js +13 -0
- package/hooks/features/aggregation/gridAggregationSelectors.d.ts +10 -1
- package/hooks/features/aggregation/gridAggregationSelectors.js +29 -2
- package/hooks/features/aggregation/gridAggregationUtils.d.ts +1 -1
- package/hooks/features/aggregation/index.d.ts +1 -1
- package/hooks/features/aggregation/index.js +21 -11
- package/hooks/features/aggregation/useGridAggregation.js +6 -10
- package/hooks/features/aggregation/useGridAggregationPreProcessors.js +2 -8
- package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +5 -25
- package/hooks/features/aggregation/wrapColumnWithAggregation.js +24 -11
- package/hooks/features/aiAssistant/api.d.ts +12 -0
- package/hooks/features/aiAssistant/api.js +37 -0
- package/hooks/features/aiAssistant/gridAiAssistantInterfaces.d.ts +82 -0
- package/hooks/features/aiAssistant/gridAiAssistantSelectors.d.ts +5 -0
- package/hooks/features/aiAssistant/gridAiAssistantSelectors.js +11 -0
- package/hooks/features/aiAssistant/index.d.ts +2 -0
- package/hooks/features/aiAssistant/useGridAiAssistant.d.ts +6 -0
- package/hooks/features/aiAssistant/useGridAiAssistant.js +303 -0
- package/hooks/features/cellSelection/useGridCellSelection.js +5 -5
- package/hooks/features/clipboard/useGridClipboardImport.js +3 -3
- package/hooks/features/dataSource/useGridDataSourcePremium.js +4 -1
- package/hooks/features/export/useGridExcelExport.js +1 -1
- package/hooks/features/index.d.ts +1 -1
- package/hooks/features/index.js +4 -4
- package/hooks/features/pivoting/gridPivotingInterfaces.d.ts +69 -0
- package/hooks/features/pivoting/gridPivotingInterfaces.js +5 -0
- package/hooks/features/pivoting/gridPivotingSelectors.d.ts +4 -0
- package/hooks/features/pivoting/gridPivotingSelectors.js +30 -0
- package/hooks/features/pivoting/useGridPivoting.d.ts +7 -0
- package/hooks/features/pivoting/useGridPivoting.js +349 -0
- package/hooks/features/pivoting/utils.d.ts +21 -0
- package/hooks/features/pivoting/utils.js +270 -0
- package/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +1 -4
- package/hooks/features/rowGrouping/useGridRowGrouping.js +3 -4
- package/hooks/utils/useResize.d.ts +9 -0
- package/hooks/utils/useResize.js +60 -0
- package/index.d.ts +4 -1
- package/index.js +19 -3
- package/material/icons.d.ts +15 -15
- package/material/icons.js +36 -9
- package/material/index.d.ts +31 -5
- package/material/index.js +30 -2
- package/models/dataGridPremiumProps.d.ts +96 -2
- package/models/gridApiPremium.d.ts +4 -2
- package/models/gridPremiumIconSlotsComponent.d.ts +141 -8
- package/models/gridPremiumSlotsComponent.d.ts +13 -1
- package/models/gridStatePremium.d.ts +6 -0
- package/package.json +12 -18
- package/setupExcelExportWebWorker/index.d.ts +1 -0
- package/{setupExcelExportWebWorker.js → setupExcelExportWebWorker/index.js} +1 -1
- package/typeOverloads/modules.d.ts +32 -1
- package/utils/speechRecognition.d.ts +2 -0
- package/utils/speechRecognition.js +8 -0
- package/components/promptControl/GridToolbarPromptControl.d.ts +0 -26
- package/components/promptControl/GridToolbarPromptControl.js +0 -222
- package/components/promptControl/RecordButton.d.ts +0 -16
- package/components/promptControl/RecordButton.js +0 -119
- package/components/promptControl/index.d.ts +0 -1
- package/components/promptControl/index.js +0 -12
- package/esm/components/promptControl/GridToolbarPromptControl.d.ts +0 -26
- package/esm/components/promptControl/GridToolbarPromptControl.js +0 -215
- package/esm/components/promptControl/RecordButton.d.ts +0 -16
- package/esm/components/promptControl/RecordButton.js +0 -111
- package/esm/components/promptControl/index.d.ts +0 -1
- package/esm/components/promptControl/index.js +0 -1
- package/esm/hooks/features/promptControl/api.d.ts +0 -2
- package/esm/hooks/features/promptControl/api.js +0 -22
- package/esm/hooks/features/promptControl/index.d.ts +0 -2
- package/esm/hooks/features/promptControl/types.d.ts +0 -25
- package/esm/setupExcelExportWebWorker.d.ts +0 -1
- package/esm/setupExcelExportWebWorker.js +0 -1
- package/esm/utils/releaseInfo.d.ts +0 -1
- package/esm/utils/releaseInfo.js +0 -13
- package/hooks/features/promptControl/api.d.ts +0 -2
- package/hooks/features/promptControl/api.js +0 -28
- package/hooks/features/promptControl/index.d.ts +0 -2
- package/hooks/features/promptControl/types.d.ts +0 -25
- package/modern/DataGridPremium/DataGrid.d.ts +0 -8
- package/modern/DataGridPremium/DataGrid.js +0 -19
- package/modern/DataGridPremium/DataGridPremium.d.ts +0 -16
- package/modern/DataGridPremium/DataGridPremium.js +0 -1121
- package/modern/DataGridPremium/index.d.ts +0 -3
- package/modern/DataGridPremium/index.js +0 -3
- package/modern/DataGridPremium/useDataGridPremiumComponent.d.ts +0 -4
- package/modern/DataGridPremium/useDataGridPremiumComponent.js +0 -108
- package/modern/DataGridPremium/useDataGridPremiumProps.d.ts +0 -6
- package/modern/DataGridPremium/useDataGridPremiumProps.js +0 -54
- package/modern/components/GridAggregationHeader.d.ts +0 -7
- package/modern/components/GridAggregationHeader.js +0 -89
- package/modern/components/GridAggregationRowOverlay.d.ts +0 -3
- package/modern/components/GridAggregationRowOverlay.js +0 -37
- package/modern/components/GridBottomContainer.d.ts +0 -3
- package/modern/components/GridBottomContainer.js +0 -43
- package/modern/components/GridColumnMenuAggregationItem.d.ts +0 -7
- package/modern/components/GridColumnMenuAggregationItem.js +0 -124
- package/modern/components/GridColumnMenuRowGroupItem.d.ts +0 -3
- package/modern/components/GridColumnMenuRowGroupItem.js +0 -42
- package/modern/components/GridColumnMenuRowUngroupItem.d.ts +0 -3
- package/modern/components/GridColumnMenuRowUngroupItem.js +0 -44
- package/modern/components/GridDataSourceGroupingCriteriaCell.d.ts +0 -7
- package/modern/components/GridDataSourceGroupingCriteriaCell.js +0 -121
- package/modern/components/GridExcelExportMenuItem.d.ts +0 -9
- package/modern/components/GridExcelExportMenuItem.js +0 -48
- package/modern/components/GridFooterCell.d.ts +0 -9
- package/modern/components/GridFooterCell.js +0 -43
- package/modern/components/GridGroupingColumnFooterCell.d.ts +0 -4
- package/modern/components/GridGroupingColumnFooterCell.js +0 -23
- package/modern/components/GridGroupingColumnLeafCell.d.ts +0 -4
- package/modern/components/GridGroupingColumnLeafCell.js +0 -17
- package/modern/components/GridGroupingCriteriaCell.d.ts +0 -7
- package/modern/components/GridGroupingCriteriaCell.js +0 -87
- package/modern/components/GridPremiumColumnMenu.d.ts +0 -33
- package/modern/components/GridPremiumColumnMenu.js +0 -37
- package/modern/components/GridPremiumToolbar.d.ts +0 -3
- package/modern/components/GridPremiumToolbar.js +0 -23
- package/modern/components/export/ExportExcel.d.ts +0 -29
- package/modern/components/export/ExportExcel.js +0 -209
- package/modern/components/export/index.d.ts +0 -1
- package/modern/components/export/index.js +0 -1
- package/modern/components/index.d.ts +0 -6
- package/modern/components/index.js +0 -6
- package/modern/components/promptControl/GridToolbarPromptControl.d.ts +0 -26
- package/modern/components/promptControl/GridToolbarPromptControl.js +0 -215
- package/modern/components/promptControl/RecordButton.d.ts +0 -16
- package/modern/components/promptControl/RecordButton.js +0 -111
- package/modern/components/promptControl/index.d.ts +0 -1
- package/modern/components/promptControl/index.js +0 -1
- package/modern/components/reexports.d.ts +0 -1
- package/modern/components/reexports.js +0 -1
- package/modern/constants/dataGridPremiumDefaultSlotsComponents.d.ts +0 -2
- package/modern/constants/dataGridPremiumDefaultSlotsComponents.js +0 -11
- package/modern/hooks/features/aggregation/createAggregationLookup.d.ts +0 -17
- package/modern/hooks/features/aggregation/createAggregationLookup.js +0 -111
- package/modern/hooks/features/aggregation/gridAggregationFunctions.d.ts +0 -8
- package/modern/hooks/features/aggregation/gridAggregationFunctions.js +0 -93
- package/modern/hooks/features/aggregation/gridAggregationInterfaces.d.ts +0 -129
- package/modern/hooks/features/aggregation/gridAggregationSelectors.d.ts +0 -13
- package/modern/hooks/features/aggregation/gridAggregationSelectors.js +0 -15
- package/modern/hooks/features/aggregation/gridAggregationUtils.d.ts +0 -62
- package/modern/hooks/features/aggregation/gridAggregationUtils.js +0 -180
- package/modern/hooks/features/aggregation/index.d.ts +0 -4
- package/modern/hooks/features/aggregation/index.js +0 -3
- package/modern/hooks/features/aggregation/useGridAggregation.d.ts +0 -6
- package/modern/hooks/features/aggregation/useGridAggregation.js +0 -103
- package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +0 -4
- package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.js +0 -96
- package/modern/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +0 -81
- package/modern/hooks/features/aggregation/wrapColumnWithAggregation.js +0 -215
- package/modern/hooks/features/cellSelection/gridCellSelectionInterfaces.d.ts +0 -40
- package/modern/hooks/features/cellSelection/gridCellSelectionInterfaces.js +0 -1
- package/modern/hooks/features/cellSelection/gridCellSelectionSelector.d.ts +0 -2
- package/modern/hooks/features/cellSelection/gridCellSelectionSelector.js +0 -2
- package/modern/hooks/features/cellSelection/index.d.ts +0 -1
- package/modern/hooks/features/cellSelection/index.js +0 -1
- package/modern/hooks/features/cellSelection/useGridCellSelection.d.ts +0 -6
- package/modern/hooks/features/cellSelection/useGridCellSelection.js +0 -486
- package/modern/hooks/features/clipboard/useGridClipboardImport.d.ts +0 -4
- package/modern/hooks/features/clipboard/useGridClipboardImport.js +0 -335
- package/modern/hooks/features/dataSource/models.d.ts +0 -54
- package/modern/hooks/features/dataSource/models.js +0 -1
- package/modern/hooks/features/dataSource/useGridDataSourcePremium.d.ts +0 -4
- package/modern/hooks/features/dataSource/useGridDataSourcePremium.js +0 -59
- package/modern/hooks/features/export/gridExcelExportInterface.d.ts +0 -71
- package/modern/hooks/features/export/gridExcelExportInterface.js +0 -1
- package/modern/hooks/features/export/index.d.ts +0 -2
- package/modern/hooks/features/export/index.js +0 -2
- package/modern/hooks/features/export/serializer/excelSerializer.d.ts +0 -40
- package/modern/hooks/features/export/serializer/excelSerializer.js +0 -269
- package/modern/hooks/features/export/serializer/setupExcelExportWebWorker.d.ts +0 -2
- package/modern/hooks/features/export/serializer/setupExcelExportWebWorker.js +0 -53
- package/modern/hooks/features/export/serializer/utils.d.ts +0 -36
- package/modern/hooks/features/export/serializer/utils.js +0 -93
- package/modern/hooks/features/export/useGridExcelExport.d.ts +0 -11
- package/modern/hooks/features/export/useGridExcelExport.js +0 -139
- package/modern/hooks/features/index.d.ts +0 -5
- package/modern/hooks/features/index.js +0 -6
- package/modern/hooks/features/promptControl/api.d.ts +0 -2
- package/modern/hooks/features/promptControl/api.js +0 -22
- package/modern/hooks/features/promptControl/index.d.ts +0 -2
- package/modern/hooks/features/promptControl/index.js +0 -1
- package/modern/hooks/features/promptControl/types.d.ts +0 -25
- package/modern/hooks/features/promptControl/types.js +0 -1
- package/modern/hooks/features/rowGrouping/createGroupingColDef.d.ts +0 -57
- package/modern/hooks/features/rowGrouping/createGroupingColDef.js +0 -272
- package/modern/hooks/features/rowGrouping/gridRowGroupingInterfaces.d.ts +0 -44
- package/modern/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +0 -1
- package/modern/hooks/features/rowGrouping/gridRowGroupingSelector.d.ts +0 -3
- package/modern/hooks/features/rowGrouping/gridRowGroupingSelector.js +0 -5
- package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +0 -54
- package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +0 -173
- package/modern/hooks/features/rowGrouping/index.d.ts +0 -3
- package/modern/hooks/features/rowGrouping/index.js +0 -3
- package/modern/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +0 -4
- package/modern/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +0 -73
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.d.ts +0 -11
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +0 -182
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +0 -4
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +0 -157
- package/modern/hooks/features/rows/index.d.ts +0 -1
- package/modern/hooks/features/rows/index.js +0 -1
- package/modern/hooks/features/rows/useGridRowAriaAttributes.d.ts +0 -1
- package/modern/hooks/features/rows/useGridRowAriaAttributes.js +0 -8
- package/modern/hooks/index.d.ts +0 -2
- package/modern/hooks/index.js +0 -3
- package/modern/hooks/utils/index.d.ts +0 -1
- package/modern/hooks/utils/index.js +0 -1
- package/modern/hooks/utils/useGridApiContext.d.ts +0 -4
- package/modern/hooks/utils/useGridApiContext.js +0 -2
- package/modern/hooks/utils/useGridApiRef.d.ts +0 -4
- package/modern/hooks/utils/useGridApiRef.js +0 -2
- package/modern/hooks/utils/useGridAriaAttributes.d.ts +0 -2
- package/modern/hooks/utils/useGridAriaAttributes.js +0 -13
- package/modern/hooks/utils/useGridPrivateApiContext.d.ts +0 -2
- package/modern/hooks/utils/useGridPrivateApiContext.js +0 -2
- package/modern/hooks/utils/useGridRootProps.d.ts +0 -2
- package/modern/hooks/utils/useGridRootProps.js +0 -2
- package/modern/hooks/utils/useKeepGroupedColumnsHidden.d.ts +0 -12
- package/modern/hooks/utils/useKeepGroupedColumnsHidden.js +0 -43
- package/modern/index.d.ts +0 -23
- package/modern/index.js +0 -26
- package/modern/locales.d.ts +0 -1
- package/modern/locales.js +0 -1
- package/modern/material/icons.d.ts +0 -15
- package/modern/material/icons.js +0 -20
- package/modern/material/index.d.ts +0 -8
- package/modern/material/index.js +0 -11
- package/modern/models/dataGridPremiumProps.d.ts +0 -162
- package/modern/models/dataGridPremiumProps.js +0 -1
- package/modern/models/gridApiPremium.d.ts +0 -14
- package/modern/models/gridApiPremium.js +0 -1
- package/modern/models/gridGroupingValueGetter.d.ts +0 -4
- package/modern/models/gridGroupingValueGetter.js +0 -1
- package/modern/models/gridPastedValueParser.d.ts +0 -4
- package/modern/models/gridPastedValueParser.js +0 -1
- package/modern/models/gridPremiumIconSlotsComponent.d.ts +0 -28
- package/modern/models/gridPremiumIconSlotsComponent.js +0 -1
- package/modern/models/gridPremiumSlotsComponent.d.ts +0 -7
- package/modern/models/gridPremiumSlotsComponent.js +0 -1
- package/modern/models/gridStatePremium.d.ts +0 -18
- package/modern/models/gridStatePremium.js +0 -1
- package/modern/models/index.d.ts +0 -4
- package/modern/models/index.js +0 -4
- package/modern/package.json +0 -1
- package/modern/setupExcelExportWebWorker.d.ts +0 -1
- package/modern/setupExcelExportWebWorker.js +0 -1
- package/modern/themeAugmentation/index.d.ts +0 -2
- package/modern/themeAugmentation/index.js +0 -4
- package/modern/themeAugmentation/overrides.d.ts +0 -7
- package/modern/themeAugmentation/overrides.js +0 -1
- package/modern/themeAugmentation/props.d.ts +0 -15
- package/modern/themeAugmentation/props.js +0 -1
- package/modern/typeOverloads/index.d.ts +0 -2
- package/modern/typeOverloads/index.js +0 -2
- package/modern/typeOverloads/modules.d.ts +0 -97
- package/modern/typeOverloads/modules.js +0 -1
- package/modern/typeOverloads/reexports.d.ts +0 -17
- package/modern/typeOverloads/reexports.js +0 -15
- package/modern/utils/releaseInfo.d.ts +0 -1
- package/modern/utils/releaseInfo.js +0 -13
- package/setupExcelExportWebWorker.d.ts +0 -1
- package/tsconfig.build.tsbuildinfo +0 -1
- package/utils/releaseInfo.d.ts +0 -1
- package/utils/releaseInfo.js +0 -20
- /package/esm/hooks/features/{promptControl/types.js → aiAssistant/gridAiAssistantInterfaces.js} +0 -0
- /package/esm/hooks/features/{promptControl → aiAssistant}/index.js +0 -0
- /package/{modern/hooks/features/aggregation/gridAggregationInterfaces.js → esm/hooks/features/pivoting/gridPivotingInterfaces.js} +0 -0
- /package/hooks/features/{promptControl/types.js → aiAssistant/gridAiAssistantInterfaces.js} +0 -0
- /package/hooks/features/{promptControl → aiAssistant}/index.js +0 -0
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { gridRowTreeSelector, gridColumnLookupSelector } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { useGridRegisterStrategyProcessor, createRowTree, updateRowTree, getVisibleRowsLookup, skipSorting, skipFiltering } from '@mui/x-data-grid-pro/internals';
|
|
4
|
-
import { getGroupingRules, RowGroupingStrategy } from "./gridRowGroupingUtils.js";
|
|
5
|
-
import { gridRowGroupingSanitizedModelSelector } from "./gridRowGroupingSelector.js";
|
|
6
|
-
export const useGridDataSourceRowGroupingPreProcessors = (apiRef, props) => {
|
|
7
|
-
const createRowTreeForRowGrouping = React.useCallback(params => {
|
|
8
|
-
const getGroupKey = props.dataSource?.getGroupKey;
|
|
9
|
-
if (!getGroupKey) {
|
|
10
|
-
throw new Error('MUI X: No `getGroupKey` method provided with the dataSource.');
|
|
11
|
-
}
|
|
12
|
-
const getChildrenCount = props.dataSource?.getChildrenCount;
|
|
13
|
-
if (!getChildrenCount) {
|
|
14
|
-
throw new Error('MUI X: No `getChildrenCount` method provided with the dataSource.');
|
|
15
|
-
}
|
|
16
|
-
const sanitizedRowGroupingModel = gridRowGroupingSanitizedModelSelector(apiRef);
|
|
17
|
-
const columnsLookup = gridColumnLookupSelector(apiRef);
|
|
18
|
-
const groupingRules = getGroupingRules({
|
|
19
|
-
sanitizedRowGroupingModel,
|
|
20
|
-
columnsLookup
|
|
21
|
-
});
|
|
22
|
-
apiRef.current.caches.rowGrouping.rulesOnLastRowTreeCreation = groupingRules;
|
|
23
|
-
const getRowTreeBuilderNode = rowId => {
|
|
24
|
-
const parentPath = params.updates.groupKeys ?? [];
|
|
25
|
-
const row = params.dataRowIdToModelLookup[rowId];
|
|
26
|
-
const groupingRule = groupingRules[parentPath.length];
|
|
27
|
-
const groupingValueGetter = groupingRule?.groupingValueGetter;
|
|
28
|
-
const leafKey = groupingValueGetter?.(row[groupingRule.field], row, columnsLookup[groupingRule.field], apiRef) ?? getGroupKey(params.dataRowIdToModelLookup[rowId]);
|
|
29
|
-
return {
|
|
30
|
-
id: rowId,
|
|
31
|
-
path: [...parentPath, leafKey ?? rowId.toString()].map((key, i) => ({
|
|
32
|
-
key,
|
|
33
|
-
field: groupingRules[i]?.field ?? null
|
|
34
|
-
})),
|
|
35
|
-
serverChildrenCount: getChildrenCount(params.dataRowIdToModelLookup[rowId]) ?? 0
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
if (params.updates.type === 'full') {
|
|
39
|
-
return createRowTree({
|
|
40
|
-
previousTree: params.previousTree,
|
|
41
|
-
nodes: params.updates.rows.map(getRowTreeBuilderNode),
|
|
42
|
-
defaultGroupingExpansionDepth: props.defaultGroupingExpansionDepth,
|
|
43
|
-
isGroupExpandedByDefault: props.isGroupExpandedByDefault,
|
|
44
|
-
groupingName: RowGroupingStrategy.DataSource
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
return updateRowTree({
|
|
48
|
-
nodes: {
|
|
49
|
-
inserted: params.updates.actions.insert.map(getRowTreeBuilderNode),
|
|
50
|
-
modified: params.updates.actions.modify.map(getRowTreeBuilderNode),
|
|
51
|
-
removed: params.updates.actions.remove
|
|
52
|
-
},
|
|
53
|
-
previousTree: params.previousTree,
|
|
54
|
-
previousGroupsToFetch: params.previousGroupsToFetch,
|
|
55
|
-
previousTreeDepth: params.previousTreeDepths,
|
|
56
|
-
defaultGroupingExpansionDepth: props.defaultGroupingExpansionDepth,
|
|
57
|
-
isGroupExpandedByDefault: props.isGroupExpandedByDefault,
|
|
58
|
-
groupingName: RowGroupingStrategy.DataSource
|
|
59
|
-
});
|
|
60
|
-
}, [apiRef, props.dataSource, props.defaultGroupingExpansionDepth, props.isGroupExpandedByDefault]);
|
|
61
|
-
const filterRows = React.useCallback(() => {
|
|
62
|
-
const rowTree = gridRowTreeSelector(apiRef);
|
|
63
|
-
return skipFiltering(rowTree);
|
|
64
|
-
}, [apiRef]);
|
|
65
|
-
const sortRows = React.useCallback(() => {
|
|
66
|
-
const rowTree = gridRowTreeSelector(apiRef);
|
|
67
|
-
return skipSorting(rowTree);
|
|
68
|
-
}, [apiRef]);
|
|
69
|
-
useGridRegisterStrategyProcessor(apiRef, RowGroupingStrategy.DataSource, 'rowTreeCreation', createRowTreeForRowGrouping);
|
|
70
|
-
useGridRegisterStrategyProcessor(apiRef, RowGroupingStrategy.DataSource, 'filtering', filterRows);
|
|
71
|
-
useGridRegisterStrategyProcessor(apiRef, RowGroupingStrategy.DataSource, 'sorting', sortRows);
|
|
72
|
-
useGridRegisterStrategyProcessor(apiRef, RowGroupingStrategy.DataSource, 'visibleRowsLookupCreation', getVisibleRowsLookup);
|
|
73
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { GridStateInitializer } from '@mui/x-data-grid-pro/internals';
|
|
3
|
-
import { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
4
|
-
import { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
|
|
5
|
-
export declare const rowGroupingStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'rowGroupingModel' | 'initialState'>>;
|
|
6
|
-
/**
|
|
7
|
-
* @requires useGridColumns (state, method) - can be after, async only
|
|
8
|
-
* @requires useGridRows (state, method) - can be after, async only
|
|
9
|
-
* @requires useGridParamsApi (method) - can be after, async only
|
|
10
|
-
*/
|
|
11
|
-
export declare const useGridRowGrouping: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "initialState" | "rowGroupingModel" | "onRowGroupingModelChange" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "groupingColDef" | "rowGroupingColumnMode" | "disableRowGrouping" | "slotProps" | "slots" | "dataSource">) => void;
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { useGridApiEventHandler, useGridApiMethod, gridColumnLookupSelector } from '@mui/x-data-grid-pro';
|
|
4
|
-
import { useGridRegisterPipeProcessor, GridStrategyGroup } from '@mui/x-data-grid-pro/internals';
|
|
5
|
-
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from "./gridRowGroupingSelector.js";
|
|
6
|
-
import { getRowGroupingFieldFromGroupingCriteria, RowGroupingStrategy, isGroupingColumn, mergeStateWithRowGroupingModel, setStrategyAvailability, getGroupingRules, areGroupingRulesEqual } from "./gridRowGroupingUtils.js";
|
|
7
|
-
export const rowGroupingStateInitializer = (state, props, apiRef) => {
|
|
8
|
-
apiRef.current.caches.rowGrouping = {
|
|
9
|
-
rulesOnLastRowTreeCreation: []
|
|
10
|
-
};
|
|
11
|
-
return _extends({}, state, {
|
|
12
|
-
rowGrouping: {
|
|
13
|
-
model: props.rowGroupingModel ?? props.initialState?.rowGrouping?.model ?? []
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @requires useGridColumns (state, method) - can be after, async only
|
|
20
|
-
* @requires useGridRows (state, method) - can be after, async only
|
|
21
|
-
* @requires useGridParamsApi (method) - can be after, async only
|
|
22
|
-
*/
|
|
23
|
-
export const useGridRowGrouping = (apiRef, props) => {
|
|
24
|
-
apiRef.current.registerControlState({
|
|
25
|
-
stateId: 'rowGrouping',
|
|
26
|
-
propModel: props.rowGroupingModel,
|
|
27
|
-
propOnChange: props.onRowGroupingModelChange,
|
|
28
|
-
stateSelector: gridRowGroupingModelSelector,
|
|
29
|
-
changeEvent: 'rowGroupingModelChange'
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
/*
|
|
33
|
-
* API METHODS
|
|
34
|
-
*/
|
|
35
|
-
const setRowGroupingModel = React.useCallback(model => {
|
|
36
|
-
const currentModel = gridRowGroupingModelSelector(apiRef);
|
|
37
|
-
if (currentModel !== model) {
|
|
38
|
-
apiRef.current.setState(mergeStateWithRowGroupingModel(model));
|
|
39
|
-
setStrategyAvailability(apiRef, props.disableRowGrouping);
|
|
40
|
-
}
|
|
41
|
-
}, [apiRef, props.disableRowGrouping]);
|
|
42
|
-
const addRowGroupingCriteria = React.useCallback((field, groupingIndex) => {
|
|
43
|
-
const currentModel = gridRowGroupingModelSelector(apiRef);
|
|
44
|
-
if (currentModel.includes(field)) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
const cleanGroupingIndex = groupingIndex ?? currentModel.length;
|
|
48
|
-
const updatedModel = [...currentModel.slice(0, cleanGroupingIndex), field, ...currentModel.slice(cleanGroupingIndex)];
|
|
49
|
-
apiRef.current.setRowGroupingModel(updatedModel);
|
|
50
|
-
}, [apiRef]);
|
|
51
|
-
const removeRowGroupingCriteria = React.useCallback(field => {
|
|
52
|
-
const currentModel = gridRowGroupingModelSelector(apiRef);
|
|
53
|
-
if (!currentModel.includes(field)) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
apiRef.current.setRowGroupingModel(currentModel.filter(el => el !== field));
|
|
57
|
-
}, [apiRef]);
|
|
58
|
-
const setRowGroupingCriteriaIndex = React.useCallback((field, targetIndex) => {
|
|
59
|
-
const currentModel = gridRowGroupingModelSelector(apiRef);
|
|
60
|
-
const currentTargetIndex = currentModel.indexOf(field);
|
|
61
|
-
if (currentTargetIndex === -1) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
const updatedModel = [...currentModel];
|
|
65
|
-
updatedModel.splice(targetIndex, 0, updatedModel.splice(currentTargetIndex, 1)[0]);
|
|
66
|
-
apiRef.current.setRowGroupingModel(updatedModel);
|
|
67
|
-
}, [apiRef]);
|
|
68
|
-
const rowGroupingApi = {
|
|
69
|
-
setRowGroupingModel,
|
|
70
|
-
addRowGroupingCriteria,
|
|
71
|
-
removeRowGroupingCriteria,
|
|
72
|
-
setRowGroupingCriteriaIndex
|
|
73
|
-
};
|
|
74
|
-
useGridApiMethod(apiRef, rowGroupingApi, 'public');
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* PRE-PROCESSING
|
|
78
|
-
*/
|
|
79
|
-
const addColumnMenuButtons = React.useCallback((columnMenuItems, colDef) => {
|
|
80
|
-
if (props.disableRowGrouping) {
|
|
81
|
-
return columnMenuItems;
|
|
82
|
-
}
|
|
83
|
-
if (isGroupingColumn(colDef.field) || colDef.groupable) {
|
|
84
|
-
return [...columnMenuItems, 'columnMenuGroupingItem'];
|
|
85
|
-
}
|
|
86
|
-
return columnMenuItems;
|
|
87
|
-
}, [props.disableRowGrouping]);
|
|
88
|
-
const addGetRowsParams = React.useCallback(params => {
|
|
89
|
-
return _extends({}, params, {
|
|
90
|
-
groupFields: gridRowGroupingModelSelector(apiRef)
|
|
91
|
-
});
|
|
92
|
-
}, [apiRef]);
|
|
93
|
-
const stateExportPreProcessing = React.useCallback((prevState, context) => {
|
|
94
|
-
const rowGroupingModelToExport = gridRowGroupingModelSelector(apiRef);
|
|
95
|
-
const shouldExportRowGroupingModel =
|
|
96
|
-
// Always export if the `exportOnlyDirtyModels` property is not activated
|
|
97
|
-
!context.exportOnlyDirtyModels ||
|
|
98
|
-
// Always export if the model is controlled
|
|
99
|
-
props.rowGroupingModel != null ||
|
|
100
|
-
// Always export if the model has been initialized
|
|
101
|
-
props.initialState?.rowGrouping?.model != null ||
|
|
102
|
-
// Export if the model is not empty
|
|
103
|
-
Object.keys(rowGroupingModelToExport).length > 0;
|
|
104
|
-
if (!shouldExportRowGroupingModel) {
|
|
105
|
-
return prevState;
|
|
106
|
-
}
|
|
107
|
-
return _extends({}, prevState, {
|
|
108
|
-
rowGrouping: {
|
|
109
|
-
model: rowGroupingModelToExport
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}, [apiRef, props.rowGroupingModel, props.initialState?.rowGrouping?.model]);
|
|
113
|
-
const stateRestorePreProcessing = React.useCallback((params, context) => {
|
|
114
|
-
if (props.disableRowGrouping) {
|
|
115
|
-
return params;
|
|
116
|
-
}
|
|
117
|
-
const rowGroupingModel = context.stateToRestore.rowGrouping?.model;
|
|
118
|
-
if (rowGroupingModel != null) {
|
|
119
|
-
apiRef.current.setState(mergeStateWithRowGroupingModel(rowGroupingModel));
|
|
120
|
-
}
|
|
121
|
-
return params;
|
|
122
|
-
}, [apiRef, props.disableRowGrouping]);
|
|
123
|
-
useGridRegisterPipeProcessor(apiRef, 'columnMenu', addColumnMenuButtons);
|
|
124
|
-
useGridRegisterPipeProcessor(apiRef, 'getRowsParams', addGetRowsParams);
|
|
125
|
-
useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);
|
|
126
|
-
useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);
|
|
127
|
-
|
|
128
|
-
/*
|
|
129
|
-
* EVENTS
|
|
130
|
-
*/
|
|
131
|
-
const handleCellKeyDown = React.useCallback((params, event) => {
|
|
132
|
-
const cellParams = apiRef.current.getCellParams(params.id, params.field);
|
|
133
|
-
if (isGroupingColumn(cellParams.field) && event.key === ' ' && !event.shiftKey) {
|
|
134
|
-
event.stopPropagation();
|
|
135
|
-
event.preventDefault();
|
|
136
|
-
if (params.rowNode.type !== 'group') {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
const isOnGroupingCell = props.rowGroupingColumnMode === 'single' || getRowGroupingFieldFromGroupingCriteria(params.rowNode.groupingField) === params.field;
|
|
140
|
-
if (!isOnGroupingCell) {
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
if (props.dataSource && !params.rowNode.childrenExpanded) {
|
|
144
|
-
apiRef.current.dataSource.fetchRows(params.id);
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
apiRef.current.setRowChildrenExpansion(params.id, !params.rowNode.childrenExpanded);
|
|
148
|
-
}
|
|
149
|
-
}, [apiRef, props.rowGroupingColumnMode, props.dataSource]);
|
|
150
|
-
const checkGroupingColumnsModelDiff = React.useCallback(() => {
|
|
151
|
-
const sanitizedRowGroupingModel = gridRowGroupingSanitizedModelSelector(apiRef);
|
|
152
|
-
const rulesOnLastRowTreeCreation = apiRef.current.caches.rowGrouping.rulesOnLastRowTreeCreation || [];
|
|
153
|
-
const groupingRules = getGroupingRules({
|
|
154
|
-
sanitizedRowGroupingModel,
|
|
155
|
-
columnsLookup: gridColumnLookupSelector(apiRef)
|
|
156
|
-
});
|
|
157
|
-
if (!areGroupingRulesEqual(rulesOnLastRowTreeCreation, groupingRules)) {
|
|
158
|
-
apiRef.current.caches.rowGrouping.rulesOnLastRowTreeCreation = groupingRules;
|
|
159
|
-
apiRef.current.requestPipeProcessorsApplication('hydrateColumns');
|
|
160
|
-
setStrategyAvailability(apiRef, props.disableRowGrouping);
|
|
161
|
-
|
|
162
|
-
// Refresh the row tree creation strategy processing
|
|
163
|
-
// TODO: Add a clean way to re-run a strategy processing without publishing a private event
|
|
164
|
-
if (apiRef.current.getActiveStrategy(GridStrategyGroup.RowTree) === RowGroupingStrategy.Default) {
|
|
165
|
-
apiRef.current.publishEvent('activeStrategyProcessorChange', 'rowTreeCreation');
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}, [apiRef, props.disableRowGrouping]);
|
|
169
|
-
useGridApiEventHandler(apiRef, 'cellKeyDown', handleCellKeyDown);
|
|
170
|
-
useGridApiEventHandler(apiRef, 'columnsChange', checkGroupingColumnsModelDiff);
|
|
171
|
-
useGridApiEventHandler(apiRef, 'rowGroupingModelChange', checkGroupingColumnsModelDiff);
|
|
172
|
-
useGridApiEventHandler(apiRef, 'rowGroupingModelChange', () => apiRef.current.dataSource.fetchRows());
|
|
173
|
-
|
|
174
|
-
/*
|
|
175
|
-
* EFFECTS
|
|
176
|
-
*/
|
|
177
|
-
React.useEffect(() => {
|
|
178
|
-
if (props.rowGroupingModel !== undefined) {
|
|
179
|
-
apiRef.current.setRowGroupingModel(props.rowGroupingModel);
|
|
180
|
-
}
|
|
181
|
-
}, [apiRef, props.rowGroupingModel]);
|
|
182
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
|
|
3
|
-
import { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
4
|
-
export declare const useGridRowGroupingPreProcessors: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "disableRowGrouping" | "groupingColDef" | "rowGroupingColumnMode" | "defaultGroupingExpansionDepth" | "isGroupExpandedByDefault" | "dataSource">) => void;
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { gridColumnLookupSelector, gridRowTreeSelector, useFirstRender, GRID_CHECKBOX_SELECTION_FIELD } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { useGridRegisterPipeProcessor, useGridRegisterStrategyProcessor, sortRowTree, createRowTree, updateRowTree, getVisibleRowsLookup } from '@mui/x-data-grid-pro/internals';
|
|
4
|
-
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from "./gridRowGroupingSelector.js";
|
|
5
|
-
import { createGroupingColDefForAllGroupingCriteria, createGroupingColDefForOneGroupingCriteria } from "./createGroupingColDef.js";
|
|
6
|
-
import { filterRowTreeFromGroupingColumns, getColDefOverrides, RowGroupingStrategy, isGroupingColumn, setStrategyAvailability, getCellGroupingCriteria, getGroupingRules } from "./gridRowGroupingUtils.js";
|
|
7
|
-
export const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
8
|
-
const getGroupingColDefs = React.useCallback(columnsState => {
|
|
9
|
-
if (props.disableRowGrouping) {
|
|
10
|
-
return [];
|
|
11
|
-
}
|
|
12
|
-
const strategy = props.dataSource ? RowGroupingStrategy.DataSource : RowGroupingStrategy.Default;
|
|
13
|
-
const groupingColDefProp = props.groupingColDef;
|
|
14
|
-
|
|
15
|
-
// We can't use `gridGroupingRowsSanitizedModelSelector` here because the new columns are not in the state yet
|
|
16
|
-
const rowGroupingModel = gridRowGroupingModelSelector(apiRef).filter(field => !!columnsState.lookup[field]);
|
|
17
|
-
if (rowGroupingModel.length === 0) {
|
|
18
|
-
return [];
|
|
19
|
-
}
|
|
20
|
-
switch (props.rowGroupingColumnMode) {
|
|
21
|
-
case 'single':
|
|
22
|
-
{
|
|
23
|
-
return [createGroupingColDefForAllGroupingCriteria({
|
|
24
|
-
apiRef,
|
|
25
|
-
rowGroupingModel,
|
|
26
|
-
colDefOverride: getColDefOverrides(groupingColDefProp, rowGroupingModel, strategy),
|
|
27
|
-
columnsLookup: columnsState.lookup,
|
|
28
|
-
strategy
|
|
29
|
-
})];
|
|
30
|
-
}
|
|
31
|
-
case 'multiple':
|
|
32
|
-
{
|
|
33
|
-
return rowGroupingModel.map(groupingCriteria => createGroupingColDefForOneGroupingCriteria({
|
|
34
|
-
groupingCriteria,
|
|
35
|
-
colDefOverride: getColDefOverrides(groupingColDefProp, [groupingCriteria]),
|
|
36
|
-
groupedByColDef: columnsState.lookup[groupingCriteria],
|
|
37
|
-
columnsLookup: columnsState.lookup,
|
|
38
|
-
strategy
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
default:
|
|
42
|
-
{
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}, [apiRef, props.groupingColDef, props.rowGroupingColumnMode, props.disableRowGrouping, props.dataSource]);
|
|
47
|
-
const updateGroupingColumn = React.useCallback(columnsState => {
|
|
48
|
-
const groupingColDefs = getGroupingColDefs(columnsState);
|
|
49
|
-
let newColumnFields = [];
|
|
50
|
-
const newColumnsLookup = {};
|
|
51
|
-
|
|
52
|
-
// We only keep the non-grouping columns
|
|
53
|
-
columnsState.orderedFields.forEach(field => {
|
|
54
|
-
if (!isGroupingColumn(field)) {
|
|
55
|
-
newColumnFields.push(field);
|
|
56
|
-
newColumnsLookup[field] = columnsState.lookup[field];
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// We add the grouping column
|
|
61
|
-
groupingColDefs.forEach(groupingColDef => {
|
|
62
|
-
const matchingGroupingColDef = columnsState.lookup[groupingColDef.field];
|
|
63
|
-
if (matchingGroupingColDef) {
|
|
64
|
-
groupingColDef.width = matchingGroupingColDef.width;
|
|
65
|
-
groupingColDef.flex = matchingGroupingColDef.flex;
|
|
66
|
-
}
|
|
67
|
-
newColumnsLookup[groupingColDef.field] = groupingColDef;
|
|
68
|
-
});
|
|
69
|
-
const checkBoxFieldIndex = newColumnFields.findIndex(field => field === GRID_CHECKBOX_SELECTION_FIELD);
|
|
70
|
-
const checkBoxColumn = checkBoxFieldIndex !== -1 ? newColumnFields.splice(checkBoxFieldIndex, 1) : [];
|
|
71
|
-
newColumnFields = [...checkBoxColumn, ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields];
|
|
72
|
-
columnsState.orderedFields = newColumnFields;
|
|
73
|
-
columnsState.lookup = newColumnsLookup;
|
|
74
|
-
return columnsState;
|
|
75
|
-
}, [getGroupingColDefs]);
|
|
76
|
-
const createRowTreeForRowGrouping = React.useCallback(params => {
|
|
77
|
-
const sanitizedRowGroupingModel = gridRowGroupingSanitizedModelSelector(apiRef);
|
|
78
|
-
const columnsLookup = gridColumnLookupSelector(apiRef);
|
|
79
|
-
const groupingRules = getGroupingRules({
|
|
80
|
-
sanitizedRowGroupingModel,
|
|
81
|
-
columnsLookup
|
|
82
|
-
});
|
|
83
|
-
apiRef.current.caches.rowGrouping.rulesOnLastRowTreeCreation = groupingRules;
|
|
84
|
-
const getRowTreeBuilderNode = rowId => {
|
|
85
|
-
const row = params.dataRowIdToModelLookup[rowId];
|
|
86
|
-
const parentPath = groupingRules.map(groupingRule => getCellGroupingCriteria({
|
|
87
|
-
row,
|
|
88
|
-
groupingRule,
|
|
89
|
-
colDef: columnsLookup[groupingRule.field],
|
|
90
|
-
apiRef
|
|
91
|
-
})).filter(cell => cell.key != null);
|
|
92
|
-
const leafGroupingCriteria = {
|
|
93
|
-
key: rowId.toString(),
|
|
94
|
-
field: null
|
|
95
|
-
};
|
|
96
|
-
return {
|
|
97
|
-
path: [...parentPath, leafGroupingCriteria],
|
|
98
|
-
id: rowId
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
if (params.updates.type === 'full') {
|
|
102
|
-
return createRowTree({
|
|
103
|
-
previousTree: params.previousTree,
|
|
104
|
-
nodes: params.updates.rows.map(getRowTreeBuilderNode),
|
|
105
|
-
defaultGroupingExpansionDepth: props.defaultGroupingExpansionDepth,
|
|
106
|
-
isGroupExpandedByDefault: props.isGroupExpandedByDefault,
|
|
107
|
-
groupingName: RowGroupingStrategy.Default
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
return updateRowTree({
|
|
111
|
-
nodes: {
|
|
112
|
-
inserted: params.updates.actions.insert.map(getRowTreeBuilderNode),
|
|
113
|
-
modified: params.updates.actions.modify.map(getRowTreeBuilderNode),
|
|
114
|
-
removed: params.updates.actions.remove
|
|
115
|
-
},
|
|
116
|
-
previousTree: params.previousTree,
|
|
117
|
-
previousTreeDepth: params.previousTreeDepths,
|
|
118
|
-
defaultGroupingExpansionDepth: props.defaultGroupingExpansionDepth,
|
|
119
|
-
isGroupExpandedByDefault: props.isGroupExpandedByDefault,
|
|
120
|
-
groupingName: RowGroupingStrategy.Default
|
|
121
|
-
});
|
|
122
|
-
}, [apiRef, props.defaultGroupingExpansionDepth, props.isGroupExpandedByDefault]);
|
|
123
|
-
const filterRows = React.useCallback(params => {
|
|
124
|
-
const rowTree = gridRowTreeSelector(apiRef);
|
|
125
|
-
return filterRowTreeFromGroupingColumns({
|
|
126
|
-
rowTree,
|
|
127
|
-
isRowMatchingFilters: params.isRowMatchingFilters,
|
|
128
|
-
filterModel: params.filterModel,
|
|
129
|
-
apiRef
|
|
130
|
-
});
|
|
131
|
-
}, [apiRef]);
|
|
132
|
-
const sortRows = React.useCallback(params => {
|
|
133
|
-
const rowTree = gridRowTreeSelector(apiRef);
|
|
134
|
-
return sortRowTree({
|
|
135
|
-
rowTree,
|
|
136
|
-
sortRowList: params.sortRowList,
|
|
137
|
-
disableChildrenSorting: false,
|
|
138
|
-
shouldRenderGroupBelowLeaves: true
|
|
139
|
-
});
|
|
140
|
-
}, [apiRef]);
|
|
141
|
-
useGridRegisterPipeProcessor(apiRef, 'hydrateColumns', updateGroupingColumn);
|
|
142
|
-
useGridRegisterStrategyProcessor(apiRef, RowGroupingStrategy.Default, 'rowTreeCreation', createRowTreeForRowGrouping);
|
|
143
|
-
useGridRegisterStrategyProcessor(apiRef, RowGroupingStrategy.Default, 'filtering', filterRows);
|
|
144
|
-
useGridRegisterStrategyProcessor(apiRef, RowGroupingStrategy.Default, 'sorting', sortRows);
|
|
145
|
-
useGridRegisterStrategyProcessor(apiRef, RowGroupingStrategy.Default, 'visibleRowsLookupCreation', getVisibleRowsLookup);
|
|
146
|
-
useFirstRender(() => {
|
|
147
|
-
setStrategyAvailability(apiRef, props.disableRowGrouping, props.dataSource);
|
|
148
|
-
});
|
|
149
|
-
const isFirstRender = React.useRef(true);
|
|
150
|
-
React.useEffect(() => {
|
|
151
|
-
if (!isFirstRender.current) {
|
|
152
|
-
setStrategyAvailability(apiRef, props.disableRowGrouping, props.dataSource);
|
|
153
|
-
} else {
|
|
154
|
-
isFirstRender.current = false;
|
|
155
|
-
}
|
|
156
|
-
}, [apiRef, props.disableRowGrouping, props.dataSource]);
|
|
157
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./useGridRowAriaAttributes.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./useGridRowAriaAttributes.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useGridRowAriaAttributes: () => (rowNode: import("@mui/x-data-grid").GridTreeNode, index: number) => React.HTMLAttributes<HTMLElement>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { useGridRowAriaAttributes as useGridRowAriaAttributesPro, useGridSelector } from '@mui/x-data-grid-pro/internals';
|
|
2
|
-
import { useGridPrivateApiContext } from "../../utils/useGridPrivateApiContext.js";
|
|
3
|
-
import { gridRowGroupingSanitizedModelSelector } from "../rowGrouping/gridRowGroupingSelector.js";
|
|
4
|
-
export const useGridRowAriaAttributes = () => {
|
|
5
|
-
const apiRef = useGridPrivateApiContext();
|
|
6
|
-
const gridRowGroupingModel = useGridSelector(apiRef, gridRowGroupingSanitizedModelSelector);
|
|
7
|
-
return useGridRowAriaAttributesPro(gridRowGroupingModel.length > 0);
|
|
8
|
-
};
|
package/modern/hooks/index.d.ts
DELETED
package/modern/hooks/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./useKeepGroupedColumnsHidden.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./useKeepGroupedColumnsHidden.js";
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { GridApiCommon } from '@mui/x-data-grid';
|
|
3
|
-
import { GridApiPremium } from "../../models/gridApiPremium.js";
|
|
4
|
-
export declare const useGridApiContext: <Api extends GridApiCommon = GridApiPremium>() => RefObject<Api>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { GridApiCommon } from '@mui/x-data-grid';
|
|
3
|
-
import { GridApiPremium } from "../../models/gridApiPremium.js";
|
|
4
|
-
export declare const useGridApiRef: <Api extends GridApiCommon = GridApiPremium>() => RefObject<Api | null>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { useGridAriaAttributes as useGridAriaAttributesPro, useGridSelector } from '@mui/x-data-grid-pro/internals';
|
|
3
|
-
import { gridRowGroupingSanitizedModelSelector } from "../features/rowGrouping/gridRowGroupingSelector.js";
|
|
4
|
-
import { useGridPrivateApiContext } from "./useGridPrivateApiContext.js";
|
|
5
|
-
export const useGridAriaAttributes = () => {
|
|
6
|
-
const ariaAttributesPro = useGridAriaAttributesPro();
|
|
7
|
-
const apiRef = useGridPrivateApiContext();
|
|
8
|
-
const gridRowGroupingModel = useGridSelector(apiRef, gridRowGroupingSanitizedModelSelector);
|
|
9
|
-
const ariaAttributesPremium = gridRowGroupingModel.length > 0 ? {
|
|
10
|
-
role: 'treegrid'
|
|
11
|
-
} : {};
|
|
12
|
-
return _extends({}, ariaAttributesPro, ariaAttributesPremium);
|
|
13
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { GridApi } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { GridInitialStatePremium } from "../../models/gridStatePremium.js";
|
|
4
|
-
import { DataGridPremiumProps } from "../../models/dataGridPremiumProps.js";
|
|
5
|
-
/**
|
|
6
|
-
* Automatically hide columns when added to the row grouping model and stop hiding them when they are removed.
|
|
7
|
-
* Handles both the `props.initialState.rowGrouping.model` and `props.rowGroupingModel`
|
|
8
|
-
* Does not work when used with the `hide` property of `GridColDef`
|
|
9
|
-
*/
|
|
10
|
-
export declare const useKeepGroupedColumnsHidden: (props: {
|
|
11
|
-
apiRef: RefObject<GridApi | null>;
|
|
12
|
-
} & Pick<DataGridPremiumProps, "initialState" | "rowGroupingModel">) => GridInitialStatePremium;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { gridColumnVisibilityModelSelector } from '@mui/x-data-grid-pro';
|
|
4
|
-
const updateColumnVisibilityModel = (columnVisibilityModel, rowGroupingModel, prevRowGroupingModel) => {
|
|
5
|
-
const newColumnVisibilityModel = _extends({}, columnVisibilityModel);
|
|
6
|
-
rowGroupingModel?.forEach(field => {
|
|
7
|
-
if (!prevRowGroupingModel?.includes(field)) {
|
|
8
|
-
newColumnVisibilityModel[field] = false;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
prevRowGroupingModel?.forEach(field => {
|
|
12
|
-
if (!rowGroupingModel?.includes(field)) {
|
|
13
|
-
newColumnVisibilityModel[field] = true;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
return newColumnVisibilityModel;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Automatically hide columns when added to the row grouping model and stop hiding them when they are removed.
|
|
21
|
-
* Handles both the `props.initialState.rowGrouping.model` and `props.rowGroupingModel`
|
|
22
|
-
* Does not work when used with the `hide` property of `GridColDef`
|
|
23
|
-
*/
|
|
24
|
-
export const useKeepGroupedColumnsHidden = props => {
|
|
25
|
-
const initialProps = React.useRef(props);
|
|
26
|
-
const rowGroupingModel = React.useRef(props.rowGroupingModel ?? props.initialState?.rowGrouping?.model);
|
|
27
|
-
React.useEffect(() => {
|
|
28
|
-
props.apiRef.current?.subscribeEvent('rowGroupingModelChange', newModel => {
|
|
29
|
-
const columnVisibilityModel = updateColumnVisibilityModel(gridColumnVisibilityModelSelector(props.apiRef), newModel, rowGroupingModel.current);
|
|
30
|
-
props.apiRef.current?.setColumnVisibilityModel(columnVisibilityModel);
|
|
31
|
-
rowGroupingModel.current = newModel;
|
|
32
|
-
});
|
|
33
|
-
}, [props.apiRef]);
|
|
34
|
-
return React.useMemo(() => {
|
|
35
|
-
const invariantInitialState = initialProps.current.initialState;
|
|
36
|
-
const columnVisibilityModel = updateColumnVisibilityModel(invariantInitialState?.columns?.columnVisibilityModel, rowGroupingModel.current, undefined);
|
|
37
|
-
return _extends({}, invariantInitialState, {
|
|
38
|
-
columns: _extends({}, invariantInitialState?.columns, {
|
|
39
|
-
columnVisibilityModel
|
|
40
|
-
})
|
|
41
|
-
});
|
|
42
|
-
}, []);
|
|
43
|
-
};
|
package/modern/index.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import "./typeOverloads/index.js";
|
|
2
|
-
export * from '@mui/x-data-grid/components';
|
|
3
|
-
export * from '@mui/x-data-grid-pro/components';
|
|
4
|
-
export * from '@mui/x-data-grid/constants';
|
|
5
|
-
export * from '@mui/x-data-grid/hooks';
|
|
6
|
-
export * from '@mui/x-data-grid-pro/hooks';
|
|
7
|
-
export * from '@mui/x-data-grid/models';
|
|
8
|
-
export * from '@mui/x-data-grid-pro/models';
|
|
9
|
-
export * from '@mui/x-data-grid/context';
|
|
10
|
-
export * from '@mui/x-data-grid/colDef';
|
|
11
|
-
export * from '@mui/x-data-grid/utils';
|
|
12
|
-
export * from '@mui/x-data-grid-pro/utils';
|
|
13
|
-
export * from "./DataGridPremium/index.js";
|
|
14
|
-
export * from "./hooks/index.js";
|
|
15
|
-
export * from "./models/index.js";
|
|
16
|
-
export * from "./components/index.js";
|
|
17
|
-
export { GridColumnHeaders } from '@mui/x-data-grid-pro';
|
|
18
|
-
export type { GridColumnHeadersProps } from '@mui/x-data-grid-pro';
|
|
19
|
-
export type { DataGridPremiumProps, GridExperimentalPremiumFeatures } from './models/dataGridPremiumProps';
|
|
20
|
-
export { useGridApiContext, useGridApiRef, useGridRootProps } from "./typeOverloads/reexports.js";
|
|
21
|
-
export type { GridApi, GridInitialState, GridState } from './typeOverloads/reexports';
|
|
22
|
-
export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from "./components/reexports.js";
|
|
23
|
-
export type { GridGetRowsParamsPremium as GridGetRowsParams, GridGetRowsResponsePremium as GridGetRowsResponse, GridDataSourcePremium as GridDataSource, GridDataSourceApiPremium as GridDataSourceApi, GridDataSourceApiBasePremium as GridDataSourceApiBase, GridDataSourcePremiumPrivateApi as GridDataSourcePrivateApi } from './hooks/features/dataSource/models';
|
package/modern/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @mui/x-data-grid-premium v8.0.0-beta.2
|
|
3
|
-
*
|
|
4
|
-
* @license MUI X Commercial
|
|
5
|
-
* This source code is licensed under the commercial license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
import "./typeOverloads/index.js";
|
|
9
|
-
export * from '@mui/x-data-grid/components';
|
|
10
|
-
export * from '@mui/x-data-grid-pro/components';
|
|
11
|
-
export * from '@mui/x-data-grid/constants';
|
|
12
|
-
export * from '@mui/x-data-grid/hooks';
|
|
13
|
-
export * from '@mui/x-data-grid-pro/hooks';
|
|
14
|
-
export * from '@mui/x-data-grid/models';
|
|
15
|
-
export * from '@mui/x-data-grid-pro/models';
|
|
16
|
-
export * from '@mui/x-data-grid/context';
|
|
17
|
-
export * from '@mui/x-data-grid/colDef';
|
|
18
|
-
export * from '@mui/x-data-grid/utils';
|
|
19
|
-
export * from '@mui/x-data-grid-pro/utils';
|
|
20
|
-
export * from "./DataGridPremium/index.js";
|
|
21
|
-
export * from "./hooks/index.js";
|
|
22
|
-
export * from "./models/index.js";
|
|
23
|
-
export * from "./components/index.js";
|
|
24
|
-
export { GridColumnHeaders } from '@mui/x-data-grid-pro';
|
|
25
|
-
export { useGridApiContext, useGridApiRef, useGridRootProps } from "./typeOverloads/reexports.js";
|
|
26
|
-
export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from "./components/reexports.js";
|
package/modern/locales.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@mui/x-data-grid/locales';
|
package/modern/locales.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@mui/x-data-grid/locales';
|