@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
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["className", "children"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { styled } from '@mui/system';
|
|
6
|
+
import { vars } from '@mui/x-data-grid-pro/internals';
|
|
7
|
+
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
8
|
+
import { getDataGridUtilityClass, gridClasses } from '@mui/x-data-grid-pro';
|
|
9
|
+
import clsx from 'clsx';
|
|
10
|
+
import { useResize } from "../../hooks/utils/useResize.js";
|
|
11
|
+
import { useResizablePanelContext } from "./ResizablePanelContext.js";
|
|
12
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
const useUtilityClasses = ownerState => {
|
|
15
|
+
const {
|
|
16
|
+
classes,
|
|
17
|
+
direction
|
|
18
|
+
} = ownerState;
|
|
19
|
+
const slots = {
|
|
20
|
+
root: ['resizablePanelHandle', `resizablePanelHandle--${direction}`]
|
|
21
|
+
};
|
|
22
|
+
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
23
|
+
};
|
|
24
|
+
const ResizablePanelHandleRoot = styled('div', {
|
|
25
|
+
name: 'MuiDataGrid',
|
|
26
|
+
slot: 'ResizablePanelHandle',
|
|
27
|
+
overridesResolver: (props, styles) => [{
|
|
28
|
+
[`&.${gridClasses['resizablePanelHandle--horizontal']}`]: styles['resizablePanelHandle--horizontal']
|
|
29
|
+
}, {
|
|
30
|
+
[`&.${gridClasses['resizablePanelHandle--vertical']}`]: styles['resizablePanelHandle--vertical']
|
|
31
|
+
}, styles.resizablePanelHandle]
|
|
32
|
+
})({
|
|
33
|
+
position: 'absolute',
|
|
34
|
+
zIndex: 3,
|
|
35
|
+
top: 0,
|
|
36
|
+
left: 0,
|
|
37
|
+
userSelect: 'none',
|
|
38
|
+
transition: vars.transition(['border-color'], {
|
|
39
|
+
duration: vars.transitions.duration.short,
|
|
40
|
+
easing: vars.transitions.easing.easeInOut
|
|
41
|
+
}),
|
|
42
|
+
'&:hover': {
|
|
43
|
+
borderWidth: 2,
|
|
44
|
+
borderColor: vars.colors.interactive.selected
|
|
45
|
+
},
|
|
46
|
+
variants: [{
|
|
47
|
+
props: {
|
|
48
|
+
direction: 'horizontal'
|
|
49
|
+
},
|
|
50
|
+
style: {
|
|
51
|
+
height: '100%',
|
|
52
|
+
width: 8,
|
|
53
|
+
cursor: 'ew-resize',
|
|
54
|
+
borderLeft: `1px solid ${vars.colors.border.base}`,
|
|
55
|
+
touchAction: 'pan-x'
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
props: {
|
|
59
|
+
direction: 'vertical'
|
|
60
|
+
},
|
|
61
|
+
style: {
|
|
62
|
+
width: '100%',
|
|
63
|
+
height: 8,
|
|
64
|
+
cursor: 'ns-resize',
|
|
65
|
+
borderTop: `1px solid ${vars.colors.border.base}`,
|
|
66
|
+
touchAction: 'pan-y'
|
|
67
|
+
}
|
|
68
|
+
}]
|
|
69
|
+
});
|
|
70
|
+
function ResizablePanelHandle(props) {
|
|
71
|
+
const {
|
|
72
|
+
className
|
|
73
|
+
} = props,
|
|
74
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
75
|
+
const {
|
|
76
|
+
rootRef,
|
|
77
|
+
direction
|
|
78
|
+
} = useResizablePanelContext();
|
|
79
|
+
const rootProps = useGridRootProps();
|
|
80
|
+
const ownerState = {
|
|
81
|
+
classes: rootProps.classes,
|
|
82
|
+
direction
|
|
83
|
+
};
|
|
84
|
+
const classes = useUtilityClasses(ownerState);
|
|
85
|
+
const {
|
|
86
|
+
ref
|
|
87
|
+
} = useResize({
|
|
88
|
+
direction,
|
|
89
|
+
getInitialSize: () => {
|
|
90
|
+
return direction === 'horizontal' ? rootRef.current.offsetWidth : rootRef.current.offsetHeight;
|
|
91
|
+
},
|
|
92
|
+
onSizeChange: newSize => {
|
|
93
|
+
if (direction === 'horizontal') {
|
|
94
|
+
rootRef.current.style.width = `${newSize}px`;
|
|
95
|
+
} else {
|
|
96
|
+
rootRef.current.style.height = `${newSize}px`;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
return /*#__PURE__*/_jsx(ResizablePanelHandleRoot, _extends({
|
|
101
|
+
className: clsx(classes.root, className),
|
|
102
|
+
ownerState: ownerState,
|
|
103
|
+
direction: direction
|
|
104
|
+
}, other, {
|
|
105
|
+
ref: ref
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
export { ResizablePanelHandle };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["className", "children"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { styled } from '@mui/system';
|
|
7
|
+
import { getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
8
|
+
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
9
|
+
import { ResizablePanel, ResizablePanelHandle } from "../resizablePanel/index.js";
|
|
10
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
const useUtilityClasses = ownerState => {
|
|
13
|
+
const {
|
|
14
|
+
classes
|
|
15
|
+
} = ownerState;
|
|
16
|
+
const slots = {
|
|
17
|
+
root: ['sidebar']
|
|
18
|
+
};
|
|
19
|
+
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
20
|
+
};
|
|
21
|
+
const SidebarRoot = styled(ResizablePanel, {
|
|
22
|
+
name: 'MuiDataGrid',
|
|
23
|
+
slot: 'Sidebar'
|
|
24
|
+
})({
|
|
25
|
+
display: 'flex',
|
|
26
|
+
flexDirection: 'column',
|
|
27
|
+
width: 300,
|
|
28
|
+
minWidth: 260,
|
|
29
|
+
maxWidth: 400,
|
|
30
|
+
overflow: 'hidden'
|
|
31
|
+
});
|
|
32
|
+
function Sidebar(props) {
|
|
33
|
+
const {
|
|
34
|
+
className,
|
|
35
|
+
children
|
|
36
|
+
} = props,
|
|
37
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
38
|
+
const rootProps = useGridRootProps();
|
|
39
|
+
const classes = useUtilityClasses(rootProps);
|
|
40
|
+
return /*#__PURE__*/_jsxs(SidebarRoot, _extends({
|
|
41
|
+
className: clsx(className, classes.root),
|
|
42
|
+
ownerState: rootProps
|
|
43
|
+
}, other, {
|
|
44
|
+
children: [/*#__PURE__*/_jsx(ResizablePanelHandle, {}), children]
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
export { Sidebar };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["className", "children"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { styled } from '@mui/system';
|
|
6
|
+
import { getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
7
|
+
import { vars } from '@mui/x-data-grid-pro/internals';
|
|
8
|
+
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
9
|
+
import clsx from 'clsx';
|
|
10
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
const useUtilityClasses = ownerState => {
|
|
13
|
+
const {
|
|
14
|
+
classes
|
|
15
|
+
} = ownerState;
|
|
16
|
+
const slots = {
|
|
17
|
+
root: ['sidebarHeader']
|
|
18
|
+
};
|
|
19
|
+
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
20
|
+
};
|
|
21
|
+
const SidebarHeaderRoot = styled('div', {
|
|
22
|
+
name: 'MuiDataGrid',
|
|
23
|
+
slot: 'SidebarHeader'
|
|
24
|
+
})({
|
|
25
|
+
position: 'sticky',
|
|
26
|
+
top: 0,
|
|
27
|
+
borderBottom: `1px solid ${vars.colors.border.base}`
|
|
28
|
+
});
|
|
29
|
+
function SidebarHeader(props) {
|
|
30
|
+
const {
|
|
31
|
+
className,
|
|
32
|
+
children
|
|
33
|
+
} = props,
|
|
34
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
35
|
+
const rootProps = useGridRootProps();
|
|
36
|
+
const classes = useUtilityClasses(rootProps);
|
|
37
|
+
return /*#__PURE__*/_jsx(SidebarHeaderRoot, _extends({
|
|
38
|
+
className: clsx(className, classes.root),
|
|
39
|
+
ownerState: rootProps
|
|
40
|
+
}, other, {
|
|
41
|
+
children: children
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
export { SidebarHeader };
|
|
@@ -3,9 +3,12 @@ import { DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS } from '@mui/x-data-grid-pro/int
|
|
|
3
3
|
import { GridPremiumColumnMenu } from "../components/GridPremiumColumnMenu.js";
|
|
4
4
|
import materialSlots from "../material/index.js";
|
|
5
5
|
import { GridBottomContainer } from "../components/GridBottomContainer.js";
|
|
6
|
+
import { GridEmptyPivotOverlay } from "../components/GridEmptyPivotOverlay.js";
|
|
6
7
|
import { GridPremiumToolbar } from "../components/GridPremiumToolbar.js";
|
|
7
8
|
export const DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS = _extends({}, DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS, materialSlots, {
|
|
9
|
+
aiAssistantPanel: null,
|
|
8
10
|
columnMenu: GridPremiumColumnMenu,
|
|
9
11
|
bottomContainer: GridBottomContainer,
|
|
12
|
+
emptyPivotOverlay: GridEmptyPivotOverlay,
|
|
10
13
|
toolbar: GridPremiumToolbar
|
|
11
14
|
});
|
|
@@ -30,6 +30,9 @@ const avgAgg = {
|
|
|
30
30
|
sum += value;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
+
if (sum === 0) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
33
36
|
return sum / valuesCount;
|
|
34
37
|
},
|
|
35
38
|
columnTypes: ['number']
|
|
@@ -41,13 +44,18 @@ const minAgg = {
|
|
|
41
44
|
if (values.length === 0) {
|
|
42
45
|
return null;
|
|
43
46
|
}
|
|
47
|
+
let hasValidValue = false;
|
|
44
48
|
let min = +Infinity;
|
|
45
49
|
for (let i = 0; i < values.length; i += 1) {
|
|
46
50
|
const value = values[i];
|
|
47
51
|
if (value != null && value < min) {
|
|
48
52
|
min = value;
|
|
53
|
+
hasValidValue = true;
|
|
49
54
|
}
|
|
50
55
|
}
|
|
56
|
+
if (!hasValidValue) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
51
59
|
return min;
|
|
52
60
|
},
|
|
53
61
|
columnTypes: ['number', 'date', 'dateTime']
|
|
@@ -59,13 +67,18 @@ const maxAgg = {
|
|
|
59
67
|
if (values.length === 0) {
|
|
60
68
|
return null;
|
|
61
69
|
}
|
|
70
|
+
let hasValidValue = false;
|
|
62
71
|
let max = -Infinity;
|
|
63
72
|
for (let i = 0; i < values.length; i += 1) {
|
|
64
73
|
const value = values[i];
|
|
65
74
|
if (value != null && value > max) {
|
|
66
75
|
max = value;
|
|
76
|
+
hasValidValue = true;
|
|
67
77
|
}
|
|
68
78
|
}
|
|
79
|
+
if (!hasValidValue) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
69
82
|
return max;
|
|
70
83
|
},
|
|
71
84
|
columnTypes: ['number', 'date', 'dateTime']
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { GridRowId } from '@mui/x-data-grid';
|
|
1
2
|
import { GridStatePremium } from "../../../models/gridStatePremium.js";
|
|
3
|
+
import { GridAggregationPosition } from "./gridAggregationInterfaces.js";
|
|
2
4
|
export declare const gridAggregationStateSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, unknown, import("./gridAggregationInterfaces").GridAggregationState>;
|
|
3
5
|
/**
|
|
4
6
|
* Get the aggregation model, containing the aggregation function of each column.
|
|
@@ -10,4 +12,11 @@ export declare const gridAggregationModelSelector: import("@mui/x-data-grid").Ou
|
|
|
10
12
|
* Get the aggregation results as a lookup.
|
|
11
13
|
* @category Aggregation
|
|
12
14
|
*/
|
|
13
|
-
export declare const gridAggregationLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, import("./gridAggregationInterfaces").GridAggregationState, import("./gridAggregationInterfaces").GridAggregationLookup>;
|
|
15
|
+
export declare const gridAggregationLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, import("./gridAggregationInterfaces").GridAggregationState, import("./gridAggregationInterfaces").GridAggregationLookup>;
|
|
16
|
+
export declare const gridCellAggregationResultSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, {
|
|
17
|
+
id: GridRowId;
|
|
18
|
+
field: string;
|
|
19
|
+
}, {
|
|
20
|
+
position: GridAggregationPosition;
|
|
21
|
+
value: any;
|
|
22
|
+
} | null>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createSelector, createRootSelector } from '@mui/x-data-grid-pro/internals';
|
|
2
|
+
import { gridRowTreeSelector } from '@mui/x-data-grid';
|
|
2
3
|
export const gridAggregationStateSelector = createRootSelector(state => state.aggregation);
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -12,4 +13,30 @@ export const gridAggregationModelSelector = createSelector(gridAggregationStateS
|
|
|
12
13
|
* Get the aggregation results as a lookup.
|
|
13
14
|
* @category Aggregation
|
|
14
15
|
*/
|
|
15
|
-
export const gridAggregationLookupSelector = createSelector(gridAggregationStateSelector, aggregationState => aggregationState.lookup);
|
|
16
|
+
export const gridAggregationLookupSelector = createSelector(gridAggregationStateSelector, aggregationState => aggregationState.lookup);
|
|
17
|
+
export const gridCellAggregationResultSelector = createSelector(gridRowTreeSelector, gridAggregationLookupSelector, (rowTree, aggregationLookup, {
|
|
18
|
+
id,
|
|
19
|
+
field
|
|
20
|
+
}) => {
|
|
21
|
+
let cellAggregationPosition = null;
|
|
22
|
+
const rowNode = rowTree[id];
|
|
23
|
+
if (!rowNode) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
if (rowNode.type === 'group') {
|
|
27
|
+
cellAggregationPosition = 'inline';
|
|
28
|
+
} else if (id.toString().startsWith('auto-generated-group-footer-')) {
|
|
29
|
+
cellAggregationPosition = 'footer';
|
|
30
|
+
}
|
|
31
|
+
if (cellAggregationPosition == null) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// TODO: Add custom root id
|
|
36
|
+
const groupId = cellAggregationPosition === 'inline' ? id : rowNode.parent ?? '';
|
|
37
|
+
const aggregationResult = aggregationLookup?.[groupId]?.[field];
|
|
38
|
+
if (!aggregationResult || aggregationResult.position !== cellAggregationPosition) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
return aggregationResult;
|
|
42
|
+
});
|
|
@@ -3,7 +3,7 @@ import { GridColDef, GridRowId } from '@mui/x-data-grid-pro';
|
|
|
3
3
|
import { GridColumnRawLookup, GridHydrateRowsValue } from '@mui/x-data-grid-pro/internals';
|
|
4
4
|
import { GridAggregationFunction, GridAggregationFunctionDataSource, GridAggregationModel, GridAggregationRule, GridAggregationRules } from "./gridAggregationInterfaces.js";
|
|
5
5
|
import { GridStatePremium } from "../../../models/gridStatePremium.js";
|
|
6
|
-
import { DataGridPremiumProcessedProps } from
|
|
6
|
+
import type { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
|
|
7
7
|
import { GridApiPremium, GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
8
8
|
export declare const GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = "auto-generated-group-footer-root";
|
|
9
9
|
export declare const getAggregationFooterRowIdFromGroupId: (groupId: GridRowId | null) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { GridAggregationState, GridAggregationInitialState, GridAggregationInternalCache, GridAggregationApi, GridAggregationGetCellValueParams, GridAggregationFunction, GridAggregationFunctionDataSource, GridAggregationParams, GridAggregationModel, GridAggregationLookup, GridAggregationPosition, GridAggregationCellMeta, GridAggregationHeaderMeta, GridAggregationRule, GridAggregationRules } from './gridAggregationInterfaces';
|
|
2
|
-
export
|
|
2
|
+
export { gridAggregationStateSelector, gridAggregationLookupSelector, gridAggregationModelSelector } from "./gridAggregationSelectors.js";
|
|
3
3
|
export * from "./gridAggregationFunctions.js";
|
|
4
4
|
export { GRID_AGGREGATION_ROOT_FOOTER_ROW_ID, getAggregationFooterRowIdFromGroupId } from "./gridAggregationUtils.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { gridAggregationStateSelector, gridAggregationLookupSelector, gridAggregationModelSelector } from "./gridAggregationSelectors.js";
|
|
2
2
|
export * from "./gridAggregationFunctions.js";
|
|
3
3
|
export { GRID_AGGREGATION_ROOT_FOOTER_ROW_ID, getAggregationFooterRowIdFromGroupId } from "./gridAggregationUtils.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { gridColumnLookupSelector,
|
|
3
|
+
import { gridColumnLookupSelector, useGridEvent, useGridApiMethod } from '@mui/x-data-grid-pro';
|
|
4
4
|
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
5
5
|
import { gridAggregationModelSelector } from "./gridAggregationSelectors.js";
|
|
6
6
|
import { getAggregationRules, mergeStateWithAggregationModel, areAggregationRulesEqual } from "./gridAggregationUtils.js";
|
|
@@ -74,13 +74,9 @@ export const useGridAggregation = (apiRef, props) => {
|
|
|
74
74
|
const aggregationRules = props.disableAggregation ? {} : getAggregationRules(gridColumnLookupSelector(apiRef), gridAggregationModelSelector(apiRef), props.aggregationFunctions, !!props.dataSource);
|
|
75
75
|
|
|
76
76
|
// Re-apply the row hydration to add / remove the aggregation footers
|
|
77
|
-
if (!areAggregationRulesEqual(rulesOnLastRowHydration, aggregationRules)) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
} else {
|
|
81
|
-
apiRef.current.requestPipeProcessorsApplication('hydrateRows');
|
|
82
|
-
applyAggregation();
|
|
83
|
-
}
|
|
77
|
+
if (!props.dataSource && !areAggregationRulesEqual(rulesOnLastRowHydration, aggregationRules)) {
|
|
78
|
+
apiRef.current.requestPipeProcessorsApplication('hydrateRows');
|
|
79
|
+
applyAggregation();
|
|
84
80
|
}
|
|
85
81
|
|
|
86
82
|
// Re-apply the column hydration to wrap / unwrap the aggregated columns
|
|
@@ -88,9 +84,9 @@ export const useGridAggregation = (apiRef, props) => {
|
|
|
88
84
|
apiRef.current.requestPipeProcessorsApplication('hydrateColumns');
|
|
89
85
|
}
|
|
90
86
|
}, [apiRef, applyAggregation, props.aggregationFunctions, props.disableAggregation, props.dataSource]);
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
useGridEvent(apiRef, 'aggregationModelChange', checkAggregationRulesDiff);
|
|
88
|
+
useGridEvent(apiRef, 'columnsChange', checkAggregationRulesDiff);
|
|
89
|
+
useGridEvent(apiRef, 'filteredRowsSet', applyAggregation);
|
|
94
90
|
|
|
95
91
|
/**
|
|
96
92
|
* EFFECTS
|
|
@@ -16,16 +16,10 @@ export const useGridAggregationPreProcessors = (apiRef, props) => {
|
|
|
16
16
|
const haveAggregationColumnValue = !!rulesOnLastColumnHydration.current[field];
|
|
17
17
|
let column = columnsState.lookup[field];
|
|
18
18
|
if (haveAggregationColumnValue) {
|
|
19
|
-
column = unwrapColumnFromAggregation(
|
|
20
|
-
column
|
|
21
|
-
});
|
|
19
|
+
column = unwrapColumnFromAggregation(column);
|
|
22
20
|
}
|
|
23
21
|
if (shouldHaveAggregationValue) {
|
|
24
|
-
column = wrapColumnWithAggregationValue(
|
|
25
|
-
column,
|
|
26
|
-
aggregationRule: aggregationRules[field],
|
|
27
|
-
apiRef
|
|
28
|
-
});
|
|
22
|
+
column = wrapColumnWithAggregationValue(column, aggregationRules[field], apiRef);
|
|
29
23
|
}
|
|
30
24
|
columnsState.lookup[field] = column;
|
|
31
25
|
});
|
|
@@ -4,34 +4,14 @@ import { GridColDef, GridFilterOperator } from '@mui/x-data-grid-pro';
|
|
|
4
4
|
import { type GridBaseColDef } from '@mui/x-data-grid-pro/internals';
|
|
5
5
|
import { GridApiPremium } from "../../../models/gridApiPremium.js";
|
|
6
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
7
|
/**
|
|
16
8
|
* Add a wrapper around each wrappable property of the column to customize the behavior of the aggregation cells.
|
|
17
9
|
*/
|
|
18
|
-
export declare const wrapColumnWithAggregationValue: (
|
|
19
|
-
column,
|
|
20
|
-
apiRef,
|
|
21
|
-
aggregationRule
|
|
22
|
-
}: {
|
|
23
|
-
column: GridBaseColDef;
|
|
24
|
-
apiRef: RefObject<GridApiPremium>;
|
|
25
|
-
aggregationRule: GridAggregationRule;
|
|
26
|
-
}) => GridBaseColDef;
|
|
10
|
+
export declare const wrapColumnWithAggregationValue: (column: GridBaseColDef, aggregationRule: GridAggregationRule, apiRef: RefObject<GridApiPremium>) => GridBaseColDef;
|
|
27
11
|
/**
|
|
28
12
|
* Remove the aggregation wrappers around the wrappable properties of the column.
|
|
29
13
|
*/
|
|
30
|
-
export declare const unwrapColumnFromAggregation: ({
|
|
31
|
-
column
|
|
32
|
-
}: {
|
|
33
|
-
column: GridColDef | GridColDefWithAggregationWrappers;
|
|
34
|
-
}) => GridBaseColDef<any, any, any> | {
|
|
14
|
+
export declare const unwrapColumnFromAggregation: (column: GridColDef) => GridBaseColDef<any, any, any> | {
|
|
35
15
|
field: string;
|
|
36
16
|
headerName?: string;
|
|
37
17
|
description?: string;
|
|
@@ -71,11 +51,11 @@ export declare const unwrapColumnFromAggregation: ({
|
|
|
71
51
|
disableReorder?: boolean;
|
|
72
52
|
disableExport?: boolean;
|
|
73
53
|
colSpan?: number | import("@mui/x-data-grid").GridColSpanFn<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
|
|
74
|
-
|
|
54
|
+
examples?: any[] | undefined;
|
|
75
55
|
renderHeaderFilter?: (params: import("@mui/x-data-grid-pro").GridRenderHeaderFilterProps) => React.ReactNode;
|
|
76
56
|
aggregable?: boolean;
|
|
77
57
|
availableAggregationFunctions?: string[];
|
|
78
58
|
groupingValueGetter?: import("../../..").GridGroupingValueGetter<import("@mui/x-data-grid").GridValidRowModel> | undefined;
|
|
79
59
|
pastedValueParser?: import("../../..").GridPastedValueParser<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
|
|
80
|
-
|
|
81
|
-
|
|
60
|
+
pivotable?: boolean;
|
|
61
|
+
};
|
|
@@ -6,6 +6,7 @@ import { gridRowIdSelector, gridRowNodeSelector } from '@mui/x-data-grid-pro';
|
|
|
6
6
|
import { gridAggregationLookupSelector } from "./gridAggregationSelectors.js";
|
|
7
7
|
import { GridFooterCell } from "../../../components/GridFooterCell.js";
|
|
8
8
|
import { GridAggregationHeader } from "../../../components/GridAggregationHeader.js";
|
|
9
|
+
import { gridPivotActiveSelector } from "../pivoting/gridPivotingSelectors.js";
|
|
9
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
11
|
const getAggregationValueWrappedValueGetter = ({
|
|
11
12
|
value: valueGetter,
|
|
@@ -52,8 +53,10 @@ const getAggregationValueWrappedValueFormatter = ({
|
|
|
52
53
|
const getAggregationValueWrappedRenderCell = ({
|
|
53
54
|
value: renderCell,
|
|
54
55
|
aggregationRule,
|
|
55
|
-
getCellAggregationResult
|
|
56
|
+
getCellAggregationResult,
|
|
57
|
+
apiRef
|
|
56
58
|
}) => {
|
|
59
|
+
const pivotActive = gridPivotActiveSelector(apiRef);
|
|
57
60
|
const wrappedRenderCell = params => {
|
|
58
61
|
const cellAggregationResult = getCellAggregationResult(params.id, params.field);
|
|
59
62
|
if (cellAggregationResult != null) {
|
|
@@ -61,8 +64,14 @@ const getAggregationValueWrappedRenderCell = ({
|
|
|
61
64
|
if (cellAggregationResult.position === 'footer') {
|
|
62
65
|
return /*#__PURE__*/_jsx(GridFooterCell, _extends({}, params));
|
|
63
66
|
}
|
|
67
|
+
if (pivotActive && cellAggregationResult.value === 0) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
64
70
|
return params.formattedValue;
|
|
65
71
|
}
|
|
72
|
+
if (pivotActive && cellAggregationResult.value === 0) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
66
75
|
const aggregationMeta = {
|
|
67
76
|
hasCellUnit: aggregationRule.aggregationFunction.hasCellUnit ?? true,
|
|
68
77
|
aggregationFunctionName: aggregationRule.aggregationFunctionName
|
|
@@ -114,6 +123,10 @@ const getWrappedRenderHeader = ({
|
|
|
114
123
|
aggregationRule
|
|
115
124
|
}) => {
|
|
116
125
|
const wrappedRenderHeader = params => {
|
|
126
|
+
// TODO: investigate why colDef is undefined
|
|
127
|
+
if (!params.colDef) {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
117
130
|
return /*#__PURE__*/_jsx(GridAggregationHeader, _extends({}, params, {
|
|
118
131
|
aggregation: {
|
|
119
132
|
aggregationRule
|
|
@@ -127,14 +140,13 @@ const getWrappedRenderHeader = ({
|
|
|
127
140
|
/**
|
|
128
141
|
* Add a wrapper around each wrappable property of the column to customize the behavior of the aggregation cells.
|
|
129
142
|
*/
|
|
130
|
-
export const wrapColumnWithAggregationValue = ({
|
|
131
|
-
column,
|
|
132
|
-
apiRef,
|
|
133
|
-
aggregationRule
|
|
134
|
-
}) => {
|
|
143
|
+
export const wrapColumnWithAggregationValue = (column, aggregationRule, apiRef) => {
|
|
135
144
|
const getCellAggregationResult = (id, field) => {
|
|
136
145
|
let cellAggregationPosition = null;
|
|
137
146
|
const rowNode = gridRowNodeSelector(apiRef, id);
|
|
147
|
+
if (!rowNode) {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
138
150
|
if (rowNode.type === 'group') {
|
|
139
151
|
cellAggregationPosition = 'inline';
|
|
140
152
|
} else if (id.toString().startsWith('auto-generated-group-footer-')) {
|
|
@@ -185,14 +197,15 @@ export const wrapColumnWithAggregationValue = ({
|
|
|
185
197
|
}
|
|
186
198
|
return wrappedColumn;
|
|
187
199
|
};
|
|
200
|
+
const isColumnWrappedWithAggregation = column => {
|
|
201
|
+
return typeof column.aggregationWrappedProperties !== 'undefined';
|
|
202
|
+
};
|
|
188
203
|
|
|
189
204
|
/**
|
|
190
205
|
* Remove the aggregation wrappers around the wrappable properties of the column.
|
|
191
206
|
*/
|
|
192
|
-
export const unwrapColumnFromAggregation =
|
|
193
|
-
column
|
|
194
|
-
}) => {
|
|
195
|
-
if (!column.aggregationWrappedProperties) {
|
|
207
|
+
export const unwrapColumnFromAggregation = column => {
|
|
208
|
+
if (!isColumnWrappedWithAggregation(column)) {
|
|
196
209
|
return column;
|
|
197
210
|
}
|
|
198
211
|
const _ref = column,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PromptResponse } from "./gridAiAssistantInterfaces.js";
|
|
2
|
+
/**
|
|
3
|
+
* Prompt resolver for the <DataGridPremium /> component.
|
|
4
|
+
* @param {string} url The URL to send the request to.
|
|
5
|
+
* @param {string} query The query to be processed.
|
|
6
|
+
* @param {string} context The prompt context containing necessary information about the current columns definition.
|
|
7
|
+
* Either use the `context` parameter of the `onPrompt` callback or the return value of the `unstable_getPromptContext()` API method.
|
|
8
|
+
* @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.
|
|
9
|
+
* @param {string} additionalContext Optional, additional context to make the processing results more accurate.
|
|
10
|
+
* @returns {Promise<PromptResponse>} The grid state updates to be applied.
|
|
11
|
+
*/
|
|
12
|
+
export declare function gridDefaultPromptResolver(url: string, query: string, context: string, conversationId?: string, additionalContext?: string): Promise<PromptResponse>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt resolver for the <DataGridPremium /> component.
|
|
3
|
+
* @param {string} url The URL to send the request to.
|
|
4
|
+
* @param {string} query The query to be processed.
|
|
5
|
+
* @param {string} context The prompt context containing necessary information about the current columns definition.
|
|
6
|
+
* Either use the `context` parameter of the `onPrompt` callback or the return value of the `unstable_getPromptContext()` API method.
|
|
7
|
+
* @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.
|
|
8
|
+
* @param {string} additionalContext Optional, additional context to make the processing results more accurate.
|
|
9
|
+
* @returns {Promise<PromptResponse>} The grid state updates to be applied.
|
|
10
|
+
*/
|
|
11
|
+
export function gridDefaultPromptResolver(url, query, context, conversationId, additionalContext = '') {
|
|
12
|
+
return fetch(url, {
|
|
13
|
+
mode: 'cors',
|
|
14
|
+
method: 'POST',
|
|
15
|
+
headers: {
|
|
16
|
+
'content-type': 'application/json'
|
|
17
|
+
},
|
|
18
|
+
credentials: 'include',
|
|
19
|
+
body: JSON.stringify({
|
|
20
|
+
context,
|
|
21
|
+
query,
|
|
22
|
+
additionalContext,
|
|
23
|
+
conversationId
|
|
24
|
+
})
|
|
25
|
+
}).then(result => result.json()).then(result => {
|
|
26
|
+
if (result.ok === false) {
|
|
27
|
+
return Promise.reject(new Error(result.message));
|
|
28
|
+
}
|
|
29
|
+
return result.data;
|
|
30
|
+
});
|
|
31
|
+
}
|