@mui/x-data-grid 9.5.0 → 9.6.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 (168) hide show
  1. package/CHANGELOG.md +151 -0
  2. package/DataGrid/DataGrid.js +74 -13
  3. package/DataGrid/DataGrid.mjs +74 -13
  4. package/components/GridColumnHeaders.js +1 -1
  5. package/components/GridColumnHeaders.mjs +1 -1
  6. package/components/GridColumnUnsortedIcon.js +1 -1
  7. package/components/GridColumnUnsortedIcon.mjs +1 -1
  8. package/components/GridFooter.js +1 -1
  9. package/components/GridFooter.mjs +1 -1
  10. package/components/GridLoadingOverlay.js +1 -1
  11. package/components/GridLoadingOverlay.mjs +1 -1
  12. package/components/GridNoColumnsOverlay.js +1 -1
  13. package/components/GridNoColumnsOverlay.mjs +1 -1
  14. package/components/GridNoRowsOverlay.js +1 -1
  15. package/components/GridNoRowsOverlay.mjs +1 -1
  16. package/components/GridRow.js +1 -1
  17. package/components/GridRow.mjs +1 -1
  18. package/components/GridRowCount.js +1 -1
  19. package/components/GridRowCount.mjs +1 -1
  20. package/components/GridRowDragAndDropOverlay.d.mts +1 -1
  21. package/components/GridRowDragAndDropOverlay.d.ts +1 -1
  22. package/components/GridSelectedRowCount.js +1 -1
  23. package/components/GridSelectedRowCount.mjs +1 -1
  24. package/components/GridShadowScrollArea.js +1 -1
  25. package/components/GridShadowScrollArea.mjs +1 -1
  26. package/components/cell/GridActionsCell.js +83 -3
  27. package/components/cell/GridActionsCell.mjs +83 -3
  28. package/components/cell/GridActionsCellItem.js +75 -1
  29. package/components/cell/GridActionsCellItem.mjs +74 -0
  30. package/components/cell/GridBooleanCell.js +1 -1
  31. package/components/cell/GridBooleanCell.mjs +1 -1
  32. package/components/cell/GridCell.js +1 -1
  33. package/components/cell/GridCell.mjs +1 -1
  34. package/components/cell/GridEditBooleanCell.js +1 -1
  35. package/components/cell/GridEditBooleanCell.mjs +1 -1
  36. package/components/cell/GridEditDateCell.js +1 -1
  37. package/components/cell/GridEditDateCell.mjs +1 -1
  38. package/components/cell/GridEditInputCell.js +68 -0
  39. package/components/cell/GridEditInputCell.mjs +68 -0
  40. package/components/cell/GridEditLongTextCell.d.mts +3 -0
  41. package/components/cell/GridEditLongTextCell.d.ts +3 -0
  42. package/components/cell/GridEditLongTextCell.js +141 -0
  43. package/components/cell/GridEditLongTextCell.mjs +141 -0
  44. package/components/cell/GridEditSingleSelectCell.js +1 -1
  45. package/components/cell/GridEditSingleSelectCell.mjs +1 -1
  46. package/components/cell/GridLongTextCell.d.mts +3 -0
  47. package/components/cell/GridLongTextCell.d.ts +3 -0
  48. package/components/cell/GridLongTextCell.js +66 -0
  49. package/components/cell/GridLongTextCell.mjs +66 -0
  50. package/components/cell/GridSkeletonCell.js +3 -2
  51. package/components/cell/GridSkeletonCell.mjs +3 -2
  52. package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +2 -2
  53. package/components/columnHeaders/GridColumnHeaderFilterIconButton.mjs +2 -2
  54. package/components/columnHeaders/GridColumnHeaderItem.js +1 -1
  55. package/components/columnHeaders/GridColumnHeaderItem.mjs +1 -1
  56. package/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
  57. package/components/columnHeaders/GridColumnHeaderSeparator.mjs +1 -1
  58. package/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -1
  59. package/components/columnHeaders/GridColumnHeaderSortIcon.mjs +1 -1
  60. package/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
  61. package/components/columnHeaders/GridColumnHeaderTitle.mjs +1 -1
  62. package/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
  63. package/components/columnSelection/GridCellCheckboxRenderer.mjs +1 -1
  64. package/components/columnSelection/GridHeaderCheckbox.js +1 -1
  65. package/components/columnSelection/GridHeaderCheckbox.mjs +1 -1
  66. package/components/columnSelection/GridRowCheckbox.js +1 -1
  67. package/components/columnSelection/GridRowCheckbox.mjs +1 -1
  68. package/components/columnsManagement/GridColumnsManagement.js +1 -1
  69. package/components/columnsManagement/GridColumnsManagement.mjs +1 -1
  70. package/components/columnsPanel/ColumnsPanelTrigger.js +1 -1
  71. package/components/columnsPanel/ColumnsPanelTrigger.mjs +1 -1
  72. package/components/containers/GridFooterContainer.js +1 -1
  73. package/components/containers/GridFooterContainer.mjs +1 -1
  74. package/components/containers/GridOverlay.js +1 -1
  75. package/components/containers/GridOverlay.mjs +1 -1
  76. package/components/containers/GridRoot.js +1 -1
  77. package/components/containers/GridRoot.mjs +1 -1
  78. package/components/containers/GridRootStyles.js +3 -2
  79. package/components/containers/GridRootStyles.mjs +3 -2
  80. package/components/containers/GridToolbarContainer.js +1 -1
  81. package/components/containers/GridToolbarContainer.mjs +1 -1
  82. package/components/export/ExportCsv.js +1 -1
  83. package/components/export/ExportCsv.mjs +1 -1
  84. package/components/export/ExportPrint.js +1 -1
  85. package/components/export/ExportPrint.mjs +1 -1
  86. package/components/filterPanel/FilterPanelTrigger.js +1 -1
  87. package/components/filterPanel/FilterPanelTrigger.mjs +1 -1
  88. package/components/menu/GridMenu.js +1 -1
  89. package/components/menu/GridMenu.mjs +1 -1
  90. package/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
  91. package/components/menu/columnMenu/GridColumnHeaderMenu.mjs +1 -1
  92. package/components/menu/columnMenu/GridColumnMenu.js +2 -2
  93. package/components/menu/columnMenu/GridColumnMenu.mjs +2 -2
  94. package/components/menu/columnMenu/GridColumnMenuContainer.js +1 -1
  95. package/components/menu/columnMenu/GridColumnMenuContainer.mjs +1 -1
  96. package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +1 -1
  97. package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.mjs +1 -1
  98. package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -1
  99. package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.mjs +1 -1
  100. package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -1
  101. package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.mjs +1 -1
  102. package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -1
  103. package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.mjs +1 -1
  104. package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
  105. package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.mjs +1 -1
  106. package/components/panel/GridPanel.js +1 -1
  107. package/components/panel/GridPanel.mjs +1 -1
  108. package/components/panel/GridPanelContent.js +1 -1
  109. package/components/panel/GridPanelContent.mjs +1 -1
  110. package/components/panel/GridPanelFooter.js +1 -1
  111. package/components/panel/GridPanelFooter.mjs +1 -1
  112. package/components/panel/GridPanelHeader.js +1 -1
  113. package/components/panel/GridPanelHeader.mjs +1 -1
  114. package/components/panel/filterPanel/GridFilterForm.js +1 -1
  115. package/components/panel/filterPanel/GridFilterForm.mjs +1 -1
  116. package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  117. package/components/panel/filterPanel/GridFilterInputBoolean.mjs +1 -1
  118. package/components/panel/filterPanel/GridFilterInputDate.js +1 -1
  119. package/components/panel/filterPanel/GridFilterInputDate.mjs +1 -1
  120. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
  121. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.mjs +1 -1
  122. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
  123. package/components/panel/filterPanel/GridFilterInputMultipleValue.mjs +1 -1
  124. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
  125. package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +1 -1
  126. package/components/panel/filterPanel/GridFilterInputValue.js +1 -1
  127. package/components/panel/filterPanel/GridFilterInputValue.mjs +1 -1
  128. package/components/panel/filterPanel/GridFilterPanel.js +1 -1
  129. package/components/panel/filterPanel/GridFilterPanel.mjs +1 -1
  130. package/components/quickFilter/QuickFilter.js +1 -1
  131. package/components/quickFilter/QuickFilter.mjs +1 -1
  132. package/components/quickFilter/QuickFilterClear.js +1 -1
  133. package/components/quickFilter/QuickFilterClear.mjs +1 -1
  134. package/components/quickFilter/QuickFilterControl.js +1 -1
  135. package/components/quickFilter/QuickFilterControl.mjs +1 -1
  136. package/components/quickFilter/QuickFilterTrigger.js +1 -1
  137. package/components/quickFilter/QuickFilterTrigger.mjs +1 -1
  138. package/components/toolbar/GridToolbar.js +1 -1
  139. package/components/toolbar/GridToolbar.mjs +1 -1
  140. package/components/toolbar/GridToolbarColumnsButton.js +1 -1
  141. package/components/toolbar/GridToolbarColumnsButton.mjs +1 -1
  142. package/components/toolbar/GridToolbarDensitySelector.js +1 -1
  143. package/components/toolbar/GridToolbarDensitySelector.mjs +1 -1
  144. package/components/toolbar/GridToolbarExport.js +3 -3
  145. package/components/toolbar/GridToolbarExport.mjs +3 -3
  146. package/components/toolbar/GridToolbarExportContainer.js +1 -1
  147. package/components/toolbar/GridToolbarExportContainer.mjs +1 -1
  148. package/components/toolbar/GridToolbarFilterButton.js +1 -1
  149. package/components/toolbar/GridToolbarFilterButton.mjs +1 -1
  150. package/components/toolbar/GridToolbarQuickFilter.js +1 -1
  151. package/components/toolbar/GridToolbarQuickFilter.mjs +1 -1
  152. package/components/toolbarV8/GridToolbar.js +8 -3
  153. package/components/toolbarV8/GridToolbar.mjs +8 -3
  154. package/components/toolbarV8/Toolbar.js +1 -1
  155. package/components/toolbarV8/Toolbar.mjs +1 -1
  156. package/components/toolbarV8/ToolbarButton.js +1 -1
  157. package/components/toolbarV8/ToolbarButton.mjs +1 -1
  158. package/components/virtualization/GridVirtualScrollbar.js +8 -1
  159. package/components/virtualization/GridVirtualScrollbar.mjs +8 -1
  160. package/components/virtualization/GridVirtualScroller.js +12 -0
  161. package/components/virtualization/GridVirtualScroller.mjs +12 -0
  162. package/hooks/utils/useGridSelector.js +1 -1
  163. package/hooks/utils/useGridSelector.mjs +1 -1
  164. package/index.js +1 -1
  165. package/index.mjs +1 -1
  166. package/material/index.js +5 -3
  167. package/material/index.mjs +5 -3
  168. package/package.json +7 -4
@@ -87,7 +87,7 @@ const GridShadowScrollArea = forwardRef(function GridShadowScrollArea(props, ref
87
87
  }));
88
88
  });
89
89
  if (process.env.NODE_ENV !== "production") GridShadowScrollArea.displayName = "GridShadowScrollArea";
90
- process.env.NODE_ENV !== "production" ? GridShadowScrollArea.propTypes = {
90
+ process.env.NODE_ENV !== "production" ? GridShadowScrollArea.propTypes /* remove-proptypes */ = {
91
91
  // ----------------------------- Warning --------------------------------
92
92
  // | These PropTypes are generated from the TypeScript type definitions |
93
93
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -220,7 +220,7 @@ If this is intentional, you can suppress this warning by passing the \`suppressC
220
220
  })]
221
221
  }));
222
222
  }
223
- process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes = {
223
+ process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes /* remove-proptypes */ = {
224
224
  // ----------------------------- Warning --------------------------------
225
225
  // | These PropTypes are generated from the TypeScript type definitions |
226
226
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -230,7 +230,7 @@ process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes = {
230
230
  * The mode of the cell.
231
231
  */
232
232
  cellMode: _propTypes.default.oneOf(['edit', 'view']).isRequired,
233
- children: _propTypes.default.node.isRequired,
233
+ children: _propTypes.default.node,
234
234
  /**
235
235
  * The column of the row that the current cell belongs to.
236
236
  */
@@ -255,15 +255,40 @@ process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes = {
255
255
  * If true, the cell is editable.
256
256
  */
257
257
  isEditable: _propTypes.default.bool,
258
+ /**
259
+ * Callback to fire before the menu gets closed.
260
+ * Use this callback to prevent the menu from closing.
261
+ *
262
+ * @param {GridRowParams<R>} params Row parameters.
263
+ * @param {React.MouseEvent<HTMLElement> | React.KeyboardEvent | MouseEvent | TouchEvent | undefined} event The event triggering this callback.
264
+ * @returns {boolean} if the menu should be closed.
265
+ */
266
+ onMenuClose: _propTypes.default.func,
267
+ /**
268
+ * Callback to fire before the menu gets opened.
269
+ * Use this callback to prevent the menu from opening.
270
+ *
271
+ * @param {GridRowParams<R>} params Row parameters.
272
+ * @param {React.MouseEvent<HTMLElement>} event The event triggering this callback.
273
+ * @returns {boolean} if the menu should be opened.
274
+ */
275
+ onMenuOpen: _propTypes.default.func,
258
276
  position: _propTypes.default.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
259
277
  /**
260
278
  * The row model of the row that the current cell belongs to.
261
279
  */
262
- row: _propTypes.default.any.isRequired,
280
+ row: _propTypes.default.object.isRequired,
263
281
  /**
264
282
  * The node of the row that the current cell belongs to.
265
283
  */
266
284
  rowNode: _propTypes.default.object.isRequired,
285
+ /**
286
+ * If true, the children passed to the component will not be validated.
287
+ * If false, only `GridActionsCellItem` and `React.Fragment` are allowed as children.
288
+ * Only use this prop if you know what you are doing.
289
+ * @default false
290
+ */
291
+ suppressChildrenValidation: _propTypes.default.bool,
267
292
  /**
268
293
  * the tabIndex value.
269
294
  */
@@ -293,6 +318,61 @@ function GridActionsCellWrapper(props) {
293
318
  children: actions
294
319
  }));
295
320
  }
321
+ process.env.NODE_ENV !== "production" ? GridActionsCellWrapper.propTypes /* remove-proptypes */ = {
322
+ // ----------------------------- Warning --------------------------------
323
+ // | These PropTypes are generated from the TypeScript type definitions |
324
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
325
+ // ----------------------------------------------------------------------
326
+ /**
327
+ * GridApi that let you manipulate the grid.
328
+ */
329
+ api: _propTypes.default.object.isRequired,
330
+ /**
331
+ * The mode of the cell.
332
+ */
333
+ cellMode: _propTypes.default.oneOf(['edit', 'view']).isRequired,
334
+ /**
335
+ * The column of the row that the current cell belongs to.
336
+ */
337
+ colDef: _propTypes.default.object.isRequired,
338
+ /**
339
+ * The column field of the cell that triggered the event.
340
+ */
341
+ field: _propTypes.default.string.isRequired,
342
+ /**
343
+ * The cell value formatted with the column valueFormatter.
344
+ */
345
+ formattedValue: _propTypes.default.any,
346
+ /**
347
+ * If true, the cell is the active element.
348
+ */
349
+ hasFocus: _propTypes.default.bool.isRequired,
350
+ /**
351
+ * The grid row id.
352
+ */
353
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
354
+ /**
355
+ * If true, the cell is editable.
356
+ */
357
+ isEditable: _propTypes.default.bool,
358
+ /**
359
+ * The row model of the row that the current cell belongs to.
360
+ */
361
+ row: _propTypes.default.any.isRequired,
362
+ /**
363
+ * The node of the row that the current cell belongs to.
364
+ */
365
+ rowNode: _propTypes.default.object.isRequired,
366
+ /**
367
+ * the tabIndex value.
368
+ */
369
+ tabIndex: _propTypes.default.oneOf([-1, 0]).isRequired,
370
+ /**
371
+ * The cell value.
372
+ * If the column has `valueGetter`, use `params.row` to directly access the fields.
373
+ */
374
+ value: _propTypes.default.any
375
+ } : void 0;
296
376
  const renderActionsCell = params => /*#__PURE__*/(0, _jsxRuntime.jsx)(GridActionsCellWrapper, (0, _extends2.default)({}, params));
297
377
  exports.renderActionsCell = renderActionsCell;
298
378
  if (process.env.NODE_ENV !== "production") renderActionsCell.displayName = "renderActionsCell";
@@ -212,7 +212,7 @@ If this is intentional, you can suppress this warning by passing the \`suppressC
212
212
  })]
213
213
  }));
214
214
  }
215
- process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes = {
215
+ process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes /* remove-proptypes */ = {
216
216
  // ----------------------------- Warning --------------------------------
217
217
  // | These PropTypes are generated from the TypeScript type definitions |
218
218
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -222,7 +222,7 @@ process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes = {
222
222
  * The mode of the cell.
223
223
  */
224
224
  cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
225
- children: PropTypes.node.isRequired,
225
+ children: PropTypes.node,
226
226
  /**
227
227
  * The column of the row that the current cell belongs to.
228
228
  */
@@ -247,15 +247,40 @@ process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes = {
247
247
  * If true, the cell is editable.
248
248
  */
249
249
  isEditable: PropTypes.bool,
250
+ /**
251
+ * Callback to fire before the menu gets closed.
252
+ * Use this callback to prevent the menu from closing.
253
+ *
254
+ * @param {GridRowParams<R>} params Row parameters.
255
+ * @param {React.MouseEvent<HTMLElement> | React.KeyboardEvent | MouseEvent | TouchEvent | undefined} event The event triggering this callback.
256
+ * @returns {boolean} if the menu should be closed.
257
+ */
258
+ onMenuClose: PropTypes.func,
259
+ /**
260
+ * Callback to fire before the menu gets opened.
261
+ * Use this callback to prevent the menu from opening.
262
+ *
263
+ * @param {GridRowParams<R>} params Row parameters.
264
+ * @param {React.MouseEvent<HTMLElement>} event The event triggering this callback.
265
+ * @returns {boolean} if the menu should be opened.
266
+ */
267
+ onMenuOpen: PropTypes.func,
250
268
  position: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
251
269
  /**
252
270
  * The row model of the row that the current cell belongs to.
253
271
  */
254
- row: PropTypes.any.isRequired,
272
+ row: PropTypes.object.isRequired,
255
273
  /**
256
274
  * The node of the row that the current cell belongs to.
257
275
  */
258
276
  rowNode: PropTypes.object.isRequired,
277
+ /**
278
+ * If true, the children passed to the component will not be validated.
279
+ * If false, only `GridActionsCellItem` and `React.Fragment` are allowed as children.
280
+ * Only use this prop if you know what you are doing.
281
+ * @default false
282
+ */
283
+ suppressChildrenValidation: PropTypes.bool,
259
284
  /**
260
285
  * the tabIndex value.
261
286
  */
@@ -287,5 +312,60 @@ function GridActionsCellWrapper(props) {
287
312
  children: actions
288
313
  }));
289
314
  }
315
+ process.env.NODE_ENV !== "production" ? GridActionsCellWrapper.propTypes /* remove-proptypes */ = {
316
+ // ----------------------------- Warning --------------------------------
317
+ // | These PropTypes are generated from the TypeScript type definitions |
318
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
319
+ // ----------------------------------------------------------------------
320
+ /**
321
+ * GridApi that let you manipulate the grid.
322
+ */
323
+ api: PropTypes.object.isRequired,
324
+ /**
325
+ * The mode of the cell.
326
+ */
327
+ cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
328
+ /**
329
+ * The column of the row that the current cell belongs to.
330
+ */
331
+ colDef: PropTypes.object.isRequired,
332
+ /**
333
+ * The column field of the cell that triggered the event.
334
+ */
335
+ field: PropTypes.string.isRequired,
336
+ /**
337
+ * The cell value formatted with the column valueFormatter.
338
+ */
339
+ formattedValue: PropTypes.any,
340
+ /**
341
+ * If true, the cell is the active element.
342
+ */
343
+ hasFocus: PropTypes.bool.isRequired,
344
+ /**
345
+ * The grid row id.
346
+ */
347
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
348
+ /**
349
+ * If true, the cell is editable.
350
+ */
351
+ isEditable: PropTypes.bool,
352
+ /**
353
+ * The row model of the row that the current cell belongs to.
354
+ */
355
+ row: PropTypes.any.isRequired,
356
+ /**
357
+ * The node of the row that the current cell belongs to.
358
+ */
359
+ rowNode: PropTypes.object.isRequired,
360
+ /**
361
+ * the tabIndex value.
362
+ */
363
+ tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
364
+ /**
365
+ * The cell value.
366
+ * If the column has `valueGetter`, use `params.row` to directly access the fields.
367
+ */
368
+ value: PropTypes.any
369
+ } : void 0;
290
370
  export const renderActionsCell = params => /*#__PURE__*/_jsx(GridActionsCellWrapper, _extends({}, params));
291
371
  if (process.env.NODE_ENV !== "production") renderActionsCell.displayName = "renderActionsCell";
@@ -10,6 +10,7 @@ exports.GridActionsCellItem = void 0;
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
14
  var _forwardRef = require("@mui/x-internals/forwardRef");
14
15
  var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
15
16
  var _jsxRuntime = require("react/jsx-runtime");
@@ -62,4 +63,77 @@ const GridActionsCellItem = exports.GridActionsCellItem = (0, _forwardRef.forwar
62
63
  children: label
63
64
  }));
64
65
  });
65
- if (process.env.NODE_ENV !== "production") GridActionsCellItem.displayName = "GridActionsCellItem";
66
+ if (process.env.NODE_ENV !== "production") GridActionsCellItem.displayName = "GridActionsCellItem";
67
+ process.env.NODE_ENV !== "production" ? GridActionsCellItem.propTypes /* remove-proptypes */ = {
68
+ // ----------------------------- Warning --------------------------------
69
+ // | These PropTypes are generated from the TypeScript type definitions |
70
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
71
+ // ----------------------------------------------------------------------
72
+ className: _propTypes.default.string,
73
+ /**
74
+ * from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component
75
+ */
76
+ component: _propTypes.default.elementType,
77
+ disabled: _propTypes.default.bool,
78
+ icon: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.func, _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
79
+ '__@iterator@659': _propTypes.default.func.isRequired
80
+ }), _propTypes.default.shape({
81
+ '__@iterator@659': _propTypes.default.func.isRequired,
82
+ key: _propTypes.default.string,
83
+ props: _propTypes.default.any.isRequired,
84
+ type: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]).isRequired
85
+ }), _propTypes.default.shape({
86
+ '__@toStringTag@1607': _propTypes.default.oneOf(['BigInt']).isRequired,
87
+ key: _propTypes.default.string,
88
+ props: _propTypes.default.any.isRequired,
89
+ toLocaleString: _propTypes.default.func.isRequired,
90
+ toString: _propTypes.default.func.isRequired,
91
+ type: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]).isRequired,
92
+ valueOf: _propTypes.default.func.isRequired
93
+ }), _propTypes.default.shape({
94
+ '__@toStringTag@1607': _propTypes.default.oneOf(['BigInt']).isRequired,
95
+ toLocaleString: _propTypes.default.func.isRequired,
96
+ toString: _propTypes.default.func.isRequired,
97
+ valueOf: _propTypes.default.func.isRequired
98
+ }), _propTypes.default.shape({
99
+ '__@toStringTag@1607': _propTypes.default.string.isRequired,
100
+ catch: _propTypes.default.func.isRequired,
101
+ finally: _propTypes.default.func.isRequired,
102
+ key: _propTypes.default.string,
103
+ props: _propTypes.default.any.isRequired,
104
+ then: _propTypes.default.func.isRequired,
105
+ type: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]).isRequired
106
+ }), _propTypes.default.shape({
107
+ '__@toStringTag@1607': _propTypes.default.string.isRequired,
108
+ catch: _propTypes.default.func.isRequired,
109
+ finally: _propTypes.default.func.isRequired,
110
+ then: _propTypes.default.func.isRequired
111
+ }), _propTypes.default.shape({
112
+ children: _propTypes.default.node,
113
+ key: _propTypes.default.string,
114
+ props: _propTypes.default.any.isRequired,
115
+ type: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]).isRequired
116
+ }), _propTypes.default.shape({
117
+ key: _propTypes.default.string,
118
+ props: _propTypes.default.any.isRequired,
119
+ toExponential: _propTypes.default.func.isRequired,
120
+ toFixed: _propTypes.default.func.isRequired,
121
+ toLocaleString: _propTypes.default.func.isRequired,
122
+ toPrecision: _propTypes.default.func.isRequired,
123
+ toString: _propTypes.default.func.isRequired,
124
+ type: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]).isRequired,
125
+ valueOf: _propTypes.default.func.isRequired
126
+ }), _propTypes.default.shape({
127
+ key: _propTypes.default.string,
128
+ props: _propTypes.default.any.isRequired,
129
+ type: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]).isRequired
130
+ }), _propTypes.default.shape({
131
+ key: _propTypes.default.string,
132
+ props: _propTypes.default.any.isRequired,
133
+ type: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]).isRequired,
134
+ valueOf: _propTypes.default.func.isRequired
135
+ }), _propTypes.default.string, _propTypes.default.bool]),
136
+ label: _propTypes.default.node,
137
+ showInMenu: _propTypes.default.bool,
138
+ style: _propTypes.default.object
139
+ } : void 0;
@@ -5,6 +5,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
5
5
  const _excluded = ["label", "icon", "showInMenu", "onClick"],
6
6
  _excluded2 = ["label", "icon", "showInMenu", "onClick", "closeMenuOnClick", "closeMenu"];
7
7
  import * as React from 'react';
8
+ import PropTypes from 'prop-types';
8
9
  import { forwardRef } from '@mui/x-internals/forwardRef';
9
10
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.mjs";
10
11
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -56,4 +57,77 @@ const GridActionsCellItem = forwardRef((props, ref) => {
56
57
  }));
57
58
  });
58
59
  if (process.env.NODE_ENV !== "production") GridActionsCellItem.displayName = "GridActionsCellItem";
60
+ process.env.NODE_ENV !== "production" ? GridActionsCellItem.propTypes /* remove-proptypes */ = {
61
+ // ----------------------------- Warning --------------------------------
62
+ // | These PropTypes are generated from the TypeScript type definitions |
63
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
64
+ // ----------------------------------------------------------------------
65
+ className: PropTypes.string,
66
+ /**
67
+ * from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component
68
+ */
69
+ component: PropTypes.elementType,
70
+ disabled: PropTypes.bool,
71
+ icon: PropTypes.oneOfType([PropTypes.element, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.shape({
72
+ '__@iterator@659': PropTypes.func.isRequired
73
+ }), PropTypes.shape({
74
+ '__@iterator@659': PropTypes.func.isRequired,
75
+ key: PropTypes.string,
76
+ props: PropTypes.any.isRequired,
77
+ type: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired
78
+ }), PropTypes.shape({
79
+ '__@toStringTag@1607': PropTypes.oneOf(['BigInt']).isRequired,
80
+ key: PropTypes.string,
81
+ props: PropTypes.any.isRequired,
82
+ toLocaleString: PropTypes.func.isRequired,
83
+ toString: PropTypes.func.isRequired,
84
+ type: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired,
85
+ valueOf: PropTypes.func.isRequired
86
+ }), PropTypes.shape({
87
+ '__@toStringTag@1607': PropTypes.oneOf(['BigInt']).isRequired,
88
+ toLocaleString: PropTypes.func.isRequired,
89
+ toString: PropTypes.func.isRequired,
90
+ valueOf: PropTypes.func.isRequired
91
+ }), PropTypes.shape({
92
+ '__@toStringTag@1607': PropTypes.string.isRequired,
93
+ catch: PropTypes.func.isRequired,
94
+ finally: PropTypes.func.isRequired,
95
+ key: PropTypes.string,
96
+ props: PropTypes.any.isRequired,
97
+ then: PropTypes.func.isRequired,
98
+ type: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired
99
+ }), PropTypes.shape({
100
+ '__@toStringTag@1607': PropTypes.string.isRequired,
101
+ catch: PropTypes.func.isRequired,
102
+ finally: PropTypes.func.isRequired,
103
+ then: PropTypes.func.isRequired
104
+ }), PropTypes.shape({
105
+ children: PropTypes.node,
106
+ key: PropTypes.string,
107
+ props: PropTypes.any.isRequired,
108
+ type: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired
109
+ }), PropTypes.shape({
110
+ key: PropTypes.string,
111
+ props: PropTypes.any.isRequired,
112
+ toExponential: PropTypes.func.isRequired,
113
+ toFixed: PropTypes.func.isRequired,
114
+ toLocaleString: PropTypes.func.isRequired,
115
+ toPrecision: PropTypes.func.isRequired,
116
+ toString: PropTypes.func.isRequired,
117
+ type: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired,
118
+ valueOf: PropTypes.func.isRequired
119
+ }), PropTypes.shape({
120
+ key: PropTypes.string,
121
+ props: PropTypes.any.isRequired,
122
+ type: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired
123
+ }), PropTypes.shape({
124
+ key: PropTypes.string,
125
+ props: PropTypes.any.isRequired,
126
+ type: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired,
127
+ valueOf: PropTypes.func.isRequired
128
+ }), PropTypes.string, PropTypes.bool]),
129
+ label: PropTypes.node,
130
+ showInMenu: PropTypes.bool,
131
+ style: PropTypes.object
132
+ } : void 0;
59
133
  export { GridActionsCellItem };
@@ -57,7 +57,7 @@ function GridBooleanCellRaw(props) {
57
57
  "data-value": Boolean(value)
58
58
  }, other));
59
59
  }
60
- process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes = {
60
+ process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes /* remove-proptypes */ = {
61
61
  // ----------------------------- Warning --------------------------------
62
62
  // | These PropTypes are generated from the TypeScript type definitions |
63
63
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -49,7 +49,7 @@ function GridBooleanCellRaw(props) {
49
49
  "data-value": Boolean(value)
50
50
  }, other));
51
51
  }
52
- process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes = {
52
+ process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes /* remove-proptypes */ = {
53
53
  // ----------------------------- Warning --------------------------------
54
54
  // | These PropTypes are generated from the TypeScript type definitions |
55
55
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -322,7 +322,7 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
322
322
  }));
323
323
  });
324
324
  if (process.env.NODE_ENV !== "production") GridCell.displayName = "GridCell";
325
- process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
325
+ process.env.NODE_ENV !== "production" ? GridCell.propTypes /* remove-proptypes */ = {
326
326
  // ----------------------------- Warning --------------------------------
327
327
  // | These PropTypes are generated from the TypeScript type definitions |
328
328
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -315,7 +315,7 @@ const GridCell = forwardRef(function GridCell(props, ref) {
315
315
  }));
316
316
  });
317
317
  if (process.env.NODE_ENV !== "production") GridCell.displayName = "GridCell";
318
- process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
318
+ process.env.NODE_ENV !== "production" ? GridCell.propTypes /* remove-proptypes */ = {
319
319
  // ----------------------------- Warning --------------------------------
320
320
  // | These PropTypes are generated from the TypeScript type definitions |
321
321
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -82,7 +82,7 @@ function GridEditBooleanCell(props) {
82
82
  }, rootProps.slotProps?.baseCheckbox))
83
83
  }));
84
84
  }
85
- process.env.NODE_ENV !== "production" ? GridEditBooleanCell.propTypes = {
85
+ process.env.NODE_ENV !== "production" ? GridEditBooleanCell.propTypes /* remove-proptypes */ = {
86
86
  // ----------------------------- Warning --------------------------------
87
87
  // | These PropTypes are generated from the TypeScript type definitions |
88
88
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -74,7 +74,7 @@ function GridEditBooleanCell(props) {
74
74
  }, rootProps.slotProps?.baseCheckbox))
75
75
  }));
76
76
  }
77
- process.env.NODE_ENV !== "production" ? GridEditBooleanCell.propTypes = {
77
+ process.env.NODE_ENV !== "production" ? GridEditBooleanCell.propTypes /* remove-proptypes */ = {
78
78
  // ----------------------------- Warning --------------------------------
79
79
  // | These PropTypes are generated from the TypeScript type definitions |
80
80
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -136,7 +136,7 @@ function GridEditDateCell(props) {
136
136
  }
137
137
  }));
138
138
  }
139
- process.env.NODE_ENV !== "production" ? GridEditDateCell.propTypes = {
139
+ process.env.NODE_ENV !== "production" ? GridEditDateCell.propTypes /* remove-proptypes */ = {
140
140
  // ----------------------------- Warning --------------------------------
141
141
  // | These PropTypes are generated from the TypeScript type definitions |
142
142
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -128,7 +128,7 @@ function GridEditDateCell(props) {
128
128
  }
129
129
  }));
130
130
  }
131
- process.env.NODE_ENV !== "production" ? GridEditDateCell.propTypes = {
131
+ process.env.NODE_ENV !== "production" ? GridEditDateCell.propTypes /* remove-proptypes */ = {
132
132
  // ----------------------------- Warning --------------------------------
133
133
  // | These PropTypes are generated from the TypeScript type definitions |
134
134
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -10,6 +10,7 @@ exports.renderEditInputCell = exports.GridEditInputCell = void 0;
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
14
15
  var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
15
16
  var _styles = require("@mui/material/styles");
@@ -107,6 +108,73 @@ const GridEditInputCell = exports.GridEditInputCell = (0, _forwardRef.forwardRef
107
108
  }));
108
109
  });
109
110
  if (process.env.NODE_ENV !== "production") GridEditInputCell.displayName = "GridEditInputCell";
111
+ process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes /* remove-proptypes */ = {
112
+ // ----------------------------- Warning --------------------------------
113
+ // | These PropTypes are generated from the TypeScript type definitions |
114
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
115
+ // ----------------------------------------------------------------------
116
+ /**
117
+ * GridApi that let you manipulate the grid.
118
+ */
119
+ api: _propTypes.default.object.isRequired,
120
+ /**
121
+ * The mode of the cell.
122
+ */
123
+ cellMode: _propTypes.default.oneOf(['edit', 'view']).isRequired,
124
+ changeReason: _propTypes.default.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),
125
+ /**
126
+ * The column of the row that the current cell belongs to.
127
+ */
128
+ colDef: _propTypes.default.object.isRequired,
129
+ debounceMs: _propTypes.default.number,
130
+ /**
131
+ * The column field of the cell that triggered the event.
132
+ */
133
+ field: _propTypes.default.string.isRequired,
134
+ /**
135
+ * The cell value formatted with the column valueFormatter.
136
+ */
137
+ formattedValue: _propTypes.default.any,
138
+ /**
139
+ * If true, the cell is the active element.
140
+ */
141
+ hasFocus: _propTypes.default.bool.isRequired,
142
+ /**
143
+ * The grid row id.
144
+ */
145
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
146
+ /**
147
+ * If true, the cell is editable.
148
+ */
149
+ isEditable: _propTypes.default.bool,
150
+ isProcessingProps: _propTypes.default.bool,
151
+ isValidating: _propTypes.default.bool,
152
+ /**
153
+ * Callback called when the value is changed by the user.
154
+ * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
155
+ * @param {Date | null} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.
156
+ * @returns {Promise<void> | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`
157
+ */
158
+ onValueChange: _propTypes.default.func,
159
+ /**
160
+ * The row model of the row that the current cell belongs to.
161
+ */
162
+ row: _propTypes.default.any.isRequired,
163
+ /**
164
+ * The node of the row that the current cell belongs to.
165
+ */
166
+ rowNode: _propTypes.default.object.isRequired,
167
+ slotProps: _propTypes.default.object,
168
+ /**
169
+ * the tabIndex value.
170
+ */
171
+ tabIndex: _propTypes.default.oneOf([-1, 0]).isRequired,
172
+ /**
173
+ * The cell value.
174
+ * If the column has `valueGetter`, use `params.row` to directly access the fields.
175
+ */
176
+ value: _propTypes.default.any
177
+ } : void 0;
110
178
  const renderEditInputCell = params => /*#__PURE__*/(0, _jsxRuntime.jsx)(GridEditInputCell, (0, _extends2.default)({}, params));
111
179
  exports.renderEditInputCell = renderEditInputCell;
112
180
  if (process.env.NODE_ENV !== "production") renderEditInputCell.displayName = "renderEditInputCell";