@mui/x-data-grid 7.17.0 → 7.19.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 (203) hide show
  1. package/CHANGELOG.md +208 -5
  2. package/DataGrid/DataGrid.js +16 -1
  3. package/DataGrid/useDataGridComponent.js +3 -0
  4. package/DataGrid/useDataGridProps.js +2 -1
  5. package/components/GridRow.js +1 -0
  6. package/components/cell/GridCell.js +33 -9
  7. package/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
  8. package/components/columnSelection/GridCellCheckboxRenderer.js +12 -4
  9. package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
  10. package/components/containers/GridRoot.js +1 -1
  11. package/components/containers/GridRootStyles.js +32 -23
  12. package/components/containers/GridToolbarContainer.js +1 -1
  13. package/components/menu/GridMenu.js +1 -1
  14. package/components/panel/GridPanel.d.ts +1 -1
  15. package/components/panel/GridPanel.js +1 -1
  16. package/components/panel/GridPanelContent.js +1 -1
  17. package/components/panel/GridPanelFooter.js +1 -1
  18. package/components/panel/GridPanelHeader.js +1 -1
  19. package/components/panel/GridPanelWrapper.js +1 -1
  20. package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
  21. package/components/toolbar/GridToolbarQuickFilter.js +1 -1
  22. package/components/virtualization/GridBottomContainer.d.ts +1 -1
  23. package/components/virtualization/GridBottomContainer.js +18 -1
  24. package/components/virtualization/GridMainContainer.js +3 -1
  25. package/components/virtualization/GridTopContainer.d.ts +1 -1
  26. package/components/virtualization/GridTopContainer.js +1 -1
  27. package/components/virtualization/GridVirtualScrollbar.js +1 -7
  28. package/components/virtualization/GridVirtualScroller.js +1 -0
  29. package/components/virtualization/GridVirtualScrollerFiller.js +3 -4
  30. package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +4 -4
  31. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -2
  32. package/hooks/features/columnHeaders/useGridColumnHeaders.js +11 -11
  33. package/hooks/features/columnResize/columnResizeSelector.d.ts +1 -1
  34. package/hooks/features/columnResize/useGridColumnResize.js +6 -6
  35. package/hooks/features/columns/gridColumnsSelector.d.ts +12 -12
  36. package/hooks/features/columns/gridColumnsUtils.js +3 -2
  37. package/hooks/features/density/densitySelector.d.ts +1 -1
  38. package/hooks/features/dimensions/gridDimensionsApi.d.ts +4 -0
  39. package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
  40. package/hooks/features/dimensions/useGridDimensions.js +4 -1
  41. package/hooks/features/editing/useGridCellEditing.js +3 -19
  42. package/hooks/features/editing/useGridRowEditing.js +7 -2
  43. package/hooks/features/editing/utils.d.ts +2 -0
  44. package/hooks/features/editing/utils.js +15 -0
  45. package/hooks/features/export/useGridPrintExport.js +2 -1
  46. package/hooks/features/filter/gridFilterSelector.d.ts +17 -17
  47. package/hooks/features/focus/gridFocusStateSelector.d.ts +8 -8
  48. package/hooks/features/focus/useGridFocus.js +2 -1
  49. package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +3 -3
  50. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +10 -46
  51. package/hooks/features/keyboardNavigation/utils.d.ts +17 -0
  52. package/hooks/features/keyboardNavigation/utils.js +58 -0
  53. package/hooks/features/pagination/gridPaginationSelector.d.ts +9 -9
  54. package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  55. package/hooks/features/rowSelection/useGridRowSelection.d.ts +1 -1
  56. package/hooks/features/rowSelection/useGridRowSelection.js +105 -29
  57. package/hooks/features/rowSelection/utils.d.ts +10 -0
  58. package/hooks/features/rowSelection/utils.js +156 -1
  59. package/hooks/features/rows/gridRowSpanningSelectors.d.ts +4 -0
  60. package/hooks/features/rows/gridRowSpanningSelectors.js +5 -0
  61. package/hooks/features/rows/gridRowSpanningUtils.d.ts +10 -0
  62. package/hooks/features/rows/gridRowSpanningUtils.js +42 -0
  63. package/hooks/features/rows/gridRowsSelector.d.ts +14 -14
  64. package/hooks/features/rows/useGridRowSpanning.d.ts +27 -0
  65. package/hooks/features/rows/useGridRowSpanning.js +257 -0
  66. package/hooks/features/rows/useGridRows.d.ts +1 -1
  67. package/hooks/features/rows/useGridRows.js +7 -1
  68. package/hooks/features/scroll/useGridScroll.js +19 -19
  69. package/hooks/features/sorting/gridSortingSelector.d.ts +4 -4
  70. package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +5 -5
  71. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
  72. package/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
  73. package/hooks/utils/useGridApiEventHandler.js +0 -1
  74. package/hooks/utils/useGridVisibleRows.d.ts +2 -2
  75. package/index.js +1 -1
  76. package/internals/index.d.ts +2 -0
  77. package/internals/index.js +2 -0
  78. package/locales/bgBG.js +8 -9
  79. package/locales/deDE.js +4 -4
  80. package/locales/frFR.js +4 -4
  81. package/locales/hrHR.d.ts +1 -1
  82. package/locales/hrHR.js +69 -46
  83. package/locales/jaJP.js +1 -2
  84. package/locales/ptPT.d.ts +1 -1
  85. package/locales/ptPT.js +4 -4
  86. package/locales/viVN.js +20 -20
  87. package/locales/zhHK.d.ts +1 -1
  88. package/models/colDef/gridColDef.d.ts +4 -0
  89. package/models/gridRowSelectionModel.d.ts +4 -0
  90. package/models/gridStateCommunity.d.ts +2 -0
  91. package/models/props/DataGridProps.d.ts +30 -1
  92. package/modern/DataGrid/DataGrid.js +16 -1
  93. package/modern/DataGrid/useDataGridComponent.js +3 -0
  94. package/modern/DataGrid/useDataGridProps.js +2 -1
  95. package/modern/components/GridRow.js +1 -0
  96. package/modern/components/cell/GridCell.js +33 -9
  97. package/modern/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
  98. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +12 -4
  99. package/modern/components/containers/GridRoot.js +1 -1
  100. package/modern/components/containers/GridRootStyles.js +32 -23
  101. package/modern/components/containers/GridToolbarContainer.js +1 -1
  102. package/modern/components/menu/GridMenu.js +1 -1
  103. package/modern/components/panel/GridPanel.js +1 -1
  104. package/modern/components/panel/GridPanelContent.js +1 -1
  105. package/modern/components/panel/GridPanelFooter.js +1 -1
  106. package/modern/components/panel/GridPanelHeader.js +1 -1
  107. package/modern/components/panel/GridPanelWrapper.js +1 -1
  108. package/modern/components/toolbar/GridToolbarQuickFilter.js +1 -1
  109. package/modern/components/virtualization/GridBottomContainer.js +18 -1
  110. package/modern/components/virtualization/GridMainContainer.js +3 -1
  111. package/modern/components/virtualization/GridTopContainer.js +1 -1
  112. package/modern/components/virtualization/GridVirtualScrollbar.js +1 -7
  113. package/modern/components/virtualization/GridVirtualScroller.js +1 -0
  114. package/modern/components/virtualization/GridVirtualScrollerFiller.js +3 -4
  115. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +11 -11
  116. package/modern/hooks/features/columnResize/useGridColumnResize.js +6 -6
  117. package/modern/hooks/features/columns/gridColumnsUtils.js +3 -2
  118. package/modern/hooks/features/dimensions/useGridDimensions.js +4 -1
  119. package/modern/hooks/features/editing/useGridCellEditing.js +3 -19
  120. package/modern/hooks/features/editing/useGridRowEditing.js +7 -2
  121. package/modern/hooks/features/editing/utils.js +15 -0
  122. package/modern/hooks/features/export/useGridPrintExport.js +2 -1
  123. package/modern/hooks/features/focus/useGridFocus.js +2 -1
  124. package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +10 -46
  125. package/modern/hooks/features/keyboardNavigation/utils.js +58 -0
  126. package/modern/hooks/features/rowSelection/useGridRowSelection.js +105 -29
  127. package/modern/hooks/features/rowSelection/utils.js +156 -1
  128. package/modern/hooks/features/rows/gridRowSpanningSelectors.js +5 -0
  129. package/modern/hooks/features/rows/gridRowSpanningUtils.js +42 -0
  130. package/modern/hooks/features/rows/useGridRowSpanning.js +257 -0
  131. package/modern/hooks/features/rows/useGridRows.js +7 -1
  132. package/modern/hooks/features/scroll/useGridScroll.js +19 -19
  133. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
  134. package/modern/hooks/utils/useGridApiEventHandler.js +0 -1
  135. package/modern/index.js +1 -1
  136. package/modern/internals/index.js +2 -0
  137. package/modern/locales/bgBG.js +8 -9
  138. package/modern/locales/deDE.js +4 -4
  139. package/modern/locales/frFR.js +4 -4
  140. package/modern/locales/hrHR.js +69 -46
  141. package/modern/locales/jaJP.js +1 -2
  142. package/modern/locales/ptPT.js +4 -4
  143. package/modern/locales/viVN.js +20 -20
  144. package/modern/utils/createSelector.js +6 -0
  145. package/modern/utils/domUtils.js +12 -12
  146. package/node/DataGrid/DataGrid.js +16 -1
  147. package/node/DataGrid/useDataGridComponent.js +3 -0
  148. package/node/DataGrid/useDataGridProps.js +2 -1
  149. package/node/components/GridRow.js +1 -0
  150. package/node/components/cell/GridCell.js +33 -9
  151. package/node/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
  152. package/node/components/columnSelection/GridCellCheckboxRenderer.js +12 -4
  153. package/node/components/containers/GridRoot.js +1 -1
  154. package/node/components/containers/GridRootStyles.js +32 -23
  155. package/node/components/containers/GridToolbarContainer.js +1 -1
  156. package/node/components/menu/GridMenu.js +1 -1
  157. package/node/components/panel/GridPanel.js +1 -1
  158. package/node/components/panel/GridPanelContent.js +1 -1
  159. package/node/components/panel/GridPanelFooter.js +1 -1
  160. package/node/components/panel/GridPanelHeader.js +1 -1
  161. package/node/components/panel/GridPanelWrapper.js +1 -1
  162. package/node/components/toolbar/GridToolbarQuickFilter.js +1 -1
  163. package/node/components/virtualization/GridBottomContainer.js +18 -1
  164. package/node/components/virtualization/GridMainContainer.js +3 -1
  165. package/node/components/virtualization/GridTopContainer.js +1 -1
  166. package/node/components/virtualization/GridVirtualScrollbar.js +1 -7
  167. package/node/components/virtualization/GridVirtualScroller.js +1 -0
  168. package/node/components/virtualization/GridVirtualScrollerFiller.js +3 -4
  169. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +11 -11
  170. package/node/hooks/features/columnResize/useGridColumnResize.js +6 -6
  171. package/node/hooks/features/columns/gridColumnsUtils.js +3 -2
  172. package/node/hooks/features/dimensions/useGridDimensions.js +4 -1
  173. package/node/hooks/features/editing/useGridCellEditing.js +3 -19
  174. package/node/hooks/features/editing/useGridRowEditing.js +7 -2
  175. package/node/hooks/features/editing/utils.js +22 -0
  176. package/node/hooks/features/export/useGridPrintExport.js +2 -1
  177. package/node/hooks/features/focus/useGridFocus.js +2 -1
  178. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +16 -53
  179. package/node/hooks/features/keyboardNavigation/utils.js +68 -0
  180. package/node/hooks/features/rowSelection/useGridRowSelection.js +102 -26
  181. package/node/hooks/features/rowSelection/utils.js +160 -1
  182. package/node/hooks/features/rows/gridRowSpanningSelectors.js +11 -0
  183. package/node/hooks/features/rows/gridRowSpanningUtils.js +52 -0
  184. package/node/hooks/features/rows/useGridRowSpanning.js +267 -0
  185. package/node/hooks/features/rows/useGridRows.js +7 -1
  186. package/node/hooks/features/scroll/useGridScroll.js +19 -19
  187. package/node/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
  188. package/node/hooks/utils/useGridApiEventHandler.js +0 -1
  189. package/node/index.js +1 -1
  190. package/node/internals/index.js +38 -15
  191. package/node/locales/bgBG.js +8 -9
  192. package/node/locales/deDE.js +4 -4
  193. package/node/locales/frFR.js +4 -4
  194. package/node/locales/hrHR.js +69 -46
  195. package/node/locales/jaJP.js +1 -2
  196. package/node/locales/ptPT.js +4 -4
  197. package/node/locales/viVN.js +20 -20
  198. package/node/utils/createSelector.js +6 -0
  199. package/node/utils/domUtils.js +12 -12
  200. package/package.json +3 -3
  201. package/utils/createSelector.js +6 -0
  202. package/utils/domUtils.d.ts +4 -4
  203. package/utils/domUtils.js +12 -12
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getCellValue = void 0;
7
+ exports.getUnprocessedRange = getUnprocessedRange;
8
+ exports.isRowContextInitialized = isRowContextInitialized;
9
+ exports.isRowRangeUpdated = isRowRangeUpdated;
10
+ function getUnprocessedRange(testRange, processedRange) {
11
+ if (testRange.firstRowIndex >= processedRange.firstRowIndex && testRange.lastRowIndex <= processedRange.lastRowIndex) {
12
+ return null;
13
+ }
14
+ // Overflowing at the end
15
+ // Example: testRange={ firstRowIndex: 10, lastRowIndex: 20 }, processedRange={ firstRowIndex: 0, lastRowIndex: 15 }
16
+ // Unprocessed Range={ firstRowIndex: 16, lastRowIndex: 20 }
17
+ if (testRange.firstRowIndex >= processedRange.firstRowIndex && testRange.lastRowIndex > processedRange.lastRowIndex) {
18
+ return {
19
+ firstRowIndex: processedRange.lastRowIndex,
20
+ lastRowIndex: testRange.lastRowIndex
21
+ };
22
+ }
23
+ // Overflowing at the beginning
24
+ // Example: testRange={ firstRowIndex: 0, lastRowIndex: 20 }, processedRange={ firstRowIndex: 16, lastRowIndex: 30 }
25
+ // Unprocessed Range={ firstRowIndex: 0, lastRowIndex: 15 }
26
+ if (testRange.firstRowIndex < processedRange.firstRowIndex && testRange.lastRowIndex <= processedRange.lastRowIndex) {
27
+ return {
28
+ firstRowIndex: testRange.firstRowIndex,
29
+ lastRowIndex: processedRange.firstRowIndex - 1
30
+ };
31
+ }
32
+ // TODO: Should return two ranges handle overflowing at both ends ?
33
+ return testRange;
34
+ }
35
+ function isRowContextInitialized(renderContext) {
36
+ return renderContext.firstRowIndex !== 0 || renderContext.lastRowIndex !== 0;
37
+ }
38
+ function isRowRangeUpdated(range1, range2) {
39
+ return range1.firstRowIndex !== range2.firstRowIndex || range1.lastRowIndex !== range2.lastRowIndex;
40
+ }
41
+ const getCellValue = (row, colDef, apiRef) => {
42
+ if (!row) {
43
+ return null;
44
+ }
45
+ let cellValue = row[colDef.field];
46
+ const valueGetter = colDef.rowSpanValueGetter ?? colDef.valueGetter;
47
+ if (valueGetter) {
48
+ cellValue = valueGetter(cellValue, row, colDef, apiRef);
49
+ }
50
+ return cellValue;
51
+ };
52
+ exports.getCellValue = getCellValue;
@@ -0,0 +1,267 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.useGridRowSpanning = exports.rowSpanningStateInitializer = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var React = _interopRequireWildcard(require("react"));
11
+ var _useLazyRef = _interopRequireDefault(require("@mui/utils/useLazyRef"));
12
+ var _gridColumnsSelector = require("../columns/gridColumnsSelector");
13
+ var _useGridVisibleRows = require("../../utils/useGridVisibleRows");
14
+ var _gridVirtualizationSelectors = require("../virtualization/gridVirtualizationSelectors");
15
+ var _useGridSelector = require("../../utils/useGridSelector");
16
+ var _gridRowSpanningUtils = require("./gridRowSpanningUtils");
17
+ const EMPTY_STATE = {
18
+ spannedCells: {},
19
+ hiddenCells: {},
20
+ hiddenCellOriginMap: {}
21
+ };
22
+ const EMPTY_RANGE = {
23
+ firstRowIndex: 0,
24
+ lastRowIndex: 0
25
+ };
26
+ const skippedFields = new Set(['__check__', '__reorder__', '__detail_panel_toggle__']);
27
+ /**
28
+ * Default number of rows to process during state initialization to avoid flickering.
29
+ * Number `20` is arbitrarily chosen to be large enough to cover most of the cases without
30
+ * compromising performance.
31
+ */
32
+ const DEFAULT_ROWS_TO_PROCESS = 20;
33
+ const computeRowSpanningState = (apiRef, colDefs, visibleRows, range, rangeToProcess, resetState, processedRange) => {
34
+ const spannedCells = resetState ? {} : (0, _extends2.default)({}, apiRef.current.state.rowSpanning.spannedCells);
35
+ const hiddenCells = resetState ? {} : (0, _extends2.default)({}, apiRef.current.state.rowSpanning.hiddenCells);
36
+ const hiddenCellOriginMap = resetState ? {} : (0, _extends2.default)({}, apiRef.current.state.rowSpanning.hiddenCellOriginMap);
37
+ if (resetState) {
38
+ processedRange = EMPTY_RANGE;
39
+ }
40
+ colDefs.forEach(colDef => {
41
+ if (skippedFields.has(colDef.field)) {
42
+ return;
43
+ }
44
+ for (let index = rangeToProcess.firstRowIndex; index <= rangeToProcess.lastRowIndex; index += 1) {
45
+ const row = visibleRows[index];
46
+ if (hiddenCells[row.id]?.[colDef.field]) {
47
+ continue;
48
+ }
49
+ const cellValue = (0, _gridRowSpanningUtils.getCellValue)(row.model, colDef, apiRef);
50
+ if (cellValue == null) {
51
+ continue;
52
+ }
53
+ let spannedRowId = row.id;
54
+ let spannedRowIndex = index;
55
+ let rowSpan = 0;
56
+
57
+ // For first index, also scan in the previous rows to handle the reset state case e.g by sorting
58
+ const backwardsHiddenCells = [];
59
+ if (index === rangeToProcess.firstRowIndex) {
60
+ let prevIndex = index - 1;
61
+ const prevRowEntry = visibleRows[prevIndex];
62
+ while (prevIndex >= range.firstRowIndex && (0, _gridRowSpanningUtils.getCellValue)(prevRowEntry.model, colDef, apiRef) === cellValue) {
63
+ const currentRow = visibleRows[prevIndex + 1];
64
+ if (hiddenCells[currentRow.id]) {
65
+ hiddenCells[currentRow.id][colDef.field] = true;
66
+ } else {
67
+ hiddenCells[currentRow.id] = {
68
+ [colDef.field]: true
69
+ };
70
+ }
71
+ backwardsHiddenCells.push(index);
72
+ rowSpan += 1;
73
+ spannedRowId = prevRowEntry.id;
74
+ spannedRowIndex = prevIndex;
75
+ prevIndex -= 1;
76
+ }
77
+ }
78
+ backwardsHiddenCells.forEach(hiddenCellIndex => {
79
+ if (hiddenCellOriginMap[hiddenCellIndex]) {
80
+ hiddenCellOriginMap[hiddenCellIndex][colDef.field] = spannedRowIndex;
81
+ } else {
82
+ hiddenCellOriginMap[hiddenCellIndex] = {
83
+ [colDef.field]: spannedRowIndex
84
+ };
85
+ }
86
+ });
87
+
88
+ // Scan the next rows
89
+ let relativeIndex = index + 1;
90
+ while (relativeIndex <= range.lastRowIndex && visibleRows[relativeIndex] && (0, _gridRowSpanningUtils.getCellValue)(visibleRows[relativeIndex].model, colDef, apiRef) === cellValue) {
91
+ const currentRow = visibleRows[relativeIndex];
92
+ if (hiddenCells[currentRow.id]) {
93
+ hiddenCells[currentRow.id][colDef.field] = true;
94
+ } else {
95
+ hiddenCells[currentRow.id] = {
96
+ [colDef.field]: true
97
+ };
98
+ }
99
+ if (hiddenCellOriginMap[relativeIndex]) {
100
+ hiddenCellOriginMap[relativeIndex][colDef.field] = spannedRowIndex;
101
+ } else {
102
+ hiddenCellOriginMap[relativeIndex] = {
103
+ [colDef.field]: spannedRowIndex
104
+ };
105
+ }
106
+ relativeIndex += 1;
107
+ rowSpan += 1;
108
+ }
109
+ if (rowSpan > 0) {
110
+ if (spannedCells[spannedRowId]) {
111
+ spannedCells[spannedRowId][colDef.field] = rowSpan + 1;
112
+ } else {
113
+ spannedCells[spannedRowId] = {
114
+ [colDef.field]: rowSpan + 1
115
+ };
116
+ }
117
+ }
118
+ }
119
+ processedRange = {
120
+ firstRowIndex: Math.min(processedRange.firstRowIndex, rangeToProcess.firstRowIndex),
121
+ lastRowIndex: Math.max(processedRange.lastRowIndex, rangeToProcess.lastRowIndex)
122
+ };
123
+ });
124
+ return {
125
+ spannedCells,
126
+ hiddenCells,
127
+ hiddenCellOriginMap,
128
+ processedRange
129
+ };
130
+ };
131
+
132
+ /**
133
+ * @requires columnsStateInitializer (method) - should be initialized before
134
+ * @requires rowsStateInitializer (method) - should be initialized before
135
+ * @requires filterStateInitializer (method) - should be initialized before
136
+ */
137
+ const rowSpanningStateInitializer = (state, props, apiRef) => {
138
+ if (props.unstable_rowSpanning) {
139
+ const rowIds = state.rows.dataRowIds || [];
140
+ const orderedFields = state.columns.orderedFields || [];
141
+ const dataRowIdToModelLookup = state.rows.dataRowIdToModelLookup;
142
+ const columnsLookup = state.columns.lookup;
143
+ const isFilteringPending = Boolean(state.filter.filterModel.items.length) || Boolean(state.filter.filterModel.quickFilterValues?.length);
144
+ if (!rowIds.length || !orderedFields.length || !dataRowIdToModelLookup || !columnsLookup || isFilteringPending) {
145
+ return (0, _extends2.default)({}, state, {
146
+ rowSpanning: EMPTY_STATE
147
+ });
148
+ }
149
+ const rangeToProcess = {
150
+ firstRowIndex: 0,
151
+ lastRowIndex: Math.min(DEFAULT_ROWS_TO_PROCESS - 1, Math.max(rowIds.length - 1, 0))
152
+ };
153
+ const rows = rowIds.map(id => ({
154
+ id,
155
+ model: dataRowIdToModelLookup[id]
156
+ }));
157
+ const colDefs = orderedFields.map(field => columnsLookup[field]);
158
+ const {
159
+ spannedCells,
160
+ hiddenCells,
161
+ hiddenCellOriginMap
162
+ } = computeRowSpanningState(apiRef, colDefs, rows, rangeToProcess, rangeToProcess, true, EMPTY_RANGE);
163
+ return (0, _extends2.default)({}, state, {
164
+ rowSpanning: {
165
+ spannedCells,
166
+ hiddenCells,
167
+ hiddenCellOriginMap
168
+ }
169
+ });
170
+ }
171
+ return (0, _extends2.default)({}, state, {
172
+ rowSpanning: EMPTY_STATE
173
+ });
174
+ };
175
+ exports.rowSpanningStateInitializer = rowSpanningStateInitializer;
176
+ const useGridRowSpanning = (apiRef, props) => {
177
+ const {
178
+ range,
179
+ rows: visibleRows
180
+ } = (0, _useGridVisibleRows.useGridVisibleRows)(apiRef, props);
181
+ const renderContext = (0, _useGridSelector.useGridSelector)(apiRef, _gridVirtualizationSelectors.gridRenderContextSelector);
182
+ const colDefs = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector);
183
+ const processedRange = (0, _useLazyRef.default)(() => {
184
+ return Object.keys(apiRef.current.state.rowSpanning.spannedCells).length > 0 ? {
185
+ firstRowIndex: 0,
186
+ lastRowIndex: Math.min(DEFAULT_ROWS_TO_PROCESS - 1, Math.max(apiRef.current.state.rows.dataRowIds.length - 1, 0))
187
+ } : EMPTY_RANGE;
188
+ });
189
+ const lastRange = React.useRef(EMPTY_RANGE);
190
+ const updateRowSpanningState = React.useCallback(
191
+ // A reset needs to occur when:
192
+ // - The `unstable_rowSpanning` prop is updated (feature flag)
193
+ // - The filtering is applied
194
+ // - The sorting is applied
195
+ // - The `paginationModel` is updated
196
+ // - The rows are updated
197
+ (resetState = true) => {
198
+ if (!props.unstable_rowSpanning) {
199
+ if (apiRef.current.state.rowSpanning !== EMPTY_STATE) {
200
+ apiRef.current.setState(state => (0, _extends2.default)({}, state, {
201
+ rowSpanning: EMPTY_STATE
202
+ }));
203
+ }
204
+ return;
205
+ }
206
+ if (range === null || !(0, _gridRowSpanningUtils.isRowContextInitialized)(renderContext)) {
207
+ return;
208
+ }
209
+ if (resetState) {
210
+ processedRange.current = EMPTY_RANGE;
211
+ }
212
+ const rangeToProcess = (0, _gridRowSpanningUtils.getUnprocessedRange)({
213
+ firstRowIndex: renderContext.firstRowIndex,
214
+ lastRowIndex: renderContext.lastRowIndex - 1
215
+ }, processedRange.current);
216
+ if (rangeToProcess === null) {
217
+ return;
218
+ }
219
+ const {
220
+ spannedCells,
221
+ hiddenCells,
222
+ hiddenCellOriginMap,
223
+ processedRange: newProcessedRange
224
+ } = computeRowSpanningState(apiRef, colDefs, visibleRows, range, rangeToProcess, resetState, processedRange.current);
225
+ processedRange.current = newProcessedRange;
226
+ const newSpannedCellsCount = Object.keys(spannedCells).length;
227
+ const newHiddenCellsCount = Object.keys(hiddenCells).length;
228
+ const currentSpannedCellsCount = Object.keys(apiRef.current.state.rowSpanning.spannedCells).length;
229
+ const currentHiddenCellsCount = Object.keys(apiRef.current.state.rowSpanning.hiddenCells).length;
230
+ const shouldUpdateState = resetState || newSpannedCellsCount !== currentSpannedCellsCount || newHiddenCellsCount !== currentHiddenCellsCount;
231
+ if (!shouldUpdateState) {
232
+ return;
233
+ }
234
+ apiRef.current.setState(state => {
235
+ return (0, _extends2.default)({}, state, {
236
+ rowSpanning: {
237
+ spannedCells,
238
+ hiddenCells,
239
+ hiddenCellOriginMap
240
+ }
241
+ });
242
+ });
243
+ }, [apiRef, props.unstable_rowSpanning, range, renderContext, visibleRows, colDefs, processedRange]);
244
+ const prevRenderContext = React.useRef(renderContext);
245
+ const isFirstRender = React.useRef(true);
246
+ const shouldResetState = React.useRef(false);
247
+ React.useEffect(() => {
248
+ const firstRender = isFirstRender.current;
249
+ if (isFirstRender.current) {
250
+ isFirstRender.current = false;
251
+ }
252
+ if (range && lastRange.current && (0, _gridRowSpanningUtils.isRowRangeUpdated)(range, lastRange.current)) {
253
+ lastRange.current = range;
254
+ shouldResetState.current = true;
255
+ }
256
+ if (!firstRender && prevRenderContext.current !== renderContext) {
257
+ if ((0, _gridRowSpanningUtils.isRowRangeUpdated)(prevRenderContext.current, renderContext)) {
258
+ updateRowSpanningState(shouldResetState.current);
259
+ shouldResetState.current = false;
260
+ }
261
+ prevRenderContext.current = renderContext;
262
+ return;
263
+ }
264
+ updateRowSpanningState();
265
+ }, [updateRowSpanningState, renderContext, range, lastRange]);
266
+ };
267
+ exports.useGridRowSpanning = useGridRowSpanning;
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.useGridRows = exports.rowsStateInitializer = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var React = _interopRequireWildcard(require("react"));
11
+ var _useLazyRef = _interopRequireDefault(require("@mui/utils/useLazyRef"));
11
12
  var _useGridApiMethod = require("../../utils/useGridApiMethod");
12
13
  var _useGridLogger = require("../../utils/useGridLogger");
13
14
  var _gridRowsSelector = require("./gridRowsSelector");
@@ -376,11 +377,16 @@ const useGridRows = (apiRef, props) => {
376
377
  throttle: false
377
378
  });
378
379
  }, [logger, apiRef, props.rows, props.getRowId, props.loading, props.rowCount, throttledRowsChange]);
380
+ const previousDataSource = (0, _useLazyRef.default)(() => props.unstable_dataSource);
379
381
  const handleStrategyProcessorChange = React.useCallback(methodName => {
382
+ if (props.unstable_dataSource && props.unstable_dataSource !== previousDataSource.current) {
383
+ previousDataSource.current = props.unstable_dataSource;
384
+ return;
385
+ }
380
386
  if (methodName === 'rowTreeCreation') {
381
387
  groupRows();
382
388
  }
383
- }, [groupRows]);
389
+ }, [groupRows, previousDataSource, props.unstable_dataSource]);
384
390
  const handleStrategyActivityChange = React.useCallback(() => {
385
391
  // `rowTreeCreation` is the only processor ran when `strategyAvailabilityChange` is fired.
386
392
  // All the other processors listen to `rowsSet` which will be published by the `groupRows` method below.
@@ -20,22 +20,22 @@ var _dimensions = require("../dimensions");
20
20
  // Similar to https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
21
21
  function scrollIntoView(dimensions) {
22
22
  const {
23
- clientHeight,
24
- scrollTop,
25
- offsetHeight,
26
- offsetTop
23
+ containerSize,
24
+ scrollPosition,
25
+ elementSize,
26
+ elementOffset
27
27
  } = dimensions;
28
- const elementBottom = offsetTop + offsetHeight;
28
+ const elementEnd = elementOffset + elementSize;
29
29
  // Always scroll to top when cell is higher than viewport to avoid scroll jump
30
30
  // See https://github.com/mui/mui-x/issues/4513 and https://github.com/mui/mui-x/issues/4514
31
- if (offsetHeight > clientHeight) {
32
- return offsetTop;
31
+ if (elementSize > containerSize) {
32
+ return elementOffset;
33
33
  }
34
- if (elementBottom - clientHeight > scrollTop) {
35
- return elementBottom - clientHeight;
34
+ if (elementEnd - containerSize > scrollPosition) {
35
+ return elementEnd - containerSize;
36
36
  }
37
- if (offsetTop < scrollTop) {
38
- return offsetTop;
37
+ if (elementOffset < scrollPosition) {
38
+ return elementOffset;
39
39
  }
40
40
  return undefined;
41
41
  }
@@ -79,10 +79,10 @@ const useGridScroll = (apiRef, props) => {
79
79
  }
80
80
  // When using RTL, `scrollLeft` becomes negative, so we must ensure that we only compare values.
81
81
  scrollCoordinates.left = scrollIntoView({
82
- clientHeight: dimensions.viewportInnerSize.width,
83
- scrollTop: Math.abs(virtualScrollerRef.current.scrollLeft),
84
- offsetHeight: cellWidth,
85
- offsetTop: columnPositions[params.colIndex]
82
+ containerSize: dimensions.viewportOuterSize.width,
83
+ scrollPosition: Math.abs(virtualScrollerRef.current.scrollLeft),
84
+ elementSize: cellWidth,
85
+ elementOffset: columnPositions[params.colIndex]
86
86
  });
87
87
  }
88
88
  if (params.rowIndex !== undefined) {
@@ -92,10 +92,10 @@ const useGridScroll = (apiRef, props) => {
92
92
  const elementIndex = !props.pagination ? params.rowIndex : params.rowIndex - page * pageSize;
93
93
  const targetOffsetHeight = rowsMeta.positions[elementIndex + 1] ? rowsMeta.positions[elementIndex + 1] - rowsMeta.positions[elementIndex] : rowsMeta.currentPageTotalHeight - rowsMeta.positions[elementIndex];
94
94
  scrollCoordinates.top = scrollIntoView({
95
- clientHeight: dimensions.viewportInnerSize.height,
96
- scrollTop: virtualScrollerRef.current.scrollTop,
97
- offsetHeight: targetOffsetHeight,
98
- offsetTop: rowsMeta.positions[elementIndex]
95
+ containerSize: dimensions.viewportInnerSize.height,
96
+ scrollPosition: virtualScrollerRef.current.scrollTop,
97
+ elementSize: targetOffsetHeight,
98
+ elementOffset: rowsMeta.positions[elementIndex]
99
99
  });
100
100
  }
101
101
  scrollCoordinates = apiRef.current.unstable_applyPipeProcessors('scrollToIndexes', scrollCoordinates, params);
@@ -35,6 +35,7 @@ var _gridColumnsUtils = require("../columns/gridColumnsUtils");
35
35
  var _gridRowsUtils = require("../rows/gridRowsUtils");
36
36
  var _gridVirtualizationSelectors = require("./gridVirtualizationSelectors");
37
37
  var _useGridVirtualization = require("./useGridVirtualization");
38
+ var _gridRowSpanningSelectors = require("../rows/gridRowSpanningSelectors");
38
39
  var _jsxRuntime = require("react/jsx-runtime");
39
40
  const MINIMUM_COLUMN_WIDTH = 50;
40
41
  var ScrollDirection = /*#__PURE__*/function (ScrollDirection) {
@@ -336,7 +337,7 @@ const useGridVirtualScroller = () => {
336
337
  if (!isPinnedSection && frozenContext.current && rowIndexInPage >= frozenContext.current.firstRowIndex && rowIndexInPage < frozenContext.current.lastRowIndex) {
337
338
  currentRenderContext = frozenContext.current;
338
339
  }
339
- const offsetLeft = computeOffsetLeft(columnPositions, currentRenderContext, isRtl, pinnedColumns.left.length);
340
+ const offsetLeft = computeOffsetLeft(columnPositions, currentRenderContext, pinnedColumns.left.length);
340
341
  const showBottomBorder = isLastVisibleInSection && params.position === 'top';
341
342
  rows.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.row, (0, _extends2.default)({
342
343
  row: model,
@@ -364,7 +365,7 @@ const useGridVirtualScroller = () => {
364
365
  if (panel) {
365
366
  rows.push(panel);
366
367
  }
367
- if (isLastVisible) {
368
+ if (params.position === undefined && isLastVisibleInSection) {
368
369
  rows.push(apiRef.current.getInfiniteLoadingTriggerElement?.({
369
370
  lastRowId: id
370
371
  }));
@@ -459,6 +460,7 @@ function inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns) {
459
460
  const dimensions = (0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef.current.state);
460
461
  const currentPage = (0, _useGridVisibleRows.getVisibleRows)(apiRef, rootProps);
461
462
  const visibleColumns = (0, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector)(apiRef);
463
+ const hiddenCellsOriginMap = (0, _gridRowSpanningSelectors.gridRowSpanningHiddenCellsOriginMapSelector)(apiRef);
462
464
  const lastRowId = apiRef.current.state.rows.dataRowIds.at(-1);
463
465
  const lastColumn = visibleColumns.at(-1);
464
466
  return {
@@ -479,7 +481,8 @@ function inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns) {
479
481
  rows: currentPage.rows,
480
482
  range: currentPage.range,
481
483
  pinnedColumns: (0, _gridColumnsSelector.gridVisiblePinnedColumnDefinitionsSelector)(apiRef),
482
- visibleColumns
484
+ visibleColumns,
485
+ hiddenCellsOriginMap
483
486
  };
484
487
  }
485
488
  function computeRenderContext(inputs, scrollPosition, scrollCache) {
@@ -497,10 +500,18 @@ function computeRenderContext(inputs, scrollPosition, scrollCache) {
497
500
  if (inputs.enabledForRows) {
498
501
  // Clamp the value because the search may return an index out of bounds.
499
502
  // In the last index, this is not needed because Array.slice doesn't include it.
500
- const firstRowIndex = Math.min(getNearestIndexToRender(inputs, top, {
503
+ let firstRowIndex = Math.min(getNearestIndexToRender(inputs, top, {
501
504
  atStart: true,
502
505
  lastPosition: inputs.rowsMeta.positions[inputs.rowsMeta.positions.length - 1] + inputs.lastRowHeight
503
506
  }), inputs.rowsMeta.positions.length - 1);
507
+
508
+ // If any of the cells in the `firstRowIndex` is hidden due to an extended row span,
509
+ // Make sure the row from where the rowSpan is originated is visible.
510
+ const rowSpanHiddenCellOrigin = inputs.hiddenCellsOriginMap[firstRowIndex];
511
+ if (rowSpanHiddenCellOrigin) {
512
+ const minSpannedRowIndex = Math.min(...Object.values(rowSpanHiddenCellOrigin));
513
+ firstRowIndex = Math.min(firstRowIndex, minSpannedRowIndex);
514
+ }
504
515
  const lastRowIndex = inputs.autoHeight ? firstRowIndex + inputs.rows.length : getNearestIndexToRender(inputs, top + inputs.viewportInnerHeight);
505
516
  renderContext.firstRowIndex = firstRowIndex;
506
517
  renderContext.lastRowIndex = lastRowIndex;
@@ -654,9 +665,8 @@ function areRenderContextsEqual(context1, context2) {
654
665
  }
655
666
  return context1.firstRowIndex === context2.firstRowIndex && context1.lastRowIndex === context2.lastRowIndex && context1.firstColumnIndex === context2.firstColumnIndex && context1.lastColumnIndex === context2.lastColumnIndex;
656
667
  }
657
- function computeOffsetLeft(columnPositions, renderContext, isRtl, pinnedLeftLength) {
658
- const factor = isRtl ? -1 : 1;
659
- const left = factor * (columnPositions[renderContext.firstColumnIndex] ?? 0) - (columnPositions[pinnedLeftLength] ?? 0);
668
+ function computeOffsetLeft(columnPositions, renderContext, pinnedLeftLength) {
669
+ const left = (columnPositions[renderContext.firstColumnIndex] ?? 0) - (columnPositions[pinnedLeftLength] ?? 0);
660
670
  return Math.abs(left);
661
671
  }
662
672
  function directionForDelta(dx, dy) {
@@ -101,6 +101,5 @@ const optionsSubscriberOptions = {
101
101
  isFirst: true
102
102
  };
103
103
  function useGridApiOptionHandler(apiRef, eventName, handler) {
104
- // Validate that only one per event name?
105
104
  useGridApiEventHandler(apiRef, eventName, handler, optionsSubscriberOptions);
106
105
  }
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v7.17.0
2
+ * @mui/x-data-grid v7.19.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -48,6 +48,8 @@ var _exportNames = {
48
48
  gridEditRowsStateSelector: true,
49
49
  useGridRows: true,
50
50
  rowsStateInitializer: true,
51
+ useGridRowSpanning: true,
52
+ rowSpanningStateInitializer: true,
51
53
  useGridAriaAttributes: true,
52
54
  useGridRowAriaAttributes: true,
53
55
  useGridRowsPreProcessors: true,
@@ -78,6 +80,7 @@ var _exportNames = {
78
80
  EMPTY_DETAIL_PANELS: true,
79
81
  useGridColumnResize: true,
80
82
  columnResizeStateInitializer: true,
83
+ ROW_SELECTION_PROPAGATION_DEFAULT: true,
81
84
  useTimeout: true,
82
85
  useGridVisibleRows: true,
83
86
  getVisibleRows: true,
@@ -152,6 +155,12 @@ Object.defineProperty(exports, "GridVirtualScrollerRenderZone", {
152
155
  return _GridVirtualScrollerRenderZone.GridVirtualScrollerRenderZone;
153
156
  }
154
157
  });
158
+ Object.defineProperty(exports, "ROW_SELECTION_PROPAGATION_DEFAULT", {
159
+ enumerable: true,
160
+ get: function () {
161
+ return _utils.ROW_SELECTION_PROPAGATION_DEFAULT;
162
+ }
163
+ });
155
164
  Object.defineProperty(exports, "buildRootGroup", {
156
165
  enumerable: true,
157
166
  get: function () {
@@ -215,7 +224,7 @@ Object.defineProperty(exports, "createSelectorV8", {
215
224
  Object.defineProperty(exports, "defaultGetRowsToExport", {
216
225
  enumerable: true,
217
226
  get: function () {
218
- return _utils.defaultGetRowsToExport;
227
+ return _utils2.defaultGetRowsToExport;
219
228
  }
220
229
  });
221
230
  Object.defineProperty(exports, "densityStateInitializer", {
@@ -269,7 +278,7 @@ Object.defineProperty(exports, "getActiveElement", {
269
278
  Object.defineProperty(exports, "getColumnsToExport", {
270
279
  enumerable: true,
271
280
  get: function () {
272
- return _utils.getColumnsToExport;
281
+ return _utils2.getColumnsToExport;
273
282
  }
274
283
  });
275
284
  Object.defineProperty(exports, "getGridFilter", {
@@ -398,6 +407,12 @@ Object.defineProperty(exports, "rowSelectionStateInitializer", {
398
407
  return _useGridRowSelection.rowSelectionStateInitializer;
399
408
  }
400
409
  });
410
+ Object.defineProperty(exports, "rowSpanningStateInitializer", {
411
+ enumerable: true,
412
+ get: function () {
413
+ return _useGridRowSpanning.rowSpanningStateInitializer;
414
+ }
415
+ });
401
416
  Object.defineProperty(exports, "rowsMetaStateInitializer", {
402
417
  enumerable: true,
403
418
  get: function () {
@@ -596,6 +611,12 @@ Object.defineProperty(exports, "useGridRowSelectionPreProcessors", {
596
611
  return _useGridRowSelectionPreProcessors.useGridRowSelectionPreProcessors;
597
612
  }
598
613
  });
614
+ Object.defineProperty(exports, "useGridRowSpanning", {
615
+ enumerable: true,
616
+ get: function () {
617
+ return _useGridRowSpanning.useGridRowSpanning;
618
+ }
619
+ });
599
620
  Object.defineProperty(exports, "useGridRows", {
600
621
  enumerable: true,
601
622
  get: function () {
@@ -723,6 +744,7 @@ var _useGridPreferencesPanel = require("../hooks/features/preferencesPanel/useGr
723
744
  var _useGridEditing = require("../hooks/features/editing/useGridEditing");
724
745
  var _gridEditingSelectors = require("../hooks/features/editing/gridEditingSelectors");
725
746
  var _useGridRows = require("../hooks/features/rows/useGridRows");
747
+ var _useGridRowSpanning = require("../hooks/features/rows/useGridRowSpanning");
726
748
  var _useGridAriaAttributes = require("../hooks/utils/useGridAriaAttributes");
727
749
  var _useGridRowAriaAttributes = require("../hooks/features/rows/useGridRowAriaAttributes");
728
750
  var _useGridRowsPreProcessors = require("../hooks/features/rows/useGridRowsPreProcessors");
@@ -752,10 +774,11 @@ Object.keys(_virtualization).forEach(function (key) {
752
774
  });
753
775
  });
754
776
  var _useGridColumnResize = require("../hooks/features/columnResize/useGridColumnResize");
777
+ var _utils = require("../hooks/features/rowSelection/utils");
755
778
  var _useTimeout = require("../hooks/utils/useTimeout");
756
779
  var _useGridVisibleRows = require("../hooks/utils/useGridVisibleRows");
757
780
  var _useGridInitializeState = require("../hooks/utils/useGridInitializeState");
758
- var _utils = require("../hooks/features/export/utils");
781
+ var _utils2 = require("../hooks/features/export/utils");
759
782
  var _createControllablePromise = require("../utils/createControllablePromise");
760
783
  Object.keys(_createControllablePromise).forEach(function (key) {
761
784
  if (key === "default" || key === "__esModule") return;
@@ -772,15 +795,15 @@ var _createSelector = require("../utils/createSelector");
772
795
  var _useGridSelector = require("../hooks/utils/useGridSelector");
773
796
  var _domUtils = require("../utils/domUtils");
774
797
  var _keyboardUtils = require("../utils/keyboardUtils");
775
- var _utils2 = require("../utils/utils");
776
- Object.keys(_utils2).forEach(function (key) {
798
+ var _utils3 = require("../utils/utils");
799
+ Object.keys(_utils3).forEach(function (key) {
777
800
  if (key === "default" || key === "__esModule") return;
778
801
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
779
- if (key in exports && exports[key] === _utils2[key]) return;
802
+ if (key in exports && exports[key] === _utils3[key]) return;
780
803
  Object.defineProperty(exports, key, {
781
804
  enumerable: true,
782
805
  get: function () {
783
- return _utils2[key];
806
+ return _utils3[key];
784
807
  }
785
808
  });
786
809
  });
@@ -810,28 +833,28 @@ Object.keys(_cellBorderUtils).forEach(function (key) {
810
833
  });
811
834
  });
812
835
  var _useGridPrivateApiContext = require("../hooks/utils/useGridPrivateApiContext");
813
- var _utils3 = require("../hooks/utils");
814
- Object.keys(_utils3).forEach(function (key) {
836
+ var _utils4 = require("../hooks/utils");
837
+ Object.keys(_utils4).forEach(function (key) {
815
838
  if (key === "default" || key === "__esModule") return;
816
839
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
817
- if (key in exports && exports[key] === _utils3[key]) return;
840
+ if (key in exports && exports[key] === _utils4[key]) return;
818
841
  Object.defineProperty(exports, key, {
819
842
  enumerable: true,
820
843
  get: function () {
821
- return _utils3[key];
844
+ return _utils4[key];
822
845
  }
823
846
  });
824
847
  });
825
848
  var _csvSerializer = require("../hooks/features/export/serializers/csvSerializer");
826
- var _utils4 = require("./utils");
827
- Object.keys(_utils4).forEach(function (key) {
849
+ var _utils5 = require("./utils");
850
+ Object.keys(_utils5).forEach(function (key) {
828
851
  if (key === "default" || key === "__esModule") return;
829
852
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
830
- if (key in exports && exports[key] === _utils4[key]) return;
853
+ if (key in exports && exports[key] === _utils5[key]) return;
831
854
  Object.defineProperty(exports, key, {
832
855
  enumerable: true,
833
856
  get: function () {
834
- return _utils4[key];
857
+ return _utils5[key];
835
858
  }
836
859
  });
837
860
  });