@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.
Files changed (117) hide show
  1. package/CHANGELOG.md +430 -0
  2. package/DataGridPremium/DataGridPremium.js +51 -39
  3. package/DataGridPremium/useDataGridPremiumProps.js +2 -2
  4. package/components/GridAggregationHeader.d.ts +1 -1
  5. package/components/GridAggregationHeader.js +7 -11
  6. package/components/GridColumnMenuAggregationItem.js +4 -4
  7. package/components/GridDataSourceGroupingCriteriaCell.js +5 -6
  8. package/components/GridFooterCell.js +5 -6
  9. package/components/GridGroupingColumnFooterCell.js +2 -1
  10. package/components/GridGroupingColumnLeafCell.js +3 -9
  11. package/components/GridGroupingCriteriaCell.js +3 -8
  12. package/components/GridPremiumToolbar.d.ts +3 -0
  13. package/components/GridPremiumToolbar.js +31 -0
  14. package/components/export/ExportExcel.d.ts +29 -0
  15. package/components/export/ExportExcel.js +198 -0
  16. package/components/export/index.d.ts +1 -0
  17. package/components/export/index.js +16 -0
  18. package/components/index.d.ts +2 -1
  19. package/components/index.js +13 -1
  20. package/components/promptControl/GridToolbarPromptControl.js +34 -32
  21. package/constants/dataGridPremiumDefaultSlotsComponents.js +3 -1
  22. package/esm/DataGridPremium/DataGridPremium.js +51 -39
  23. package/esm/DataGridPremium/useDataGridPremiumProps.js +2 -2
  24. package/esm/components/GridAggregationHeader.d.ts +1 -1
  25. package/esm/components/GridAggregationHeader.js +7 -11
  26. package/esm/components/GridColumnMenuAggregationItem.js +4 -4
  27. package/esm/components/GridDataSourceGroupingCriteriaCell.js +6 -7
  28. package/esm/components/GridFooterCell.js +5 -6
  29. package/esm/components/GridGroupingColumnFooterCell.js +2 -1
  30. package/esm/components/GridGroupingColumnLeafCell.js +3 -8
  31. package/esm/components/GridGroupingCriteriaCell.js +3 -8
  32. package/esm/components/GridPremiumToolbar.d.ts +3 -0
  33. package/esm/components/GridPremiumToolbar.js +23 -0
  34. package/esm/components/export/ExportExcel.d.ts +29 -0
  35. package/esm/components/export/ExportExcel.js +191 -0
  36. package/esm/components/export/index.d.ts +1 -0
  37. package/esm/components/export/index.js +1 -0
  38. package/esm/components/index.d.ts +2 -1
  39. package/esm/components/index.js +2 -1
  40. package/esm/components/promptControl/GridToolbarPromptControl.js +34 -32
  41. package/esm/constants/dataGridPremiumDefaultSlotsComponents.js +3 -1
  42. package/esm/hooks/features/aggregation/useGridAggregation.d.ts +1 -1
  43. package/esm/hooks/features/aggregation/useGridAggregation.js +6 -6
  44. package/esm/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +1 -1
  45. package/esm/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -6
  46. package/esm/hooks/features/clipboard/useGridClipboardImport.js +3 -3
  47. package/esm/hooks/features/dataSource/models.d.ts +1 -1
  48. package/esm/hooks/features/dataSource/useGridDataSourcePremium.js +3 -3
  49. package/esm/hooks/features/rowGrouping/gridRowGroupingUtils.js +2 -2
  50. package/esm/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +1 -1
  51. package/esm/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +3 -3
  52. package/esm/hooks/features/rowGrouping/useGridRowGrouping.d.ts +1 -1
  53. package/esm/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
  54. package/esm/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +1 -1
  55. package/esm/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +5 -5
  56. package/esm/index.d.ts +0 -6
  57. package/esm/index.js +1 -7
  58. package/esm/models/dataGridPremiumProps.d.ts +7 -8
  59. package/esm/utils/releaseInfo.js +1 -1
  60. package/hooks/features/aggregation/useGridAggregation.d.ts +1 -1
  61. package/hooks/features/aggregation/useGridAggregation.js +6 -6
  62. package/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +1 -1
  63. package/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -6
  64. package/hooks/features/clipboard/useGridClipboardImport.js +2 -2
  65. package/hooks/features/dataSource/models.d.ts +1 -1
  66. package/hooks/features/dataSource/useGridDataSourcePremium.js +3 -3
  67. package/hooks/features/rowGrouping/gridRowGroupingUtils.js +1 -1
  68. package/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +1 -1
  69. package/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +3 -3
  70. package/hooks/features/rowGrouping/useGridRowGrouping.d.ts +1 -1
  71. package/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
  72. package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +1 -1
  73. package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +5 -5
  74. package/index.d.ts +0 -6
  75. package/index.js +2 -11
  76. package/models/dataGridPremiumProps.d.ts +7 -8
  77. package/modern/DataGridPremium/DataGridPremium.js +51 -39
  78. package/modern/DataGridPremium/useDataGridPremiumProps.js +2 -2
  79. package/modern/components/GridAggregationHeader.d.ts +1 -1
  80. package/modern/components/GridAggregationHeader.js +7 -11
  81. package/modern/components/GridColumnMenuAggregationItem.js +4 -4
  82. package/modern/components/GridDataSourceGroupingCriteriaCell.js +6 -7
  83. package/modern/components/GridFooterCell.js +5 -6
  84. package/modern/components/GridGroupingColumnFooterCell.js +2 -1
  85. package/modern/components/GridGroupingColumnLeafCell.js +3 -8
  86. package/modern/components/GridGroupingCriteriaCell.js +3 -8
  87. package/modern/components/GridPremiumToolbar.d.ts +3 -0
  88. package/modern/components/GridPremiumToolbar.js +23 -0
  89. package/modern/components/export/ExportExcel.d.ts +29 -0
  90. package/modern/components/export/ExportExcel.js +191 -0
  91. package/modern/components/export/index.d.ts +1 -0
  92. package/modern/components/export/index.js +1 -0
  93. package/modern/components/index.d.ts +2 -1
  94. package/modern/components/index.js +2 -1
  95. package/modern/components/promptControl/GridToolbarPromptControl.js +34 -32
  96. package/modern/constants/dataGridPremiumDefaultSlotsComponents.js +3 -1
  97. package/modern/hooks/features/aggregation/useGridAggregation.d.ts +1 -1
  98. package/modern/hooks/features/aggregation/useGridAggregation.js +6 -6
  99. package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +1 -1
  100. package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -6
  101. package/modern/hooks/features/clipboard/useGridClipboardImport.js +3 -3
  102. package/modern/hooks/features/dataSource/models.d.ts +1 -1
  103. package/modern/hooks/features/dataSource/useGridDataSourcePremium.js +3 -3
  104. package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +2 -2
  105. package/modern/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +1 -1
  106. package/modern/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +3 -3
  107. package/modern/hooks/features/rowGrouping/useGridRowGrouping.d.ts +1 -1
  108. package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
  109. package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +1 -1
  110. package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +5 -5
  111. package/modern/index.d.ts +0 -6
  112. package/modern/index.js +1 -7
  113. package/modern/models/dataGridPremiumProps.d.ts +7 -8
  114. package/modern/utils/releaseInfo.js +1 -1
  115. package/package.json +5 -5
  116. package/tsconfig.build.tsbuildinfo +1 -1
  117. 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.unstable_dataSource ? RowGroupingStrategy.DataSource : RowGroupingStrategy.Default;
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.unstable_dataSource]);
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.unstable_dataSource);
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.unstable_dataSource);
156
+ setStrategyAvailability(apiRef, props.disableRowGrouping, props.dataSource);
157
157
  } else {
158
158
  isFirstRender.current = false;
159
159
  }
160
- }, [apiRef, props.disableRowGrouping, props.unstable_dataSource]);
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.12
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 `unstable_dataSource` is not provided, `{}` when `unstable_dataSource` is provided
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' | 'unstable_dataSource' | 'unstable_onDataSourceError'> {
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
- unstable_dataSource?: GridDataSource;
156
+ dataSource?: GridDataSource;
157
157
  /**
158
- * Callback fired when the data source request fails.
159
- * @param {Error} error The error object.
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
- unstable_onDataSourceError?: (error: Error, params: GridGetRowsParams) => void;
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 = "MTczOTc0NjgwMDAwMA==";
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.12",
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-data-grid": "8.0.0-alpha.12",
44
- "@mui/x-data-grid-pro": "8.0.0-alpha.12",
45
- "@mui/x-internals": "8.0.0-alpha.12",
46
- "@mui/x-license": "8.0.0-alpha.12"
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",