@mui/x-data-grid 7.25.0 → 7.27.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 +133 -0
- package/DataGrid/DataGrid.js +6 -0
- package/DataGrid/useDataGridComponent.js +3 -3
- package/components/GridRow.js +8 -2
- package/components/GridScrollArea.d.ts +5 -2
- package/components/GridScrollArea.js +32 -25
- package/components/GridSkeletonLoadingOverlay.js +2 -1
- package/components/containers/GridRoot.js +11 -9
- package/components/containers/GridRootStyles.js +3 -3
- package/components/virtualization/GridMainContainer.d.ts +2 -2
- package/components/virtualization/GridMainContainer.js +1 -1
- package/components/virtualization/GridVirtualScroller.js +21 -14
- package/constants/dataGridPropsDefaultValues.js +1 -0
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +1 -1
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +6 -4
- package/hooks/core/useGridStateInitialization.js +3 -2
- package/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +10 -14
- package/hooks/features/columns/gridColumnsSelector.d.ts +0 -5
- package/hooks/features/columns/gridColumnsSelector.js +0 -12
- package/hooks/features/dimensions/gridDimensionsSelectors.d.ts +16 -0
- package/hooks/features/dimensions/gridDimensionsSelectors.js +26 -1
- package/hooks/features/dimensions/index.d.ts +1 -1
- package/hooks/features/dimensions/index.js +1 -2
- package/hooks/features/dimensions/useGridDimensions.js +97 -70
- package/hooks/features/editing/gridEditingSelectors.d.ts +5 -1
- package/hooks/features/editing/gridEditingSelectors.js +6 -1
- package/hooks/features/editing/useGridRowEditing.js +4 -4
- package/hooks/features/filter/gridFilterState.d.ts +5 -0
- package/hooks/features/filter/gridFilterState.js +5 -0
- package/hooks/features/filter/useGridFilter.js +6 -13
- package/hooks/features/pagination/useGridPagination.js +1 -1
- package/hooks/features/pagination/useGridPaginationModel.d.ts +1 -1
- package/hooks/features/pagination/useGridPaginationModel.js +44 -0
- package/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/hooks/features/rowSelection/utils.js +1 -1
- package/hooks/features/rows/gridRowsMetaState.d.ts +8 -0
- package/hooks/features/rows/gridRowsUtils.d.ts +0 -4
- package/hooks/features/rows/gridRowsUtils.js +0 -16
- package/hooks/features/rows/useGridRowsMeta.js +33 -17
- package/hooks/features/sorting/gridSortingSelector.js +10 -9
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +6 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +43 -27
- package/hooks/utils/useGridNativeEventListener.d.ts +0 -1
- package/hooks/utils/useGridNativeEventListener.js +12 -22
- package/hooks/utils/useGridSelector.d.ts +8 -1
- package/hooks/utils/useGridSelector.js +42 -8
- package/hooks/utils/useIsSSR.d.ts +1 -0
- package/hooks/utils/useIsSSR.js +5 -0
- package/index.js +1 -1
- package/internals/index.d.ts +2 -1
- package/internals/index.js +2 -1
- package/locales/plPL.js +31 -35
- package/locales/ukUA.js +9 -10
- package/models/api/gridStateApi.d.ts +1 -0
- package/models/events/gridEventLookup.d.ts +6 -0
- package/models/props/DataGridProps.d.ts +6 -0
- package/modern/DataGrid/DataGrid.js +6 -0
- package/modern/DataGrid/useDataGridComponent.js +3 -3
- package/modern/components/GridRow.js +8 -2
- package/modern/components/GridScrollArea.js +32 -25
- package/modern/components/GridSkeletonLoadingOverlay.js +2 -1
- package/modern/components/containers/GridRoot.js +11 -9
- package/modern/components/containers/GridRootStyles.js +3 -3
- package/modern/components/virtualization/GridMainContainer.js +1 -1
- package/modern/components/virtualization/GridVirtualScroller.js +21 -14
- package/modern/constants/dataGridPropsDefaultValues.js +1 -0
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +6 -4
- package/modern/hooks/core/useGridStateInitialization.js +3 -2
- package/modern/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +10 -14
- package/modern/hooks/features/columns/gridColumnsSelector.js +0 -12
- package/modern/hooks/features/dimensions/gridDimensionsSelectors.js +26 -1
- package/modern/hooks/features/dimensions/index.js +1 -2
- package/modern/hooks/features/dimensions/useGridDimensions.js +97 -70
- package/modern/hooks/features/editing/gridEditingSelectors.js +6 -1
- package/modern/hooks/features/editing/useGridRowEditing.js +4 -4
- package/modern/hooks/features/filter/gridFilterState.js +5 -0
- package/modern/hooks/features/filter/useGridFilter.js +6 -13
- package/modern/hooks/features/pagination/useGridPagination.js +1 -1
- package/modern/hooks/features/pagination/useGridPaginationModel.js +44 -0
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/modern/hooks/features/rowSelection/utils.js +1 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +0 -16
- package/modern/hooks/features/rows/useGridRowsMeta.js +33 -17
- package/modern/hooks/features/sorting/gridSortingSelector.js +10 -9
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +43 -27
- package/modern/hooks/utils/useGridNativeEventListener.js +12 -22
- package/modern/hooks/utils/useGridSelector.js +42 -8
- package/modern/hooks/utils/useIsSSR.js +5 -0
- package/modern/index.js +1 -1
- package/modern/internals/index.js +2 -1
- package/modern/locales/plPL.js +31 -35
- package/modern/locales/ukUA.js +9 -10
- package/node/DataGrid/DataGrid.js +6 -0
- package/node/DataGrid/useDataGridComponent.js +3 -3
- package/node/components/GridRow.js +7 -2
- package/node/components/GridScrollArea.js +31 -24
- package/node/components/GridSkeletonLoadingOverlay.js +2 -1
- package/node/components/containers/GridRoot.js +10 -8
- package/node/components/containers/GridRootStyles.js +3 -3
- package/node/components/virtualization/GridMainContainer.js +1 -1
- package/node/components/virtualization/GridVirtualScroller.js +21 -14
- package/node/constants/dataGridPropsDefaultValues.js +1 -0
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +6 -4
- package/node/hooks/core/useGridStateInitialization.js +3 -2
- package/node/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +10 -14
- package/node/hooks/features/columns/gridColumnsSelector.js +1 -13
- package/node/hooks/features/dimensions/gridDimensionsSelectors.js +38 -2
- package/node/hooks/features/dimensions/index.js +13 -11
- package/node/hooks/features/dimensions/useGridDimensions.js +94 -67
- package/node/hooks/features/editing/gridEditingSelectors.js +5 -1
- package/node/hooks/features/editing/useGridRowEditing.js +4 -4
- package/node/hooks/features/filter/gridFilterState.js +6 -1
- package/node/hooks/features/filter/useGridFilter.js +5 -12
- package/node/hooks/features/pagination/useGridPagination.js +1 -1
- package/node/hooks/features/pagination/useGridPaginationModel.js +44 -0
- package/node/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/node/hooks/features/rowSelection/utils.js +1 -1
- package/node/hooks/features/rows/gridRowsUtils.js +0 -17
- package/node/hooks/features/rows/useGridRowsMeta.js +31 -15
- package/node/hooks/features/sorting/gridSortingSelector.js +10 -9
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +42 -26
- package/node/hooks/utils/useGridNativeEventListener.js +12 -23
- package/node/hooks/utils/useGridSelector.js +42 -8
- package/node/hooks/utils/useIsSSR.js +12 -0
- package/node/index.js +1 -1
- package/node/internals/index.js +20 -7
- package/node/locales/plPL.js +31 -35
- package/node/locales/ukUA.js +9 -10
- package/package.json +3 -2
|
@@ -16,9 +16,7 @@ var _utils2 = require("../../../utils/utils");
|
|
|
16
16
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
17
17
|
var _useGridSelector = require("../../utils/useGridSelector");
|
|
18
18
|
var _densitySelector = require("../density/densitySelector");
|
|
19
|
-
var _gridFilterSelector = require("../filter/gridFilterSelector");
|
|
20
19
|
var _gridPaginationSelector = require("../pagination/gridPaginationSelector");
|
|
21
|
-
var _gridSortingSelector = require("../sorting/gridSortingSelector");
|
|
22
20
|
var _pipeProcessing = require("../../core/pipeProcessing");
|
|
23
21
|
var _gridRowsSelector = require("./gridRowsSelector");
|
|
24
22
|
var _gridDimensionsSelectors = require("../dimensions/gridDimensionsSelectors");
|
|
@@ -29,10 +27,18 @@ const rowsMetaStateInitializer = (state, props, apiRef) => {
|
|
|
29
27
|
apiRef.current.caches.rowsMeta = {
|
|
30
28
|
heights: new Map()
|
|
31
29
|
};
|
|
30
|
+
const baseRowHeight = (0, _gridDimensionsSelectors.gridRowHeightSelector)(apiRef.current.state);
|
|
31
|
+
const dataRowCount = (0, _gridRowsSelector.gridRowCountSelector)(apiRef);
|
|
32
|
+
const pagination = (0, _gridPaginationSelector.gridPaginationSelector)(apiRef.current.state);
|
|
33
|
+
const rowCount = Math.min(pagination.enabled ? pagination.paginationModel.pageSize : dataRowCount, dataRowCount);
|
|
32
34
|
return (0, _extends2.default)({}, state, {
|
|
33
35
|
rowsMeta: {
|
|
34
|
-
currentPageTotalHeight:
|
|
35
|
-
positions:
|
|
36
|
+
currentPageTotalHeight: rowCount * baseRowHeight,
|
|
37
|
+
positions: Array.from({
|
|
38
|
+
length: rowCount
|
|
39
|
+
}, (_, i) => i * baseRowHeight),
|
|
40
|
+
pinnedTopRowsTotalHeight: 0,
|
|
41
|
+
pinnedBottomRowsTotalHeight: 0
|
|
36
42
|
}
|
|
37
43
|
});
|
|
38
44
|
};
|
|
@@ -53,12 +59,9 @@ const useGridRowsMeta = (apiRef, props) => {
|
|
|
53
59
|
const hasRowWithAutoHeight = React.useRef(false);
|
|
54
60
|
const isHeightMetaValid = React.useRef(false);
|
|
55
61
|
const densityFactor = (0, _useGridSelector.useGridSelector)(apiRef, _densitySelector.gridDensityFactorSelector);
|
|
56
|
-
const filterModel = (0, _useGridSelector.useGridSelector)(apiRef, _gridFilterSelector.gridFilterModelSelector);
|
|
57
|
-
const paginationState = (0, _useGridSelector.useGridSelector)(apiRef, _gridPaginationSelector.gridPaginationSelector);
|
|
58
|
-
const sortModel = (0, _useGridSelector.useGridSelector)(apiRef, _gridSortingSelector.gridSortModelSelector);
|
|
59
62
|
const currentPage = (0, _useGridVisibleRows.useGridVisibleRows)(apiRef, props);
|
|
60
63
|
const pinnedRows = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridPinnedRowsSelector);
|
|
61
|
-
const rowHeight = (0, _useGridSelector.useGridSelector)(apiRef,
|
|
64
|
+
const rowHeight = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridRowHeightSelector);
|
|
62
65
|
const getRowHeightEntry = rowId => {
|
|
63
66
|
let entry = heightCache.get(rowId);
|
|
64
67
|
if (entry === undefined) {
|
|
@@ -123,8 +126,14 @@ const useGridRowsMeta = (apiRef, props) => {
|
|
|
123
126
|
}, [apiRef, currentPage.rows, getRowHeightProp, getEstimatedRowHeight, rowHeight, getRowSpacing, densityFactor]);
|
|
124
127
|
const hydrateRowsMeta = React.useCallback(() => {
|
|
125
128
|
hasRowWithAutoHeight.current = false;
|
|
126
|
-
pinnedRows.top.
|
|
127
|
-
|
|
129
|
+
const pinnedTopRowsTotalHeight = pinnedRows.top.reduce((acc, row) => {
|
|
130
|
+
const entry = processHeightEntry(row);
|
|
131
|
+
return acc + entry.content + entry.spacingTop + entry.spacingBottom + entry.detail;
|
|
132
|
+
}, 0);
|
|
133
|
+
const pinnedBottomRowsTotalHeight = pinnedRows.bottom.reduce((acc, row) => {
|
|
134
|
+
const entry = processHeightEntry(row);
|
|
135
|
+
return acc + entry.content + entry.spacingTop + entry.spacingBottom + entry.detail;
|
|
136
|
+
}, 0);
|
|
128
137
|
const positions = [];
|
|
129
138
|
const currentPageTotalHeight = currentPage.rows.reduce((acc, row) => {
|
|
130
139
|
positions.push(acc);
|
|
@@ -136,14 +145,21 @@ const useGridRowsMeta = (apiRef, props) => {
|
|
|
136
145
|
// No row has height=auto, so all rows are already measured
|
|
137
146
|
lastMeasuredRowIndex.current = Infinity;
|
|
138
147
|
}
|
|
148
|
+
const didHeightsChange = pinnedTopRowsTotalHeight !== apiRef.current.state.rowsMeta.pinnedTopRowsTotalHeight || pinnedBottomRowsTotalHeight !== apiRef.current.state.rowsMeta.pinnedBottomRowsTotalHeight || currentPageTotalHeight !== apiRef.current.state.rowsMeta.currentPageTotalHeight;
|
|
149
|
+
const rowsMeta = {
|
|
150
|
+
currentPageTotalHeight,
|
|
151
|
+
positions,
|
|
152
|
+
pinnedTopRowsTotalHeight,
|
|
153
|
+
pinnedBottomRowsTotalHeight
|
|
154
|
+
};
|
|
139
155
|
apiRef.current.setState(state => {
|
|
140
156
|
return (0, _extends2.default)({}, state, {
|
|
141
|
-
rowsMeta
|
|
142
|
-
currentPageTotalHeight,
|
|
143
|
-
positions
|
|
144
|
-
}
|
|
157
|
+
rowsMeta
|
|
145
158
|
});
|
|
146
159
|
});
|
|
160
|
+
if (didHeightsChange) {
|
|
161
|
+
apiRef.current.updateDimensions();
|
|
162
|
+
}
|
|
147
163
|
isHeightMetaValid.current = true;
|
|
148
164
|
}, [apiRef, pinnedRows, currentPage.rows, processHeightEntry]);
|
|
149
165
|
const getRowHeight = rowId => {
|
|
@@ -193,7 +209,7 @@ const useGridRowsMeta = (apiRef, props) => {
|
|
|
193
209
|
// Because of variable row height this is needed for the virtualization
|
|
194
210
|
(0, _utils.unstable_useEnhancedEffect)(() => {
|
|
195
211
|
hydrateRowsMeta();
|
|
196
|
-
}, [
|
|
212
|
+
}, [hydrateRowsMeta]);
|
|
197
213
|
const rowsMetaApi = {
|
|
198
214
|
unstable_getRowHeight: getRowHeight,
|
|
199
215
|
unstable_setLastMeasuredRowIndex: setLastMeasuredRowIndex,
|
|
@@ -30,15 +30,16 @@ const gridSortedRowEntriesSelector = exports.gridSortedRowEntriesSelector = (0,
|
|
|
30
30
|
id,
|
|
31
31
|
model
|
|
32
32
|
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
} else {
|
|
34
|
+
const rowNode = rowTree[id];
|
|
35
|
+
if (rowNode && (0, _gridRowsUtils.isAutogeneratedRowNode)(rowNode)) {
|
|
36
|
+
acc.push({
|
|
37
|
+
id,
|
|
38
|
+
model: {
|
|
39
|
+
[_gridRowsUtils.GRID_ID_AUTOGENERATED]: id
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
42
43
|
}
|
|
43
44
|
return acc;
|
|
44
45
|
}, []));
|
|
@@ -17,12 +17,12 @@ var _useLazyRef = _interopRequireDefault(require("@mui/utils/useLazyRef"));
|
|
|
17
17
|
var _useTimeout = _interopRequireDefault(require("@mui/utils/useTimeout"));
|
|
18
18
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
19
19
|
var _reactMajor = _interopRequireDefault(require("@mui/x-internals/reactMajor"));
|
|
20
|
+
var _gridDimensionsSelectors = require("../dimensions/gridDimensionsSelectors");
|
|
20
21
|
var _useGridPrivateApiContext = require("../../utils/useGridPrivateApiContext");
|
|
21
22
|
var _useGridRootProps = require("../../utils/useGridRootProps");
|
|
22
23
|
var _useGridSelector = require("../../utils/useGridSelector");
|
|
23
24
|
var _useRunOnce = require("../../utils/useRunOnce");
|
|
24
25
|
var _gridColumnsSelector = require("../columns/gridColumnsSelector");
|
|
25
|
-
var _gridDimensionsSelectors = require("../dimensions/gridDimensionsSelectors");
|
|
26
26
|
var _gridRowsSelector = require("../rows/gridRowsSelector");
|
|
27
27
|
var _useGridVisibleRows = require("../../utils/useGridVisibleRows");
|
|
28
28
|
var _utils2 = require("../../utils");
|
|
@@ -68,8 +68,6 @@ const useGridVirtualScroller = () => {
|
|
|
68
68
|
const visibleColumns = (0, _useGridSelector.useGridSelector)(apiRef, () => listView ? [(0, _gridListViewSelectors.gridListColumnSelector)(apiRef.current.state)] : (0, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector)(apiRef));
|
|
69
69
|
const enabledForRows = (0, _useGridSelector.useGridSelector)(apiRef, _gridVirtualizationSelectors.gridVirtualizationRowEnabledSelector) && !_isJSDOM.isJSDOM;
|
|
70
70
|
const enabledForColumns = (0, _useGridSelector.useGridSelector)(apiRef, _gridVirtualizationSelectors.gridVirtualizationColumnEnabledSelector) && !_isJSDOM.isJSDOM;
|
|
71
|
-
const dimensions = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridDimensionsSelector);
|
|
72
|
-
const outerSize = dimensions.viewportOuterSize;
|
|
73
71
|
const pinnedRows = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridPinnedRowsSelector);
|
|
74
72
|
const pinnedColumnDefinitions = (0, _gridColumnsSelector.gridVisiblePinnedColumnDefinitionsSelector)(apiRef);
|
|
75
73
|
const pinnedColumns = listView ? _columns.EMPTY_PINNED_COLUMN_FIELDS : pinnedColumnDefinitions;
|
|
@@ -82,10 +80,14 @@ const useGridVirtualScroller = () => {
|
|
|
82
80
|
const scrollerRef = apiRef.current.virtualScrollerRef;
|
|
83
81
|
const scrollbarVerticalRef = apiRef.current.virtualScrollbarVerticalRef;
|
|
84
82
|
const scrollbarHorizontalRef = apiRef.current.virtualScrollbarHorizontalRef;
|
|
85
|
-
const contentHeight = dimensions.contentSize.height;
|
|
86
|
-
const columnsTotalWidth = dimensions.columnsTotalWidth;
|
|
87
83
|
const hasColSpan = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridHasColSpanSelector);
|
|
88
84
|
const isRenderContextReady = React.useRef(false);
|
|
85
|
+
const rowHeight = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridRowHeightSelector);
|
|
86
|
+
const contentHeight = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridContentHeightSelector);
|
|
87
|
+
const columnsTotalWidth = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridColumnsTotalWidthSelector);
|
|
88
|
+
const needsHorizontalScrollbar = (0, _useGridSelector.useGridSelector)(apiRef, needsHorizontalScrollbarSelector);
|
|
89
|
+
const verticalScrollbarWidth = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridVerticalScrollbarWidthSelector);
|
|
90
|
+
const gridHasFiller = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridHasFillerSelector);
|
|
89
91
|
const previousSize = React.useRef(null);
|
|
90
92
|
const mainRefCallback = React.useCallback(node => {
|
|
91
93
|
mainRef.current = node;
|
|
@@ -152,7 +154,7 @@ const useGridVirtualScroller = () => {
|
|
|
152
154
|
const focusedVirtualCell = (0, _useGridSelector.useGridSelector)(apiRef, _gridFocusedVirtualCellSelector.gridFocusedVirtualCellSelector);
|
|
153
155
|
const scrollTimeout = (0, _useTimeout.default)();
|
|
154
156
|
const frozenContext = React.useRef(undefined);
|
|
155
|
-
const scrollCache = (0, _useLazyRef.default)(() => createScrollCache(isRtl, rootProps.rowBufferPx, rootProps.columnBufferPx,
|
|
157
|
+
const scrollCache = (0, _useLazyRef.default)(() => createScrollCache(isRtl, rootProps.rowBufferPx, rootProps.columnBufferPx, rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6)).current;
|
|
156
158
|
const updateRenderContext = React.useCallback(nextRenderContext => {
|
|
157
159
|
if (areRenderContextsEqual(nextRenderContext, apiRef.current.state.virtualization.renderContext)) {
|
|
158
160
|
return;
|
|
@@ -167,19 +169,21 @@ const useGridVirtualScroller = () => {
|
|
|
167
169
|
});
|
|
168
170
|
|
|
169
171
|
// The lazy-loading hook is listening to `renderedRowsIntervalChange`,
|
|
170
|
-
// but only does something if
|
|
171
|
-
//
|
|
172
|
-
|
|
172
|
+
// but only does something if we already have a render context, because
|
|
173
|
+
// otherwise we would call an update directly on mount
|
|
174
|
+
const isReady = (0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef.current.state).isReady;
|
|
175
|
+
if (isReady && didRowsIntervalChange) {
|
|
173
176
|
previousRowContext.current = nextRenderContext;
|
|
174
177
|
apiRef.current.publishEvent('renderedRowsIntervalChange', nextRenderContext);
|
|
175
178
|
}
|
|
176
179
|
previousContextScrollPosition.current = scrollPosition.current;
|
|
177
|
-
}, [apiRef
|
|
180
|
+
}, [apiRef]);
|
|
178
181
|
const triggerUpdateRenderContext = (0, _utils.unstable_useEventCallback)(() => {
|
|
179
182
|
const scroller = scrollerRef.current;
|
|
180
183
|
if (!scroller) {
|
|
181
184
|
return undefined;
|
|
182
185
|
}
|
|
186
|
+
const dimensions = (0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef.current.state);
|
|
183
187
|
const maxScrollTop = Math.ceil(dimensions.minimumSize.height - dimensions.viewportOuterSize.height);
|
|
184
188
|
const maxScrollLeft = Math.ceil(dimensions.minimumSize.width - dimensions.viewportInnerSize.width);
|
|
185
189
|
|
|
@@ -199,7 +203,7 @@ const useGridVirtualScroller = () => {
|
|
|
199
203
|
const columnScroll = Math.abs(scrollPosition.current.left - previousContextScrollPosition.current.left);
|
|
200
204
|
|
|
201
205
|
// PERF: use the computed minimum column width instead of a static one
|
|
202
|
-
const didCrossThreshold = rowScroll >=
|
|
206
|
+
const didCrossThreshold = rowScroll >= rowHeight || columnScroll >= MINIMUM_COLUMN_WIDTH;
|
|
203
207
|
const didChangeDirection = scrollCache.direction !== direction;
|
|
204
208
|
const shouldUpdate = didCrossThreshold || didChangeDirection;
|
|
205
209
|
if (!shouldUpdate) {
|
|
@@ -221,7 +225,7 @@ const useGridVirtualScroller = () => {
|
|
|
221
225
|
}
|
|
222
226
|
}
|
|
223
227
|
scrollCache.direction = direction;
|
|
224
|
-
scrollCache.buffer = bufferForDirection(isRtl, direction, rootProps.rowBufferPx, rootProps.columnBufferPx,
|
|
228
|
+
scrollCache.buffer = bufferForDirection(isRtl, direction, rootProps.rowBufferPx, rootProps.columnBufferPx, rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6);
|
|
225
229
|
const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);
|
|
226
230
|
const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);
|
|
227
231
|
|
|
@@ -233,6 +237,10 @@ const useGridVirtualScroller = () => {
|
|
|
233
237
|
return nextRenderContext;
|
|
234
238
|
});
|
|
235
239
|
const forceUpdateRenderContext = () => {
|
|
240
|
+
// skip update if dimensions are not ready and virtualization is enabled
|
|
241
|
+
if (!(0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef.current.state).isReady && (enabledForRows || enabledForColumns)) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
236
244
|
const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);
|
|
237
245
|
const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);
|
|
238
246
|
// Reset the frozen context when the render context changes, see the illustration in https://github.com/mui/mui-x/pull/12353
|
|
@@ -261,7 +269,12 @@ const useGridVirtualScroller = () => {
|
|
|
261
269
|
if (!params.rows && !currentPage.range) {
|
|
262
270
|
return [];
|
|
263
271
|
}
|
|
264
|
-
|
|
272
|
+
let baseRenderContext = renderContext;
|
|
273
|
+
if (params.renderContext) {
|
|
274
|
+
baseRenderContext = params.renderContext;
|
|
275
|
+
baseRenderContext.firstColumnIndex = renderContext.firstColumnIndex;
|
|
276
|
+
baseRenderContext.lastColumnIndex = renderContext.lastColumnIndex;
|
|
277
|
+
}
|
|
265
278
|
const isLastSection = !hasBottomPinnedRows && params.position === undefined || hasBottomPinnedRows && params.position === 'bottom';
|
|
266
279
|
const isPinnedSection = params.position !== undefined;
|
|
267
280
|
let rowIndexOffset;
|
|
@@ -355,7 +368,7 @@ const useGridVirtualScroller = () => {
|
|
|
355
368
|
}
|
|
356
369
|
}
|
|
357
370
|
let currentRenderContext = baseRenderContext;
|
|
358
|
-
if (
|
|
371
|
+
if (frozenContext.current && rowIndexInPage >= frozenContext.current.firstRowIndex && rowIndexInPage < frozenContext.current.lastRowIndex) {
|
|
359
372
|
currentRenderContext = frozenContext.current;
|
|
360
373
|
}
|
|
361
374
|
const isVirtualFocusRow = rowIndexInPage === virtualRowIndex;
|
|
@@ -370,7 +383,7 @@ const useGridVirtualScroller = () => {
|
|
|
370
383
|
index: rowIndex,
|
|
371
384
|
selected: isSelected,
|
|
372
385
|
offsetLeft: offsetLeft,
|
|
373
|
-
columnsTotalWidth:
|
|
386
|
+
columnsTotalWidth: columnsTotalWidth,
|
|
374
387
|
rowHeight: baseRowHeight,
|
|
375
388
|
pinnedColumns: pinnedColumns,
|
|
376
389
|
visibleColumns: visibleColumns,
|
|
@@ -381,8 +394,8 @@ const useGridVirtualScroller = () => {
|
|
|
381
394
|
isLastVisible: isLastVisible,
|
|
382
395
|
isNotVisible: isVirtualFocusRow,
|
|
383
396
|
showBottomBorder: showBottomBorder,
|
|
384
|
-
scrollbarWidth:
|
|
385
|
-
gridHasFiller:
|
|
397
|
+
scrollbarWidth: verticalScrollbarWidth,
|
|
398
|
+
gridHasFiller: gridHasFiller
|
|
386
399
|
}, rowProps), id));
|
|
387
400
|
if (isVirtualFocusRow) {
|
|
388
401
|
return;
|
|
@@ -399,7 +412,6 @@ const useGridVirtualScroller = () => {
|
|
|
399
412
|
});
|
|
400
413
|
return rows;
|
|
401
414
|
};
|
|
402
|
-
const needsHorizontalScrollbar = outerSize.width && columnsTotalWidth > outerSize.width;
|
|
403
415
|
const scrollerStyle = React.useMemo(() => ({
|
|
404
416
|
overflowX: !needsHorizontalScrollbar || listView ? 'hidden' : undefined,
|
|
405
417
|
overflowY: rootProps.autoHeight ? 'hidden' : undefined
|
|
@@ -435,14 +447,11 @@ const useGridVirtualScroller = () => {
|
|
|
435
447
|
scrollerRef.current.scrollLeft = 0;
|
|
436
448
|
}
|
|
437
449
|
}, [listView, scrollerRef]);
|
|
438
|
-
(0, _useRunOnce.useRunOnce)(
|
|
439
|
-
const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);
|
|
440
|
-
const initialRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);
|
|
441
|
-
updateRenderContext(initialRenderContext);
|
|
450
|
+
(0, _useRunOnce.useRunOnce)(renderContext !== _useGridVirtualization.EMPTY_RENDER_CONTEXT, () => {
|
|
442
451
|
apiRef.current.publishEvent('scrollPositionChange', {
|
|
443
452
|
top: scrollPosition.current.top,
|
|
444
453
|
left: scrollPosition.current.left,
|
|
445
|
-
renderContext
|
|
454
|
+
renderContext
|
|
446
455
|
});
|
|
447
456
|
isRenderContextReady.current = true;
|
|
448
457
|
if (rootProps.initialState?.scroll && scrollerRef.current) {
|
|
@@ -495,9 +504,9 @@ const useGridVirtualScroller = () => {
|
|
|
495
504
|
apiRef.current.register('private', {
|
|
496
505
|
updateRenderContext: forceUpdateRenderContext
|
|
497
506
|
});
|
|
498
|
-
(0, _utils2.
|
|
499
|
-
(0, _utils2.
|
|
500
|
-
(0, _utils2.
|
|
507
|
+
(0, _utils2.useGridApiOptionHandler)(apiRef, 'sortedRowsSet', forceUpdateRenderContext);
|
|
508
|
+
(0, _utils2.useGridApiOptionHandler)(apiRef, 'paginationModelChange', forceUpdateRenderContext);
|
|
509
|
+
(0, _utils2.useGridApiOptionHandler)(apiRef, 'columnsChange', forceUpdateRenderContext);
|
|
501
510
|
return {
|
|
502
511
|
renderContext,
|
|
503
512
|
setPanels,
|
|
@@ -533,10 +542,17 @@ const useGridVirtualScroller = () => {
|
|
|
533
542
|
ref: scrollbarHorizontalRef,
|
|
534
543
|
role: 'presentation',
|
|
535
544
|
scrollPosition
|
|
545
|
+
}),
|
|
546
|
+
getScrollAreaProps: () => ({
|
|
547
|
+
scrollPosition
|
|
536
548
|
})
|
|
537
549
|
};
|
|
538
550
|
};
|
|
539
551
|
exports.useGridVirtualScroller = useGridVirtualScroller;
|
|
552
|
+
// dimension selectors
|
|
553
|
+
function needsHorizontalScrollbarSelector(state) {
|
|
554
|
+
return state.dimensions.viewportOuterSize.width > 0 && state.dimensions.columnsTotalWidth > state.dimensions.viewportOuterSize.width;
|
|
555
|
+
}
|
|
540
556
|
function inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns) {
|
|
541
557
|
const dimensions = (0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef.current.state);
|
|
542
558
|
const currentPage = (0, _useGridVisibleRows.getVisibleRows)(apiRef, rootProps);
|
|
@@ -1,35 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.useGridNativeEventListener = void 0;
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _utils = require("../../utils/utils");
|
|
10
7
|
var _useGridLogger = require("./useGridLogger");
|
|
8
|
+
var _useGridApiEventHandler = require("./useGridApiEventHandler");
|
|
11
9
|
const useGridNativeEventListener = (apiRef, ref, eventName, handler, options) => {
|
|
12
10
|
const logger = (0, _useGridLogger.useGridLogger)(apiRef, 'useNativeEventListener');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return handlerRef.current && handlerRef.current(event);
|
|
18
|
-
}, []);
|
|
19
|
-
React.useEffect(() => {
|
|
20
|
-
handlerRef.current = handler;
|
|
21
|
-
}, [handler]);
|
|
22
|
-
React.useEffect(() => {
|
|
23
|
-
if (targetElement && eventName && !added) {
|
|
24
|
-
logger.debug(`Binding native ${eventName} event`);
|
|
25
|
-
targetElement.addEventListener(eventName, wrapHandler, options);
|
|
26
|
-
setAdded(true);
|
|
27
|
-
const unsubscribe = () => {
|
|
28
|
-
logger.debug(`Clearing native ${eventName} event`);
|
|
29
|
-
targetElement.removeEventListener(eventName, wrapHandler, options);
|
|
30
|
-
};
|
|
31
|
-
apiRef.current.subscribeEvent('unmount', unsubscribe);
|
|
11
|
+
(0, _useGridApiEventHandler.useGridApiOptionHandler)(apiRef, 'rootMount', () => {
|
|
12
|
+
const targetElement = typeof ref === 'function' ? ref() : ref.current;
|
|
13
|
+
if (!targetElement || !eventName || !handler) {
|
|
14
|
+
return undefined;
|
|
32
15
|
}
|
|
33
|
-
|
|
16
|
+
logger.debug(`Binding native ${eventName} event`);
|
|
17
|
+
targetElement.addEventListener(eventName, handler, options);
|
|
18
|
+
return () => {
|
|
19
|
+
logger.debug(`Clearing native ${eventName} event`);
|
|
20
|
+
targetElement.removeEventListener(eventName, handler, options);
|
|
21
|
+
};
|
|
22
|
+
});
|
|
34
23
|
};
|
|
35
24
|
exports.useGridNativeEventListener = useGridNativeEventListener;
|
|
@@ -8,8 +8,8 @@ exports.useGridSelectorV8 = exports.useGridSelector = exports.objectShallowCompa
|
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _fastObjectShallowCompare = require("@mui/x-internals/fastObjectShallowCompare");
|
|
10
10
|
var _warning = require("@mui/x-internals/warning");
|
|
11
|
+
var _shim = require("use-sync-external-store/shim");
|
|
11
12
|
var _useLazyRef = require("./useLazyRef");
|
|
12
|
-
var _useOnMount = require("./useOnMount");
|
|
13
13
|
function isOutputSelector(selector) {
|
|
14
14
|
return selector.acceptsApiRef;
|
|
15
15
|
}
|
|
@@ -50,8 +50,10 @@ const createRefs = () => ({
|
|
|
50
50
|
state: null,
|
|
51
51
|
equals: null,
|
|
52
52
|
selector: null,
|
|
53
|
-
args:
|
|
53
|
+
args: undefined
|
|
54
54
|
});
|
|
55
|
+
const EMPTY = [];
|
|
56
|
+
const emptyGetSnapshot = () => null;
|
|
55
57
|
|
|
56
58
|
// TODO v8: Remove this function
|
|
57
59
|
const useGridSelector = (apiRef, selector, equals = defaultCompare) => {
|
|
@@ -68,15 +70,31 @@ const useGridSelector = (apiRef, selector, equals = defaultCompare) => {
|
|
|
68
70
|
refs.current.state = state;
|
|
69
71
|
refs.current.equals = equals;
|
|
70
72
|
refs.current.selector = selector;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
const subscribe = React.useCallback(() => {
|
|
74
|
+
if (refs.current.subscription) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
refs.current.subscription = apiRef.current.store.subscribe(() => {
|
|
73
78
|
const newState = applySelector(apiRef, refs.current.selector);
|
|
74
79
|
if (!refs.current.equals(refs.current.state, newState)) {
|
|
75
80
|
refs.current.state = newState;
|
|
76
81
|
setState(newState);
|
|
77
82
|
}
|
|
78
83
|
});
|
|
79
|
-
|
|
84
|
+
return null;
|
|
85
|
+
},
|
|
86
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
87
|
+
EMPTY);
|
|
88
|
+
const unsubscribe = React.useCallback(() => {
|
|
89
|
+
return () => {
|
|
90
|
+
if (refs.current.subscription) {
|
|
91
|
+
refs.current.subscription();
|
|
92
|
+
refs.current.subscription = undefined;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
96
|
+
}, EMPTY);
|
|
97
|
+
(0, _shim.useSyncExternalStore)(unsubscribe, subscribe, emptyGetSnapshot);
|
|
80
98
|
return state;
|
|
81
99
|
};
|
|
82
100
|
|
|
@@ -105,15 +123,31 @@ const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultC
|
|
|
105
123
|
setState(newState);
|
|
106
124
|
}
|
|
107
125
|
}
|
|
108
|
-
|
|
109
|
-
|
|
126
|
+
const subscribe = React.useCallback(() => {
|
|
127
|
+
if (refs.current.subscription) {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
refs.current.subscription = apiRef.current.store.subscribe(() => {
|
|
110
131
|
const newState = applySelectorV8(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
|
|
111
132
|
if (!refs.current.equals(refs.current.state, newState)) {
|
|
112
133
|
refs.current.state = newState;
|
|
113
134
|
setState(newState);
|
|
114
135
|
}
|
|
115
136
|
});
|
|
116
|
-
|
|
137
|
+
return null;
|
|
138
|
+
},
|
|
139
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
140
|
+
EMPTY);
|
|
141
|
+
const unsubscribe = React.useCallback(() => {
|
|
142
|
+
return () => {
|
|
143
|
+
if (refs.current.subscription) {
|
|
144
|
+
refs.current.subscription();
|
|
145
|
+
refs.current.subscription = undefined;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
149
|
+
}, EMPTY);
|
|
150
|
+
(0, _shim.useSyncExternalStore)(unsubscribe, subscribe, emptyGetSnapshot);
|
|
117
151
|
return state;
|
|
118
152
|
};
|
|
119
153
|
exports.useGridSelectorV8 = useGridSelectorV8;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useIsSSR = void 0;
|
|
7
|
+
var _shim = require("use-sync-external-store/shim");
|
|
8
|
+
const emptySubscribe = () => () => {};
|
|
9
|
+
const clientSnapshot = () => false;
|
|
10
|
+
const serverSnapshot = () => true;
|
|
11
|
+
const useIsSSR = () => (0, _shim.useSyncExternalStore)(emptySubscribe, clientSnapshot, serverSnapshot);
|
|
12
|
+
exports.useIsSSR = useIsSSR;
|
package/node/index.js
CHANGED
package/node/internals/index.js
CHANGED
|
@@ -32,6 +32,7 @@ var _exportNames = {
|
|
|
32
32
|
useGridPrintExport: true,
|
|
33
33
|
useGridFilter: true,
|
|
34
34
|
filterStateInitializer: true,
|
|
35
|
+
defaultGridFilterLookup: true,
|
|
35
36
|
passFilterLogic: true,
|
|
36
37
|
gridFilteredChildrenCountLookupSelector: true,
|
|
37
38
|
gridExpandedSortedRowTreeLevelPositionLookupSelector: true,
|
|
@@ -57,7 +58,6 @@ var _exportNames = {
|
|
|
57
58
|
buildRootGroup: true,
|
|
58
59
|
getRowIdFromRowModel: true,
|
|
59
60
|
GRID_ID_AUTOGENERATED: true,
|
|
60
|
-
calculatePinnedRowsHeight: true,
|
|
61
61
|
useGridRowsMeta: true,
|
|
62
62
|
rowsMetaStateInitializer: true,
|
|
63
63
|
useGridParamsApi: true,
|
|
@@ -171,12 +171,6 @@ Object.defineProperty(exports, "buildRootGroup", {
|
|
|
171
171
|
return _gridRowsUtils.buildRootGroup;
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
|
-
Object.defineProperty(exports, "calculatePinnedRowsHeight", {
|
|
175
|
-
enumerable: true,
|
|
176
|
-
get: function () {
|
|
177
|
-
return _gridRowsUtils.calculatePinnedRowsHeight;
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
174
|
Object.defineProperty(exports, "columnGroupsStateInitializer", {
|
|
181
175
|
enumerable: true,
|
|
182
176
|
get: function () {
|
|
@@ -231,6 +225,12 @@ Object.defineProperty(exports, "defaultGetRowsToExport", {
|
|
|
231
225
|
return _utils2.defaultGetRowsToExport;
|
|
232
226
|
}
|
|
233
227
|
});
|
|
228
|
+
Object.defineProperty(exports, "defaultGridFilterLookup", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function () {
|
|
231
|
+
return _gridFilterState.defaultGridFilterLookup;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
234
|
Object.defineProperty(exports, "densityStateInitializer", {
|
|
235
235
|
enumerable: true,
|
|
236
236
|
get: function () {
|
|
@@ -762,6 +762,7 @@ var _useGridDensity = require("../hooks/features/density/useGridDensity");
|
|
|
762
762
|
var _useGridCsvExport = require("../hooks/features/export/useGridCsvExport");
|
|
763
763
|
var _useGridPrintExport = require("../hooks/features/export/useGridPrintExport");
|
|
764
764
|
var _useGridFilter = require("../hooks/features/filter/useGridFilter");
|
|
765
|
+
var _gridFilterState = require("../hooks/features/filter/gridFilterState");
|
|
765
766
|
var _gridFilterUtils = require("../hooks/features/filter/gridFilterUtils");
|
|
766
767
|
var _gridFilterSelector = require("../hooks/features/filter/gridFilterSelector");
|
|
767
768
|
var _filterPanelUtils = require("../components/panel/filterPanel/filterPanelUtils");
|
|
@@ -788,6 +789,18 @@ var _gridSortingSelector = require("../hooks/features/sorting/gridSortingSelecto
|
|
|
788
789
|
var _useGridScroll = require("../hooks/features/scroll/useGridScroll");
|
|
789
790
|
var _useGridEvents = require("../hooks/features/events/useGridEvents");
|
|
790
791
|
var _useGridDimensions = require("../hooks/features/dimensions/useGridDimensions");
|
|
792
|
+
var _gridDimensionsSelectors = require("../hooks/features/dimensions/gridDimensionsSelectors");
|
|
793
|
+
Object.keys(_gridDimensionsSelectors).forEach(function (key) {
|
|
794
|
+
if (key === "default" || key === "__esModule") return;
|
|
795
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
796
|
+
if (key in exports && exports[key] === _gridDimensionsSelectors[key]) return;
|
|
797
|
+
Object.defineProperty(exports, key, {
|
|
798
|
+
enumerable: true,
|
|
799
|
+
get: function () {
|
|
800
|
+
return _gridDimensionsSelectors[key];
|
|
801
|
+
}
|
|
802
|
+
});
|
|
803
|
+
});
|
|
791
804
|
var _useGridStatePersistence = require("../hooks/features/statePersistence/useGridStatePersistence");
|
|
792
805
|
var _useGridVirtualScroller = require("../hooks/features/virtualization/useGridVirtualScroller");
|
|
793
806
|
var _virtualization = require("../hooks/features/virtualization");
|
package/node/locales/plPL.js
CHANGED
|
@@ -36,12 +36,11 @@ const plPLGrid = {
|
|
|
36
36
|
toolbarExportPrint: 'Drukuj',
|
|
37
37
|
toolbarExportExcel: 'Pobierz jako plik Excel',
|
|
38
38
|
// Columns management text
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
columnsManagementSearchTitle: 'Szukaj',
|
|
40
|
+
columnsManagementNoColumns: 'Brak kolumn',
|
|
41
|
+
columnsManagementShowHideAllText: 'Wyświetl/Ukryj wszystkie',
|
|
42
|
+
columnsManagementReset: 'Resetuj',
|
|
43
|
+
columnsManagementDeleteIconLabel: 'Wyczyść',
|
|
45
44
|
// Filter panel text
|
|
46
45
|
filterPanelAddFilter: 'Dodaj filtr',
|
|
47
46
|
filterPanelRemoveAll: 'Usuń wszystkie',
|
|
@@ -69,13 +68,12 @@ const plPLGrid = {
|
|
|
69
68
|
filterOperatorIsEmpty: 'jest pusty',
|
|
70
69
|
filterOperatorIsNotEmpty: 'nie jest pusty',
|
|
71
70
|
filterOperatorIsAnyOf: 'jest jednym z',
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
'filterOperator=': 'równa się',
|
|
72
|
+
'filterOperator!=': 'nie równa się',
|
|
73
|
+
'filterOperator>': 'większy niż',
|
|
74
|
+
'filterOperator>=': 'większy lub równy',
|
|
75
|
+
'filterOperator<': 'mniejszy niż',
|
|
76
|
+
'filterOperator<=': 'mniejszy lub równy',
|
|
79
77
|
// Header filter operators text
|
|
80
78
|
headerFilterOperatorContains: 'Zawiera',
|
|
81
79
|
// headerFilterOperatorDoesNotContain: 'Does not contain',
|
|
@@ -85,20 +83,19 @@ const plPLGrid = {
|
|
|
85
83
|
headerFilterOperatorEndsWith: 'Kończy się na',
|
|
86
84
|
// headerFilterOperatorIs: 'Is',
|
|
87
85
|
headerFilterOperatorNot: 'Niepuste',
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
86
|
+
headerFilterOperatorAfter: 'Jest po',
|
|
87
|
+
headerFilterOperatorOnOrAfter: 'Jest w lub po',
|
|
88
|
+
headerFilterOperatorBefore: 'Jest przed',
|
|
89
|
+
headerFilterOperatorOnOrBefore: 'Jest w lub przed',
|
|
90
|
+
headerFilterOperatorIsEmpty: 'Jest pusty',
|
|
91
|
+
headerFilterOperatorIsNotEmpty: 'Nie jest pusty',
|
|
92
|
+
headerFilterOperatorIsAnyOf: 'Is any of',
|
|
93
|
+
'headerFilterOperator=': 'Równa się',
|
|
94
|
+
'headerFilterOperator!=': 'Nie równa się',
|
|
95
|
+
'headerFilterOperator>': 'Większy niż',
|
|
96
|
+
'headerFilterOperator>=': 'Większy lub równy',
|
|
97
|
+
'headerFilterOperator<': 'Mniejszy niż',
|
|
98
|
+
'headerFilterOperator<=': 'Mniejszy lub równy',
|
|
102
99
|
// Filter values text
|
|
103
100
|
filterValueAny: 'dowolny',
|
|
104
101
|
filterValueTrue: 'prawda',
|
|
@@ -150,14 +147,13 @@ const plPLGrid = {
|
|
|
150
147
|
expandDetailPanel: 'Rozwiń',
|
|
151
148
|
collapseDetailPanel: 'Zwiń',
|
|
152
149
|
// Row reordering text
|
|
153
|
-
rowReorderingHeaderName: 'Porządkowanie wierszy'
|
|
154
|
-
|
|
150
|
+
rowReorderingHeaderName: 'Porządkowanie wierszy',
|
|
155
151
|
// Aggregation
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
152
|
+
aggregationMenuItemHeader: 'Agregacja',
|
|
153
|
+
aggregationFunctionLabelSum: 'suma',
|
|
154
|
+
aggregationFunctionLabelAvg: 'średnia',
|
|
155
|
+
aggregationFunctionLabelMin: 'minimum',
|
|
156
|
+
aggregationFunctionLabelMax: 'maximum',
|
|
157
|
+
aggregationFunctionLabelSize: 'rozmiar'
|
|
162
158
|
};
|
|
163
159
|
const plPL = exports.plPL = (0, _getGridLocalization.getGridLocalization)(plPLGrid, _locale.plPL);
|