@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,103 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { gridColumnLookupSelector, useGridApiEventHandler, useGridApiMethod } from '@mui/x-data-grid-pro';
|
|
4
|
-
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
5
|
-
import { gridAggregationModelSelector } from "./gridAggregationSelectors.js";
|
|
6
|
-
import { getAggregationRules, mergeStateWithAggregationModel, areAggregationRulesEqual } from "./gridAggregationUtils.js";
|
|
7
|
-
import { createAggregationLookup } from "./createAggregationLookup.js";
|
|
8
|
-
export const aggregationStateInitializer = (state, props, apiRef) => {
|
|
9
|
-
apiRef.current.caches.aggregation = {
|
|
10
|
-
rulesOnLastColumnHydration: {},
|
|
11
|
-
rulesOnLastRowHydration: {}
|
|
12
|
-
};
|
|
13
|
-
return _extends({}, state, {
|
|
14
|
-
aggregation: {
|
|
15
|
-
model: props.aggregationModel ?? props.initialState?.aggregation?.model ?? {}
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
export const useGridAggregation = (apiRef, props) => {
|
|
20
|
-
apiRef.current.registerControlState({
|
|
21
|
-
stateId: 'aggregation',
|
|
22
|
-
propModel: props.aggregationModel,
|
|
23
|
-
propOnChange: props.onAggregationModelChange,
|
|
24
|
-
stateSelector: gridAggregationModelSelector,
|
|
25
|
-
changeEvent: 'aggregationModelChange'
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* API METHODS
|
|
30
|
-
*/
|
|
31
|
-
const setAggregationModel = React.useCallback(model => {
|
|
32
|
-
const currentModel = gridAggregationModelSelector(apiRef);
|
|
33
|
-
if (currentModel !== model) {
|
|
34
|
-
apiRef.current.setState(mergeStateWithAggregationModel(model));
|
|
35
|
-
}
|
|
36
|
-
}, [apiRef]);
|
|
37
|
-
const applyAggregation = React.useCallback(() => {
|
|
38
|
-
const aggregationLookup = createAggregationLookup({
|
|
39
|
-
apiRef,
|
|
40
|
-
getAggregationPosition: props.getAggregationPosition,
|
|
41
|
-
aggregationFunctions: props.aggregationFunctions,
|
|
42
|
-
aggregationRowsScope: props.aggregationRowsScope,
|
|
43
|
-
isDataSource: !!props.dataSource
|
|
44
|
-
});
|
|
45
|
-
apiRef.current.setState(state => _extends({}, state, {
|
|
46
|
-
aggregation: _extends({}, state.aggregation, {
|
|
47
|
-
lookup: aggregationLookup
|
|
48
|
-
})
|
|
49
|
-
}));
|
|
50
|
-
}, [apiRef, props.getAggregationPosition, props.aggregationFunctions, props.aggregationRowsScope, props.dataSource]);
|
|
51
|
-
const aggregationApi = {
|
|
52
|
-
setAggregationModel
|
|
53
|
-
};
|
|
54
|
-
const aggregationPrivateApi = {
|
|
55
|
-
applyAggregation
|
|
56
|
-
};
|
|
57
|
-
useGridApiMethod(apiRef, aggregationApi, 'public');
|
|
58
|
-
useGridApiMethod(apiRef, aggregationPrivateApi, 'private');
|
|
59
|
-
const addGetRowsParams = React.useCallback(params => {
|
|
60
|
-
return _extends({}, params, {
|
|
61
|
-
aggregationModel: gridAggregationModelSelector(apiRef)
|
|
62
|
-
});
|
|
63
|
-
}, [apiRef]);
|
|
64
|
-
useGridRegisterPipeProcessor(apiRef, 'getRowsParams', addGetRowsParams);
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* EVENTS
|
|
68
|
-
*/
|
|
69
|
-
const checkAggregationRulesDiff = React.useCallback(() => {
|
|
70
|
-
const {
|
|
71
|
-
rulesOnLastRowHydration,
|
|
72
|
-
rulesOnLastColumnHydration
|
|
73
|
-
} = apiRef.current.caches.aggregation;
|
|
74
|
-
const aggregationRules = props.disableAggregation ? {} : getAggregationRules(gridColumnLookupSelector(apiRef), gridAggregationModelSelector(apiRef), props.aggregationFunctions, !!props.dataSource);
|
|
75
|
-
|
|
76
|
-
// Re-apply the row hydration to add / remove the aggregation footers
|
|
77
|
-
if (!areAggregationRulesEqual(rulesOnLastRowHydration, aggregationRules)) {
|
|
78
|
-
if (props.dataSource) {
|
|
79
|
-
apiRef.current.dataSource.fetchRows();
|
|
80
|
-
} else {
|
|
81
|
-
apiRef.current.requestPipeProcessorsApplication('hydrateRows');
|
|
82
|
-
applyAggregation();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Re-apply the column hydration to wrap / unwrap the aggregated columns
|
|
87
|
-
if (!areAggregationRulesEqual(rulesOnLastColumnHydration, aggregationRules)) {
|
|
88
|
-
apiRef.current.requestPipeProcessorsApplication('hydrateColumns');
|
|
89
|
-
}
|
|
90
|
-
}, [apiRef, applyAggregation, props.aggregationFunctions, props.disableAggregation, props.dataSource]);
|
|
91
|
-
useGridApiEventHandler(apiRef, 'aggregationModelChange', checkAggregationRulesDiff);
|
|
92
|
-
useGridApiEventHandler(apiRef, 'columnsChange', checkAggregationRulesDiff);
|
|
93
|
-
useGridApiEventHandler(apiRef, 'filteredRowsSet', applyAggregation);
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* EFFECTS
|
|
97
|
-
*/
|
|
98
|
-
React.useEffect(() => {
|
|
99
|
-
if (props.aggregationModel !== undefined) {
|
|
100
|
-
apiRef.current.setAggregationModel(props.aggregationModel);
|
|
101
|
-
}
|
|
102
|
-
}, [apiRef, props.aggregationModel]);
|
|
103
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
3
|
-
import { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
|
|
4
|
-
export declare const useGridAggregationPreProcessors: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "aggregationFunctions" | "disableAggregation" | "getAggregationPosition" | "slotProps" | "slots" | "dataSource">) => void;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { gridColumnLookupSelector } from '@mui/x-data-grid-pro';
|
|
4
|
-
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
5
|
-
import { getAvailableAggregationFunctions, addFooterRows, getAggregationRules, mergeStateWithAggregationModel } from "./gridAggregationUtils.js";
|
|
6
|
-
import { wrapColumnWithAggregationValue, unwrapColumnFromAggregation } from "./wrapColumnWithAggregation.js";
|
|
7
|
-
import { gridAggregationModelSelector } from "./gridAggregationSelectors.js";
|
|
8
|
-
export const useGridAggregationPreProcessors = (apiRef, props) => {
|
|
9
|
-
// apiRef.current.caches.aggregation.rulesOnLastColumnHydration is not used because by the time
|
|
10
|
-
// that the pre-processor is called it will already have been updated with the current rules.
|
|
11
|
-
const rulesOnLastColumnHydration = React.useRef({});
|
|
12
|
-
const updateAggregatedColumns = React.useCallback(columnsState => {
|
|
13
|
-
const aggregationRules = props.disableAggregation ? {} : getAggregationRules(columnsState.lookup, gridAggregationModelSelector(apiRef), props.aggregationFunctions, !!props.dataSource);
|
|
14
|
-
columnsState.orderedFields.forEach(field => {
|
|
15
|
-
const shouldHaveAggregationValue = !!aggregationRules[field];
|
|
16
|
-
const haveAggregationColumnValue = !!rulesOnLastColumnHydration.current[field];
|
|
17
|
-
let column = columnsState.lookup[field];
|
|
18
|
-
if (haveAggregationColumnValue) {
|
|
19
|
-
column = unwrapColumnFromAggregation({
|
|
20
|
-
column
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
if (shouldHaveAggregationValue) {
|
|
24
|
-
column = wrapColumnWithAggregationValue({
|
|
25
|
-
column,
|
|
26
|
-
aggregationRule: aggregationRules[field],
|
|
27
|
-
apiRef
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
columnsState.lookup[field] = column;
|
|
31
|
-
});
|
|
32
|
-
rulesOnLastColumnHydration.current = aggregationRules;
|
|
33
|
-
apiRef.current.caches.aggregation.rulesOnLastColumnHydration = aggregationRules;
|
|
34
|
-
return columnsState;
|
|
35
|
-
}, [apiRef, props.aggregationFunctions, props.disableAggregation, props.dataSource]);
|
|
36
|
-
const addGroupFooterRows = React.useCallback(value => {
|
|
37
|
-
const aggregationRules = props.disableAggregation ? {} : getAggregationRules(gridColumnLookupSelector(apiRef), gridAggregationModelSelector(apiRef), props.aggregationFunctions, !!props.dataSource);
|
|
38
|
-
const hasAggregationRule = Object.keys(aggregationRules).length > 0;
|
|
39
|
-
|
|
40
|
-
// If we did not have any aggregation footer before, and we still don't have any,
|
|
41
|
-
// Then we can skip this step
|
|
42
|
-
if (Object.keys(apiRef.current.caches.aggregation.rulesOnLastRowHydration).length === 0 && !hasAggregationRule) {
|
|
43
|
-
return value;
|
|
44
|
-
}
|
|
45
|
-
apiRef.current.caches.aggregation.rulesOnLastRowHydration = aggregationRules;
|
|
46
|
-
return addFooterRows({
|
|
47
|
-
apiRef,
|
|
48
|
-
groupingParams: value,
|
|
49
|
-
getAggregationPosition: props.getAggregationPosition,
|
|
50
|
-
hasAggregationRule
|
|
51
|
-
});
|
|
52
|
-
}, [apiRef, props.disableAggregation, props.getAggregationPosition, props.aggregationFunctions, props.dataSource]);
|
|
53
|
-
const addColumnMenuButtons = React.useCallback((columnMenuItems, colDef) => {
|
|
54
|
-
if (props.disableAggregation || !colDef.aggregable) {
|
|
55
|
-
return columnMenuItems;
|
|
56
|
-
}
|
|
57
|
-
const availableAggregationFunctions = getAvailableAggregationFunctions({
|
|
58
|
-
aggregationFunctions: props.aggregationFunctions,
|
|
59
|
-
colDef,
|
|
60
|
-
isDataSource: !!props.dataSource
|
|
61
|
-
});
|
|
62
|
-
if (availableAggregationFunctions.length === 0) {
|
|
63
|
-
return columnMenuItems;
|
|
64
|
-
}
|
|
65
|
-
return [...columnMenuItems, 'columnMenuAggregationItem'];
|
|
66
|
-
}, [props.aggregationFunctions, props.disableAggregation, props.dataSource]);
|
|
67
|
-
const stateExportPreProcessing = React.useCallback(prevState => {
|
|
68
|
-
if (props.disableAggregation) {
|
|
69
|
-
return prevState;
|
|
70
|
-
}
|
|
71
|
-
const aggregationModelToExport = gridAggregationModelSelector(apiRef);
|
|
72
|
-
if (Object.values(aggregationModelToExport).length === 0) {
|
|
73
|
-
return prevState;
|
|
74
|
-
}
|
|
75
|
-
return _extends({}, prevState, {
|
|
76
|
-
aggregation: {
|
|
77
|
-
model: aggregationModelToExport
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}, [apiRef, props.disableAggregation]);
|
|
81
|
-
const stateRestorePreProcessing = React.useCallback((params, context) => {
|
|
82
|
-
if (props.disableAggregation) {
|
|
83
|
-
return params;
|
|
84
|
-
}
|
|
85
|
-
const aggregationModel = context.stateToRestore.aggregation?.model;
|
|
86
|
-
if (aggregationModel != null) {
|
|
87
|
-
apiRef.current.setState(mergeStateWithAggregationModel(aggregationModel));
|
|
88
|
-
}
|
|
89
|
-
return params;
|
|
90
|
-
}, [apiRef, props.disableAggregation]);
|
|
91
|
-
useGridRegisterPipeProcessor(apiRef, 'hydrateColumns', updateAggregatedColumns);
|
|
92
|
-
useGridRegisterPipeProcessor(apiRef, 'hydrateRows', addGroupFooterRows);
|
|
93
|
-
useGridRegisterPipeProcessor(apiRef, 'columnMenu', addColumnMenuButtons);
|
|
94
|
-
useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);
|
|
95
|
-
useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);
|
|
96
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { RefObject } from '@mui/x-internals/types';
|
|
3
|
-
import { GridColDef, GridFilterOperator } from '@mui/x-data-grid-pro';
|
|
4
|
-
import { type GridBaseColDef } from '@mui/x-data-grid-pro/internals';
|
|
5
|
-
import { GridApiPremium } from "../../../models/gridApiPremium.js";
|
|
6
|
-
import type { GridAggregationRule } from './gridAggregationInterfaces';
|
|
7
|
-
type WrappableColumnProperty = 'valueGetter' | 'valueFormatter' | 'renderCell' | 'renderHeader' | 'filterOperators';
|
|
8
|
-
interface GridColDefWithAggregationWrappers extends GridBaseColDef {
|
|
9
|
-
aggregationWrappedProperties: {
|
|
10
|
-
name: WrappableColumnProperty;
|
|
11
|
-
originalValue: GridBaseColDef[WrappableColumnProperty];
|
|
12
|
-
wrappedValue: GridBaseColDef[WrappableColumnProperty];
|
|
13
|
-
}[];
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Add a wrapper around each wrappable property of the column to customize the behavior of the aggregation cells.
|
|
17
|
-
*/
|
|
18
|
-
export declare const wrapColumnWithAggregationValue: ({
|
|
19
|
-
column,
|
|
20
|
-
apiRef,
|
|
21
|
-
aggregationRule
|
|
22
|
-
}: {
|
|
23
|
-
column: GridBaseColDef;
|
|
24
|
-
apiRef: RefObject<GridApiPremium>;
|
|
25
|
-
aggregationRule: GridAggregationRule;
|
|
26
|
-
}) => GridBaseColDef;
|
|
27
|
-
/**
|
|
28
|
-
* Remove the aggregation wrappers around the wrappable properties of the column.
|
|
29
|
-
*/
|
|
30
|
-
export declare const unwrapColumnFromAggregation: ({
|
|
31
|
-
column
|
|
32
|
-
}: {
|
|
33
|
-
column: GridColDef | GridColDefWithAggregationWrappers;
|
|
34
|
-
}) => GridBaseColDef<any, any, any> | {
|
|
35
|
-
field: string;
|
|
36
|
-
headerName?: string;
|
|
37
|
-
description?: string;
|
|
38
|
-
width?: number;
|
|
39
|
-
flex?: number;
|
|
40
|
-
minWidth?: number;
|
|
41
|
-
maxWidth?: number;
|
|
42
|
-
hideable?: boolean;
|
|
43
|
-
sortable?: boolean;
|
|
44
|
-
sortingOrder?: readonly import("@mui/x-data-grid").GridSortDirection[];
|
|
45
|
-
resizable?: boolean;
|
|
46
|
-
editable?: boolean;
|
|
47
|
-
groupable?: boolean;
|
|
48
|
-
pinnable?: boolean;
|
|
49
|
-
sortComparator?: import("@mui/x-data-grid").GridComparatorFn<any> | undefined;
|
|
50
|
-
getSortComparator?: ((sortDirection: import("@mui/x-data-grid").GridSortDirection) => import("@mui/x-data-grid").GridComparatorFn<any> | undefined) | undefined;
|
|
51
|
-
type?: import("@mui/x-data-grid").GridColType;
|
|
52
|
-
align?: import("@mui/x-data-grid").GridAlignment;
|
|
53
|
-
valueGetter?: import("@mui/x-data-grid").GridValueGetter<import("@mui/x-data-grid").GridValidRowModel, any, any, never> | undefined;
|
|
54
|
-
rowSpanValueGetter?: import("@mui/x-data-grid").GridValueGetter<import("@mui/x-data-grid").GridValidRowModel, any, any, never> | undefined;
|
|
55
|
-
valueSetter?: import("@mui/x-data-grid").GridValueSetter<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
|
|
56
|
-
valueFormatter?: import("@mui/x-data-grid").GridValueFormatter<import("@mui/x-data-grid").GridValidRowModel, any, any, never> | undefined;
|
|
57
|
-
valueParser?: import("@mui/x-data-grid").GridValueParser<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
|
|
58
|
-
cellClassName?: import("@mui/x-data-grid").GridCellClassNamePropType<import("@mui/x-data-grid").GridValidRowModel, any> | undefined;
|
|
59
|
-
display?: "text" | "flex";
|
|
60
|
-
renderCell?: ((params: import("@mui/x-data-grid").GridRenderCellParams<import("@mui/x-data-grid").GridValidRowModel, any, any, import("@mui/x-data-grid").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
|
|
61
|
-
renderEditCell?: ((params: import("@mui/x-data-grid").GridRenderEditCellParams<import("@mui/x-data-grid").GridValidRowModel, any, any, import("@mui/x-data-grid").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
|
|
62
|
-
preProcessEditCellProps?: ((params: import("@mui/x-data-grid").GridPreProcessEditCellProps) => import("@mui/x-data-grid").GridEditCellProps | Promise<import("@mui/x-data-grid").GridEditCellProps>) | undefined;
|
|
63
|
-
headerClassName?: import("@mui/x-data-grid").GridColumnHeaderClassNamePropType;
|
|
64
|
-
renderHeader?: ((params: import("@mui/x-data-grid").GridColumnHeaderParams<import("@mui/x-data-grid").GridValidRowModel, any, any>) => React.ReactNode) | undefined;
|
|
65
|
-
headerAlign?: import("@mui/x-data-grid").GridAlignment;
|
|
66
|
-
hideSortIcons?: boolean;
|
|
67
|
-
disableColumnMenu?: boolean;
|
|
68
|
-
filterable?: boolean;
|
|
69
|
-
filterOperators?: readonly GridFilterOperator<import("@mui/x-data-grid").GridValidRowModel, any, any, any>[] | undefined;
|
|
70
|
-
getApplyQuickFilterFn?: import("@mui/x-data-grid").GetApplyQuickFilterFn<import("@mui/x-data-grid").GridValidRowModel, any> | undefined;
|
|
71
|
-
disableReorder?: boolean;
|
|
72
|
-
disableExport?: boolean;
|
|
73
|
-
colSpan?: number | import("@mui/x-data-grid").GridColSpanFn<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
|
|
74
|
-
unstable_examples?: any[] | undefined;
|
|
75
|
-
renderHeaderFilter?: (params: import("@mui/x-data-grid-pro").GridRenderHeaderFilterProps) => React.ReactNode;
|
|
76
|
-
aggregable?: boolean;
|
|
77
|
-
availableAggregationFunctions?: string[];
|
|
78
|
-
groupingValueGetter?: import("../../..").GridGroupingValueGetter<import("@mui/x-data-grid").GridValidRowModel> | undefined;
|
|
79
|
-
pastedValueParser?: import("../../..").GridPastedValueParser<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
|
|
80
|
-
};
|
|
81
|
-
export {};
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["aggregationWrappedProperties"];
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { gridRowIdSelector, gridRowNodeSelector } from '@mui/x-data-grid-pro';
|
|
6
|
-
import { gridAggregationLookupSelector } from "./gridAggregationSelectors.js";
|
|
7
|
-
import { GridFooterCell } from "../../../components/GridFooterCell.js";
|
|
8
|
-
import { GridAggregationHeader } from "../../../components/GridAggregationHeader.js";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
const getAggregationValueWrappedValueGetter = ({
|
|
11
|
-
value: valueGetter,
|
|
12
|
-
getCellAggregationResult
|
|
13
|
-
}) => {
|
|
14
|
-
const wrappedValueGetter = (value, row, column, apiRef) => {
|
|
15
|
-
const rowId = gridRowIdSelector(apiRef, row);
|
|
16
|
-
const cellAggregationResult = rowId ? getCellAggregationResult(rowId, column.field) : null;
|
|
17
|
-
if (cellAggregationResult != null) {
|
|
18
|
-
return cellAggregationResult?.value ?? null;
|
|
19
|
-
}
|
|
20
|
-
if (valueGetter) {
|
|
21
|
-
return valueGetter(value, row, column, apiRef);
|
|
22
|
-
}
|
|
23
|
-
return row[column.field];
|
|
24
|
-
};
|
|
25
|
-
return wrappedValueGetter;
|
|
26
|
-
};
|
|
27
|
-
const getAggregationValueWrappedValueFormatter = ({
|
|
28
|
-
value: valueFormatter,
|
|
29
|
-
aggregationRule,
|
|
30
|
-
getCellAggregationResult
|
|
31
|
-
}) => {
|
|
32
|
-
// If neither the inline aggregation function nor the footer aggregation function have a custom value formatter,
|
|
33
|
-
// Then we don't wrap the column value formatter
|
|
34
|
-
if (!aggregationRule.aggregationFunction.valueFormatter) {
|
|
35
|
-
return valueFormatter;
|
|
36
|
-
}
|
|
37
|
-
const wrappedValueFormatter = (value, row, column, apiRef) => {
|
|
38
|
-
const rowId = gridRowIdSelector(apiRef, row);
|
|
39
|
-
if (rowId != null) {
|
|
40
|
-
const cellAggregationResult = getCellAggregationResult(rowId, column.field);
|
|
41
|
-
if (cellAggregationResult != null) {
|
|
42
|
-
return aggregationRule.aggregationFunction.valueFormatter?.(value, row, column, apiRef);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
if (valueFormatter) {
|
|
46
|
-
return valueFormatter(value, row, column, apiRef);
|
|
47
|
-
}
|
|
48
|
-
return value;
|
|
49
|
-
};
|
|
50
|
-
return wrappedValueFormatter;
|
|
51
|
-
};
|
|
52
|
-
const getAggregationValueWrappedRenderCell = ({
|
|
53
|
-
value: renderCell,
|
|
54
|
-
aggregationRule,
|
|
55
|
-
getCellAggregationResult
|
|
56
|
-
}) => {
|
|
57
|
-
const wrappedRenderCell = params => {
|
|
58
|
-
const cellAggregationResult = getCellAggregationResult(params.id, params.field);
|
|
59
|
-
if (cellAggregationResult != null) {
|
|
60
|
-
if (!renderCell) {
|
|
61
|
-
if (cellAggregationResult.position === 'footer') {
|
|
62
|
-
return /*#__PURE__*/_jsx(GridFooterCell, _extends({}, params));
|
|
63
|
-
}
|
|
64
|
-
return params.formattedValue;
|
|
65
|
-
}
|
|
66
|
-
const aggregationMeta = {
|
|
67
|
-
hasCellUnit: aggregationRule.aggregationFunction.hasCellUnit ?? true,
|
|
68
|
-
aggregationFunctionName: aggregationRule.aggregationFunctionName
|
|
69
|
-
};
|
|
70
|
-
return renderCell(_extends({}, params, {
|
|
71
|
-
aggregation: aggregationMeta
|
|
72
|
-
}));
|
|
73
|
-
}
|
|
74
|
-
if (!renderCell) {
|
|
75
|
-
return params.formattedValue;
|
|
76
|
-
}
|
|
77
|
-
return renderCell(params);
|
|
78
|
-
};
|
|
79
|
-
return wrappedRenderCell;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Skips the filtering for aggregated rows
|
|
84
|
-
*/
|
|
85
|
-
const getWrappedFilterOperators = ({
|
|
86
|
-
value: filterOperators,
|
|
87
|
-
apiRef,
|
|
88
|
-
getCellAggregationResult
|
|
89
|
-
}) => filterOperators.map(operator => {
|
|
90
|
-
const baseGetApplyFilterFn = operator.getApplyFilterFn;
|
|
91
|
-
const getApplyFilterFn = (filterItem, colDef) => {
|
|
92
|
-
const filterFn = baseGetApplyFilterFn(filterItem, colDef);
|
|
93
|
-
if (!filterFn) {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
return (value, row, column, api) => {
|
|
97
|
-
const rowId = gridRowIdSelector(apiRef, row);
|
|
98
|
-
if (getCellAggregationResult(rowId, column.field) != null) {
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
return filterFn(value, row, column, api);
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
return _extends({}, operator, {
|
|
105
|
-
getApplyFilterFn
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Add the aggregation method around the header name
|
|
111
|
-
*/
|
|
112
|
-
const getWrappedRenderHeader = ({
|
|
113
|
-
value: renderHeader,
|
|
114
|
-
aggregationRule
|
|
115
|
-
}) => {
|
|
116
|
-
const wrappedRenderHeader = params => {
|
|
117
|
-
return /*#__PURE__*/_jsx(GridAggregationHeader, _extends({}, params, {
|
|
118
|
-
aggregation: {
|
|
119
|
-
aggregationRule
|
|
120
|
-
},
|
|
121
|
-
renderHeader: renderHeader
|
|
122
|
-
}));
|
|
123
|
-
};
|
|
124
|
-
return wrappedRenderHeader;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Add a wrapper around each wrappable property of the column to customize the behavior of the aggregation cells.
|
|
129
|
-
*/
|
|
130
|
-
export const wrapColumnWithAggregationValue = ({
|
|
131
|
-
column,
|
|
132
|
-
apiRef,
|
|
133
|
-
aggregationRule
|
|
134
|
-
}) => {
|
|
135
|
-
const getCellAggregationResult = (id, field) => {
|
|
136
|
-
let cellAggregationPosition = null;
|
|
137
|
-
const rowNode = gridRowNodeSelector(apiRef, id);
|
|
138
|
-
if (rowNode.type === 'group') {
|
|
139
|
-
cellAggregationPosition = 'inline';
|
|
140
|
-
} else if (id.toString().startsWith('auto-generated-group-footer-')) {
|
|
141
|
-
cellAggregationPosition = 'footer';
|
|
142
|
-
}
|
|
143
|
-
if (cellAggregationPosition == null) {
|
|
144
|
-
return null;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// TODO: Add custom root id
|
|
148
|
-
const groupId = cellAggregationPosition === 'inline' ? id : rowNode.parent ?? '';
|
|
149
|
-
const aggregationResult = gridAggregationLookupSelector(apiRef)?.[groupId]?.[field];
|
|
150
|
-
if (!aggregationResult || aggregationResult.position !== cellAggregationPosition) {
|
|
151
|
-
return null;
|
|
152
|
-
}
|
|
153
|
-
return aggregationResult;
|
|
154
|
-
};
|
|
155
|
-
let didWrapSomeProperty = false;
|
|
156
|
-
const wrappedColumn = _extends({}, column, {
|
|
157
|
-
aggregationWrappedProperties: []
|
|
158
|
-
});
|
|
159
|
-
const wrapColumnProperty = (property, wrapper) => {
|
|
160
|
-
const originalValue = column[property];
|
|
161
|
-
const wrappedProperty = wrapper({
|
|
162
|
-
apiRef,
|
|
163
|
-
value: originalValue,
|
|
164
|
-
colDef: column,
|
|
165
|
-
aggregationRule,
|
|
166
|
-
getCellAggregationResult
|
|
167
|
-
});
|
|
168
|
-
if (wrappedProperty !== originalValue) {
|
|
169
|
-
didWrapSomeProperty = true;
|
|
170
|
-
wrappedColumn[property] = wrappedProperty;
|
|
171
|
-
wrappedColumn.aggregationWrappedProperties.push({
|
|
172
|
-
name: property,
|
|
173
|
-
originalValue,
|
|
174
|
-
wrappedValue: wrappedProperty
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
wrapColumnProperty('valueGetter', getAggregationValueWrappedValueGetter);
|
|
179
|
-
wrapColumnProperty('valueFormatter', getAggregationValueWrappedValueFormatter);
|
|
180
|
-
wrapColumnProperty('renderCell', getAggregationValueWrappedRenderCell);
|
|
181
|
-
wrapColumnProperty('renderHeader', getWrappedRenderHeader);
|
|
182
|
-
wrapColumnProperty('filterOperators', getWrappedFilterOperators);
|
|
183
|
-
if (!didWrapSomeProperty) {
|
|
184
|
-
return column;
|
|
185
|
-
}
|
|
186
|
-
return wrappedColumn;
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Remove the aggregation wrappers around the wrappable properties of the column.
|
|
191
|
-
*/
|
|
192
|
-
export const unwrapColumnFromAggregation = ({
|
|
193
|
-
column
|
|
194
|
-
}) => {
|
|
195
|
-
if (!column.aggregationWrappedProperties) {
|
|
196
|
-
return column;
|
|
197
|
-
}
|
|
198
|
-
const _ref = column,
|
|
199
|
-
{
|
|
200
|
-
aggregationWrappedProperties
|
|
201
|
-
} = _ref,
|
|
202
|
-
unwrappedColumn = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
203
|
-
aggregationWrappedProperties.forEach(({
|
|
204
|
-
name,
|
|
205
|
-
originalValue,
|
|
206
|
-
wrappedValue
|
|
207
|
-
}) => {
|
|
208
|
-
// The value changed since we wrapped it
|
|
209
|
-
if (wrappedValue !== unwrappedColumn[name]) {
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
unwrappedColumn[name] = originalValue;
|
|
213
|
-
});
|
|
214
|
-
return unwrappedColumn;
|
|
215
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { GridCellCoordinates, GridColDef, GridRowId } from '@mui/x-data-grid-pro';
|
|
2
|
-
export type GridCellSelectionModel = Record<GridRowId, Record<GridColDef['field'], boolean>>;
|
|
3
|
-
/**
|
|
4
|
-
* The cell selection API interface that is available in the grid [[apiRef]].
|
|
5
|
-
*/
|
|
6
|
-
export interface GridCellSelectionApi {
|
|
7
|
-
/**
|
|
8
|
-
* Determines if a cell is selected or not.
|
|
9
|
-
* @param {GridRowId} id The id of the row.
|
|
10
|
-
* @param {GridColDef['field']} field The field.
|
|
11
|
-
* @returns {boolean} A boolean indicating if the cell is selected.
|
|
12
|
-
*/
|
|
13
|
-
isCellSelected: (id: GridRowId, field: GridColDef['field']) => boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Returns an object containing the selection state of the cells.
|
|
16
|
-
* The keys of the object correspond to the row IDs.
|
|
17
|
-
* The value of each key is also an object, which has a column field for a key and a boolean value for its selection state.
|
|
18
|
-
* @returns {GridCellSelectionModel} Object containing the selection state of the cells
|
|
19
|
-
*/
|
|
20
|
-
getCellSelectionModel: () => GridCellSelectionModel;
|
|
21
|
-
/**
|
|
22
|
-
* Updates the cell selection model according to the value passed to the `newModel` argument.
|
|
23
|
-
* Any cell already selected will be unselected.
|
|
24
|
-
* @param {GridCellSelectionModel} newModel The cells to select.
|
|
25
|
-
*/
|
|
26
|
-
setCellSelectionModel: (newModel: GridCellSelectionModel) => void;
|
|
27
|
-
/**
|
|
28
|
-
* Selects all cells that are inside the range given by `start` and `end` coordinates.
|
|
29
|
-
* @param {GridCellCoordinates} start Object containing the row ID and field of the first cell to select.
|
|
30
|
-
* @param {GridCellCoordinates} end Object containing the row ID and field of the last cell to select.
|
|
31
|
-
* @param {boolean} keepOtherSelected Whether to keep current selected cells or discard. Default is false.
|
|
32
|
-
*/
|
|
33
|
-
selectCellRange: (start: GridCellCoordinates, end: GridCellCoordinates, keepOtherSelected?: boolean) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Returns an array containing only the selected cells.
|
|
36
|
-
* Each item is an object with the ID and field of the cell.
|
|
37
|
-
* @returns {GridCellCoordinates[]} Array with the selected cells.
|
|
38
|
-
*/
|
|
39
|
-
getSelectedCellsAsArray: () => GridCellCoordinates[];
|
|
40
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./gridCellSelectionInterfaces.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./gridCellSelectionInterfaces.js";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { GridStateInitializer } from '@mui/x-data-grid-pro/internals';
|
|
3
|
-
import { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
|
|
4
|
-
import { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
5
|
-
export declare const cellSelectionStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'cellSelectionModel' | 'initialState'>>;
|
|
6
|
-
export declare const useGridCellSelection: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "cellSelection" | "cellSelectionModel" | "onCellSelectionModelChange" | "pagination" | "paginationMode" | "ignoreValueFormatterDuringExport" | "clipboardCopyCellDelimiter" | "columnHeaderHeight">) => void;
|