@mui/x-data-grid-premium 8.0.0-alpha.12 → 8.0.0-alpha.14
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 +430 -0
- package/DataGridPremium/DataGridPremium.js +51 -39
- package/DataGridPremium/useDataGridPremiumProps.js +2 -2
- package/components/GridAggregationHeader.d.ts +1 -1
- package/components/GridAggregationHeader.js +7 -11
- package/components/GridColumnMenuAggregationItem.js +4 -4
- package/components/GridDataSourceGroupingCriteriaCell.js +5 -6
- package/components/GridFooterCell.js +5 -6
- package/components/GridGroupingColumnFooterCell.js +2 -1
- package/components/GridGroupingColumnLeafCell.js +3 -9
- package/components/GridGroupingCriteriaCell.js +3 -8
- package/components/GridPremiumToolbar.d.ts +3 -0
- package/components/GridPremiumToolbar.js +31 -0
- package/components/export/ExportExcel.d.ts +29 -0
- package/components/export/ExportExcel.js +198 -0
- package/components/export/index.d.ts +1 -0
- package/components/export/index.js +16 -0
- package/components/index.d.ts +2 -1
- package/components/index.js +13 -1
- package/components/promptControl/GridToolbarPromptControl.js +34 -32
- package/constants/dataGridPremiumDefaultSlotsComponents.js +3 -1
- package/esm/DataGridPremium/DataGridPremium.js +51 -39
- package/esm/DataGridPremium/useDataGridPremiumProps.js +2 -2
- package/esm/components/GridAggregationHeader.d.ts +1 -1
- package/esm/components/GridAggregationHeader.js +7 -11
- package/esm/components/GridColumnMenuAggregationItem.js +4 -4
- package/esm/components/GridDataSourceGroupingCriteriaCell.js +6 -7
- package/esm/components/GridFooterCell.js +5 -6
- package/esm/components/GridGroupingColumnFooterCell.js +2 -1
- package/esm/components/GridGroupingColumnLeafCell.js +3 -8
- package/esm/components/GridGroupingCriteriaCell.js +3 -8
- package/esm/components/GridPremiumToolbar.d.ts +3 -0
- package/esm/components/GridPremiumToolbar.js +23 -0
- package/esm/components/export/ExportExcel.d.ts +29 -0
- package/esm/components/export/ExportExcel.js +191 -0
- package/esm/components/export/index.d.ts +1 -0
- package/esm/components/export/index.js +1 -0
- package/esm/components/index.d.ts +2 -1
- package/esm/components/index.js +2 -1
- package/esm/components/promptControl/GridToolbarPromptControl.js +34 -32
- package/esm/constants/dataGridPremiumDefaultSlotsComponents.js +3 -1
- package/esm/hooks/features/aggregation/useGridAggregation.d.ts +1 -1
- package/esm/hooks/features/aggregation/useGridAggregation.js +6 -6
- package/esm/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +1 -1
- package/esm/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -6
- package/esm/hooks/features/clipboard/useGridClipboardImport.js +3 -3
- package/esm/hooks/features/dataSource/models.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourcePremium.js +3 -3
- package/esm/hooks/features/rowGrouping/gridRowGroupingUtils.js +2 -2
- package/esm/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +1 -1
- package/esm/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +3 -3
- package/esm/hooks/features/rowGrouping/useGridRowGrouping.d.ts +1 -1
- package/esm/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
- package/esm/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +1 -1
- package/esm/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +5 -5
- package/esm/index.d.ts +0 -6
- package/esm/index.js +1 -7
- package/esm/models/dataGridPremiumProps.d.ts +7 -8
- package/esm/utils/releaseInfo.js +1 -1
- package/hooks/features/aggregation/useGridAggregation.d.ts +1 -1
- package/hooks/features/aggregation/useGridAggregation.js +6 -6
- package/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +1 -1
- package/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -6
- package/hooks/features/clipboard/useGridClipboardImport.js +2 -2
- package/hooks/features/dataSource/models.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourcePremium.js +3 -3
- package/hooks/features/rowGrouping/gridRowGroupingUtils.js +1 -1
- package/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +1 -1
- package/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +3 -3
- package/hooks/features/rowGrouping/useGridRowGrouping.d.ts +1 -1
- package/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +1 -1
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +5 -5
- package/index.d.ts +0 -6
- package/index.js +2 -11
- package/models/dataGridPremiumProps.d.ts +7 -8
- package/modern/DataGridPremium/DataGridPremium.js +51 -39
- package/modern/DataGridPremium/useDataGridPremiumProps.js +2 -2
- package/modern/components/GridAggregationHeader.d.ts +1 -1
- package/modern/components/GridAggregationHeader.js +7 -11
- package/modern/components/GridColumnMenuAggregationItem.js +4 -4
- package/modern/components/GridDataSourceGroupingCriteriaCell.js +6 -7
- package/modern/components/GridFooterCell.js +5 -6
- package/modern/components/GridGroupingColumnFooterCell.js +2 -1
- package/modern/components/GridGroupingColumnLeafCell.js +3 -8
- package/modern/components/GridGroupingCriteriaCell.js +3 -8
- package/modern/components/GridPremiumToolbar.d.ts +3 -0
- package/modern/components/GridPremiumToolbar.js +23 -0
- package/modern/components/export/ExportExcel.d.ts +29 -0
- package/modern/components/export/ExportExcel.js +191 -0
- package/modern/components/export/index.d.ts +1 -0
- package/modern/components/export/index.js +1 -0
- package/modern/components/index.d.ts +2 -1
- package/modern/components/index.js +2 -1
- package/modern/components/promptControl/GridToolbarPromptControl.js +34 -32
- package/modern/constants/dataGridPremiumDefaultSlotsComponents.js +3 -1
- package/modern/hooks/features/aggregation/useGridAggregation.d.ts +1 -1
- package/modern/hooks/features/aggregation/useGridAggregation.js +6 -6
- package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +1 -1
- package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -6
- package/modern/hooks/features/clipboard/useGridClipboardImport.js +3 -3
- package/modern/hooks/features/dataSource/models.d.ts +1 -1
- package/modern/hooks/features/dataSource/useGridDataSourcePremium.js +3 -3
- package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +2 -2
- package/modern/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +1 -1
- package/modern/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +3 -3
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.d.ts +1 -1
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +1 -1
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +5 -5
- package/modern/index.d.ts +0 -6
- package/modern/index.js +1 -7
- package/modern/models/dataGridPremiumProps.d.ts +7 -8
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +5 -5
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/releaseInfo.js +1 -1
|
@@ -9,7 +9,7 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
9
9
|
if (props.disableRowGrouping) {
|
|
10
10
|
return [];
|
|
11
11
|
}
|
|
12
|
-
const strategy = props.
|
|
12
|
+
const strategy = props.dataSource ? RowGroupingStrategy.DataSource : RowGroupingStrategy.Default;
|
|
13
13
|
const groupingColDefProp = props.groupingColDef;
|
|
14
14
|
|
|
15
15
|
// We can't use `gridGroupingRowsSanitizedModelSelector` here because the new columns are not in the state yet
|
|
@@ -43,7 +43,7 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
43
43
|
return [];
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
}, [apiRef, props.groupingColDef, props.rowGroupingColumnMode, props.disableRowGrouping, props.
|
|
46
|
+
}, [apiRef, props.groupingColDef, props.rowGroupingColumnMode, props.disableRowGrouping, props.dataSource]);
|
|
47
47
|
const updateGroupingColumn = React.useCallback(columnsState => {
|
|
48
48
|
const groupingColDefs = getGroupingColDefs(columnsState);
|
|
49
49
|
let newColumnFields = [];
|
|
@@ -148,14 +148,14 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
148
148
|
useGridRegisterStrategyProcessor(apiRef, RowGroupingStrategy.Default, 'sorting', sortRows);
|
|
149
149
|
useGridRegisterStrategyProcessor(apiRef, RowGroupingStrategy.Default, 'visibleRowsLookupCreation', getVisibleRowsLookup);
|
|
150
150
|
useFirstRender(() => {
|
|
151
|
-
setStrategyAvailability(apiRef, props.disableRowGrouping, props.
|
|
151
|
+
setStrategyAvailability(apiRef, props.disableRowGrouping, props.dataSource);
|
|
152
152
|
});
|
|
153
153
|
const isFirstRender = React.useRef(true);
|
|
154
154
|
React.useEffect(() => {
|
|
155
155
|
if (!isFirstRender.current) {
|
|
156
|
-
setStrategyAvailability(apiRef, props.disableRowGrouping, props.
|
|
156
|
+
setStrategyAvailability(apiRef, props.disableRowGrouping, props.dataSource);
|
|
157
157
|
} else {
|
|
158
158
|
isFirstRender.current = false;
|
|
159
159
|
}
|
|
160
|
-
}, [apiRef, props.disableRowGrouping, props.
|
|
160
|
+
}, [apiRef, props.disableRowGrouping, props.dataSource]);
|
|
161
161
|
};
|
package/modern/index.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import "./typeOverloads/index.js";
|
|
2
|
-
import { LicenseInfo as LicenseInfoExport } from '@mui/x-license';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use `@mui/x-license` package instead:
|
|
5
|
-
* @example import { LicenseInfo } from '@mui/x-license';
|
|
6
|
-
*/
|
|
7
|
-
export declare class LicenseInfo extends LicenseInfoExport {}
|
|
8
2
|
export * from '@mui/x-data-grid/components';
|
|
9
3
|
export * from '@mui/x-data-grid-pro/components';
|
|
10
4
|
export * from '@mui/x-data-grid/constants';
|
package/modern/index.js
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-data-grid-premium v8.0.0-alpha.
|
|
2
|
+
* @mui/x-data-grid-premium v8.0.0-alpha.14
|
|
3
3
|
*
|
|
4
4
|
* @license MUI X Commercial
|
|
5
5
|
* This source code is licensed under the commercial license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
import "./typeOverloads/index.js";
|
|
9
|
-
import { LicenseInfo as LicenseInfoExport } from '@mui/x-license';
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Use `@mui/x-license` package instead:
|
|
12
|
-
* @example import { LicenseInfo } from '@mui/x-license';
|
|
13
|
-
*/
|
|
14
|
-
export class LicenseInfo extends LicenseInfoExport {}
|
|
15
9
|
export * from '@mui/x-data-grid/components';
|
|
16
10
|
export * from '@mui/x-data-grid-pro/components';
|
|
17
11
|
export * from '@mui/x-data-grid/constants';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { GridCallbackDetails, GridValidRowModel, GridGroupNode, GridEventListener } from '@mui/x-data-grid-pro';
|
|
2
|
+
import { GridCallbackDetails, GridValidRowModel, GridGroupNode, GridEventListener, GridGetRowsError, GridUpdateRowError } from '@mui/x-data-grid-pro';
|
|
3
3
|
import { GridExperimentalProFeatures, DataGridProPropsWithDefaultValue, DataGridProPropsWithoutDefaultValue, DataGridPropsWithComplexDefaultValueAfterProcessing, DataGridPropsWithComplexDefaultValueBeforeProcessing, DataGridPremiumSharedPropsWithDefaultValue } from '@mui/x-data-grid-pro/internals';
|
|
4
4
|
import type { GridRowGroupingModel } from '../hooks/features/rowGrouping';
|
|
5
5
|
import type { GridAggregationModel, GridAggregationFunction, GridAggregationFunctionDataSource, GridAggregationPosition } from '../hooks/features/aggregation';
|
|
@@ -51,7 +51,7 @@ export interface DataGridPremiumPropsWithDefaultValue<R extends GridValidRowMode
|
|
|
51
51
|
rowGroupingColumnMode: 'single' | 'multiple';
|
|
52
52
|
/**
|
|
53
53
|
* Aggregation functions available on the grid.
|
|
54
|
-
* @default GRID_AGGREGATION_FUNCTIONS when `
|
|
54
|
+
* @default GRID_AGGREGATION_FUNCTIONS when `dataSource` is not provided, `{}` when `dataSource` is provided
|
|
55
55
|
*/
|
|
56
56
|
aggregationFunctions: Record<string, GridAggregationFunction> | Record<string, GridAggregationFunctionDataSource>;
|
|
57
57
|
/**
|
|
@@ -81,7 +81,7 @@ export interface DataGridPremiumPropsWithDefaultValue<R extends GridValidRowMode
|
|
|
81
81
|
*/
|
|
82
82
|
splitClipboardPastedText: (text: string) => string[][] | null;
|
|
83
83
|
}
|
|
84
|
-
export interface DataGridPremiumPropsWithoutDefaultValue<R extends GridValidRowModel = any> extends Omit<DataGridProPropsWithoutDefaultValue<R>, 'initialState' | 'apiRef' | '
|
|
84
|
+
export interface DataGridPremiumPropsWithoutDefaultValue<R extends GridValidRowModel = any> extends Omit<DataGridProPropsWithoutDefaultValue<R>, 'initialState' | 'apiRef' | 'dataSource' | 'onDataSourceError'> {
|
|
85
85
|
/**
|
|
86
86
|
* The ref object that allows grid manipulation. Can be instantiated with `useGridApiRef()`.
|
|
87
87
|
*/
|
|
@@ -153,11 +153,10 @@ export interface DataGridPremiumPropsWithoutDefaultValue<R extends GridValidRowM
|
|
|
153
153
|
/**
|
|
154
154
|
* Data source object.
|
|
155
155
|
*/
|
|
156
|
-
|
|
156
|
+
dataSource?: GridDataSource;
|
|
157
157
|
/**
|
|
158
|
-
* Callback fired when
|
|
159
|
-
* @param {
|
|
160
|
-
* @param {GridGetRowsParams} params With all properties from [[GridGetRowsParams]].
|
|
158
|
+
* Callback fired when a data source request fails.
|
|
159
|
+
* @param {GridGetRowsError | GridUpdateRowError} error The data source error object.
|
|
161
160
|
*/
|
|
162
|
-
|
|
161
|
+
onDataSourceError?: (error: GridGetRowsError<GridGetRowsParams> | GridUpdateRowError) => void;
|
|
163
162
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTc0MTMwMjAwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-premium",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.14",
|
|
4
4
|
"description": "The Premium plan edition of the Data Grid Components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"exceljs": "^4.4.0",
|
|
41
41
|
"prop-types": "^15.8.1",
|
|
42
42
|
"reselect": "^5.1.1",
|
|
43
|
-
"@mui/x-
|
|
44
|
-
"@mui/x-
|
|
45
|
-
"@mui/x-
|
|
46
|
-
"@mui/x-
|
|
43
|
+
"@mui/x-license": "8.0.0-alpha.14",
|
|
44
|
+
"@mui/x-internals": "8.0.0-alpha.13",
|
|
45
|
+
"@mui/x-data-grid": "8.0.0-alpha.14",
|
|
46
|
+
"@mui/x-data-grid-pro": "8.0.0-alpha.14"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@emotion/react": "^11.9.0",
|