@depup/react-virtualized 9.22.6-depup.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/LICENSE +22 -0
- package/README.md +34 -0
- package/changes.json +22 -0
- package/dist/commonjs/ArrowKeyStepper/ArrowKeyStepper.example.js +184 -0
- package/dist/commonjs/ArrowKeyStepper/ArrowKeyStepper.jest.js +338 -0
- package/dist/commonjs/ArrowKeyStepper/ArrowKeyStepper.js +204 -0
- package/dist/commonjs/ArrowKeyStepper/index.js +19 -0
- package/dist/commonjs/ArrowKeyStepper/types.js +5 -0
- package/dist/commonjs/AutoSizer/AutoSizer.example.js +104 -0
- package/dist/commonjs/AutoSizer/AutoSizer.jest.js +341 -0
- package/dist/commonjs/AutoSizer/AutoSizer.js +199 -0
- package/dist/commonjs/AutoSizer/AutoSizer.ssr.js +25 -0
- package/dist/commonjs/AutoSizer/index.js +19 -0
- package/dist/commonjs/CellMeasurer/CellMeasurer.DynamicHeightGrid.example.js +100 -0
- package/dist/commonjs/CellMeasurer/CellMeasurer.DynamicHeightList.example.js +99 -0
- package/dist/commonjs/CellMeasurer/CellMeasurer.DynamicHeightTableColumn.example.js +107 -0
- package/dist/commonjs/CellMeasurer/CellMeasurer.DynamicWidthGrid.example.js +102 -0
- package/dist/commonjs/CellMeasurer/CellMeasurer.DynamicWidthMultiGrid.example.js +107 -0
- package/dist/commonjs/CellMeasurer/CellMeasurer.example.js +129 -0
- package/dist/commonjs/CellMeasurer/CellMeasurer.jest.js +345 -0
- package/dist/commonjs/CellMeasurer/CellMeasurer.js +195 -0
- package/dist/commonjs/CellMeasurer/CellMeasurerCache.jest.js +298 -0
- package/dist/commonjs/CellMeasurer/CellMeasurerCache.js +202 -0
- package/dist/commonjs/CellMeasurer/index.js +22 -0
- package/dist/commonjs/CellMeasurer/types.js +14 -0
- package/dist/commonjs/Collection/Collection.example.js +231 -0
- package/dist/commonjs/Collection/Collection.jest.js +829 -0
- package/dist/commonjs/Collection/Collection.js +266 -0
- package/dist/commonjs/Collection/CollectionView.js +553 -0
- package/dist/commonjs/Collection/Section.jest.js +63 -0
- package/dist/commonjs/Collection/Section.js +57 -0
- package/dist/commonjs/Collection/SectionManager.jest.js +121 -0
- package/dist/commonjs/Collection/SectionManager.js +134 -0
- package/dist/commonjs/Collection/TestData.js +77 -0
- package/dist/commonjs/Collection/index.js +15 -0
- package/dist/commonjs/Collection/types.js +22 -0
- package/dist/commonjs/Collection/utils/calculateSizeAndPositionData.jest.js +34 -0
- package/dist/commonjs/Collection/utils/calculateSizeAndPositionData.js +38 -0
- package/dist/commonjs/ColumnSizer/ColumnSizer.example.js +159 -0
- package/dist/commonjs/ColumnSizer/ColumnSizer.jest.js +129 -0
- package/dist/commonjs/ColumnSizer/ColumnSizer.js +103 -0
- package/dist/commonjs/ColumnSizer/index.js +15 -0
- package/dist/commonjs/Grid/Grid.example.js +330 -0
- package/dist/commonjs/Grid/Grid.jest.js +2561 -0
- package/dist/commonjs/Grid/Grid.js +1432 -0
- package/dist/commonjs/Grid/Grid.ssr.js +62 -0
- package/dist/commonjs/Grid/accessibilityOverscanIndicesGetter.jest.js +92 -0
- package/dist/commonjs/Grid/accessibilityOverscanIndicesGetter.js +40 -0
- package/dist/commonjs/Grid/defaultCellRangeRenderer.js +139 -0
- package/dist/commonjs/Grid/defaultOverscanIndicesGetter.jest.js +92 -0
- package/dist/commonjs/Grid/defaultOverscanIndicesGetter.js +36 -0
- package/dist/commonjs/Grid/index.js +40 -0
- package/dist/commonjs/Grid/types.js +8 -0
- package/dist/commonjs/Grid/utils/CellSizeAndPositionManager.jest.js +375 -0
- package/dist/commonjs/Grid/utils/CellSizeAndPositionManager.js +296 -0
- package/dist/commonjs/Grid/utils/ScalingCellSizeAndPositionManager.jest.js +201 -0
- package/dist/commonjs/Grid/utils/ScalingCellSizeAndPositionManager.js +204 -0
- package/dist/commonjs/Grid/utils/calculateSizeAndPositionDataAndUpdateScrollOffset.jest.js +84 -0
- package/dist/commonjs/Grid/utils/calculateSizeAndPositionDataAndUpdateScrollOffset.js +59 -0
- package/dist/commonjs/Grid/utils/maxElementSize.js +22 -0
- package/dist/commonjs/Grid/utils/updateScrollIndexHelper.jest.js +180 -0
- package/dist/commonjs/Grid/utils/updateScrollIndexHelper.js +85 -0
- package/dist/commonjs/InfiniteLoader/InfiniteLoader.example.js +179 -0
- package/dist/commonjs/InfiniteLoader/InfiniteLoader.jest.js +571 -0
- package/dist/commonjs/InfiniteLoader/InfiniteLoader.js +274 -0
- package/dist/commonjs/InfiniteLoader/index.js +15 -0
- package/dist/commonjs/List/List.example.js +236 -0
- package/dist/commonjs/List/List.jest.js +517 -0
- package/dist/commonjs/List/List.js +318 -0
- package/dist/commonjs/List/index.js +19 -0
- package/dist/commonjs/List/types.js +6 -0
- package/dist/commonjs/Masonry/Masonry.example.js +287 -0
- package/dist/commonjs/Masonry/Masonry.jest.js +450 -0
- package/dist/commonjs/Masonry/Masonry.js +431 -0
- package/dist/commonjs/Masonry/PositionCache.js +88 -0
- package/dist/commonjs/Masonry/createCellPositioner.js +59 -0
- package/dist/commonjs/Masonry/index.js +22 -0
- package/dist/commonjs/MultiGrid/CellMeasurerCacheDecorator.js +106 -0
- package/dist/commonjs/MultiGrid/MultiGrid.example.js +131 -0
- package/dist/commonjs/MultiGrid/MultiGrid.jest.js +584 -0
- package/dist/commonjs/MultiGrid/MultiGrid.js +743 -0
- package/dist/commonjs/MultiGrid/index.js +15 -0
- package/dist/commonjs/ScrollSync/ScrollSync.example.js +257 -0
- package/dist/commonjs/ScrollSync/ScrollSync.jest.js +66 -0
- package/dist/commonjs/ScrollSync/ScrollSync.js +88 -0
- package/dist/commonjs/ScrollSync/index.js +15 -0
- package/dist/commonjs/Table/Column.jest.js +90 -0
- package/dist/commonjs/Table/Column.js +93 -0
- package/dist/commonjs/Table/SortDirection.js +19 -0
- package/dist/commonjs/Table/SortIndicator.js +40 -0
- package/dist/commonjs/Table/Table.example.js +325 -0
- package/dist/commonjs/Table/Table.jest.js +1257 -0
- package/dist/commonjs/Table/Table.js +742 -0
- package/dist/commonjs/Table/createMultiSort.jest.js +165 -0
- package/dist/commonjs/Table/createMultiSort.js +99 -0
- package/dist/commonjs/Table/defaultCellDataGetter.js +21 -0
- package/dist/commonjs/Table/defaultCellRenderer.js +19 -0
- package/dist/commonjs/Table/defaultHeaderRenderer.js +35 -0
- package/dist/commonjs/Table/defaultHeaderRowRenderer.js +21 -0
- package/dist/commonjs/Table/defaultRowRenderer.js +87 -0
- package/dist/commonjs/Table/index.js +78 -0
- package/dist/commonjs/Table/types.js +39 -0
- package/dist/commonjs/WindowScroller/WindowScroller.e2e.js +298 -0
- package/dist/commonjs/WindowScroller/WindowScroller.example.js +167 -0
- package/dist/commonjs/WindowScroller/WindowScroller.header-resize.e2e.js +359 -0
- package/dist/commonjs/WindowScroller/WindowScroller.jest.js +536 -0
- package/dist/commonjs/WindowScroller/WindowScroller.js +268 -0
- package/dist/commonjs/WindowScroller/WindowScroller.ssr.js +25 -0
- package/dist/commonjs/WindowScroller/index.js +23 -0
- package/dist/commonjs/WindowScroller/utils/dimensions.js +89 -0
- package/dist/commonjs/WindowScroller/utils/onScroll.js +70 -0
- package/dist/commonjs/index.js +180 -0
- package/dist/commonjs/jest-setup.js +7 -0
- package/dist/commonjs/utils/TestHelper.js +36 -0
- package/dist/commonjs/utils/animationFrame.js +29 -0
- package/dist/commonjs/utils/createCallbackMemoizer.jest.js +219 -0
- package/dist/commonjs/utils/createCallbackMemoizer.js +31 -0
- package/dist/commonjs/utils/getUpdatedOffsetForIndex.jest.js +68 -0
- package/dist/commonjs/utils/getUpdatedOffsetForIndex.js +38 -0
- package/dist/commonjs/utils/initCellMetadata.js +37 -0
- package/dist/commonjs/utils/requestAnimationTimeout.js +38 -0
- package/dist/commonjs/vendor/binarySearchBounds.js +200 -0
- package/dist/commonjs/vendor/detectElementResize.js +192 -0
- package/dist/commonjs/vendor/intervalTree.js +361 -0
- package/dist/es/ArrowKeyStepper/ArrowKeyStepper.example.js +176 -0
- package/dist/es/ArrowKeyStepper/ArrowKeyStepper.jest.js +332 -0
- package/dist/es/ArrowKeyStepper/ArrowKeyStepper.js +197 -0
- package/dist/es/ArrowKeyStepper/index.js +3 -0
- package/dist/es/ArrowKeyStepper/types.js +4 -0
- package/dist/es/AutoSizer/AutoSizer.example.js +96 -0
- package/dist/es/AutoSizer/AutoSizer.jest.js +335 -0
- package/dist/es/AutoSizer/AutoSizer.js +190 -0
- package/dist/es/AutoSizer/AutoSizer.js.flow +200 -0
- package/dist/es/AutoSizer/AutoSizer.ssr.js +19 -0
- package/dist/es/AutoSizer/index.js +2 -0
- package/dist/es/AutoSizer/index.js.flow +4 -0
- package/dist/es/CellMeasurer/CellMeasurer.DynamicHeightGrid.example.js +91 -0
- package/dist/es/CellMeasurer/CellMeasurer.DynamicHeightList.example.js +90 -0
- package/dist/es/CellMeasurer/CellMeasurer.DynamicHeightTableColumn.example.js +98 -0
- package/dist/es/CellMeasurer/CellMeasurer.DynamicWidthGrid.example.js +93 -0
- package/dist/es/CellMeasurer/CellMeasurer.DynamicWidthMultiGrid.example.js +98 -0
- package/dist/es/CellMeasurer/CellMeasurer.example.js +120 -0
- package/dist/es/CellMeasurer/CellMeasurer.jest.js +340 -0
- package/dist/es/CellMeasurer/CellMeasurer.js +187 -0
- package/dist/es/CellMeasurer/CellMeasurerCache.jest.js +293 -0
- package/dist/es/CellMeasurer/CellMeasurerCache.js +196 -0
- package/dist/es/CellMeasurer/index.js +4 -0
- package/dist/es/CellMeasurer/types.js +13 -0
- package/dist/es/Collection/Collection.example.js +223 -0
- package/dist/es/Collection/Collection.jest.js +824 -0
- package/dist/es/Collection/Collection.js +257 -0
- package/dist/es/Collection/CollectionView.js +544 -0
- package/dist/es/Collection/Section.jest.js +60 -0
- package/dist/es/Collection/Section.js +51 -0
- package/dist/es/Collection/SectionManager.jest.js +118 -0
- package/dist/es/Collection/SectionManager.js +128 -0
- package/dist/es/Collection/TestData.js +71 -0
- package/dist/es/Collection/index.js +3 -0
- package/dist/es/Collection/types.js +21 -0
- package/dist/es/Collection/utils/calculateSizeAndPositionData.jest.js +31 -0
- package/dist/es/Collection/utils/calculateSizeAndPositionData.js +31 -0
- package/dist/es/ColumnSizer/ColumnSizer.example.js +150 -0
- package/dist/es/ColumnSizer/ColumnSizer.jest.js +123 -0
- package/dist/es/ColumnSizer/ColumnSizer.js +95 -0
- package/dist/es/ColumnSizer/index.js +3 -0
- package/dist/es/Grid/Grid.example.js +321 -0
- package/dist/es/Grid/Grid.jest.js +2555 -0
- package/dist/es/Grid/Grid.js +1425 -0
- package/dist/es/Grid/Grid.ssr.js +57 -0
- package/dist/es/Grid/accessibilityOverscanIndicesGetter.jest.js +87 -0
- package/dist/es/Grid/accessibilityOverscanIndicesGetter.js +33 -0
- package/dist/es/Grid/defaultCellRangeRenderer.js +134 -0
- package/dist/es/Grid/defaultOverscanIndicesGetter.jest.js +87 -0
- package/dist/es/Grid/defaultOverscanIndicesGetter.js +29 -0
- package/dist/es/Grid/index.js +15 -0
- package/dist/es/Grid/types.js +96 -0
- package/dist/es/Grid/utils/CellSizeAndPositionManager.jest.js +372 -0
- package/dist/es/Grid/utils/CellSizeAndPositionManager.js +290 -0
- package/dist/es/Grid/utils/ScalingCellSizeAndPositionManager.jest.js +198 -0
- package/dist/es/Grid/utils/ScalingCellSizeAndPositionManager.js +198 -0
- package/dist/es/Grid/utils/calculateSizeAndPositionDataAndUpdateScrollOffset.jest.js +81 -0
- package/dist/es/Grid/utils/calculateSizeAndPositionDataAndUpdateScrollOffset.js +53 -0
- package/dist/es/Grid/utils/maxElementSize.js +16 -0
- package/dist/es/Grid/utils/updateScrollIndexHelper.jest.js +174 -0
- package/dist/es/Grid/utils/updateScrollIndexHelper.js +79 -0
- package/dist/es/InfiniteLoader/InfiniteLoader.example.js +170 -0
- package/dist/es/InfiniteLoader/InfiniteLoader.jest.js +565 -0
- package/dist/es/InfiniteLoader/InfiniteLoader.js +263 -0
- package/dist/es/InfiniteLoader/index.js +3 -0
- package/dist/es/List/List.example.js +227 -0
- package/dist/es/List/List.jest.js +511 -0
- package/dist/es/List/List.js +312 -0
- package/dist/es/List/index.js +3 -0
- package/dist/es/List/types.js +21 -0
- package/dist/es/Masonry/Masonry.example.js +278 -0
- package/dist/es/Masonry/Masonry.jest.js +444 -0
- package/dist/es/Masonry/Masonry.js +421 -0
- package/dist/es/Masonry/PositionCache.js +82 -0
- package/dist/es/Masonry/createCellPositioner.js +53 -0
- package/dist/es/Masonry/index.js +4 -0
- package/dist/es/MultiGrid/CellMeasurerCacheDecorator.js +100 -0
- package/dist/es/MultiGrid/MultiGrid.example.js +122 -0
- package/dist/es/MultiGrid/MultiGrid.jest.js +579 -0
- package/dist/es/MultiGrid/MultiGrid.js +733 -0
- package/dist/es/MultiGrid/index.js +3 -0
- package/dist/es/ScrollSync/ScrollSync.example.js +248 -0
- package/dist/es/ScrollSync/ScrollSync.jest.js +60 -0
- package/dist/es/ScrollSync/ScrollSync.js +80 -0
- package/dist/es/ScrollSync/index.js +3 -0
- package/dist/es/Table/Column.jest.js +84 -0
- package/dist/es/Table/Column.js +85 -0
- package/dist/es/Table/SortDirection.js +13 -0
- package/dist/es/Table/SortIndicator.js +31 -0
- package/dist/es/Table/Table.example.js +316 -0
- package/dist/es/Table/Table.jest.js +1251 -0
- package/dist/es/Table/Table.js +735 -0
- package/dist/es/Table/createMultiSort.jest.js +162 -0
- package/dist/es/Table/createMultiSort.js +93 -0
- package/dist/es/Table/defaultCellDataGetter.js +15 -0
- package/dist/es/Table/defaultCellRenderer.js +13 -0
- package/dist/es/Table/defaultHeaderRenderer.js +25 -0
- package/dist/es/Table/defaultHeaderRowRenderer.js +12 -0
- package/dist/es/Table/defaultRowRenderer.js +77 -0
- package/dist/es/Table/index.js +12 -0
- package/dist/es/Table/types.js +38 -0
- package/dist/es/WindowScroller/WindowScroller.e2e.js +295 -0
- package/dist/es/WindowScroller/WindowScroller.example.js +158 -0
- package/dist/es/WindowScroller/WindowScroller.header-resize.e2e.js +356 -0
- package/dist/es/WindowScroller/WindowScroller.jest.js +530 -0
- package/dist/es/WindowScroller/WindowScroller.js +259 -0
- package/dist/es/WindowScroller/WindowScroller.js.flow +277 -0
- package/dist/es/WindowScroller/WindowScroller.ssr.js +19 -0
- package/dist/es/WindowScroller/index.js +3 -0
- package/dist/es/WindowScroller/index.js.flow +6 -0
- package/dist/es/WindowScroller/utils/dimensions.js +81 -0
- package/dist/es/WindowScroller/utils/dimensions.js.flow +91 -0
- package/dist/es/WindowScroller/utils/onScroll.js +64 -0
- package/dist/es/WindowScroller/utils/onScroll.js.flow +94 -0
- package/dist/es/index.js +13 -0
- package/dist/es/jest-setup.js +5 -0
- package/dist/es/utils/TestHelper.js +30 -0
- package/dist/es/utils/animationFrame.js +23 -0
- package/dist/es/utils/createCallbackMemoizer.jest.js +216 -0
- package/dist/es/utils/createCallbackMemoizer.js +25 -0
- package/dist/es/utils/getUpdatedOffsetForIndex.jest.js +65 -0
- package/dist/es/utils/getUpdatedOffsetForIndex.js +32 -0
- package/dist/es/utils/initCellMetadata.js +31 -0
- package/dist/es/utils/requestAnimationTimeout.js +32 -0
- package/dist/es/vendor/binarySearchBounds.js +194 -0
- package/dist/es/vendor/detectElementResize.js +186 -0
- package/dist/es/vendor/intervalTree.js +354 -0
- package/dist/umd/react-virtualized.js +4638 -0
- package/package.json +188 -0
- package/styles.css +80 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import CellMeasurerCache, { DEFAULT_HEIGHT, DEFAULT_WIDTH } from './CellMeasurerCache';
|
|
2
|
+
describe('CellMeasurerCache', function () {
|
|
3
|
+
it('should override defaultHeight/defaultWidth if minHeight/minWidth are greater', function () {
|
|
4
|
+
var cache = new CellMeasurerCache({
|
|
5
|
+
defaultHeight: 20,
|
|
6
|
+
defaultWidth: 100,
|
|
7
|
+
fixedHeight: true,
|
|
8
|
+
fixedWidth: true,
|
|
9
|
+
minHeight: 30,
|
|
10
|
+
minWidth: 150
|
|
11
|
+
});
|
|
12
|
+
cache.set(0, 0, 50, 10);
|
|
13
|
+
expect(cache.getHeight(0, 0)).toBe(30);
|
|
14
|
+
expect(cache.getWidth(0, 0)).toBe(150);
|
|
15
|
+
expect(cache.rowHeight({
|
|
16
|
+
index: 0
|
|
17
|
+
})).toBe(30);
|
|
18
|
+
expect(cache.columnWidth({
|
|
19
|
+
index: 0
|
|
20
|
+
})).toBe(150);
|
|
21
|
+
});
|
|
22
|
+
it('should correctly report cache status', function () {
|
|
23
|
+
var cache = new CellMeasurerCache({
|
|
24
|
+
fixedHeight: true,
|
|
25
|
+
fixedWidth: true
|
|
26
|
+
});
|
|
27
|
+
expect(cache.has(0, 0)).toBe(false);
|
|
28
|
+
});
|
|
29
|
+
it('should cache cells', function () {
|
|
30
|
+
var cache = new CellMeasurerCache({
|
|
31
|
+
fixedHeight: true,
|
|
32
|
+
fixedWidth: true
|
|
33
|
+
});
|
|
34
|
+
cache.set(0, 0, 100, 20);
|
|
35
|
+
expect(cache.has(0, 0)).toBe(true);
|
|
36
|
+
});
|
|
37
|
+
it('should return the correct default sizes for uncached cells if specified', function () {
|
|
38
|
+
spyOn(console, 'warn'); // Ignore warning about variable width and height
|
|
39
|
+
|
|
40
|
+
var cache = new CellMeasurerCache({
|
|
41
|
+
defaultHeight: 20,
|
|
42
|
+
defaultWidth: 100,
|
|
43
|
+
minHeight: 15,
|
|
44
|
+
minWidth: 80
|
|
45
|
+
});
|
|
46
|
+
expect(cache.getWidth(0, 0)).toBe(100);
|
|
47
|
+
expect(cache.getHeight(0, 0)).toBe(20);
|
|
48
|
+
cache.set(0, 0, 70, 10);
|
|
49
|
+
expect(cache.getWidth(0, 0)).toBe(80);
|
|
50
|
+
expect(cache.getHeight(0, 0)).toBe(15);
|
|
51
|
+
});
|
|
52
|
+
it('should clear a single cached cell', function () {
|
|
53
|
+
var cache = new CellMeasurerCache({
|
|
54
|
+
fixedHeight: true,
|
|
55
|
+
fixedWidth: true
|
|
56
|
+
});
|
|
57
|
+
cache.set(0, 0, 100, 20);
|
|
58
|
+
cache.set(1, 0, 100, 20);
|
|
59
|
+
expect(cache.has(0, 0)).toBe(true);
|
|
60
|
+
expect(cache.has(1, 0)).toBe(true);
|
|
61
|
+
cache.clear(0, 0);
|
|
62
|
+
expect(cache.has(0, 0)).toBe(false);
|
|
63
|
+
expect(cache.has(1, 0)).toBe(true);
|
|
64
|
+
});
|
|
65
|
+
it('should clear a single cached row cell in column 0 when columnIndex param is absent', function () {
|
|
66
|
+
var cache = new CellMeasurerCache({
|
|
67
|
+
fixedHeight: true,
|
|
68
|
+
fixedWidth: true
|
|
69
|
+
});
|
|
70
|
+
cache.set(0, 0, 100, 20);
|
|
71
|
+
cache.set(1, 0, 100, 20);
|
|
72
|
+
expect(cache.has(0, 0)).toBe(true);
|
|
73
|
+
expect(cache.has(1, 0)).toBe(true);
|
|
74
|
+
cache.clear(0);
|
|
75
|
+
expect(cache.has(0, 0)).toBe(false);
|
|
76
|
+
expect(cache.has(1, 0)).toBe(true);
|
|
77
|
+
});
|
|
78
|
+
it('should clear all cached cells', function () {
|
|
79
|
+
var cache = new CellMeasurerCache({
|
|
80
|
+
fixedHeight: true,
|
|
81
|
+
fixedWidth: true
|
|
82
|
+
});
|
|
83
|
+
cache.set(0, 0, 100, 20);
|
|
84
|
+
cache.set(1, 0, 100, 20);
|
|
85
|
+
expect(cache.has(0, 0)).toBe(true);
|
|
86
|
+
expect(cache.has(1, 0)).toBe(true);
|
|
87
|
+
cache.clearAll();
|
|
88
|
+
expect(cache.has(0, 0)).toBe(false);
|
|
89
|
+
expect(cache.has(1, 0)).toBe(false);
|
|
90
|
+
});
|
|
91
|
+
it('should clear row and column counts when clearing all cells', function () {
|
|
92
|
+
var cache = new CellMeasurerCache({
|
|
93
|
+
fixedHeight: true,
|
|
94
|
+
fixedWidth: true
|
|
95
|
+
});
|
|
96
|
+
cache.set(0, 0, 100, 20);
|
|
97
|
+
cache.set(1, 0, 100, 20);
|
|
98
|
+
expect(cache._rowCount).toBe(2);
|
|
99
|
+
expect(cache._columnCount).toBe(1);
|
|
100
|
+
cache.clearAll();
|
|
101
|
+
expect(cache._rowCount).toBe(0);
|
|
102
|
+
expect(cache._columnCount).toBe(0);
|
|
103
|
+
});
|
|
104
|
+
it('should support a custom :keyMapper', function () {
|
|
105
|
+
var keyMapper = jest.fn();
|
|
106
|
+
keyMapper.mockReturnValue('a');
|
|
107
|
+
spyOn(console, 'warn'); // Ignore warning about variable width and height
|
|
108
|
+
|
|
109
|
+
var cache = new CellMeasurerCache({
|
|
110
|
+
defaultHeight: 30,
|
|
111
|
+
defaultWidth: 50,
|
|
112
|
+
keyMapper: keyMapper
|
|
113
|
+
});
|
|
114
|
+
cache.set(0, 0, 100, 20);
|
|
115
|
+
expect(cache.has(0, 0)).toBe(true);
|
|
116
|
+
|
|
117
|
+
// Changing the returned key should cause cache misses
|
|
118
|
+
keyMapper.mockReset();
|
|
119
|
+
keyMapper.mockReturnValue('b');
|
|
120
|
+
expect(cache.has(0, 0)).toBe(false);
|
|
121
|
+
expect(cache.columnWidth(0)).toBe(50);
|
|
122
|
+
expect(cache.rowHeight(0)).toBe(30);
|
|
123
|
+
expect(keyMapper.mock.calls).toHaveLength(3);
|
|
124
|
+
|
|
125
|
+
// Restoring it should fix
|
|
126
|
+
keyMapper.mockReset();
|
|
127
|
+
keyMapper.mockReturnValue('a');
|
|
128
|
+
expect(cache.has(0, 0)).toBe(true);
|
|
129
|
+
expect(cache.columnWidth(0)).toBe(100);
|
|
130
|
+
expect(cache.rowHeight(0)).toBe(20);
|
|
131
|
+
expect(keyMapper.mock.calls).toHaveLength(3);
|
|
132
|
+
});
|
|
133
|
+
it('should provide a Grid-compatible :columnWidth method', function () {
|
|
134
|
+
var cache = new CellMeasurerCache({
|
|
135
|
+
fixedHeight: true
|
|
136
|
+
});
|
|
137
|
+
expect(cache.columnWidth({
|
|
138
|
+
index: 0
|
|
139
|
+
})).toBe(DEFAULT_WIDTH);
|
|
140
|
+
cache.set(0, 0, 100, 50);
|
|
141
|
+
expect(cache.columnWidth({
|
|
142
|
+
index: 0
|
|
143
|
+
})).toBe(100);
|
|
144
|
+
expect(cache.columnWidth({
|
|
145
|
+
index: 1
|
|
146
|
+
})).toBe(DEFAULT_WIDTH);
|
|
147
|
+
cache.set(1, 0, 75, 50);
|
|
148
|
+
expect(cache.columnWidth({
|
|
149
|
+
index: 0
|
|
150
|
+
})).toBe(100);
|
|
151
|
+
cache.set(2, 0, 125, 50);
|
|
152
|
+
expect(cache.columnWidth({
|
|
153
|
+
index: 0
|
|
154
|
+
})).toBe(125);
|
|
155
|
+
});
|
|
156
|
+
it('should provide a Grid-compatible :rowHeight method', function () {
|
|
157
|
+
var cache = new CellMeasurerCache({
|
|
158
|
+
fixedWidth: true
|
|
159
|
+
});
|
|
160
|
+
expect(cache.rowHeight({
|
|
161
|
+
index: 0
|
|
162
|
+
})).toBe(DEFAULT_HEIGHT);
|
|
163
|
+
cache.set(0, 0, 100, 50);
|
|
164
|
+
expect(cache.rowHeight({
|
|
165
|
+
index: 0
|
|
166
|
+
})).toBe(50);
|
|
167
|
+
expect(cache.rowHeight({
|
|
168
|
+
index: 1
|
|
169
|
+
})).toBe(DEFAULT_HEIGHT);
|
|
170
|
+
cache.set(0, 1, 100, 25);
|
|
171
|
+
expect(cache.rowHeight({
|
|
172
|
+
index: 0
|
|
173
|
+
})).toBe(50);
|
|
174
|
+
cache.set(0, 2, 100, 75);
|
|
175
|
+
expect(cache.rowHeight({
|
|
176
|
+
index: 0
|
|
177
|
+
})).toBe(75);
|
|
178
|
+
});
|
|
179
|
+
it('should return the :defaultWidth for :columnWidth if not measured', function () {
|
|
180
|
+
var cache = new CellMeasurerCache({
|
|
181
|
+
defaultWidth: 25,
|
|
182
|
+
fixedHeight: true,
|
|
183
|
+
fixedWidth: true
|
|
184
|
+
});
|
|
185
|
+
expect(cache.columnWidth({
|
|
186
|
+
index: 0
|
|
187
|
+
})).toBe(25);
|
|
188
|
+
});
|
|
189
|
+
it('should return the :defaultHeight for :rowHeight if not measured', function () {
|
|
190
|
+
var cache = new CellMeasurerCache({
|
|
191
|
+
defaultHeight: 25,
|
|
192
|
+
fixedHeight: true,
|
|
193
|
+
fixedWidth: true
|
|
194
|
+
});
|
|
195
|
+
expect(cache.rowHeight({
|
|
196
|
+
index: 0
|
|
197
|
+
})).toBe(25);
|
|
198
|
+
});
|
|
199
|
+
it('should recalculate cached :columnWidth when cells are cleared', function () {
|
|
200
|
+
var cache = new CellMeasurerCache({
|
|
201
|
+
fixedHeight: true
|
|
202
|
+
});
|
|
203
|
+
expect(cache.columnWidth({
|
|
204
|
+
index: 0
|
|
205
|
+
})).toBe(DEFAULT_WIDTH);
|
|
206
|
+
cache.set(0, 0, 125, 50);
|
|
207
|
+
expect(cache.columnWidth({
|
|
208
|
+
index: 0
|
|
209
|
+
})).toBe(125);
|
|
210
|
+
cache.set(1, 0, 150, 50);
|
|
211
|
+
expect(cache.columnWidth({
|
|
212
|
+
index: 0
|
|
213
|
+
})).toBe(150);
|
|
214
|
+
cache.clear(1, 0);
|
|
215
|
+
expect(cache.columnWidth({
|
|
216
|
+
index: 0
|
|
217
|
+
})).toBe(125);
|
|
218
|
+
cache.clear(0, 0);
|
|
219
|
+
expect(cache.columnWidth({
|
|
220
|
+
index: 0
|
|
221
|
+
})).toBe(DEFAULT_WIDTH);
|
|
222
|
+
cache.set(0, 0, 125, 50);
|
|
223
|
+
expect(cache.columnWidth({
|
|
224
|
+
index: 0
|
|
225
|
+
})).toBe(125);
|
|
226
|
+
cache.clearAll();
|
|
227
|
+
expect(cache.columnWidth({
|
|
228
|
+
index: 0
|
|
229
|
+
})).toBe(DEFAULT_WIDTH);
|
|
230
|
+
});
|
|
231
|
+
it('should recalculate cached :rowHeight when cells are cleared', function () {
|
|
232
|
+
var cache = new CellMeasurerCache({
|
|
233
|
+
fixedWidth: true
|
|
234
|
+
});
|
|
235
|
+
expect(cache.rowHeight({
|
|
236
|
+
index: 0
|
|
237
|
+
})).toBe(DEFAULT_HEIGHT);
|
|
238
|
+
cache.set(0, 0, 125, 50);
|
|
239
|
+
expect(cache.rowHeight({
|
|
240
|
+
index: 0
|
|
241
|
+
})).toBe(50);
|
|
242
|
+
cache.set(0, 1, 150, 75);
|
|
243
|
+
expect(cache.rowHeight({
|
|
244
|
+
index: 0
|
|
245
|
+
})).toBe(75);
|
|
246
|
+
cache.clear(0, 1);
|
|
247
|
+
expect(cache.rowHeight({
|
|
248
|
+
index: 0
|
|
249
|
+
})).toBe(50);
|
|
250
|
+
cache.clear(0, 0);
|
|
251
|
+
expect(cache.rowHeight({
|
|
252
|
+
index: 0
|
|
253
|
+
})).toBe(DEFAULT_HEIGHT);
|
|
254
|
+
cache.set(0, 0, 125, 50);
|
|
255
|
+
expect(cache.rowHeight({
|
|
256
|
+
index: 0
|
|
257
|
+
})).toBe(50);
|
|
258
|
+
cache.clearAll();
|
|
259
|
+
expect(cache.rowHeight({
|
|
260
|
+
index: 0
|
|
261
|
+
})).toBe(DEFAULT_HEIGHT);
|
|
262
|
+
});
|
|
263
|
+
describe('DEV mode', function () {
|
|
264
|
+
it('should warn about dynamic width and height configurations', function () {
|
|
265
|
+
spyOn(console, 'warn');
|
|
266
|
+
var cache = new CellMeasurerCache({
|
|
267
|
+
fixedHeight: false,
|
|
268
|
+
fixedWidth: false
|
|
269
|
+
});
|
|
270
|
+
expect(cache.hasFixedHeight()).toBe(false);
|
|
271
|
+
expect(cache.hasFixedWidth()).toBe(false);
|
|
272
|
+
expect(console.warn).toHaveBeenCalledWith("CellMeasurerCache should only measure a cell's width or height. " + 'You have configured CellMeasurerCache to measure both. ' + 'This will result in poor performance.');
|
|
273
|
+
});
|
|
274
|
+
it('should warn about dynamic width with a defaultWidth of 0', function () {
|
|
275
|
+
spyOn(console, 'warn');
|
|
276
|
+
var cache = new CellMeasurerCache({
|
|
277
|
+
defaultWidth: 0,
|
|
278
|
+
fixedHeight: true
|
|
279
|
+
});
|
|
280
|
+
expect(cache.getWidth(0, 0)).toBe(0);
|
|
281
|
+
expect(console.warn).toHaveBeenCalledWith('Fixed width CellMeasurerCache should specify a :defaultWidth greater than 0. ' + 'Failing to do so will lead to unnecessary layout and poor performance.');
|
|
282
|
+
});
|
|
283
|
+
it('should warn about dynamic height with a defaultHeight of 0', function () {
|
|
284
|
+
spyOn(console, 'warn');
|
|
285
|
+
var cache = new CellMeasurerCache({
|
|
286
|
+
defaultHeight: 0,
|
|
287
|
+
fixedWidth: true
|
|
288
|
+
});
|
|
289
|
+
expect(cache.getHeight(0, 0)).toBe(0);
|
|
290
|
+
expect(console.warn).toHaveBeenCalledWith('Fixed height CellMeasurerCache should specify a :defaultHeight greater than 0. ' + 'Failing to do so will lead to unnecessary layout and poor performance.');
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
});
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
/*:: import type {CellMeasureCache} from './types';*/
|
|
5
|
+
export var DEFAULT_HEIGHT = 30;
|
|
6
|
+
export var DEFAULT_WIDTH = 100;
|
|
7
|
+
|
|
8
|
+
// Enables more intelligent mapping of a given column and row index to an item ID.
|
|
9
|
+
// This prevents a cell cache from being invalidated when its parent collection is modified.
|
|
10
|
+
/*:: type KeyMapper = (rowIndex: number, columnIndex: number) => any;*/
|
|
11
|
+
/*:: type CellMeasurerCacheParams = {
|
|
12
|
+
defaultHeight?: number,
|
|
13
|
+
defaultWidth?: number,
|
|
14
|
+
fixedHeight?: boolean,
|
|
15
|
+
fixedWidth?: boolean,
|
|
16
|
+
minHeight?: number,
|
|
17
|
+
minWidth?: number,
|
|
18
|
+
keyMapper?: KeyMapper,
|
|
19
|
+
};*/
|
|
20
|
+
/*:: type Cache = {
|
|
21
|
+
[key: any]: number,
|
|
22
|
+
};*/
|
|
23
|
+
/*:: type IndexParam = {
|
|
24
|
+
index: number,
|
|
25
|
+
};*/
|
|
26
|
+
/**
|
|
27
|
+
* Caches measurements for a given cell.
|
|
28
|
+
*/
|
|
29
|
+
var CellMeasurerCache = /*#__PURE__*/function () {
|
|
30
|
+
function CellMeasurerCache() {
|
|
31
|
+
var _this = this;
|
|
32
|
+
var params /*: CellMeasurerCacheParams*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
33
|
+
_classCallCheck(this, CellMeasurerCache);
|
|
34
|
+
_defineProperty(this, "_cellHeightCache", {});
|
|
35
|
+
_defineProperty(this, "_cellWidthCache", {});
|
|
36
|
+
_defineProperty(this, "_columnWidthCache", {});
|
|
37
|
+
_defineProperty(this, "_rowHeightCache", {});
|
|
38
|
+
_defineProperty(this, "_defaultHeight", void 0);
|
|
39
|
+
_defineProperty(this, "_defaultWidth", void 0);
|
|
40
|
+
_defineProperty(this, "_minHeight", void 0);
|
|
41
|
+
_defineProperty(this, "_minWidth", void 0);
|
|
42
|
+
_defineProperty(this, "_keyMapper", void 0);
|
|
43
|
+
_defineProperty(this, "_hasFixedHeight", void 0);
|
|
44
|
+
_defineProperty(this, "_hasFixedWidth", void 0);
|
|
45
|
+
_defineProperty(this, "_columnCount", 0);
|
|
46
|
+
_defineProperty(this, "_rowCount", 0);
|
|
47
|
+
_defineProperty(this, "columnWidth", function (_ref /*:: */) {
|
|
48
|
+
var index = _ref /*:: */.index;
|
|
49
|
+
var key = _this._keyMapper(0, index);
|
|
50
|
+
return _this._columnWidthCache[key] !== undefined ? _this._columnWidthCache[key] : _this._defaultWidth;
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "rowHeight", function (_ref2 /*:: */) {
|
|
53
|
+
var index = _ref2 /*:: */.index;
|
|
54
|
+
var key = _this._keyMapper(index, 0);
|
|
55
|
+
return _this._rowHeightCache[key] !== undefined ? _this._rowHeightCache[key] : _this._defaultHeight;
|
|
56
|
+
});
|
|
57
|
+
var defaultHeight = params.defaultHeight,
|
|
58
|
+
defaultWidth = params.defaultWidth,
|
|
59
|
+
fixedHeight = params.fixedHeight,
|
|
60
|
+
fixedWidth = params.fixedWidth,
|
|
61
|
+
keyMapper = params.keyMapper,
|
|
62
|
+
minHeight = params.minHeight,
|
|
63
|
+
minWidth = params.minWidth;
|
|
64
|
+
this._hasFixedHeight = fixedHeight === true;
|
|
65
|
+
this._hasFixedWidth = fixedWidth === true;
|
|
66
|
+
this._minHeight = minHeight || 0;
|
|
67
|
+
this._minWidth = minWidth || 0;
|
|
68
|
+
this._keyMapper = keyMapper || defaultKeyMapper;
|
|
69
|
+
this._defaultHeight = Math.max(this._minHeight, typeof defaultHeight === 'number' ? defaultHeight : DEFAULT_HEIGHT);
|
|
70
|
+
this._defaultWidth = Math.max(this._minWidth, typeof defaultWidth === 'number' ? defaultWidth : DEFAULT_WIDTH);
|
|
71
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
72
|
+
if (this._hasFixedHeight === false && this._hasFixedWidth === false) {
|
|
73
|
+
console.warn("CellMeasurerCache should only measure a cell's width or height. " + 'You have configured CellMeasurerCache to measure both. ' + 'This will result in poor performance.');
|
|
74
|
+
}
|
|
75
|
+
if (this._hasFixedHeight === false && this._defaultHeight === 0) {
|
|
76
|
+
console.warn('Fixed height CellMeasurerCache should specify a :defaultHeight greater than 0. ' + 'Failing to do so will lead to unnecessary layout and poor performance.');
|
|
77
|
+
}
|
|
78
|
+
if (this._hasFixedWidth === false && this._defaultWidth === 0) {
|
|
79
|
+
console.warn('Fixed width CellMeasurerCache should specify a :defaultWidth greater than 0. ' + 'Failing to do so will lead to unnecessary layout and poor performance.');
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return _createClass(CellMeasurerCache, [{
|
|
84
|
+
key: "clear",
|
|
85
|
+
value: function clear(rowIndex /*: number*/) {
|
|
86
|
+
var columnIndex /*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
87
|
+
var key = this._keyMapper(rowIndex, columnIndex);
|
|
88
|
+
delete this._cellHeightCache[key];
|
|
89
|
+
delete this._cellWidthCache[key];
|
|
90
|
+
this._updateCachedColumnAndRowSizes(rowIndex, columnIndex);
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
key: "clearAll",
|
|
94
|
+
value: function clearAll() {
|
|
95
|
+
this._cellHeightCache = {};
|
|
96
|
+
this._cellWidthCache = {};
|
|
97
|
+
this._columnWidthCache = {};
|
|
98
|
+
this._rowHeightCache = {};
|
|
99
|
+
this._rowCount = 0;
|
|
100
|
+
this._columnCount = 0;
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
key: "defaultHeight",
|
|
104
|
+
get: function get() /*: number*/{
|
|
105
|
+
return this._defaultHeight;
|
|
106
|
+
}
|
|
107
|
+
}, {
|
|
108
|
+
key: "defaultWidth",
|
|
109
|
+
get: function get() /*: number*/{
|
|
110
|
+
return this._defaultWidth;
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
key: "hasFixedHeight",
|
|
114
|
+
value: function hasFixedHeight() /*: boolean*/{
|
|
115
|
+
return this._hasFixedHeight;
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "hasFixedWidth",
|
|
119
|
+
value: function hasFixedWidth() /*: boolean*/{
|
|
120
|
+
return this._hasFixedWidth;
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
key: "getHeight",
|
|
124
|
+
value: function getHeight(rowIndex /*: number*/) /*: number*/{
|
|
125
|
+
var columnIndex /*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
126
|
+
if (this._hasFixedHeight) {
|
|
127
|
+
return this._defaultHeight;
|
|
128
|
+
} else {
|
|
129
|
+
var _key = this._keyMapper(rowIndex, columnIndex);
|
|
130
|
+
return this._cellHeightCache[_key] !== undefined ? Math.max(this._minHeight, this._cellHeightCache[_key]) : this._defaultHeight;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}, {
|
|
134
|
+
key: "getWidth",
|
|
135
|
+
value: function getWidth(rowIndex /*: number*/) /*: number*/{
|
|
136
|
+
var columnIndex /*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
137
|
+
if (this._hasFixedWidth) {
|
|
138
|
+
return this._defaultWidth;
|
|
139
|
+
} else {
|
|
140
|
+
var _key2 = this._keyMapper(rowIndex, columnIndex);
|
|
141
|
+
return this._cellWidthCache[_key2] !== undefined ? Math.max(this._minWidth, this._cellWidthCache[_key2]) : this._defaultWidth;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}, {
|
|
145
|
+
key: "has",
|
|
146
|
+
value: function has(rowIndex /*: number*/) /*: boolean*/{
|
|
147
|
+
var columnIndex /*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
148
|
+
var key = this._keyMapper(rowIndex, columnIndex);
|
|
149
|
+
return this._cellHeightCache[key] !== undefined;
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "set",
|
|
153
|
+
value: function set(rowIndex /*: number*/, columnIndex /*: number*/, width /*: number*/, height /*: number*/) /*: void*/{
|
|
154
|
+
var key = this._keyMapper(rowIndex, columnIndex);
|
|
155
|
+
if (columnIndex >= this._columnCount) {
|
|
156
|
+
this._columnCount = columnIndex + 1;
|
|
157
|
+
}
|
|
158
|
+
if (rowIndex >= this._rowCount) {
|
|
159
|
+
this._rowCount = rowIndex + 1;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Size is cached per cell so we don't have to re-measure if cells are re-ordered.
|
|
163
|
+
this._cellHeightCache[key] = height;
|
|
164
|
+
this._cellWidthCache[key] = width;
|
|
165
|
+
this._updateCachedColumnAndRowSizes(rowIndex, columnIndex);
|
|
166
|
+
}
|
|
167
|
+
}, {
|
|
168
|
+
key: "_updateCachedColumnAndRowSizes",
|
|
169
|
+
value: function _updateCachedColumnAndRowSizes(rowIndex /*: number*/, columnIndex /*: number*/) {
|
|
170
|
+
// :columnWidth and :rowHeight are derived based on all cells in a column/row.
|
|
171
|
+
// Pre-cache these derived values for faster lookup later.
|
|
172
|
+
// Reads are expected to occur more frequently than writes in this case.
|
|
173
|
+
// Only update non-fixed dimensions though to avoid doing unnecessary work.
|
|
174
|
+
if (!this._hasFixedWidth) {
|
|
175
|
+
var columnWidth = 0;
|
|
176
|
+
for (var i = 0; i < this._rowCount; i++) {
|
|
177
|
+
columnWidth = Math.max(columnWidth, this.getWidth(i, columnIndex));
|
|
178
|
+
}
|
|
179
|
+
var columnKey = this._keyMapper(0, columnIndex);
|
|
180
|
+
this._columnWidthCache[columnKey] = columnWidth;
|
|
181
|
+
}
|
|
182
|
+
if (!this._hasFixedHeight) {
|
|
183
|
+
var rowHeight = 0;
|
|
184
|
+
for (var _i = 0; _i < this._columnCount; _i++) {
|
|
185
|
+
rowHeight = Math.max(rowHeight, this.getHeight(rowIndex, _i));
|
|
186
|
+
}
|
|
187
|
+
var rowKey = this._keyMapper(rowIndex, 0);
|
|
188
|
+
this._rowHeightCache[rowKey] = rowHeight;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}]);
|
|
192
|
+
}();
|
|
193
|
+
export { CellMeasurerCache as default };
|
|
194
|
+
function defaultKeyMapper(rowIndex /*: number*/, columnIndex /*: number*/) {
|
|
195
|
+
return "".concat(rowIndex, "-").concat(columnIndex);
|
|
196
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*:: export interface CellMeasureCache {
|
|
2
|
+
hasFixedWidth(): boolean;
|
|
3
|
+
hasFixedHeight(): boolean;
|
|
4
|
+
has(rowIndex: number, columnIndex: number): boolean;
|
|
5
|
+
set(
|
|
6
|
+
rowIndex: number,
|
|
7
|
+
columnIndex: number,
|
|
8
|
+
width: number,
|
|
9
|
+
height: number,
|
|
10
|
+
): void;
|
|
11
|
+
getHeight(rowIndex: number, columnIndex?: number): number;
|
|
12
|
+
getWidth(rowIndex: number, columnIndex?: number): number;
|
|
13
|
+
}*/
|