@mui/x-data-grid 9.14.0 → 9.15.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.
Files changed (283) hide show
  1. package/CHANGELOG.md +176 -0
  2. package/DataGrid/DataGrid.js +8 -0
  3. package/DataGrid/DataGrid.mjs +9 -1
  4. package/DataGrid/useDataGridComponent.js +2 -2
  5. package/DataGrid/useDataGridComponent.mjs +2 -2
  6. package/DataGrid/useDataGridProps.mjs +1 -1
  7. package/colDef/gridActionsColDef.mjs +1 -1
  8. package/colDef/gridBooleanColDef.mjs +1 -1
  9. package/colDef/gridCheckboxSelectionColDef.mjs +1 -1
  10. package/colDef/gridDateColDef.mjs +1 -1
  11. package/colDef/gridDefaultColumnTypes.mjs +1 -1
  12. package/colDef/gridLongTextColDef.mjs +1 -1
  13. package/colDef/gridNumericColDef.mjs +1 -1
  14. package/colDef/gridSingleSelectColDef.mjs +1 -1
  15. package/components/GridColumnHeaders.mjs +2 -2
  16. package/components/GridColumnSortButton.mjs +2 -2
  17. package/components/GridColumnUnsortedIcon.mjs +2 -2
  18. package/components/GridFooter.mjs +1 -1
  19. package/components/GridHeader.mjs +1 -1
  20. package/components/GridHeaders.mjs +1 -1
  21. package/components/GridLoadingOverlay.mjs +2 -2
  22. package/components/GridNoColumnsOverlay.mjs +1 -1
  23. package/components/GridNoResultsOverlay.mjs +1 -1
  24. package/components/GridNoRowsOverlay.mjs +1 -1
  25. package/components/GridPagination.js +9 -1
  26. package/components/GridPagination.mjs +10 -2
  27. package/components/GridRow.mjs +2 -2
  28. package/components/GridRowCount.mjs +2 -2
  29. package/components/GridRowDragAndDropOverlay.mjs +1 -1
  30. package/components/GridScrollArea.mjs +1 -1
  31. package/components/GridSelectedRowCount.mjs +2 -2
  32. package/components/GridShadowScrollArea.mjs +2 -2
  33. package/components/GridSkeletonLoadingOverlay.mjs +2 -2
  34. package/components/base/GridFooterPlaceholder.mjs +1 -1
  35. package/components/base/GridOverlays.mjs +1 -1
  36. package/components/cell/GridActionsCell.js +2 -2
  37. package/components/cell/GridActionsCell.mjs +5 -5
  38. package/components/cell/GridActionsCellItem.d.mts +20 -6
  39. package/components/cell/GridActionsCellItem.d.ts +20 -6
  40. package/components/cell/GridActionsCellItem.js +30 -7
  41. package/components/cell/GridActionsCellItem.mjs +32 -9
  42. package/components/cell/GridBooleanCell.mjs +2 -2
  43. package/components/cell/GridCell.js +1 -1
  44. package/components/cell/GridCell.mjs +3 -3
  45. package/components/cell/GridEditBooleanCell.mjs +2 -2
  46. package/components/cell/GridEditDateCell.mjs +2 -2
  47. package/components/cell/GridEditInputCell.mjs +2 -2
  48. package/components/cell/GridEditLongTextCell.mjs +1 -1
  49. package/components/cell/GridEditSingleSelectCell.mjs +2 -2
  50. package/components/cell/GridFooterCell.mjs +2 -2
  51. package/components/cell/GridLongTextCell.mjs +1 -1
  52. package/components/cell/GridSkeletonCell.mjs +2 -2
  53. package/components/columnHeaders/ColumnHeaderMenuIcon.mjs +1 -1
  54. package/components/columnHeaders/GridBaseColumnHeaders.mjs +2 -2
  55. package/components/columnHeaders/GridColumnGroupHeader.mjs +1 -1
  56. package/components/columnHeaders/GridColumnHeaderFilterIconButton.mjs +1 -1
  57. package/components/columnHeaders/GridColumnHeaderItem.mjs +1 -1
  58. package/components/columnHeaders/GridColumnHeaderSeparator.d.mts +1 -1
  59. package/components/columnHeaders/GridColumnHeaderSeparator.d.ts +1 -1
  60. package/components/columnHeaders/GridColumnHeaderSeparator.mjs +2 -2
  61. package/components/columnHeaders/GridColumnHeaderSortIcon.js +17 -0
  62. package/components/columnHeaders/GridColumnHeaderSortIcon.mjs +18 -1
  63. package/components/columnHeaders/GridColumnHeaderTitle.mjs +2 -2
  64. package/components/columnHeaders/GridGenericColumnHeaderItem.mjs +2 -2
  65. package/components/columnHeaders/GridIconButtonContainer.mjs +2 -2
  66. package/components/columnSelection/GridCellCheckboxRenderer.mjs +2 -2
  67. package/components/columnSelection/GridHeaderCheckbox.mjs +2 -2
  68. package/components/columnSelection/GridRowCheckbox.js +1 -3
  69. package/components/columnSelection/GridRowCheckbox.mjs +3 -5
  70. package/components/columnsManagement/GridColumnsManagement.mjs +1 -1
  71. package/components/columnsPanel/ColumnsPanelTrigger.mjs +2 -2
  72. package/components/containers/GridFooterContainer.mjs +2 -2
  73. package/components/containers/GridOverlay.mjs +2 -2
  74. package/components/containers/GridRoot.mjs +2 -2
  75. package/components/containers/GridRootStyles.js +22 -10
  76. package/components/containers/GridRootStyles.mjs +22 -10
  77. package/components/containers/GridToolbarContainer.mjs +2 -2
  78. package/components/export/ExportCsv.mjs +2 -2
  79. package/components/export/ExportPrint.js +4 -1
  80. package/components/export/ExportPrint.mjs +6 -3
  81. package/components/filterPanel/FilterPanelTrigger.mjs +2 -2
  82. package/components/menu/GridMenu.mjs +2 -2
  83. package/components/menu/columnMenu/GridColumnHeaderMenu.mjs +1 -1
  84. package/components/menu/columnMenu/GridColumnMenu.mjs +2 -2
  85. package/components/menu/columnMenu/GridColumnMenuContainer.mjs +2 -2
  86. package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.mjs +1 -1
  87. package/components/panel/GridColumnsPanel.mjs +1 -1
  88. package/components/panel/GridPanel.mjs +2 -2
  89. package/components/panel/GridPanelContent.mjs +2 -2
  90. package/components/panel/GridPanelContext.mjs +1 -1
  91. package/components/panel/GridPanelFooter.mjs +2 -2
  92. package/components/panel/GridPanelHeader.mjs +2 -2
  93. package/components/panel/GridPanelWrapper.mjs +2 -2
  94. package/components/panel/GridPreferencesPanel.mjs +1 -1
  95. package/components/panel/filterPanel/GridFilterForm.mjs +1 -1
  96. package/components/panel/filterPanel/GridFilterFormBase.mjs +2 -2
  97. package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -12
  98. package/components/panel/filterPanel/GridFilterInputBoolean.mjs +3 -14
  99. package/components/panel/filterPanel/GridFilterInputDate.mjs +2 -2
  100. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.mjs +2 -2
  101. package/components/panel/filterPanel/GridFilterInputMultipleValue.mjs +2 -2
  102. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -12
  103. package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +3 -14
  104. package/components/panel/filterPanel/GridFilterInputValue.mjs +2 -2
  105. package/components/panel/filterPanel/GridFilterPanel.mjs +1 -1
  106. package/components/panel/filterPanel/GridFilterPanelBase.mjs +2 -2
  107. package/components/panel/filterPanel/filterPanelUtils.mjs +1 -1
  108. package/components/quickFilter/QuickFilter.mjs +2 -2
  109. package/components/quickFilter/QuickFilterClear.js +17 -0
  110. package/components/quickFilter/QuickFilterClear.mjs +19 -2
  111. package/components/quickFilter/QuickFilterControl.mjs +2 -2
  112. package/components/quickFilter/QuickFilterTrigger.mjs +2 -2
  113. package/components/toolbar/GridToolbar.mjs +2 -2
  114. package/components/toolbar/GridToolbarColumnsButton.mjs +1 -1
  115. package/components/toolbar/GridToolbarDensitySelector.mjs +1 -1
  116. package/components/toolbar/GridToolbarExport.js +4 -1
  117. package/components/toolbar/GridToolbarExport.mjs +6 -3
  118. package/components/toolbar/GridToolbarExportContainer.mjs +1 -1
  119. package/components/toolbar/GridToolbarFilterButton.mjs +1 -1
  120. package/components/toolbar/GridToolbarQuickFilter.mjs +2 -2
  121. package/components/toolbarV8/GridToolbar.mjs +2 -2
  122. package/components/toolbarV8/Toolbar.mjs +2 -2
  123. package/components/toolbarV8/ToolbarButton.js +17 -0
  124. package/components/toolbarV8/ToolbarButton.mjs +19 -2
  125. package/components/virtualization/GridBottomContainer.mjs +1 -1
  126. package/components/virtualization/GridMainContainer.mjs +1 -1
  127. package/components/virtualization/GridTopContainer.mjs +1 -1
  128. package/components/virtualization/GridVirtualScrollbar.js +2 -2
  129. package/components/virtualization/GridVirtualScrollbar.mjs +2 -2
  130. package/components/virtualization/GridVirtualScroller.js +2 -2
  131. package/components/virtualization/GridVirtualScroller.mjs +3 -3
  132. package/components/virtualization/GridVirtualScrollerContent.mjs +1 -1
  133. package/components/virtualization/GridVirtualScrollerRenderZone.mjs +1 -1
  134. package/constants/cssVariables.mjs +1 -1
  135. package/constants/defaultGridSlotsComponents.mjs +1 -1
  136. package/constants/signature.d.mts +1 -1
  137. package/constants/signature.d.ts +1 -1
  138. package/hooks/core/pipeProcessing/useGridPipeProcessing.mjs +2 -2
  139. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +2 -2
  140. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.mjs +2 -2
  141. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +2 -2
  142. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.mjs +2 -2
  143. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.mts +1 -1
  144. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +1 -1
  145. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +2 -2
  146. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.mjs +2 -2
  147. package/hooks/core/strategyProcessing/useGridStrategyProcessing.mjs +2 -2
  148. package/hooks/core/useGridApiInitialization.js +1 -1
  149. package/hooks/core/useGridApiInitialization.mjs +1 -1
  150. package/hooks/core/useGridIsRtl.mjs +1 -1
  151. package/hooks/core/useGridProps.mjs +1 -1
  152. package/hooks/core/useGridStateInitialization.mjs +1 -1
  153. package/hooks/core/useGridVirtualizer.d.mts +2 -2
  154. package/hooks/core/useGridVirtualizer.d.ts +2 -2
  155. package/hooks/core/useGridVirtualizer.js +6 -6
  156. package/hooks/core/useGridVirtualizer.mjs +4 -4
  157. package/hooks/features/columnGrouping/gridColumnGroupsUtils.mjs +2 -2
  158. package/hooks/features/columnGrouping/useGridColumnGrouping.mjs +1 -1
  159. package/hooks/features/columnHeaders/useGridColumnHeaders.mjs +1 -1
  160. package/hooks/features/columnMenu/getColumnMenuItemKeys.mjs +1 -1
  161. package/hooks/features/columnMenu/useGridColumnMenu.mjs +1 -1
  162. package/hooks/features/columnMenu/useGridColumnMenuSlots.mjs +2 -2
  163. package/hooks/features/columnResize/useGridColumnResize.mjs +1 -1
  164. package/hooks/features/columns/gridColumnsInterfaces.d.mts +1 -1
  165. package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -1
  166. package/hooks/features/columns/gridColumnsUtils.d.mts +1 -1
  167. package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
  168. package/hooks/features/columns/gridColumnsUtils.mjs +1 -1
  169. package/hooks/features/columns/useGridColumns.js +1 -1
  170. package/hooks/features/columns/useGridColumns.mjs +2 -2
  171. package/hooks/features/dataSource/cache.js +1 -1
  172. package/hooks/features/dataSource/cache.mjs +1 -1
  173. package/hooks/features/dataSource/useGridDataSourceBase.js +13 -28
  174. package/hooks/features/dataSource/useGridDataSourceBase.mjs +16 -31
  175. package/hooks/features/dataSource/useGridDataSourcePolling.d.mts +29 -0
  176. package/hooks/features/dataSource/useGridDataSourcePolling.d.ts +29 -0
  177. package/hooks/features/dataSource/useGridDataSourcePolling.js +62 -0
  178. package/hooks/features/dataSource/useGridDataSourcePolling.mjs +54 -0
  179. package/hooks/features/dataSource/utils.d.mts +1 -1
  180. package/hooks/features/dataSource/utils.d.ts +1 -1
  181. package/hooks/features/dataSource/utils.mjs +1 -1
  182. package/hooks/features/density/useGridDensity.mjs +1 -1
  183. package/hooks/features/dimensions/useGridDimensions.d.mts +1 -1
  184. package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
  185. package/hooks/features/dimensions/useGridDimensions.js +3 -3
  186. package/hooks/features/dimensions/useGridDimensions.mjs +3 -3
  187. package/hooks/features/editing/useGridCellEditing.js +1 -1
  188. package/hooks/features/editing/useGridCellEditing.mjs +5 -5
  189. package/hooks/features/editing/useGridEditing.mjs +1 -1
  190. package/hooks/features/editing/useGridRowEditing.js +1 -1
  191. package/hooks/features/editing/useGridRowEditing.mjs +5 -5
  192. package/hooks/features/export/serializers/csvSerializer.js +5 -5
  193. package/hooks/features/export/serializers/csvSerializer.mjs +5 -5
  194. package/hooks/features/export/useGridPrintExport.js +44 -20
  195. package/hooks/features/export/useGridPrintExport.mjs +45 -21
  196. package/hooks/features/filter/gridFilterUtils.js +3 -3
  197. package/hooks/features/filter/gridFilterUtils.mjs +5 -5
  198. package/hooks/features/filter/useGridFilter.js +2 -2
  199. package/hooks/features/filter/useGridFilter.mjs +3 -3
  200. package/hooks/features/focus/useGridFocus.mjs +1 -1
  201. package/hooks/features/headerFiltering/useGridHeaderFiltering.mjs +1 -1
  202. package/hooks/features/listView/useGridListView.d.mts +2 -2
  203. package/hooks/features/listView/useGridListView.d.ts +2 -2
  204. package/hooks/features/listView/useGridListView.js +1 -1
  205. package/hooks/features/listView/useGridListView.mjs +2 -2
  206. package/hooks/features/pagination/useGridPagination.mjs +1 -1
  207. package/hooks/features/pagination/useGridPaginationMeta.mjs +1 -1
  208. package/hooks/features/pagination/useGridPaginationModel.mjs +1 -1
  209. package/hooks/features/pagination/useGridRowCount.js +2 -2
  210. package/hooks/features/pagination/useGridRowCount.mjs +2 -2
  211. package/hooks/features/preferencesPanel/gridPreferencePanelsValue.d.mts +1 -1
  212. package/hooks/features/preferencesPanel/gridPreferencePanelsValue.d.ts +1 -1
  213. package/hooks/features/preferencesPanel/useGridPreferencesPanel.mjs +1 -1
  214. package/hooks/features/rowSelection/useGridRowSelection.mjs +1 -1
  215. package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.mjs +1 -1
  216. package/hooks/features/rows/gridRowsUtils.js +2 -2
  217. package/hooks/features/rows/gridRowsUtils.mjs +3 -3
  218. package/hooks/features/rows/useGridRowSpanning.mjs +1 -1
  219. package/hooks/features/rows/useGridRows.mjs +1 -1
  220. package/hooks/features/rows/useGridRowsMeta.mjs +1 -1
  221. package/hooks/features/rows/useGridRowsOverridableMethods.mjs +1 -1
  222. package/hooks/features/rows/useGridRowsPreProcessors.mjs +1 -1
  223. package/hooks/features/sorting/gridSortingUtils.js +1 -1
  224. package/hooks/features/sorting/gridSortingUtils.mjs +3 -3
  225. package/hooks/features/sorting/useGridSorting.js +2 -2
  226. package/hooks/features/sorting/useGridSorting.mjs +3 -3
  227. package/hooks/features/virtualization/gridFocusedVirtualCellSelector.mjs +1 -1
  228. package/hooks/features/virtualization/useGridVirtualization.mjs +1 -1
  229. package/hooks/utils/index.d.mts +1 -1
  230. package/hooks/utils/index.d.ts +1 -1
  231. package/hooks/utils/index.js +8 -12
  232. package/hooks/utils/index.mjs +2 -1
  233. package/hooks/utils/useGridSelector.js +2 -2
  234. package/hooks/utils/useGridSelector.mjs +2 -2
  235. package/index.js +1 -1
  236. package/index.mjs +1 -1
  237. package/internals/constants.d.mts +1 -1
  238. package/internals/constants.d.ts +1 -1
  239. package/internals/index.d.mts +1 -0
  240. package/internals/index.d.ts +1 -0
  241. package/internals/index.js +8 -0
  242. package/internals/index.mjs +1 -0
  243. package/internals/utils/cache.d.mts +0 -1
  244. package/internals/utils/cache.d.ts +0 -1
  245. package/internals/utils/cache.js +1 -3
  246. package/internals/utils/cache.mjs +1 -3
  247. package/internals/utils/computeSlots.mjs +1 -1
  248. package/internals/utils/propValidation.js +2 -2
  249. package/internals/utils/propValidation.mjs +3 -3
  250. package/material/index.mjs +2 -2
  251. package/models/api/gridCoreApi.d.mts +1 -1
  252. package/models/api/gridCoreApi.d.ts +1 -1
  253. package/models/api/gridEditingApi.d.mts +6 -6
  254. package/models/api/gridEditingApi.d.ts +6 -6
  255. package/models/api/gridPrintExportApi.d.mts +2 -1
  256. package/models/api/gridPrintExportApi.d.ts +2 -1
  257. package/models/events/gridEventLookup.d.mts +5 -5
  258. package/models/events/gridEventLookup.d.ts +5 -5
  259. package/models/gridBaseSlots.d.mts +18 -1
  260. package/models/gridBaseSlots.d.ts +18 -1
  261. package/models/gridEditRowModel.d.mts +3 -3
  262. package/models/gridEditRowModel.d.ts +3 -3
  263. package/models/gridExport.d.mts +13 -0
  264. package/models/gridExport.d.ts +13 -0
  265. package/models/gridFilterItem.d.mts +2 -2
  266. package/models/gridFilterItem.d.ts +2 -2
  267. package/models/index.d.mts +2 -1
  268. package/models/index.d.ts +2 -1
  269. package/models/params/gridEditCellParams.d.mts +2 -2
  270. package/models/params/gridEditCellParams.d.ts +2 -2
  271. package/models/params/gridRowParams.d.mts +2 -2
  272. package/models/params/gridRowParams.d.ts +2 -2
  273. package/models/props/DataGridProps.d.mts +8 -0
  274. package/models/props/DataGridProps.d.ts +8 -0
  275. package/package.json +5 -5
  276. package/utils/createSelector.d.mts +1 -1
  277. package/utils/createSelector.d.ts +1 -1
  278. package/utils/createSelector.js +1 -1
  279. package/utils/createSelector.mjs +1 -1
  280. package/hooks/utils/useFirstRender.d.mts +0 -1
  281. package/hooks/utils/useFirstRender.d.ts +0 -1
  282. package/hooks/utils/useFirstRender.js +0 -16
  283. package/hooks/utils/useFirstRender.mjs +0 -1
@@ -102,6 +102,7 @@ export { useGridDataSourceBase } from "../hooks/features/dataSource/useGridDataS
102
102
  export { CacheChunkManager } from "../hooks/features/dataSource/utils.js";
103
103
  export { gridGetRowsParamsSelector } from "../hooks/features/dataSource/gridDataSourceSelector.js";
104
104
  export { useGridDataSourceFilterModelChange } from "../hooks/features/dataSource/useGridDataSourceFilterModelChange.js";
105
+ export { useGridDataSourcePolling } from "../hooks/features/dataSource/useGridDataSourcePolling.js";
105
106
  export { getColumnsToExport, defaultGetRowsToExport } from "../hooks/features/export/utils.js";
106
107
  export * from "../utils/createControllablePromise.js";
107
108
  export * from "../utils/focusElement.js";
@@ -121,6 +121,7 @@ var _exportNames = {
121
121
  useGridDataSourceBase: true,
122
122
  gridGetRowsParamsSelector: true,
123
123
  useGridDataSourceFilterModelChange: true,
124
+ useGridDataSourcePolling: true,
124
125
  getColumnsToExport: true,
125
126
  defaultGetRowsToExport: true,
126
127
  NotRendered: true,
@@ -765,6 +766,12 @@ Object.defineProperty(exports, "useGridDataSourceFilterModelChange", {
765
766
  return _useGridDataSourceFilterModelChange.useGridDataSourceFilterModelChange;
766
767
  }
767
768
  });
769
+ Object.defineProperty(exports, "useGridDataSourcePolling", {
770
+ enumerable: true,
771
+ get: function () {
772
+ return _useGridDataSourcePolling.useGridDataSourcePolling;
773
+ }
774
+ });
768
775
  Object.defineProperty(exports, "useGridDensity", {
769
776
  enumerable: true,
770
777
  get: function () {
@@ -1144,6 +1151,7 @@ var _utils2 = require("../hooks/features/dataSource/utils");
1144
1151
  var _useGridDataSourceBase = require("../hooks/features/dataSource/useGridDataSourceBase");
1145
1152
  var _gridDataSourceSelector = require("../hooks/features/dataSource/gridDataSourceSelector");
1146
1153
  var _useGridDataSourceFilterModelChange = require("../hooks/features/dataSource/useGridDataSourceFilterModelChange");
1154
+ var _useGridDataSourcePolling = require("../hooks/features/dataSource/useGridDataSourcePolling");
1147
1155
  var _utils3 = require("../hooks/features/export/utils");
1148
1156
  var _createControllablePromise = require("../utils/createControllablePromise");
1149
1157
  Object.keys(_createControllablePromise).forEach(function (key) {
@@ -80,6 +80,7 @@ export { useGridDataSourceBase } from "../hooks/features/dataSource/useGridDataS
80
80
  export { CacheChunkManager } from "../hooks/features/dataSource/utils.mjs";
81
81
  export { gridGetRowsParamsSelector } from "../hooks/features/dataSource/gridDataSourceSelector.mjs";
82
82
  export { useGridDataSourceFilterModelChange } from "../hooks/features/dataSource/useGridDataSourceFilterModelChange.mjs";
83
+ export { useGridDataSourcePolling } from "../hooks/features/dataSource/useGridDataSourcePolling.mjs";
83
84
  export { getColumnsToExport, defaultGetRowsToExport } from "../hooks/features/export/utils.mjs";
84
85
  export * from "../utils/createControllablePromise.mjs";
85
86
  export * from "../utils/focusElement.mjs";
@@ -1,7 +1,6 @@
1
1
  import type { GridGetRowsParams, GridGetRowsResponse } from "../../models/gridDataSource.mjs";
2
2
  export declare class TestCache {
3
3
  private cache;
4
- constructor();
5
4
  set(key: GridGetRowsParams, value: GridGetRowsResponse): void;
6
5
  get(key: GridGetRowsParams): GridGetRowsResponse | undefined;
7
6
  size(): number;
@@ -1,7 +1,6 @@
1
1
  import type { GridGetRowsParams, GridGetRowsResponse } from "../../models/gridDataSource.js";
2
2
  export declare class TestCache {
3
3
  private cache;
4
- constructor();
5
4
  set(key: GridGetRowsParams, value: GridGetRowsResponse): void;
6
5
  get(key: GridGetRowsParams): GridGetRowsResponse | undefined;
7
6
  size(): number;
@@ -6,9 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.TestCache = void 0;
7
7
  var _cache = require("../../hooks/features/dataSource/cache");
8
8
  class TestCache {
9
- constructor() {
10
- this.cache = new Map();
11
- }
9
+ cache = new Map();
12
10
  set(key, value) {
13
11
  this.cache.set((0, _cache.getKeyDefault)(key), value);
14
12
  }
@@ -1,8 +1,6 @@
1
1
  import { getKeyDefault } from "../../hooks/features/dataSource/cache.mjs";
2
2
  export class TestCache {
3
- constructor() {
4
- this.cache = new Map();
5
- }
3
+ cache = new Map();
6
4
  set(key, value) {
7
5
  this.cache.set(getKeyDefault(key), value);
8
6
  }
@@ -1,4 +1,4 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
1
+ import _extends from "@babel/runtime/helpers/extends";
2
2
  export function computeSlots({
3
3
  defaultSlots,
4
4
  slots
@@ -8,7 +8,7 @@ exports.validateProps = validateProps;
8
8
  var _warning = require("@mui/x-internals/warning");
9
9
  var _utils = require("../../utils/utils");
10
10
  var _signature = require("../../constants/signature");
11
- const propValidatorsDataGrid = exports.propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === _signature.GridSignature.DataGrid && props.paginationMode === 'client' && (0, _utils.isNumber)(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.dataSource && !props.paginationMeta && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
11
+ const propValidatorsDataGrid = exports.propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.height != null && props.autoHeight && ['MUI X: `<DataGrid height={...} autoHeight={true} />` are not valid props.', 'You cannot use both the `height` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to its content.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === _signature.GridSignature.DataGrid && props.paginationMode === 'client' && (0, _utils.isNumber)(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.dataSource && !props.paginationMeta && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
12
12
  function validateProps(props, validators) {
13
13
  if (process.env.NODE_ENV === 'production') {
14
14
  return;
@@ -16,7 +16,7 @@ function validateProps(props, validators) {
16
16
  validators.forEach(validator => {
17
17
  const message = validator(props);
18
18
  if (message) {
19
- (0, _warning.warnOnce)(message, 'error');
19
+ (0, _warning.errorOnce)(message);
20
20
  }
21
21
  });
22
22
  }
@@ -1,7 +1,7 @@
1
- import { warnOnce } from '@mui/x-internals/warning';
1
+ import { errorOnce } from '@mui/x-internals/warning';
2
2
  import { isNumber } from "../../utils/utils.mjs";
3
3
  import { GridSignature } from "../../constants/signature.mjs";
4
- export const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === GridSignature.DataGrid && props.paginationMode === 'client' && isNumber(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.dataSource && !props.paginationMeta && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
4
+ export const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.height != null && props.autoHeight && ['MUI X: `<DataGrid height={...} autoHeight={true} />` are not valid props.', 'You cannot use both the `height` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to its content.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === GridSignature.DataGrid && props.paginationMode === 'client' && isNumber(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.dataSource && !props.paginationMeta && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
5
5
  export function validateProps(props, validators) {
6
6
  if (process.env.NODE_ENV === 'production') {
7
7
  return;
@@ -9,7 +9,7 @@ export function validateProps(props, validators) {
9
9
  validators.forEach(validator => {
10
10
  const message = validator(props);
11
11
  if (message) {
12
- warnOnce(message, 'error');
12
+ errorOnce(message);
13
13
  }
14
14
  });
15
15
  }
@@ -1,5 +1,5 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["id", "label", "labelId", "material", "disabled", "multiple", "slotProps", "onChange", "onKeyDown", "onOpen", "onClose", "renderValue", "size", "style", "fullWidth"],
4
4
  _excluded2 = ["onRowsPerPageChange", "material", "disabled"],
5
5
  _excluded3 = ["material"],
@@ -1,6 +1,6 @@
1
1
  import type * as React from 'react';
2
2
  import type { EventManager, EventListenerOptions } from '@mui/x-internals/EventManager';
3
- import type { Store } from '@mui/x-internals/store';
3
+ import type { Store } from '@base-ui/utils/store';
4
4
  import type { GridEventPublisher, GridEventListener, GridEvents } from "../events/index.mjs";
5
5
  import type { GridApiCaches } from "../gridApiCaches.mjs";
6
6
  import type { GridApiCommon, GridPrivateApiCommon } from "./gridApiCommon.mjs";
@@ -1,6 +1,6 @@
1
1
  import type * as React from 'react';
2
2
  import type { EventManager, EventListenerOptions } from '@mui/x-internals/EventManager';
3
- import type { Store } from '@mui/x-internals/store';
3
+ import type { Store } from '@base-ui/utils/store';
4
4
  import type { GridEventPublisher, GridEventListener, GridEvents } from "../events/index.js";
5
5
  import type { GridApiCaches } from "../gridApiCaches.js";
6
6
  import type { GridApiCommon, GridPrivateApiCommon } from "./gridApiCommon.js";
@@ -4,17 +4,17 @@ import type { GridCellModes, GridRowModes } from "../gridEditRowModel.mjs";
4
4
  import type { GridRowId, GridRowModel } from "../gridRows.mjs";
5
5
  import type { GridCellParams } from "../params/gridCellParams.mjs";
6
6
  import type { GridEditCellValueParams } from "../params/gridEditCellParams.mjs";
7
- export type GridCellModesModelProps = ({
7
+ export type GridCellModesModelProps = {
8
8
  mode: GridCellModes.View;
9
- } & Omit<GridStopCellEditModeParams, 'id' | 'field'>) | ({
9
+ } & Omit<GridStopCellEditModeParams, 'id' | 'field'> | {
10
10
  mode: GridCellModes.Edit;
11
- } & Omit<GridStartCellEditModeParams, 'id' | 'field'>);
11
+ } & Omit<GridStartCellEditModeParams, 'id' | 'field'>;
12
12
  export type GridCellModesModel = Record<GridRowId, Record<string, GridCellModesModelProps>>;
13
- export type GridRowModesModelProps = ({
13
+ export type GridRowModesModelProps = {
14
14
  mode: GridRowModes.View;
15
- } & Omit<GridStopRowEditModeParams, 'id' | 'field'>) | ({
15
+ } & Omit<GridStopRowEditModeParams, 'id' | 'field'> | {
16
16
  mode: GridRowModes.Edit;
17
- } & Omit<GridStartRowEditModeParams, 'id' | 'field'>);
17
+ } & Omit<GridStartRowEditModeParams, 'id' | 'field'>;
18
18
  export type GridRowModesModel = Record<GridRowId, GridRowModesModelProps>;
19
19
  export interface GridEditCellMeta {
20
20
  changeReason?: 'debouncedSetEditCellValue' | 'setEditCellValue';
@@ -4,17 +4,17 @@ import type { GridCellModes, GridRowModes } from "../gridEditRowModel.js";
4
4
  import type { GridRowId, GridRowModel } from "../gridRows.js";
5
5
  import type { GridCellParams } from "../params/gridCellParams.js";
6
6
  import type { GridEditCellValueParams } from "../params/gridEditCellParams.js";
7
- export type GridCellModesModelProps = ({
7
+ export type GridCellModesModelProps = {
8
8
  mode: GridCellModes.View;
9
- } & Omit<GridStopCellEditModeParams, 'id' | 'field'>) | ({
9
+ } & Omit<GridStopCellEditModeParams, 'id' | 'field'> | {
10
10
  mode: GridCellModes.Edit;
11
- } & Omit<GridStartCellEditModeParams, 'id' | 'field'>);
11
+ } & Omit<GridStartCellEditModeParams, 'id' | 'field'>;
12
12
  export type GridCellModesModel = Record<GridRowId, Record<string, GridCellModesModelProps>>;
13
- export type GridRowModesModelProps = ({
13
+ export type GridRowModesModelProps = {
14
14
  mode: GridRowModes.View;
15
- } & Omit<GridStopRowEditModeParams, 'id' | 'field'>) | ({
15
+ } & Omit<GridStopRowEditModeParams, 'id' | 'field'> | {
16
16
  mode: GridRowModes.Edit;
17
- } & Omit<GridStartRowEditModeParams, 'id' | 'field'>);
17
+ } & Omit<GridStartRowEditModeParams, 'id' | 'field'>;
18
18
  export type GridRowModesModel = Record<GridRowId, GridRowModesModelProps>;
19
19
  export interface GridEditCellMeta {
20
20
  changeReason?: 'debouncedSetEditCellValue' | 'setEditCellValue';
@@ -6,6 +6,7 @@ export interface GridPrintExportApi {
6
6
  /**
7
7
  * Print the grid's data.
8
8
  * @param {GridPrintExportOptions} options The options to apply on the export.
9
+ * @returns {Promise<void>} A promise that resolves once the print dialog has been shown, which in most browsers means once it's closed, and rejects if the print fails, for example when `onStylesheetError` stops it.
9
10
  */
10
- exportDataAsPrint: (options?: GridPrintExportOptions) => void;
11
+ exportDataAsPrint: (options?: GridPrintExportOptions) => Promise<void>;
11
12
  }
@@ -6,6 +6,7 @@ export interface GridPrintExportApi {
6
6
  /**
7
7
  * Print the grid's data.
8
8
  * @param {GridPrintExportOptions} options The options to apply on the export.
9
+ * @returns {Promise<void>} A promise that resolves once the print dialog has been shown, which in most browsers means once it's closed, and rejects if the print fails, for example when `onStylesheetError` stops it.
9
10
  */
10
- exportDataAsPrint: (options?: GridPrintExportOptions) => void;
11
+ exportDataAsPrint: (options?: GridPrintExportOptions) => Promise<void>;
11
12
  }
@@ -503,17 +503,17 @@ export interface GridEventLookup extends GridRowEventLookup, GridColumnHeaderEve
503
503
  };
504
504
  /**
505
505
  * Fired when the rows are updated.
506
- * @ignore - do not document.
506
+ * The filtering and sorting of the updated rows run after this event.
507
507
  */
508
508
  rowsSet: {};
509
509
  /**
510
- * Fired when the filtered rows are updated
511
- * @ignore - do not document.
510
+ * Fired when the filtered rows are updated.
511
+ * The event fires after the state update and before the re-render.
512
512
  */
513
513
  filteredRowsSet: {};
514
514
  /**
515
- * Fired when the sorted rows are updated
516
- * @ignore - do not document
515
+ * Fired when the sorted rows are updated.
516
+ * The event fires after the state update and before the re-render.
517
517
  */
518
518
  sortedRowsSet: {};
519
519
  /**
@@ -503,17 +503,17 @@ export interface GridEventLookup extends GridRowEventLookup, GridColumnHeaderEve
503
503
  };
504
504
  /**
505
505
  * Fired when the rows are updated.
506
- * @ignore - do not document.
506
+ * The filtering and sorting of the updated rows run after this event.
507
507
  */
508
508
  rowsSet: {};
509
509
  /**
510
- * Fired when the filtered rows are updated
511
- * @ignore - do not document.
510
+ * Fired when the filtered rows are updated.
511
+ * The event fires after the state update and before the re-render.
512
512
  */
513
513
  filteredRowsSet: {};
514
514
  /**
515
- * Fired when the sorted rows are updated
516
- * @ignore - do not document
515
+ * Fired when the sorted rows are updated.
516
+ * The event fires after the state update and before the re-render.
517
517
  */
518
518
  sortedRowsSet: {};
519
519
  /**
@@ -152,7 +152,7 @@ export type IconButtonProps = Omit<ButtonProps, 'startIcon'> & {
152
152
  label?: string;
153
153
  color?: 'default' | 'inherit' | 'primary';
154
154
  edge?: 'start' | 'end' | false;
155
- };
155
+ } & LinkableComponentProps;
156
156
  export type ToggleButtonProps = Omit<CommonProps, 'onChange'> & {
157
157
  selected?: boolean;
158
158
  value: string;
@@ -179,6 +179,23 @@ export type MenuItemProps = CommonProps & {
179
179
  selected?: boolean;
180
180
  value?: number | string | readonly string[];
181
181
  style?: React.CSSProperties;
182
+ } & LinkableComponentProps;
183
+ /**
184
+ * Props shared by components that can render as a link, either by setting
185
+ * `href` directly, or by overriding `component` (for example with a router `Link`).
186
+ */
187
+ type LinkableComponentProps = {
188
+ /** The component used for the root node. Either a string to use an HTML element or a component. */
189
+ component?: React.ElementType;
190
+ /** The URL to link to. If set, and `component` is not set, the component renders as an anchor tag. */
191
+ href?: string;
192
+ /** Where to display the linked URL, as the name for a browsing context. */
193
+ target?: React.HTMLAttributeAnchorTarget;
194
+ /**
195
+ * The relationship of the linked URL.
196
+ * Set it to `noopener noreferrer` when `target` is set to `_blank` to avoid a security issue.
197
+ */
198
+ rel?: string;
182
199
  };
183
200
  type BasePlacement = 'top' | 'bottom' | 'left' | 'right';
184
201
  type VariationPlacement = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
@@ -152,7 +152,7 @@ export type IconButtonProps = Omit<ButtonProps, 'startIcon'> & {
152
152
  label?: string;
153
153
  color?: 'default' | 'inherit' | 'primary';
154
154
  edge?: 'start' | 'end' | false;
155
- };
155
+ } & LinkableComponentProps;
156
156
  export type ToggleButtonProps = Omit<CommonProps, 'onChange'> & {
157
157
  selected?: boolean;
158
158
  value: string;
@@ -179,6 +179,23 @@ export type MenuItemProps = CommonProps & {
179
179
  selected?: boolean;
180
180
  value?: number | string | readonly string[];
181
181
  style?: React.CSSProperties;
182
+ } & LinkableComponentProps;
183
+ /**
184
+ * Props shared by components that can render as a link, either by setting
185
+ * `href` directly, or by overriding `component` (for example with a router `Link`).
186
+ */
187
+ type LinkableComponentProps = {
188
+ /** The component used for the root node. Either a string to use an HTML element or a component. */
189
+ component?: React.ElementType;
190
+ /** The URL to link to. If set, and `component` is not set, the component renders as an anchor tag. */
191
+ href?: string;
192
+ /** Where to display the linked URL, as the name for a browsing context. */
193
+ target?: React.HTMLAttributeAnchorTarget;
194
+ /**
195
+ * The relationship of the linked URL.
196
+ * Set it to `noopener noreferrer` when `target` is set to `_blank` to avoid a security issue.
197
+ */
198
+ rel?: string;
182
199
  };
183
200
  type BasePlacement = 'top' | 'bottom' | 'left' | 'right';
184
201
  type VariationPlacement = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
@@ -15,14 +15,14 @@ export type GridEditingState = {
15
15
  export type GridEditMode = 'cell' | 'row';
16
16
  declare enum GridEditModes {
17
17
  Cell = "cell",
18
- Row = "row",
18
+ Row = "row"
19
19
  }
20
20
  declare enum GridCellModes {
21
21
  Edit = "edit",
22
- View = "view",
22
+ View = "view"
23
23
  }
24
24
  declare enum GridRowModes {
25
25
  Edit = "edit",
26
- View = "view",
26
+ View = "view"
27
27
  }
28
28
  export { GridEditModes, GridCellModes, GridRowModes };
@@ -15,14 +15,14 @@ export type GridEditingState = {
15
15
  export type GridEditMode = 'cell' | 'row';
16
16
  declare enum GridEditModes {
17
17
  Cell = "cell",
18
- Row = "row",
18
+ Row = "row"
19
19
  }
20
20
  declare enum GridCellModes {
21
21
  Edit = "edit",
22
- View = "view",
22
+ View = "view"
23
23
  }
24
24
  declare enum GridRowModes {
25
25
  Edit = "edit",
26
- View = "view",
26
+ View = "view"
27
27
  }
28
28
  export { GridEditModes, GridCellModes, GridRowModes };
@@ -1,4 +1,5 @@
1
1
  import type { RefObject } from '@mui/x-internals/types';
2
+ import type { StylesheetErrorReason } from '@mui/x-internals/export';
2
3
  import type { GridRowId } from "./gridRows.mjs";
3
4
  import type { GridApiCommon } from "./api/index.mjs";
4
5
  import type { GridApiCommunity } from "./api/gridApiCommunity.mjs";
@@ -132,6 +133,18 @@ export interface GridPrintExportOptions extends GridExportOptions {
132
133
  * @default true
133
134
  */
134
135
  copyStyles?: boolean;
136
+ /**
137
+ * Callback function that is called when a stylesheet, or a stylesheet it imports, fails to load in the print window,
138
+ * for example if a request fails or a Content Security Policy blocks it.
139
+ * Return or resolve to `false` to cancel the export without an error.
140
+ * Throw or reject to make the export fail with that error.
141
+ * Return anything else to continue the export, so the result may be missing some styles.
142
+ * If not provided, the export continues and the failure is logged as a warning in development.
143
+ * @param {HTMLLinkElement} element The stylesheet link element that failed to load, or whose import failed to load.
144
+ * @param {StylesheetErrorReason} reason `'content-security-policy'` if the Content Security Policy blocked the stylesheet, `'load-error'` if the request failed or a stylesheet it imports failed to load.
145
+ * @returns {Promise<boolean | void> | boolean | void} `false` to cancel the export. If a promise is returned, the export waits for it to settle before proceeding.
146
+ */
147
+ onStylesheetError?: (element: HTMLLinkElement, reason: StylesheetErrorReason) => Promise<boolean | void> | boolean | void;
135
148
  /**
136
149
  * One or more classes passed to the print window.
137
150
  */
@@ -1,4 +1,5 @@
1
1
  import type { RefObject } from '@mui/x-internals/types';
2
+ import type { StylesheetErrorReason } from '@mui/x-internals/export';
2
3
  import type { GridRowId } from "./gridRows.js";
3
4
  import type { GridApiCommon } from "./api/index.js";
4
5
  import type { GridApiCommunity } from "./api/gridApiCommunity.js";
@@ -132,6 +133,18 @@ export interface GridPrintExportOptions extends GridExportOptions {
132
133
  * @default true
133
134
  */
134
135
  copyStyles?: boolean;
136
+ /**
137
+ * Callback function that is called when a stylesheet, or a stylesheet it imports, fails to load in the print window,
138
+ * for example if a request fails or a Content Security Policy blocks it.
139
+ * Return or resolve to `false` to cancel the export without an error.
140
+ * Throw or reject to make the export fail with that error.
141
+ * Return anything else to continue the export, so the result may be missing some styles.
142
+ * If not provided, the export continues and the failure is logged as a warning in development.
143
+ * @param {HTMLLinkElement} element The stylesheet link element that failed to load, or whose import failed to load.
144
+ * @param {StylesheetErrorReason} reason `'content-security-policy'` if the Content Security Policy blocked the stylesheet, `'load-error'` if the request failed or a stylesheet it imports failed to load.
145
+ * @returns {Promise<boolean | void> | boolean | void} `false` to cancel the export. If a promise is returned, the export waits for it to settle before proceeding.
146
+ */
147
+ onStylesheetError?: (element: HTMLLinkElement, reason: StylesheetErrorReason) => Promise<boolean | void> | boolean | void;
135
148
  /**
136
149
  * One or more classes passed to the print window.
137
150
  */
@@ -23,10 +23,10 @@ export interface GridFilterItem {
23
23
  * The name of the operator we want to apply.
24
24
  * A custom operator is supported by providing any string value.
25
25
  */
26
- operator: 'contains' | 'doesNotContain' | 'equals' | 'doesNotEqual' | 'startsWith' | 'endsWith' | '=' | '!=' | '>' | '>=' | '<' | '<=' | 'is' | 'not' | 'after' | 'onOrAfter' | 'before' | 'onOrBefore' | 'isEmpty' | 'isNotEmpty' | 'isAnyOf' | (string & {});
26
+ operator: 'contains' | 'doesNotContain' | 'equals' | 'doesNotEqual' | 'startsWith' | 'endsWith' | '=' | '!=' | '>' | '>=' | '<' | '<=' | 'is' | 'not' | 'after' | 'onOrAfter' | 'before' | 'onOrBefore' | 'isEmpty' | 'isNotEmpty' | 'isAnyOf' | string & {};
27
27
  }
28
28
  declare enum GridLogicOperator {
29
29
  And = "and",
30
- Or = "or",
30
+ Or = "or"
31
31
  }
32
32
  export { GridLogicOperator };
@@ -23,10 +23,10 @@ export interface GridFilterItem {
23
23
  * The name of the operator we want to apply.
24
24
  * A custom operator is supported by providing any string value.
25
25
  */
26
- operator: 'contains' | 'doesNotContain' | 'equals' | 'doesNotEqual' | 'startsWith' | 'endsWith' | '=' | '!=' | '>' | '>=' | '<' | '<=' | 'is' | 'not' | 'after' | 'onOrAfter' | 'before' | 'onOrBefore' | 'isEmpty' | 'isNotEmpty' | 'isAnyOf' | (string & {});
26
+ operator: 'contains' | 'doesNotContain' | 'equals' | 'doesNotEqual' | 'startsWith' | 'endsWith' | '=' | '!=' | '>' | '>=' | '<' | '<=' | 'is' | 'not' | 'after' | 'onOrAfter' | 'before' | 'onOrBefore' | 'isEmpty' | 'isNotEmpty' | 'isAnyOf' | string & {};
27
27
  }
28
28
  declare enum GridLogicOperator {
29
29
  And = "and",
30
- Or = "or",
30
+ Or = "or"
31
31
  }
32
32
  export { GridLogicOperator };
@@ -28,4 +28,5 @@ export * from "./gridColumnGrouping.mjs";
28
28
  export type { GridDataSourceCache, GridUpdateRowParams } from "./gridDataSource.mjs";
29
29
  export type { GridExportOptions, GridFileExportOptions, GridGetRowsToExportParams, GridCsvGetRowsToExportParams, GridPrintGetRowsToExportParams, GridCsvExportOptions, GridPrintExportOptions } from "./gridExport.mjs";
30
30
  export * from "./gridFilterOperator.mjs";
31
- export type { PropsFromSlot } from '@mui/x-internals/slots';
31
+ export type { PropsFromSlot } from '@mui/x-internals/slots';
32
+ export type { StylesheetErrorReason } from '@mui/x-internals/export';
package/models/index.d.ts CHANGED
@@ -28,4 +28,5 @@ export * from "./gridColumnGrouping.js";
28
28
  export type { GridDataSourceCache, GridUpdateRowParams } from "./gridDataSource.js";
29
29
  export type { GridExportOptions, GridFileExportOptions, GridGetRowsToExportParams, GridCsvGetRowsToExportParams, GridPrintGetRowsToExportParams, GridCsvExportOptions, GridPrintExportOptions } from "./gridExport.js";
30
30
  export * from "./gridFilterOperator.js";
31
- export type { PropsFromSlot } from '@mui/x-internals/slots';
31
+ export type { PropsFromSlot } from '@mui/x-internals/slots';
32
+ export type { StylesheetErrorReason } from '@mui/x-internals/export';
@@ -30,7 +30,7 @@ declare enum GridCellEditStartReasons {
30
30
  cellDoubleClick = "cellDoubleClick",
31
31
  printableKeyDown = "printableKeyDown",
32
32
  deleteKeyDown = "deleteKeyDown",
33
- pasteKeyDown = "pasteKeyDown",
33
+ pasteKeyDown = "pasteKeyDown"
34
34
  }
35
35
  /**
36
36
  * Params passed to the `cellEditStart` event.
@@ -51,7 +51,7 @@ declare enum GridCellEditStopReasons {
51
51
  escapeKeyDown = "escapeKeyDown",
52
52
  enterKeyDown = "enterKeyDown",
53
53
  tabKeyDown = "tabKeyDown",
54
- shiftTabKeyDown = "shiftTabKeyDown",
54
+ shiftTabKeyDown = "shiftTabKeyDown"
55
55
  }
56
56
  /**
57
57
  * Params passed to the `cellEditStop event.
@@ -30,7 +30,7 @@ declare enum GridCellEditStartReasons {
30
30
  cellDoubleClick = "cellDoubleClick",
31
31
  printableKeyDown = "printableKeyDown",
32
32
  deleteKeyDown = "deleteKeyDown",
33
- pasteKeyDown = "pasteKeyDown",
33
+ pasteKeyDown = "pasteKeyDown"
34
34
  }
35
35
  /**
36
36
  * Params passed to the `cellEditStart` event.
@@ -51,7 +51,7 @@ declare enum GridCellEditStopReasons {
51
51
  escapeKeyDown = "escapeKeyDown",
52
52
  enterKeyDown = "enterKeyDown",
53
53
  tabKeyDown = "tabKeyDown",
54
- shiftTabKeyDown = "shiftTabKeyDown",
54
+ shiftTabKeyDown = "shiftTabKeyDown"
55
55
  }
56
56
  /**
57
57
  * Params passed to the `cellEditStop event.
@@ -57,7 +57,7 @@ declare enum GridRowEditStartReasons {
57
57
  enterKeyDown = "enterKeyDown",
58
58
  cellDoubleClick = "cellDoubleClick",
59
59
  printableKeyDown = "printableKeyDown",
60
- deleteKeyDown = "deleteKeyDown",
60
+ deleteKeyDown = "deleteKeyDown"
61
61
  }
62
62
  /**
63
63
  * Params passed to the `rowEditStart` event.
@@ -81,7 +81,7 @@ declare enum GridRowEditStopReasons {
81
81
  escapeKeyDown = "escapeKeyDown",
82
82
  enterKeyDown = "enterKeyDown",
83
83
  tabKeyDown = "tabKeyDown",
84
- shiftTabKeyDown = "shiftTabKeyDown",
84
+ shiftTabKeyDown = "shiftTabKeyDown"
85
85
  }
86
86
  export interface GridRowEditStopParams<R extends GridValidRowModel = any> extends GridRowParams<R> {
87
87
  /**
@@ -57,7 +57,7 @@ declare enum GridRowEditStartReasons {
57
57
  enterKeyDown = "enterKeyDown",
58
58
  cellDoubleClick = "cellDoubleClick",
59
59
  printableKeyDown = "printableKeyDown",
60
- deleteKeyDown = "deleteKeyDown",
60
+ deleteKeyDown = "deleteKeyDown"
61
61
  }
62
62
  /**
63
63
  * Params passed to the `rowEditStart` event.
@@ -81,7 +81,7 @@ declare enum GridRowEditStopReasons {
81
81
  escapeKeyDown = "escapeKeyDown",
82
82
  enterKeyDown = "enterKeyDown",
83
83
  tabKeyDown = "tabKeyDown",
84
- shiftTabKeyDown = "shiftTabKeyDown",
84
+ shiftTabKeyDown = "shiftTabKeyDown"
85
85
  }
86
86
  export interface GridRowEditStopParams<R extends GridValidRowModel = any> extends GridRowParams<R> {
87
87
  /**
@@ -459,6 +459,14 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
459
459
  * Override the height/width of the Data Grid inner scrollbar.
460
460
  */
461
461
  scrollbarSize?: number;
462
+ /**
463
+ * The fixed height of the Data Grid.
464
+ * Accepts a number (pixels), a CSS length (for example `'50vh'`), a percentage, or a CSS calculation.
465
+ * Percentage values require a parent with an explicit height.
466
+ * Content-based values such as `'auto'`, `'min-content'`, `'max-content'`, and `'fit-content'` are not supported.
467
+ * For content-based sizing, use a flex parent container instead.
468
+ */
469
+ height?: number | string;
462
470
  /**
463
471
  * Function that applies CSS classes dynamically on cells.
464
472
  * @param {GridCellParams} params With all properties from [[GridCellParams]].
@@ -459,6 +459,14 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
459
459
  * Override the height/width of the Data Grid inner scrollbar.
460
460
  */
461
461
  scrollbarSize?: number;
462
+ /**
463
+ * The fixed height of the Data Grid.
464
+ * Accepts a number (pixels), a CSS length (for example `'50vh'`), a percentage, or a CSS calculation.
465
+ * Percentage values require a parent with an explicit height.
466
+ * Content-based values such as `'auto'`, `'min-content'`, `'max-content'`, and `'fit-content'` are not supported.
467
+ * For content-based sizing, use a flex parent container instead.
468
+ */
469
+ height?: number | string;
462
470
  /**
463
471
  * Function that applies CSS classes dynamically on cells.
464
472
  * @param {GridCellParams} params With all properties from [[GridCellParams]].