@mui/x-data-grid 8.9.1 → 8.10.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 +217 -8
- package/DataGrid/DataGrid.js +5 -0
- package/DataGrid/useDataGridComponent.js +2 -0
- package/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/components/GridDetailPanels.d.ts +2 -2
- package/components/GridFooter.js +1 -1
- package/components/GridPagination.js +4 -3
- package/components/GridPinnedRows.d.ts +2 -2
- package/components/GridRow.js +8 -1
- package/components/cell/GridCell.js +7 -5
- package/components/cell/GridEditSingleSelectCell.js +1 -1
- package/components/columnsManagement/GridColumnsManagement.d.ts +6 -0
- package/components/columnsManagement/GridColumnsManagement.js +17 -5
- package/components/containers/GridRootStyles.d.ts +1 -1
- package/components/toolbarV8/Toolbar.d.ts +1 -1
- package/components/virtualization/GridVirtualScroller.js +5 -5
- package/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/DataGrid/DataGrid.js +5 -0
- package/esm/DataGrid/useDataGridComponent.js +2 -0
- package/esm/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/esm/components/GridDetailPanels.d.ts +2 -2
- package/esm/components/GridFooter.js +1 -1
- package/esm/components/GridPagination.js +3 -2
- package/esm/components/GridPinnedRows.d.ts +2 -2
- package/esm/components/GridRow.js +8 -1
- package/esm/components/cell/GridCell.js +7 -5
- package/esm/components/cell/GridEditSingleSelectCell.js +1 -1
- package/esm/components/columnsManagement/GridColumnsManagement.d.ts +6 -0
- package/esm/components/columnsManagement/GridColumnsManagement.js +17 -5
- package/esm/components/containers/GridRootStyles.d.ts +1 -1
- package/esm/components/toolbarV8/Toolbar.d.ts +1 -1
- package/esm/components/virtualization/GridVirtualScroller.js +5 -5
- package/esm/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/hooks/core/useGridVirtualizer.d.ts +9 -0
- package/esm/hooks/core/useGridVirtualizer.js +223 -0
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -2
- package/esm/hooks/features/columns/useGridColumnSpanning.js +5 -90
- package/esm/hooks/features/dataSource/models.d.ts +11 -2
- package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +9 -2
- package/esm/hooks/features/dimensions/useGridDimensions.js +18 -188
- package/esm/hooks/features/editing/useGridRowEditing.js +4 -1
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +1 -1
- package/esm/hooks/features/keyboardNavigation/utils.d.ts +3 -3
- package/esm/hooks/features/keyboardNavigation/utils.js +5 -5
- package/esm/hooks/features/pivoting/gridPivotingInterfaces.d.ts +0 -1
- package/esm/hooks/features/pivoting/gridPivotingSelectors.d.ts +1 -4
- package/esm/hooks/features/pivoting/gridPivotingSelectors.js +1 -2
- package/esm/hooks/features/rowReorder/gridRowReorderInterfaces.d.ts +9 -0
- package/esm/hooks/features/rowReorder/gridRowReorderInterfaces.js +1 -0
- package/esm/hooks/features/rowReorder/gridRowReorderSelector.d.ts +5 -0
- package/esm/hooks/features/rowReorder/gridRowReorderSelector.js +3 -0
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +2 -2
- package/esm/hooks/features/rowSelection/utils.js +5 -0
- package/esm/hooks/features/rows/gridRowsMetaInterfaces.d.ts +2 -8
- package/esm/hooks/features/rows/gridRowsMetaState.d.ts +2 -18
- package/esm/hooks/features/rows/useGridRowAriaAttributes.js +3 -1
- package/esm/hooks/features/rows/useGridRowSpanning.d.ts +2 -12
- package/esm/hooks/features/rows/useGridRowSpanning.js +54 -85
- package/esm/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
- package/esm/hooks/features/rows/useGridRowsMeta.js +17 -187
- package/esm/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +1 -1
- package/esm/hooks/features/virtualization/index.d.ts +1 -0
- package/esm/hooks/features/virtualization/index.js +1 -0
- package/esm/hooks/features/virtualization/useGridVirtualization.d.ts +5 -16
- package/esm/hooks/features/virtualization/useGridVirtualization.js +41 -22
- package/esm/hooks/utils/index.d.ts +1 -1
- package/esm/hooks/utils/index.js +1 -1
- package/esm/hooks/utils/useFirstRender.d.ts +1 -1
- package/esm/hooks/utils/useFirstRender.js +1 -8
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +3 -1
- package/esm/internals/index.js +2 -1
- package/esm/internals/utils/getPinnedCellOffset.js +5 -0
- package/esm/locales/frFR.js +18 -21
- package/esm/locales/heIL.js +12 -12
- package/esm/locales/nnNO.js +96 -107
- package/esm/locales/plPL.js +22 -24
- package/esm/material/index.js +2 -2
- package/esm/models/api/gridApiCommon.d.ts +4 -1
- package/esm/models/api/gridColumnSpanning.d.ts +5 -11
- package/esm/models/gridStateCommunity.d.ts +2 -0
- package/esm/models/props/DataGridProps.d.ts +5 -0
- package/esm/utils/roundToDecimalPlaces.d.ts +1 -1
- package/esm/utils/roundToDecimalPlaces.js +1 -3
- package/hooks/core/useGridVirtualizer.d.ts +9 -0
- package/hooks/core/useGridVirtualizer.js +231 -0
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -3
- package/hooks/features/columns/useGridColumnSpanning.js +5 -91
- package/hooks/features/dataSource/models.d.ts +11 -2
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +10 -3
- package/hooks/features/dimensions/useGridDimensions.js +18 -188
- package/hooks/features/editing/useGridRowEditing.js +4 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +1 -1
- package/hooks/features/keyboardNavigation/utils.d.ts +3 -3
- package/hooks/features/keyboardNavigation/utils.js +5 -5
- package/hooks/features/pivoting/gridPivotingInterfaces.d.ts +0 -1
- package/hooks/features/pivoting/gridPivotingSelectors.d.ts +1 -4
- package/hooks/features/pivoting/gridPivotingSelectors.js +2 -3
- package/hooks/features/rowReorder/gridRowReorderInterfaces.d.ts +9 -0
- package/hooks/features/rowReorder/gridRowReorderInterfaces.js +5 -0
- package/hooks/features/rowReorder/gridRowReorderSelector.d.ts +5 -0
- package/hooks/features/rowReorder/gridRowReorderSelector.js +9 -0
- package/hooks/features/rowSelection/useGridRowSelection.js +2 -2
- package/hooks/features/rowSelection/utils.js +5 -0
- package/hooks/features/rows/gridRowsMetaInterfaces.d.ts +2 -8
- package/hooks/features/rows/gridRowsMetaState.d.ts +2 -18
- package/hooks/features/rows/useGridRowAriaAttributes.js +3 -1
- package/hooks/features/rows/useGridRowSpanning.d.ts +2 -12
- package/hooks/features/rows/useGridRowSpanning.js +54 -85
- package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
- package/hooks/features/rows/useGridRowsMeta.js +15 -186
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +1 -1
- package/hooks/features/virtualization/index.d.ts +1 -0
- package/hooks/features/virtualization/index.js +12 -0
- package/hooks/features/virtualization/useGridVirtualization.d.ts +5 -16
- package/hooks/features/virtualization/useGridVirtualization.js +42 -24
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +12 -12
- package/hooks/utils/useFirstRender.d.ts +1 -1
- package/hooks/utils/useFirstRender.js +11 -11
- package/index.js +1 -1
- package/internals/index.d.ts +3 -1
- package/internals/index.js +12 -11
- package/internals/utils/getPinnedCellOffset.js +5 -0
- package/locales/frFR.js +18 -21
- package/locales/heIL.js +12 -12
- package/locales/nnNO.js +96 -107
- package/locales/plPL.js +22 -24
- package/material/index.js +2 -2
- package/models/api/gridApiCommon.d.ts +4 -1
- package/models/api/gridColumnSpanning.d.ts +5 -11
- package/models/gridStateCommunity.d.ts +2 -0
- package/models/props/DataGridProps.d.ts +5 -0
- package/package.json +5 -6
- package/utils/roundToDecimalPlaces.d.ts +1 -1
- package/utils/roundToDecimalPlaces.js +7 -4
- package/esm/hooks/features/rows/gridRowSpanningSelectors.d.ts +0 -10
- package/esm/hooks/features/rows/gridRowSpanningSelectors.js +0 -5
- package/esm/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -56
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +0 -843
- package/esm/hooks/utils/useRunOnce.d.ts +0 -5
- package/esm/hooks/utils/useRunOnce.js +0 -18
- package/esm/utils/platform.d.ts +0 -1
- package/esm/utils/platform.js +0 -2
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +0 -10
- package/hooks/features/rows/gridRowSpanningSelectors.js +0 -11
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -56
- package/hooks/features/virtualization/useGridVirtualScroller.js +0 -854
- package/hooks/utils/useRunOnce.d.ts +0 -5
- package/hooks/utils/useRunOnce.js +0 -27
- package/utils/platform.d.ts +0 -1
- package/utils/platform.js +0 -8
|
@@ -6,53 +6,63 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.EMPTY_RENDER_CONTEXT = void 0;
|
|
10
9
|
exports.useGridVirtualization = useGridVirtualization;
|
|
11
10
|
exports.virtualizationStateInitializer = void 0;
|
|
12
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _xVirtualizer = require("@mui/x-virtualizer");
|
|
14
|
+
var _isJSDOM = require("../../../utils/isJSDOM");
|
|
14
15
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
var _utils = require("../../utils");
|
|
17
|
+
const HAS_LAYOUT = !_isJSDOM.isJSDOM;
|
|
18
|
+
|
|
19
|
+
// HACK: Typescript doesn't use the alias name ("GridVirtualizationState") and changes
|
|
20
|
+
// the autogenerated docs result, but this would otherwise be just:
|
|
21
|
+
// export type GridVirtualizationState = VirtualizationState;
|
|
22
|
+
|
|
23
|
+
// XXX: We want to use the virtualizer as the source of truth for its state, but this needs to
|
|
24
|
+
// stay because some parts of the grid require the `virtualization` state during initialization.
|
|
21
25
|
const virtualizationStateInitializer = (state, props) => {
|
|
22
26
|
const {
|
|
23
27
|
disableVirtualization,
|
|
24
28
|
autoHeight
|
|
25
29
|
} = props;
|
|
26
30
|
const virtualization = {
|
|
27
|
-
enabled: !disableVirtualization,
|
|
28
|
-
enabledForColumns: !disableVirtualization,
|
|
29
|
-
enabledForRows: !disableVirtualization && !autoHeight,
|
|
30
|
-
renderContext: EMPTY_RENDER_CONTEXT
|
|
31
|
+
enabled: !disableVirtualization && HAS_LAYOUT,
|
|
32
|
+
enabledForColumns: !disableVirtualization && HAS_LAYOUT,
|
|
33
|
+
enabledForRows: !disableVirtualization && !autoHeight && HAS_LAYOUT,
|
|
34
|
+
renderContext: _xVirtualizer.EMPTY_RENDER_CONTEXT
|
|
31
35
|
};
|
|
32
36
|
return (0, _extends2.default)({}, state, {
|
|
33
37
|
virtualization
|
|
34
38
|
});
|
|
35
39
|
};
|
|
36
40
|
exports.virtualizationStateInitializer = virtualizationStateInitializer;
|
|
37
|
-
function useGridVirtualization(apiRef,
|
|
41
|
+
function useGridVirtualization(apiRef, rootProps) {
|
|
42
|
+
const {
|
|
43
|
+
virtualizer
|
|
44
|
+
} = apiRef.current;
|
|
45
|
+
const {
|
|
46
|
+
autoHeight,
|
|
47
|
+
disableVirtualization
|
|
48
|
+
} = rootProps;
|
|
49
|
+
|
|
38
50
|
/*
|
|
39
51
|
* API METHODS
|
|
40
52
|
*/
|
|
41
53
|
|
|
42
54
|
const setVirtualization = enabled => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
})
|
|
55
|
+
enabled && (enabled = HAS_LAYOUT);
|
|
56
|
+
virtualizer.store.set('virtualization', (0, _extends2.default)({}, virtualizer.store.state.virtualization, {
|
|
57
|
+
enabled,
|
|
58
|
+
enabledForColumns: enabled,
|
|
59
|
+
enabledForRows: enabled && !autoHeight
|
|
49
60
|
}));
|
|
50
61
|
};
|
|
51
62
|
const setColumnVirtualization = enabled => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
})
|
|
63
|
+
enabled && (enabled = HAS_LAYOUT);
|
|
64
|
+
virtualizer.store.set('virtualization', (0, _extends2.default)({}, virtualizer.store.state.virtualization, {
|
|
65
|
+
enabledForColumns: enabled
|
|
56
66
|
}));
|
|
57
67
|
};
|
|
58
68
|
const api = {
|
|
@@ -60,14 +70,22 @@ function useGridVirtualization(apiRef, props) {
|
|
|
60
70
|
unstable_setColumnVirtualization: setColumnVirtualization
|
|
61
71
|
};
|
|
62
72
|
(0, _useGridApiMethod.useGridApiMethod)(apiRef, api, 'public');
|
|
73
|
+
const forceUpdateRenderContext = virtualizer.api.forceUpdateRenderContext;
|
|
74
|
+
apiRef.current.register('private', {
|
|
75
|
+
updateRenderContext: forceUpdateRenderContext
|
|
76
|
+
});
|
|
63
77
|
|
|
64
78
|
/*
|
|
65
79
|
* EFFECTS
|
|
66
80
|
*/
|
|
67
81
|
|
|
82
|
+
(0, _utils.useGridEventPriority)(apiRef, 'sortedRowsSet', forceUpdateRenderContext);
|
|
83
|
+
(0, _utils.useGridEventPriority)(apiRef, 'paginationModelChange', forceUpdateRenderContext);
|
|
84
|
+
(0, _utils.useGridEventPriority)(apiRef, 'columnsChange', forceUpdateRenderContext);
|
|
85
|
+
|
|
68
86
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
69
87
|
React.useEffect(() => {
|
|
70
|
-
setVirtualization(!
|
|
71
|
-
}, [
|
|
88
|
+
setVirtualization(!rootProps.disableVirtualization);
|
|
89
|
+
}, [disableVirtualization, autoHeight]);
|
|
72
90
|
/* eslint-enable react-hooks/exhaustive-deps */
|
|
73
91
|
}
|
package/hooks/utils/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from '@mui/x-internals/useRunOnce';
|
|
1
2
|
export { useGridEvent, useGridEventPriority, unstable_resetCleanupTracking } from "./useGridEvent.js";
|
|
2
3
|
export * from "./useGridApiMethod.js";
|
|
3
4
|
export * from "./useGridLogger.js";
|
|
@@ -5,6 +6,5 @@ export { useGridSelector } from "./useGridSelector.js";
|
|
|
5
6
|
export * from "./useGridNativeEventListener.js";
|
|
6
7
|
export * from "./useFirstRender.js";
|
|
7
8
|
export * from "./useOnMount.js";
|
|
8
|
-
export * from "./useRunOnce.js";
|
|
9
9
|
export * from "./useRunOncePerLoop.js";
|
|
10
10
|
export type { RenderProp } from '@mui/x-internals/useComponentRenderer';
|
package/hooks/utils/index.js
CHANGED
|
@@ -33,6 +33,18 @@ Object.defineProperty(exports, "useGridSelector", {
|
|
|
33
33
|
return _useGridSelector.useGridSelector;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
var _useRunOnce = require("@mui/x-internals/useRunOnce");
|
|
37
|
+
Object.keys(_useRunOnce).forEach(function (key) {
|
|
38
|
+
if (key === "default" || key === "__esModule") return;
|
|
39
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
40
|
+
if (key in exports && exports[key] === _useRunOnce[key]) return;
|
|
41
|
+
Object.defineProperty(exports, key, {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () {
|
|
44
|
+
return _useRunOnce[key];
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
});
|
|
36
48
|
var _useGridEvent = require("./useGridEvent");
|
|
37
49
|
var _useGridApiMethod = require("./useGridApiMethod");
|
|
38
50
|
Object.keys(_useGridApiMethod).forEach(function (key) {
|
|
@@ -95,18 +107,6 @@ Object.keys(_useOnMount).forEach(function (key) {
|
|
|
95
107
|
}
|
|
96
108
|
});
|
|
97
109
|
});
|
|
98
|
-
var _useRunOnce = require("./useRunOnce");
|
|
99
|
-
Object.keys(_useRunOnce).forEach(function (key) {
|
|
100
|
-
if (key === "default" || key === "__esModule") return;
|
|
101
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
102
|
-
if (key in exports && exports[key] === _useRunOnce[key]) return;
|
|
103
|
-
Object.defineProperty(exports, key, {
|
|
104
|
-
enumerable: true,
|
|
105
|
-
get: function () {
|
|
106
|
-
return _useRunOnce[key];
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
110
|
var _useRunOncePerLoop = require("./useRunOncePerLoop");
|
|
111
111
|
Object.keys(_useRunOncePerLoop).forEach(function (key) {
|
|
112
112
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from '@mui/x-internals/useFirstRender';
|
|
@@ -1,16 +1,16 @@
|
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
6
|
+
var _useFirstRender = require("@mui/x-internals/useFirstRender");
|
|
7
|
+
Object.keys(_useFirstRender).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _useFirstRender[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _useFirstRender[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
package/index.js
CHANGED
package/internals/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { GridBaseColumnHeaders } from "../components/columnHeaders/GridBaseColum
|
|
|
12
12
|
export { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from "../constants/defaultGridSlotsComponents.js";
|
|
13
13
|
export * from "../constants/signature.js";
|
|
14
14
|
export { vars } from "../constants/cssVariables.js";
|
|
15
|
+
export { useGridVirtualizer } from "../hooks/core/useGridVirtualizer.js";
|
|
15
16
|
export { propsStateInitializer } from "../hooks/core/useGridProps.js";
|
|
16
17
|
export { getGridFilter } from "../components/panel/filterPanel/GridFilterPanel.js";
|
|
17
18
|
export { getValueOptions } from "../components/panel/filterPanel/filterPanelUtils.js";
|
|
@@ -62,6 +63,8 @@ export { getRowIdFromRowModel, GRID_ID_AUTOGENERATED, getRowValue } from "../hoo
|
|
|
62
63
|
export { gridAdditionalRowGroupsSelector, gridPinnedRowsSelector, gridRowSelector } from "../hooks/features/rows/gridRowsSelector.js";
|
|
63
64
|
export { headerFilteringStateInitializer, useGridHeaderFiltering } from "../hooks/features/headerFiltering/useGridHeaderFiltering.js";
|
|
64
65
|
export { useGridRowSelection, rowSelectionStateInitializer } from "../hooks/features/rowSelection/useGridRowSelection.js";
|
|
66
|
+
export { gridIsRowDragActiveSelector } from "../hooks/features/rowReorder/gridRowReorderSelector.js";
|
|
67
|
+
export type { GridRowReorderState } from "../hooks/features/rowReorder/gridRowReorderInterfaces.js";
|
|
65
68
|
export { useGridRowSelectionPreProcessors } from "../hooks/features/rowSelection/useGridRowSelectionPreProcessors.js";
|
|
66
69
|
export { useGridSorting, sortingStateInitializer } from "../hooks/features/sorting/useGridSorting.js";
|
|
67
70
|
export type { GridSortingModelApplier } from "../hooks/features/sorting/gridSortingState.js";
|
|
@@ -72,7 +75,6 @@ export { dimensionsStateInitializer, useGridDimensions } from "../hooks/features
|
|
|
72
75
|
export * from "../hooks/features/dimensions/gridDimensionsSelectors.js";
|
|
73
76
|
export { useGridStatePersistence } from "../hooks/features/statePersistence/useGridStatePersistence.js";
|
|
74
77
|
export type { GridRestoreStatePreProcessingContext } from "../hooks/features/statePersistence/gridStatePersistenceInterface.js";
|
|
75
|
-
export { useGridVirtualScroller, EMPTY_DETAIL_PANELS } from "../hooks/features/virtualization/useGridVirtualScroller.js";
|
|
76
78
|
export * from "../hooks/features/virtualization/index.js";
|
|
77
79
|
export { useGridColumnResize, columnResizeStateInitializer } from "../hooks/features/columnResize/useGridColumnResize.js";
|
|
78
80
|
export { ROW_SELECTION_PROPAGATION_DEFAULT } from "../hooks/features/rowSelection/utils.js";
|
package/internals/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var _exportNames = {
|
|
|
14
14
|
GridBaseColumnHeaders: true,
|
|
15
15
|
DATA_GRID_DEFAULT_SLOTS_COMPONENTS: true,
|
|
16
16
|
vars: true,
|
|
17
|
+
useGridVirtualizer: true,
|
|
17
18
|
propsStateInitializer: true,
|
|
18
19
|
getGridFilter: true,
|
|
19
20
|
getValueOptions: true,
|
|
@@ -78,6 +79,7 @@ var _exportNames = {
|
|
|
78
79
|
useGridHeaderFiltering: true,
|
|
79
80
|
useGridRowSelection: true,
|
|
80
81
|
rowSelectionStateInitializer: true,
|
|
82
|
+
gridIsRowDragActiveSelector: true,
|
|
81
83
|
useGridRowSelectionPreProcessors: true,
|
|
82
84
|
useGridSorting: true,
|
|
83
85
|
sortingStateInitializer: true,
|
|
@@ -87,8 +89,6 @@ var _exportNames = {
|
|
|
87
89
|
dimensionsStateInitializer: true,
|
|
88
90
|
useGridDimensions: true,
|
|
89
91
|
useGridStatePersistence: true,
|
|
90
|
-
useGridVirtualScroller: true,
|
|
91
|
-
EMPTY_DETAIL_PANELS: true,
|
|
92
92
|
useGridColumnResize: true,
|
|
93
93
|
columnResizeStateInitializer: true,
|
|
94
94
|
ROW_SELECTION_PROPAGATION_DEFAULT: true,
|
|
@@ -139,12 +139,6 @@ Object.defineProperty(exports, "DataSourceRowsUpdateStrategy", {
|
|
|
139
139
|
return _utils2.DataSourceRowsUpdateStrategy;
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
|
-
Object.defineProperty(exports, "EMPTY_DETAIL_PANELS", {
|
|
143
|
-
enumerable: true,
|
|
144
|
-
get: function () {
|
|
145
|
-
return _useGridVirtualScroller.EMPTY_DETAIL_PANELS;
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
142
|
Object.defineProperty(exports, "GRID_DEFAULT_STRATEGY", {
|
|
149
143
|
enumerable: true,
|
|
150
144
|
get: function () {
|
|
@@ -427,6 +421,12 @@ Object.defineProperty(exports, "gridHeaderFilteringMenuSelector", {
|
|
|
427
421
|
return _gridHeaderFilteringSelectors.gridHeaderFilteringMenuSelector;
|
|
428
422
|
}
|
|
429
423
|
});
|
|
424
|
+
Object.defineProperty(exports, "gridIsRowDragActiveSelector", {
|
|
425
|
+
enumerable: true,
|
|
426
|
+
get: function () {
|
|
427
|
+
return _gridRowReorderSelector.gridIsRowDragActiveSelector;
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
430
|
Object.defineProperty(exports, "gridPinnedRowsSelector", {
|
|
431
431
|
enumerable: true,
|
|
432
432
|
get: function () {
|
|
@@ -793,10 +793,10 @@ Object.defineProperty(exports, "useGridStatePersistence", {
|
|
|
793
793
|
return _useGridStatePersistence.useGridStatePersistence;
|
|
794
794
|
}
|
|
795
795
|
});
|
|
796
|
-
Object.defineProperty(exports, "
|
|
796
|
+
Object.defineProperty(exports, "useGridVirtualizer", {
|
|
797
797
|
enumerable: true,
|
|
798
798
|
get: function () {
|
|
799
|
-
return
|
|
799
|
+
return _useGridVirtualizer.useGridVirtualizer;
|
|
800
800
|
}
|
|
801
801
|
});
|
|
802
802
|
Object.defineProperty(exports, "useGridVisibleRows", {
|
|
@@ -838,6 +838,7 @@ Object.keys(_signature).forEach(function (key) {
|
|
|
838
838
|
});
|
|
839
839
|
});
|
|
840
840
|
var _cssVariables = require("../constants/cssVariables");
|
|
841
|
+
var _useGridVirtualizer = require("../hooks/core/useGridVirtualizer");
|
|
841
842
|
var _useGridProps = require("../hooks/core/useGridProps");
|
|
842
843
|
var _GridFilterPanel = require("../components/panel/filterPanel/GridFilterPanel");
|
|
843
844
|
var _filterPanelUtils = require("../components/panel/filterPanel/filterPanelUtils");
|
|
@@ -911,6 +912,7 @@ var _useGridParamsApi = require("../hooks/features/rows/useGridParamsApi");
|
|
|
911
912
|
var _gridRowsSelector = require("../hooks/features/rows/gridRowsSelector");
|
|
912
913
|
var _useGridHeaderFiltering = require("../hooks/features/headerFiltering/useGridHeaderFiltering");
|
|
913
914
|
var _useGridRowSelection = require("../hooks/features/rowSelection/useGridRowSelection");
|
|
915
|
+
var _gridRowReorderSelector = require("../hooks/features/rowReorder/gridRowReorderSelector");
|
|
914
916
|
var _useGridRowSelectionPreProcessors = require("../hooks/features/rowSelection/useGridRowSelectionPreProcessors");
|
|
915
917
|
var _useGridSorting = require("../hooks/features/sorting/useGridSorting");
|
|
916
918
|
var _gridSortingSelector = require("../hooks/features/sorting/gridSortingSelector");
|
|
@@ -930,7 +932,6 @@ Object.keys(_gridDimensionsSelectors).forEach(function (key) {
|
|
|
930
932
|
});
|
|
931
933
|
});
|
|
932
934
|
var _useGridStatePersistence = require("../hooks/features/statePersistence/useGridStatePersistence");
|
|
933
|
-
var _useGridVirtualScroller = require("../hooks/features/virtualization/useGridVirtualScroller");
|
|
934
935
|
var _virtualization = require("../hooks/features/virtualization");
|
|
935
936
|
Object.keys(_virtualization).forEach(function (key) {
|
|
936
937
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -18,6 +18,11 @@ const getPinnedCellOffset = (pinnedPosition, computedWidth, columnIndex, columnP
|
|
|
18
18
|
pinnedOffset = undefined;
|
|
19
19
|
break;
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
// XXX: fix this properly
|
|
23
|
+
if (Number.isNaN(pinnedOffset)) {
|
|
24
|
+
pinnedOffset = undefined;
|
|
25
|
+
}
|
|
21
26
|
return pinnedOffset;
|
|
22
27
|
};
|
|
23
28
|
exports.getPinnedCellOffset = getPinnedCellOffset;
|
package/locales/frFR.js
CHANGED
|
@@ -9,8 +9,8 @@ const frFRGrid = {
|
|
|
9
9
|
// Root
|
|
10
10
|
noRowsLabel: 'Pas de résultats',
|
|
11
11
|
noResultsOverlayLabel: 'Aucun résultat.',
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
noColumnsOverlayLabel: 'Aucune colonne',
|
|
13
|
+
noColumnsOverlayManageColumns: 'Gérer les colonnes',
|
|
14
14
|
// emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
|
|
15
15
|
|
|
16
16
|
// Density selector toolbar button text
|
|
@@ -42,15 +42,13 @@ const frFRGrid = {
|
|
|
42
42
|
// toolbarPivot: 'Pivot',
|
|
43
43
|
|
|
44
44
|
// Toolbar AI Assistant button
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
toolbarAssistant: 'Assistant IA',
|
|
47
46
|
// Columns management text
|
|
48
47
|
columnsManagementSearchTitle: 'Rechercher',
|
|
49
48
|
columnsManagementNoColumns: 'Pas de colonnes',
|
|
50
49
|
columnsManagementShowHideAllText: 'Afficher/masquer toutes',
|
|
51
50
|
columnsManagementReset: 'Réinitialiser',
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
columnsManagementDeleteIconLabel: 'Effacer',
|
|
54
52
|
// Filter panel text
|
|
55
53
|
filterPanelAddFilter: 'Ajouter un filtre',
|
|
56
54
|
filterPanelRemoveAll: 'Tout supprimer',
|
|
@@ -106,15 +104,14 @@ const frFRGrid = {
|
|
|
106
104
|
'headerFilterOperator>=': 'Est supérieur ou égal à',
|
|
107
105
|
'headerFilterOperator<': 'Est inférieur à',
|
|
108
106
|
'headerFilterOperator<=': 'Est inférieur ou égal à',
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
headerFilterClear: 'Effacer le filtre',
|
|
111
108
|
// Filter values text
|
|
112
109
|
filterValueAny: 'tous',
|
|
113
110
|
filterValueTrue: 'vrai',
|
|
114
111
|
filterValueFalse: 'faux',
|
|
115
112
|
// Column menu text
|
|
116
113
|
columnMenuLabel: 'Menu',
|
|
117
|
-
|
|
114
|
+
columnMenuAriaLabel: columnName => `Menu pour la colonne ${columnName}`,
|
|
118
115
|
columnMenuShowColumns: 'Afficher les colonnes',
|
|
119
116
|
columnMenuManageColumns: 'Gérer les colonnes',
|
|
120
117
|
columnMenuFilter: 'Filtrer',
|
|
@@ -163,18 +160,18 @@ const frFRGrid = {
|
|
|
163
160
|
collapseDetailPanel: 'Masquer',
|
|
164
161
|
// Pagination
|
|
165
162
|
paginationRowsPerPage: 'Lignes par page :',
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
163
|
+
paginationDisplayedRows: ({
|
|
164
|
+
from,
|
|
165
|
+
to,
|
|
166
|
+
count,
|
|
167
|
+
estimated
|
|
168
|
+
}) => {
|
|
169
|
+
if (!estimated) {
|
|
170
|
+
return `${from}–${to} sur ${count !== -1 ? count : `plus de ${to}`}`;
|
|
171
|
+
}
|
|
172
|
+
const estimatedLabel = estimated && estimated > to ? `environ ${estimated}` : `plus de ${to}`;
|
|
173
|
+
return `${from}–${to} sur ${count !== -1 ? count : estimatedLabel}`;
|
|
174
|
+
},
|
|
178
175
|
paginationItemAriaLabel: type => {
|
|
179
176
|
if (type === 'first') {
|
|
180
177
|
return 'Aller à la première page';
|
package/locales/heIL.js
CHANGED
|
@@ -162,18 +162,18 @@ const heILGrid = {
|
|
|
162
162
|
collapseDetailPanel: 'כווץ',
|
|
163
163
|
// Pagination
|
|
164
164
|
paginationRowsPerPage: 'שורות בעמוד:',
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
165
|
+
paginationDisplayedRows: ({
|
|
166
|
+
from,
|
|
167
|
+
to,
|
|
168
|
+
count,
|
|
169
|
+
estimated
|
|
170
|
+
}) => {
|
|
171
|
+
if (!estimated) {
|
|
172
|
+
return `${from}-${to} מתוך ${count !== -1 ? count : `יותר מ־${to}`}`;
|
|
173
|
+
}
|
|
174
|
+
const estimatedLabel = estimated && estimated > to ? `כ־${estimated}` : `יותר מ־${to}`;
|
|
175
|
+
return `${from}-${to} מתוך ${count !== -1 ? count : estimatedLabel}`;
|
|
176
|
+
},
|
|
177
177
|
paginationItemAriaLabel: type => {
|
|
178
178
|
if (type === 'first') {
|
|
179
179
|
return 'לעמוד הראשון';
|