@mui/x-data-grid-premium 5.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4052 -0
- package/DataGridPremium/DataGridPremium.d.ts +9 -0
- package/DataGridPremium/DataGridPremium.js +986 -0
- package/DataGridPremium/index.d.ts +2 -0
- package/DataGridPremium/index.js +2 -0
- package/DataGridPremium/package.json +6 -0
- package/DataGridPremium/useDataGridPremiumComponent.d.ts +4 -0
- package/DataGridPremium/useDataGridPremiumComponent.js +78 -0
- package/DataGridPremium/useDataGridPremiumProps.d.ts +6 -0
- package/DataGridPremium/useDataGridPremiumProps.js +37 -0
- package/LICENSE +12 -0
- package/README.md +31 -0
- package/components/GridExcelExportMenuItem.d.ts +9 -0
- package/components/GridExcelExportMenuItem.js +32 -0
- package/components/GridGroupingColumnLeafCell.d.ts +4 -0
- package/components/GridGroupingColumnLeafCell.js +22 -0
- package/components/GridGroupingCriteriaCell.d.ts +7 -0
- package/components/GridGroupingCriteriaCell.js +78 -0
- package/components/GridRowGroupableColumnMenuItems.d.ts +11 -0
- package/components/GridRowGroupableColumnMenuItems.js +63 -0
- package/components/GridRowGroupingColumnMenuItems.d.ts +11 -0
- package/components/GridRowGroupingColumnMenuItems.js +58 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/package.json +6 -0
- package/hooks/features/export/gridExcelExportInterface.d.ts +58 -0
- package/hooks/features/export/gridExcelExportInterface.js +1 -0
- package/hooks/features/export/index.d.ts +1 -0
- package/hooks/features/export/index.js +1 -0
- package/hooks/features/export/serializer/excelSerializer.d.ts +14 -0
- package/hooks/features/export/serializer/excelSerializer.js +218 -0
- package/hooks/features/export/useGridExcelExport.d.ts +10 -0
- package/hooks/features/export/useGridExcelExport.js +77 -0
- package/hooks/features/index.d.ts +2 -0
- package/hooks/features/index.js +3 -0
- package/hooks/features/rowGrouping/createGroupingColDef.d.ts +42 -0
- package/hooks/features/rowGrouping/createGroupingColDef.js +318 -0
- package/hooks/features/rowGrouping/gridRowGroupingInterfaces.d.ts +37 -0
- package/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +1 -0
- package/hooks/features/rowGrouping/gridRowGroupingSelector.d.ts +4 -0
- package/hooks/features/rowGrouping/gridRowGroupingSelector.js +5 -0
- package/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +27 -0
- package/hooks/features/rowGrouping/gridRowGroupingUtils.js +139 -0
- package/hooks/features/rowGrouping/index.d.ts +3 -0
- package/hooks/features/rowGrouping/index.js +3 -0
- package/hooks/features/rowGrouping/useGridRowGrouping.d.ts +11 -0
- package/hooks/features/rowGrouping/useGridRowGrouping.js +200 -0
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +4 -0
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +201 -0
- package/hooks/index.d.ts +2 -0
- package/hooks/index.js +3 -0
- package/hooks/package.json +6 -0
- package/hooks/utils/index.d.ts +1 -0
- package/hooks/utils/index.js +1 -0
- package/hooks/utils/useGridApiContext.d.ts +4 -0
- package/hooks/utils/useGridApiContext.js +2 -0
- package/hooks/utils/useGridApiRef.d.ts +4 -0
- package/hooks/utils/useGridApiRef.js +2 -0
- package/hooks/utils/useGridRootProps.d.ts +2 -0
- package/hooks/utils/useGridRootProps.js +2 -0
- package/hooks/utils/useKeepGroupedColumnsHidden.d.ts +12 -0
- package/hooks/utils/useKeepGroupedColumnsHidden.js +50 -0
- package/index.d.ts +22 -0
- package/index.js +25 -0
- package/legacy/DataGridPremium/DataGridPremium.js +986 -0
- package/legacy/DataGridPremium/index.js +2 -0
- package/legacy/DataGridPremium/useDataGridPremiumComponent.js +78 -0
- package/legacy/DataGridPremium/useDataGridPremiumProps.js +46 -0
- package/legacy/components/GridExcelExportMenuItem.js +30 -0
- package/legacy/components/GridGroupingColumnLeafCell.js +20 -0
- package/legacy/components/GridGroupingCriteriaCell.js +74 -0
- package/legacy/components/GridRowGroupableColumnMenuItems.js +61 -0
- package/legacy/components/GridRowGroupingColumnMenuItems.js +56 -0
- package/legacy/components/index.js +1 -0
- package/legacy/hooks/features/export/gridExcelExportInterface.js +1 -0
- package/legacy/hooks/features/export/index.js +1 -0
- package/legacy/hooks/features/export/serializer/excelSerializer.js +260 -0
- package/legacy/hooks/features/export/useGridExcelExport.js +111 -0
- package/legacy/hooks/features/index.js +3 -0
- package/legacy/hooks/features/rowGrouping/createGroupingColDef.js +319 -0
- package/legacy/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +1 -0
- package/legacy/hooks/features/rowGrouping/gridRowGroupingSelector.js +13 -0
- package/legacy/hooks/features/rowGrouping/gridRowGroupingUtils.js +147 -0
- package/legacy/hooks/features/rowGrouping/index.js +3 -0
- package/legacy/hooks/features/rowGrouping/useGridRowGrouping.js +206 -0
- package/legacy/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +215 -0
- package/legacy/hooks/index.js +3 -0
- package/legacy/hooks/utils/index.js +1 -0
- package/legacy/hooks/utils/useGridApiContext.js +2 -0
- package/legacy/hooks/utils/useGridApiRef.js +2 -0
- package/legacy/hooks/utils/useGridRootProps.js +2 -0
- package/legacy/hooks/utils/useKeepGroupedColumnsHidden.js +50 -0
- package/legacy/index.js +25 -0
- package/legacy/models/dataGridPremiumProps.js +1 -0
- package/legacy/models/gridApiPremium.js +1 -0
- package/legacy/models/gridGroupingValueGetterParams.js +1 -0
- package/legacy/models/gridStatePremium.js +1 -0
- package/legacy/models/index.js +1 -0
- package/legacy/typeOverloads/index.js +1 -0
- package/legacy/typeOverloads/modules.js +33 -0
- package/legacy/typeOverloads/reexports.js +6 -0
- package/legacy/utils/releaseInfo.js +15 -0
- package/models/dataGridPremiumProps.d.ts +64 -0
- package/models/dataGridPremiumProps.js +1 -0
- package/models/gridApiPremium.d.ts +13 -0
- package/models/gridApiPremium.js +1 -0
- package/models/gridGroupingValueGetterParams.d.ts +31 -0
- package/models/gridGroupingValueGetterParams.js +1 -0
- package/models/gridStatePremium.d.ts +14 -0
- package/models/gridStatePremium.js +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/models/package.json +6 -0
- package/modern/DataGridPremium/DataGridPremium.js +986 -0
- package/modern/DataGridPremium/index.js +2 -0
- package/modern/DataGridPremium/useDataGridPremiumComponent.js +76 -0
- package/modern/DataGridPremium/useDataGridPremiumProps.js +37 -0
- package/modern/components/GridExcelExportMenuItem.js +32 -0
- package/modern/components/GridGroupingColumnLeafCell.js +20 -0
- package/modern/components/GridGroupingCriteriaCell.js +76 -0
- package/modern/components/GridRowGroupableColumnMenuItems.js +61 -0
- package/modern/components/GridRowGroupingColumnMenuItems.js +56 -0
- package/modern/components/index.js +1 -0
- package/modern/hooks/features/export/gridExcelExportInterface.js +1 -0
- package/modern/hooks/features/export/index.js +1 -0
- package/modern/hooks/features/export/serializer/excelSerializer.js +216 -0
- package/modern/hooks/features/export/useGridExcelExport.js +73 -0
- package/modern/hooks/features/index.js +3 -0
- package/modern/hooks/features/rowGrouping/createGroupingColDef.js +302 -0
- package/modern/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +1 -0
- package/modern/hooks/features/rowGrouping/gridRowGroupingSelector.js +5 -0
- package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +137 -0
- package/modern/hooks/features/rowGrouping/index.js +3 -0
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +192 -0
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +201 -0
- package/modern/hooks/index.js +3 -0
- package/modern/hooks/utils/index.js +1 -0
- package/modern/hooks/utils/useGridApiContext.js +2 -0
- package/modern/hooks/utils/useGridApiRef.js +2 -0
- package/modern/hooks/utils/useGridRootProps.js +2 -0
- package/modern/hooks/utils/useKeepGroupedColumnsHidden.js +46 -0
- package/modern/index.js +25 -0
- package/modern/models/dataGridPremiumProps.js +1 -0
- package/modern/models/gridApiPremium.js +1 -0
- package/modern/models/gridGroupingValueGetterParams.js +1 -0
- package/modern/models/gridStatePremium.js +1 -0
- package/modern/models/index.js +1 -0
- package/modern/typeOverloads/index.js +1 -0
- package/modern/typeOverloads/modules.js +33 -0
- package/modern/typeOverloads/reexports.js +6 -0
- package/modern/utils/releaseInfo.js +15 -0
- package/node/DataGridPremium/DataGridPremium.js +1009 -0
- package/node/DataGridPremium/index.js +30 -0
- package/node/DataGridPremium/useDataGridPremiumComponent.js +91 -0
- package/node/DataGridPremium/useDataGridPremiumProps.js +57 -0
- package/node/components/GridExcelExportMenuItem.js +49 -0
- package/node/components/GridGroupingColumnLeafCell.js +38 -0
- package/node/components/GridGroupingCriteriaCell.js +99 -0
- package/node/components/GridRowGroupableColumnMenuItems.js +82 -0
- package/node/components/GridRowGroupingColumnMenuItems.js +78 -0
- package/node/components/index.js +18 -0
- package/node/hooks/features/export/gridExcelExportInterface.js +5 -0
- package/node/hooks/features/export/index.js +18 -0
- package/node/hooks/features/export/serializer/excelSerializer.js +233 -0
- package/node/hooks/features/export/useGridExcelExport.js +95 -0
- package/node/hooks/features/index.js +31 -0
- package/node/hooks/features/rowGrouping/createGroupingColDef.js +341 -0
- package/node/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +5 -0
- package/node/hooks/features/rowGrouping/gridRowGroupingSelector.js +18 -0
- package/node/hooks/features/rowGrouping/gridRowGroupingUtils.js +172 -0
- package/node/hooks/features/rowGrouping/index.js +51 -0
- package/node/hooks/features/rowGrouping/useGridRowGrouping.js +228 -0
- package/node/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +223 -0
- package/node/hooks/index.js +31 -0
- package/node/hooks/utils/index.js +18 -0
- package/node/hooks/utils/useGridApiContext.js +11 -0
- package/node/hooks/utils/useGridApiRef.js +11 -0
- package/node/hooks/utils/useGridRootProps.js +11 -0
- package/node/hooks/utils/useKeepGroupedColumnsHidden.js +66 -0
- package/node/index.js +272 -0
- package/node/models/dataGridPremiumProps.js +5 -0
- package/node/models/gridApiPremium.js +5 -0
- package/node/models/gridGroupingValueGetterParams.js +5 -0
- package/node/models/gridStatePremium.js +5 -0
- package/node/models/index.js +18 -0
- package/node/typeOverloads/index.js +3 -0
- package/node/typeOverloads/modules.js +34 -0
- package/node/typeOverloads/reexports.js +29 -0
- package/node/utils/releaseInfo.js +25 -0
- package/package.json +63 -0
- package/typeOverloads/index.d.ts +1 -0
- package/typeOverloads/index.js +1 -0
- package/typeOverloads/modules.d.ts +0 -0
- package/typeOverloads/modules.js +33 -0
- package/typeOverloads/package.json +6 -0
- package/typeOverloads/reexports.d.ts +22 -0
- package/typeOverloads/reexports.js +6 -0
- package/utils/releaseInfo.d.ts +1 -0
- package/utils/releaseInfo.js +15 -0
|
@@ -0,0 +1,1009 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.DataGridPremium = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _xLicensePro = require("@mui/x-license-pro");
|
|
15
|
+
|
|
16
|
+
var _utils = require("@mui/utils");
|
|
17
|
+
|
|
18
|
+
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
19
|
+
|
|
20
|
+
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
21
|
+
|
|
22
|
+
var _useDataGridPremiumComponent = require("./useDataGridPremiumComponent");
|
|
23
|
+
|
|
24
|
+
var _useDataGridPremiumProps = require("./useDataGridPremiumProps");
|
|
25
|
+
|
|
26
|
+
var _releaseInfo = require("../utils/releaseInfo");
|
|
27
|
+
|
|
28
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
|
+
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
34
|
+
const releaseInfo = (0, _releaseInfo.getReleaseInfo)();
|
|
35
|
+
const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremium(inProps, ref) {
|
|
36
|
+
const props = (0, _useDataGridPremiumProps.useDataGridPremiumProps)(inProps);
|
|
37
|
+
const apiRef = (0, _useDataGridPremiumComponent.useDataGridPremiumComponent)(props.apiRef, props);
|
|
38
|
+
(0, _xLicensePro.useLicenseVerifier)('x-data-grid-premium', releaseInfo);
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridContextProvider, {
|
|
40
|
+
apiRef: apiRef,
|
|
41
|
+
props: props,
|
|
42
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridRoot, {
|
|
43
|
+
className: props.className,
|
|
44
|
+
style: props.style,
|
|
45
|
+
sx: props.sx,
|
|
46
|
+
ref: ref,
|
|
47
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_xDataGridPro.GridErrorHandler, {
|
|
48
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridHeaderPlaceholder, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridBody, {
|
|
49
|
+
ColumnHeadersComponent: _internals.DataGridProColumnHeaders,
|
|
50
|
+
VirtualScrollerComponent: _internals.DataGridProVirtualScroller,
|
|
51
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicensePro.Watermark, {
|
|
52
|
+
packageName: "x-data-grid-premium",
|
|
53
|
+
releaseInfo: releaseInfo
|
|
54
|
+
})
|
|
55
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridFooterPlaceholder, {})]
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
const DataGridPremium = /*#__PURE__*/React.memo(DataGridPremiumRaw);
|
|
61
|
+
exports.DataGridPremium = DataGridPremium;
|
|
62
|
+
process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
63
|
+
// ----------------------------- Warning --------------------------------
|
|
64
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
65
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
66
|
+
// ----------------------------------------------------------------------
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The ref object that allows grid manipulation. Can be instantiated with [[useGridApiRef()]].
|
|
70
|
+
*/
|
|
71
|
+
apiRef: _propTypes.default.shape({
|
|
72
|
+
current: _propTypes.default.object.isRequired
|
|
73
|
+
}),
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The label of the grid.
|
|
77
|
+
*/
|
|
78
|
+
'aria-label': _propTypes.default.string,
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The id of the element containing a label for the grid.
|
|
82
|
+
*/
|
|
83
|
+
'aria-labelledby': _propTypes.default.string,
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* If `true`, the grid height is dynamic and follow the number of rows in the grid.
|
|
87
|
+
* @default false
|
|
88
|
+
*/
|
|
89
|
+
autoHeight: _propTypes.default.bool,
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* If `true`, the pageSize is calculated according to the container size and the max number of rows to avoid rendering a vertical scroll bar.
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
95
|
+
autoPageSize: _propTypes.default.bool,
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Controls the modes of the cells.
|
|
99
|
+
*/
|
|
100
|
+
cellModesModel: _propTypes.default.object,
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* If `true`, the grid get a first column with a checkbox that allows to select rows.
|
|
104
|
+
* @default false
|
|
105
|
+
*/
|
|
106
|
+
checkboxSelection: _propTypes.default.bool,
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* If `true`, the "Select All" header checkbox selects only the rows on the current page. To be used in combination with `checkboxSelection`.
|
|
110
|
+
* It only works if the pagination is enabled.
|
|
111
|
+
* @default false
|
|
112
|
+
*/
|
|
113
|
+
checkboxSelectionVisibleOnly: (0, _utils.chainPropTypes)(_propTypes.default.bool, props => {
|
|
114
|
+
if (!props.pagination && props.checkboxSelectionVisibleOnly) {
|
|
115
|
+
return new Error('MUI: The `checkboxSelectionVisibleOnly` prop has no effect when the pagination is not enabled.');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return null;
|
|
119
|
+
}),
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Override or extend the styles applied to the component.
|
|
123
|
+
*/
|
|
124
|
+
classes: _propTypes.default.object,
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Number of extra columns to be rendered before/after the visible slice.
|
|
128
|
+
* @default 3
|
|
129
|
+
*/
|
|
130
|
+
columnBuffer: _propTypes.default.number,
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Set of columns of type [[GridColumns]].
|
|
134
|
+
*/
|
|
135
|
+
columns: _propTypes.default.arrayOf(_propTypes.default.object).isRequired,
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Number of rows from the `columnBuffer` that can be visible before a new slice is rendered.
|
|
139
|
+
* @default 3
|
|
140
|
+
*/
|
|
141
|
+
columnThreshold: _propTypes.default.number,
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Extend native column types with your new column types.
|
|
145
|
+
*/
|
|
146
|
+
columnTypes: _propTypes.default.object,
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Set the column visibility model of the grid.
|
|
150
|
+
* If defined, the grid will ignore the `hide` property in [[GridColDef]].
|
|
151
|
+
*/
|
|
152
|
+
columnVisibilityModel: _propTypes.default.object,
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Overrideable components.
|
|
156
|
+
*/
|
|
157
|
+
components: _propTypes.default.object,
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Overrideable components props dynamically passed to the component at rendering.
|
|
161
|
+
*/
|
|
162
|
+
componentsProps: _propTypes.default.object,
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* If above 0, the row children will be expanded up to this depth.
|
|
166
|
+
* If equal to -1, all the row children will be expanded.
|
|
167
|
+
* @default 0
|
|
168
|
+
*/
|
|
169
|
+
defaultGroupingExpansionDepth: _propTypes.default.number,
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Set the density of the grid.
|
|
173
|
+
* @default "standard"
|
|
174
|
+
*/
|
|
175
|
+
density: _propTypes.default.oneOf(['comfortable', 'compact', 'standard']),
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* The row ids to show the detail panel.
|
|
179
|
+
*/
|
|
180
|
+
detailPanelExpandedRowIds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired),
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* If `true`, the filtering will only be applied to the top level rows when grouping rows with the `treeData` prop.
|
|
184
|
+
* @default false
|
|
185
|
+
*/
|
|
186
|
+
disableChildrenFiltering: _propTypes.default.bool,
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* If `true`, the sorting will only be applied to the top level rows when grouping rows with the `treeData` prop.
|
|
190
|
+
* @default false
|
|
191
|
+
*/
|
|
192
|
+
disableChildrenSorting: _propTypes.default.bool,
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* If `true`, column filters are disabled.
|
|
196
|
+
* @default false
|
|
197
|
+
*/
|
|
198
|
+
disableColumnFilter: _propTypes.default.bool,
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* If `true`, the column menu is disabled.
|
|
202
|
+
* @default false
|
|
203
|
+
*/
|
|
204
|
+
disableColumnMenu: _propTypes.default.bool,
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* If `true`, the column pinning is disabled.
|
|
208
|
+
* @default false
|
|
209
|
+
*/
|
|
210
|
+
disableColumnPinning: _propTypes.default.bool,
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* If `true`, reordering columns is disabled.
|
|
214
|
+
* @default false
|
|
215
|
+
*/
|
|
216
|
+
disableColumnReorder: _propTypes.default.bool,
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* If `true`, resizing columns is disabled.
|
|
220
|
+
* @default false
|
|
221
|
+
*/
|
|
222
|
+
disableColumnResize: _propTypes.default.bool,
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* If `true`, hiding/showing columns is disabled.
|
|
226
|
+
* @default false
|
|
227
|
+
*/
|
|
228
|
+
disableColumnSelector: _propTypes.default.bool,
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* If `true`, the density selector is disabled.
|
|
232
|
+
* @default false
|
|
233
|
+
*/
|
|
234
|
+
disableDensitySelector: _propTypes.default.bool,
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* If `true`, rows will not be extended to fill the full width of the grid container.
|
|
238
|
+
* @default false
|
|
239
|
+
*/
|
|
240
|
+
disableExtendRowFullWidth: _propTypes.default.bool,
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* If `true`, filtering with multiple columns is disabled.
|
|
244
|
+
* @default false
|
|
245
|
+
*/
|
|
246
|
+
disableMultipleColumnsFiltering: _propTypes.default.bool,
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* If `true`, sorting with multiple columns is disabled.
|
|
250
|
+
* @default false
|
|
251
|
+
*/
|
|
252
|
+
disableMultipleColumnsSorting: _propTypes.default.bool,
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* If `true`, multiple selection using the Ctrl or CMD key is disabled.
|
|
256
|
+
* @default false
|
|
257
|
+
*/
|
|
258
|
+
disableMultipleSelection: _propTypes.default.bool,
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* If `true`, the row grouping is disabled.
|
|
262
|
+
* @default false
|
|
263
|
+
*/
|
|
264
|
+
disableRowGrouping: _propTypes.default.bool,
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* If `true`, the selection on click on a row or cell is disabled.
|
|
268
|
+
* @default false
|
|
269
|
+
*/
|
|
270
|
+
disableSelectionOnClick: _propTypes.default.bool,
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* If `true`, the virtualization is disabled.
|
|
274
|
+
* @default false
|
|
275
|
+
*/
|
|
276
|
+
disableVirtualization: _propTypes.default.bool,
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Controls whether to use the cell or row editing.
|
|
280
|
+
* @default "cell"
|
|
281
|
+
*/
|
|
282
|
+
editMode: _propTypes.default.oneOf(['cell', 'row']),
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Set the edit rows model of the grid.
|
|
286
|
+
*/
|
|
287
|
+
editRowsModel: _propTypes.default.object,
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* An error that will turn the grid into its error state and display the error component.
|
|
291
|
+
*/
|
|
292
|
+
error: _propTypes.default.any,
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Features under development.
|
|
296
|
+
* For each feature, if the flag is not explicitly set to `true`, the feature will be fully disabled and any property / method call will not have any effect.
|
|
297
|
+
*/
|
|
298
|
+
experimentalFeatures: _propTypes.default.shape({
|
|
299
|
+
newEditingApi: _propTypes.default.bool,
|
|
300
|
+
preventCommitWhileValidating: _propTypes.default.bool,
|
|
301
|
+
rowGrouping: _propTypes.default.bool,
|
|
302
|
+
warnIfFocusStateIsNotSynced: _propTypes.default.bool
|
|
303
|
+
}),
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Filtering can be processed on the server or client-side.
|
|
307
|
+
* Set it to 'server' if you would like to handle filtering on the server-side.
|
|
308
|
+
* @default "client"
|
|
309
|
+
*/
|
|
310
|
+
filterMode: (0, _utils.chainPropTypes)(_propTypes.default.oneOf(['client', 'server']), props => {
|
|
311
|
+
if (props.treeData && props.filterMode === 'server') {
|
|
312
|
+
return new Error('MUI: The `filterMode="server"` prop is not available when the `treeData` is enabled.');
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
return null;
|
|
316
|
+
}),
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Set the filter model of the grid.
|
|
320
|
+
*/
|
|
321
|
+
filterModel: _propTypes.default.shape({
|
|
322
|
+
items: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
323
|
+
columnField: _propTypes.default.string.isRequired,
|
|
324
|
+
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
325
|
+
operatorValue: _propTypes.default.string,
|
|
326
|
+
value: _propTypes.default.any
|
|
327
|
+
})).isRequired,
|
|
328
|
+
linkOperator: _propTypes.default.oneOf(['and', 'or']),
|
|
329
|
+
quickFilterLogicOperator: _propTypes.default.oneOf(['and', 'or']),
|
|
330
|
+
quickFilterValues: _propTypes.default.array
|
|
331
|
+
}),
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Function that applies CSS classes dynamically on cells.
|
|
335
|
+
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
336
|
+
* @returns {string} The CSS class to apply to the cell.
|
|
337
|
+
*/
|
|
338
|
+
getCellClassName: _propTypes.default.func,
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Function that returns the element to render in row detail.
|
|
342
|
+
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
343
|
+
* @returns {JSX.Element} The row detail element.
|
|
344
|
+
*/
|
|
345
|
+
getDetailPanelContent: _propTypes.default.func,
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Function that returns the height of the row detail panel.
|
|
349
|
+
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
350
|
+
* @returns {number} The height in pixels.
|
|
351
|
+
* @default "() => 500"
|
|
352
|
+
*/
|
|
353
|
+
getDetailPanelHeight: _propTypes.default.func,
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Function that applies CSS classes dynamically on rows.
|
|
357
|
+
* @param {GridRowClassNameParams} params With all properties from [[GridRowClassNameParams]].
|
|
358
|
+
* @returns {string} The CSS class to apply to the row.
|
|
359
|
+
*/
|
|
360
|
+
getRowClassName: _propTypes.default.func,
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Function that sets the row height per row.
|
|
364
|
+
* @param {GridRowHeightParams} params With all properties from [[GridRowHeightParams]].
|
|
365
|
+
* @returns {GridRowHeightReturnValue} The row height value. If `null` or `undefined` then the default row height is applied.
|
|
366
|
+
*/
|
|
367
|
+
getRowHeight: _propTypes.default.func,
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Return the id of a given [[GridRowModel]].
|
|
371
|
+
*/
|
|
372
|
+
getRowId: _propTypes.default.func,
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Function that allows to specify the spacing between rows.
|
|
376
|
+
* @param {GridRowSpacingParams} params With all properties from [[GridRowSpacingParams]].
|
|
377
|
+
* @returns {GridRowSpacing} The row spacing values.
|
|
378
|
+
*/
|
|
379
|
+
getRowSpacing: _propTypes.default.func,
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Determines the path of a row in the tree data.
|
|
383
|
+
* For instance, a row with the path ["A", "B"] is the child of the row with the path ["A"].
|
|
384
|
+
* Note that all paths must contain at least one element.
|
|
385
|
+
* @template R
|
|
386
|
+
* @param {R} row The row from which we want the path.
|
|
387
|
+
* @returns {string[]} The path to the row.
|
|
388
|
+
*/
|
|
389
|
+
getTreeDataPath: _propTypes.default.func,
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* The grouping column used by the tree data.
|
|
393
|
+
*/
|
|
394
|
+
groupingColDef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Set the height in pixel of the column headers in the grid.
|
|
398
|
+
* @default 56
|
|
399
|
+
*/
|
|
400
|
+
headerHeight: _propTypes.default.number,
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* If `true`, the footer component is hidden.
|
|
404
|
+
* @default false
|
|
405
|
+
*/
|
|
406
|
+
hideFooter: _propTypes.default.bool,
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* If `true`, the pagination component in the footer is hidden.
|
|
410
|
+
* @default false
|
|
411
|
+
*/
|
|
412
|
+
hideFooterPagination: _propTypes.default.bool,
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* If `true`, the row count in the footer is hidden.
|
|
416
|
+
* It has no effect if the pagination is enabled.
|
|
417
|
+
* @default false
|
|
418
|
+
*/
|
|
419
|
+
hideFooterRowCount: (0, _utils.chainPropTypes)(_propTypes.default.bool, props => {
|
|
420
|
+
if (props.pagination && props.hideFooterRowCount) {
|
|
421
|
+
return new Error('MUI: The `hideFooterRowCount` prop has no effect when the pagination is enabled.');
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
return null;
|
|
425
|
+
}),
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* If `true`, the selected row count in the footer is hidden.
|
|
429
|
+
* @default false
|
|
430
|
+
*/
|
|
431
|
+
hideFooterSelectedRowCount: _propTypes.default.bool,
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* The initial state of the DataGridPremium.
|
|
435
|
+
* The data in it will be set in the state on initialization but will not be controlled.
|
|
436
|
+
* If one of the data in `initialState` is also being controlled, then the control state wins.
|
|
437
|
+
*/
|
|
438
|
+
initialState: _propTypes.default.object,
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Callback fired when a cell is rendered, returns true if the cell is editable.
|
|
442
|
+
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
443
|
+
* @returns {boolean} A boolean indicating if the cell is editable.
|
|
444
|
+
*/
|
|
445
|
+
isCellEditable: _propTypes.default.func,
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Determines if a group should be expanded after its creation.
|
|
449
|
+
* This prop takes priority over the `defaultGroupingExpansionDepth` prop.
|
|
450
|
+
* @param {GridRowTreeNodeConfig} node The node of the group to test.
|
|
451
|
+
* @returns {boolean} A boolean indicating if the group is expanded.
|
|
452
|
+
*/
|
|
453
|
+
isGroupExpandedByDefault: _propTypes.default.func,
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Determines if a row can be selected.
|
|
457
|
+
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
458
|
+
* @returns {boolean} A boolean indicating if the cell is selectable.
|
|
459
|
+
*/
|
|
460
|
+
isRowSelectable: _propTypes.default.func,
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* If `true`, the selection model will retain selected rows that do not exist.
|
|
464
|
+
* Useful when using server side pagination and row selections need to be retained
|
|
465
|
+
* when changing pages.
|
|
466
|
+
* @default false
|
|
467
|
+
*/
|
|
468
|
+
keepNonExistentRowsSelected: _propTypes.default.bool,
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* If `true`, a loading overlay is displayed.
|
|
472
|
+
*/
|
|
473
|
+
loading: _propTypes.default.bool,
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Set the locale text of the grid.
|
|
477
|
+
* You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/grid/x-data-grid/src/constants/localeTextConstants.ts) in the GitHub repository.
|
|
478
|
+
*/
|
|
479
|
+
localeText: _propTypes.default.object,
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Pass a custom logger in the components that implements the [[Logger]] interface.
|
|
483
|
+
* @default console
|
|
484
|
+
*/
|
|
485
|
+
logger: _propTypes.default.shape({
|
|
486
|
+
debug: _propTypes.default.func.isRequired,
|
|
487
|
+
error: _propTypes.default.func.isRequired,
|
|
488
|
+
info: _propTypes.default.func.isRequired,
|
|
489
|
+
warn: _propTypes.default.func.isRequired
|
|
490
|
+
}),
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Allows to pass the logging level or false to turn off logging.
|
|
494
|
+
* @default "debug"
|
|
495
|
+
*/
|
|
496
|
+
logLevel: _propTypes.default.oneOf(['debug', 'error', 'info', 'warn', false]),
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Nonce of the inline styles for [Content Security Policy](https://www.w3.org/TR/2016/REC-CSP2-20161215/#script-src-the-nonce-attribute).
|
|
500
|
+
*/
|
|
501
|
+
nonce: _propTypes.default.string,
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Callback fired when any cell is clicked.
|
|
505
|
+
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
506
|
+
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
507
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
508
|
+
*/
|
|
509
|
+
onCellClick: _propTypes.default.func,
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Callback fired when a double click event comes from a cell element.
|
|
513
|
+
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
514
|
+
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
515
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
516
|
+
*/
|
|
517
|
+
onCellDoubleClick: _propTypes.default.func,
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Callback fired when the cell changes are committed.
|
|
521
|
+
* @param {GridCellEditCommitParams} params With all properties from [[GridCellEditCommitParams]].
|
|
522
|
+
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
|
|
523
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
524
|
+
*/
|
|
525
|
+
onCellEditCommit: _propTypes.default.func,
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Callback fired when the cell turns to edit mode.
|
|
529
|
+
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
530
|
+
* @param {MuiEvent<React.KeyboardEvent | React.MouseEvent>} event The event that caused this prop to be called.
|
|
531
|
+
*/
|
|
532
|
+
onCellEditStart: _propTypes.default.func,
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Callback fired when the cell turns to view mode.
|
|
536
|
+
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
537
|
+
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
|
|
538
|
+
*/
|
|
539
|
+
onCellEditStop: _propTypes.default.func,
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Callback fired when a cell loses focus.
|
|
543
|
+
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
544
|
+
* @param {MuiEvent<MuiBaseEvent>} event The event object.
|
|
545
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
546
|
+
*/
|
|
547
|
+
onCellFocusOut: _propTypes.default.func,
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Callback fired when a keydown event comes from a cell element.
|
|
551
|
+
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
552
|
+
* @param {MuiEvent<React.KeyboardEvent>} event The event object.
|
|
553
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
554
|
+
*/
|
|
555
|
+
onCellKeyDown: _propTypes.default.func,
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Callback fired when the `cellModesModel` prop changes.
|
|
559
|
+
* @param {GridCellModesModel} cellModesModel Object containig which cells are in "edit" mode.
|
|
560
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
561
|
+
*/
|
|
562
|
+
onCellModesModelChange: _propTypes.default.func,
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Callback fired when a click event comes from a column header element.
|
|
566
|
+
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
567
|
+
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
568
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
569
|
+
*/
|
|
570
|
+
onColumnHeaderClick: _propTypes.default.func,
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Callback fired when a double click event comes from a column header element.
|
|
574
|
+
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
575
|
+
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
576
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
577
|
+
*/
|
|
578
|
+
onColumnHeaderDoubleClick: _propTypes.default.func,
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Callback fired when a mouse enter event comes from a column header element.
|
|
582
|
+
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
583
|
+
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
584
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
585
|
+
*/
|
|
586
|
+
onColumnHeaderEnter: _propTypes.default.func,
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Callback fired when a mouse leave event comes from a column header element.
|
|
590
|
+
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
591
|
+
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
592
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
593
|
+
*/
|
|
594
|
+
onColumnHeaderLeave: _propTypes.default.func,
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Callback fired when a mouseout event comes from a column header element.
|
|
598
|
+
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
599
|
+
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
600
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
601
|
+
*/
|
|
602
|
+
onColumnHeaderOut: _propTypes.default.func,
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Callback fired when a mouseover event comes from a column header element.
|
|
606
|
+
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
607
|
+
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
608
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
609
|
+
*/
|
|
610
|
+
onColumnHeaderOver: _propTypes.default.func,
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Callback fired when a column is reordered.
|
|
614
|
+
* @param {GridColumnOrderChangeParams} params With all properties from [[GridColumnOrderChangeParams]].
|
|
615
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
616
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
617
|
+
*/
|
|
618
|
+
onColumnOrderChange: _propTypes.default.func,
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Callback fired while a column is being resized.
|
|
622
|
+
* @param {GridColumnResizeParams} params With all properties from [[GridColumnResizeParams]].
|
|
623
|
+
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
624
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
625
|
+
*/
|
|
626
|
+
onColumnResize: _propTypes.default.func,
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Callback fired when a column visibility changes.
|
|
630
|
+
* Only works when no `columnVisibilityModel` is provided and if we change the visibility of a single column at a time.
|
|
631
|
+
* @param {GridColumnVisibilityChangeParams} params With all properties from [[GridColumnVisibilityChangeParams]].
|
|
632
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
633
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
634
|
+
* @deprecated Use `onColumnVisibilityModelChange` instead.
|
|
635
|
+
*/
|
|
636
|
+
onColumnVisibilityChange: _propTypes.default.func,
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Callback fired when the column visibility model changes.
|
|
640
|
+
* @param {GridColumnVisibilityModel} model The new model.
|
|
641
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
642
|
+
*/
|
|
643
|
+
onColumnVisibilityModelChange: _propTypes.default.func,
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Callback fired when the width of a column is changed.
|
|
647
|
+
* @param {GridColumnResizeParams} params With all properties from [[GridColumnResizeParams]].
|
|
648
|
+
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
649
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
650
|
+
*/
|
|
651
|
+
onColumnWidthChange: _propTypes.default.func,
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Callback fired when the detail panel of a row is opened or closed.
|
|
655
|
+
* @param {GridRowId[]} ids The ids of the rows which have the detail panel open.
|
|
656
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
657
|
+
*/
|
|
658
|
+
onDetailPanelExpandedRowIdsChange: _propTypes.default.func,
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Callback fired when the edit cell value changes.
|
|
662
|
+
* @param {GridEditCellPropsParams} params With all properties from [[GridEditCellPropsParams]].
|
|
663
|
+
* @param {MuiEvent<React.SyntheticEvent>} event The event that caused this prop to be called.
|
|
664
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
665
|
+
* @deprecated use `preProcessEditCellProps` from the [`GridColDef`](/x/api/data-grid/grid-col-def/)
|
|
666
|
+
*/
|
|
667
|
+
onEditCellPropsChange: _propTypes.default.func,
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Callback fired when the `editRowsModel` changes.
|
|
671
|
+
* @param {GridEditRowsModel} editRowsModel With all properties from [[GridEditRowsModel]].
|
|
672
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
673
|
+
*/
|
|
674
|
+
onEditRowsModelChange: _propTypes.default.func,
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Callback fired when an exception is thrown in the grid.
|
|
678
|
+
* @param {any} args The arguments passed to the `showError` call.
|
|
679
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
680
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
681
|
+
*/
|
|
682
|
+
onError: _propTypes.default.func,
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* Callback fired when the Filter model changes before the filters are applied.
|
|
686
|
+
* @param {GridFilterModel} model With all properties from [[GridFilterModel]].
|
|
687
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
688
|
+
*/
|
|
689
|
+
onFilterModelChange: _propTypes.default.func,
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Callback fired when the current page has changed.
|
|
693
|
+
* @param {number} page Index of the page displayed on the Grid.
|
|
694
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
695
|
+
*/
|
|
696
|
+
onPageChange: _propTypes.default.func,
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Callback fired when the page size has changed.
|
|
700
|
+
* @param {number} pageSize Size of the page displayed on the Grid.
|
|
701
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
702
|
+
*/
|
|
703
|
+
onPageSizeChange: _propTypes.default.func,
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Callback fired when the pinned columns have changed.
|
|
707
|
+
* @param {GridPinnedColumns} pinnedColumns The changed pinned columns.
|
|
708
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
709
|
+
*/
|
|
710
|
+
onPinnedColumnsChange: _propTypes.default.func,
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Callback fired when the preferences panel is closed.
|
|
714
|
+
* @param {GridPreferencePanelParams} params With all properties from [[GridPreferencePanelParams]].
|
|
715
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
716
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
717
|
+
*/
|
|
718
|
+
onPreferencePanelClose: _propTypes.default.func,
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* Callback fired when the preferences panel is opened.
|
|
722
|
+
* @param {GridPreferencePanelParams} params With all properties from [[GridPreferencePanelParams]].
|
|
723
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
724
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
725
|
+
*/
|
|
726
|
+
onPreferencePanelOpen: _propTypes.default.func,
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* Callback called when `processRowUpdate` throws an error or rejects.
|
|
730
|
+
* @param {any} error The error thrown.
|
|
731
|
+
*/
|
|
732
|
+
onProcessRowUpdateError: _propTypes.default.func,
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Callback fired when the grid is resized.
|
|
736
|
+
* @param {ElementSize} containerSize With all properties from [[ElementSize]].
|
|
737
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
738
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
739
|
+
*/
|
|
740
|
+
onResize: _propTypes.default.func,
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Callback fired when a row is clicked.
|
|
744
|
+
* Not called if the target clicked is an interactive element added by the built-in columns.
|
|
745
|
+
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
746
|
+
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
747
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
748
|
+
*/
|
|
749
|
+
onRowClick: _propTypes.default.func,
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* Callback fired when a double click event comes from a row container element.
|
|
753
|
+
* @param {GridRowParams} params With all properties from [[RowParams]].
|
|
754
|
+
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
755
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
756
|
+
*/
|
|
757
|
+
onRowDoubleClick: _propTypes.default.func,
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Callback fired when the row changes are committed.
|
|
761
|
+
* @param {GridRowId} id The row id.
|
|
762
|
+
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
|
|
763
|
+
*/
|
|
764
|
+
onRowEditCommit: _propTypes.default.func,
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Callback fired when the row turns to edit mode.
|
|
768
|
+
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
769
|
+
* @param {MuiEvent<React.KeyboardEvent | React.MouseEvent>} event The event that caused this prop to be called.
|
|
770
|
+
*/
|
|
771
|
+
onRowEditStart: _propTypes.default.func,
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Callback fired when the row turns to view mode.
|
|
775
|
+
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
776
|
+
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
|
|
777
|
+
*/
|
|
778
|
+
onRowEditStop: _propTypes.default.func,
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Callback fired when the row grouping model changes.
|
|
782
|
+
* @param {GridRowGroupingModel} model Columns used as grouping criteria.
|
|
783
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
784
|
+
*/
|
|
785
|
+
onRowGroupingModelChange: _propTypes.default.func,
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Callback fired when the `rowModesModel` prop changes.
|
|
789
|
+
* @param {GridRowModesModel} rowModesModel Object containig which rows are in "edit" mode.
|
|
790
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
791
|
+
*/
|
|
792
|
+
onRowModesModelChange: _propTypes.default.func,
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Callback fired when a row is being reordered.
|
|
796
|
+
* @param {GridRowOrderChangeParams} params With all properties from [[GridRowOrderChangeParams]].
|
|
797
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
798
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
799
|
+
*/
|
|
800
|
+
onRowOrderChange: _propTypes.default.func,
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* Callback fired when scrolling to the bottom of the grid viewport.
|
|
804
|
+
* @param {GridRowScrollEndParams} params With all properties from [[GridRowScrollEndParams]].
|
|
805
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
806
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
807
|
+
*/
|
|
808
|
+
onRowsScrollEnd: _propTypes.default.func,
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Callback fired when the selection state of one or multiple rows changes.
|
|
812
|
+
* @param {GridSelectionModel} selectionModel With all the row ids [[GridSelectionModel]].
|
|
813
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
814
|
+
*/
|
|
815
|
+
onSelectionModelChange: _propTypes.default.func,
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* Callback fired when the sort model changes before a column is sorted.
|
|
819
|
+
* @param {GridSortModel} model With all properties from [[GridSortModel]].
|
|
820
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
821
|
+
*/
|
|
822
|
+
onSortModelChange: _propTypes.default.func,
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Callback fired when the state of the grid is updated.
|
|
826
|
+
* @param {GridState} state The new state.
|
|
827
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
828
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
829
|
+
* @internal
|
|
830
|
+
*/
|
|
831
|
+
onStateChange: _propTypes.default.func,
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* The zero-based index of the current page.
|
|
835
|
+
* @default 0
|
|
836
|
+
*/
|
|
837
|
+
page: _propTypes.default.number,
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Set the number of rows in one page.
|
|
841
|
+
* If some of the rows have children (for instance in the tree data), this number represents the amount of top level rows wanted on each page.
|
|
842
|
+
* @default 100
|
|
843
|
+
*/
|
|
844
|
+
pageSize: _propTypes.default.number,
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* If `true`, pagination is enabled.
|
|
848
|
+
* @default false
|
|
849
|
+
*/
|
|
850
|
+
pagination: _propTypes.default.bool,
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* Pagination can be processed on the server or client-side.
|
|
854
|
+
* Set it to 'client' if you would like to handle the pagination on the client-side.
|
|
855
|
+
* Set it to 'server' if you would like to handle the pagination on the server-side.
|
|
856
|
+
* @default "client"
|
|
857
|
+
*/
|
|
858
|
+
paginationMode: _propTypes.default.oneOf(['client', 'server']),
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* The column fields to display pinned to left or right.
|
|
862
|
+
*/
|
|
863
|
+
pinnedColumns: _propTypes.default.shape({
|
|
864
|
+
left: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
865
|
+
right: _propTypes.default.arrayOf(_propTypes.default.string)
|
|
866
|
+
}),
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* Callback called before updating a row with new values in the row and cell editing.
|
|
870
|
+
* Only applied if `props.experimentalFeatures.newEditingApi: true`.
|
|
871
|
+
* @template R
|
|
872
|
+
* @param {R} newRow Row object with the new values.
|
|
873
|
+
* @param {R} oldRow Row object with the old values.
|
|
874
|
+
* @returns {Promise<R> | R} The final values to update the row.
|
|
875
|
+
*/
|
|
876
|
+
processRowUpdate: _propTypes.default.func,
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Number of extra rows to be rendered before/after the visible slice.
|
|
880
|
+
* @default 3
|
|
881
|
+
*/
|
|
882
|
+
rowBuffer: _propTypes.default.number,
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* Set the total number of rows, if it is different from the length of the value `rows` prop.
|
|
886
|
+
* If some rows have children (for instance in the tree data), this number represents the amount of top level rows.
|
|
887
|
+
*/
|
|
888
|
+
rowCount: _propTypes.default.number,
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* If `single`, all column we are grouping by will be represented in the same grouping the same column.
|
|
892
|
+
* If `multiple`, each column we are grouping by will be represented in its own column.
|
|
893
|
+
* @default 'single'
|
|
894
|
+
*/
|
|
895
|
+
rowGroupingColumnMode: _propTypes.default.oneOf(['multiple', 'single']),
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* Set the row grouping model of the grid.
|
|
899
|
+
*/
|
|
900
|
+
rowGroupingModel: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Set the height in pixel of a row in the grid.
|
|
904
|
+
* @default 52
|
|
905
|
+
*/
|
|
906
|
+
rowHeight: _propTypes.default.number,
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* Controls the modes of the rows.
|
|
910
|
+
*/
|
|
911
|
+
rowModesModel: _propTypes.default.object,
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* If `true`, the reordering of rows is enabled.
|
|
915
|
+
* @default false
|
|
916
|
+
*/
|
|
917
|
+
rowReordering: _propTypes.default.bool,
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Set of rows of type [[GridRowsProp]].
|
|
921
|
+
*/
|
|
922
|
+
rows: _propTypes.default.array.isRequired,
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* Sets the type of space between rows added by `getRowSpacing`.
|
|
926
|
+
* @default "margin"
|
|
927
|
+
*/
|
|
928
|
+
rowSpacingType: _propTypes.default.oneOf(['border', 'margin']),
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* Select the pageSize dynamically using the component UI.
|
|
932
|
+
* @default [25, 50, 100]
|
|
933
|
+
*/
|
|
934
|
+
rowsPerPageOptions: _propTypes.default.arrayOf(_propTypes.default.number),
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* Number of rows from the `rowBuffer` that can be visible before a new slice is rendered.
|
|
938
|
+
* @default 3
|
|
939
|
+
*/
|
|
940
|
+
rowThreshold: _propTypes.default.number,
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Override the height/width of the grid inner scrollbar.
|
|
944
|
+
*/
|
|
945
|
+
scrollbarSize: _propTypes.default.number,
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Set the area in `px` at the bottom of the grid viewport where onRowsScrollEnd is called.
|
|
949
|
+
* @default 80
|
|
950
|
+
*/
|
|
951
|
+
scrollEndThreshold: _propTypes.default.number,
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* Set the selection model of the grid.
|
|
955
|
+
*/
|
|
956
|
+
selectionModel: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired), _propTypes.default.number, _propTypes.default.string]),
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* If `true`, the right border of the cells are displayed.
|
|
960
|
+
* @default false
|
|
961
|
+
*/
|
|
962
|
+
showCellRightBorder: _propTypes.default.bool,
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* If `true`, the right border of the column headers are displayed.
|
|
966
|
+
* @default false
|
|
967
|
+
*/
|
|
968
|
+
showColumnRightBorder: _propTypes.default.bool,
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Sorting can be processed on the server or client-side.
|
|
972
|
+
* Set it to 'client' if you would like to handle sorting on the client-side.
|
|
973
|
+
* Set it to 'server' if you would like to handle sorting on the server-side.
|
|
974
|
+
* @default "client"
|
|
975
|
+
*/
|
|
976
|
+
sortingMode: _propTypes.default.oneOf(['client', 'server']),
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* The order of the sorting sequence.
|
|
980
|
+
* @default ['asc', 'desc', null]
|
|
981
|
+
*/
|
|
982
|
+
sortingOrder: _propTypes.default.arrayOf(_propTypes.default.oneOf(['asc', 'desc'])),
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* Set the sort model of the grid.
|
|
986
|
+
*/
|
|
987
|
+
sortModel: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
988
|
+
field: _propTypes.default.string.isRequired,
|
|
989
|
+
sort: _propTypes.default.oneOf(['asc', 'desc'])
|
|
990
|
+
})),
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
994
|
+
*/
|
|
995
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* If positive, the Grid will throttle updates coming from `apiRef.current.updateRows` and `apiRef.current.setRows`.
|
|
999
|
+
* It can be useful if you have a high update rate but do not want to do heavy work like filtering / sorting or rendering on each individual update.
|
|
1000
|
+
* @default 0
|
|
1001
|
+
*/
|
|
1002
|
+
throttleRowsMs: _propTypes.default.number,
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* If `true`, the rows will be gathered in a tree structure according to the `getTreeDataPath` prop.
|
|
1006
|
+
* @default false
|
|
1007
|
+
*/
|
|
1008
|
+
treeData: _propTypes.default.bool
|
|
1009
|
+
} : void 0;
|