@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,4 +0,0 @@
|
|
|
1
|
-
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { GridApiPremium, GridPrivateApiPremium } from "../models/gridApiPremium.js";
|
|
3
|
-
import { DataGridPremiumProcessedProps } from "../models/dataGridPremiumProps.js";
|
|
4
|
-
export declare const useDataGridPremiumComponent: (inputApiRef: RefObject<GridApiPremium | null> | undefined, props: DataGridPremiumProcessedProps) => import("react").RefObject<GridPrivateApiPremium>;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, dimensionsStateInitializer, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors, useGridDataSourceLazyLoader, headerFilteringStateInitializer, useGridHeaderFiltering, virtualizationStateInitializer, useGridVirtualization, useGridDataSourceTreeDataPreProcessors, dataSourceStateInitializer, useGridRowSpanning, rowSpanningStateInitializer, useGridListView, listViewStateInitializer, propsStateInitializer } from '@mui/x-data-grid-pro/internals';
|
|
2
|
-
import { useGridDataSourcePremium as useGridDataSource } from "../hooks/features/dataSource/useGridDataSourcePremium.js";
|
|
3
|
-
// Premium-only features
|
|
4
|
-
import { useGridAggregation, aggregationStateInitializer } from "../hooks/features/aggregation/useGridAggregation.js";
|
|
5
|
-
import { useGridAggregationPreProcessors } from "../hooks/features/aggregation/useGridAggregationPreProcessors.js";
|
|
6
|
-
import { useGridRowGrouping, rowGroupingStateInitializer } from "../hooks/features/rowGrouping/useGridRowGrouping.js";
|
|
7
|
-
import { useGridRowGroupingPreProcessors } from "../hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js";
|
|
8
|
-
import { useGridDataSourceRowGroupingPreProcessors } from "../hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js";
|
|
9
|
-
import { useGridExcelExport } from "../hooks/features/export/useGridExcelExport.js";
|
|
10
|
-
import { cellSelectionStateInitializer, useGridCellSelection } from "../hooks/features/cellSelection/useGridCellSelection.js";
|
|
11
|
-
import { useGridClipboardImport } from "../hooks/features/clipboard/useGridClipboardImport.js";
|
|
12
|
-
export const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
13
|
-
const apiRef = useGridInitialization(inputApiRef, props);
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Register all pre-processors called during state initialization here.
|
|
17
|
-
*/
|
|
18
|
-
useGridRowSelectionPreProcessors(apiRef, props);
|
|
19
|
-
useGridRowReorderPreProcessors(apiRef, props);
|
|
20
|
-
useGridRowGroupingPreProcessors(apiRef, props);
|
|
21
|
-
useGridDataSourceRowGroupingPreProcessors(apiRef, props);
|
|
22
|
-
useGridTreeDataPreProcessors(apiRef, props);
|
|
23
|
-
useGridDataSourceTreeDataPreProcessors(apiRef, props);
|
|
24
|
-
useGridLazyLoaderPreProcessors(apiRef, props);
|
|
25
|
-
useGridRowPinningPreProcessors(apiRef);
|
|
26
|
-
useGridAggregationPreProcessors(apiRef, props);
|
|
27
|
-
useGridDetailPanelPreProcessors(apiRef, props);
|
|
28
|
-
// The column pinning `hydrateColumns` pre-processor must be after every other `hydrateColumns` pre-processors
|
|
29
|
-
// Because it changes the order of the columns.
|
|
30
|
-
useGridColumnPinningPreProcessors(apiRef, props);
|
|
31
|
-
useGridRowsPreProcessors(apiRef);
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Register all state initializers here.
|
|
35
|
-
*/
|
|
36
|
-
useGridInitializeState(propsStateInitializer, apiRef, props);
|
|
37
|
-
useGridInitializeState(headerFilteringStateInitializer, apiRef, props);
|
|
38
|
-
useGridInitializeState(rowGroupingStateInitializer, apiRef, props);
|
|
39
|
-
useGridInitializeState(aggregationStateInitializer, apiRef, props);
|
|
40
|
-
useGridInitializeState(rowSelectionStateInitializer, apiRef, props);
|
|
41
|
-
useGridInitializeState(cellSelectionStateInitializer, apiRef, props);
|
|
42
|
-
useGridInitializeState(detailPanelStateInitializer, apiRef, props);
|
|
43
|
-
useGridInitializeState(columnPinningStateInitializer, apiRef, props);
|
|
44
|
-
useGridInitializeState(columnsStateInitializer, apiRef, props);
|
|
45
|
-
useGridInitializeState(rowPinningStateInitializer, apiRef, props);
|
|
46
|
-
useGridInitializeState(rowsStateInitializer, apiRef, props);
|
|
47
|
-
useGridInitializeState(paginationStateInitializer, apiRef, props);
|
|
48
|
-
useGridInitializeState(editingStateInitializer, apiRef, props);
|
|
49
|
-
useGridInitializeState(focusStateInitializer, apiRef, props);
|
|
50
|
-
useGridInitializeState(sortingStateInitializer, apiRef, props);
|
|
51
|
-
useGridInitializeState(preferencePanelStateInitializer, apiRef, props);
|
|
52
|
-
useGridInitializeState(filterStateInitializer, apiRef, props);
|
|
53
|
-
useGridInitializeState(rowSpanningStateInitializer, apiRef, props);
|
|
54
|
-
useGridInitializeState(densityStateInitializer, apiRef, props);
|
|
55
|
-
useGridInitializeState(columnReorderStateInitializer, apiRef, props);
|
|
56
|
-
useGridInitializeState(columnResizeStateInitializer, apiRef, props);
|
|
57
|
-
useGridInitializeState(columnMenuStateInitializer, apiRef, props);
|
|
58
|
-
useGridInitializeState(columnGroupsStateInitializer, apiRef, props);
|
|
59
|
-
useGridInitializeState(virtualizationStateInitializer, apiRef, props);
|
|
60
|
-
useGridInitializeState(dataSourceStateInitializer, apiRef, props);
|
|
61
|
-
useGridInitializeState(dimensionsStateInitializer, apiRef, props);
|
|
62
|
-
useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
|
|
63
|
-
useGridInitializeState(listViewStateInitializer, apiRef, props);
|
|
64
|
-
useGridRowGrouping(apiRef, props);
|
|
65
|
-
useGridHeaderFiltering(apiRef, props);
|
|
66
|
-
useGridTreeData(apiRef, props);
|
|
67
|
-
useGridAggregation(apiRef, props);
|
|
68
|
-
useGridKeyboardNavigation(apiRef, props);
|
|
69
|
-
useGridRowSelection(apiRef, props);
|
|
70
|
-
useGridCellSelection(apiRef, props);
|
|
71
|
-
useGridColumnPinning(apiRef, props);
|
|
72
|
-
useGridRowPinning(apiRef, props);
|
|
73
|
-
useGridColumns(apiRef, props);
|
|
74
|
-
useGridRows(apiRef, props);
|
|
75
|
-
useGridRowSpanning(apiRef, props);
|
|
76
|
-
useGridParamsApi(apiRef, props);
|
|
77
|
-
useGridDetailPanel(apiRef, props);
|
|
78
|
-
useGridColumnSpanning(apiRef);
|
|
79
|
-
useGridColumnGrouping(apiRef, props);
|
|
80
|
-
useGridClipboardImport(apiRef, props);
|
|
81
|
-
useGridEditing(apiRef, props);
|
|
82
|
-
useGridFocus(apiRef, props);
|
|
83
|
-
useGridPreferencesPanel(apiRef, props);
|
|
84
|
-
useGridFilter(apiRef, props);
|
|
85
|
-
useGridSorting(apiRef, props);
|
|
86
|
-
useGridDensity(apiRef, props);
|
|
87
|
-
useGridColumnReorder(apiRef, props);
|
|
88
|
-
useGridColumnResize(apiRef, props);
|
|
89
|
-
useGridPagination(apiRef, props);
|
|
90
|
-
useGridRowsMeta(apiRef, props);
|
|
91
|
-
useGridRowReorder(apiRef, props);
|
|
92
|
-
useGridScroll(apiRef, props);
|
|
93
|
-
useGridInfiniteLoader(apiRef, props);
|
|
94
|
-
useGridLazyLoader(apiRef, props);
|
|
95
|
-
useGridDataSourceLazyLoader(apiRef, props);
|
|
96
|
-
useGridColumnMenu(apiRef);
|
|
97
|
-
useGridCsvExport(apiRef, props);
|
|
98
|
-
useGridPrintExport(apiRef, props);
|
|
99
|
-
useGridExcelExport(apiRef, props);
|
|
100
|
-
useGridClipboard(apiRef, props);
|
|
101
|
-
useGridDimensions(apiRef, props);
|
|
102
|
-
useGridEvents(apiRef, props);
|
|
103
|
-
useGridStatePersistence(apiRef);
|
|
104
|
-
useGridDataSource(apiRef, props);
|
|
105
|
-
useGridVirtualization(apiRef, props);
|
|
106
|
-
useGridListView(apiRef, props);
|
|
107
|
-
return apiRef;
|
|
108
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DataGridPremiumProps, DataGridPremiumProcessedProps, DataGridPremiumPropsWithDefaultValue } from "../models/dataGridPremiumProps.js";
|
|
2
|
-
/**
|
|
3
|
-
* The default values of `DataGridPremiumPropsWithDefaultValue` to inject in the props of DataGridPremium.
|
|
4
|
-
*/
|
|
5
|
-
export declare const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES: DataGridPremiumPropsWithDefaultValue;
|
|
6
|
-
export declare const useDataGridPremiumProps: (inProps: DataGridPremiumProps) => DataGridPremiumProcessedProps;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { useThemeProps } from '@mui/material/styles';
|
|
4
|
-
import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, GRID_DEFAULT_LOCALE_TEXT, GridSignature } from '@mui/x-data-grid-pro';
|
|
5
|
-
import { computeSlots } from '@mui/x-data-grid-pro/internals';
|
|
6
|
-
import { GRID_AGGREGATION_FUNCTIONS } from "../hooks/features/aggregation/index.js";
|
|
7
|
-
import { DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS } from "../constants/dataGridPremiumDefaultSlotsComponents.js";
|
|
8
|
-
const getDataGridPremiumForcedProps = themedProps => _extends({
|
|
9
|
-
signature: GridSignature.DataGridPremium
|
|
10
|
-
}, themedProps.dataSource ? {
|
|
11
|
-
filterMode: 'server',
|
|
12
|
-
sortingMode: 'server',
|
|
13
|
-
paginationMode: 'server'
|
|
14
|
-
} : {});
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The default values of `DataGridPremiumPropsWithDefaultValue` to inject in the props of DataGridPremium.
|
|
18
|
-
*/
|
|
19
|
-
export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO_PROPS_DEFAULT_VALUES, {
|
|
20
|
-
cellSelection: false,
|
|
21
|
-
disableAggregation: false,
|
|
22
|
-
disableRowGrouping: false,
|
|
23
|
-
rowGroupingColumnMode: 'single',
|
|
24
|
-
aggregationFunctions: GRID_AGGREGATION_FUNCTIONS,
|
|
25
|
-
aggregationRowsScope: 'filtered',
|
|
26
|
-
getAggregationPosition: groupNode => groupNode.depth === -1 ? 'footer' : 'inline',
|
|
27
|
-
disableClipboardPaste: false,
|
|
28
|
-
splitClipboardPastedText: pastedText => {
|
|
29
|
-
// Excel on Windows adds an empty line break at the end of the copied text.
|
|
30
|
-
// See https://github.com/mui/mui-x/issues/9103
|
|
31
|
-
const text = pastedText.replace(/\r?\n$/, '');
|
|
32
|
-
return text.split(/\r\n|\n|\r/).map(row => row.split('\t'));
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
const defaultSlots = DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS;
|
|
36
|
-
export const useDataGridPremiumProps = inProps => {
|
|
37
|
-
const themedProps =
|
|
38
|
-
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
39
|
-
useThemeProps({
|
|
40
|
-
props: inProps,
|
|
41
|
-
name: 'MuiDataGrid'
|
|
42
|
-
});
|
|
43
|
-
const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
|
44
|
-
const slots = React.useMemo(() => computeSlots({
|
|
45
|
-
defaultSlots,
|
|
46
|
-
slots: themedProps.slots
|
|
47
|
-
}), [themedProps.slots]);
|
|
48
|
-
return React.useMemo(() => _extends({}, DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES, themedProps.dataSource ? {
|
|
49
|
-
aggregationFunctions: {}
|
|
50
|
-
} : {}, themedProps, {
|
|
51
|
-
localeText,
|
|
52
|
-
slots
|
|
53
|
-
}, getDataGridPremiumForcedProps(themedProps)), [themedProps, localeText, slots]);
|
|
54
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { GridColumnHeaderParams } from '@mui/x-data-grid';
|
|
3
|
-
import { type GridBaseColDef } from '@mui/x-data-grid/internals';
|
|
4
|
-
declare function GridAggregationHeader(props: GridColumnHeaderParams & {
|
|
5
|
-
renderHeader: GridBaseColDef['renderHeader'];
|
|
6
|
-
}): React.JSX.Element | null;
|
|
7
|
-
export { GridAggregationHeader };
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["renderHeader"];
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import composeClasses from '@mui/utils/composeClasses';
|
|
6
|
-
import { styled } from '@mui/material/styles';
|
|
7
|
-
import { getDataGridUtilityClass, gridClasses, GridColumnHeaderTitle } from '@mui/x-data-grid';
|
|
8
|
-
import { vars } from '@mui/x-data-grid/internals';
|
|
9
|
-
import { getAggregationFunctionLabel } from "../hooks/features/aggregation/gridAggregationUtils.js";
|
|
10
|
-
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
11
|
-
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
const GridAggregationHeaderRoot = styled('div', {
|
|
14
|
-
name: 'MuiDataGrid',
|
|
15
|
-
slot: 'AggregationColumnHeader',
|
|
16
|
-
overridesResolver: (props, styles) => {
|
|
17
|
-
const {
|
|
18
|
-
ownerState
|
|
19
|
-
} = props;
|
|
20
|
-
return [styles.aggregationColumnHeader, ownerState.colDef.headerAlign === 'left' && styles['aggregationColumnHeader--alignLeft'], ownerState.colDef.headerAlign === 'center' && styles['aggregationColumnHeader--alignCenter'], ownerState.colDef.headerAlign === 'right' && styles['aggregationColumnHeader--alignRight']];
|
|
21
|
-
}
|
|
22
|
-
})({
|
|
23
|
-
display: 'flex',
|
|
24
|
-
flexDirection: 'column',
|
|
25
|
-
[`&.${gridClasses['aggregationColumnHeader--alignRight']}`]: {
|
|
26
|
-
alignItems: 'flex-end'
|
|
27
|
-
},
|
|
28
|
-
[`&.${gridClasses['aggregationColumnHeader--alignCenter']}`]: {
|
|
29
|
-
alignItems: 'center'
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
const GridAggregationFunctionLabel = styled('div', {
|
|
33
|
-
name: 'MuiDataGrid',
|
|
34
|
-
slot: 'AggregationColumnHeaderLabel'
|
|
35
|
-
})({
|
|
36
|
-
font: vars.typography.font.small,
|
|
37
|
-
lineHeight: 'normal',
|
|
38
|
-
color: vars.colors.foreground.muted,
|
|
39
|
-
marginTop: -1
|
|
40
|
-
});
|
|
41
|
-
const useUtilityClasses = ownerState => {
|
|
42
|
-
const {
|
|
43
|
-
classes,
|
|
44
|
-
colDef
|
|
45
|
-
} = ownerState;
|
|
46
|
-
const slots = {
|
|
47
|
-
root: ['aggregationColumnHeader', colDef.headerAlign === 'left' && 'aggregationColumnHeader--alignLeft', colDef.headerAlign === 'center' && 'aggregationColumnHeader--alignCenter', colDef.headerAlign === 'right' && 'aggregationColumnHeader--alignRight'],
|
|
48
|
-
aggregationLabel: ['aggregationColumnHeaderLabel']
|
|
49
|
-
};
|
|
50
|
-
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
51
|
-
};
|
|
52
|
-
function GridAggregationHeader(props) {
|
|
53
|
-
const {
|
|
54
|
-
renderHeader
|
|
55
|
-
} = props,
|
|
56
|
-
params = _objectWithoutPropertiesLoose(props, _excluded);
|
|
57
|
-
const {
|
|
58
|
-
colDef,
|
|
59
|
-
aggregation
|
|
60
|
-
} = params;
|
|
61
|
-
const apiRef = useGridApiContext();
|
|
62
|
-
const rootProps = useGridRootProps();
|
|
63
|
-
const ownerState = _extends({}, rootProps, {
|
|
64
|
-
classes: rootProps.classes,
|
|
65
|
-
colDef
|
|
66
|
-
});
|
|
67
|
-
const classes = useUtilityClasses(ownerState);
|
|
68
|
-
if (!aggregation) {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
const aggregationLabel = getAggregationFunctionLabel({
|
|
72
|
-
apiRef,
|
|
73
|
-
aggregationRule: aggregation.aggregationRule
|
|
74
|
-
});
|
|
75
|
-
return /*#__PURE__*/_jsxs(GridAggregationHeaderRoot, {
|
|
76
|
-
ownerState: ownerState,
|
|
77
|
-
className: classes.root,
|
|
78
|
-
children: [renderHeader ? renderHeader(params) : /*#__PURE__*/_jsx(GridColumnHeaderTitle, {
|
|
79
|
-
label: colDef.headerName ?? colDef.field,
|
|
80
|
-
description: colDef.description,
|
|
81
|
-
columnWidth: colDef.computedWidth
|
|
82
|
-
}), /*#__PURE__*/_jsx(GridAggregationFunctionLabel, {
|
|
83
|
-
ownerState: ownerState,
|
|
84
|
-
className: classes.aggregationLabel,
|
|
85
|
-
children: aggregationLabel
|
|
86
|
-
})]
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
export { GridAggregationHeader };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare const GridAggregationRowOverlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement>> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
-
export { GridAggregationRowOverlay };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
4
|
-
import composeClasses from '@mui/utils/composeClasses';
|
|
5
|
-
import { getDataGridUtilityClass, useGridRootProps } from '@mui/x-data-grid-pro';
|
|
6
|
-
import { GridSkeletonLoadingOverlayInner, useGridSelector } from '@mui/x-data-grid-pro/internals';
|
|
7
|
-
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
8
|
-
import { gridAggregationModelSelector } from "../hooks/features/aggregation/gridAggregationSelectors.js";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
const useUtilityClasses = ownerState => {
|
|
11
|
-
const {
|
|
12
|
-
classes
|
|
13
|
-
} = ownerState;
|
|
14
|
-
const slots = {
|
|
15
|
-
root: ['aggregationRowOverlayWrapper']
|
|
16
|
-
};
|
|
17
|
-
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
18
|
-
};
|
|
19
|
-
const GridAggregationRowOverlay = forwardRef(function GridAggregationRowOverlay(props, forwardedRef) {
|
|
20
|
-
const apiRef = useGridApiContext();
|
|
21
|
-
const rootProps = useGridRootProps();
|
|
22
|
-
const classes = useUtilityClasses({
|
|
23
|
-
classes: rootProps.classes
|
|
24
|
-
});
|
|
25
|
-
const aggregationModel = useGridSelector(apiRef, gridAggregationModelSelector);
|
|
26
|
-
const visibleColumns = new Set(Object.keys(aggregationModel));
|
|
27
|
-
return /*#__PURE__*/_jsx("div", {
|
|
28
|
-
className: classes.root,
|
|
29
|
-
children: /*#__PURE__*/_jsx(GridSkeletonLoadingOverlayInner, _extends({}, props, {
|
|
30
|
-
skeletonRowsCount: 1,
|
|
31
|
-
visibleColumns: visibleColumns,
|
|
32
|
-
showFirstRowBorder: true,
|
|
33
|
-
ref: forwardedRef
|
|
34
|
-
}))
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
export { GridAggregationRowOverlay };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["children"];
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import { styled } from '@mui/system';
|
|
7
|
-
import composeClasses from '@mui/utils/composeClasses';
|
|
8
|
-
import { gridClasses, getDataGridUtilityClass, useGridSelector, gridRowsLoadingSelector, gridRowTreeSelector, GRID_ROOT_GROUP_ID } from '@mui/x-data-grid-pro';
|
|
9
|
-
import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
|
|
10
|
-
import { GridAggregationRowOverlay } from "./GridAggregationRowOverlay.js";
|
|
11
|
-
import { useGridRootProps } from "../typeOverloads/reexports.js";
|
|
12
|
-
import { gridAggregationModelSelector } from "../hooks/index.js";
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
const useUtilityClasses = () => {
|
|
15
|
-
const slots = {
|
|
16
|
-
root: ['bottomContainer']
|
|
17
|
-
};
|
|
18
|
-
return composeClasses(slots, getDataGridUtilityClass, {});
|
|
19
|
-
};
|
|
20
|
-
const Element = styled('div')({
|
|
21
|
-
position: 'sticky',
|
|
22
|
-
zIndex: 40,
|
|
23
|
-
bottom: 'calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))'
|
|
24
|
-
});
|
|
25
|
-
export function GridBottomContainer(props) {
|
|
26
|
-
const classes = useUtilityClasses();
|
|
27
|
-
const rootProps = useGridRootProps();
|
|
28
|
-
const apiRef = useGridPrivateApiContext();
|
|
29
|
-
const isLoading = useGridSelector(apiRef, gridRowsLoadingSelector);
|
|
30
|
-
const tree = useGridSelector(apiRef, gridRowTreeSelector);
|
|
31
|
-
const aggregationModel = useGridSelector(apiRef, gridAggregationModelSelector);
|
|
32
|
-
const aggregationPosition = rootProps.getAggregationPosition(tree[GRID_ROOT_GROUP_ID]);
|
|
33
|
-
const hasAggregation = React.useMemo(() => Object.keys(aggregationModel).length > 0, [aggregationModel]);
|
|
34
|
-
const {
|
|
35
|
-
children
|
|
36
|
-
} = props,
|
|
37
|
-
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
38
|
-
return /*#__PURE__*/_jsx(Element, _extends({}, other, {
|
|
39
|
-
className: clsx(classes.root, gridClasses['container--bottom']),
|
|
40
|
-
role: "presentation",
|
|
41
|
-
children: hasAggregation && isLoading && aggregationPosition === 'footer' ? /*#__PURE__*/_jsx(GridAggregationRowOverlay, {}) : children
|
|
42
|
-
}));
|
|
43
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
|
-
declare function GridColumnMenuAggregationItem(props: GridColumnMenuItemProps): React.JSX.Element;
|
|
4
|
-
declare namespace GridColumnMenuAggregationItem {
|
|
5
|
-
var propTypes: any;
|
|
6
|
-
}
|
|
7
|
-
export { GridColumnMenuAggregationItem };
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
-
const _excluded = ["native"];
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import { useGridSelector } from '@mui/x-data-grid-pro';
|
|
8
|
-
import { unstable_useId as useId } from '@mui/utils';
|
|
9
|
-
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
10
|
-
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
11
|
-
import { canColumnHaveAggregationFunction, getAggregationFunctionLabel, getAvailableAggregationFunctions } from "../hooks/features/aggregation/gridAggregationUtils.js";
|
|
12
|
-
import { gridAggregationModelSelector } from "../hooks/features/aggregation/gridAggregationSelectors.js";
|
|
13
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
import { createElement as _createElement } from "react";
|
|
15
|
-
function GridColumnMenuAggregationItem(props) {
|
|
16
|
-
const {
|
|
17
|
-
colDef
|
|
18
|
-
} = props;
|
|
19
|
-
const apiRef = useGridApiContext();
|
|
20
|
-
const inputRef = React.useRef(null);
|
|
21
|
-
const rootProps = useGridRootProps();
|
|
22
|
-
const id = useId();
|
|
23
|
-
const aggregationModel = useGridSelector(apiRef, gridAggregationModelSelector);
|
|
24
|
-
const availableAggregationFunctions = React.useMemo(() => getAvailableAggregationFunctions({
|
|
25
|
-
aggregationFunctions: rootProps.aggregationFunctions,
|
|
26
|
-
colDef,
|
|
27
|
-
isDataSource: !!rootProps.dataSource
|
|
28
|
-
}), [colDef, rootProps.aggregationFunctions, rootProps.dataSource]);
|
|
29
|
-
const _ref = rootProps.slotProps?.baseSelect || {},
|
|
30
|
-
{
|
|
31
|
-
native: isBaseSelectNative = false
|
|
32
|
-
} = _ref,
|
|
33
|
-
baseSelectProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
34
|
-
const baseSelectOptionProps = rootProps.slotProps?.baseSelectOption || {};
|
|
35
|
-
const selectedAggregationRule = React.useMemo(() => {
|
|
36
|
-
if (!colDef || !aggregationModel[colDef.field]) {
|
|
37
|
-
return '';
|
|
38
|
-
}
|
|
39
|
-
const aggregationFunctionName = aggregationModel[colDef.field];
|
|
40
|
-
if (canColumnHaveAggregationFunction({
|
|
41
|
-
colDef,
|
|
42
|
-
aggregationFunctionName,
|
|
43
|
-
aggregationFunction: rootProps.aggregationFunctions[aggregationFunctionName],
|
|
44
|
-
isDataSource: !!rootProps.dataSource
|
|
45
|
-
})) {
|
|
46
|
-
return aggregationFunctionName;
|
|
47
|
-
}
|
|
48
|
-
return '';
|
|
49
|
-
}, [rootProps.aggregationFunctions, rootProps.dataSource, aggregationModel, colDef]);
|
|
50
|
-
const handleAggregationItemChange = event => {
|
|
51
|
-
const newAggregationItem = event.target?.value || undefined;
|
|
52
|
-
const currentModel = gridAggregationModelSelector(apiRef);
|
|
53
|
-
const _colDef$field = colDef.field,
|
|
54
|
-
otherColumnItems = _objectWithoutPropertiesLoose(currentModel, [_colDef$field].map(_toPropertyKey));
|
|
55
|
-
const newModel = newAggregationItem == null ? otherColumnItems : _extends({}, otherColumnItems, {
|
|
56
|
-
[colDef?.field]: newAggregationItem
|
|
57
|
-
});
|
|
58
|
-
apiRef.current.setAggregationModel(newModel);
|
|
59
|
-
apiRef.current.hideColumnMenu();
|
|
60
|
-
};
|
|
61
|
-
const label = apiRef.current.getLocaleText('aggregationMenuItemHeader');
|
|
62
|
-
const handleMenuItemKeyDown = React.useCallback(event => {
|
|
63
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
64
|
-
inputRef.current.focus();
|
|
65
|
-
}
|
|
66
|
-
}, []);
|
|
67
|
-
const handleSelectKeyDown = React.useCallback(event => {
|
|
68
|
-
if (event.key === 'ArrowDown' || event.key === 'ArrowUp' || event.key === ' ') {
|
|
69
|
-
event.stopPropagation();
|
|
70
|
-
}
|
|
71
|
-
}, []);
|
|
72
|
-
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
73
|
-
inert: true,
|
|
74
|
-
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuAggregationIcon, {
|
|
75
|
-
fontSize: "small"
|
|
76
|
-
}),
|
|
77
|
-
onKeyDown: handleMenuItemKeyDown,
|
|
78
|
-
children: /*#__PURE__*/_jsxs(rootProps.slots.baseSelect, _extends({
|
|
79
|
-
labelId: `${id}-label`,
|
|
80
|
-
id: `${id}-input`,
|
|
81
|
-
value: selectedAggregationRule,
|
|
82
|
-
label: label,
|
|
83
|
-
onChange: handleAggregationItemChange,
|
|
84
|
-
onKeyDown: handleSelectKeyDown,
|
|
85
|
-
onBlur: event => event.stopPropagation(),
|
|
86
|
-
native: isBaseSelectNative,
|
|
87
|
-
fullWidth: true,
|
|
88
|
-
size: "small",
|
|
89
|
-
style: {
|
|
90
|
-
minWidth: 150
|
|
91
|
-
},
|
|
92
|
-
slotProps: {
|
|
93
|
-
htmlInput: {
|
|
94
|
-
ref: inputRef
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}, baseSelectProps, {
|
|
98
|
-
children: [/*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
|
99
|
-
native: isBaseSelectNative,
|
|
100
|
-
value: "",
|
|
101
|
-
children: "..."
|
|
102
|
-
})), availableAggregationFunctions.map(aggFunc => /*#__PURE__*/_createElement(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
|
103
|
-
key: aggFunc,
|
|
104
|
-
value: aggFunc,
|
|
105
|
-
native: isBaseSelectNative
|
|
106
|
-
}), getAggregationFunctionLabel({
|
|
107
|
-
apiRef,
|
|
108
|
-
aggregationRule: {
|
|
109
|
-
aggregationFunctionName: aggFunc,
|
|
110
|
-
aggregationFunction: rootProps.aggregationFunctions[aggFunc]
|
|
111
|
-
}
|
|
112
|
-
})))]
|
|
113
|
-
}))
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
process.env.NODE_ENV !== "production" ? GridColumnMenuAggregationItem.propTypes = {
|
|
117
|
-
// ----------------------------- Warning --------------------------------
|
|
118
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
119
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
120
|
-
// ----------------------------------------------------------------------
|
|
121
|
-
colDef: PropTypes.object.isRequired,
|
|
122
|
-
onClick: PropTypes.func.isRequired
|
|
123
|
-
} : void 0;
|
|
124
|
-
export { GridColumnMenuAggregationItem };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { useGridSelector, gridColumnLookupSelector } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
4
|
-
import { gridRowGroupingSanitizedModelSelector } from "../hooks/features/rowGrouping/gridRowGroupingSelector.js";
|
|
5
|
-
import { getRowGroupingCriteriaFromGroupingField, GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, isGroupingColumn } from "../hooks/features/rowGrouping/gridRowGroupingUtils.js";
|
|
6
|
-
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
export function GridColumnMenuRowGroupItem(props) {
|
|
9
|
-
const {
|
|
10
|
-
colDef,
|
|
11
|
-
onClick
|
|
12
|
-
} = props;
|
|
13
|
-
const apiRef = useGridApiContext();
|
|
14
|
-
const rowGroupingModel = useGridSelector(apiRef, gridRowGroupingSanitizedModelSelector);
|
|
15
|
-
const columnsLookup = useGridSelector(apiRef, gridColumnLookupSelector);
|
|
16
|
-
const rootProps = useGridRootProps();
|
|
17
|
-
const renderUnGroupingMenuItem = field => {
|
|
18
|
-
const ungroupColumn = event => {
|
|
19
|
-
apiRef.current.removeRowGroupingCriteria(field);
|
|
20
|
-
onClick(event);
|
|
21
|
-
};
|
|
22
|
-
const groupedColumn = columnsLookup[field];
|
|
23
|
-
const name = groupedColumn.headerName ?? field;
|
|
24
|
-
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
25
|
-
onClick: ungroupColumn,
|
|
26
|
-
disabled: !groupedColumn.groupable,
|
|
27
|
-
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuUngroupIcon, {
|
|
28
|
-
fontSize: "small"
|
|
29
|
-
}),
|
|
30
|
-
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
31
|
-
}, field);
|
|
32
|
-
};
|
|
33
|
-
if (!colDef || !isGroupingColumn(colDef.field)) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
if (colDef.field === GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD) {
|
|
37
|
-
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
38
|
-
children: rowGroupingModel.map(renderUnGroupingMenuItem)
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
return renderUnGroupingMenuItem(getRowGroupingCriteriaFromGroupingField(colDef.field));
|
|
42
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { gridColumnLookupSelector, useGridSelector } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
4
|
-
import { gridRowGroupingSanitizedModelSelector } from "../hooks/features/rowGrouping/gridRowGroupingSelector.js";
|
|
5
|
-
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export function GridColumnMenuRowUngroupItem(props) {
|
|
8
|
-
const {
|
|
9
|
-
colDef,
|
|
10
|
-
onClick
|
|
11
|
-
} = props;
|
|
12
|
-
const apiRef = useGridApiContext();
|
|
13
|
-
const rowGroupingModel = useGridSelector(apiRef, gridRowGroupingSanitizedModelSelector);
|
|
14
|
-
const columnsLookup = useGridSelector(apiRef, gridColumnLookupSelector);
|
|
15
|
-
const rootProps = useGridRootProps();
|
|
16
|
-
if (!colDef.groupable) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
const ungroupColumn = event => {
|
|
20
|
-
apiRef.current.removeRowGroupingCriteria(colDef.field);
|
|
21
|
-
onClick(event);
|
|
22
|
-
};
|
|
23
|
-
const groupColumn = event => {
|
|
24
|
-
apiRef.current.addRowGroupingCriteria(colDef.field);
|
|
25
|
-
onClick(event);
|
|
26
|
-
};
|
|
27
|
-
const name = columnsLookup[colDef.field].headerName ?? colDef.field;
|
|
28
|
-
if (rowGroupingModel.includes(colDef.field)) {
|
|
29
|
-
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
30
|
-
onClick: ungroupColumn,
|
|
31
|
-
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuUngroupIcon, {
|
|
32
|
-
fontSize: "small"
|
|
33
|
-
}),
|
|
34
|
-
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
38
|
-
onClick: groupColumn,
|
|
39
|
-
iconStart: /*#__PURE__*/_jsx(rootProps.slots.columnMenuGroupIcon, {
|
|
40
|
-
fontSize: "small"
|
|
41
|
-
}),
|
|
42
|
-
children: apiRef.current.getLocaleText('groupColumn')(name)
|
|
43
|
-
});
|
|
44
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { GridRenderCellParams, GridGroupNode } from '@mui/x-data-grid-pro';
|
|
3
|
-
interface GridGroupingCriteriaCellProps extends GridRenderCellParams<any, any, any, GridGroupNode> {
|
|
4
|
-
hideDescendantCount?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare function GridDataSourceGroupingCriteriaCell(props: GridGroupingCriteriaCellProps): React.JSX.Element;
|
|
7
|
-
export {};
|