@mui/x-data-grid-premium 8.0.0-beta.2 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +423 -96
- package/DataGridPremium/DataGridPremium.js +188 -26
- package/DataGridPremium/useDataGridPremiumComponent.d.ts +2 -2
- package/DataGridPremium/useDataGridPremiumComponent.js +22 -3
- package/DataGridPremium/useDataGridPremiumProps.js +5 -1
- package/components/GridColumnMenuPivotItem.d.ts +3 -0
- package/components/GridColumnMenuPivotItem.js +33 -0
- package/components/GridEmptyPivotOverlay.d.ts +6 -0
- package/components/GridEmptyPivotOverlay.js +29 -0
- package/components/GridGroupingCriteriaCell.js +8 -3
- package/components/GridPremiumColumnMenu.d.ts +5 -0
- package/components/GridPremiumColumnMenu.js +6 -1
- package/components/GridPremiumToolbar.d.ts +1 -1
- package/components/GridPremiumToolbar.js +29 -1
- package/components/aiAssistantPanel/AiAssistantPanelTrigger.d.ts +33 -0
- package/components/aiAssistantPanel/AiAssistantPanelTrigger.js +107 -0
- package/components/aiAssistantPanel/GridAiAssistantPanel.d.ts +3 -0
- package/components/aiAssistantPanel/GridAiAssistantPanel.js +195 -0
- package/components/aiAssistantPanel/GridAiAssistantPanelConversation.d.ts +7 -0
- package/components/aiAssistantPanel/GridAiAssistantPanelConversation.js +71 -0
- package/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.d.ts +3 -0
- package/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.js +92 -0
- package/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.d.ts +7 -0
- package/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.js +86 -0
- package/components/aiAssistantPanel/index.d.ts +2 -0
- package/components/aiAssistantPanel/index.js +27 -0
- package/components/collapsible/Collapsible.d.ts +4 -0
- package/components/collapsible/Collapsible.js +70 -0
- package/components/collapsible/CollapsibleContext.d.ts +8 -0
- package/components/collapsible/CollapsibleContext.js +17 -0
- package/components/collapsible/CollapsiblePanel.d.ts +4 -0
- package/components/collapsible/CollapsiblePanel.js +64 -0
- package/components/collapsible/CollapsibleTrigger.d.ts +4 -0
- package/components/collapsible/CollapsibleTrigger.js +106 -0
- package/components/collapsible/index.d.ts +4 -0
- package/components/collapsible/index.js +49 -0
- package/components/export/ExportExcel.js +4 -129
- package/components/index.d.ts +5 -2
- package/components/index.js +40 -4
- package/components/pivotPanel/GridPivotPanel.d.ts +3 -0
- package/components/pivotPanel/GridPivotPanel.js +22 -0
- package/components/pivotPanel/GridPivotPanelBody.d.ts +11 -0
- package/components/pivotPanel/GridPivotPanelBody.js +368 -0
- package/components/pivotPanel/GridPivotPanelField.d.ts +22 -0
- package/components/pivotPanel/GridPivotPanelField.js +338 -0
- package/components/pivotPanel/GridPivotPanelFieldMenu.d.ts +8 -0
- package/components/pivotPanel/GridPivotPanelFieldMenu.js +177 -0
- package/components/pivotPanel/GridPivotPanelHeader.d.ts +7 -0
- package/components/pivotPanel/GridPivotPanelHeader.js +101 -0
- package/components/pivotPanel/GridPivotPanelSearch.d.ts +7 -0
- package/components/pivotPanel/GridPivotPanelSearch.js +77 -0
- package/components/pivotPanel/PivotPanelTrigger.d.ts +37 -0
- package/components/pivotPanel/PivotPanelTrigger.js +93 -0
- package/components/pivotPanel/index.d.ts +2 -0
- package/components/pivotPanel/index.js +27 -0
- package/components/prompt/GridPrompt.d.ts +7 -0
- package/components/prompt/GridPrompt.js +364 -0
- package/components/prompt/index.d.ts +1 -0
- package/components/prompt/index.js +12 -0
- package/components/promptField/GridPromptField.d.ts +4 -0
- package/components/promptField/GridPromptField.js +86 -0
- package/components/promptField/PromptField.d.ts +66 -0
- package/components/promptField/PromptField.js +95 -0
- package/components/promptField/PromptFieldContext.d.ts +16 -0
- package/components/promptField/PromptFieldContext.js +17 -0
- package/components/promptField/PromptFieldControl.d.ts +27 -0
- package/components/promptField/PromptFieldControl.js +102 -0
- package/components/promptField/PromptFieldRecord.d.ts +27 -0
- package/components/promptField/PromptFieldRecord.js +158 -0
- package/components/promptField/PromptFieldSend.d.ts +27 -0
- package/components/promptField/PromptFieldSend.js +83 -0
- package/components/promptField/index.d.ts +4 -0
- package/components/promptField/index.js +49 -0
- package/components/resizablePanel/ResizablePanel.d.ts +10 -0
- package/components/resizablePanel/ResizablePanel.js +59 -0
- package/components/resizablePanel/ResizablePanelContext.d.ts +7 -0
- package/components/resizablePanel/ResizablePanelContext.js +17 -0
- package/components/resizablePanel/ResizablePanelHandle.d.ts +4 -0
- package/components/resizablePanel/ResizablePanelHandle.js +115 -0
- package/components/resizablePanel/index.d.ts +3 -0
- package/components/resizablePanel/index.js +38 -0
- package/components/sidebar/Sidebar.d.ts +4 -0
- package/components/sidebar/Sidebar.js +54 -0
- package/components/sidebar/SidebarHeader.d.ts +4 -0
- package/components/sidebar/SidebarHeader.js +51 -0
- package/components/sidebar/index.d.ts +2 -0
- package/components/sidebar/index.js +27 -0
- package/constants/dataGridPremiumDefaultSlotsComponents.js +3 -0
- package/esm/DataGridPremium/DataGridPremium.js +190 -28
- package/esm/DataGridPremium/useDataGridPremiumComponent.d.ts +2 -2
- package/esm/DataGridPremium/useDataGridPremiumComponent.js +20 -3
- package/esm/DataGridPremium/useDataGridPremiumProps.js +5 -1
- package/esm/components/GridColumnMenuPivotItem.d.ts +3 -0
- package/esm/components/GridColumnMenuPivotItem.js +26 -0
- package/esm/components/GridEmptyPivotOverlay.d.ts +6 -0
- package/esm/components/GridEmptyPivotOverlay.js +22 -0
- package/esm/components/GridGroupingCriteriaCell.js +9 -4
- package/esm/components/GridPremiumColumnMenu.d.ts +5 -0
- package/esm/components/GridPremiumColumnMenu.js +6 -1
- package/esm/components/GridPremiumToolbar.d.ts +1 -1
- package/esm/components/GridPremiumToolbar.js +30 -2
- package/esm/components/aiAssistantPanel/AiAssistantPanelTrigger.d.ts +33 -0
- package/esm/components/aiAssistantPanel/AiAssistantPanelTrigger.js +100 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanel.d.ts +3 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanel.js +188 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversation.d.ts +7 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversation.js +64 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.d.ts +3 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.js +85 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.d.ts +7 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.js +80 -0
- package/esm/components/aiAssistantPanel/index.d.ts +2 -0
- package/esm/components/aiAssistantPanel/index.js +2 -0
- package/esm/components/collapsible/Collapsible.d.ts +4 -0
- package/esm/components/collapsible/Collapsible.js +63 -0
- package/esm/components/collapsible/CollapsibleContext.d.ts +8 -0
- package/esm/components/collapsible/CollapsibleContext.js +9 -0
- package/esm/components/collapsible/CollapsiblePanel.d.ts +4 -0
- package/esm/components/collapsible/CollapsiblePanel.js +57 -0
- package/esm/components/collapsible/CollapsibleTrigger.d.ts +4 -0
- package/esm/components/collapsible/CollapsibleTrigger.js +99 -0
- package/esm/components/collapsible/index.d.ts +4 -0
- package/esm/components/collapsible/index.js +4 -0
- package/esm/components/export/ExportExcel.js +4 -129
- package/esm/components/index.d.ts +5 -2
- package/esm/components/index.js +5 -2
- package/esm/components/pivotPanel/GridPivotPanel.d.ts +3 -0
- package/esm/components/pivotPanel/GridPivotPanel.js +16 -0
- package/esm/components/pivotPanel/GridPivotPanelBody.d.ts +11 -0
- package/esm/components/pivotPanel/GridPivotPanelBody.js +361 -0
- package/esm/components/pivotPanel/GridPivotPanelField.d.ts +22 -0
- package/esm/components/pivotPanel/GridPivotPanelField.js +331 -0
- package/esm/components/pivotPanel/GridPivotPanelFieldMenu.d.ts +8 -0
- package/esm/components/pivotPanel/GridPivotPanelFieldMenu.js +170 -0
- package/esm/components/pivotPanel/GridPivotPanelHeader.d.ts +7 -0
- package/esm/components/pivotPanel/GridPivotPanelHeader.js +94 -0
- package/esm/components/pivotPanel/GridPivotPanelSearch.d.ts +7 -0
- package/esm/components/pivotPanel/GridPivotPanelSearch.js +70 -0
- package/esm/components/pivotPanel/PivotPanelTrigger.d.ts +37 -0
- package/esm/components/pivotPanel/PivotPanelTrigger.js +86 -0
- package/esm/components/pivotPanel/index.d.ts +2 -0
- package/esm/components/pivotPanel/index.js +2 -0
- package/esm/components/prompt/GridPrompt.d.ts +7 -0
- package/esm/components/prompt/GridPrompt.js +357 -0
- package/esm/components/prompt/index.d.ts +1 -0
- package/esm/components/prompt/index.js +1 -0
- package/esm/components/promptField/GridPromptField.d.ts +4 -0
- package/esm/components/promptField/GridPromptField.js +79 -0
- package/esm/components/promptField/PromptField.d.ts +66 -0
- package/esm/components/promptField/PromptField.js +88 -0
- package/esm/components/promptField/PromptFieldContext.d.ts +16 -0
- package/esm/components/promptField/PromptFieldContext.js +9 -0
- package/esm/components/promptField/PromptFieldControl.d.ts +27 -0
- package/esm/components/promptField/PromptFieldControl.js +95 -0
- package/esm/components/promptField/PromptFieldRecord.d.ts +27 -0
- package/esm/components/promptField/PromptFieldRecord.js +151 -0
- package/esm/components/promptField/PromptFieldSend.d.ts +27 -0
- package/esm/components/promptField/PromptFieldSend.js +76 -0
- package/esm/components/promptField/index.d.ts +4 -0
- package/esm/components/promptField/index.js +4 -0
- package/esm/components/resizablePanel/ResizablePanel.d.ts +10 -0
- package/esm/components/resizablePanel/ResizablePanel.js +52 -0
- package/esm/components/resizablePanel/ResizablePanelContext.d.ts +7 -0
- package/esm/components/resizablePanel/ResizablePanelContext.js +9 -0
- package/esm/components/resizablePanel/ResizablePanelHandle.d.ts +4 -0
- package/esm/components/resizablePanel/ResizablePanelHandle.js +108 -0
- package/esm/components/resizablePanel/index.d.ts +3 -0
- package/esm/components/resizablePanel/index.js +3 -0
- package/esm/components/sidebar/Sidebar.d.ts +4 -0
- package/esm/components/sidebar/Sidebar.js +47 -0
- package/esm/components/sidebar/SidebarHeader.d.ts +4 -0
- package/esm/components/sidebar/SidebarHeader.js +44 -0
- package/esm/components/sidebar/index.d.ts +2 -0
- package/esm/components/sidebar/index.js +2 -0
- package/esm/constants/dataGridPremiumDefaultSlotsComponents.js +3 -0
- package/esm/hooks/features/aggregation/gridAggregationFunctions.js +13 -0
- package/esm/hooks/features/aggregation/gridAggregationSelectors.d.ts +10 -1
- package/esm/hooks/features/aggregation/gridAggregationSelectors.js +28 -1
- package/esm/hooks/features/aggregation/gridAggregationUtils.d.ts +1 -1
- package/esm/hooks/features/aggregation/index.d.ts +1 -1
- package/esm/hooks/features/aggregation/index.js +1 -1
- package/esm/hooks/features/aggregation/useGridAggregation.js +7 -11
- package/esm/hooks/features/aggregation/useGridAggregationPreProcessors.js +2 -8
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +5 -25
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.js +23 -10
- package/esm/hooks/features/aiAssistant/api.d.ts +12 -0
- package/esm/hooks/features/aiAssistant/api.js +31 -0
- package/esm/hooks/features/aiAssistant/gridAiAssistantInterfaces.d.ts +82 -0
- package/esm/hooks/features/aiAssistant/gridAiAssistantSelectors.d.ts +5 -0
- package/esm/hooks/features/aiAssistant/gridAiAssistantSelectors.js +5 -0
- package/esm/hooks/features/aiAssistant/index.d.ts +2 -0
- package/esm/hooks/features/aiAssistant/useGridAiAssistant.d.ts +6 -0
- package/esm/hooks/features/aiAssistant/useGridAiAssistant.js +293 -0
- package/esm/hooks/features/cellSelection/useGridCellSelection.js +6 -6
- package/esm/hooks/features/clipboard/useGridClipboardImport.js +4 -4
- package/esm/hooks/features/dataSource/useGridDataSourcePremium.js +4 -1
- package/esm/hooks/features/export/useGridExcelExport.js +2 -2
- package/esm/hooks/features/index.d.ts +1 -1
- package/esm/hooks/features/index.js +1 -1
- package/esm/hooks/features/pivoting/gridPivotingInterfaces.d.ts +69 -0
- package/esm/hooks/features/pivoting/gridPivotingSelectors.d.ts +4 -0
- package/esm/hooks/features/pivoting/gridPivotingSelectors.js +5 -0
- package/esm/hooks/features/pivoting/useGridPivoting.d.ts +7 -0
- package/esm/hooks/features/pivoting/useGridPivoting.js +339 -0
- package/esm/hooks/features/pivoting/utils.d.ts +21 -0
- package/esm/hooks/features/pivoting/utils.js +259 -0
- package/esm/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +1 -4
- package/esm/hooks/features/rowGrouping/useGridRowGrouping.js +4 -5
- package/esm/hooks/utils/useResize.d.ts +9 -0
- package/esm/hooks/utils/useResize.js +52 -0
- package/esm/index.d.ts +4 -1
- package/esm/index.js +4 -2
- package/esm/material/icons.d.ts +15 -15
- package/esm/material/icons.js +32 -5
- package/esm/material/index.d.ts +31 -5
- package/esm/material/index.js +31 -3
- package/esm/models/dataGridPremiumProps.d.ts +96 -2
- package/esm/models/gridApiPremium.d.ts +4 -2
- package/esm/models/gridPremiumIconSlotsComponent.d.ts +141 -8
- package/esm/models/gridPremiumSlotsComponent.d.ts +13 -1
- package/esm/models/gridStatePremium.d.ts +6 -0
- package/esm/package.json +1 -1
- package/esm/setupExcelExportWebWorker/index.d.ts +1 -0
- package/esm/setupExcelExportWebWorker/index.js +1 -0
- package/esm/typeOverloads/modules.d.ts +32 -1
- package/esm/utils/speechRecognition.d.ts +2 -0
- package/esm/utils/speechRecognition.js +2 -0
- package/hooks/features/aggregation/gridAggregationFunctions.js +13 -0
- package/hooks/features/aggregation/gridAggregationSelectors.d.ts +10 -1
- package/hooks/features/aggregation/gridAggregationSelectors.js +29 -2
- package/hooks/features/aggregation/gridAggregationUtils.d.ts +1 -1
- package/hooks/features/aggregation/index.d.ts +1 -1
- package/hooks/features/aggregation/index.js +21 -11
- package/hooks/features/aggregation/useGridAggregation.js +6 -10
- package/hooks/features/aggregation/useGridAggregationPreProcessors.js +2 -8
- package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +5 -25
- package/hooks/features/aggregation/wrapColumnWithAggregation.js +24 -11
- package/hooks/features/aiAssistant/api.d.ts +12 -0
- package/hooks/features/aiAssistant/api.js +37 -0
- package/hooks/features/aiAssistant/gridAiAssistantInterfaces.d.ts +82 -0
- package/hooks/features/aiAssistant/gridAiAssistantSelectors.d.ts +5 -0
- package/hooks/features/aiAssistant/gridAiAssistantSelectors.js +11 -0
- package/hooks/features/aiAssistant/index.d.ts +2 -0
- package/hooks/features/aiAssistant/useGridAiAssistant.d.ts +6 -0
- package/hooks/features/aiAssistant/useGridAiAssistant.js +303 -0
- package/hooks/features/cellSelection/useGridCellSelection.js +5 -5
- package/hooks/features/clipboard/useGridClipboardImport.js +3 -3
- package/hooks/features/dataSource/useGridDataSourcePremium.js +4 -1
- package/hooks/features/export/useGridExcelExport.js +1 -1
- package/hooks/features/index.d.ts +1 -1
- package/hooks/features/index.js +4 -4
- package/hooks/features/pivoting/gridPivotingInterfaces.d.ts +69 -0
- package/hooks/features/pivoting/gridPivotingInterfaces.js +5 -0
- package/hooks/features/pivoting/gridPivotingSelectors.d.ts +4 -0
- package/hooks/features/pivoting/gridPivotingSelectors.js +30 -0
- package/hooks/features/pivoting/useGridPivoting.d.ts +7 -0
- package/hooks/features/pivoting/useGridPivoting.js +349 -0
- package/hooks/features/pivoting/utils.d.ts +21 -0
- package/hooks/features/pivoting/utils.js +270 -0
- package/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +1 -4
- package/hooks/features/rowGrouping/useGridRowGrouping.js +3 -4
- package/hooks/utils/useResize.d.ts +9 -0
- package/hooks/utils/useResize.js +60 -0
- package/index.d.ts +4 -1
- package/index.js +19 -3
- package/material/icons.d.ts +15 -15
- package/material/icons.js +36 -9
- package/material/index.d.ts +31 -5
- package/material/index.js +30 -2
- package/models/dataGridPremiumProps.d.ts +96 -2
- package/models/gridApiPremium.d.ts +4 -2
- package/models/gridPremiumIconSlotsComponent.d.ts +141 -8
- package/models/gridPremiumSlotsComponent.d.ts +13 -1
- package/models/gridStatePremium.d.ts +6 -0
- package/package.json +12 -18
- package/setupExcelExportWebWorker/index.d.ts +1 -0
- package/{setupExcelExportWebWorker.js → setupExcelExportWebWorker/index.js} +1 -1
- package/typeOverloads/modules.d.ts +32 -1
- package/utils/speechRecognition.d.ts +2 -0
- package/utils/speechRecognition.js +8 -0
- package/components/promptControl/GridToolbarPromptControl.d.ts +0 -26
- package/components/promptControl/GridToolbarPromptControl.js +0 -222
- package/components/promptControl/RecordButton.d.ts +0 -16
- package/components/promptControl/RecordButton.js +0 -119
- package/components/promptControl/index.d.ts +0 -1
- package/components/promptControl/index.js +0 -12
- package/esm/components/promptControl/GridToolbarPromptControl.d.ts +0 -26
- package/esm/components/promptControl/GridToolbarPromptControl.js +0 -215
- package/esm/components/promptControl/RecordButton.d.ts +0 -16
- package/esm/components/promptControl/RecordButton.js +0 -111
- package/esm/components/promptControl/index.d.ts +0 -1
- package/esm/components/promptControl/index.js +0 -1
- package/esm/hooks/features/promptControl/api.d.ts +0 -2
- package/esm/hooks/features/promptControl/api.js +0 -22
- package/esm/hooks/features/promptControl/index.d.ts +0 -2
- package/esm/hooks/features/promptControl/types.d.ts +0 -25
- package/esm/setupExcelExportWebWorker.d.ts +0 -1
- package/esm/setupExcelExportWebWorker.js +0 -1
- package/esm/utils/releaseInfo.d.ts +0 -1
- package/esm/utils/releaseInfo.js +0 -13
- package/hooks/features/promptControl/api.d.ts +0 -2
- package/hooks/features/promptControl/api.js +0 -28
- package/hooks/features/promptControl/index.d.ts +0 -2
- package/hooks/features/promptControl/types.d.ts +0 -25
- package/modern/DataGridPremium/DataGrid.d.ts +0 -8
- package/modern/DataGridPremium/DataGrid.js +0 -19
- package/modern/DataGridPremium/DataGridPremium.d.ts +0 -16
- package/modern/DataGridPremium/DataGridPremium.js +0 -1121
- package/modern/DataGridPremium/index.d.ts +0 -3
- package/modern/DataGridPremium/index.js +0 -3
- package/modern/DataGridPremium/useDataGridPremiumComponent.d.ts +0 -4
- package/modern/DataGridPremium/useDataGridPremiumComponent.js +0 -108
- package/modern/DataGridPremium/useDataGridPremiumProps.d.ts +0 -6
- package/modern/DataGridPremium/useDataGridPremiumProps.js +0 -54
- package/modern/components/GridAggregationHeader.d.ts +0 -7
- package/modern/components/GridAggregationHeader.js +0 -89
- package/modern/components/GridAggregationRowOverlay.d.ts +0 -3
- package/modern/components/GridAggregationRowOverlay.js +0 -37
- package/modern/components/GridBottomContainer.d.ts +0 -3
- package/modern/components/GridBottomContainer.js +0 -43
- package/modern/components/GridColumnMenuAggregationItem.d.ts +0 -7
- package/modern/components/GridColumnMenuAggregationItem.js +0 -124
- package/modern/components/GridColumnMenuRowGroupItem.d.ts +0 -3
- package/modern/components/GridColumnMenuRowGroupItem.js +0 -42
- package/modern/components/GridColumnMenuRowUngroupItem.d.ts +0 -3
- package/modern/components/GridColumnMenuRowUngroupItem.js +0 -44
- package/modern/components/GridDataSourceGroupingCriteriaCell.d.ts +0 -7
- package/modern/components/GridDataSourceGroupingCriteriaCell.js +0 -121
- package/modern/components/GridExcelExportMenuItem.d.ts +0 -9
- package/modern/components/GridExcelExportMenuItem.js +0 -48
- package/modern/components/GridFooterCell.d.ts +0 -9
- package/modern/components/GridFooterCell.js +0 -43
- package/modern/components/GridGroupingColumnFooterCell.d.ts +0 -4
- package/modern/components/GridGroupingColumnFooterCell.js +0 -23
- package/modern/components/GridGroupingColumnLeafCell.d.ts +0 -4
- package/modern/components/GridGroupingColumnLeafCell.js +0 -17
- package/modern/components/GridGroupingCriteriaCell.d.ts +0 -7
- package/modern/components/GridGroupingCriteriaCell.js +0 -87
- package/modern/components/GridPremiumColumnMenu.d.ts +0 -33
- package/modern/components/GridPremiumColumnMenu.js +0 -37
- package/modern/components/GridPremiumToolbar.d.ts +0 -3
- package/modern/components/GridPremiumToolbar.js +0 -23
- package/modern/components/export/ExportExcel.d.ts +0 -29
- package/modern/components/export/ExportExcel.js +0 -209
- package/modern/components/export/index.d.ts +0 -1
- package/modern/components/export/index.js +0 -1
- package/modern/components/index.d.ts +0 -6
- package/modern/components/index.js +0 -6
- package/modern/components/promptControl/GridToolbarPromptControl.d.ts +0 -26
- package/modern/components/promptControl/GridToolbarPromptControl.js +0 -215
- package/modern/components/promptControl/RecordButton.d.ts +0 -16
- package/modern/components/promptControl/RecordButton.js +0 -111
- package/modern/components/promptControl/index.d.ts +0 -1
- package/modern/components/promptControl/index.js +0 -1
- package/modern/components/reexports.d.ts +0 -1
- package/modern/components/reexports.js +0 -1
- package/modern/constants/dataGridPremiumDefaultSlotsComponents.d.ts +0 -2
- package/modern/constants/dataGridPremiumDefaultSlotsComponents.js +0 -11
- package/modern/hooks/features/aggregation/createAggregationLookup.d.ts +0 -17
- package/modern/hooks/features/aggregation/createAggregationLookup.js +0 -111
- package/modern/hooks/features/aggregation/gridAggregationFunctions.d.ts +0 -8
- package/modern/hooks/features/aggregation/gridAggregationFunctions.js +0 -93
- package/modern/hooks/features/aggregation/gridAggregationInterfaces.d.ts +0 -129
- package/modern/hooks/features/aggregation/gridAggregationSelectors.d.ts +0 -13
- package/modern/hooks/features/aggregation/gridAggregationSelectors.js +0 -15
- package/modern/hooks/features/aggregation/gridAggregationUtils.d.ts +0 -62
- package/modern/hooks/features/aggregation/gridAggregationUtils.js +0 -180
- package/modern/hooks/features/aggregation/index.d.ts +0 -4
- package/modern/hooks/features/aggregation/index.js +0 -3
- package/modern/hooks/features/aggregation/useGridAggregation.d.ts +0 -6
- package/modern/hooks/features/aggregation/useGridAggregation.js +0 -103
- package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +0 -4
- package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.js +0 -96
- package/modern/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +0 -81
- package/modern/hooks/features/aggregation/wrapColumnWithAggregation.js +0 -215
- package/modern/hooks/features/cellSelection/gridCellSelectionInterfaces.d.ts +0 -40
- package/modern/hooks/features/cellSelection/gridCellSelectionInterfaces.js +0 -1
- package/modern/hooks/features/cellSelection/gridCellSelectionSelector.d.ts +0 -2
- package/modern/hooks/features/cellSelection/gridCellSelectionSelector.js +0 -2
- package/modern/hooks/features/cellSelection/index.d.ts +0 -1
- package/modern/hooks/features/cellSelection/index.js +0 -1
- package/modern/hooks/features/cellSelection/useGridCellSelection.d.ts +0 -6
- package/modern/hooks/features/cellSelection/useGridCellSelection.js +0 -486
- package/modern/hooks/features/clipboard/useGridClipboardImport.d.ts +0 -4
- package/modern/hooks/features/clipboard/useGridClipboardImport.js +0 -335
- package/modern/hooks/features/dataSource/models.d.ts +0 -54
- package/modern/hooks/features/dataSource/models.js +0 -1
- package/modern/hooks/features/dataSource/useGridDataSourcePremium.d.ts +0 -4
- package/modern/hooks/features/dataSource/useGridDataSourcePremium.js +0 -59
- package/modern/hooks/features/export/gridExcelExportInterface.d.ts +0 -71
- package/modern/hooks/features/export/gridExcelExportInterface.js +0 -1
- package/modern/hooks/features/export/index.d.ts +0 -2
- package/modern/hooks/features/export/index.js +0 -2
- package/modern/hooks/features/export/serializer/excelSerializer.d.ts +0 -40
- package/modern/hooks/features/export/serializer/excelSerializer.js +0 -269
- package/modern/hooks/features/export/serializer/setupExcelExportWebWorker.d.ts +0 -2
- package/modern/hooks/features/export/serializer/setupExcelExportWebWorker.js +0 -53
- package/modern/hooks/features/export/serializer/utils.d.ts +0 -36
- package/modern/hooks/features/export/serializer/utils.js +0 -93
- package/modern/hooks/features/export/useGridExcelExport.d.ts +0 -11
- package/modern/hooks/features/export/useGridExcelExport.js +0 -139
- package/modern/hooks/features/index.d.ts +0 -5
- package/modern/hooks/features/index.js +0 -6
- package/modern/hooks/features/promptControl/api.d.ts +0 -2
- package/modern/hooks/features/promptControl/api.js +0 -22
- package/modern/hooks/features/promptControl/index.d.ts +0 -2
- package/modern/hooks/features/promptControl/index.js +0 -1
- package/modern/hooks/features/promptControl/types.d.ts +0 -25
- package/modern/hooks/features/promptControl/types.js +0 -1
- package/modern/hooks/features/rowGrouping/createGroupingColDef.d.ts +0 -57
- package/modern/hooks/features/rowGrouping/createGroupingColDef.js +0 -272
- package/modern/hooks/features/rowGrouping/gridRowGroupingInterfaces.d.ts +0 -44
- package/modern/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +0 -1
- package/modern/hooks/features/rowGrouping/gridRowGroupingSelector.d.ts +0 -3
- package/modern/hooks/features/rowGrouping/gridRowGroupingSelector.js +0 -5
- package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +0 -54
- package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +0 -173
- package/modern/hooks/features/rowGrouping/index.d.ts +0 -3
- package/modern/hooks/features/rowGrouping/index.js +0 -3
- package/modern/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +0 -4
- package/modern/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +0 -73
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.d.ts +0 -11
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +0 -182
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +0 -4
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +0 -157
- package/modern/hooks/features/rows/index.d.ts +0 -1
- package/modern/hooks/features/rows/index.js +0 -1
- package/modern/hooks/features/rows/useGridRowAriaAttributes.d.ts +0 -1
- package/modern/hooks/features/rows/useGridRowAriaAttributes.js +0 -8
- package/modern/hooks/index.d.ts +0 -2
- package/modern/hooks/index.js +0 -3
- package/modern/hooks/utils/index.d.ts +0 -1
- package/modern/hooks/utils/index.js +0 -1
- package/modern/hooks/utils/useGridApiContext.d.ts +0 -4
- package/modern/hooks/utils/useGridApiContext.js +0 -2
- package/modern/hooks/utils/useGridApiRef.d.ts +0 -4
- package/modern/hooks/utils/useGridApiRef.js +0 -2
- package/modern/hooks/utils/useGridAriaAttributes.d.ts +0 -2
- package/modern/hooks/utils/useGridAriaAttributes.js +0 -13
- package/modern/hooks/utils/useGridPrivateApiContext.d.ts +0 -2
- package/modern/hooks/utils/useGridPrivateApiContext.js +0 -2
- package/modern/hooks/utils/useGridRootProps.d.ts +0 -2
- package/modern/hooks/utils/useGridRootProps.js +0 -2
- package/modern/hooks/utils/useKeepGroupedColumnsHidden.d.ts +0 -12
- package/modern/hooks/utils/useKeepGroupedColumnsHidden.js +0 -43
- package/modern/index.d.ts +0 -23
- package/modern/index.js +0 -26
- package/modern/locales.d.ts +0 -1
- package/modern/locales.js +0 -1
- package/modern/material/icons.d.ts +0 -15
- package/modern/material/icons.js +0 -20
- package/modern/material/index.d.ts +0 -8
- package/modern/material/index.js +0 -11
- package/modern/models/dataGridPremiumProps.d.ts +0 -162
- package/modern/models/dataGridPremiumProps.js +0 -1
- package/modern/models/gridApiPremium.d.ts +0 -14
- package/modern/models/gridApiPremium.js +0 -1
- package/modern/models/gridGroupingValueGetter.d.ts +0 -4
- package/modern/models/gridGroupingValueGetter.js +0 -1
- package/modern/models/gridPastedValueParser.d.ts +0 -4
- package/modern/models/gridPastedValueParser.js +0 -1
- package/modern/models/gridPremiumIconSlotsComponent.d.ts +0 -28
- package/modern/models/gridPremiumIconSlotsComponent.js +0 -1
- package/modern/models/gridPremiumSlotsComponent.d.ts +0 -7
- package/modern/models/gridPremiumSlotsComponent.js +0 -1
- package/modern/models/gridStatePremium.d.ts +0 -18
- package/modern/models/gridStatePremium.js +0 -1
- package/modern/models/index.d.ts +0 -4
- package/modern/models/index.js +0 -4
- package/modern/package.json +0 -1
- package/modern/setupExcelExportWebWorker.d.ts +0 -1
- package/modern/setupExcelExportWebWorker.js +0 -1
- package/modern/themeAugmentation/index.d.ts +0 -2
- package/modern/themeAugmentation/index.js +0 -4
- package/modern/themeAugmentation/overrides.d.ts +0 -7
- package/modern/themeAugmentation/overrides.js +0 -1
- package/modern/themeAugmentation/props.d.ts +0 -15
- package/modern/themeAugmentation/props.js +0 -1
- package/modern/typeOverloads/index.d.ts +0 -2
- package/modern/typeOverloads/index.js +0 -2
- package/modern/typeOverloads/modules.d.ts +0 -97
- package/modern/typeOverloads/modules.js +0 -1
- package/modern/typeOverloads/reexports.d.ts +0 -17
- package/modern/typeOverloads/reexports.js +0 -15
- package/modern/utils/releaseInfo.d.ts +0 -1
- package/modern/utils/releaseInfo.js +0 -13
- package/setupExcelExportWebWorker.d.ts +0 -1
- package/tsconfig.build.tsbuildinfo +0 -1
- package/utils/releaseInfo.d.ts +0 -1
- package/utils/releaseInfo.js +0 -20
- /package/esm/hooks/features/{promptControl/types.js → aiAssistant/gridAiAssistantInterfaces.js} +0 -0
- /package/esm/hooks/features/{promptControl → aiAssistant}/index.js +0 -0
- /package/{modern/hooks/features/aggregation/gridAggregationInterfaces.js → esm/hooks/features/pivoting/gridPivotingInterfaces.js} +0 -0
- /package/hooks/features/{promptControl/types.js → aiAssistant/gridAiAssistantInterfaces.js} +0 -0
- /package/hooks/features/{promptControl → aiAssistant}/index.js +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { GridExportDisplayOptions, GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
2
2
|
import type { GridControlledStateEventLookupPro, GridApiCachesPro, GridEventLookupPro } from '@mui/x-data-grid-pro/typeOverloads';
|
|
3
3
|
import type { GridGroupingValueGetter, GridPastedValueParser } from '../models';
|
|
4
|
-
import type { GridRowGroupingModel, GridAggregationModel, GridAggregationCellMeta, GridAggregationHeaderMeta, GridCellSelectionModel } from '../hooks';
|
|
4
|
+
import type { GridRowGroupingModel, GridAggregationModel, GridAggregationCellMeta, GridAggregationHeaderMeta, GridCellSelectionModel, Conversation } from '../hooks';
|
|
5
5
|
import { GridRowGroupingInternalCache } from "../hooks/features/rowGrouping/gridRowGroupingInterfaces.js";
|
|
6
6
|
import { GridAggregationInternalCache } from "../hooks/features/aggregation/gridAggregationInterfaces.js";
|
|
7
7
|
import type { GridExcelExportOptions } from '../hooks/features/export/gridExcelExportInterface';
|
|
8
|
+
import type { GridPivotModel } from '../hooks/features/pivoting/gridPivotingInterfaces';
|
|
8
9
|
export interface GridControlledStateEventLookupPremium {
|
|
9
10
|
/**
|
|
10
11
|
* Fired when the aggregation model changes.
|
|
@@ -30,6 +31,30 @@ export interface GridControlledStateEventLookupPremium {
|
|
|
30
31
|
excelExportStateChange: {
|
|
31
32
|
params: 'pending' | 'finished';
|
|
32
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* Fired when the pivot model changes.
|
|
36
|
+
*/
|
|
37
|
+
pivotModelChange: {
|
|
38
|
+
params: GridPivotModel;
|
|
39
|
+
};
|
|
40
|
+
pivotModeChange: {
|
|
41
|
+
params: boolean;
|
|
42
|
+
};
|
|
43
|
+
pivotPanelOpenChange: {
|
|
44
|
+
params: boolean;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Fired when the AI Assistant conversation state changes.
|
|
48
|
+
*/
|
|
49
|
+
aiAssistantConversationsChange: {
|
|
50
|
+
params: Conversation[];
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Fired when the AI Assistant active conversation index changes.
|
|
54
|
+
*/
|
|
55
|
+
aiAssistantActiveConversationIndexChange: {
|
|
56
|
+
params: number;
|
|
57
|
+
};
|
|
33
58
|
}
|
|
34
59
|
interface GridEventLookupPremium extends GridEventLookupPro {
|
|
35
60
|
/**
|
|
@@ -58,6 +83,7 @@ export interface GridColDefPremium<R extends GridValidRowModel = any, V = any, F
|
|
|
58
83
|
availableAggregationFunctions?: string[];
|
|
59
84
|
/**
|
|
60
85
|
* Function that transforms a complex cell value into a key that be used for grouping the rows.
|
|
86
|
+
* Not supported with the server-side row grouping. Use `dataSource.getGroupKey()` instead.
|
|
61
87
|
* @returns {GridKeyValue | null | undefined} The cell key.
|
|
62
88
|
*/
|
|
63
89
|
groupingValueGetter?: GridGroupingValueGetter<R>;
|
|
@@ -66,6 +92,11 @@ export interface GridColDefPremium<R extends GridValidRowModel = any, V = any, F
|
|
|
66
92
|
* @returns {V} The converted value.
|
|
67
93
|
*/
|
|
68
94
|
pastedValueParser?: GridPastedValueParser<R, V, F>;
|
|
95
|
+
/**
|
|
96
|
+
* If `false`, the column will not be available for pivoting in the pivot panel.
|
|
97
|
+
* @default true
|
|
98
|
+
*/
|
|
99
|
+
pivotable?: boolean;
|
|
69
100
|
}
|
|
70
101
|
export interface GridRenderCellParamsPremium<R extends GridValidRowModel = any, V = any, F = V> {
|
|
71
102
|
aggregation?: GridAggregationCellMeta;
|
|
@@ -36,6 +36,9 @@ const avgAgg = {
|
|
|
36
36
|
sum += value;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
if (sum === 0) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
39
42
|
return sum / valuesCount;
|
|
40
43
|
},
|
|
41
44
|
columnTypes: ['number']
|
|
@@ -47,13 +50,18 @@ const minAgg = {
|
|
|
47
50
|
if (values.length === 0) {
|
|
48
51
|
return null;
|
|
49
52
|
}
|
|
53
|
+
let hasValidValue = false;
|
|
50
54
|
let min = +Infinity;
|
|
51
55
|
for (let i = 0; i < values.length; i += 1) {
|
|
52
56
|
const value = values[i];
|
|
53
57
|
if (value != null && value < min) {
|
|
54
58
|
min = value;
|
|
59
|
+
hasValidValue = true;
|
|
55
60
|
}
|
|
56
61
|
}
|
|
62
|
+
if (!hasValidValue) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
57
65
|
return min;
|
|
58
66
|
},
|
|
59
67
|
columnTypes: ['number', 'date', 'dateTime']
|
|
@@ -65,13 +73,18 @@ const maxAgg = {
|
|
|
65
73
|
if (values.length === 0) {
|
|
66
74
|
return null;
|
|
67
75
|
}
|
|
76
|
+
let hasValidValue = false;
|
|
68
77
|
let max = -Infinity;
|
|
69
78
|
for (let i = 0; i < values.length; i += 1) {
|
|
70
79
|
const value = values[i];
|
|
71
80
|
if (value != null && value > max) {
|
|
72
81
|
max = value;
|
|
82
|
+
hasValidValue = true;
|
|
73
83
|
}
|
|
74
84
|
}
|
|
85
|
+
if (!hasValidValue) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
75
88
|
return max;
|
|
76
89
|
},
|
|
77
90
|
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>;
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.gridAggregationStateSelector = exports.gridAggregationModelSelector = exports.gridAggregationLookupSelector = void 0;
|
|
6
|
+
exports.gridCellAggregationResultSelector = exports.gridAggregationStateSelector = exports.gridAggregationModelSelector = exports.gridAggregationLookupSelector = void 0;
|
|
7
7
|
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
8
|
+
var _xDataGrid = require("@mui/x-data-grid");
|
|
8
9
|
const gridAggregationStateSelector = exports.gridAggregationStateSelector = (0, _internals.createRootSelector)(state => state.aggregation);
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -18,4 +19,30 @@ const gridAggregationModelSelector = exports.gridAggregationModelSelector = (0,
|
|
|
18
19
|
* Get the aggregation results as a lookup.
|
|
19
20
|
* @category Aggregation
|
|
20
21
|
*/
|
|
21
|
-
const gridAggregationLookupSelector = exports.gridAggregationLookupSelector = (0, _internals.createSelector)(gridAggregationStateSelector, aggregationState => aggregationState.lookup);
|
|
22
|
+
const gridAggregationLookupSelector = exports.gridAggregationLookupSelector = (0, _internals.createSelector)(gridAggregationStateSelector, aggregationState => aggregationState.lookup);
|
|
23
|
+
const gridCellAggregationResultSelector = exports.gridCellAggregationResultSelector = (0, _internals.createSelector)(_xDataGrid.gridRowTreeSelector, gridAggregationLookupSelector, (rowTree, aggregationLookup, {
|
|
24
|
+
id,
|
|
25
|
+
field
|
|
26
|
+
}) => {
|
|
27
|
+
let cellAggregationPosition = null;
|
|
28
|
+
const rowNode = rowTree[id];
|
|
29
|
+
if (!rowNode) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
if (rowNode.type === 'group') {
|
|
33
|
+
cellAggregationPosition = 'inline';
|
|
34
|
+
} else if (id.toString().startsWith('auto-generated-group-footer-')) {
|
|
35
|
+
cellAggregationPosition = 'footer';
|
|
36
|
+
}
|
|
37
|
+
if (cellAggregationPosition == null) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// TODO: Add custom root id
|
|
42
|
+
const groupId = cellAggregationPosition === 'inline' ? id : rowNode.parent ?? '';
|
|
43
|
+
const aggregationResult = aggregationLookup?.[groupId]?.[field];
|
|
44
|
+
if (!aggregationResult || aggregationResult.position !== cellAggregationPosition) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return aggregationResult;
|
|
48
|
+
});
|
|
@@ -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";
|
|
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
|
+
gridAggregationStateSelector: true,
|
|
8
|
+
gridAggregationLookupSelector: true,
|
|
9
|
+
gridAggregationModelSelector: true,
|
|
7
10
|
GRID_AGGREGATION_ROOT_FOOTER_ROW_ID: true,
|
|
8
11
|
getAggregationFooterRowIdFromGroupId: true
|
|
9
12
|
};
|
|
@@ -19,18 +22,25 @@ Object.defineProperty(exports, "getAggregationFooterRowIdFromGroupId", {
|
|
|
19
22
|
return _gridAggregationUtils.getAggregationFooterRowIdFromGroupId;
|
|
20
23
|
}
|
|
21
24
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
25
|
+
Object.defineProperty(exports, "gridAggregationLookupSelector", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _gridAggregationSelectors.gridAggregationLookupSelector;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "gridAggregationModelSelector", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () {
|
|
34
|
+
return _gridAggregationSelectors.gridAggregationModelSelector;
|
|
35
|
+
}
|
|
33
36
|
});
|
|
37
|
+
Object.defineProperty(exports, "gridAggregationStateSelector", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () {
|
|
40
|
+
return _gridAggregationSelectors.gridAggregationStateSelector;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
var _gridAggregationSelectors = require("./gridAggregationSelectors");
|
|
34
44
|
var _gridAggregationFunctions = require("./gridAggregationFunctions");
|
|
35
45
|
Object.keys(_gridAggregationFunctions).forEach(function (key) {
|
|
36
46
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -83,13 +83,9 @@ const useGridAggregation = (apiRef, props) => {
|
|
|
83
83
|
const aggregationRules = props.disableAggregation ? {} : (0, _gridAggregationUtils.getAggregationRules)((0, _xDataGridPro.gridColumnLookupSelector)(apiRef), (0, _gridAggregationSelectors.gridAggregationModelSelector)(apiRef), props.aggregationFunctions, !!props.dataSource);
|
|
84
84
|
|
|
85
85
|
// Re-apply the row hydration to add / remove the aggregation footers
|
|
86
|
-
if (!(0, _gridAggregationUtils.areAggregationRulesEqual)(rulesOnLastRowHydration, aggregationRules)) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
} else {
|
|
90
|
-
apiRef.current.requestPipeProcessorsApplication('hydrateRows');
|
|
91
|
-
applyAggregation();
|
|
92
|
-
}
|
|
86
|
+
if (!props.dataSource && !(0, _gridAggregationUtils.areAggregationRulesEqual)(rulesOnLastRowHydration, aggregationRules)) {
|
|
87
|
+
apiRef.current.requestPipeProcessorsApplication('hydrateRows');
|
|
88
|
+
applyAggregation();
|
|
93
89
|
}
|
|
94
90
|
|
|
95
91
|
// Re-apply the column hydration to wrap / unwrap the aggregated columns
|
|
@@ -97,9 +93,9 @@ const useGridAggregation = (apiRef, props) => {
|
|
|
97
93
|
apiRef.current.requestPipeProcessorsApplication('hydrateColumns');
|
|
98
94
|
}
|
|
99
95
|
}, [apiRef, applyAggregation, props.aggregationFunctions, props.disableAggregation, props.dataSource]);
|
|
100
|
-
(0, _xDataGridPro.
|
|
101
|
-
(0, _xDataGridPro.
|
|
102
|
-
(0, _xDataGridPro.
|
|
96
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'aggregationModelChange', checkAggregationRulesDiff);
|
|
97
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'columnsChange', checkAggregationRulesDiff);
|
|
98
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'filteredRowsSet', applyAggregation);
|
|
103
99
|
|
|
104
100
|
/**
|
|
105
101
|
* EFFECTS
|
|
@@ -24,16 +24,10 @@ const useGridAggregationPreProcessors = (apiRef, props) => {
|
|
|
24
24
|
const haveAggregationColumnValue = !!rulesOnLastColumnHydration.current[field];
|
|
25
25
|
let column = columnsState.lookup[field];
|
|
26
26
|
if (haveAggregationColumnValue) {
|
|
27
|
-
column = (0, _wrapColumnWithAggregation.unwrapColumnFromAggregation)(
|
|
28
|
-
column
|
|
29
|
-
});
|
|
27
|
+
column = (0, _wrapColumnWithAggregation.unwrapColumnFromAggregation)(column);
|
|
30
28
|
}
|
|
31
29
|
if (shouldHaveAggregationValue) {
|
|
32
|
-
column = (0, _wrapColumnWithAggregation.wrapColumnWithAggregationValue)(
|
|
33
|
-
column,
|
|
34
|
-
aggregationRule: aggregationRules[field],
|
|
35
|
-
apiRef
|
|
36
|
-
});
|
|
30
|
+
column = (0, _wrapColumnWithAggregation.wrapColumnWithAggregationValue)(column, aggregationRules[field], apiRef);
|
|
37
31
|
}
|
|
38
32
|
columnsState.lookup[field] = column;
|
|
39
33
|
});
|
|
@@ -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
|
+
};
|
|
@@ -13,6 +13,7 @@ var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
|
13
13
|
var _gridAggregationSelectors = require("./gridAggregationSelectors");
|
|
14
14
|
var _GridFooterCell = require("../../../components/GridFooterCell");
|
|
15
15
|
var _GridAggregationHeader = require("../../../components/GridAggregationHeader");
|
|
16
|
+
var _gridPivotingSelectors = require("../pivoting/gridPivotingSelectors");
|
|
16
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
18
|
const _excluded = ["aggregationWrappedProperties"];
|
|
18
19
|
const getAggregationValueWrappedValueGetter = ({
|
|
@@ -60,8 +61,10 @@ const getAggregationValueWrappedValueFormatter = ({
|
|
|
60
61
|
const getAggregationValueWrappedRenderCell = ({
|
|
61
62
|
value: renderCell,
|
|
62
63
|
aggregationRule,
|
|
63
|
-
getCellAggregationResult
|
|
64
|
+
getCellAggregationResult,
|
|
65
|
+
apiRef
|
|
64
66
|
}) => {
|
|
67
|
+
const pivotActive = (0, _gridPivotingSelectors.gridPivotActiveSelector)(apiRef);
|
|
65
68
|
const wrappedRenderCell = params => {
|
|
66
69
|
const cellAggregationResult = getCellAggregationResult(params.id, params.field);
|
|
67
70
|
if (cellAggregationResult != null) {
|
|
@@ -69,8 +72,14 @@ const getAggregationValueWrappedRenderCell = ({
|
|
|
69
72
|
if (cellAggregationResult.position === 'footer') {
|
|
70
73
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridFooterCell.GridFooterCell, (0, _extends2.default)({}, params));
|
|
71
74
|
}
|
|
75
|
+
if (pivotActive && cellAggregationResult.value === 0) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
72
78
|
return params.formattedValue;
|
|
73
79
|
}
|
|
80
|
+
if (pivotActive && cellAggregationResult.value === 0) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
74
83
|
const aggregationMeta = {
|
|
75
84
|
hasCellUnit: aggregationRule.aggregationFunction.hasCellUnit ?? true,
|
|
76
85
|
aggregationFunctionName: aggregationRule.aggregationFunctionName
|
|
@@ -122,6 +131,10 @@ const getWrappedRenderHeader = ({
|
|
|
122
131
|
aggregationRule
|
|
123
132
|
}) => {
|
|
124
133
|
const wrappedRenderHeader = params => {
|
|
134
|
+
// TODO: investigate why colDef is undefined
|
|
135
|
+
if (!params.colDef) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
125
138
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridAggregationHeader.GridAggregationHeader, (0, _extends2.default)({}, params, {
|
|
126
139
|
aggregation: {
|
|
127
140
|
aggregationRule
|
|
@@ -135,14 +148,13 @@ const getWrappedRenderHeader = ({
|
|
|
135
148
|
/**
|
|
136
149
|
* Add a wrapper around each wrappable property of the column to customize the behavior of the aggregation cells.
|
|
137
150
|
*/
|
|
138
|
-
const wrapColumnWithAggregationValue = ({
|
|
139
|
-
column,
|
|
140
|
-
apiRef,
|
|
141
|
-
aggregationRule
|
|
142
|
-
}) => {
|
|
151
|
+
const wrapColumnWithAggregationValue = (column, aggregationRule, apiRef) => {
|
|
143
152
|
const getCellAggregationResult = (id, field) => {
|
|
144
153
|
let cellAggregationPosition = null;
|
|
145
154
|
const rowNode = (0, _xDataGridPro.gridRowNodeSelector)(apiRef, id);
|
|
155
|
+
if (!rowNode) {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
146
158
|
if (rowNode.type === 'group') {
|
|
147
159
|
cellAggregationPosition = 'inline';
|
|
148
160
|
} else if (id.toString().startsWith('auto-generated-group-footer-')) {
|
|
@@ -193,15 +205,16 @@ const wrapColumnWithAggregationValue = ({
|
|
|
193
205
|
}
|
|
194
206
|
return wrappedColumn;
|
|
195
207
|
};
|
|
208
|
+
exports.wrapColumnWithAggregationValue = wrapColumnWithAggregationValue;
|
|
209
|
+
const isColumnWrappedWithAggregation = column => {
|
|
210
|
+
return typeof column.aggregationWrappedProperties !== 'undefined';
|
|
211
|
+
};
|
|
196
212
|
|
|
197
213
|
/**
|
|
198
214
|
* Remove the aggregation wrappers around the wrappable properties of the column.
|
|
199
215
|
*/
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
column
|
|
203
|
-
}) => {
|
|
204
|
-
if (!column.aggregationWrappedProperties) {
|
|
216
|
+
const unwrapColumnFromAggregation = column => {
|
|
217
|
+
if (!isColumnWrappedWithAggregation(column)) {
|
|
205
218
|
return column;
|
|
206
219
|
}
|
|
207
220
|
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,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.gridDefaultPromptResolver = gridDefaultPromptResolver;
|
|
7
|
+
/**
|
|
8
|
+
* Prompt resolver for the <DataGridPremium /> component.
|
|
9
|
+
* @param {string} url The URL to send the request to.
|
|
10
|
+
* @param {string} query The query to be processed.
|
|
11
|
+
* @param {string} context The prompt context containing necessary information about the current columns definition.
|
|
12
|
+
* Either use the `context` parameter of the `onPrompt` callback or the return value of the `unstable_getPromptContext()` API method.
|
|
13
|
+
* @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.
|
|
14
|
+
* @param {string} additionalContext Optional, additional context to make the processing results more accurate.
|
|
15
|
+
* @returns {Promise<PromptResponse>} The grid state updates to be applied.
|
|
16
|
+
*/
|
|
17
|
+
function gridDefaultPromptResolver(url, query, context, conversationId, additionalContext = '') {
|
|
18
|
+
return fetch(url, {
|
|
19
|
+
mode: 'cors',
|
|
20
|
+
method: 'POST',
|
|
21
|
+
headers: {
|
|
22
|
+
'content-type': 'application/json'
|
|
23
|
+
},
|
|
24
|
+
credentials: 'include',
|
|
25
|
+
body: JSON.stringify({
|
|
26
|
+
context,
|
|
27
|
+
query,
|
|
28
|
+
additionalContext,
|
|
29
|
+
conversationId
|
|
30
|
+
})
|
|
31
|
+
}).then(result => result.json()).then(result => {
|
|
32
|
+
if (result.ok === false) {
|
|
33
|
+
return Promise.reject(new Error(result.message));
|
|
34
|
+
}
|
|
35
|
+
return result.data;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export type Prompt = {
|
|
2
|
+
value: string;
|
|
3
|
+
createdAt: Date;
|
|
4
|
+
response?: PromptResponse;
|
|
5
|
+
variant?: 'success' | 'error' | 'processing';
|
|
6
|
+
helperText?: string;
|
|
7
|
+
};
|
|
8
|
+
export type PromptSuggestion = {
|
|
9
|
+
value: string;
|
|
10
|
+
};
|
|
11
|
+
export type Conversation = {
|
|
12
|
+
id?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
prompts: Prompt[];
|
|
15
|
+
};
|
|
16
|
+
export type GridAiAssistantState = {
|
|
17
|
+
activeConversationIndex: number;
|
|
18
|
+
conversations: Conversation[];
|
|
19
|
+
};
|
|
20
|
+
export type GridAiAssistantInitialState = Partial<GridAiAssistantState>;
|
|
21
|
+
type ColumnSort = {
|
|
22
|
+
column: string;
|
|
23
|
+
direction: 'asc' | 'desc';
|
|
24
|
+
};
|
|
25
|
+
type ColumnFilter = {
|
|
26
|
+
operator: string;
|
|
27
|
+
value: string | number | boolean | string[] | number[];
|
|
28
|
+
column: string;
|
|
29
|
+
};
|
|
30
|
+
type Grouping = {
|
|
31
|
+
column: string;
|
|
32
|
+
};
|
|
33
|
+
type AggregationFunction = 'avg' | 'sum' | 'min' | 'max' | 'size';
|
|
34
|
+
type Aggregation = {
|
|
35
|
+
[column: string]: AggregationFunction;
|
|
36
|
+
};
|
|
37
|
+
type Pivoting = {
|
|
38
|
+
columns: ColumnSort[];
|
|
39
|
+
rows: string[];
|
|
40
|
+
values: Aggregation[];
|
|
41
|
+
} | {};
|
|
42
|
+
export type PromptResponse = {
|
|
43
|
+
conversationId: string;
|
|
44
|
+
select: number;
|
|
45
|
+
filters: ColumnFilter[];
|
|
46
|
+
filterOperator?: 'and' | 'or';
|
|
47
|
+
aggregation: Aggregation;
|
|
48
|
+
sorting: ColumnSort[];
|
|
49
|
+
grouping: Grouping[];
|
|
50
|
+
pivoting: Pivoting;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* The prompt API interface that is available in the grid [[apiRef]].
|
|
54
|
+
*/
|
|
55
|
+
export interface GridAiAssistantApi {
|
|
56
|
+
/**
|
|
57
|
+
* The AI assistant API.
|
|
58
|
+
*/
|
|
59
|
+
aiAssistant: {
|
|
60
|
+
/**
|
|
61
|
+
* Calls the `onPrompt()` callback to evaluate the prompt and get the necessary updates to the grid state.
|
|
62
|
+
* Adds the prompt to the current conversation.
|
|
63
|
+
* Updates the grid state based on the prompt response.
|
|
64
|
+
* @param {string} value The prompt to process
|
|
65
|
+
* @returns {Promise<PromptResponse | Error>} The grid state updates or a processing error
|
|
66
|
+
*/
|
|
67
|
+
processPrompt: (value: string) => Promise<PromptResponse | Error>;
|
|
68
|
+
/**
|
|
69
|
+
* Sets the conversations.
|
|
70
|
+
* @param {Conversation[] | ((prevConversations: Conversation[]) => Conversation[])} conversations The new conversations.
|
|
71
|
+
*/
|
|
72
|
+
setConversations: (conversations: Conversation[] | ((prevConversations: Conversation[]) => Conversation[])) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Sets the active conversation index.
|
|
75
|
+
* @param {number} index The index of the conversation that should become active.
|
|
76
|
+
* @returns {Conversation} The active conversation.
|
|
77
|
+
* @throws {Error} If the conversation index does not exist.
|
|
78
|
+
*/
|
|
79
|
+
setActiveConversationIndex: (index: number) => Conversation;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { GridStatePremium } from '../../../models/gridStatePremium';
|
|
2
|
+
import { Conversation } from "./gridAiAssistantInterfaces.js";
|
|
3
|
+
export declare const gridAiAssistantActiveConversationIndexSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, import("./gridAiAssistantInterfaces").GridAiAssistantState, number>;
|
|
4
|
+
export declare const gridAiAssistantConversationsSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, import("./gridAiAssistantInterfaces").GridAiAssistantState, Conversation[]>;
|
|
5
|
+
export declare const gridAiAssistantActiveConversationSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, number, Conversation | undefined>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.gridAiAssistantConversationsSelector = exports.gridAiAssistantActiveConversationSelector = exports.gridAiAssistantActiveConversationIndexSelector = void 0;
|
|
7
|
+
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
8
|
+
const gridAiAssistantStateSelector = (0, _internals.createRootSelector)(state => state.aiAssistant);
|
|
9
|
+
const gridAiAssistantActiveConversationIndexSelector = exports.gridAiAssistantActiveConversationIndexSelector = (0, _internals.createSelector)(gridAiAssistantStateSelector, aiAssistant => aiAssistant?.activeConversationIndex);
|
|
10
|
+
const gridAiAssistantConversationsSelector = exports.gridAiAssistantConversationsSelector = (0, _internals.createSelector)(gridAiAssistantStateSelector, aiAssistant => aiAssistant?.conversations);
|
|
11
|
+
const gridAiAssistantActiveConversationSelector = exports.gridAiAssistantActiveConversationSelector = (0, _internals.createSelectorMemoized)(gridAiAssistantConversationsSelector, gridAiAssistantActiveConversationIndexSelector, (conversations, index) => conversations[index]);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
+
import { GridStateInitializer } from '@mui/x-data-grid-pro/internals';
|
|
3
|
+
import { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
4
|
+
import { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
|
|
5
|
+
export declare const aiAssistantStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'initialState' | 'aiAssistantConversations' | 'aiAssistant'>>;
|
|
6
|
+
export declare const useGridAiAssistant: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "aiAssistant" | "aiAssistantConversations" | "aiAssistantActiveConversationIndex" | "allowAiAssistantDataSampling" | "onAiAssistantConversationsChange" | "onAiAssistantActiveConversationIndexChange" | "onPrompt" | "slots" | "disableColumnFilter" | "disableRowGrouping" | "disableAggregation" | "disableColumnSorting" | "disablePivoting">) => void;
|