@mui/x-data-grid-premium 8.0.0-beta.3 → 8.1.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 +388 -96
- package/DataGridPremium/DataGridPremium.js +165 -9
- 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/GridFooterCell.js +1 -2
- 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 +89 -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/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 +167 -11
- 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/GridFooterCell.js +1 -2
- 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 +82 -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/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/{modern/components/export/ExportExcel.js → esm/components/promptField/PromptFieldSend.js} +30 -38
- 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 +3 -7
- 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/dataSource/useGridDataSourcePremium.js +4 -1
- 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 +0 -1
- 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 +3 -7
- 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/dataSource/useGridDataSourcePremium.js +3 -0
- 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 +0 -1
- 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 +9 -15
- 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 -1127
- 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/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/esm/{locales.d.ts → locales/index.d.ts} +0 -0
- /package/esm/{locales.js → locales/index.js} +0 -0
- /package/hooks/features/{promptControl/types.js → aiAssistant/gridAiAssistantInterfaces.js} +0 -0
- /package/hooks/features/{promptControl → aiAssistant}/index.js +0 -0
- /package/{locales.d.ts → locales/index.d.ts} +0 -0
- /package/{locales.js → locales/index.js} +0 -0
|
@@ -4,24 +4,36 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useLicenseVerifier, Watermark } from '@mui/x-license';
|
|
7
|
-
import { GridRoot, GridContextProvider } from '@mui/x-data-grid-pro';
|
|
8
|
-
import { propValidatorsDataGrid, propValidatorsDataGridPro, validateProps } from '@mui/x-data-grid-pro/internals';
|
|
7
|
+
import { GridRoot, GridContextProvider, useGridSelector } from '@mui/x-data-grid-pro';
|
|
8
|
+
import { propValidatorsDataGrid, propValidatorsDataGridPro, validateProps, useGridApiInitialization } from '@mui/x-data-grid-pro/internals';
|
|
9
9
|
import { useMaterialCSSVariables } from '@mui/x-data-grid/material';
|
|
10
10
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
11
11
|
import { useDataGridPremiumComponent } from "./useDataGridPremiumComponent.js";
|
|
12
12
|
import { useDataGridPremiumProps } from "./useDataGridPremiumProps.js";
|
|
13
|
-
import {
|
|
13
|
+
import { Sidebar } from "../components/sidebar/index.js";
|
|
14
|
+
import { GridPivotPanel } from "../components/pivotPanel/GridPivotPanel.js";
|
|
14
15
|
import { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
|
|
15
16
|
import { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
|
|
17
|
+
import { gridCellAggregationResultSelector } from "../hooks/features/aggregation/gridAggregationSelectors.js";
|
|
18
|
+
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
19
|
+
import { gridPivotPanelOpenSelector } from "../hooks/features/pivoting/gridPivotingSelectors.js";
|
|
20
|
+
import { isPivotingAvailable } from "../hooks/features/pivoting/utils.js";
|
|
16
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
22
|
const configuration = {
|
|
18
23
|
hooks: {
|
|
19
24
|
useCSSVariables: useMaterialCSSVariables,
|
|
20
25
|
useGridAriaAttributes,
|
|
21
|
-
useGridRowAriaAttributes
|
|
26
|
+
useGridRowAriaAttributes,
|
|
27
|
+
useCellAggregationResult: (id, field) => {
|
|
28
|
+
const apiRef = useGridApiContext();
|
|
29
|
+
return useGridSelector(apiRef, gridCellAggregationResultSelector, {
|
|
30
|
+
id,
|
|
31
|
+
field
|
|
32
|
+
});
|
|
33
|
+
}
|
|
22
34
|
}
|
|
23
35
|
};
|
|
24
|
-
const releaseInfo =
|
|
36
|
+
const releaseInfo = "MTc0NTQ0NTYwMDAwMA==";
|
|
25
37
|
const watermark = /*#__PURE__*/_jsx(Watermark, {
|
|
26
38
|
packageName: "x-data-grid-premium",
|
|
27
39
|
releaseInfo: releaseInfo
|
|
@@ -31,12 +43,17 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
31
43
|
dataGridPremiumPropValidators = [...propValidatorsDataGrid, ...propValidatorsDataGridPro];
|
|
32
44
|
}
|
|
33
45
|
const DataGridPremiumRaw = forwardRef(function DataGridPremium(inProps, ref) {
|
|
34
|
-
const
|
|
35
|
-
const privateApiRef =
|
|
46
|
+
const initialProps = useDataGridPremiumProps(inProps);
|
|
47
|
+
const privateApiRef = useGridApiInitialization(initialProps.apiRef, initialProps);
|
|
48
|
+
const props = useDataGridPremiumComponent(privateApiRef, initialProps);
|
|
36
49
|
useLicenseVerifier('x-data-grid-premium', releaseInfo);
|
|
50
|
+
const pivotSettingsOpen = useGridSelector(privateApiRef, gridPivotPanelOpenSelector);
|
|
37
51
|
if (process.env.NODE_ENV !== 'production') {
|
|
38
52
|
validateProps(props, dataGridPremiumPropValidators);
|
|
39
53
|
}
|
|
54
|
+
const sidePanel = isPivotingAvailable(props) && pivotSettingsOpen ? /*#__PURE__*/_jsx(Sidebar, {
|
|
55
|
+
children: /*#__PURE__*/_jsx(GridPivotPanel, {})
|
|
56
|
+
}) : null;
|
|
40
57
|
return /*#__PURE__*/_jsx(GridContextProvider, {
|
|
41
58
|
privateApiRef: privateApiRef,
|
|
42
59
|
configuration: configuration,
|
|
@@ -47,6 +64,7 @@ const DataGridPremiumRaw = forwardRef(function DataGridPremium(inProps, ref) {
|
|
|
47
64
|
sx: props.sx
|
|
48
65
|
}, props.slotProps?.root, {
|
|
49
66
|
ref: ref,
|
|
67
|
+
sidePanel: sidePanel,
|
|
50
68
|
children: watermark
|
|
51
69
|
}))
|
|
52
70
|
});
|
|
@@ -72,6 +90,48 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
72
90
|
* @default "filtered"
|
|
73
91
|
*/
|
|
74
92
|
aggregationRowsScope: PropTypes.oneOf(['all', 'filtered']),
|
|
93
|
+
/**
|
|
94
|
+
* If `true`, the AI Assistant is enabled.
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
aiAssistant: PropTypes.bool,
|
|
98
|
+
/**
|
|
99
|
+
* The index of the active AI Assistant conversation.
|
|
100
|
+
*/
|
|
101
|
+
aiAssistantActiveConversationIndex: PropTypes.number,
|
|
102
|
+
/**
|
|
103
|
+
* The conversations with the AI Assistant.
|
|
104
|
+
*/
|
|
105
|
+
aiAssistantConversations: PropTypes.arrayOf(PropTypes.shape({
|
|
106
|
+
id: PropTypes.string,
|
|
107
|
+
prompts: PropTypes.arrayOf(PropTypes.shape({
|
|
108
|
+
createdAt: PropTypes.instanceOf(Date).isRequired,
|
|
109
|
+
helperText: PropTypes.string,
|
|
110
|
+
response: PropTypes.shape({
|
|
111
|
+
aggregation: PropTypes.object.isRequired,
|
|
112
|
+
conversationId: PropTypes.string.isRequired,
|
|
113
|
+
filterOperator: PropTypes.oneOf(['and', 'or']),
|
|
114
|
+
filters: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
115
|
+
grouping: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
116
|
+
pivoting: PropTypes.object.isRequired,
|
|
117
|
+
select: PropTypes.number.isRequired,
|
|
118
|
+
sorting: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
119
|
+
}),
|
|
120
|
+
value: PropTypes.string.isRequired,
|
|
121
|
+
variant: PropTypes.oneOf(['error', 'processing', 'success'])
|
|
122
|
+
})).isRequired,
|
|
123
|
+
title: PropTypes.string
|
|
124
|
+
})),
|
|
125
|
+
/**
|
|
126
|
+
* The suggestions of the AI Assistant.
|
|
127
|
+
*/
|
|
128
|
+
aiAssistantSuggestions: PropTypes.arrayOf(PropTypes.shape({
|
|
129
|
+
value: PropTypes.string.isRequired
|
|
130
|
+
})),
|
|
131
|
+
/**
|
|
132
|
+
* If `true`, the AI Assistant is allowed to pick up values from random cells from each column to build the prompt context.
|
|
133
|
+
*/
|
|
134
|
+
allowAiAssistantDataSampling: PropTypes.bool,
|
|
75
135
|
/**
|
|
76
136
|
* The ref object that allows grid manipulation. Can be instantiated with `useGridApiRef()`.
|
|
77
137
|
*/
|
|
@@ -295,6 +355,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
295
355
|
* @default false (`!props.checkboxSelection` for MIT Data Grid)
|
|
296
356
|
*/
|
|
297
357
|
disableMultipleRowSelection: PropTypes.bool,
|
|
358
|
+
/**
|
|
359
|
+
* If `true`, the pivoting feature is disabled.
|
|
360
|
+
* @default false
|
|
361
|
+
*/
|
|
362
|
+
disablePivoting: PropTypes.bool,
|
|
298
363
|
/**
|
|
299
364
|
* If `true`, the row grouping is disabled.
|
|
300
365
|
* @default false
|
|
@@ -358,7 +423,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
358
423
|
* Determines the position of an aggregated value.
|
|
359
424
|
* @param {GridGroupNode} groupNode The current group.
|
|
360
425
|
* @returns {GridAggregationPosition | null} Position of the aggregated value (if `null`, the group isn't aggregated).
|
|
361
|
-
* @default (groupNode) => groupNode
|
|
426
|
+
* @default (groupNode) => (groupNode.depth === -1 ? 'footer' : 'inline')
|
|
362
427
|
*/
|
|
363
428
|
getAggregationPosition: PropTypes.func,
|
|
364
429
|
/**
|
|
@@ -388,6 +453,15 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
388
453
|
* @returns {number | null} The estimated row height value. If `null` or `undefined` then the default row height, based on the density, is applied.
|
|
389
454
|
*/
|
|
390
455
|
getEstimatedRowHeight: PropTypes.func,
|
|
456
|
+
/**
|
|
457
|
+
* Allows to generate derived columns from actual columns that will be used for pivoting.
|
|
458
|
+
* Useful e.g. for date columns to generate year, quarter, month, etc.
|
|
459
|
+
* @param {GridColDef} column The column to generate derived columns for.
|
|
460
|
+
* @param {GridLocaleTextApi['getLocaleText']} getLocaleText The function to get the locale text.
|
|
461
|
+
* @returns {GridColDef[] | undefined} The derived columns.
|
|
462
|
+
* @default {defaultGetPivotDerivedColumns} Creates year and quarter columns for date columns.
|
|
463
|
+
*/
|
|
464
|
+
getPivotDerivedColumns: PropTypes.func,
|
|
391
465
|
/**
|
|
392
466
|
* Function that applies CSS classes dynamically on rows.
|
|
393
467
|
* @param {GridRowClassNameParams} params With all properties from [[GridRowClassNameParams]].
|
|
@@ -576,6 +650,16 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
576
650
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
577
651
|
*/
|
|
578
652
|
onAggregationModelChange: PropTypes.func,
|
|
653
|
+
/**
|
|
654
|
+
* Callback fired when the AI Assistant active conversation index changes.
|
|
655
|
+
* @param {number} aiAssistantActiveConversationIndex The new active conversation index.
|
|
656
|
+
*/
|
|
657
|
+
onAiAssistantActiveConversationIndexChange: PropTypes.func,
|
|
658
|
+
/**
|
|
659
|
+
* Callback fired when the AI Assistant conversations change.
|
|
660
|
+
* @param {Conversation[]} conversations The new AI Assistant conversations.
|
|
661
|
+
*/
|
|
662
|
+
onAiAssistantConversationsChange: PropTypes.func,
|
|
579
663
|
/**
|
|
580
664
|
* Callback fired before the clipboard paste operation starts.
|
|
581
665
|
* Use it to confirm or cancel the paste operation.
|
|
@@ -743,7 +827,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
743
827
|
* @param {GridFetchRowsParams} params With all properties from [[GridFetchRowsParams]].
|
|
744
828
|
* @param {MuiEvent<{}>} event The event object.
|
|
745
829
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
746
|
-
* @deprecated Use the {@link https://
|
|
830
|
+
* @deprecated Use the {@link https://mui.com/x/react-data-grid/server-side-data/lazy-loading/#viewport-loading Server-side data-Viewport loading} instead.
|
|
747
831
|
*/
|
|
748
832
|
onFetchRows: PropTypes.func,
|
|
749
833
|
/**
|
|
@@ -783,6 +867,21 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
783
867
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
784
868
|
*/
|
|
785
869
|
onPinnedColumnsChange: PropTypes.func,
|
|
870
|
+
/**
|
|
871
|
+
* Callback fired when the pivot active state changes.
|
|
872
|
+
* @param {boolean} isPivotActive Whether the data grid is in pivot mode.
|
|
873
|
+
*/
|
|
874
|
+
onPivotActiveChange: PropTypes.func,
|
|
875
|
+
/**
|
|
876
|
+
* Callback fired when the pivot model changes.
|
|
877
|
+
* @param {GridPivotModel} pivotModel The new pivot model.
|
|
878
|
+
*/
|
|
879
|
+
onPivotModelChange: PropTypes.func,
|
|
880
|
+
/**
|
|
881
|
+
* Callback fired when the pivot side panel open state changes.
|
|
882
|
+
* @param {boolean} pivotPanelOpen Whether the pivot side panel is visible.
|
|
883
|
+
*/
|
|
884
|
+
onPivotPanelOpenChange: PropTypes.func,
|
|
786
885
|
/**
|
|
787
886
|
* Callback fired when the preferences panel is closed.
|
|
788
887
|
* @param {GridPreferencePanelParams} params With all properties from [[GridPreferencePanelParams]].
|
|
@@ -802,6 +901,14 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
802
901
|
* @param {any} error The error thrown.
|
|
803
902
|
*/
|
|
804
903
|
onProcessRowUpdateError: PropTypes.func,
|
|
904
|
+
/**
|
|
905
|
+
* The function to be used to process the prompt.
|
|
906
|
+
* @param {string} prompt The prompt to be processed.
|
|
907
|
+
* @param {string} promptContext The prompt context.
|
|
908
|
+
* @param {string} conversationId The id of the conversation the prompt is part of. If not passed, prompt response will return a new conversation id that can be used to continue the newly started conversation.
|
|
909
|
+
* @returns {Promise<PromptResponse>} The prompt response.
|
|
910
|
+
*/
|
|
911
|
+
onPrompt: PropTypes.func,
|
|
805
912
|
/**
|
|
806
913
|
* Callback fired when the Data Grid is resized.
|
|
807
914
|
* @param {ElementSize} containerSize With all properties from [[ElementSize]].
|
|
@@ -871,7 +978,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
871
978
|
* @param {GridRowScrollEndParams} params With all properties from [[GridRowScrollEndParams]].
|
|
872
979
|
* @param {MuiEvent<{}>} event The event object.
|
|
873
980
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
874
|
-
* @deprecated Use the {@link https://
|
|
981
|
+
* @deprecated Use the {@link https://mui.com/x/react-data-grid/server-side-data/lazy-loading/#infinite-loading Server-side data-Infinite loading} instead.
|
|
875
982
|
*/
|
|
876
983
|
onRowsScrollEnd: PropTypes.func,
|
|
877
984
|
/**
|
|
@@ -933,6 +1040,55 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
933
1040
|
bottom: PropTypes.arrayOf(PropTypes.object),
|
|
934
1041
|
top: PropTypes.arrayOf(PropTypes.object)
|
|
935
1042
|
}),
|
|
1043
|
+
/**
|
|
1044
|
+
* If `true`, the data grid will show data in pivot mode using the `pivotModel`.
|
|
1045
|
+
* @default false
|
|
1046
|
+
*/
|
|
1047
|
+
pivotActive: PropTypes.bool,
|
|
1048
|
+
/**
|
|
1049
|
+
* The column definition overrides for the columns generated by the pivoting feature.
|
|
1050
|
+
* @param {string} originalColumnField The field of the original column.
|
|
1051
|
+
* @param {string[]} columnGroupPath The path of the column groups the column belongs to.
|
|
1052
|
+
* @returns {Partial<GridPivotingColDefOverrides> | undefined | void} The column definition overrides.
|
|
1053
|
+
* @default undefined
|
|
1054
|
+
*/
|
|
1055
|
+
pivotingColDef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
1056
|
+
align: PropTypes.oneOf(['center', 'left', 'right']),
|
|
1057
|
+
cellClassName: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
1058
|
+
description: PropTypes.string,
|
|
1059
|
+
display: PropTypes.oneOf(['flex', 'text']),
|
|
1060
|
+
flex: PropTypes.number,
|
|
1061
|
+
headerAlign: PropTypes.oneOf(['center', 'left', 'right']),
|
|
1062
|
+
headerClassName: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
1063
|
+
headerName: PropTypes.string,
|
|
1064
|
+
maxWidth: PropTypes.number,
|
|
1065
|
+
minWidth: PropTypes.number,
|
|
1066
|
+
resizable: PropTypes.bool,
|
|
1067
|
+
sortingOrder: PropTypes.arrayOf(PropTypes.oneOf(['asc', 'desc'])),
|
|
1068
|
+
width: PropTypes.number
|
|
1069
|
+
})]),
|
|
1070
|
+
/**
|
|
1071
|
+
* The pivot model of the grid.
|
|
1072
|
+
* Will be used to generate the pivot data.
|
|
1073
|
+
* In case of `pivotActive` being `false`, the pivot model is still used to populate the pivot panel.
|
|
1074
|
+
*/
|
|
1075
|
+
pivotModel: PropTypes.shape({
|
|
1076
|
+
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
1077
|
+
rows: PropTypes.arrayOf(PropTypes.shape({
|
|
1078
|
+
field: PropTypes.string.isRequired,
|
|
1079
|
+
hidden: PropTypes.bool
|
|
1080
|
+
})).isRequired,
|
|
1081
|
+
values: PropTypes.arrayOf(PropTypes.shape({
|
|
1082
|
+
aggFunc: PropTypes.string.isRequired,
|
|
1083
|
+
field: PropTypes.string.isRequired,
|
|
1084
|
+
hidden: PropTypes.bool
|
|
1085
|
+
})).isRequired
|
|
1086
|
+
}),
|
|
1087
|
+
/**
|
|
1088
|
+
* If `true`, the pivot side panel is visible.
|
|
1089
|
+
* @default false
|
|
1090
|
+
*/
|
|
1091
|
+
pivotPanelOpen: PropTypes.bool,
|
|
936
1092
|
/**
|
|
937
1093
|
* Callback called before updating a row with new values in the row and cell editing.
|
|
938
1094
|
* @template R
|
|
@@ -1020,7 +1176,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1020
1176
|
* Set it to 'client' if you would like enable infnite loading.
|
|
1021
1177
|
* Set it to 'server' if you would like to enable lazy loading.
|
|
1022
1178
|
* @default "client"
|
|
1023
|
-
* @deprecated Use the {@link https://
|
|
1179
|
+
* @deprecated Use the {@link https://mui.com/x/react-data-grid/server-side-data/lazy-loading/#viewport-loading Server-side data-Viewport loading} instead.
|
|
1024
1180
|
*/
|
|
1025
1181
|
rowsLoadingMode: PropTypes.oneOf(['client', 'server']),
|
|
1026
1182
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import {
|
|
2
|
+
import { GridPrivateApiPremium } from "../models/gridApiPremium.js";
|
|
3
3
|
import { DataGridPremiumProcessedProps } from "../models/dataGridPremiumProps.js";
|
|
4
|
-
export declare const useDataGridPremiumComponent: (
|
|
4
|
+
export declare const useDataGridPremiumComponent: (apiRef: RefObject<GridPrivateApiPremium>, inProps: DataGridPremiumProcessedProps) => DataGridPremiumProcessedProps;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import * as React from 'react';
|
|
1
3
|
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';
|
|
4
|
+
import { useGridSelector } from '@mui/x-data-grid-pro';
|
|
2
5
|
import { useGridDataSourcePremium as useGridDataSource } from "../hooks/features/dataSource/useGridDataSourcePremium.js";
|
|
3
6
|
// Premium-only features
|
|
4
7
|
import { useGridAggregation, aggregationStateInitializer } from "../hooks/features/aggregation/useGridAggregation.js";
|
|
@@ -9,8 +12,18 @@ import { useGridDataSourceRowGroupingPreProcessors } from "../hooks/features/row
|
|
|
9
12
|
import { useGridExcelExport } from "../hooks/features/export/useGridExcelExport.js";
|
|
10
13
|
import { cellSelectionStateInitializer, useGridCellSelection } from "../hooks/features/cellSelection/useGridCellSelection.js";
|
|
11
14
|
import { useGridClipboardImport } from "../hooks/features/clipboard/useGridClipboardImport.js";
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
import { pivotingStateInitializer, useGridPivoting } from "../hooks/features/pivoting/useGridPivoting.js";
|
|
16
|
+
import { gridPivotPropsOverridesSelector } from "../hooks/features/pivoting/gridPivotingSelectors.js";
|
|
17
|
+
import { useGridAiAssistant, aiAssistantStateInitializer } from "../hooks/features/aiAssistant/useGridAiAssistant.js";
|
|
18
|
+
export const useDataGridPremiumComponent = (apiRef, inProps) => {
|
|
19
|
+
const pivotPropsOverrides = useGridSelector(apiRef, gridPivotPropsOverridesSelector);
|
|
20
|
+
const props = React.useMemo(() => {
|
|
21
|
+
if (pivotPropsOverrides) {
|
|
22
|
+
return _extends({}, inProps, pivotPropsOverrides);
|
|
23
|
+
}
|
|
24
|
+
return inProps;
|
|
25
|
+
}, [inProps, pivotPropsOverrides]);
|
|
26
|
+
useGridInitialization(apiRef, props);
|
|
14
27
|
|
|
15
28
|
/**
|
|
16
29
|
* Register all pre-processors called during state initialization here.
|
|
@@ -42,6 +55,7 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
|
42
55
|
useGridInitializeState(detailPanelStateInitializer, apiRef, props);
|
|
43
56
|
useGridInitializeState(columnPinningStateInitializer, apiRef, props);
|
|
44
57
|
useGridInitializeState(columnsStateInitializer, apiRef, props);
|
|
58
|
+
useGridInitializeState(pivotingStateInitializer, apiRef, props);
|
|
45
59
|
useGridInitializeState(rowPinningStateInitializer, apiRef, props);
|
|
46
60
|
useGridInitializeState(rowsStateInitializer, apiRef, props);
|
|
47
61
|
useGridInitializeState(paginationStateInitializer, apiRef, props);
|
|
@@ -61,6 +75,8 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
|
61
75
|
useGridInitializeState(dimensionsStateInitializer, apiRef, props);
|
|
62
76
|
useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
|
|
63
77
|
useGridInitializeState(listViewStateInitializer, apiRef, props);
|
|
78
|
+
useGridInitializeState(aiAssistantStateInitializer, apiRef, props);
|
|
79
|
+
useGridPivoting(apiRef, props, inProps.columns, inProps.rows);
|
|
64
80
|
useGridRowGrouping(apiRef, props);
|
|
65
81
|
useGridHeaderFiltering(apiRef, props);
|
|
66
82
|
useGridTreeData(apiRef, props);
|
|
@@ -104,5 +120,6 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
|
104
120
|
useGridDataSource(apiRef, props);
|
|
105
121
|
useGridVirtualization(apiRef, props);
|
|
106
122
|
useGridListView(apiRef, props);
|
|
107
|
-
|
|
123
|
+
useGridAiAssistant(apiRef, props);
|
|
124
|
+
return props;
|
|
108
125
|
};
|
|
@@ -5,6 +5,7 @@ import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, GRID_DEFAULT_LOCALE_TEXT, GridSigna
|
|
|
5
5
|
import { computeSlots } from '@mui/x-data-grid-pro/internals';
|
|
6
6
|
import { GRID_AGGREGATION_FUNCTIONS } from "../hooks/features/aggregation/index.js";
|
|
7
7
|
import { DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS } from "../constants/dataGridPremiumDefaultSlotsComponents.js";
|
|
8
|
+
import { defaultGetPivotDerivedColumns } from "../hooks/features/pivoting/utils.js";
|
|
8
9
|
const getDataGridPremiumForcedProps = themedProps => _extends({
|
|
9
10
|
signature: GridSignature.DataGridPremium
|
|
10
11
|
}, themedProps.dataSource ? {
|
|
@@ -30,7 +31,10 @@ export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO
|
|
|
30
31
|
// See https://github.com/mui/mui-x/issues/9103
|
|
31
32
|
const text = pastedText.replace(/\r?\n$/, '');
|
|
32
33
|
return text.split(/\r\n|\n|\r/).map(row => row.split('\t'));
|
|
33
|
-
}
|
|
34
|
+
},
|
|
35
|
+
disablePivoting: false,
|
|
36
|
+
getPivotDerivedColumns: defaultGetPivotDerivedColumns,
|
|
37
|
+
aiAssistant: false
|
|
34
38
|
});
|
|
35
39
|
const defaultSlots = DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS;
|
|
36
40
|
export const useDataGridPremiumProps = inProps => {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useGridSelector } from '@mui/x-data-grid-pro';
|
|
3
|
+
import { gridPivotPanelOpenSelector } from '@mui/x-data-grid-pro/internals';
|
|
4
|
+
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
5
|
+
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function GridColumnMenuPivotItem(props) {
|
|
8
|
+
const {
|
|
9
|
+
onClick
|
|
10
|
+
} = props;
|
|
11
|
+
const rootProps = useGridRootProps();
|
|
12
|
+
const apiRef = useGridApiContext();
|
|
13
|
+
const isPivotPanelOpen = useGridSelector(apiRef, gridPivotPanelOpenSelector);
|
|
14
|
+
const openPivotSettings = event => {
|
|
15
|
+
onClick(event);
|
|
16
|
+
apiRef.current.setPivotPanelOpen(true);
|
|
17
|
+
};
|
|
18
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
19
|
+
onClick: openPivotSettings,
|
|
20
|
+
iconStart: /*#__PURE__*/_jsx(rootProps.slots.pivotIcon, {
|
|
21
|
+
fontSize: "small"
|
|
22
|
+
}),
|
|
23
|
+
disabled: isPivotPanelOpen,
|
|
24
|
+
children: apiRef.current.getLocaleText('columnMenuManagePivot')
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { GridOverlayProps } from '@mui/x-data-grid';
|
|
3
|
+
declare const GridEmptyPivotOverlay: React.ForwardRefExoticComponent<GridOverlayProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
sx?: import("@mui/system").SxProps<import("@mui/system").Theme>;
|
|
5
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { GridEmptyPivotOverlay };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
5
|
+
import { GridOverlay } from '@mui/x-data-grid';
|
|
6
|
+
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
const GridEmptyPivotOverlay = forwardRef(function GridEmptyPivotOverlay(props, ref) {
|
|
9
|
+
const apiRef = useGridApiContext();
|
|
10
|
+
return /*#__PURE__*/_jsx(GridOverlay, _extends({}, props, {
|
|
11
|
+
ref: ref,
|
|
12
|
+
children: apiRef.current.getLocaleText('emptyPivotOverlayLabel')
|
|
13
|
+
}));
|
|
14
|
+
});
|
|
15
|
+
process.env.NODE_ENV !== "production" ? GridEmptyPivotOverlay.propTypes = {
|
|
16
|
+
// ----------------------------- Warning --------------------------------
|
|
17
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
18
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
19
|
+
// ----------------------------------------------------------------------
|
|
20
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
21
|
+
} : void 0;
|
|
22
|
+
export { GridEmptyPivotOverlay };
|
|
@@ -10,8 +10,7 @@ import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
const GridFooterCellRoot = styled('div', {
|
|
12
12
|
name: 'MuiDataGrid',
|
|
13
|
-
slot: 'FooterCell'
|
|
14
|
-
overridesResolver: (_, styles) => styles.footerCell
|
|
13
|
+
slot: 'FooterCell'
|
|
15
14
|
})({
|
|
16
15
|
fontWeight: vars.typography.fontWeight.medium,
|
|
17
16
|
color: vars.colors.foreground.accent
|
|
@@ -2,9 +2,10 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import composeClasses from '@mui/utils/composeClasses';
|
|
4
4
|
import { vars } from '@mui/x-data-grid/internals';
|
|
5
|
-
import { useGridSelector, gridFilteredDescendantCountLookupSelector, getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
5
|
+
import { useGridSelector, gridFilteredDescendantCountLookupSelector, getDataGridUtilityClass, gridRowMaximumTreeDepthSelector } from '@mui/x-data-grid-pro';
|
|
6
6
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
7
7
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
8
|
+
import { gridPivotActiveSelector } from "../hooks/features/pivoting/gridPivotingSelectors.js";
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
10
|
const useUtilityClasses = ownerState => {
|
|
10
11
|
const {
|
|
@@ -32,6 +33,10 @@ export function GridGroupingCriteriaCell(props) {
|
|
|
32
33
|
const classes = useUtilityClasses(ownerState);
|
|
33
34
|
const filteredDescendantCountLookup = useGridSelector(apiRef, gridFilteredDescendantCountLookupSelector);
|
|
34
35
|
const filteredDescendantCount = filteredDescendantCountLookup[rowNode.id] ?? 0;
|
|
36
|
+
const pivotActive = useGridSelector(apiRef, gridPivotActiveSelector);
|
|
37
|
+
const maxTreeDepth = gridRowMaximumTreeDepthSelector(apiRef);
|
|
38
|
+
const shouldShowToggleContainer = !pivotActive || maxTreeDepth > 2;
|
|
39
|
+
const shouldShowToggleButton = !pivotActive || rowNode.depth < maxTreeDepth - 2;
|
|
35
40
|
const Icon = rowNode.childrenExpanded ? rootProps.slots.groupingCriteriaCollapseIcon : rootProps.slots.groupingCriteriaExpandIcon;
|
|
36
41
|
const handleKeyDown = event => {
|
|
37
42
|
if (event.key === ' ') {
|
|
@@ -64,9 +69,9 @@ export function GridGroupingCriteriaCell(props) {
|
|
|
64
69
|
style: {
|
|
65
70
|
marginLeft: rootProps.rowGroupingColumnMode === 'multiple' ? 0 : `calc(var(--DataGrid-cellOffsetMultiplier) * ${rowNode.depth} * ${vars.spacing(1)})`
|
|
66
71
|
},
|
|
67
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
72
|
+
children: [shouldShowToggleContainer ? /*#__PURE__*/_jsx("div", {
|
|
68
73
|
className: classes.toggle,
|
|
69
|
-
children: filteredDescendantCount > 0 && /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
74
|
+
children: shouldShowToggleButton && filteredDescendantCount > 0 && /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
70
75
|
size: "small",
|
|
71
76
|
onClick: handleClick,
|
|
72
77
|
onKeyDown: handleKeyDown,
|
|
@@ -77,7 +82,7 @@ export function GridGroupingCriteriaCell(props) {
|
|
|
77
82
|
fontSize: "inherit"
|
|
78
83
|
})
|
|
79
84
|
}))
|
|
80
|
-
}), cellContent, !hideDescendantCount && filteredDescendantCount > 0 ? /*#__PURE__*/_jsxs("span", {
|
|
85
|
+
}) : null, cellContent, !hideDescendantCount && filteredDescendantCount > 0 ? /*#__PURE__*/_jsxs("span", {
|
|
81
86
|
style: {
|
|
82
87
|
whiteSpace: 'pre'
|
|
83
88
|
},
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuProps, GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
3
|
import { GridColumnMenuAggregationItem } from "./GridColumnMenuAggregationItem.js";
|
|
4
|
+
import { GridColumnMenuPivotItem } from "./GridColumnMenuPivotItem.js";
|
|
4
5
|
export declare function GridColumnMenuGroupingItem(props: GridColumnMenuItemProps): React.JSX.Element;
|
|
5
6
|
export declare const GRID_COLUMN_MENU_SLOTS_PREMIUM: {
|
|
6
7
|
columnMenuAggregationItem: typeof GridColumnMenuAggregationItem;
|
|
7
8
|
columnMenuGroupingItem: typeof GridColumnMenuGroupingItem;
|
|
9
|
+
columnMenuPivotItem: typeof GridColumnMenuPivotItem;
|
|
8
10
|
columnMenuPinningItem: typeof import("@mui/x-data-grid-pro").GridColumnMenuPinningItem;
|
|
9
11
|
columnMenuSortItem: typeof import("@mui/x-data-grid").GridColumnMenuSortItem;
|
|
10
12
|
columnMenuFilterItem: typeof import("@mui/x-data-grid").GridColumnMenuFilterItem;
|
|
@@ -17,6 +19,9 @@ export declare const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM: {
|
|
|
17
19
|
columnMenuGroupingItem: {
|
|
18
20
|
displayOrder: number;
|
|
19
21
|
};
|
|
22
|
+
columnMenuPivotItem: {
|
|
23
|
+
displayOrder: number;
|
|
24
|
+
};
|
|
20
25
|
columnMenuPinningItem: {
|
|
21
26
|
displayOrder: number;
|
|
22
27
|
};
|
|
@@ -6,6 +6,7 @@ import { GridColumnMenuAggregationItem } from "./GridColumnMenuAggregationItem.j
|
|
|
6
6
|
import { isGroupingColumn } from "../hooks/features/rowGrouping/index.js";
|
|
7
7
|
import { GridColumnMenuRowGroupItem } from "./GridColumnMenuRowGroupItem.js";
|
|
8
8
|
import { GridColumnMenuRowUngroupItem } from "./GridColumnMenuRowUngroupItem.js";
|
|
9
|
+
import { GridColumnMenuPivotItem } from "./GridColumnMenuPivotItem.js";
|
|
9
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
11
|
export function GridColumnMenuGroupingItem(props) {
|
|
11
12
|
const {
|
|
@@ -18,7 +19,8 @@ export function GridColumnMenuGroupingItem(props) {
|
|
|
18
19
|
}
|
|
19
20
|
export const GRID_COLUMN_MENU_SLOTS_PREMIUM = _extends({}, GRID_COLUMN_MENU_SLOTS, {
|
|
20
21
|
columnMenuAggregationItem: GridColumnMenuAggregationItem,
|
|
21
|
-
columnMenuGroupingItem: GridColumnMenuGroupingItem
|
|
22
|
+
columnMenuGroupingItem: GridColumnMenuGroupingItem,
|
|
23
|
+
columnMenuPivotItem: GridColumnMenuPivotItem
|
|
22
24
|
});
|
|
23
25
|
export const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM = _extends({}, GRID_COLUMN_MENU_SLOT_PROPS, {
|
|
24
26
|
columnMenuAggregationItem: {
|
|
@@ -26,6 +28,9 @@ export const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM = _extends({}, GRID_COLUMN_MENU
|
|
|
26
28
|
},
|
|
27
29
|
columnMenuGroupingItem: {
|
|
28
30
|
displayOrder: 27
|
|
31
|
+
},
|
|
32
|
+
columnMenuPivotItem: {
|
|
33
|
+
displayOrder: 28
|
|
29
34
|
}
|
|
30
35
|
});
|
|
31
36
|
export const GridPremiumColumnMenu = forwardRef(function GridPremiumColumnMenuSimple(props, ref) {
|
|
@@ -2,15 +2,42 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["excelOptions"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { GridToolbar } from '@mui/x-data-grid/internals';
|
|
5
|
+
import { GridToolbar } from '@mui/x-data-grid-pro/internals';
|
|
6
|
+
import { ToolbarButton } from '@mui/x-data-grid-pro';
|
|
6
7
|
import { ExportExcel } from "./export/index.js";
|
|
7
8
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
8
9
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
9
|
-
import {
|
|
10
|
+
import { PivotPanelTrigger } from "./pivotPanel/PivotPanelTrigger.js";
|
|
11
|
+
import { isPivotingAvailable } from "../hooks/features/pivoting/utils.js";
|
|
12
|
+
import { AiAssistantPanelTrigger } from "./aiAssistantPanel/index.js";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
14
|
export function GridPremiumToolbar(props) {
|
|
11
15
|
const rootProps = useGridRootProps();
|
|
12
16
|
const apiRef = useGridApiContext();
|
|
13
17
|
const other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
18
|
+
const additionalItems = /*#__PURE__*/_jsxs(React.Fragment, {
|
|
19
|
+
children: [isPivotingAvailable(rootProps) && /*#__PURE__*/_jsx(PivotPanelTrigger, {
|
|
20
|
+
render: (triggerProps, state) => /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, {
|
|
21
|
+
title: apiRef.current.getLocaleText('toolbarPivot'),
|
|
22
|
+
children: /*#__PURE__*/_jsx(ToolbarButton, _extends({}, triggerProps, {
|
|
23
|
+
color: state.active ? 'primary' : 'default',
|
|
24
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.pivotIcon, {
|
|
25
|
+
fontSize: "small"
|
|
26
|
+
})
|
|
27
|
+
}))
|
|
28
|
+
})
|
|
29
|
+
}), rootProps.aiAssistant && /*#__PURE__*/_jsx(AiAssistantPanelTrigger, {
|
|
30
|
+
render: triggerProps => /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, {
|
|
31
|
+
title: apiRef.current.getLocaleText('toolbarAssistant'),
|
|
32
|
+
children: /*#__PURE__*/_jsx(ToolbarButton, _extends({}, triggerProps, {
|
|
33
|
+
color: "default",
|
|
34
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.aiAssistantIcon, {
|
|
35
|
+
fontSize: "small"
|
|
36
|
+
})
|
|
37
|
+
}))
|
|
38
|
+
})
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
14
41
|
const additionalExportMenuItems = !props.excelOptions?.disableToolbarButton ? onMenuItemClick => /*#__PURE__*/_jsx(ExportExcel, {
|
|
15
42
|
render: /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, _extends({}, rootProps.slotProps?.baseMenuItem)),
|
|
16
43
|
options: props.excelOptions,
|
|
@@ -18,6 +45,7 @@ export function GridPremiumToolbar(props) {
|
|
|
18
45
|
children: apiRef.current.getLocaleText('toolbarExportExcel')
|
|
19
46
|
}) : undefined;
|
|
20
47
|
return /*#__PURE__*/_jsx(GridToolbar, _extends({}, other, {
|
|
48
|
+
additionalItems: additionalItems,
|
|
21
49
|
additionalExportMenuItems: additionalExportMenuItems
|
|
22
50
|
}));
|
|
23
51
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { RenderProp } from '@mui/x-data-grid-pro/internals';
|
|
3
|
+
import { GridSlotProps } from '@mui/x-data-grid-pro';
|
|
4
|
+
export interface AiAssistantPanelState {
|
|
5
|
+
/**
|
|
6
|
+
* If `true`, the assistant panel is open.
|
|
7
|
+
*/
|
|
8
|
+
open: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type AiAssistantPanelTriggerProps = Omit<GridSlotProps['baseButton'], 'className'> & {
|
|
11
|
+
/**
|
|
12
|
+
* A function to customize rendering of the component.
|
|
13
|
+
*/
|
|
14
|
+
render?: RenderProp<GridSlotProps['baseButton'], AiAssistantPanelState>;
|
|
15
|
+
/**
|
|
16
|
+
* A function to customize rendering of the component.
|
|
17
|
+
*/
|
|
18
|
+
className?: string | ((state: AiAssistantPanelState) => string);
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A button that opens and closes the assistant panel.
|
|
22
|
+
* It renders the `baseButton` slot.
|
|
23
|
+
*
|
|
24
|
+
* Demos:
|
|
25
|
+
*
|
|
26
|
+
* - [AI Assistant Panel](https://mui.com/x/react-data-grid/components/ai-assistant-panel/)
|
|
27
|
+
*
|
|
28
|
+
* API:
|
|
29
|
+
*
|
|
30
|
+
* - [AiAssistantPanelTrigger API](https://mui.com/x/api/data-grid/ai-assistant-panel-trigger/)
|
|
31
|
+
*/
|
|
32
|
+
declare const AiAssistantPanelTrigger: React.ForwardRefExoticComponent<AiAssistantPanelTriggerProps> | React.ForwardRefExoticComponent<Omit<AiAssistantPanelTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
33
|
+
export { AiAssistantPanelTrigger };
|