box-ui-elements 20.1.0-beta.3 → 21.0.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/dist/explorer.js +827 -888
- package/dist/picker.js +619 -634
- package/dist/sharing.js +4298 -696
- package/dist/uploader.js +617 -632
- package/package.json +5 -6
package/dist/explorer.js
CHANGED
|
@@ -118934,11 +118934,10 @@ const makeDroppable = ({
|
|
|
118934
118934
|
;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Table/defaultHeaderRowRenderer.js
|
|
118935
118935
|
|
|
118936
118936
|
/*:: import type {HeaderRowRendererParams} from './types';*/
|
|
118937
|
-
|
|
118938
|
-
|
|
118939
|
-
|
|
118940
|
-
|
|
118941
|
-
style = _ref.style;
|
|
118937
|
+
function defaultHeaderRowRenderer(_ref /*:: */) {
|
|
118938
|
+
var className = _ref /*:: */.className,
|
|
118939
|
+
columns = _ref /*:: */.columns,
|
|
118940
|
+
style = _ref /*:: */.style;
|
|
118942
118941
|
return /*#__PURE__*/react.createElement("div", {
|
|
118943
118942
|
role: "rowgroup",
|
|
118944
118943
|
className: "ReactVirtualized__Table__headerRowGroup"
|
|
@@ -118980,10 +118979,10 @@ var SortDirection = {
|
|
|
118980
118979
|
|
|
118981
118980
|
|
|
118982
118981
|
|
|
118982
|
+
|
|
118983
118983
|
/**
|
|
118984
118984
|
* Displayed beside a header to indicate that a Table is currently sorted by this column.
|
|
118985
118985
|
*/
|
|
118986
|
-
|
|
118987
118986
|
function SortIndicator(_ref) {
|
|
118988
118987
|
var sortDirection = _ref.sortDirection;
|
|
118989
118988
|
var classNames = clsx_m('ReactVirtualized__Table__sortableHeaderIcon', {
|
|
@@ -119009,15 +119008,14 @@ SortIndicator.propTypes = false ? 0 : {};
|
|
|
119009
119008
|
|
|
119010
119009
|
|
|
119011
119010
|
/*:: import type {HeaderRendererParams} from './types';*/
|
|
119012
|
-
|
|
119013
119011
|
/**
|
|
119014
119012
|
* Default table header renderer.
|
|
119015
119013
|
*/
|
|
119016
|
-
function defaultHeaderRenderer(_ref) {
|
|
119017
|
-
var dataKey = _ref
|
|
119018
|
-
label = _ref
|
|
119019
|
-
sortBy = _ref
|
|
119020
|
-
sortDirection = _ref
|
|
119014
|
+
function defaultHeaderRenderer(_ref /*:: */) {
|
|
119015
|
+
var dataKey = _ref /*:: */.dataKey,
|
|
119016
|
+
label = _ref /*:: */.label,
|
|
119017
|
+
sortBy = _ref /*:: */.sortBy,
|
|
119018
|
+
sortDirection = _ref /*:: */.sortDirection;
|
|
119021
119019
|
var showSortIndicator = sortBy === dataKey;
|
|
119022
119020
|
var children = [/*#__PURE__*/react.createElement("span", {
|
|
119023
119021
|
className: "ReactVirtualized__Table__headerTruncatedText",
|
|
@@ -119036,22 +119034,21 @@ function defaultHeaderRenderer(_ref) {
|
|
|
119036
119034
|
|
|
119037
119035
|
|
|
119038
119036
|
/*:: import type {RowRendererParams} from './types';*/
|
|
119039
|
-
|
|
119040
119037
|
/**
|
|
119041
119038
|
* Default row renderer for Table.
|
|
119042
119039
|
*/
|
|
119043
|
-
function defaultRowRenderer(_ref) {
|
|
119044
|
-
var className = _ref
|
|
119045
|
-
columns = _ref
|
|
119046
|
-
index = _ref
|
|
119047
|
-
key = _ref
|
|
119048
|
-
onRowClick = _ref
|
|
119049
|
-
onRowDoubleClick = _ref
|
|
119050
|
-
onRowMouseOut = _ref
|
|
119051
|
-
onRowMouseOver = _ref
|
|
119052
|
-
onRowRightClick = _ref
|
|
119053
|
-
rowData = _ref
|
|
119054
|
-
style = _ref
|
|
119040
|
+
function defaultRowRenderer(_ref /*:: */) {
|
|
119041
|
+
var className = _ref /*:: */.className,
|
|
119042
|
+
columns = _ref /*:: */.columns,
|
|
119043
|
+
index = _ref /*:: */.index,
|
|
119044
|
+
key = _ref /*:: */.key,
|
|
119045
|
+
onRowClick = _ref /*:: */.onRowClick,
|
|
119046
|
+
onRowDoubleClick = _ref /*:: */.onRowDoubleClick,
|
|
119047
|
+
onRowMouseOut = _ref /*:: */.onRowMouseOut,
|
|
119048
|
+
onRowMouseOver = _ref /*:: */.onRowMouseOver,
|
|
119049
|
+
onRowRightClick = _ref /*:: */.onRowRightClick,
|
|
119050
|
+
rowData = _ref /*:: */.rowData,
|
|
119051
|
+
style = _ref /*:: */.style;
|
|
119055
119052
|
var a11yProps = {
|
|
119056
119053
|
'aria-rowindex': index + 1
|
|
119057
119054
|
};
|
|
@@ -119110,6 +119107,22 @@ function defaultRowRenderer(_ref) {
|
|
|
119110
119107
|
style: style
|
|
119111
119108
|
}), columns);
|
|
119112
119109
|
}
|
|
119110
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
119111
|
+
var toPropertyKey = __webpack_require__(91313);
|
|
119112
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
119113
|
+
|
|
119114
|
+
function _defineProperties(e, r) {
|
|
119115
|
+
for (var t = 0; t < r.length; t++) {
|
|
119116
|
+
var o = r[t];
|
|
119117
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, (0,toPropertyKey/* default */.A)(o.key), o);
|
|
119118
|
+
}
|
|
119119
|
+
}
|
|
119120
|
+
function _createClass(e, r, t) {
|
|
119121
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
119122
|
+
writable: !1
|
|
119123
|
+
}), e;
|
|
119124
|
+
}
|
|
119125
|
+
|
|
119113
119126
|
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
119114
119127
|
function _classCallCheck(a, n) {
|
|
119115
119128
|
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
@@ -119156,14 +119169,12 @@ function _inherits(t, e) {
|
|
|
119156
119169
|
var defineProperty = __webpack_require__(34774);
|
|
119157
119170
|
;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Table/defaultCellRenderer.js
|
|
119158
119171
|
/*:: import type {CellRendererParams} from './types';*/
|
|
119159
|
-
|
|
119160
119172
|
/**
|
|
119161
119173
|
* Default cell renderer that displays an attribute as a simple string
|
|
119162
119174
|
* You should override the column's cellRenderer if your data is some other type of object.
|
|
119163
119175
|
*/
|
|
119164
|
-
function defaultCellRenderer(_ref) /*: string*/
|
|
119165
|
-
|
|
119166
|
-
var cellData = _ref.cellData;
|
|
119176
|
+
function defaultCellRenderer(_ref /*:: */) /*: string*/{
|
|
119177
|
+
var cellData = _ref /*:: */.cellData;
|
|
119167
119178
|
if (cellData == null) {
|
|
119168
119179
|
return '';
|
|
119169
119180
|
} else {
|
|
@@ -119172,15 +119183,14 @@ function defaultCellRenderer(_ref) /*: string*/
|
|
|
119172
119183
|
}
|
|
119173
119184
|
;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Table/defaultCellDataGetter.js
|
|
119174
119185
|
/*:: import type {CellDataGetterParams} from './types';*/
|
|
119175
|
-
|
|
119176
119186
|
/**
|
|
119177
119187
|
* Default accessor for returning a cell value for a given attribute.
|
|
119178
119188
|
* This function expects to operate on either a vanilla Object or an Immutable Map.
|
|
119179
119189
|
* You should override the column's cellDataGetter if your data is some other type of object.
|
|
119180
119190
|
*/
|
|
119181
|
-
function defaultCellDataGetter(_ref) {
|
|
119182
|
-
var dataKey = _ref
|
|
119183
|
-
rowData = _ref
|
|
119191
|
+
function defaultCellDataGetter(_ref /*:: */) {
|
|
119192
|
+
var dataKey = _ref /*:: */.dataKey,
|
|
119193
|
+
rowData = _ref /*:: */.rowData;
|
|
119184
119194
|
if (typeof rowData.get === 'function') {
|
|
119185
119195
|
return rowData.get(dataKey);
|
|
119186
119196
|
} else {
|
|
@@ -119194,6 +119204,19 @@ function defaultCellDataGetter(_ref) {
|
|
|
119194
119204
|
|
|
119195
119205
|
|
|
119196
119206
|
|
|
119207
|
+
function _callSuper(t, o, e) {
|
|
119208
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
119209
|
+
}
|
|
119210
|
+
function _isNativeReflectConstruct() {
|
|
119211
|
+
try {
|
|
119212
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
119213
|
+
} catch (t) {}
|
|
119214
|
+
return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
|
119215
|
+
return !!t;
|
|
119216
|
+
})();
|
|
119217
|
+
}
|
|
119218
|
+
|
|
119219
|
+
|
|
119197
119220
|
|
|
119198
119221
|
|
|
119199
119222
|
|
|
@@ -119202,15 +119225,13 @@ function defaultCellDataGetter(_ref) {
|
|
|
119202
119225
|
/**
|
|
119203
119226
|
* Describes the header and cell contents of a table column.
|
|
119204
119227
|
*/
|
|
119205
|
-
|
|
119206
|
-
var Column = /*#__PURE__*/
|
|
119207
|
-
function (_React$Component) {
|
|
119208
|
-
_inherits(Column, _React$Component);
|
|
119228
|
+
var Column = /*#__PURE__*/function (_React$Component) {
|
|
119209
119229
|
function Column() {
|
|
119210
119230
|
_classCallCheck(this, Column);
|
|
119211
|
-
return
|
|
119231
|
+
return _callSuper(this, Column, arguments);
|
|
119212
119232
|
}
|
|
119213
|
-
|
|
119233
|
+
_inherits(Column, _React$Component);
|
|
119234
|
+
return _createClass(Column);
|
|
119214
119235
|
}(react.Component);
|
|
119215
119236
|
(0,defineProperty/* default */.A)(Column, "defaultProps", {
|
|
119216
119237
|
cellDataGetter: defaultCellDataGetter,
|
|
@@ -119225,27 +119246,10 @@ function (_React$Component) {
|
|
|
119225
119246
|
});
|
|
119226
119247
|
|
|
119227
119248
|
Column.propTypes = false ? 0 : {};
|
|
119228
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
119229
|
-
var toPropertyKey = __webpack_require__(91313);
|
|
119230
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
119231
|
-
|
|
119232
|
-
function _defineProperties(e, r) {
|
|
119233
|
-
for (var t = 0; t < r.length; t++) {
|
|
119234
|
-
var o = r[t];
|
|
119235
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, (0,toPropertyKey/* default */.A)(o.key), o);
|
|
119236
|
-
}
|
|
119237
|
-
}
|
|
119238
|
-
function _createClass(e, r, t) {
|
|
119239
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
119240
|
-
writable: !1
|
|
119241
|
-
}), e;
|
|
119242
|
-
}
|
|
119243
|
-
|
|
119244
119249
|
;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Grid/utils/calculateSizeAndPositionDataAndUpdateScrollOffset.js
|
|
119245
119250
|
/**
|
|
119246
119251
|
* Helper method that determines when to recalculate row or column metadata.
|
|
119247
119252
|
*/
|
|
119248
|
-
|
|
119249
119253
|
/*:: type Params<T> = {
|
|
119250
119254
|
// Number of rows or columns in the current axis
|
|
119251
119255
|
cellCount: number,
|
|
@@ -119274,23 +119278,23 @@ function _createClass(e, r, t) {
|
|
|
119274
119278
|
// Callback to invoke if the scroll position should be recalculated
|
|
119275
119279
|
updateScrollOffsetForScrollToIndex: () => void,
|
|
119276
119280
|
};*/
|
|
119277
|
-
function calculateSizeAndPositionDataAndUpdateScrollOffset(_ref) {
|
|
119278
|
-
var cellCount = _ref
|
|
119279
|
-
cellSize = _ref
|
|
119280
|
-
computeMetadataCallback = _ref
|
|
119281
|
-
computeMetadataCallbackProps = _ref
|
|
119282
|
-
nextCellsCount = _ref
|
|
119283
|
-
nextCellSize = _ref
|
|
119284
|
-
nextScrollToIndex = _ref
|
|
119285
|
-
scrollToIndex = _ref
|
|
119286
|
-
updateScrollOffsetForScrollToIndex = _ref
|
|
119287
|
-
|
|
119281
|
+
function calculateSizeAndPositionDataAndUpdateScrollOffset(_ref /*:: */) {
|
|
119282
|
+
var cellCount = _ref /*:: */.cellCount,
|
|
119283
|
+
cellSize = _ref /*:: */.cellSize,
|
|
119284
|
+
computeMetadataCallback = _ref /*:: */.computeMetadataCallback,
|
|
119285
|
+
computeMetadataCallbackProps = _ref /*:: */.computeMetadataCallbackProps,
|
|
119286
|
+
nextCellsCount = _ref /*:: */.nextCellsCount,
|
|
119287
|
+
nextCellSize = _ref /*:: */.nextCellSize,
|
|
119288
|
+
nextScrollToIndex = _ref /*:: */.nextScrollToIndex,
|
|
119289
|
+
scrollToIndex = _ref /*:: */.scrollToIndex,
|
|
119290
|
+
updateScrollOffsetForScrollToIndex = _ref /*:: */.updateScrollOffsetForScrollToIndex;
|
|
119288
119291
|
// Don't compare cell sizes if they are functions because inline functions would cause infinite loops.
|
|
119289
119292
|
// In that event users should use the manual recompute methods to inform of changes.
|
|
119290
119293
|
if (cellCount !== nextCellsCount || (typeof cellSize === 'number' || typeof nextCellSize === 'number') && cellSize !== nextCellSize) {
|
|
119291
|
-
computeMetadataCallback(computeMetadataCallbackProps);
|
|
119292
|
-
// In this case we should also update the scrollTop to ensure it stays visible.
|
|
119294
|
+
computeMetadataCallback(computeMetadataCallbackProps);
|
|
119293
119295
|
|
|
119296
|
+
// Updated cell metadata may have hidden the previous scrolled-to item.
|
|
119297
|
+
// In this case we should also update the scrollTop to ensure it stays visible.
|
|
119294
119298
|
if (scrollToIndex >= 0 && scrollToIndex === nextScrollToIndex) {
|
|
119295
119299
|
updateScrollOffsetForScrollToIndex();
|
|
119296
119300
|
}
|
|
@@ -119314,54 +119318,46 @@ function objectWithoutProperties_objectWithoutProperties(e, t) {
|
|
|
119314
119318
|
|
|
119315
119319
|
|
|
119316
119320
|
|
|
119317
|
-
|
|
119318
119321
|
/*:: import type {Alignment, CellSizeGetter, VisibleCellRange} from '../types';*/
|
|
119319
|
-
|
|
119320
119322
|
/*:: type CellSizeAndPositionManagerParams = {
|
|
119321
119323
|
cellCount: number,
|
|
119322
119324
|
cellSizeGetter: CellSizeGetter,
|
|
119323
119325
|
estimatedCellSize: number,
|
|
119324
119326
|
};*/
|
|
119325
|
-
|
|
119326
119327
|
/*:: type ConfigureParams = {
|
|
119327
119328
|
cellCount: number,
|
|
119328
119329
|
estimatedCellSize: number,
|
|
119329
119330
|
cellSizeGetter: CellSizeGetter,
|
|
119330
119331
|
};*/
|
|
119331
|
-
|
|
119332
119332
|
/*:: type GetUpdatedOffsetForIndex = {
|
|
119333
119333
|
align: Alignment,
|
|
119334
119334
|
containerSize: number,
|
|
119335
119335
|
currentOffset: number,
|
|
119336
119336
|
targetIndex: number,
|
|
119337
119337
|
};*/
|
|
119338
|
-
|
|
119339
119338
|
/*:: type GetVisibleCellRangeParams = {
|
|
119340
119339
|
containerSize: number,
|
|
119341
119340
|
offset: number,
|
|
119342
119341
|
};*/
|
|
119343
|
-
|
|
119344
119342
|
/*:: type SizeAndPositionData = {
|
|
119345
119343
|
offset: number,
|
|
119346
119344
|
size: number,
|
|
119347
119345
|
};*/
|
|
119348
|
-
|
|
119349
119346
|
/**
|
|
119350
119347
|
* Just-in-time calculates and caches size and position information for a collection of cells.
|
|
119351
119348
|
*/
|
|
119352
|
-
var CellSizeAndPositionManager = /*#__PURE__*/
|
|
119353
|
-
function () {
|
|
119354
|
-
|
|
119355
|
-
|
|
119356
|
-
|
|
119357
|
-
// Used in deferred mode to track which cells have been queued for measurement.
|
|
119358
|
-
function CellSizeAndPositionManager(_ref) {
|
|
119359
|
-
var cellCount = _ref.cellCount,
|
|
119360
|
-
cellSizeGetter = _ref.cellSizeGetter,
|
|
119361
|
-
estimatedCellSize = _ref.estimatedCellSize;
|
|
119349
|
+
var CellSizeAndPositionManager = /*#__PURE__*/function () {
|
|
119350
|
+
function CellSizeAndPositionManager(_ref /*:: */) {
|
|
119351
|
+
var cellCount = _ref /*:: */.cellCount,
|
|
119352
|
+
cellSizeGetter = _ref /*:: */.cellSizeGetter,
|
|
119353
|
+
estimatedCellSize = _ref /*:: */.estimatedCellSize;
|
|
119362
119354
|
_classCallCheck(this, CellSizeAndPositionManager);
|
|
119355
|
+
// Cache of size and position data for cells, mapped by cell index.
|
|
119356
|
+
// Note that invalid values may exist in this map so only rely on cells up to this._lastMeasuredIndex
|
|
119363
119357
|
(0,defineProperty/* default */.A)(this, "_cellSizeAndPositionData", {});
|
|
119358
|
+
// Measurements for cells up to this index can be trusted; cells afterward should be estimated.
|
|
119364
119359
|
(0,defineProperty/* default */.A)(this, "_lastMeasuredIndex", -1);
|
|
119360
|
+
// Used in deferred mode to track which cells have been queued for measurement.
|
|
119365
119361
|
(0,defineProperty/* default */.A)(this, "_lastBatchedIndex", -1);
|
|
119366
119362
|
(0,defineProperty/* default */.A)(this, "_cellCount", void 0);
|
|
119367
119363
|
(0,defineProperty/* default */.A)(this, "_cellSizeGetter", void 0);
|
|
@@ -119370,37 +119366,34 @@ function () {
|
|
|
119370
119366
|
this._cellCount = cellCount;
|
|
119371
119367
|
this._estimatedCellSize = estimatedCellSize;
|
|
119372
119368
|
}
|
|
119373
|
-
_createClass(CellSizeAndPositionManager, [{
|
|
119369
|
+
return _createClass(CellSizeAndPositionManager, [{
|
|
119374
119370
|
key: "areOffsetsAdjusted",
|
|
119375
119371
|
value: function areOffsetsAdjusted() {
|
|
119376
119372
|
return false;
|
|
119377
119373
|
}
|
|
119378
119374
|
}, {
|
|
119379
119375
|
key: "configure",
|
|
119380
|
-
value: function configure(_ref2) {
|
|
119381
|
-
var cellCount = _ref2
|
|
119382
|
-
estimatedCellSize = _ref2
|
|
119383
|
-
cellSizeGetter = _ref2
|
|
119376
|
+
value: function configure(_ref2 /*:: */) {
|
|
119377
|
+
var cellCount = _ref2 /*:: */.cellCount,
|
|
119378
|
+
estimatedCellSize = _ref2 /*:: */.estimatedCellSize,
|
|
119379
|
+
cellSizeGetter = _ref2 /*:: */.cellSizeGetter;
|
|
119384
119380
|
this._cellCount = cellCount;
|
|
119385
119381
|
this._estimatedCellSize = estimatedCellSize;
|
|
119386
119382
|
this._cellSizeGetter = cellSizeGetter;
|
|
119387
119383
|
}
|
|
119388
119384
|
}, {
|
|
119389
119385
|
key: "getCellCount",
|
|
119390
|
-
value: function getCellCount() /*: number*/
|
|
119391
|
-
{
|
|
119386
|
+
value: function getCellCount() /*: number*/{
|
|
119392
119387
|
return this._cellCount;
|
|
119393
119388
|
}
|
|
119394
119389
|
}, {
|
|
119395
119390
|
key: "getEstimatedCellSize",
|
|
119396
|
-
value: function getEstimatedCellSize() /*: number*/
|
|
119397
|
-
{
|
|
119391
|
+
value: function getEstimatedCellSize() /*: number*/{
|
|
119398
119392
|
return this._estimatedCellSize;
|
|
119399
119393
|
}
|
|
119400
119394
|
}, {
|
|
119401
119395
|
key: "getLastMeasuredIndex",
|
|
119402
|
-
value: function getLastMeasuredIndex() /*: number*/
|
|
119403
|
-
{
|
|
119396
|
+
value: function getLastMeasuredIndex() /*: number*/{
|
|
119404
119397
|
return this._lastMeasuredIndex;
|
|
119405
119398
|
}
|
|
119406
119399
|
}, {
|
|
@@ -119408,15 +119401,14 @@ function () {
|
|
|
119408
119401
|
value: function getOffsetAdjustment() {
|
|
119409
119402
|
return 0;
|
|
119410
119403
|
}
|
|
119404
|
+
|
|
119411
119405
|
/**
|
|
119412
119406
|
* This method returns the size and position for the cell at the specified index.
|
|
119413
119407
|
* It just-in-time calculates (or used cached values) for cells leading up to the index.
|
|
119414
119408
|
*/
|
|
119415
119409
|
}, {
|
|
119416
119410
|
key: "getSizeAndPositionOfCell",
|
|
119417
|
-
value: function getSizeAndPositionOfCell(index
|
|
119418
|
-
/*: number*/) /*: SizeAndPositionData*/
|
|
119419
|
-
{
|
|
119411
|
+
value: function getSizeAndPositionOfCell(index /*: number*/) /*: SizeAndPositionData*/{
|
|
119420
119412
|
if (index < 0 || index >= this._cellCount) {
|
|
119421
119413
|
throw Error("Requested index ".concat(index, " is outside of range 0..").concat(this._cellCount));
|
|
119422
119414
|
}
|
|
@@ -119426,9 +119418,10 @@ function () {
|
|
|
119426
119418
|
for (var i = this._lastMeasuredIndex + 1; i <= index; i++) {
|
|
119427
119419
|
var size = this._cellSizeGetter({
|
|
119428
119420
|
index: i
|
|
119429
|
-
});
|
|
119430
|
-
// null means we're using CellMeasurer and haven't yet measured a given index.
|
|
119421
|
+
});
|
|
119431
119422
|
|
|
119423
|
+
// undefined or NaN probably means a logic error in the size getter.
|
|
119424
|
+
// null means we're using CellMeasurer and haven't yet measured a given index.
|
|
119432
119425
|
if (size === undefined || isNaN(size)) {
|
|
119433
119426
|
throw Error("Invalid size returned for cell ".concat(i, " of value ").concat(size));
|
|
119434
119427
|
} else if (size === null) {
|
|
@@ -119451,13 +119444,13 @@ function () {
|
|
|
119451
119444
|
}
|
|
119452
119445
|
}, {
|
|
119453
119446
|
key: "getSizeAndPositionOfLastMeasuredCell",
|
|
119454
|
-
value: function getSizeAndPositionOfLastMeasuredCell() /*: SizeAndPositionData*/
|
|
119455
|
-
{
|
|
119447
|
+
value: function getSizeAndPositionOfLastMeasuredCell() /*: SizeAndPositionData*/{
|
|
119456
119448
|
return this._lastMeasuredIndex >= 0 ? this._cellSizeAndPositionData[this._lastMeasuredIndex] : {
|
|
119457
119449
|
offset: 0,
|
|
119458
119450
|
size: 0
|
|
119459
119451
|
};
|
|
119460
119452
|
}
|
|
119453
|
+
|
|
119461
119454
|
/**
|
|
119462
119455
|
* Total size of all cells being measured.
|
|
119463
119456
|
* This value will be completely estimated initially.
|
|
@@ -119465,14 +119458,14 @@ function () {
|
|
|
119465
119458
|
*/
|
|
119466
119459
|
}, {
|
|
119467
119460
|
key: "getTotalSize",
|
|
119468
|
-
value: function getTotalSize() /*: number*/
|
|
119469
|
-
{
|
|
119461
|
+
value: function getTotalSize() /*: number*/{
|
|
119470
119462
|
var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();
|
|
119471
119463
|
var totalSizeOfMeasuredCells = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size;
|
|
119472
119464
|
var numUnmeasuredCells = this._cellCount - this._lastMeasuredIndex - 1;
|
|
119473
119465
|
var totalSizeOfUnmeasuredCells = numUnmeasuredCells * this._estimatedCellSize;
|
|
119474
119466
|
return totalSizeOfMeasuredCells + totalSizeOfUnmeasuredCells;
|
|
119475
119467
|
}
|
|
119468
|
+
|
|
119476
119469
|
/**
|
|
119477
119470
|
* Determines a new offset that ensures a certain cell is visible, given the current offset.
|
|
119478
119471
|
* If the cell is already visible then the current offset will be returned.
|
|
@@ -119486,13 +119479,12 @@ function () {
|
|
|
119486
119479
|
*/
|
|
119487
119480
|
}, {
|
|
119488
119481
|
key: "getUpdatedOffsetForIndex",
|
|
119489
|
-
value: function getUpdatedOffsetForIndex(_ref3) /*: number*/
|
|
119490
|
-
|
|
119491
|
-
var _ref3$align = _ref3.align,
|
|
119482
|
+
value: function getUpdatedOffsetForIndex(_ref3 /*:: */) /*: number*/{
|
|
119483
|
+
var _ref3$align = _ref3 /*:: */.align,
|
|
119492
119484
|
align = _ref3$align === void 0 ? 'auto' : _ref3$align,
|
|
119493
|
-
containerSize = _ref3
|
|
119494
|
-
currentOffset = _ref3
|
|
119495
|
-
targetIndex = _ref3
|
|
119485
|
+
containerSize = _ref3 /*:: */.containerSize,
|
|
119486
|
+
currentOffset = _ref3 /*:: */.currentOffset,
|
|
119487
|
+
targetIndex = _ref3 /*:: */.targetIndex;
|
|
119496
119488
|
if (containerSize <= 0) {
|
|
119497
119489
|
return 0;
|
|
119498
119490
|
}
|
|
@@ -119519,9 +119511,7 @@ function () {
|
|
|
119519
119511
|
}
|
|
119520
119512
|
}, {
|
|
119521
119513
|
key: "getVisibleCellRange",
|
|
119522
|
-
value: function getVisibleCellRange(params
|
|
119523
|
-
/*: GetVisibleCellRangeParams*/) /*: VisibleCellRange*/
|
|
119524
|
-
{
|
|
119514
|
+
value: function getVisibleCellRange(params /*: GetVisibleCellRangeParams*/) /*: VisibleCellRange*/{
|
|
119525
119515
|
var containerSize = params.containerSize,
|
|
119526
119516
|
offset = params.offset;
|
|
119527
119517
|
var totalSize = this.getTotalSize();
|
|
@@ -119542,6 +119532,7 @@ function () {
|
|
|
119542
119532
|
stop: stop
|
|
119543
119533
|
};
|
|
119544
119534
|
}
|
|
119535
|
+
|
|
119545
119536
|
/**
|
|
119546
119537
|
* Clear all cached values for cells after the specified index.
|
|
119547
119538
|
* This method should be called for any cell that has changed its size.
|
|
@@ -119549,18 +119540,12 @@ function () {
|
|
|
119549
119540
|
*/
|
|
119550
119541
|
}, {
|
|
119551
119542
|
key: "resetCell",
|
|
119552
|
-
value: function resetCell(index
|
|
119553
|
-
/*: number*/) /*: void*/
|
|
119554
|
-
{
|
|
119543
|
+
value: function resetCell(index /*: number*/) /*: void*/{
|
|
119555
119544
|
this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, index - 1);
|
|
119556
119545
|
}
|
|
119557
119546
|
}, {
|
|
119558
119547
|
key: "_binarySearch",
|
|
119559
|
-
value: function _binarySearch(high
|
|
119560
|
-
/*: number*/, low
|
|
119561
|
-
/*: number*/, offset
|
|
119562
|
-
/*: number*/) /*: number*/
|
|
119563
|
-
{
|
|
119548
|
+
value: function _binarySearch(high /*: number*/, low /*: number*/, offset /*: number*/) /*: number*/{
|
|
119564
119549
|
while (low <= high) {
|
|
119565
119550
|
var middle = low + Math.floor((high - low) / 2);
|
|
119566
119551
|
var currentOffset = this.getSizeAndPositionOfCell(middle).offset;
|
|
@@ -119580,10 +119565,7 @@ function () {
|
|
|
119580
119565
|
}
|
|
119581
119566
|
}, {
|
|
119582
119567
|
key: "_exponentialSearch",
|
|
119583
|
-
value: function _exponentialSearch(index
|
|
119584
|
-
/*: number*/, offset
|
|
119585
|
-
/*: number*/) /*: number*/
|
|
119586
|
-
{
|
|
119568
|
+
value: function _exponentialSearch(index /*: number*/, offset /*: number*/) /*: number*/{
|
|
119587
119569
|
var interval = 1;
|
|
119588
119570
|
while (index < this._cellCount && this.getSizeAndPositionOfCell(index).offset < offset) {
|
|
119589
119571
|
index += interval;
|
|
@@ -119591,6 +119573,7 @@ function () {
|
|
|
119591
119573
|
}
|
|
119592
119574
|
return this._binarySearch(Math.min(index, this._cellCount - 1), Math.floor(index / 2), offset);
|
|
119593
119575
|
}
|
|
119576
|
+
|
|
119594
119577
|
/**
|
|
119595
119578
|
* Searches for the cell (index) nearest the specified offset.
|
|
119596
119579
|
*
|
|
@@ -119599,14 +119582,13 @@ function () {
|
|
|
119599
119582
|
*/
|
|
119600
119583
|
}, {
|
|
119601
119584
|
key: "_findNearestCell",
|
|
119602
|
-
value: function _findNearestCell(offset
|
|
119603
|
-
/*: number*/) /*: number*/
|
|
119604
|
-
{
|
|
119585
|
+
value: function _findNearestCell(offset /*: number*/) /*: number*/{
|
|
119605
119586
|
if (isNaN(offset)) {
|
|
119606
119587
|
throw Error("Invalid offset ".concat(offset, " specified"));
|
|
119607
|
-
}
|
|
119608
|
-
// So make sure the offset is at least 0 or no match will be found.
|
|
119588
|
+
}
|
|
119609
119589
|
|
|
119590
|
+
// Our search algorithms find the nearest match at or below the specified offset.
|
|
119591
|
+
// So make sure the offset is at least 0 or no match will be found.
|
|
119610
119592
|
offset = Math.max(0, offset);
|
|
119611
119593
|
var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();
|
|
119612
119594
|
var lastMeasuredIndex = Math.max(0, this._lastMeasuredIndex);
|
|
@@ -119621,7 +119603,6 @@ function () {
|
|
|
119621
119603
|
}
|
|
119622
119604
|
}
|
|
119623
119605
|
}]);
|
|
119624
|
-
return CellSizeAndPositionManager;
|
|
119625
119606
|
}();
|
|
119626
119607
|
|
|
119627
119608
|
;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Grid/utils/maxElementSize.js
|
|
@@ -119633,8 +119614,7 @@ var maxElementSize_isBrowser = function isBrowser() {
|
|
|
119633
119614
|
var isChrome = function isChrome() {
|
|
119634
119615
|
return !!window.chrome;
|
|
119635
119616
|
};
|
|
119636
|
-
var getMaxElementSize = function getMaxElementSize() /*: number*/
|
|
119637
|
-
{
|
|
119617
|
+
var getMaxElementSize = function getMaxElementSize() /*: number*/{
|
|
119638
119618
|
if (maxElementSize_isBrowser()) {
|
|
119639
119619
|
if (isChrome()) {
|
|
119640
119620
|
return CHROME_MAX_ELEMENT_SIZE;
|
|
@@ -119647,7 +119627,7 @@ var getMaxElementSize = function getMaxElementSize() /*: number*/
|
|
|
119647
119627
|
|
|
119648
119628
|
|
|
119649
119629
|
|
|
119650
|
-
|
|
119630
|
+
var ScalingCellSizeAndPositionManager_excluded = ["maxScrollSize"];
|
|
119651
119631
|
/*:: import type {Alignment, CellSizeGetter, VisibleCellRange} from '../types';*/
|
|
119652
119632
|
|
|
119653
119633
|
|
|
@@ -119655,35 +119635,35 @@ var getMaxElementSize = function getMaxElementSize() /*: number*/
|
|
|
119655
119635
|
containerSize: number,
|
|
119656
119636
|
offset: number,
|
|
119657
119637
|
};*/
|
|
119658
|
-
|
|
119659
119638
|
/*:: type Params = {
|
|
119660
119639
|
maxScrollSize?: number,
|
|
119661
119640
|
cellCount: number,
|
|
119662
119641
|
cellSizeGetter: CellSizeGetter,
|
|
119663
119642
|
estimatedCellSize: number,
|
|
119664
119643
|
};*/
|
|
119665
|
-
|
|
119644
|
+
/**
|
|
119645
|
+
* Browsers have scroll offset limitations (eg Chrome stops scrolling at ~33.5M pixels where as Edge tops out at ~1.5M pixels).
|
|
119646
|
+
* After a certain position, the browser won't allow the user to scroll further (even via JavaScript scroll offset adjustments).
|
|
119647
|
+
* This util picks a lower ceiling for max size and artificially adjusts positions within to make it transparent for users.
|
|
119648
|
+
*/
|
|
119666
119649
|
/**
|
|
119667
119650
|
* Extends CellSizeAndPositionManager and adds scaling behavior for lists that are too large to fit within a browser's native limits.
|
|
119668
119651
|
*/
|
|
119669
|
-
var ScalingCellSizeAndPositionManager = /*#__PURE__*/
|
|
119670
|
-
function () {
|
|
119671
|
-
|
|
119672
|
-
var _ref$maxScrollSize = _ref.maxScrollSize,
|
|
119652
|
+
var ScalingCellSizeAndPositionManager = /*#__PURE__*/function () {
|
|
119653
|
+
function ScalingCellSizeAndPositionManager(_ref /*:: */) {
|
|
119654
|
+
var _ref$maxScrollSize = _ref /*:: */.maxScrollSize,
|
|
119673
119655
|
maxScrollSize = _ref$maxScrollSize === void 0 ? getMaxElementSize() : _ref$maxScrollSize,
|
|
119674
|
-
params = objectWithoutProperties_objectWithoutProperties(_ref
|
|
119656
|
+
params = objectWithoutProperties_objectWithoutProperties(_ref /*:: */, ScalingCellSizeAndPositionManager_excluded);
|
|
119675
119657
|
_classCallCheck(this, ScalingCellSizeAndPositionManager);
|
|
119676
119658
|
(0,defineProperty/* default */.A)(this, "_cellSizeAndPositionManager", void 0);
|
|
119677
119659
|
(0,defineProperty/* default */.A)(this, "_maxScrollSize", void 0);
|
|
119678
|
-
|
|
119679
119660
|
// Favor composition over inheritance to simplify IE10 support
|
|
119680
119661
|
this._cellSizeAndPositionManager = new CellSizeAndPositionManager(params);
|
|
119681
119662
|
this._maxScrollSize = maxScrollSize;
|
|
119682
119663
|
}
|
|
119683
|
-
_createClass(ScalingCellSizeAndPositionManager, [{
|
|
119664
|
+
return _createClass(ScalingCellSizeAndPositionManager, [{
|
|
119684
119665
|
key: "areOffsetsAdjusted",
|
|
119685
|
-
value: function areOffsetsAdjusted() /*: boolean*/
|
|
119686
|
-
{
|
|
119666
|
+
value: function areOffsetsAdjusted() /*: boolean*/{
|
|
119687
119667
|
return this._cellSizeAndPositionManager.getTotalSize() > this._maxScrollSize;
|
|
119688
119668
|
}
|
|
119689
119669
|
}, {
|
|
@@ -119698,32 +119678,29 @@ function () {
|
|
|
119698
119678
|
}
|
|
119699
119679
|
}, {
|
|
119700
119680
|
key: "getCellCount",
|
|
119701
|
-
value: function getCellCount() /*: number*/
|
|
119702
|
-
{
|
|
119681
|
+
value: function getCellCount() /*: number*/{
|
|
119703
119682
|
return this._cellSizeAndPositionManager.getCellCount();
|
|
119704
119683
|
}
|
|
119705
119684
|
}, {
|
|
119706
119685
|
key: "getEstimatedCellSize",
|
|
119707
|
-
value: function getEstimatedCellSize() /*: number*/
|
|
119708
|
-
{
|
|
119686
|
+
value: function getEstimatedCellSize() /*: number*/{
|
|
119709
119687
|
return this._cellSizeAndPositionManager.getEstimatedCellSize();
|
|
119710
119688
|
}
|
|
119711
119689
|
}, {
|
|
119712
119690
|
key: "getLastMeasuredIndex",
|
|
119713
|
-
value: function getLastMeasuredIndex() /*: number*/
|
|
119714
|
-
{
|
|
119691
|
+
value: function getLastMeasuredIndex() /*: number*/{
|
|
119715
119692
|
return this._cellSizeAndPositionManager.getLastMeasuredIndex();
|
|
119716
119693
|
}
|
|
119694
|
+
|
|
119717
119695
|
/**
|
|
119718
119696
|
* Number of pixels a cell at the given position (offset) should be shifted in order to fit within the scaled container.
|
|
119719
119697
|
* The offset passed to this function is scaled (safe) as well.
|
|
119720
119698
|
*/
|
|
119721
119699
|
}, {
|
|
119722
119700
|
key: "getOffsetAdjustment",
|
|
119723
|
-
value: function getOffsetAdjustment(_ref2) /*: number*/
|
|
119724
|
-
|
|
119725
|
-
|
|
119726
|
-
offset = _ref2.offset;
|
|
119701
|
+
value: function getOffsetAdjustment(_ref2 /*:: */) /*: number*/{
|
|
119702
|
+
var containerSize = _ref2 /*:: */.containerSize,
|
|
119703
|
+
offset = _ref2 /*:: */.offset;
|
|
119727
119704
|
var totalSize = this._cellSizeAndPositionManager.getTotalSize();
|
|
119728
119705
|
var safeTotalSize = this.getTotalSize();
|
|
119729
119706
|
var offsetPercentage = this._getOffsetPercentage({
|
|
@@ -119735,8 +119712,7 @@ function () {
|
|
|
119735
119712
|
}
|
|
119736
119713
|
}, {
|
|
119737
119714
|
key: "getSizeAndPositionOfCell",
|
|
119738
|
-
value: function getSizeAndPositionOfCell(index
|
|
119739
|
-
/*: number*/) {
|
|
119715
|
+
value: function getSizeAndPositionOfCell(index /*: number*/) {
|
|
119740
119716
|
return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index);
|
|
119741
119717
|
}
|
|
119742
119718
|
}, {
|
|
@@ -119744,22 +119720,23 @@ function () {
|
|
|
119744
119720
|
value: function getSizeAndPositionOfLastMeasuredCell() {
|
|
119745
119721
|
return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();
|
|
119746
119722
|
}
|
|
119723
|
+
|
|
119747
119724
|
/** See CellSizeAndPositionManager#getTotalSize */
|
|
119748
119725
|
}, {
|
|
119749
119726
|
key: "getTotalSize",
|
|
119750
|
-
value: function getTotalSize() /*: number*/
|
|
119751
|
-
{
|
|
119727
|
+
value: function getTotalSize() /*: number*/{
|
|
119752
119728
|
return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());
|
|
119753
119729
|
}
|
|
119730
|
+
|
|
119754
119731
|
/** See CellSizeAndPositionManager#getUpdatedOffsetForIndex */
|
|
119755
119732
|
}, {
|
|
119756
119733
|
key: "getUpdatedOffsetForIndex",
|
|
119757
|
-
value: function getUpdatedOffsetForIndex(_ref3) {
|
|
119758
|
-
var _ref3$align = _ref3
|
|
119734
|
+
value: function getUpdatedOffsetForIndex(_ref3 /*:: */) {
|
|
119735
|
+
var _ref3$align = _ref3 /*:: */.align,
|
|
119759
119736
|
align = _ref3$align === void 0 ? 'auto' : _ref3$align,
|
|
119760
|
-
containerSize = _ref3
|
|
119761
|
-
currentOffset = _ref3
|
|
119762
|
-
targetIndex = _ref3
|
|
119737
|
+
containerSize = _ref3 /*:: */.containerSize,
|
|
119738
|
+
currentOffset = _ref3 /*:: */.currentOffset,
|
|
119739
|
+
targetIndex = _ref3 /*:: */.targetIndex;
|
|
119763
119740
|
currentOffset = this._safeOffsetToOffset({
|
|
119764
119741
|
containerSize: containerSize,
|
|
119765
119742
|
offset: currentOffset
|
|
@@ -119775,13 +119752,13 @@ function () {
|
|
|
119775
119752
|
offset: offset
|
|
119776
119753
|
});
|
|
119777
119754
|
}
|
|
119755
|
+
|
|
119778
119756
|
/** See CellSizeAndPositionManager#getVisibleCellRange */
|
|
119779
119757
|
}, {
|
|
119780
119758
|
key: "getVisibleCellRange",
|
|
119781
|
-
value: function getVisibleCellRange(_ref4) /*: VisibleCellRange*/
|
|
119782
|
-
|
|
119783
|
-
|
|
119784
|
-
offset = _ref4.offset;
|
|
119759
|
+
value: function getVisibleCellRange(_ref4 /*:: */) /*: VisibleCellRange*/{
|
|
119760
|
+
var containerSize = _ref4 /*:: */.containerSize,
|
|
119761
|
+
offset = _ref4 /*:: */.offset;
|
|
119785
119762
|
offset = this._safeOffsetToOffset({
|
|
119786
119763
|
containerSize: containerSize,
|
|
119787
119764
|
offset: offset
|
|
@@ -119793,25 +119770,22 @@ function () {
|
|
|
119793
119770
|
}
|
|
119794
119771
|
}, {
|
|
119795
119772
|
key: "resetCell",
|
|
119796
|
-
value: function resetCell(index
|
|
119797
|
-
/*: number*/) /*: void*/
|
|
119798
|
-
{
|
|
119773
|
+
value: function resetCell(index /*: number*/) /*: void*/{
|
|
119799
119774
|
this._cellSizeAndPositionManager.resetCell(index);
|
|
119800
119775
|
}
|
|
119801
119776
|
}, {
|
|
119802
119777
|
key: "_getOffsetPercentage",
|
|
119803
|
-
value: function _getOffsetPercentage(_ref5) {
|
|
119804
|
-
var containerSize = _ref5
|
|
119805
|
-
offset = _ref5
|
|
119806
|
-
totalSize = _ref5
|
|
119778
|
+
value: function _getOffsetPercentage(_ref5 /*:: */) {
|
|
119779
|
+
var containerSize = _ref5 /*:: */.containerSize,
|
|
119780
|
+
offset = _ref5 /*:: */.offset,
|
|
119781
|
+
totalSize = _ref5 /*:: */.totalSize;
|
|
119807
119782
|
return totalSize <= containerSize ? 0 : offset / (totalSize - containerSize);
|
|
119808
119783
|
}
|
|
119809
119784
|
}, {
|
|
119810
119785
|
key: "_offsetToSafeOffset",
|
|
119811
|
-
value: function _offsetToSafeOffset(_ref6) /*: number*/
|
|
119812
|
-
|
|
119813
|
-
|
|
119814
|
-
offset = _ref6.offset;
|
|
119786
|
+
value: function _offsetToSafeOffset(_ref6 /*:: */) /*: number*/{
|
|
119787
|
+
var containerSize = _ref6 /*:: */.containerSize,
|
|
119788
|
+
offset = _ref6 /*:: */.offset;
|
|
119815
119789
|
var totalSize = this._cellSizeAndPositionManager.getTotalSize();
|
|
119816
119790
|
var safeTotalSize = this.getTotalSize();
|
|
119817
119791
|
if (totalSize === safeTotalSize) {
|
|
@@ -119827,10 +119801,9 @@ function () {
|
|
|
119827
119801
|
}
|
|
119828
119802
|
}, {
|
|
119829
119803
|
key: "_safeOffsetToOffset",
|
|
119830
|
-
value: function _safeOffsetToOffset(_ref7) /*: number*/
|
|
119831
|
-
|
|
119832
|
-
|
|
119833
|
-
offset = _ref7.offset;
|
|
119804
|
+
value: function _safeOffsetToOffset(_ref7 /*:: */) /*: number*/{
|
|
119805
|
+
var containerSize = _ref7 /*:: */.containerSize,
|
|
119806
|
+
offset = _ref7 /*:: */.offset;
|
|
119834
119807
|
var totalSize = this._cellSizeAndPositionManager.getTotalSize();
|
|
119835
119808
|
var safeTotalSize = this.getTotalSize();
|
|
119836
119809
|
if (totalSize === safeTotalSize) {
|
|
@@ -119845,7 +119818,6 @@ function () {
|
|
|
119845
119818
|
}
|
|
119846
119819
|
}
|
|
119847
119820
|
}]);
|
|
119848
|
-
return ScalingCellSizeAndPositionManager;
|
|
119849
119821
|
}();
|
|
119850
119822
|
|
|
119851
119823
|
;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/utils/createCallbackMemoizer.js
|
|
@@ -119880,18 +119852,18 @@ var SCROLL_DIRECTION_BACKWARD = -1;
|
|
|
119880
119852
|
var SCROLL_DIRECTION_FORWARD = 1;
|
|
119881
119853
|
var SCROLL_DIRECTION_HORIZONTAL = 'horizontal';
|
|
119882
119854
|
var SCROLL_DIRECTION_VERTICAL = 'vertical';
|
|
119855
|
+
|
|
119883
119856
|
/**
|
|
119884
119857
|
* Calculates the number of cells to overscan before and after a specified range.
|
|
119885
119858
|
* This function ensures that overscanning doesn't exceed the available cells.
|
|
119886
119859
|
*/
|
|
119887
119860
|
|
|
119888
|
-
function defaultOverscanIndicesGetter(_ref) /*: OverscanIndices*/
|
|
119889
|
-
|
|
119890
|
-
|
|
119891
|
-
|
|
119892
|
-
|
|
119893
|
-
|
|
119894
|
-
stopIndex = _ref.stopIndex;
|
|
119861
|
+
function defaultOverscanIndicesGetter(_ref /*:: */) /*: OverscanIndices*/{
|
|
119862
|
+
var cellCount = _ref /*:: */.cellCount,
|
|
119863
|
+
overscanCellsCount = _ref /*:: */.overscanCellsCount,
|
|
119864
|
+
scrollDirection = _ref /*:: */.scrollDirection,
|
|
119865
|
+
startIndex = _ref /*:: */.startIndex,
|
|
119866
|
+
stopIndex = _ref /*:: */.stopIndex;
|
|
119895
119867
|
if (scrollDirection === SCROLL_DIRECTION_FORWARD) {
|
|
119896
119868
|
return {
|
|
119897
119869
|
overscanStartIndex: Math.max(0, startIndex),
|
|
@@ -119907,11 +119879,11 @@ function defaultOverscanIndicesGetter(_ref) /*: OverscanIndices*/
|
|
|
119907
119879
|
;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Grid/utils/updateScrollIndexHelper.js
|
|
119908
119880
|
/*:: import type {Alignment, CellSize} from '../types';*/
|
|
119909
119881
|
|
|
119882
|
+
|
|
119910
119883
|
/**
|
|
119911
119884
|
* Helper function that determines when to update scroll offsets to ensure that a scroll-to-index remains visible.
|
|
119912
119885
|
* This function also ensures that the scroll ofset isn't past the last column/row of cells.
|
|
119913
119886
|
*/
|
|
119914
|
-
|
|
119915
119887
|
/*:: type Params = {
|
|
119916
119888
|
// Width or height of cells for the current axis
|
|
119917
119889
|
cellSize?: CellSize,
|
|
@@ -119949,28 +119921,30 @@ function defaultOverscanIndicesGetter(_ref) /*: OverscanIndices*/
|
|
|
119949
119921
|
// Callback to invoke with an scroll-to-index value
|
|
119950
119922
|
updateScrollIndexCallback: (index: number) => void,
|
|
119951
119923
|
};*/
|
|
119952
|
-
|
|
119953
|
-
|
|
119954
|
-
|
|
119955
|
-
|
|
119956
|
-
|
|
119957
|
-
|
|
119958
|
-
|
|
119959
|
-
|
|
119960
|
-
|
|
119961
|
-
|
|
119962
|
-
|
|
119963
|
-
|
|
119964
|
-
|
|
119965
|
-
|
|
119966
|
-
updateScrollIndexCallback = _ref.updateScrollIndexCallback;
|
|
119924
|
+
function updateScrollIndexHelper(_ref /*:: */) {
|
|
119925
|
+
var cellSize = _ref /*:: */.cellSize,
|
|
119926
|
+
cellSizeAndPositionManager = _ref /*:: */.cellSizeAndPositionManager,
|
|
119927
|
+
previousCellsCount = _ref /*:: */.previousCellsCount,
|
|
119928
|
+
previousCellSize = _ref /*:: */.previousCellSize,
|
|
119929
|
+
previousScrollToAlignment = _ref /*:: */.previousScrollToAlignment,
|
|
119930
|
+
previousScrollToIndex = _ref /*:: */.previousScrollToIndex,
|
|
119931
|
+
previousSize = _ref /*:: */.previousSize,
|
|
119932
|
+
scrollOffset = _ref /*:: */.scrollOffset,
|
|
119933
|
+
scrollToAlignment = _ref /*:: */.scrollToAlignment,
|
|
119934
|
+
scrollToIndex = _ref /*:: */.scrollToIndex,
|
|
119935
|
+
size = _ref /*:: */.size,
|
|
119936
|
+
sizeJustIncreasedFromZero = _ref /*:: */.sizeJustIncreasedFromZero,
|
|
119937
|
+
updateScrollIndexCallback = _ref /*:: */.updateScrollIndexCallback;
|
|
119967
119938
|
var cellCount = cellSizeAndPositionManager.getCellCount();
|
|
119968
119939
|
var hasScrollToIndex = scrollToIndex >= 0 && scrollToIndex < cellCount;
|
|
119969
|
-
var sizeHasChanged = size !== previousSize || sizeJustIncreasedFromZero || !previousCellSize || typeof cellSize === 'number' && cellSize !== previousCellSize;
|
|
119970
|
-
// We should ensure that the scroll target is visible.
|
|
119940
|
+
var sizeHasChanged = size !== previousSize || sizeJustIncreasedFromZero || !previousCellSize || typeof cellSize === 'number' && cellSize !== previousCellSize;
|
|
119971
119941
|
|
|
119942
|
+
// If we have a new scroll target OR if height/row-height has changed,
|
|
119943
|
+
// We should ensure that the scroll target is visible.
|
|
119972
119944
|
if (hasScrollToIndex && (sizeHasChanged || scrollToAlignment !== previousScrollToAlignment || scrollToIndex !== previousScrollToIndex)) {
|
|
119973
|
-
updateScrollIndexCallback(scrollToIndex);
|
|
119945
|
+
updateScrollIndexCallback(scrollToIndex);
|
|
119946
|
+
|
|
119947
|
+
// If we don't have a selected item but list size or number of children have decreased,
|
|
119974
119948
|
// Make sure we aren't scrolled too far past the current content.
|
|
119975
119949
|
} else if (!hasScrollToIndex && cellCount > 0 && (size < previousSize || cellCount < previousCellsCount)) {
|
|
119976
119950
|
// We need to ensure that the current scroll offset is still within the collection's range.
|
|
@@ -119985,35 +119959,37 @@ function updateScrollIndexHelper(_ref) {
|
|
|
119985
119959
|
;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Grid/defaultCellRangeRenderer.js
|
|
119986
119960
|
/*:: import type {CellRangeRendererParams} from './types';*/
|
|
119987
119961
|
|
|
119962
|
+
|
|
119988
119963
|
/**
|
|
119989
119964
|
* Default implementation of cellRangeRenderer used by Grid.
|
|
119990
119965
|
* This renderer supports cell-caching while the user is scrolling.
|
|
119991
119966
|
*/
|
|
119992
119967
|
|
|
119993
|
-
function defaultCellRangeRenderer(_ref) {
|
|
119994
|
-
var cellCache = _ref
|
|
119995
|
-
cellRenderer = _ref
|
|
119996
|
-
columnSizeAndPositionManager = _ref
|
|
119997
|
-
columnStartIndex = _ref
|
|
119998
|
-
columnStopIndex = _ref
|
|
119999
|
-
deferredMeasurementCache = _ref
|
|
120000
|
-
horizontalOffsetAdjustment = _ref
|
|
120001
|
-
isScrolling = _ref
|
|
120002
|
-
isScrollingOptOut = _ref
|
|
120003
|
-
parent = _ref
|
|
120004
|
-
rowSizeAndPositionManager = _ref
|
|
120005
|
-
rowStartIndex = _ref
|
|
120006
|
-
rowStopIndex = _ref
|
|
120007
|
-
styleCache = _ref
|
|
120008
|
-
verticalOffsetAdjustment = _ref
|
|
120009
|
-
visibleColumnIndices = _ref
|
|
120010
|
-
visibleRowIndices = _ref
|
|
120011
|
-
var renderedCells = [];
|
|
119968
|
+
function defaultCellRangeRenderer(_ref /*:: */) {
|
|
119969
|
+
var cellCache = _ref /*:: */.cellCache,
|
|
119970
|
+
cellRenderer = _ref /*:: */.cellRenderer,
|
|
119971
|
+
columnSizeAndPositionManager = _ref /*:: */.columnSizeAndPositionManager,
|
|
119972
|
+
columnStartIndex = _ref /*:: */.columnStartIndex,
|
|
119973
|
+
columnStopIndex = _ref /*:: */.columnStopIndex,
|
|
119974
|
+
deferredMeasurementCache = _ref /*:: */.deferredMeasurementCache,
|
|
119975
|
+
horizontalOffsetAdjustment = _ref /*:: */.horizontalOffsetAdjustment,
|
|
119976
|
+
isScrolling = _ref /*:: */.isScrolling,
|
|
119977
|
+
isScrollingOptOut = _ref /*:: */.isScrollingOptOut,
|
|
119978
|
+
parent = _ref /*:: */.parent,
|
|
119979
|
+
rowSizeAndPositionManager = _ref /*:: */.rowSizeAndPositionManager,
|
|
119980
|
+
rowStartIndex = _ref /*:: */.rowStartIndex,
|
|
119981
|
+
rowStopIndex = _ref /*:: */.rowStopIndex,
|
|
119982
|
+
styleCache = _ref /*:: */.styleCache,
|
|
119983
|
+
verticalOffsetAdjustment = _ref /*:: */.verticalOffsetAdjustment,
|
|
119984
|
+
visibleColumnIndices = _ref /*:: */.visibleColumnIndices,
|
|
119985
|
+
visibleRowIndices = _ref /*:: */.visibleRowIndices;
|
|
119986
|
+
var renderedCells = [];
|
|
119987
|
+
|
|
119988
|
+
// Browsers have native size limits for elements (eg Chrome 33M pixels, IE 1.5M pixes).
|
|
120012
119989
|
// User cannot scroll beyond these size limitations.
|
|
120013
119990
|
// In order to work around this, ScalingCellSizeAndPositionManager compresses offsets.
|
|
120014
119991
|
// We should never cache styles for compressed offsets though as this can lead to bugs.
|
|
120015
119992
|
// See issue #576 for more.
|
|
120016
|
-
|
|
120017
119993
|
var areOffsetsAdjusted = columnSizeAndPositionManager.areOffsetsAdjusted() || rowSizeAndPositionManager.areOffsetsAdjusted();
|
|
120018
119994
|
var canCacheStyle = !isScrolling && !areOffsetsAdjusted;
|
|
120019
119995
|
for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {
|
|
@@ -120022,8 +119998,9 @@ function defaultCellRangeRenderer(_ref) {
|
|
|
120022
119998
|
var columnDatum = columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex);
|
|
120023
119999
|
var isVisible = columnIndex >= visibleColumnIndices.start && columnIndex <= visibleColumnIndices.stop && rowIndex >= visibleRowIndices.start && rowIndex <= visibleRowIndices.stop;
|
|
120024
120000
|
var key = "".concat(rowIndex, "-").concat(columnIndex);
|
|
120025
|
-
var style = void 0;
|
|
120001
|
+
var style = void 0;
|
|
120026
120002
|
|
|
120003
|
+
// Cache style objects so shallow-compare doesn't re-render unnecessarily.
|
|
120027
120004
|
if (canCacheStyle && styleCache[key]) {
|
|
120028
120005
|
style = styleCache[key];
|
|
120029
120006
|
} else {
|
|
@@ -120060,7 +120037,9 @@ function defaultCellRangeRenderer(_ref) {
|
|
|
120060
120037
|
rowIndex: rowIndex,
|
|
120061
120038
|
style: style
|
|
120062
120039
|
};
|
|
120063
|
-
var renderedCell = void 0;
|
|
120040
|
+
var renderedCell = void 0;
|
|
120041
|
+
|
|
120042
|
+
// Avoid re-creating cells while scrolling.
|
|
120064
120043
|
// This can lead to the same cell being created many times and can cause performance issues for "heavy" cells.
|
|
120065
120044
|
// If a scroll is in progress- cache and reuse cells.
|
|
120066
120045
|
// This cache will be thrown away once scrolling completes.
|
|
@@ -120070,12 +120049,13 @@ function defaultCellRangeRenderer(_ref) {
|
|
|
120070
120049
|
//
|
|
120071
120050
|
// If isScrollingOptOut is specified, we always cache cells.
|
|
120072
120051
|
// For more info refer to issue #1028
|
|
120073
|
-
|
|
120074
120052
|
if ((isScrollingOptOut || isScrolling) && !horizontalOffsetAdjustment && !verticalOffsetAdjustment) {
|
|
120075
120053
|
if (!cellCache[key]) {
|
|
120076
120054
|
cellCache[key] = cellRenderer(cellRendererParams);
|
|
120077
120055
|
}
|
|
120078
|
-
renderedCell = cellCache[key];
|
|
120056
|
+
renderedCell = cellCache[key];
|
|
120057
|
+
|
|
120058
|
+
// If the user is no longer scrolling, don't cache cells.
|
|
120079
120059
|
// This makes dynamic cell content difficult for users and would also lead to a heavier memory footprint.
|
|
120080
120060
|
} else {
|
|
120081
120061
|
renderedCell = cellRenderer(cellRendererParams);
|
|
@@ -120122,9 +120102,7 @@ function scrollbarSize(recalc) {
|
|
|
120122
120102
|
var react_lifecycles_compat_es = __webpack_require__(62135);
|
|
120123
120103
|
;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/utils/animationFrame.js
|
|
120124
120104
|
/*:: type Callback = (timestamp: number) => void;*/
|
|
120125
|
-
|
|
120126
120105
|
/*:: type CancelAnimationFrame = (requestId: number) => void;*/
|
|
120127
|
-
|
|
120128
120106
|
/*:: type RequestAnimationFrame = (callback: Callback) => number;*/
|
|
120129
120107
|
// Properly handle server-side rendering.
|
|
120130
120108
|
var win;
|
|
@@ -120134,49 +120112,36 @@ if (typeof window !== 'undefined') {
|
|
|
120134
120112
|
win = self;
|
|
120135
120113
|
} else {
|
|
120136
120114
|
win = {};
|
|
120137
|
-
}
|
|
120138
|
-
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
|
|
120115
|
+
}
|
|
120139
120116
|
|
|
120140
|
-
|
|
120141
|
-
|
|
120142
|
-
{
|
|
120143
|
-
return win
|
|
120144
|
-
|
|
120145
|
-
|
|
120146
|
-
|
|
120147
|
-
|
|
120148
|
-
|
|
120149
|
-
|
|
120150
|
-
};
|
|
120151
|
-
var raf
|
|
120152
|
-
/*: RequestAnimationFrame*/ = request
|
|
120153
|
-
/*: any*/;
|
|
120154
|
-
var caf
|
|
120155
|
-
/*: CancelAnimationFrame*/ = cancel
|
|
120156
|
-
/*: any*/;
|
|
120117
|
+
// requestAnimationFrame() shim by Paul Irish
|
|
120118
|
+
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
|
|
120119
|
+
var request = win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || win.oRequestAnimationFrame || win.msRequestAnimationFrame || function (callback /*: Callback*/) /*: RequestAnimationFrame*/{
|
|
120120
|
+
return win /*: any*/.setTimeout(callback, 1000 / 60);
|
|
120121
|
+
};
|
|
120122
|
+
var cancel = win.cancelAnimationFrame || win.webkitCancelAnimationFrame || win.mozCancelAnimationFrame || win.oCancelAnimationFrame || win.msCancelAnimationFrame || function (id /*: number*/) {
|
|
120123
|
+
win /*: any*/.clearTimeout(id);
|
|
120124
|
+
};
|
|
120125
|
+
var raf /*: RequestAnimationFrame*/ = request /*: any*/;
|
|
120126
|
+
var caf /*: CancelAnimationFrame*/ = cancel /*: any*/;
|
|
120157
120127
|
;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/utils/requestAnimationTimeout.js
|
|
120158
120128
|
|
|
120159
120129
|
/*:: export type AnimationTimeoutId = {
|
|
120160
120130
|
id: number,
|
|
120161
120131
|
};*/
|
|
120162
|
-
|
|
120163
|
-
var cancelAnimationTimeout = function cancelAnimationTimeout(frame
|
|
120164
|
-
/*: AnimationTimeoutId*/) {
|
|
120132
|
+
var cancelAnimationTimeout = function cancelAnimationTimeout(frame /*: AnimationTimeoutId*/) {
|
|
120165
120133
|
return caf(frame.id);
|
|
120166
120134
|
};
|
|
120135
|
+
|
|
120167
120136
|
/**
|
|
120168
120137
|
* Recursively calls requestAnimationFrame until a specified delay has been met or exceeded.
|
|
120169
120138
|
* When the delay time has been reached the function you're timing out will be called.
|
|
120170
120139
|
*
|
|
120171
120140
|
* Credit: Joe Lambert (https://gist.github.com/joelambert/1002116#file-requesttimeout-js)
|
|
120172
120141
|
*/
|
|
120173
|
-
|
|
120174
|
-
var
|
|
120175
|
-
|
|
120176
|
-
/*: number*/) /*: AnimationTimeoutId*/
|
|
120177
|
-
{
|
|
120178
|
-
var start; // wait for end of processing current event handler, because event handler may be long
|
|
120179
|
-
|
|
120142
|
+
var requestAnimationTimeout = function requestAnimationTimeout(callback /*: Function*/, delay /*: number*/) /*: AnimationTimeoutId*/{
|
|
120143
|
+
var start;
|
|
120144
|
+
// wait for end of processing current event handler, because event handler may be long
|
|
120180
120145
|
Promise.resolve().then(function () {
|
|
120181
120146
|
start = Date.now();
|
|
120182
120147
|
});
|
|
@@ -120187,8 +120152,7 @@ var requestAnimationTimeout = function requestAnimationTimeout(callback
|
|
|
120187
120152
|
frame.id = raf(timeout);
|
|
120188
120153
|
}
|
|
120189
120154
|
};
|
|
120190
|
-
var frame
|
|
120191
|
-
/*: AnimationTimeoutId*/ = {
|
|
120155
|
+
var frame /*: AnimationTimeoutId*/ = {
|
|
120192
120156
|
id: raf(timeout)
|
|
120193
120157
|
};
|
|
120194
120158
|
return frame;
|
|
@@ -120202,36 +120166,38 @@ function _extends2() { return _extends2 = Object.assign ? Object.assign.bind() :
|
|
|
120202
120166
|
|
|
120203
120167
|
|
|
120204
120168
|
|
|
120205
|
-
|
|
120206
|
-
|
|
120207
|
-
var keys = Object.keys(object);
|
|
120169
|
+
function Grid_ownKeys(e, r) {
|
|
120170
|
+
var t = Object.keys(e);
|
|
120208
120171
|
if (Object.getOwnPropertySymbols) {
|
|
120209
|
-
var
|
|
120210
|
-
|
|
120211
|
-
return Object.getOwnPropertyDescriptor(
|
|
120212
|
-
});
|
|
120213
|
-
keys.push.apply(keys, symbols);
|
|
120172
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
120173
|
+
r && (o = o.filter(function (r) {
|
|
120174
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
120175
|
+
})), t.push.apply(t, o);
|
|
120214
120176
|
}
|
|
120215
|
-
return
|
|
120177
|
+
return t;
|
|
120216
120178
|
}
|
|
120217
|
-
function Grid_objectSpread(
|
|
120218
|
-
for (var
|
|
120219
|
-
var
|
|
120220
|
-
|
|
120221
|
-
|
|
120222
|
-
|
|
120223
|
-
|
|
120224
|
-
}
|
|
120225
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
120226
|
-
} else {
|
|
120227
|
-
Grid_ownKeys(source).forEach(function (key) {
|
|
120228
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
120229
|
-
});
|
|
120230
|
-
}
|
|
120179
|
+
function Grid_objectSpread(e) {
|
|
120180
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
120181
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
120182
|
+
r % 2 ? Grid_ownKeys(Object(t), !0).forEach(function (r) {
|
|
120183
|
+
(0,defineProperty/* default */.A)(e, r, t[r]);
|
|
120184
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Grid_ownKeys(Object(t)).forEach(function (r) {
|
|
120185
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
120186
|
+
});
|
|
120231
120187
|
}
|
|
120232
|
-
return
|
|
120188
|
+
return e;
|
|
120189
|
+
}
|
|
120190
|
+
function Grid_callSuper(t, o, e) {
|
|
120191
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, Grid_isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
120192
|
+
}
|
|
120193
|
+
function Grid_isNativeReflectConstruct() {
|
|
120194
|
+
try {
|
|
120195
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
120196
|
+
} catch (t) {}
|
|
120197
|
+
return (Grid_isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
|
120198
|
+
return !!t;
|
|
120199
|
+
})();
|
|
120233
120200
|
}
|
|
120234
|
-
|
|
120235
120201
|
/*:: import type {
|
|
120236
120202
|
CellRenderer,
|
|
120237
120203
|
CellRangeRenderer,
|
|
@@ -120247,7 +120213,6 @@ function Grid_objectSpread(target) {
|
|
|
120247
120213
|
CellCache,
|
|
120248
120214
|
StyleCache,
|
|
120249
120215
|
} from './types';*/
|
|
120250
|
-
|
|
120251
120216
|
/*:: import type {AnimationTimeoutId} from '../utils/requestAnimationTimeout';*/
|
|
120252
120217
|
|
|
120253
120218
|
|
|
@@ -120260,30 +120225,28 @@ function Grid_objectSpread(target) {
|
|
|
120260
120225
|
|
|
120261
120226
|
|
|
120262
120227
|
|
|
120228
|
+
|
|
120263
120229
|
/**
|
|
120264
120230
|
* Specifies the number of milliseconds during which to disable pointer events while a scroll is in progress.
|
|
120265
120231
|
* This improves performance and makes scrolling smoother.
|
|
120266
120232
|
*/
|
|
120267
|
-
|
|
120268
120233
|
var DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150;
|
|
120234
|
+
|
|
120269
120235
|
/**
|
|
120270
120236
|
* Controls whether the Grid updates the DOM element's scrollLeft/scrollTop based on the current state or just observes it.
|
|
120271
120237
|
* This prevents Grid from interrupting mouse-wheel animations (see issue #2).
|
|
120272
120238
|
*/
|
|
120273
|
-
|
|
120274
120239
|
var SCROLL_POSITION_CHANGE_REASONS = {
|
|
120275
120240
|
OBSERVED: 'observed',
|
|
120276
120241
|
REQUESTED: 'requested'
|
|
120277
120242
|
};
|
|
120278
|
-
var renderNull
|
|
120279
|
-
/*: NoContentRenderer*/ = function renderNull() {
|
|
120243
|
+
var renderNull /*: NoContentRenderer*/ = function renderNull /*: NoContentRenderer*/() {
|
|
120280
120244
|
return null;
|
|
120281
120245
|
};
|
|
120282
120246
|
/*:: type ScrollPosition = {
|
|
120283
120247
|
scrollTop?: number,
|
|
120284
120248
|
scrollLeft?: number,
|
|
120285
120249
|
};*/
|
|
120286
|
-
|
|
120287
120250
|
/*:: type Props = {
|
|
120288
120251
|
'aria-label': string,
|
|
120289
120252
|
'aria-readonly'?: boolean,
|
|
@@ -120449,7 +120412,6 @@ var renderNull
|
|
|
120449
120412
|
/** Width of Grid; this property determines the number of visible (vs virtualized) columns. *-/
|
|
120450
120413
|
width: number,
|
|
120451
120414
|
};*/
|
|
120452
|
-
|
|
120453
120415
|
/*:: type InstanceProps = {
|
|
120454
120416
|
prevColumnWidth: CellSize,
|
|
120455
120417
|
prevRowHeight: CellSize,
|
|
@@ -120466,7 +120428,6 @@ var renderNull
|
|
|
120466
120428
|
scrollbarSize: number,
|
|
120467
120429
|
scrollbarSizeMeasured: boolean,
|
|
120468
120430
|
};*/
|
|
120469
|
-
|
|
120470
120431
|
/*:: type State = {
|
|
120471
120432
|
instanceProps: InstanceProps,
|
|
120472
120433
|
isScrolling: boolean,
|
|
@@ -120477,54 +120438,49 @@ var renderNull
|
|
|
120477
120438
|
scrollPositionChangeReason: 'observed' | 'requested' | null,
|
|
120478
120439
|
needToResetStyleCache: boolean,
|
|
120479
120440
|
};*/
|
|
120480
|
-
|
|
120481
120441
|
/**
|
|
120482
120442
|
* Renders tabular data with virtualization along the vertical and horizontal axes.
|
|
120483
120443
|
* Row heights and column widths must be known ahead of time and specified as properties.
|
|
120484
120444
|
*/
|
|
120485
|
-
var Grid = /*#__PURE__*/
|
|
120486
|
-
function (
|
|
120487
|
-
_inherits(Grid, _React$PureComponent);
|
|
120488
|
-
|
|
120489
|
-
// Invokes onSectionRendered callback only when start/stop row or column indices change
|
|
120490
|
-
function Grid(props
|
|
120491
|
-
/*: Props*/) {
|
|
120445
|
+
var Grid = /*#__PURE__*/function (_React$PureComponent) {
|
|
120446
|
+
function Grid(props /*: Props*/) {
|
|
120492
120447
|
var _this;
|
|
120493
120448
|
_classCallCheck(this, Grid);
|
|
120494
|
-
_this =
|
|
120495
|
-
|
|
120496
|
-
(0,defineProperty/* default */.A)(
|
|
120497
|
-
(0,defineProperty/* default */.A)(
|
|
120498
|
-
(0,defineProperty/* default */.A)(
|
|
120499
|
-
(0,defineProperty/* default */.A)(
|
|
120500
|
-
(0,defineProperty/* default */.A)(
|
|
120501
|
-
(0,defineProperty/* default */.A)(
|
|
120502
|
-
(0,defineProperty/* default */.A)(
|
|
120503
|
-
(0,defineProperty/* default */.A)(
|
|
120504
|
-
(0,defineProperty/* default */.A)(
|
|
120505
|
-
(0,defineProperty/* default */.A)(
|
|
120506
|
-
(0,defineProperty/* default */.A)(
|
|
120507
|
-
(0,defineProperty/* default */.A)(
|
|
120508
|
-
(0,defineProperty/* default */.A)(
|
|
120509
|
-
(0,defineProperty/* default */.A)(
|
|
120510
|
-
(0,defineProperty/* default */.A)(
|
|
120511
|
-
(0,defineProperty/* default */.A)(
|
|
120512
|
-
(0,defineProperty/* default */.A)(
|
|
120513
|
-
(0,defineProperty/* default */.A)(
|
|
120514
|
-
(0,defineProperty/* default */.A)(
|
|
120515
|
-
(0,defineProperty/* default */.A)(
|
|
120516
|
-
(0,defineProperty/* default */.A)(
|
|
120517
|
-
(0,defineProperty/* default */.A)(
|
|
120518
|
-
(0,defineProperty/* default */.A)(
|
|
120519
|
-
(0,defineProperty/* default */.A)(
|
|
120520
|
-
|
|
120521
|
-
|
|
120449
|
+
_this = Grid_callSuper(this, Grid, [props]);
|
|
120450
|
+
// Invokes onSectionRendered callback only when start/stop row or column indices change
|
|
120451
|
+
(0,defineProperty/* default */.A)(_this, "_onGridRenderedMemoizer", createCallbackMemoizer());
|
|
120452
|
+
(0,defineProperty/* default */.A)(_this, "_onScrollMemoizer", createCallbackMemoizer(false));
|
|
120453
|
+
(0,defineProperty/* default */.A)(_this, "_deferredInvalidateColumnIndex", null);
|
|
120454
|
+
(0,defineProperty/* default */.A)(_this, "_deferredInvalidateRowIndex", null);
|
|
120455
|
+
(0,defineProperty/* default */.A)(_this, "_recomputeScrollLeftFlag", false);
|
|
120456
|
+
(0,defineProperty/* default */.A)(_this, "_recomputeScrollTopFlag", false);
|
|
120457
|
+
(0,defineProperty/* default */.A)(_this, "_horizontalScrollBarSize", 0);
|
|
120458
|
+
(0,defineProperty/* default */.A)(_this, "_verticalScrollBarSize", 0);
|
|
120459
|
+
(0,defineProperty/* default */.A)(_this, "_scrollbarPresenceChanged", false);
|
|
120460
|
+
(0,defineProperty/* default */.A)(_this, "_scrollingContainer", void 0);
|
|
120461
|
+
(0,defineProperty/* default */.A)(_this, "_childrenToDisplay", void 0);
|
|
120462
|
+
(0,defineProperty/* default */.A)(_this, "_columnStartIndex", void 0);
|
|
120463
|
+
(0,defineProperty/* default */.A)(_this, "_columnStopIndex", void 0);
|
|
120464
|
+
(0,defineProperty/* default */.A)(_this, "_rowStartIndex", void 0);
|
|
120465
|
+
(0,defineProperty/* default */.A)(_this, "_rowStopIndex", void 0);
|
|
120466
|
+
(0,defineProperty/* default */.A)(_this, "_renderedColumnStartIndex", 0);
|
|
120467
|
+
(0,defineProperty/* default */.A)(_this, "_renderedColumnStopIndex", 0);
|
|
120468
|
+
(0,defineProperty/* default */.A)(_this, "_renderedRowStartIndex", 0);
|
|
120469
|
+
(0,defineProperty/* default */.A)(_this, "_renderedRowStopIndex", 0);
|
|
120470
|
+
(0,defineProperty/* default */.A)(_this, "_initialScrollTop", void 0);
|
|
120471
|
+
(0,defineProperty/* default */.A)(_this, "_initialScrollLeft", void 0);
|
|
120472
|
+
(0,defineProperty/* default */.A)(_this, "_disablePointerEventsTimeoutId", void 0);
|
|
120473
|
+
(0,defineProperty/* default */.A)(_this, "_styleCache", {});
|
|
120474
|
+
(0,defineProperty/* default */.A)(_this, "_cellCache", {});
|
|
120475
|
+
(0,defineProperty/* default */.A)(_this, "_debounceScrollEndedCallback", function () {
|
|
120476
|
+
_this._disablePointerEventsTimeoutId = null;
|
|
120477
|
+
// isScrolling is used to determine if we reset styleCache
|
|
120522
120478
|
_this.setState({
|
|
120523
120479
|
isScrolling: false,
|
|
120524
120480
|
needToResetStyleCache: false
|
|
120525
120481
|
});
|
|
120526
120482
|
});
|
|
120527
|
-
(0,defineProperty/* default */.A)(
|
|
120483
|
+
(0,defineProperty/* default */.A)(_this, "_invokeOnGridRenderedHelper", function () {
|
|
120528
120484
|
var onSectionRendered = _this.props.onSectionRendered;
|
|
120529
120485
|
_this._onGridRenderedMemoizer({
|
|
120530
120486
|
callback: onSectionRendered,
|
|
@@ -120540,18 +120496,15 @@ function (_React$PureComponent) {
|
|
|
120540
120496
|
}
|
|
120541
120497
|
});
|
|
120542
120498
|
});
|
|
120543
|
-
(0,defineProperty/* default */.A)(
|
|
120544
|
-
/*: Element*/) {
|
|
120499
|
+
(0,defineProperty/* default */.A)(_this, "_setScrollingContainerRef", function (ref /*: Element*/) {
|
|
120545
120500
|
_this._scrollingContainer = ref;
|
|
120546
120501
|
});
|
|
120547
|
-
(0,defineProperty/* default */.A)(
|
|
120548
|
-
/*: Event*/) {
|
|
120502
|
+
(0,defineProperty/* default */.A)(_this, "_onScroll", function (event /*: Event*/) {
|
|
120549
120503
|
// In certain edge-cases React dispatches an onScroll event with an invalid target.scrollLeft / target.scrollTop.
|
|
120550
120504
|
// This invalid event can be detected by comparing event.target to this component's scrollable DOM element.
|
|
120551
120505
|
// See issue #404 for more information.
|
|
120552
120506
|
if (event.target === _this._scrollingContainer) {
|
|
120553
|
-
_this.handleScrollEvent(event.target
|
|
120554
|
-
/*: any*/);
|
|
120507
|
+
_this.handleScrollEvent(event.target /*: any*/);
|
|
120555
120508
|
}
|
|
120556
120509
|
});
|
|
120557
120510
|
var columnSizeAndPositionManager = new ScalingCellSizeAndPositionManager({
|
|
@@ -120598,11 +120551,12 @@ function (_React$PureComponent) {
|
|
|
120598
120551
|
}
|
|
120599
120552
|
return _this;
|
|
120600
120553
|
}
|
|
120554
|
+
|
|
120601
120555
|
/**
|
|
120602
120556
|
* Gets offsets for a given cell and alignment.
|
|
120603
120557
|
*/
|
|
120604
|
-
|
|
120605
|
-
_createClass(Grid, [{
|
|
120558
|
+
_inherits(Grid, _React$PureComponent);
|
|
120559
|
+
return _createClass(Grid, [{
|
|
120606
120560
|
key: "getOffsetForCell",
|
|
120607
120561
|
value: function getOffsetForCell() {
|
|
120608
120562
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -120612,7 +120566,7 @@ function (_React$PureComponent) {
|
|
|
120612
120566
|
columnIndex = _ref$columnIndex === void 0 ? this.props.scrollToColumn : _ref$columnIndex,
|
|
120613
120567
|
_ref$rowIndex = _ref.rowIndex,
|
|
120614
120568
|
rowIndex = _ref$rowIndex === void 0 ? this.props.scrollToRow : _ref$rowIndex;
|
|
120615
|
-
var offsetProps = Grid_objectSpread({}, this.props, {
|
|
120569
|
+
var offsetProps = Grid_objectSpread(Grid_objectSpread({}, this.props), {}, {
|
|
120616
120570
|
scrollToAlignment: alignment,
|
|
120617
120571
|
scrollToColumn: columnIndex,
|
|
120618
120572
|
scrollToRow: rowIndex
|
|
@@ -120622,6 +120576,7 @@ function (_React$PureComponent) {
|
|
|
120622
120576
|
scrollTop: this._getCalculatedScrollTop(offsetProps)
|
|
120623
120577
|
};
|
|
120624
120578
|
}
|
|
120579
|
+
|
|
120625
120580
|
/**
|
|
120626
120581
|
* Gets estimated total rows' height.
|
|
120627
120582
|
*/
|
|
@@ -120630,6 +120585,7 @@ function (_React$PureComponent) {
|
|
|
120630
120585
|
value: function getTotalRowsHeight() {
|
|
120631
120586
|
return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize();
|
|
120632
120587
|
}
|
|
120588
|
+
|
|
120633
120589
|
/**
|
|
120634
120590
|
* Gets estimated total columns' width.
|
|
120635
120591
|
*/
|
|
@@ -120638,51 +120594,53 @@ function (_React$PureComponent) {
|
|
|
120638
120594
|
value: function getTotalColumnsWidth() {
|
|
120639
120595
|
return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize();
|
|
120640
120596
|
}
|
|
120597
|
+
|
|
120641
120598
|
/**
|
|
120642
120599
|
* This method handles a scroll event originating from an external scroll control.
|
|
120643
120600
|
* It's an advanced method and should probably not be used unless you're implementing a custom scroll-bar solution.
|
|
120644
120601
|
*/
|
|
120645
120602
|
}, {
|
|
120646
120603
|
key: "handleScrollEvent",
|
|
120647
|
-
value: function handleScrollEvent(_ref2) {
|
|
120648
|
-
var _ref2$scrollLeft = _ref2
|
|
120604
|
+
value: function handleScrollEvent(_ref2 /*:: */) {
|
|
120605
|
+
var _ref2$scrollLeft = _ref2 /*:: */.scrollLeft,
|
|
120649
120606
|
scrollLeftParam = _ref2$scrollLeft === void 0 ? 0 : _ref2$scrollLeft,
|
|
120650
|
-
_ref2$scrollTop = _ref2
|
|
120607
|
+
_ref2$scrollTop = _ref2 /*:: */.scrollTop,
|
|
120651
120608
|
scrollTopParam = _ref2$scrollTop === void 0 ? 0 : _ref2$scrollTop;
|
|
120652
|
-
|
|
120653
120609
|
// On iOS, we can arrive at negative offsets by swiping past the start.
|
|
120654
120610
|
// To prevent flicker here, we make playing in the negative offset zone cause nothing to happen.
|
|
120655
120611
|
if (scrollTopParam < 0) {
|
|
120656
120612
|
return;
|
|
120657
|
-
}
|
|
120613
|
+
}
|
|
120658
120614
|
|
|
120615
|
+
// Prevent pointer events from interrupting a smooth scroll
|
|
120659
120616
|
this._debounceScrollEnded();
|
|
120660
120617
|
var _this$props = this.props,
|
|
120661
120618
|
autoHeight = _this$props.autoHeight,
|
|
120662
120619
|
autoWidth = _this$props.autoWidth,
|
|
120663
120620
|
height = _this$props.height,
|
|
120664
120621
|
width = _this$props.width;
|
|
120665
|
-
var instanceProps = this.state.instanceProps;
|
|
120622
|
+
var instanceProps = this.state.instanceProps;
|
|
120623
|
+
|
|
120624
|
+
// When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,
|
|
120666
120625
|
// Gradually converging on a scrollTop that is within the bounds of the new, smaller height.
|
|
120667
120626
|
// This causes a series of rapid renders that is slow for long lists.
|
|
120668
120627
|
// We can avoid that by doing some simple bounds checking to ensure that scroll offsets never exceed their bounds.
|
|
120669
|
-
|
|
120670
120628
|
var scrollbarSize = instanceProps.scrollbarSize;
|
|
120671
120629
|
var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();
|
|
120672
120630
|
var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();
|
|
120673
120631
|
var scrollLeft = Math.min(Math.max(0, totalColumnsWidth - width + scrollbarSize), scrollLeftParam);
|
|
120674
|
-
var scrollTop = Math.min(Math.max(0, totalRowsHeight - height + scrollbarSize), scrollTopParam);
|
|
120632
|
+
var scrollTop = Math.min(Math.max(0, totalRowsHeight - height + scrollbarSize), scrollTopParam);
|
|
120633
|
+
|
|
120634
|
+
// Certain devices (like Apple touchpad) rapid-fire duplicate events.
|
|
120675
120635
|
// Don't force a re-render if this is the case.
|
|
120676
120636
|
// The mouse may move faster then the animation frame does.
|
|
120677
120637
|
// Use requestAnimationFrame to avoid over-updating.
|
|
120678
|
-
|
|
120679
120638
|
if (this.state.scrollLeft !== scrollLeft || this.state.scrollTop !== scrollTop) {
|
|
120680
120639
|
// Track scrolling direction so we can more efficiently overscan rows to reduce empty space around the edges while scrolling.
|
|
120681
120640
|
// Don't change direction for an axis unless scroll offset has changed.
|
|
120682
120641
|
var scrollDirectionHorizontal = scrollLeft !== this.state.scrollLeft ? scrollLeft > this.state.scrollLeft ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_BACKWARD : this.state.scrollDirectionHorizontal;
|
|
120683
120642
|
var scrollDirectionVertical = scrollTop !== this.state.scrollTop ? scrollTop > this.state.scrollTop ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_BACKWARD : this.state.scrollDirectionVertical;
|
|
120684
|
-
var newState
|
|
120685
|
-
/*: $Shape<State>*/ = {
|
|
120643
|
+
var newState /*: $Shape<State>*/ = {
|
|
120686
120644
|
isScrolling: true,
|
|
120687
120645
|
scrollDirectionHorizontal: scrollDirectionHorizontal,
|
|
120688
120646
|
scrollDirectionVertical: scrollDirectionVertical,
|
|
@@ -120704,6 +120662,7 @@ function (_React$PureComponent) {
|
|
|
120704
120662
|
totalRowsHeight: totalRowsHeight
|
|
120705
120663
|
});
|
|
120706
120664
|
}
|
|
120665
|
+
|
|
120707
120666
|
/**
|
|
120708
120667
|
* Invalidate Grid size and recompute visible cells.
|
|
120709
120668
|
* This is a deferred wrapper for recomputeGridSize().
|
|
@@ -120713,12 +120672,13 @@ function (_React$PureComponent) {
|
|
|
120713
120672
|
// @TODO (bvaughn) Add automated test coverage for this.
|
|
120714
120673
|
}, {
|
|
120715
120674
|
key: "invalidateCellSizeAfterRender",
|
|
120716
|
-
value: function invalidateCellSizeAfterRender(_ref3) {
|
|
120717
|
-
var columnIndex = _ref3
|
|
120718
|
-
rowIndex = _ref3
|
|
120675
|
+
value: function invalidateCellSizeAfterRender(_ref3 /*:: */) {
|
|
120676
|
+
var columnIndex = _ref3 /*:: */.columnIndex,
|
|
120677
|
+
rowIndex = _ref3 /*:: */.rowIndex;
|
|
120719
120678
|
this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex === 'number' ? Math.min(this._deferredInvalidateColumnIndex, columnIndex) : columnIndex;
|
|
120720
120679
|
this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex === 'number' ? Math.min(this._deferredInvalidateRowIndex, rowIndex) : rowIndex;
|
|
120721
120680
|
}
|
|
120681
|
+
|
|
120722
120682
|
/**
|
|
120723
120683
|
* Pre-measure all columns and rows in a Grid.
|
|
120724
120684
|
* Typically cells are only measured as needed and estimated sizes are used for cells that have not yet been measured.
|
|
@@ -120734,6 +120694,7 @@ function (_React$PureComponent) {
|
|
|
120734
120694
|
instanceProps.columnSizeAndPositionManager.getSizeAndPositionOfCell(columnCount - 1);
|
|
120735
120695
|
instanceProps.rowSizeAndPositionManager.getSizeAndPositionOfCell(rowCount - 1);
|
|
120736
120696
|
}
|
|
120697
|
+
|
|
120737
120698
|
/**
|
|
120738
120699
|
* Forced recompute of row heights and column widths.
|
|
120739
120700
|
* This function should be called if dynamic column or row sizes have changed but nothing else has.
|
|
@@ -120752,37 +120713,41 @@ function (_React$PureComponent) {
|
|
|
120752
120713
|
scrollToRow = _this$props3.scrollToRow;
|
|
120753
120714
|
var instanceProps = this.state.instanceProps;
|
|
120754
120715
|
instanceProps.columnSizeAndPositionManager.resetCell(columnIndex);
|
|
120755
|
-
instanceProps.rowSizeAndPositionManager.resetCell(rowIndex);
|
|
120716
|
+
instanceProps.rowSizeAndPositionManager.resetCell(rowIndex);
|
|
120717
|
+
|
|
120718
|
+
// Cell sizes may be determined by a function property.
|
|
120756
120719
|
// In this case the cDU handler can't know if they changed.
|
|
120757
120720
|
// Store this flag to let the next cDU pass know it needs to recompute the scroll offset.
|
|
120758
|
-
|
|
120759
120721
|
this._recomputeScrollLeftFlag = scrollToColumn >= 0 && (this.state.scrollDirectionHorizontal === SCROLL_DIRECTION_FORWARD ? columnIndex <= scrollToColumn : columnIndex >= scrollToColumn);
|
|
120760
|
-
this._recomputeScrollTopFlag = scrollToRow >= 0 && (this.state.scrollDirectionVertical === SCROLL_DIRECTION_FORWARD ? rowIndex <= scrollToRow : rowIndex >= scrollToRow);
|
|
120761
|
-
// Invalid row heights likely mean invalid cached content as well.
|
|
120722
|
+
this._recomputeScrollTopFlag = scrollToRow >= 0 && (this.state.scrollDirectionVertical === SCROLL_DIRECTION_FORWARD ? rowIndex <= scrollToRow : rowIndex >= scrollToRow);
|
|
120762
120723
|
|
|
120724
|
+
// Clear cell cache in case we are scrolling;
|
|
120725
|
+
// Invalid row heights likely mean invalid cached content as well.
|
|
120763
120726
|
this._styleCache = {};
|
|
120764
120727
|
this._cellCache = {};
|
|
120765
120728
|
this.forceUpdate();
|
|
120766
120729
|
}
|
|
120730
|
+
|
|
120767
120731
|
/**
|
|
120768
120732
|
* Ensure column and row are visible.
|
|
120769
120733
|
*/
|
|
120770
120734
|
}, {
|
|
120771
120735
|
key: "scrollToCell",
|
|
120772
|
-
value: function scrollToCell(_ref5) {
|
|
120773
|
-
var columnIndex = _ref5
|
|
120774
|
-
rowIndex = _ref5
|
|
120736
|
+
value: function scrollToCell(_ref5 /*:: */) {
|
|
120737
|
+
var columnIndex = _ref5 /*:: */.columnIndex,
|
|
120738
|
+
rowIndex = _ref5 /*:: */.rowIndex;
|
|
120775
120739
|
var columnCount = this.props.columnCount;
|
|
120776
|
-
var props = this.props;
|
|
120777
|
-
// This can cause a funky scroll offset because of the vertical scrollbar width.
|
|
120740
|
+
var props = this.props;
|
|
120778
120741
|
|
|
120742
|
+
// Don't adjust scroll offset for single-column grids (eg List, Table).
|
|
120743
|
+
// This can cause a funky scroll offset because of the vertical scrollbar width.
|
|
120779
120744
|
if (columnCount > 1 && columnIndex !== undefined) {
|
|
120780
|
-
this._updateScrollLeftForScrollToColumn(Grid_objectSpread({}, props, {
|
|
120745
|
+
this._updateScrollLeftForScrollToColumn(Grid_objectSpread(Grid_objectSpread({}, props), {}, {
|
|
120781
120746
|
scrollToColumn: columnIndex
|
|
120782
120747
|
}));
|
|
120783
120748
|
}
|
|
120784
120749
|
if (rowIndex !== undefined) {
|
|
120785
|
-
this._updateScrollTopForScrollToRow(Grid_objectSpread({}, props, {
|
|
120750
|
+
this._updateScrollTopForScrollToRow(Grid_objectSpread(Grid_objectSpread({}, props), {}, {
|
|
120786
120751
|
scrollToRow: rowIndex
|
|
120787
120752
|
}));
|
|
120788
120753
|
}
|
|
@@ -120798,18 +120763,21 @@ function (_React$PureComponent) {
|
|
|
120798
120763
|
scrollTop = _this$props4.scrollTop,
|
|
120799
120764
|
scrollToRow = _this$props4.scrollToRow,
|
|
120800
120765
|
width = _this$props4.width;
|
|
120801
|
-
var instanceProps = this.state.instanceProps;
|
|
120766
|
+
var instanceProps = this.state.instanceProps;
|
|
120802
120767
|
|
|
120768
|
+
// Reset initial offsets to be ignored in browser
|
|
120803
120769
|
this._initialScrollTop = 0;
|
|
120804
|
-
this._initialScrollLeft = 0;
|
|
120770
|
+
this._initialScrollLeft = 0;
|
|
120771
|
+
|
|
120772
|
+
// If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.
|
|
120805
120773
|
// We must do this at the start of the method as we may calculate and update scroll position below.
|
|
120774
|
+
this._handleInvalidatedGridSize();
|
|
120806
120775
|
|
|
120807
|
-
|
|
120776
|
+
// If this component was first rendered server-side, scrollbar size will be undefined.
|
|
120808
120777
|
// In that event we need to remeasure.
|
|
120809
|
-
|
|
120810
120778
|
if (!instanceProps.scrollbarSizeMeasured) {
|
|
120811
120779
|
this.setState(function (prevState) {
|
|
120812
|
-
var stateUpdate = Grid_objectSpread({}, prevState, {
|
|
120780
|
+
var stateUpdate = Grid_objectSpread(Grid_objectSpread({}, prevState), {}, {
|
|
120813
120781
|
needToResetStyleCache: false
|
|
120814
120782
|
});
|
|
120815
120783
|
stateUpdate.instanceProps.scrollbarSize = getScrollbarSize();
|
|
@@ -120827,8 +120795,9 @@ function (_React$PureComponent) {
|
|
|
120827
120795
|
stateUpdate.needToResetStyleCache = false;
|
|
120828
120796
|
this.setState(stateUpdate);
|
|
120829
120797
|
}
|
|
120830
|
-
}
|
|
120798
|
+
}
|
|
120831
120799
|
|
|
120800
|
+
// refs don't work in `react-test-renderer`
|
|
120832
120801
|
if (this._scrollingContainer) {
|
|
120833
120802
|
// setting the ref's scrollLeft and scrollTop.
|
|
120834
120803
|
// Somehow in MultiGrid the main grid doesn't trigger a update on mount.
|
|
@@ -120838,19 +120807,22 @@ function (_React$PureComponent) {
|
|
|
120838
120807
|
if (this._scrollingContainer.scrollTop !== this.state.scrollTop) {
|
|
120839
120808
|
this._scrollingContainer.scrollTop = this.state.scrollTop;
|
|
120840
120809
|
}
|
|
120841
|
-
}
|
|
120842
|
-
// Setting a state may cause us to later thing we've updated the offce when we haven't.
|
|
120810
|
+
}
|
|
120843
120811
|
|
|
120812
|
+
// Don't update scroll offset if the size is 0; we don't render any cells in this case.
|
|
120813
|
+
// Setting a state may cause us to later thing we've updated the offce when we haven't.
|
|
120844
120814
|
var sizeIsBiggerThanZero = height > 0 && width > 0;
|
|
120845
120815
|
if (scrollToColumn >= 0 && sizeIsBiggerThanZero) {
|
|
120846
120816
|
this._updateScrollLeftForScrollToColumn();
|
|
120847
120817
|
}
|
|
120848
120818
|
if (scrollToRow >= 0 && sizeIsBiggerThanZero) {
|
|
120849
120819
|
this._updateScrollTopForScrollToRow();
|
|
120850
|
-
}
|
|
120820
|
+
}
|
|
120851
120821
|
|
|
120852
|
-
|
|
120822
|
+
// Update onRowsRendered callback
|
|
120823
|
+
this._invokeOnGridRenderedHelper();
|
|
120853
120824
|
|
|
120825
|
+
// Initialize onScroll callback
|
|
120854
120826
|
this._invokeOnScrollMemoizer({
|
|
120855
120827
|
scrollLeft: scrollLeft || 0,
|
|
120856
120828
|
scrollTop: scrollTop || 0,
|
|
@@ -120859,6 +120831,7 @@ function (_React$PureComponent) {
|
|
|
120859
120831
|
});
|
|
120860
120832
|
this._maybeCallOnScrollbarPresenceChange();
|
|
120861
120833
|
}
|
|
120834
|
+
|
|
120862
120835
|
/**
|
|
120863
120836
|
* @private
|
|
120864
120837
|
* This method updates scrollLeft/scrollTop in state for the following conditions:
|
|
@@ -120866,9 +120839,7 @@ function (_React$PureComponent) {
|
|
|
120866
120839
|
*/
|
|
120867
120840
|
}, {
|
|
120868
120841
|
key: "componentDidUpdate",
|
|
120869
|
-
value: function componentDidUpdate(prevProps
|
|
120870
|
-
/*: Props*/, prevState
|
|
120871
|
-
/*: State*/) {
|
|
120842
|
+
value: function componentDidUpdate(prevProps /*: Props*/, prevState /*: State*/) {
|
|
120872
120843
|
var _this2 = this;
|
|
120873
120844
|
var _this$props5 = this.props,
|
|
120874
120845
|
autoHeight = _this$props5.autoHeight,
|
|
@@ -120884,19 +120855,21 @@ function (_React$PureComponent) {
|
|
|
120884
120855
|
scrollLeft = _this$state.scrollLeft,
|
|
120885
120856
|
scrollPositionChangeReason = _this$state.scrollPositionChangeReason,
|
|
120886
120857
|
scrollTop = _this$state.scrollTop,
|
|
120887
|
-
instanceProps = _this$state.instanceProps;
|
|
120858
|
+
instanceProps = _this$state.instanceProps;
|
|
120859
|
+
// If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.
|
|
120888
120860
|
// We must do this at the start of the method as we may calculate and update scroll position below.
|
|
120861
|
+
this._handleInvalidatedGridSize();
|
|
120889
120862
|
|
|
120890
|
-
|
|
120863
|
+
// Handle edge case where column or row count has only just increased over 0.
|
|
120891
120864
|
// In this case we may have to restore a previously-specified scroll offset.
|
|
120892
120865
|
// For more info see bvaughn/react-virtualized/issues/218
|
|
120866
|
+
var columnOrRowCountJustIncreasedFromZero = columnCount > 0 && prevProps.columnCount === 0 || rowCount > 0 && prevProps.rowCount === 0;
|
|
120893
120867
|
|
|
120894
|
-
|
|
120868
|
+
// Make sure requested changes to :scrollLeft or :scrollTop get applied.
|
|
120895
120869
|
// Assigning to scrollLeft/scrollTop tells the browser to interrupt any running scroll animations,
|
|
120896
120870
|
// And to discard any pending async changes to the scroll position that may have happened in the meantime (e.g. on a separate scrolling thread).
|
|
120897
120871
|
// So we only set these when we require an adjustment of the scroll position.
|
|
120898
120872
|
// See issue #2 for more information.
|
|
120899
|
-
|
|
120900
120873
|
if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED) {
|
|
120901
120874
|
// @TRICKY :autoHeight and :autoWidth properties instructs Grid to leave :scrollTop and :scrollLeft management to an external HOC (eg WindowScroller).
|
|
120902
120875
|
// In this case we should avoid checking scrollingContainer.scrollTop and scrollingContainer.scrollLeft since it forces layout/flow.
|
|
@@ -120906,13 +120879,15 @@ function (_React$PureComponent) {
|
|
|
120906
120879
|
if (!autoHeight && scrollTop >= 0 && (scrollTop !== this._scrollingContainer.scrollTop || columnOrRowCountJustIncreasedFromZero)) {
|
|
120907
120880
|
this._scrollingContainer.scrollTop = scrollTop;
|
|
120908
120881
|
}
|
|
120909
|
-
}
|
|
120882
|
+
}
|
|
120883
|
+
|
|
120884
|
+
// Special case where the previous size was 0:
|
|
120910
120885
|
// In this case we don't show any windowed cells at all.
|
|
120911
120886
|
// So we should always recalculate offset afterwards.
|
|
120887
|
+
var sizeJustIncreasedFromZero = (prevProps.width === 0 || prevProps.height === 0) && height > 0 && width > 0;
|
|
120912
120888
|
|
|
120913
|
-
|
|
120889
|
+
// Update scroll offsets if the current :scrollToColumn or :scrollToRow values requires it
|
|
120914
120890
|
// @TODO Do we also need this check or can the one in componentWillUpdate() suffice?
|
|
120915
|
-
|
|
120916
120891
|
if (this._recomputeScrollLeftFlag) {
|
|
120917
120892
|
this._recomputeScrollLeftFlag = false;
|
|
120918
120893
|
this._updateScrollLeftForScrollToColumn(this.props);
|
|
@@ -120954,10 +120929,12 @@ function (_React$PureComponent) {
|
|
|
120954
120929
|
return _this2._updateScrollTopForScrollToRow(_this2.props);
|
|
120955
120930
|
}
|
|
120956
120931
|
});
|
|
120957
|
-
}
|
|
120932
|
+
}
|
|
120958
120933
|
|
|
120959
|
-
|
|
120934
|
+
// Update onRowsRendered callback if start/stop indices have changed
|
|
120935
|
+
this._invokeOnGridRenderedHelper();
|
|
120960
120936
|
|
|
120937
|
+
// Changes to :scrollLeft or :scrollTop should also notify :onScroll listeners
|
|
120961
120938
|
if (scrollLeft !== prevState.scrollLeft || scrollTop !== prevState.scrollTop) {
|
|
120962
120939
|
var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();
|
|
120963
120940
|
var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();
|
|
@@ -120977,6 +120954,7 @@ function (_React$PureComponent) {
|
|
|
120977
120954
|
cancelAnimationTimeout(this._disablePointerEventsTimeoutId);
|
|
120978
120955
|
}
|
|
120979
120956
|
}
|
|
120957
|
+
|
|
120980
120958
|
/**
|
|
120981
120959
|
* This method updates scrollLeft/scrollTop in state for the following conditions:
|
|
120982
120960
|
* 1) Empty content (0 rows or columns)
|
|
@@ -121005,8 +120983,7 @@ function (_React$PureComponent) {
|
|
|
121005
120983
|
instanceProps = _this$state2.instanceProps,
|
|
121006
120984
|
needToResetStyleCache = _this$state2.needToResetStyleCache;
|
|
121007
120985
|
var isScrolling = this._isScrolling();
|
|
121008
|
-
var gridStyle
|
|
121009
|
-
/*: Object*/ = {
|
|
120986
|
+
var gridStyle /*: Object*/ = {
|
|
121010
120987
|
boxSizing: 'border-box',
|
|
121011
120988
|
direction: 'ltr',
|
|
121012
120989
|
height: autoHeight ? 'auto' : height,
|
|
@@ -121017,31 +120994,35 @@ function (_React$PureComponent) {
|
|
|
121017
120994
|
};
|
|
121018
120995
|
if (needToResetStyleCache) {
|
|
121019
120996
|
this._styleCache = {};
|
|
121020
|
-
}
|
|
121021
|
-
// if state.isScrolling (not from _isScrolling) then reset
|
|
120997
|
+
}
|
|
121022
120998
|
|
|
120999
|
+
// calculate _styleCache here
|
|
121000
|
+
// if state.isScrolling (not from _isScrolling) then reset
|
|
121023
121001
|
if (!this.state.isScrolling) {
|
|
121024
121002
|
this._resetStyleCache();
|
|
121025
|
-
}
|
|
121003
|
+
}
|
|
121026
121004
|
|
|
121005
|
+
// calculate children to render here
|
|
121027
121006
|
this._calculateChildrenToRender(this.props, this.state);
|
|
121028
121007
|
var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();
|
|
121029
|
-
var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();
|
|
121008
|
+
var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();
|
|
121009
|
+
|
|
121010
|
+
// Force browser to hide scrollbars when we know they aren't necessary.
|
|
121030
121011
|
// Otherwise once scrollbars appear they may not disappear again.
|
|
121031
121012
|
// For more info see issue #116
|
|
121032
|
-
|
|
121033
121013
|
var verticalScrollBarSize = totalRowsHeight > height ? instanceProps.scrollbarSize : 0;
|
|
121034
121014
|
var horizontalScrollBarSize = totalColumnsWidth > width ? instanceProps.scrollbarSize : 0;
|
|
121035
121015
|
if (horizontalScrollBarSize !== this._horizontalScrollBarSize || verticalScrollBarSize !== this._verticalScrollBarSize) {
|
|
121036
121016
|
this._horizontalScrollBarSize = horizontalScrollBarSize;
|
|
121037
121017
|
this._verticalScrollBarSize = verticalScrollBarSize;
|
|
121038
121018
|
this._scrollbarPresenceChanged = true;
|
|
121039
|
-
}
|
|
121019
|
+
}
|
|
121020
|
+
|
|
121021
|
+
// Also explicitly init styles to 'auto' if scrollbars are required.
|
|
121040
121022
|
// This works around an obscure edge case where external CSS styles have not yet been loaded,
|
|
121041
121023
|
// But an initial scroll index of offset is set as an external prop.
|
|
121042
121024
|
// Without this style, Grid would render the correct range of cells but would NOT update its internal offset.
|
|
121043
121025
|
// This was originally reported via clauderic/react-infinite-calendar/issues/23
|
|
121044
|
-
|
|
121045
121026
|
gridStyle.overflowX = totalColumnsWidth + verticalScrollBarSize <= width ? 'hidden' : 'auto';
|
|
121046
121027
|
gridStyle.overflowY = totalRowsHeight + horizontalScrollBarSize <= height ? 'hidden' : 'auto';
|
|
121047
121028
|
var childrenToDisplay = this._childrenToDisplay;
|
|
@@ -121055,7 +121036,7 @@ function (_React$PureComponent) {
|
|
|
121055
121036
|
id: id,
|
|
121056
121037
|
onScroll: this._onScroll,
|
|
121057
121038
|
role: role,
|
|
121058
|
-
style: Grid_objectSpread({}, gridStyle,
|
|
121039
|
+
style: Grid_objectSpread(Grid_objectSpread({}, gridStyle), style),
|
|
121059
121040
|
tabIndex: tabIndex
|
|
121060
121041
|
}), childrenToDisplay.length > 0 && /*#__PURE__*/react.createElement("div", {
|
|
121061
121042
|
className: "ReactVirtualized__Grid__innerScrollContainer",
|
|
@@ -121071,14 +121052,13 @@ function (_React$PureComponent) {
|
|
|
121071
121052
|
}, containerStyle)
|
|
121072
121053
|
}, childrenToDisplay), showNoContentRenderer && noContentRenderer());
|
|
121073
121054
|
}
|
|
121055
|
+
|
|
121074
121056
|
/* ---------------------------- Helper methods ---------------------------- */
|
|
121075
121057
|
}, {
|
|
121076
121058
|
key: "_calculateChildrenToRender",
|
|
121077
121059
|
value: function _calculateChildrenToRender() {
|
|
121078
|
-
var props
|
|
121079
|
-
/*:
|
|
121080
|
-
var state
|
|
121081
|
-
/*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
|
|
121060
|
+
var props /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
|
|
121061
|
+
var state /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
|
|
121082
121062
|
var cellRenderer = props.cellRenderer,
|
|
121083
121063
|
cellRangeRenderer = props.cellRangeRenderer,
|
|
121084
121064
|
columnCount = props.columnCount,
|
|
@@ -121096,8 +121076,9 @@ function (_React$PureComponent) {
|
|
|
121096
121076
|
var scrollTop = this._initialScrollTop > 0 ? this._initialScrollTop : state.scrollTop;
|
|
121097
121077
|
var scrollLeft = this._initialScrollLeft > 0 ? this._initialScrollLeft : state.scrollLeft;
|
|
121098
121078
|
var isScrolling = this._isScrolling(props, state);
|
|
121099
|
-
this._childrenToDisplay = [];
|
|
121079
|
+
this._childrenToDisplay = [];
|
|
121100
121080
|
|
|
121081
|
+
// Render only enough columns and rows to cover the visible area of the grid.
|
|
121101
121082
|
if (height > 0 && width > 0) {
|
|
121102
121083
|
var visibleColumnIndices = instanceProps.columnSizeAndPositionManager.getVisibleCellRange({
|
|
121103
121084
|
containerSize: width,
|
|
@@ -121114,8 +121095,9 @@ function (_React$PureComponent) {
|
|
|
121114
121095
|
var verticalOffsetAdjustment = instanceProps.rowSizeAndPositionManager.getOffsetAdjustment({
|
|
121115
121096
|
containerSize: height,
|
|
121116
121097
|
offset: scrollTop
|
|
121117
|
-
});
|
|
121098
|
+
});
|
|
121118
121099
|
|
|
121100
|
+
// Store for _invokeOnGridRenderedHelper()
|
|
121119
121101
|
this._renderedColumnStartIndex = visibleColumnIndices.start;
|
|
121120
121102
|
this._renderedColumnStopIndex = visibleColumnIndices.stop;
|
|
121121
121103
|
this._renderedRowStartIndex = visibleRowIndices.start;
|
|
@@ -121135,13 +121117,15 @@ function (_React$PureComponent) {
|
|
|
121135
121117
|
scrollDirection: scrollDirectionVertical,
|
|
121136
121118
|
startIndex: typeof visibleRowIndices.start === 'number' ? visibleRowIndices.start : 0,
|
|
121137
121119
|
stopIndex: typeof visibleRowIndices.stop === 'number' ? visibleRowIndices.stop : -1
|
|
121138
|
-
});
|
|
121120
|
+
});
|
|
121139
121121
|
|
|
121122
|
+
// Store for _invokeOnGridRenderedHelper()
|
|
121140
121123
|
var columnStartIndex = overscanColumnIndices.overscanStartIndex;
|
|
121141
121124
|
var columnStopIndex = overscanColumnIndices.overscanStopIndex;
|
|
121142
121125
|
var rowStartIndex = overscanRowIndices.overscanStartIndex;
|
|
121143
|
-
var rowStopIndex = overscanRowIndices.overscanStopIndex;
|
|
121126
|
+
var rowStopIndex = overscanRowIndices.overscanStopIndex;
|
|
121144
121127
|
|
|
121128
|
+
// Advanced use-cases (eg CellMeasurer) require batched measurements to determine accurate sizes.
|
|
121145
121129
|
if (deferredMeasurementCache) {
|
|
121146
121130
|
// If rows have a dynamic height, scan the rows we are about to render.
|
|
121147
121131
|
// If any have not yet been measured, then we need to render all columns initially,
|
|
@@ -121155,11 +121139,12 @@ function (_React$PureComponent) {
|
|
|
121155
121139
|
break;
|
|
121156
121140
|
}
|
|
121157
121141
|
}
|
|
121158
|
-
}
|
|
121142
|
+
}
|
|
121143
|
+
|
|
121144
|
+
// If columns have a dynamic width, scan the columns we are about to render.
|
|
121159
121145
|
// If any have not yet been measured, then we need to render all rows initially,
|
|
121160
121146
|
// Because the width of the column is equal to the widest cell within that column,
|
|
121161
121147
|
// (And so we can't know the width without measuring all row-cells first).
|
|
121162
|
-
|
|
121163
121148
|
if (!deferredMeasurementCache.hasFixedWidth()) {
|
|
121164
121149
|
for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {
|
|
121165
121150
|
if (!deferredMeasurementCache.has(0, columnIndex)) {
|
|
@@ -121190,14 +121175,16 @@ function (_React$PureComponent) {
|
|
|
121190
121175
|
verticalOffsetAdjustment: verticalOffsetAdjustment,
|
|
121191
121176
|
visibleColumnIndices: visibleColumnIndices,
|
|
121192
121177
|
visibleRowIndices: visibleRowIndices
|
|
121193
|
-
});
|
|
121178
|
+
});
|
|
121194
121179
|
|
|
121180
|
+
// update the indices
|
|
121195
121181
|
this._columnStartIndex = columnStartIndex;
|
|
121196
121182
|
this._columnStopIndex = columnStopIndex;
|
|
121197
121183
|
this._rowStartIndex = rowStartIndex;
|
|
121198
121184
|
this._rowStopIndex = rowStopIndex;
|
|
121199
121185
|
}
|
|
121200
121186
|
}
|
|
121187
|
+
|
|
121201
121188
|
/**
|
|
121202
121189
|
* Sets an :isScrolling flag for a small window of time.
|
|
121203
121190
|
* This flag is used to disable pointer events on the scrollable portion of the Grid.
|
|
@@ -121214,11 +121201,12 @@ function (_React$PureComponent) {
|
|
|
121214
121201
|
}
|
|
121215
121202
|
}, {
|
|
121216
121203
|
key: "_handleInvalidatedGridSize",
|
|
121204
|
+
value:
|
|
121217
121205
|
/**
|
|
121218
121206
|
* Check for batched CellMeasurer size invalidations.
|
|
121219
121207
|
* This will occur the first time one or more previously unmeasured cells are rendered.
|
|
121220
121208
|
*/
|
|
121221
|
-
|
|
121209
|
+
function _handleInvalidatedGridSize() {
|
|
121222
121210
|
if (typeof this._deferredInvalidateColumnIndex === 'number' && typeof this._deferredInvalidateRowIndex === 'number') {
|
|
121223
121211
|
var columnIndex = this._deferredInvalidateColumnIndex;
|
|
121224
121212
|
var rowIndex = this._deferredInvalidateRowIndex;
|
|
@@ -121232,12 +121220,12 @@ function (_React$PureComponent) {
|
|
|
121232
121220
|
}
|
|
121233
121221
|
}, {
|
|
121234
121222
|
key: "_invokeOnScrollMemoizer",
|
|
121235
|
-
value: function _invokeOnScrollMemoizer(_ref6) {
|
|
121223
|
+
value: function _invokeOnScrollMemoizer(_ref6 /*:: */) {
|
|
121236
121224
|
var _this3 = this;
|
|
121237
|
-
var scrollLeft = _ref6
|
|
121238
|
-
scrollTop = _ref6
|
|
121239
|
-
totalColumnsWidth = _ref6
|
|
121240
|
-
totalRowsHeight = _ref6
|
|
121225
|
+
var scrollLeft = _ref6 /*:: */.scrollLeft,
|
|
121226
|
+
scrollTop = _ref6 /*:: */.scrollTop,
|
|
121227
|
+
totalColumnsWidth = _ref6 /*:: */.totalColumnsWidth,
|
|
121228
|
+
totalRowsHeight = _ref6 /*:: */.totalRowsHeight;
|
|
121241
121229
|
this._onScrollMemoizer({
|
|
121242
121230
|
callback: function callback(_ref7) {
|
|
121243
121231
|
var scrollLeft = _ref7.scrollLeft,
|
|
@@ -121263,12 +121251,9 @@ function (_React$PureComponent) {
|
|
|
121263
121251
|
}
|
|
121264
121252
|
}, {
|
|
121265
121253
|
key: "_isScrolling",
|
|
121266
|
-
value: function _isScrolling() /*: boolean*/
|
|
121267
|
-
|
|
121268
|
-
var
|
|
121269
|
-
/*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
|
|
121270
|
-
var state
|
|
121271
|
-
/*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
|
|
121254
|
+
value: function _isScrolling() /*: boolean*/{
|
|
121255
|
+
var props /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
|
|
121256
|
+
var state /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
|
|
121272
121257
|
// If isScrolling is defined in props, use it to override the value in state
|
|
121273
121258
|
// This is a performance optimization for WindowScroller + Grid
|
|
121274
121259
|
return Object.hasOwnProperty.call(props, 'isScrolling') ? Boolean(props.isScrolling) : Boolean(state.isScrolling);
|
|
@@ -121288,13 +121273,14 @@ function (_React$PureComponent) {
|
|
|
121288
121273
|
}
|
|
121289
121274
|
}, {
|
|
121290
121275
|
key: "scrollToPosition",
|
|
121276
|
+
value:
|
|
121291
121277
|
/**
|
|
121292
121278
|
* Scroll to the specified offset(s).
|
|
121293
121279
|
* Useful for animating position changes.
|
|
121294
121280
|
*/
|
|
121295
|
-
|
|
121296
|
-
var scrollLeft = _ref8
|
|
121297
|
-
scrollTop = _ref8
|
|
121281
|
+
function scrollToPosition(_ref8 /*:: */) {
|
|
121282
|
+
var scrollLeft = _ref8 /*:: */.scrollLeft,
|
|
121283
|
+
scrollTop = _ref8 /*:: */.scrollTop;
|
|
121298
121284
|
var stateUpdate = Grid._getScrollToPositionStateUpdate({
|
|
121299
121285
|
prevState: this.state,
|
|
121300
121286
|
scrollLeft: scrollLeft,
|
|
@@ -121308,19 +121294,15 @@ function (_React$PureComponent) {
|
|
|
121308
121294
|
}, {
|
|
121309
121295
|
key: "_getCalculatedScrollLeft",
|
|
121310
121296
|
value: function _getCalculatedScrollLeft() {
|
|
121311
|
-
var props
|
|
121312
|
-
/*:
|
|
121313
|
-
var state
|
|
121314
|
-
/*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
|
|
121297
|
+
var props /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
|
|
121298
|
+
var state /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
|
|
121315
121299
|
return Grid._getCalculatedScrollLeft(props, state);
|
|
121316
121300
|
}
|
|
121317
121301
|
}, {
|
|
121318
121302
|
key: "_updateScrollLeftForScrollToColumn",
|
|
121319
121303
|
value: function _updateScrollLeftForScrollToColumn() {
|
|
121320
|
-
var props
|
|
121321
|
-
/*:
|
|
121322
|
-
var state
|
|
121323
|
-
/*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
|
|
121304
|
+
var props /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
|
|
121305
|
+
var state /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
|
|
121324
121306
|
var stateUpdate = Grid._getScrollLeftForScrollToColumnStateUpdate(props, state);
|
|
121325
121307
|
if (stateUpdate) {
|
|
121326
121308
|
stateUpdate.needToResetStyleCache = false;
|
|
@@ -121330,10 +121312,8 @@ function (_React$PureComponent) {
|
|
|
121330
121312
|
}, {
|
|
121331
121313
|
key: "_getCalculatedScrollTop",
|
|
121332
121314
|
value: function _getCalculatedScrollTop() {
|
|
121333
|
-
var props
|
|
121334
|
-
/*:
|
|
121335
|
-
var state
|
|
121336
|
-
/*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
|
|
121315
|
+
var props /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
|
|
121316
|
+
var state /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
|
|
121337
121317
|
return Grid._getCalculatedScrollTop(props, state);
|
|
121338
121318
|
}
|
|
121339
121319
|
}, {
|
|
@@ -121341,16 +121321,18 @@ function (_React$PureComponent) {
|
|
|
121341
121321
|
value: function _resetStyleCache() {
|
|
121342
121322
|
var styleCache = this._styleCache;
|
|
121343
121323
|
var cellCache = this._cellCache;
|
|
121344
|
-
var isScrollingOptOut = this.props.isScrollingOptOut;
|
|
121324
|
+
var isScrollingOptOut = this.props.isScrollingOptOut;
|
|
121325
|
+
|
|
121326
|
+
// Reset cell and style caches once scrolling stops.
|
|
121345
121327
|
// This makes Grid simpler to use (since cells commonly change).
|
|
121346
121328
|
// And it keeps the caches from growing too large.
|
|
121347
121329
|
// Performance is most sensitive when a user is scrolling.
|
|
121348
121330
|
// Don't clear visible cells from cellCache if isScrollingOptOut is specified.
|
|
121349
121331
|
// This keeps the cellCache to a resonable size.
|
|
121350
|
-
|
|
121351
121332
|
this._cellCache = {};
|
|
121352
|
-
this._styleCache = {};
|
|
121333
|
+
this._styleCache = {};
|
|
121353
121334
|
|
|
121335
|
+
// Copy over the visible cell styles so avoid unnecessary re-render.
|
|
121354
121336
|
for (var rowIndex = this._rowStartIndex; rowIndex <= this._rowStopIndex; rowIndex++) {
|
|
121355
121337
|
for (var columnIndex = this._columnStartIndex; columnIndex <= this._columnStopIndex; columnIndex++) {
|
|
121356
121338
|
var key = "".concat(rowIndex, "-").concat(columnIndex);
|
|
@@ -121364,10 +121346,8 @@ function (_React$PureComponent) {
|
|
|
121364
121346
|
}, {
|
|
121365
121347
|
key: "_updateScrollTopForScrollToRow",
|
|
121366
121348
|
value: function _updateScrollTopForScrollToRow() {
|
|
121367
|
-
var props
|
|
121368
|
-
/*:
|
|
121369
|
-
var state
|
|
121370
|
-
/*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
|
|
121349
|
+
var props /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
|
|
121350
|
+
var state /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
|
|
121371
121351
|
var stateUpdate = Grid._getScrollTopForScrollToRowStateUpdate(props, state);
|
|
121372
121352
|
if (stateUpdate) {
|
|
121373
121353
|
stateUpdate.needToResetStyleCache = false;
|
|
@@ -121376,14 +121356,13 @@ function (_React$PureComponent) {
|
|
|
121376
121356
|
}
|
|
121377
121357
|
}], [{
|
|
121378
121358
|
key: "getDerivedStateFromProps",
|
|
121379
|
-
value: function getDerivedStateFromProps(nextProps
|
|
121380
|
-
/*: Props*/, prevState
|
|
121381
|
-
/*: State*/) /*: $Shape<State>*/
|
|
121382
|
-
{
|
|
121359
|
+
value: function getDerivedStateFromProps(nextProps /*: Props*/, prevState /*: State*/) /*: $Shape<State>*/{
|
|
121383
121360
|
var newState = {};
|
|
121384
121361
|
if (nextProps.columnCount === 0 && prevState.scrollLeft !== 0 || nextProps.rowCount === 0 && prevState.scrollTop !== 0) {
|
|
121385
121362
|
newState.scrollLeft = 0;
|
|
121386
|
-
newState.scrollTop = 0;
|
|
121363
|
+
newState.scrollTop = 0;
|
|
121364
|
+
|
|
121365
|
+
// only use scroll{Left,Top} from props if scrollTo{Column,Row} isn't specified
|
|
121387
121366
|
// scrollTo{Column,Row} should override scroll{Left,Top}
|
|
121388
121367
|
} else if (nextProps.scrollLeft !== prevState.scrollLeft && nextProps.scrollToColumn < 0 || nextProps.scrollTop !== prevState.scrollTop && nextProps.scrollToRow < 0) {
|
|
121389
121368
|
_extends2(newState, Grid._getScrollToPositionStateUpdate({
|
|
@@ -121392,8 +121371,9 @@ function (_React$PureComponent) {
|
|
|
121392
121371
|
scrollTop: nextProps.scrollTop
|
|
121393
121372
|
}));
|
|
121394
121373
|
}
|
|
121395
|
-
var instanceProps = prevState.instanceProps;
|
|
121374
|
+
var instanceProps = prevState.instanceProps;
|
|
121396
121375
|
|
|
121376
|
+
// Initially we should not clearStyleCache
|
|
121397
121377
|
newState.needToResetStyleCache = false;
|
|
121398
121378
|
if (nextProps.columnWidth !== instanceProps.prevColumnWidth || nextProps.rowHeight !== instanceProps.prevRowHeight) {
|
|
121399
121379
|
// Reset cache. set it to {} in render
|
|
@@ -121412,8 +121392,9 @@ function (_React$PureComponent) {
|
|
|
121412
121392
|
if (instanceProps.prevColumnCount === 0 || instanceProps.prevRowCount === 0) {
|
|
121413
121393
|
instanceProps.prevColumnCount = 0;
|
|
121414
121394
|
instanceProps.prevRowCount = 0;
|
|
121415
|
-
}
|
|
121395
|
+
}
|
|
121416
121396
|
|
|
121397
|
+
// If scrolling is controlled outside this component, clear cache when scrolling stops
|
|
121417
121398
|
if (nextProps.autoHeight && nextProps.isScrolling === false && instanceProps.prevIsScrolling === true) {
|
|
121418
121399
|
_extends2(newState, {
|
|
121419
121400
|
isScrolling: false
|
|
@@ -121457,8 +121438,9 @@ function (_React$PureComponent) {
|
|
|
121457
121438
|
instanceProps.prevRowCount = nextProps.rowCount;
|
|
121458
121439
|
instanceProps.prevRowHeight = nextProps.rowHeight;
|
|
121459
121440
|
instanceProps.prevScrollToColumn = nextProps.scrollToColumn;
|
|
121460
|
-
instanceProps.prevScrollToRow = nextProps.scrollToRow;
|
|
121441
|
+
instanceProps.prevScrollToRow = nextProps.scrollToRow;
|
|
121461
121442
|
|
|
121443
|
+
// getting scrollBarSize (moved from componentWillMount)
|
|
121462
121444
|
instanceProps.scrollbarSize = nextProps.getScrollbarSize();
|
|
121463
121445
|
if (instanceProps.scrollbarSize === undefined) {
|
|
121464
121446
|
instanceProps.scrollbarSizeMeasured = false;
|
|
@@ -121467,33 +121449,30 @@ function (_React$PureComponent) {
|
|
|
121467
121449
|
instanceProps.scrollbarSizeMeasured = true;
|
|
121468
121450
|
}
|
|
121469
121451
|
newState.instanceProps = instanceProps;
|
|
121470
|
-
return Grid_objectSpread({}, newState,
|
|
121452
|
+
return Grid_objectSpread(Grid_objectSpread(Grid_objectSpread({}, newState), maybeStateA), maybeStateB);
|
|
121471
121453
|
}
|
|
121472
121454
|
}, {
|
|
121473
121455
|
key: "_getEstimatedColumnSize",
|
|
121474
|
-
value: function _getEstimatedColumnSize(props
|
|
121475
|
-
/*: Props*/) {
|
|
121456
|
+
value: function _getEstimatedColumnSize(props /*: Props*/) {
|
|
121476
121457
|
return typeof props.columnWidth === 'number' ? props.columnWidth : props.estimatedColumnSize;
|
|
121477
121458
|
}
|
|
121478
121459
|
}, {
|
|
121479
121460
|
key: "_getEstimatedRowSize",
|
|
121480
|
-
value: function _getEstimatedRowSize(props
|
|
121481
|
-
/*: Props*/) {
|
|
121461
|
+
value: function _getEstimatedRowSize(props /*: Props*/) {
|
|
121482
121462
|
return typeof props.rowHeight === 'number' ? props.rowHeight : props.estimatedRowSize;
|
|
121483
121463
|
}
|
|
121484
121464
|
}, {
|
|
121485
121465
|
key: "_getScrollToPositionStateUpdate",
|
|
121466
|
+
value:
|
|
121486
121467
|
/**
|
|
121487
121468
|
* Get the updated state after scrolling to
|
|
121488
121469
|
* scrollLeft and scrollTop
|
|
121489
121470
|
*/
|
|
121490
|
-
|
|
121491
|
-
|
|
121492
|
-
|
|
121493
|
-
|
|
121494
|
-
|
|
121495
|
-
var newState
|
|
121496
|
-
/*: Object*/ = {
|
|
121471
|
+
function _getScrollToPositionStateUpdate(_ref9 /*:: */) /*: $Shape<State>*/{
|
|
121472
|
+
var prevState = _ref9 /*:: */.prevState,
|
|
121473
|
+
scrollLeft = _ref9 /*:: */.scrollLeft,
|
|
121474
|
+
scrollTop = _ref9 /*:: */.scrollTop;
|
|
121475
|
+
var newState /*: Object*/ = {
|
|
121497
121476
|
scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED
|
|
121498
121477
|
};
|
|
121499
121478
|
if (typeof scrollLeft === 'number' && scrollLeft >= 0) {
|
|
@@ -121511,19 +121490,14 @@ function (_React$PureComponent) {
|
|
|
121511
121490
|
}
|
|
121512
121491
|
}, {
|
|
121513
121492
|
key: "_wrapSizeGetter",
|
|
121514
|
-
value: function _wrapSizeGetter(value
|
|
121515
|
-
/*: CellSize*/) /*: CellSizeGetter*/
|
|
121516
|
-
{
|
|
121493
|
+
value: function _wrapSizeGetter(value /*: CellSize*/) /*: CellSizeGetter*/{
|
|
121517
121494
|
return typeof value === 'function' ? value : function () {
|
|
121518
|
-
return value
|
|
121519
|
-
/*: any*/;
|
|
121495
|
+
return value /*: any*/;
|
|
121520
121496
|
};
|
|
121521
121497
|
}
|
|
121522
121498
|
}, {
|
|
121523
121499
|
key: "_getCalculatedScrollLeft",
|
|
121524
|
-
value: function _getCalculatedScrollLeft(nextProps
|
|
121525
|
-
/*: Props*/, prevState
|
|
121526
|
-
/*: State*/) {
|
|
121500
|
+
value: function _getCalculatedScrollLeft(nextProps /*: Props*/, prevState /*: State*/) {
|
|
121527
121501
|
var columnCount = nextProps.columnCount,
|
|
121528
121502
|
height = nextProps.height,
|
|
121529
121503
|
scrollToAlignment = nextProps.scrollToAlignment,
|
|
@@ -121547,10 +121521,7 @@ function (_React$PureComponent) {
|
|
|
121547
121521
|
}
|
|
121548
121522
|
}, {
|
|
121549
121523
|
key: "_getScrollLeftForScrollToColumnStateUpdate",
|
|
121550
|
-
value: function _getScrollLeftForScrollToColumnStateUpdate(nextProps
|
|
121551
|
-
/*: Props*/, prevState
|
|
121552
|
-
/*: State*/) /*: $Shape<State>*/
|
|
121553
|
-
{
|
|
121524
|
+
value: function _getScrollLeftForScrollToColumnStateUpdate(nextProps /*: Props*/, prevState /*: State*/) /*: $Shape<State>*/{
|
|
121554
121525
|
var scrollLeft = prevState.scrollLeft;
|
|
121555
121526
|
var calculatedScrollLeft = Grid._getCalculatedScrollLeft(nextProps, prevState);
|
|
121556
121527
|
if (typeof calculatedScrollLeft === 'number' && calculatedScrollLeft >= 0 && scrollLeft !== calculatedScrollLeft) {
|
|
@@ -121564,9 +121535,7 @@ function (_React$PureComponent) {
|
|
|
121564
121535
|
}
|
|
121565
121536
|
}, {
|
|
121566
121537
|
key: "_getCalculatedScrollTop",
|
|
121567
|
-
value: function _getCalculatedScrollTop(nextProps
|
|
121568
|
-
/*: Props*/, prevState
|
|
121569
|
-
/*: State*/) {
|
|
121538
|
+
value: function _getCalculatedScrollTop(nextProps /*: Props*/, prevState /*: State*/) {
|
|
121570
121539
|
var height = nextProps.height,
|
|
121571
121540
|
rowCount = nextProps.rowCount,
|
|
121572
121541
|
scrollToAlignment = nextProps.scrollToAlignment,
|
|
@@ -121590,10 +121559,7 @@ function (_React$PureComponent) {
|
|
|
121590
121559
|
}
|
|
121591
121560
|
}, {
|
|
121592
121561
|
key: "_getScrollTopForScrollToRowStateUpdate",
|
|
121593
|
-
value: function _getScrollTopForScrollToRowStateUpdate(nextProps
|
|
121594
|
-
/*: Props*/, prevState
|
|
121595
|
-
/*: State*/) /*: $Shape<State>*/
|
|
121596
|
-
{
|
|
121562
|
+
value: function _getScrollTopForScrollToRowStateUpdate(nextProps /*: Props*/, prevState /*: State*/) /*: $Shape<State>*/{
|
|
121597
121563
|
var scrollTop = prevState.scrollTop;
|
|
121598
121564
|
var calculatedScrollTop = Grid._getCalculatedScrollTop(nextProps, prevState);
|
|
121599
121565
|
if (typeof calculatedScrollTop === 'number' && calculatedScrollTop >= 0 && scrollTop !== calculatedScrollTop) {
|
|
@@ -121606,7 +121572,6 @@ function (_React$PureComponent) {
|
|
|
121606
121572
|
return {};
|
|
121607
121573
|
}
|
|
121608
121574
|
}]);
|
|
121609
|
-
return Grid;
|
|
121610
121575
|
}(react.PureComponent);
|
|
121611
121576
|
(0,defineProperty/* default */.A)(Grid, "defaultProps", {
|
|
121612
121577
|
'aria-label': 'grid',
|
|
@@ -121644,18 +121609,18 @@ var accessibilityOverscanIndicesGetter_SCROLL_DIRECTION_BACKWARD = (/* unused pu
|
|
|
121644
121609
|
var accessibilityOverscanIndicesGetter_SCROLL_DIRECTION_FORWARD = 1;
|
|
121645
121610
|
var accessibilityOverscanIndicesGetter_SCROLL_DIRECTION_HORIZONTAL = 'horizontal';
|
|
121646
121611
|
var accessibilityOverscanIndicesGetter_SCROLL_DIRECTION_VERTICAL = 'vertical';
|
|
121612
|
+
|
|
121647
121613
|
/**
|
|
121648
121614
|
* Calculates the number of cells to overscan before and after a specified range.
|
|
121649
121615
|
* This function ensures that overscanning doesn't exceed the available cells.
|
|
121650
121616
|
*/
|
|
121651
121617
|
|
|
121652
|
-
function accessibilityOverscanIndicesGetter_defaultOverscanIndicesGetter(_ref) /*: OverscanIndices*/
|
|
121653
|
-
|
|
121654
|
-
|
|
121655
|
-
|
|
121656
|
-
|
|
121657
|
-
|
|
121658
|
-
stopIndex = _ref.stopIndex;
|
|
121618
|
+
function accessibilityOverscanIndicesGetter_defaultOverscanIndicesGetter(_ref /*:: */) /*: OverscanIndices*/{
|
|
121619
|
+
var cellCount = _ref /*:: */.cellCount,
|
|
121620
|
+
overscanCellsCount = _ref /*:: */.overscanCellsCount,
|
|
121621
|
+
scrollDirection = _ref /*:: */.scrollDirection,
|
|
121622
|
+
startIndex = _ref /*:: */.startIndex,
|
|
121623
|
+
stopIndex = _ref /*:: */.stopIndex;
|
|
121659
121624
|
// Make sure we render at least 1 cell extra before and after (except near boundaries)
|
|
121660
121625
|
// This is necessary in order to support keyboard navigation (TAB/SHIFT+TAB) in some cases
|
|
121661
121626
|
// For more info see issues #625
|
|
@@ -121696,36 +121661,38 @@ function accessibilityOverscanIndicesGetter_defaultOverscanIndicesGetter(_ref) /
|
|
|
121696
121661
|
|
|
121697
121662
|
|
|
121698
121663
|
|
|
121699
|
-
|
|
121700
|
-
|
|
121701
|
-
var keys = Object.keys(object);
|
|
121664
|
+
function Table_ownKeys(e, r) {
|
|
121665
|
+
var t = Object.keys(e);
|
|
121702
121666
|
if (Object.getOwnPropertySymbols) {
|
|
121703
|
-
var
|
|
121704
|
-
|
|
121705
|
-
return Object.getOwnPropertyDescriptor(
|
|
121706
|
-
});
|
|
121707
|
-
keys.push.apply(keys, symbols);
|
|
121667
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
121668
|
+
r && (o = o.filter(function (r) {
|
|
121669
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
121670
|
+
})), t.push.apply(t, o);
|
|
121708
121671
|
}
|
|
121709
|
-
return
|
|
121672
|
+
return t;
|
|
121710
121673
|
}
|
|
121711
|
-
function Table_objectSpread(
|
|
121712
|
-
for (var
|
|
121713
|
-
var
|
|
121714
|
-
|
|
121715
|
-
|
|
121716
|
-
|
|
121717
|
-
|
|
121718
|
-
}
|
|
121719
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
121720
|
-
} else {
|
|
121721
|
-
Table_ownKeys(source).forEach(function (key) {
|
|
121722
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
121723
|
-
});
|
|
121724
|
-
}
|
|
121674
|
+
function Table_objectSpread(e) {
|
|
121675
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
121676
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
121677
|
+
r % 2 ? Table_ownKeys(Object(t), !0).forEach(function (r) {
|
|
121678
|
+
(0,defineProperty/* default */.A)(e, r, t[r]);
|
|
121679
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Table_ownKeys(Object(t)).forEach(function (r) {
|
|
121680
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
121681
|
+
});
|
|
121725
121682
|
}
|
|
121726
|
-
return
|
|
121683
|
+
return e;
|
|
121684
|
+
}
|
|
121685
|
+
function Table_callSuper(t, o, e) {
|
|
121686
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, Table_isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
121687
|
+
}
|
|
121688
|
+
function Table_isNativeReflectConstruct() {
|
|
121689
|
+
try {
|
|
121690
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
121691
|
+
} catch (t) {}
|
|
121692
|
+
return (Table_isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
|
121693
|
+
return !!t;
|
|
121694
|
+
})();
|
|
121727
121695
|
}
|
|
121728
|
-
|
|
121729
121696
|
/*:: import type {CellPosition} from '../Grid';*/
|
|
121730
121697
|
|
|
121731
121698
|
|
|
@@ -121736,35 +121703,35 @@ function Table_objectSpread(target) {
|
|
|
121736
121703
|
|
|
121737
121704
|
|
|
121738
121705
|
|
|
121706
|
+
|
|
121739
121707
|
/**
|
|
121740
121708
|
* Table component with fixed headers and virtualized rows for improved performance with large data sets.
|
|
121741
121709
|
* This component expects explicit width, height, and padding parameters.
|
|
121742
121710
|
*/
|
|
121743
|
-
|
|
121744
|
-
var Table = /*#__PURE__*/
|
|
121745
|
-
function (_React$PureComponent) {
|
|
121746
|
-
_inherits(Table, _React$PureComponent);
|
|
121711
|
+
var Table = /*#__PURE__*/function (_React$PureComponent) {
|
|
121747
121712
|
function Table(props) {
|
|
121748
121713
|
var _this;
|
|
121749
121714
|
_classCallCheck(this, Table);
|
|
121750
|
-
_this =
|
|
121715
|
+
_this = Table_callSuper(this, Table, [props]);
|
|
121751
121716
|
_this.state = {
|
|
121752
121717
|
scrollbarWidth: 0
|
|
121753
121718
|
};
|
|
121754
|
-
_this._createColumn = _this._createColumn.bind(
|
|
121755
|
-
_this._createRow = _this._createRow.bind(
|
|
121756
|
-
_this._onScroll = _this._onScroll.bind(
|
|
121757
|
-
_this._onSectionRendered = _this._onSectionRendered.bind(
|
|
121758
|
-
_this._setRef = _this._setRef.bind(
|
|
121719
|
+
_this._createColumn = _this._createColumn.bind(_this);
|
|
121720
|
+
_this._createRow = _this._createRow.bind(_this);
|
|
121721
|
+
_this._onScroll = _this._onScroll.bind(_this);
|
|
121722
|
+
_this._onSectionRendered = _this._onSectionRendered.bind(_this);
|
|
121723
|
+
_this._setRef = _this._setRef.bind(_this);
|
|
121759
121724
|
return _this;
|
|
121760
121725
|
}
|
|
121761
|
-
|
|
121726
|
+
_inherits(Table, _React$PureComponent);
|
|
121727
|
+
return _createClass(Table, [{
|
|
121762
121728
|
key: "forceUpdateGrid",
|
|
121763
121729
|
value: function forceUpdateGrid() {
|
|
121764
121730
|
if (this.Grid) {
|
|
121765
121731
|
this.Grid.forceUpdate();
|
|
121766
121732
|
}
|
|
121767
121733
|
}
|
|
121734
|
+
|
|
121768
121735
|
/** See Grid#getOffsetForCell */
|
|
121769
121736
|
}, {
|
|
121770
121737
|
key: "getOffsetForRow",
|
|
@@ -121781,12 +121748,13 @@ function (_React$PureComponent) {
|
|
|
121781
121748
|
}
|
|
121782
121749
|
return 0;
|
|
121783
121750
|
}
|
|
121751
|
+
|
|
121784
121752
|
/** CellMeasurer compatibility */
|
|
121785
121753
|
}, {
|
|
121786
121754
|
key: "invalidateCellSizeAfterRender",
|
|
121787
|
-
value: function invalidateCellSizeAfterRender(_ref2) {
|
|
121788
|
-
var columnIndex = _ref2
|
|
121789
|
-
rowIndex = _ref2
|
|
121755
|
+
value: function invalidateCellSizeAfterRender(_ref2 /*:: */) {
|
|
121756
|
+
var columnIndex = _ref2 /*:: */.columnIndex,
|
|
121757
|
+
rowIndex = _ref2 /*:: */.rowIndex;
|
|
121790
121758
|
if (this.Grid) {
|
|
121791
121759
|
this.Grid.invalidateCellSizeAfterRender({
|
|
121792
121760
|
rowIndex: rowIndex,
|
|
@@ -121794,6 +121762,7 @@ function (_React$PureComponent) {
|
|
|
121794
121762
|
});
|
|
121795
121763
|
}
|
|
121796
121764
|
}
|
|
121765
|
+
|
|
121797
121766
|
/** See Grid#measureAllCells */
|
|
121798
121767
|
}, {
|
|
121799
121768
|
key: "measureAllRows",
|
|
@@ -121802,6 +121771,7 @@ function (_React$PureComponent) {
|
|
|
121802
121771
|
this.Grid.measureAllCells();
|
|
121803
121772
|
}
|
|
121804
121773
|
}
|
|
121774
|
+
|
|
121805
121775
|
/** CellMeasurer compatibility */
|
|
121806
121776
|
}, {
|
|
121807
121777
|
key: "recomputeGridSize",
|
|
@@ -121818,6 +121788,7 @@ function (_React$PureComponent) {
|
|
|
121818
121788
|
});
|
|
121819
121789
|
}
|
|
121820
121790
|
}
|
|
121791
|
+
|
|
121821
121792
|
/** See Grid#recomputeGridSize */
|
|
121822
121793
|
}, {
|
|
121823
121794
|
key: "recomputeRowHeights",
|
|
@@ -121829,6 +121800,7 @@ function (_React$PureComponent) {
|
|
|
121829
121800
|
});
|
|
121830
121801
|
}
|
|
121831
121802
|
}
|
|
121803
|
+
|
|
121832
121804
|
/** See Grid#scrollToPosition */
|
|
121833
121805
|
}, {
|
|
121834
121806
|
key: "scrollToPosition",
|
|
@@ -121840,6 +121812,7 @@ function (_React$PureComponent) {
|
|
|
121840
121812
|
});
|
|
121841
121813
|
}
|
|
121842
121814
|
}
|
|
121815
|
+
|
|
121843
121816
|
/** See Grid#scrollToCell */
|
|
121844
121817
|
}, {
|
|
121845
121818
|
key: "scrollToRow",
|
|
@@ -121902,18 +121875,20 @@ function (_React$PureComponent) {
|
|
|
121902
121875
|
}) : rowClassName;
|
|
121903
121876
|
var rowStyleObject = typeof rowStyle === 'function' ? rowStyle({
|
|
121904
121877
|
index: -1
|
|
121905
|
-
}) : rowStyle;
|
|
121878
|
+
}) : rowStyle;
|
|
121906
121879
|
|
|
121880
|
+
// Precompute and cache column styles before rendering rows and columns to speed things up
|
|
121907
121881
|
this._cachedColumnStyles = [];
|
|
121908
121882
|
react.Children.toArray(children).forEach(function (column, index) {
|
|
121909
121883
|
var flexStyles = _this2._getFlexStyleForColumn(column, column.props.style);
|
|
121910
121884
|
_this2._cachedColumnStyles[index] = Table_objectSpread({
|
|
121911
121885
|
overflow: 'hidden'
|
|
121912
121886
|
}, flexStyles);
|
|
121913
|
-
});
|
|
121887
|
+
});
|
|
121888
|
+
|
|
121889
|
+
// Note that we specify :rowCount, :scrollbarWidth, :sortBy, and :sortDirection as properties on Grid even though these have nothing to do with Grid.
|
|
121914
121890
|
// This is done because Grid is a pure component and won't update unless its properties or state has changed.
|
|
121915
121891
|
// Any property that should trigger a re-render of Grid then is specified here to avoid a stale display.
|
|
121916
|
-
|
|
121917
121892
|
return /*#__PURE__*/react.createElement("div", {
|
|
121918
121893
|
"aria-label": this.props['aria-label'],
|
|
121919
121894
|
"aria-labelledby": this.props['aria-labelledby'],
|
|
@@ -121949,7 +121924,7 @@ function (_React$PureComponent) {
|
|
|
121949
121924
|
role: "rowgroup",
|
|
121950
121925
|
scrollbarWidth: scrollbarWidth,
|
|
121951
121926
|
scrollToRow: scrollToIndex,
|
|
121952
|
-
style: Table_objectSpread({}, gridStyle, {
|
|
121927
|
+
style: Table_objectSpread(Table_objectSpread({}, gridStyle), {}, {
|
|
121953
121928
|
overflowX: 'hidden'
|
|
121954
121929
|
})
|
|
121955
121930
|
})));
|
|
@@ -121995,10 +121970,11 @@ function (_React$PureComponent) {
|
|
|
121995
121970
|
});
|
|
121996
121971
|
};
|
|
121997
121972
|
var style = this._cachedColumnStyles[columnIndex];
|
|
121998
|
-
var title = typeof renderedCell === 'string' ? renderedCell : null;
|
|
121973
|
+
var title = typeof renderedCell === 'string' ? renderedCell : null;
|
|
121974
|
+
|
|
121975
|
+
// Avoid using object-spread syntax with multiple objects here,
|
|
121999
121976
|
// Since it results in an extra method call to 'babel-runtime/helpers/extends'
|
|
122000
121977
|
// See PR https://github.com/bvaughn/react-virtualized/pull/942
|
|
122001
|
-
|
|
122002
121978
|
return /*#__PURE__*/react.createElement("div", {
|
|
122003
121979
|
"aria-colindex": columnIndex + 1,
|
|
122004
121980
|
"aria-describedby": id,
|
|
@@ -122030,12 +122006,13 @@ function (_React$PureComponent) {
|
|
|
122030
122006
|
headerRenderer = _column$props2.headerRenderer,
|
|
122031
122007
|
headerRole = _column$props2.headerRole,
|
|
122032
122008
|
id = _column$props2.id,
|
|
122033
|
-
label = _column$props2.label
|
|
122009
|
+
label = _column$props2.label,
|
|
122010
|
+
preventAriaLabel = _column$props2.preventAriaLabel;
|
|
122034
122011
|
var sortEnabled = !disableSort && sort;
|
|
122035
122012
|
var classNames = clsx_m('ReactVirtualized__Table__headerColumn', headerClassName, column.props.headerClassName, {
|
|
122036
122013
|
ReactVirtualized__Table__sortableHeaderColumn: sortEnabled
|
|
122037
122014
|
});
|
|
122038
|
-
var style = this._getFlexStyleForColumn(column, Table_objectSpread({}, headerStyle,
|
|
122015
|
+
var style = this._getFlexStyleForColumn(column, Table_objectSpread(Table_objectSpread({}, headerStyle), column.props.headerStyle));
|
|
122039
122016
|
var renderedHeader = headerRenderer({
|
|
122040
122017
|
columnData: columnData,
|
|
122041
122018
|
dataKey: dataKey,
|
|
@@ -122044,13 +122021,22 @@ function (_React$PureComponent) {
|
|
|
122044
122021
|
sortBy: sortBy,
|
|
122045
122022
|
sortDirection: sortDirection
|
|
122046
122023
|
});
|
|
122047
|
-
var headerOnClick, headerOnKeyDown, headerTabIndex, headerAriaSort
|
|
122024
|
+
var headerOnClick, headerOnKeyDown, headerTabIndex, headerAriaSort;
|
|
122025
|
+
var headerAriaLabel = preventAriaLabel ? undefined : column.props['aria-label'] || label || dataKey;
|
|
122048
122026
|
if (sortEnabled || onHeaderClick) {
|
|
122049
122027
|
// If this is a sortable header, clicking it should update the table data's sorting.
|
|
122050
|
-
var isFirstTimeSort = sortBy !== dataKey;
|
|
122051
|
-
// Otherwise, invert the direction of the sort.
|
|
122028
|
+
var isFirstTimeSort = sortBy !== dataKey;
|
|
122052
122029
|
|
|
122053
|
-
|
|
122030
|
+
// If this is the firstTime sort of this column, use the column default sort order.
|
|
122031
|
+
// Otherwise, invert the direction of the sort.
|
|
122032
|
+
var newSortDirection;
|
|
122033
|
+
if (isFirstTimeSort) {
|
|
122034
|
+
newSortDirection = defaultSortDirection;
|
|
122035
|
+
} else if (sortDirection === Table_SortDirection.DESC) {
|
|
122036
|
+
newSortDirection = Table_SortDirection.ASC;
|
|
122037
|
+
} else {
|
|
122038
|
+
newSortDirection = Table_SortDirection.DESC;
|
|
122039
|
+
}
|
|
122054
122040
|
var onClick = function onClick(event) {
|
|
122055
122041
|
sortEnabled && sort({
|
|
122056
122042
|
defaultSortDirection: defaultSortDirection,
|
|
@@ -122069,7 +122055,6 @@ function (_React$PureComponent) {
|
|
|
122069
122055
|
onClick(event);
|
|
122070
122056
|
}
|
|
122071
122057
|
};
|
|
122072
|
-
headerAriaLabel = column.props['aria-label'] || label || dataKey;
|
|
122073
122058
|
headerAriaSort = 'none';
|
|
122074
122059
|
headerTabIndex = 0;
|
|
122075
122060
|
headerOnClick = onClick;
|
|
@@ -122077,10 +122062,11 @@ function (_React$PureComponent) {
|
|
|
122077
122062
|
}
|
|
122078
122063
|
if (sortBy === dataKey) {
|
|
122079
122064
|
headerAriaSort = sortDirection === Table_SortDirection.ASC ? 'ascending' : 'descending';
|
|
122080
|
-
}
|
|
122065
|
+
}
|
|
122066
|
+
|
|
122067
|
+
// Avoid using object-spread syntax with multiple objects here,
|
|
122081
122068
|
// Since it results in an extra method call to 'babel-runtime/helpers/extends'
|
|
122082
122069
|
// See PR https://github.com/bvaughn/react-virtualized/pull/942
|
|
122083
|
-
|
|
122084
122070
|
return /*#__PURE__*/react.createElement("div", {
|
|
122085
122071
|
"aria-label": headerAriaLabel,
|
|
122086
122072
|
"aria-sort": headerAriaSort,
|
|
@@ -122136,7 +122122,7 @@ function (_React$PureComponent) {
|
|
|
122136
122122
|
});
|
|
122137
122123
|
});
|
|
122138
122124
|
var className = clsx_m('ReactVirtualized__Table__row', rowClass);
|
|
122139
|
-
var flattenedStyle = Table_objectSpread({}, style, {
|
|
122125
|
+
var flattenedStyle = Table_objectSpread(Table_objectSpread({}, style), {}, {
|
|
122140
122126
|
height: this._getRowHeight(index),
|
|
122141
122127
|
overflow: 'hidden',
|
|
122142
122128
|
paddingRight: scrollbarWidth
|
|
@@ -122156,6 +122142,7 @@ function (_React$PureComponent) {
|
|
|
122156
122142
|
style: flattenedStyle
|
|
122157
122143
|
});
|
|
122158
122144
|
}
|
|
122145
|
+
|
|
122159
122146
|
/**
|
|
122160
122147
|
* Determines the flex-shrink, flex-grow, and width values for a cell (header or column).
|
|
122161
122148
|
*/
|
|
@@ -122164,7 +122151,7 @@ function (_React$PureComponent) {
|
|
|
122164
122151
|
value: function _getFlexStyleForColumn(column) {
|
|
122165
122152
|
var customStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
122166
122153
|
var flexValue = "".concat(column.props.flexGrow, " ").concat(column.props.flexShrink, " ").concat(column.props.width, "px");
|
|
122167
|
-
var style = Table_objectSpread({}, customStyle, {
|
|
122154
|
+
var style = Table_objectSpread(Table_objectSpread({}, customStyle), {}, {
|
|
122168
122155
|
flex: flexValue,
|
|
122169
122156
|
msFlex: flexValue,
|
|
122170
122157
|
WebkitFlex: flexValue
|
|
@@ -122242,7 +122229,6 @@ function (_React$PureComponent) {
|
|
|
122242
122229
|
});
|
|
122243
122230
|
}
|
|
122244
122231
|
}]);
|
|
122245
|
-
return Table;
|
|
122246
122232
|
}(react.PureComponent);
|
|
122247
122233
|
(0,defineProperty/* default */.A)(Table, "defaultProps", {
|
|
122248
122234
|
disableHeader: false,
|
|
@@ -122297,6 +122283,7 @@ Table.propTypes = false ? 0 : {};
|
|
|
122297
122283
|
* 4) Add nonce for style element.
|
|
122298
122284
|
* 5) Added support for injecting custom window object
|
|
122299
122285
|
**/
|
|
122286
|
+
|
|
122300
122287
|
function createDetectElementResize(nonce, hostWindow) {
|
|
122301
122288
|
// Check `document` and `window` in case of server-side rendering
|
|
122302
122289
|
var _window;
|
|
@@ -122360,8 +122347,8 @@ function createDetectElementResize(nonce, hostWindow) {
|
|
|
122360
122347
|
}
|
|
122361
122348
|
});
|
|
122362
122349
|
};
|
|
122363
|
-
/* Detect CSS Animations support to detect element display/re-attach */
|
|
122364
122350
|
|
|
122351
|
+
/* Detect CSS Animations support to detect element display/re-attach */
|
|
122365
122352
|
var animation = false,
|
|
122366
122353
|
keyframeprefix = '',
|
|
122367
122354
|
animationstartevent = 'animationstart',
|
|
@@ -122432,8 +122419,8 @@ function createDetectElementResize(nonce, hostWindow) {
|
|
|
122432
122419
|
element.appendChild(element.__resizeTriggers__);
|
|
122433
122420
|
resetTriggers(element);
|
|
122434
122421
|
element.addEventListener('scroll', scrollListener, true);
|
|
122435
|
-
/* Listen for a css animation to detect element display/re-attach */
|
|
122436
122422
|
|
|
122423
|
+
/* Listen for a css animation to detect element display/re-attach */
|
|
122437
122424
|
if (animationstartevent) {
|
|
122438
122425
|
element.__resizeTriggers__.__animationListener__ = function animationListener(e) {
|
|
122439
122426
|
if (e.animationName == animationName) {
|
|
@@ -122459,7 +122446,8 @@ function createDetectElementResize(nonce, hostWindow) {
|
|
|
122459
122446
|
}
|
|
122460
122447
|
try {
|
|
122461
122448
|
element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
|
|
122462
|
-
} catch (e) {
|
|
122449
|
+
} catch (e) {
|
|
122450
|
+
// Preact compat; see developit/preact-compat/issues/228
|
|
122463
122451
|
}
|
|
122464
122452
|
}
|
|
122465
122453
|
}
|
|
@@ -122476,34 +122464,37 @@ function createDetectElementResize(nonce, hostWindow) {
|
|
|
122476
122464
|
|
|
122477
122465
|
|
|
122478
122466
|
|
|
122479
|
-
|
|
122480
|
-
|
|
122481
|
-
var keys = Object.keys(object);
|
|
122467
|
+
function AutoSizer_ownKeys(e, r) {
|
|
122468
|
+
var t = Object.keys(e);
|
|
122482
122469
|
if (Object.getOwnPropertySymbols) {
|
|
122483
|
-
var
|
|
122484
|
-
|
|
122485
|
-
return Object.getOwnPropertyDescriptor(
|
|
122486
|
-
});
|
|
122487
|
-
keys.push.apply(keys, symbols);
|
|
122470
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
122471
|
+
r && (o = o.filter(function (r) {
|
|
122472
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
122473
|
+
})), t.push.apply(t, o);
|
|
122488
122474
|
}
|
|
122489
|
-
return
|
|
122475
|
+
return t;
|
|
122490
122476
|
}
|
|
122491
|
-
function AutoSizer_objectSpread(
|
|
122492
|
-
for (var
|
|
122493
|
-
var
|
|
122494
|
-
|
|
122495
|
-
|
|
122496
|
-
|
|
122497
|
-
|
|
122498
|
-
}
|
|
122499
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
122500
|
-
} else {
|
|
122501
|
-
AutoSizer_ownKeys(source).forEach(function (key) {
|
|
122502
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
122503
|
-
});
|
|
122504
|
-
}
|
|
122477
|
+
function AutoSizer_objectSpread(e) {
|
|
122478
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
122479
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
122480
|
+
r % 2 ? AutoSizer_ownKeys(Object(t), !0).forEach(function (r) {
|
|
122481
|
+
(0,defineProperty/* default */.A)(e, r, t[r]);
|
|
122482
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : AutoSizer_ownKeys(Object(t)).forEach(function (r) {
|
|
122483
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
122484
|
+
});
|
|
122505
122485
|
}
|
|
122506
|
-
return
|
|
122486
|
+
return e;
|
|
122487
|
+
}
|
|
122488
|
+
function AutoSizer_callSuper(t, o, e) {
|
|
122489
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, AutoSizer_isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
122490
|
+
}
|
|
122491
|
+
function AutoSizer_isNativeReflectConstruct() {
|
|
122492
|
+
try {
|
|
122493
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
122494
|
+
} catch (t) {}
|
|
122495
|
+
return (AutoSizer_isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
|
122496
|
+
return !!t;
|
|
122497
|
+
})();
|
|
122507
122498
|
}
|
|
122508
122499
|
|
|
122509
122500
|
|
|
@@ -122511,7 +122502,6 @@ function AutoSizer_objectSpread(target) {
|
|
|
122511
122502
|
height: number,
|
|
122512
122503
|
width: number,
|
|
122513
122504
|
};*/
|
|
122514
|
-
|
|
122515
122505
|
/*:: type Props = {
|
|
122516
122506
|
/** Function responsible for rendering children.*-/
|
|
122517
122507
|
children: Size => React.Element<*>,
|
|
@@ -122540,39 +122530,33 @@ function AutoSizer_objectSpread(target) {
|
|
|
122540
122530
|
/** Optional inline style *-/
|
|
122541
122531
|
style: ?Object,
|
|
122542
122532
|
};*/
|
|
122543
|
-
|
|
122544
122533
|
/*:: type State = {
|
|
122545
122534
|
height: number,
|
|
122546
122535
|
width: number,
|
|
122547
122536
|
};*/
|
|
122548
|
-
|
|
122549
122537
|
/*:: type ResizeHandler = (element: HTMLElement, onResize: () => void) => void;*/
|
|
122550
|
-
|
|
122551
122538
|
/*:: type DetectElementResize = {
|
|
122552
122539
|
addResizeListener: ResizeHandler,
|
|
122553
122540
|
removeResizeListener: ResizeHandler,
|
|
122554
122541
|
};*/
|
|
122555
|
-
|
|
122556
|
-
var AutoSizer = /*#__PURE__*/
|
|
122557
|
-
function (_React$Component) {
|
|
122558
|
-
_inherits(AutoSizer, _React$Component);
|
|
122542
|
+
var AutoSizer = /*#__PURE__*/function (_React$Component) {
|
|
122559
122543
|
function AutoSizer() {
|
|
122560
|
-
var _getPrototypeOf2;
|
|
122561
122544
|
var _this;
|
|
122562
122545
|
_classCallCheck(this, AutoSizer);
|
|
122563
122546
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
122564
122547
|
args[_key] = arguments[_key];
|
|
122565
122548
|
}
|
|
122566
|
-
_this =
|
|
122567
|
-
(0,defineProperty/* default */.A)(
|
|
122549
|
+
_this = AutoSizer_callSuper(this, AutoSizer, [].concat(args));
|
|
122550
|
+
(0,defineProperty/* default */.A)(_this, "state", {
|
|
122568
122551
|
height: _this.props.defaultHeight || 0,
|
|
122569
122552
|
width: _this.props.defaultWidth || 0
|
|
122570
122553
|
});
|
|
122571
|
-
(0,defineProperty/* default */.A)(
|
|
122572
|
-
(0,defineProperty/* default */.A)(
|
|
122573
|
-
(0,defineProperty/* default */.A)(
|
|
122574
|
-
|
|
122575
|
-
(0,defineProperty/* default */.A)(
|
|
122554
|
+
(0,defineProperty/* default */.A)(_this, "_parentNode", void 0);
|
|
122555
|
+
(0,defineProperty/* default */.A)(_this, "_autoSizer", void 0);
|
|
122556
|
+
(0,defineProperty/* default */.A)(_this, "_window", void 0);
|
|
122557
|
+
// uses any instead of Window because Flow doesn't have window type
|
|
122558
|
+
(0,defineProperty/* default */.A)(_this, "_detectElementResize", void 0);
|
|
122559
|
+
(0,defineProperty/* default */.A)(_this, "_onResize", function () {
|
|
122576
122560
|
var _this$props = _this.props,
|
|
122577
122561
|
disableHeight = _this$props.disableHeight,
|
|
122578
122562
|
disableWidth = _this$props.disableWidth,
|
|
@@ -122581,6 +122565,7 @@ function (_React$Component) {
|
|
|
122581
122565
|
// Guard against AutoSizer component being removed from the DOM immediately after being added.
|
|
122582
122566
|
// This can result in invalid style values which can result in NaN values if we don't handle them.
|
|
122583
122567
|
// See issue #150 for more context.
|
|
122568
|
+
|
|
122584
122569
|
var height = _this._parentNode.offsetHeight || 0;
|
|
122585
122570
|
var width = _this._parentNode.offsetWidth || 0;
|
|
122586
122571
|
var win = _this._window || window;
|
|
@@ -122603,13 +122588,13 @@ function (_React$Component) {
|
|
|
122603
122588
|
}
|
|
122604
122589
|
}
|
|
122605
122590
|
});
|
|
122606
|
-
(0,defineProperty/* default */.A)(
|
|
122607
|
-
/*: ?HTMLElement*/) {
|
|
122591
|
+
(0,defineProperty/* default */.A)(_this, "_setRef", function (autoSizer /*: ?HTMLElement*/) {
|
|
122608
122592
|
_this._autoSizer = autoSizer;
|
|
122609
122593
|
});
|
|
122610
122594
|
return _this;
|
|
122611
122595
|
}
|
|
122612
|
-
|
|
122596
|
+
_inherits(AutoSizer, _React$Component);
|
|
122597
|
+
return _createClass(AutoSizer, [{
|
|
122613
122598
|
key: "componentDidMount",
|
|
122614
122599
|
value: function componentDidMount() {
|
|
122615
122600
|
var nonce = this.props.nonce;
|
|
@@ -122618,9 +122603,10 @@ function (_React$Component) {
|
|
|
122618
122603
|
// This handles edge-cases where the component has already been unmounted before its ref has been set,
|
|
122619
122604
|
// As well as libraries like react-lite which have a slightly different lifecycle.
|
|
122620
122605
|
this._parentNode = this._autoSizer.parentNode;
|
|
122621
|
-
this._window = this._autoSizer.parentNode.ownerDocument.defaultView;
|
|
122622
|
-
// See issue #41
|
|
122606
|
+
this._window = this._autoSizer.parentNode.ownerDocument.defaultView;
|
|
122623
122607
|
|
|
122608
|
+
// Defer requiring resize handler in order to support server-side rendering.
|
|
122609
|
+
// See issue #41
|
|
122624
122610
|
this._detectElementResize = createDetectElementResize(nonce, this._window);
|
|
122625
122611
|
this._detectElementResize.addResizeListener(this._parentNode, this._onResize);
|
|
122626
122612
|
this._onResize();
|
|
@@ -122644,16 +122630,15 @@ function (_React$Component) {
|
|
|
122644
122630
|
style = _this$props2.style;
|
|
122645
122631
|
var _this$state = this.state,
|
|
122646
122632
|
height = _this$state.height,
|
|
122647
|
-
width = _this$state.width;
|
|
122633
|
+
width = _this$state.width;
|
|
122634
|
+
|
|
122635
|
+
// Outer div should not force width/height since that may prevent containers from shrinking.
|
|
122648
122636
|
// Inner component should overflow and use calculated width/height.
|
|
122649
122637
|
// See issue #68 for more information.
|
|
122650
|
-
|
|
122651
|
-
var outerStyle
|
|
122652
|
-
/*: Object*/ = {
|
|
122638
|
+
var outerStyle /*: Object*/ = {
|
|
122653
122639
|
overflow: 'visible'
|
|
122654
122640
|
};
|
|
122655
|
-
var childParams
|
|
122656
|
-
/*: Object*/ = {};
|
|
122641
|
+
var childParams /*: Object*/ = {};
|
|
122657
122642
|
if (!disableHeight) {
|
|
122658
122643
|
outerStyle.height = 0;
|
|
122659
122644
|
childParams.height = height;
|
|
@@ -122662,6 +122647,7 @@ function (_React$Component) {
|
|
|
122662
122647
|
outerStyle.width = 0;
|
|
122663
122648
|
childParams.width = width;
|
|
122664
122649
|
}
|
|
122650
|
+
|
|
122665
122651
|
/**
|
|
122666
122652
|
* TODO: Avoid rendering children before the initial measurements have been collected.
|
|
122667
122653
|
* At best this would just be wasting cycles.
|
|
@@ -122678,11 +122664,10 @@ function (_React$Component) {
|
|
|
122678
122664
|
return /*#__PURE__*/react.createElement("div", {
|
|
122679
122665
|
className: className,
|
|
122680
122666
|
ref: this._setRef,
|
|
122681
|
-
style: AutoSizer_objectSpread({}, outerStyle,
|
|
122667
|
+
style: AutoSizer_objectSpread(AutoSizer_objectSpread({}, outerStyle), style)
|
|
122682
122668
|
}, children(childParams));
|
|
122683
122669
|
}
|
|
122684
122670
|
}]);
|
|
122685
|
-
return AutoSizer;
|
|
122686
122671
|
}(react.Component);
|
|
122687
122672
|
(0,defineProperty/* default */.A)(AutoSizer, "defaultProps", {
|
|
122688
122673
|
onResize: function onResize() {},
|
|
@@ -130715,51 +130700,51 @@ progress_bar_ProgressBar_defineProperty(ProgressBar_ProgressBar, "defaultProps",
|
|
|
130715
130700
|
|
|
130716
130701
|
|
|
130717
130702
|
|
|
130718
|
-
|
|
130719
|
-
|
|
130720
|
-
var keys = Object.keys(object);
|
|
130703
|
+
function ArrowKeyStepper_ownKeys(e, r) {
|
|
130704
|
+
var t = Object.keys(e);
|
|
130721
130705
|
if (Object.getOwnPropertySymbols) {
|
|
130722
|
-
var
|
|
130723
|
-
|
|
130724
|
-
return Object.getOwnPropertyDescriptor(
|
|
130725
|
-
});
|
|
130726
|
-
keys.push.apply(keys, symbols);
|
|
130706
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
130707
|
+
r && (o = o.filter(function (r) {
|
|
130708
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
130709
|
+
})), t.push.apply(t, o);
|
|
130727
130710
|
}
|
|
130728
|
-
return
|
|
130711
|
+
return t;
|
|
130729
130712
|
}
|
|
130730
|
-
function ArrowKeyStepper_objectSpread(
|
|
130731
|
-
for (var
|
|
130732
|
-
var
|
|
130733
|
-
|
|
130734
|
-
|
|
130735
|
-
|
|
130736
|
-
|
|
130737
|
-
}
|
|
130738
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
130739
|
-
} else {
|
|
130740
|
-
ArrowKeyStepper_ownKeys(source).forEach(function (key) {
|
|
130741
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
130742
|
-
});
|
|
130743
|
-
}
|
|
130713
|
+
function ArrowKeyStepper_objectSpread(e) {
|
|
130714
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
130715
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
130716
|
+
r % 2 ? ArrowKeyStepper_ownKeys(Object(t), !0).forEach(function (r) {
|
|
130717
|
+
(0,defineProperty/* default */.A)(e, r, t[r]);
|
|
130718
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ArrowKeyStepper_ownKeys(Object(t)).forEach(function (r) {
|
|
130719
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
130720
|
+
});
|
|
130744
130721
|
}
|
|
130745
|
-
return
|
|
130722
|
+
return e;
|
|
130723
|
+
}
|
|
130724
|
+
function ArrowKeyStepper_callSuper(t, o, e) {
|
|
130725
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, ArrowKeyStepper_isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
130726
|
+
}
|
|
130727
|
+
function ArrowKeyStepper_isNativeReflectConstruct() {
|
|
130728
|
+
try {
|
|
130729
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
130730
|
+
} catch (t) {}
|
|
130731
|
+
return (ArrowKeyStepper_isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
|
130732
|
+
return !!t;
|
|
130733
|
+
})();
|
|
130746
130734
|
}
|
|
130747
|
-
|
|
130748
130735
|
/*:: import type {RenderedSection} from '../Grid';*/
|
|
130749
|
-
|
|
130750
130736
|
/*:: import type {ScrollIndices} from './types';*/
|
|
130751
130737
|
|
|
130752
130738
|
|
|
130739
|
+
|
|
130753
130740
|
/**
|
|
130754
130741
|
* This HOC decorates a virtualized component and responds to arrow-key events by scrolling one row or column at a time.
|
|
130755
130742
|
*/
|
|
130756
|
-
|
|
130757
130743
|
/*:: type ChildrenParams = {
|
|
130758
130744
|
onSectionRendered: (params: RenderedSection) => void,
|
|
130759
130745
|
scrollToColumn: number,
|
|
130760
130746
|
scrollToRow: number,
|
|
130761
130747
|
};*/
|
|
130762
|
-
|
|
130763
130748
|
/*:: type Props = {
|
|
130764
130749
|
children: (params: ChildrenParams) => React.Element<*>,
|
|
130765
130750
|
className?: string,
|
|
@@ -130772,26 +130757,21 @@ function ArrowKeyStepper_objectSpread(target) {
|
|
|
130772
130757
|
scrollToColumn: number,
|
|
130773
130758
|
scrollToRow: number,
|
|
130774
130759
|
};*/
|
|
130775
|
-
|
|
130776
130760
|
/*:: type State = ScrollIndices & {
|
|
130777
130761
|
instanceProps: {
|
|
130778
130762
|
prevScrollToColumn: number,
|
|
130779
130763
|
prevScrollToRow: number,
|
|
130780
130764
|
},
|
|
130781
130765
|
};*/
|
|
130782
|
-
|
|
130783
|
-
var ArrowKeyStepper = /*#__PURE__*/
|
|
130784
|
-
function (_React$PureComponent) {
|
|
130785
|
-
_inherits(ArrowKeyStepper, _React$PureComponent);
|
|
130766
|
+
var ArrowKeyStepper = /*#__PURE__*/function (_React$PureComponent) {
|
|
130786
130767
|
function ArrowKeyStepper() {
|
|
130787
|
-
var _getPrototypeOf2;
|
|
130788
130768
|
var _this;
|
|
130789
130769
|
_classCallCheck(this, ArrowKeyStepper);
|
|
130790
130770
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
130791
130771
|
args[_key] = arguments[_key];
|
|
130792
130772
|
}
|
|
130793
|
-
_this =
|
|
130794
|
-
(0,defineProperty/* default */.A)(
|
|
130773
|
+
_this = ArrowKeyStepper_callSuper(this, ArrowKeyStepper, [].concat(args));
|
|
130774
|
+
(0,defineProperty/* default */.A)(_this, "state", {
|
|
130795
130775
|
scrollToColumn: 0,
|
|
130796
130776
|
scrollToRow: 0,
|
|
130797
130777
|
instanceProps: {
|
|
@@ -130799,12 +130779,11 @@ function (_React$PureComponent) {
|
|
|
130799
130779
|
prevScrollToRow: 0
|
|
130800
130780
|
}
|
|
130801
130781
|
});
|
|
130802
|
-
(0,defineProperty/* default */.A)(
|
|
130803
|
-
(0,defineProperty/* default */.A)(
|
|
130804
|
-
(0,defineProperty/* default */.A)(
|
|
130805
|
-
(0,defineProperty/* default */.A)(
|
|
130806
|
-
(0,defineProperty/* default */.A)(
|
|
130807
|
-
/*: KeyboardEvent*/) {
|
|
130782
|
+
(0,defineProperty/* default */.A)(_this, "_columnStartIndex", 0);
|
|
130783
|
+
(0,defineProperty/* default */.A)(_this, "_columnStopIndex", 0);
|
|
130784
|
+
(0,defineProperty/* default */.A)(_this, "_rowStartIndex", 0);
|
|
130785
|
+
(0,defineProperty/* default */.A)(_this, "_rowStopIndex", 0);
|
|
130786
|
+
(0,defineProperty/* default */.A)(_this, "_onKeyDown", function (event /*: KeyboardEvent*/) {
|
|
130808
130787
|
var _this$props = _this.props,
|
|
130809
130788
|
columnCount = _this$props.columnCount,
|
|
130810
130789
|
disabled = _this$props.disabled,
|
|
@@ -130818,9 +130797,10 @@ function (_React$PureComponent) {
|
|
|
130818
130797
|
scrollToRowPrevious = _this$_getScrollState.scrollToRow;
|
|
130819
130798
|
var _this$_getScrollState2 = _this._getScrollState(),
|
|
130820
130799
|
scrollToColumn = _this$_getScrollState2.scrollToColumn,
|
|
130821
|
-
scrollToRow = _this$_getScrollState2.scrollToRow;
|
|
130822
|
-
// This is to keep the grid from scrolling after the snap-to update.
|
|
130800
|
+
scrollToRow = _this$_getScrollState2.scrollToRow;
|
|
130823
130801
|
|
|
130802
|
+
// The above cases all prevent default event event behavior.
|
|
130803
|
+
// This is to keep the grid from scrolling after the snap-to update.
|
|
130824
130804
|
switch (event.key) {
|
|
130825
130805
|
case 'ArrowDown':
|
|
130826
130806
|
scrollToRow = mode === 'cells' ? Math.min(scrollToRow + 1, rowCount - 1) : Math.min(_this._rowStopIndex + 1, rowCount - 1);
|
|
@@ -130843,11 +130823,11 @@ function (_React$PureComponent) {
|
|
|
130843
130823
|
});
|
|
130844
130824
|
}
|
|
130845
130825
|
});
|
|
130846
|
-
(0,defineProperty/* default */.A)(
|
|
130847
|
-
var columnStartIndex = _ref
|
|
130848
|
-
columnStopIndex = _ref
|
|
130849
|
-
rowStartIndex = _ref
|
|
130850
|
-
rowStopIndex = _ref
|
|
130826
|
+
(0,defineProperty/* default */.A)(_this, "_onSectionRendered", function (_ref /*:: */) {
|
|
130827
|
+
var columnStartIndex = _ref /*:: */.columnStartIndex,
|
|
130828
|
+
columnStopIndex = _ref /*:: */.columnStopIndex,
|
|
130829
|
+
rowStartIndex = _ref /*:: */.rowStartIndex,
|
|
130830
|
+
rowStopIndex = _ref /*:: */.rowStopIndex;
|
|
130851
130831
|
_this._columnStartIndex = columnStartIndex;
|
|
130852
130832
|
_this._columnStopIndex = columnStopIndex;
|
|
130853
130833
|
_this._rowStartIndex = rowStartIndex;
|
|
@@ -130855,11 +130835,12 @@ function (_React$PureComponent) {
|
|
|
130855
130835
|
});
|
|
130856
130836
|
return _this;
|
|
130857
130837
|
}
|
|
130858
|
-
|
|
130838
|
+
_inherits(ArrowKeyStepper, _React$PureComponent);
|
|
130839
|
+
return _createClass(ArrowKeyStepper, [{
|
|
130859
130840
|
key: "setScrollIndexes",
|
|
130860
|
-
value: function setScrollIndexes(_ref2) {
|
|
130861
|
-
var scrollToColumn = _ref2
|
|
130862
|
-
scrollToRow = _ref2
|
|
130841
|
+
value: function setScrollIndexes(_ref2 /*:: */) {
|
|
130842
|
+
var scrollToColumn = _ref2 /*:: */.scrollToColumn,
|
|
130843
|
+
scrollToRow = _ref2 /*:: */.scrollToRow;
|
|
130863
130844
|
this.setState({
|
|
130864
130845
|
scrollToRow: scrollToRow,
|
|
130865
130846
|
scrollToColumn: scrollToColumn
|
|
@@ -130890,9 +130871,9 @@ function (_React$PureComponent) {
|
|
|
130890
130871
|
}
|
|
130891
130872
|
}, {
|
|
130892
130873
|
key: "_updateScrollState",
|
|
130893
|
-
value: function _updateScrollState(_ref3) {
|
|
130894
|
-
var scrollToColumn = _ref3
|
|
130895
|
-
scrollToRow = _ref3
|
|
130874
|
+
value: function _updateScrollState(_ref3 /*:: */) {
|
|
130875
|
+
var scrollToColumn = _ref3 /*:: */.scrollToColumn,
|
|
130876
|
+
scrollToRow = _ref3 /*:: */.scrollToRow;
|
|
130896
130877
|
var _this$props3 = this.props,
|
|
130897
130878
|
isControlled = _this$props3.isControlled,
|
|
130898
130879
|
onScrollToChange = _this$props3.onScrollToChange;
|
|
@@ -130911,15 +130892,12 @@ function (_React$PureComponent) {
|
|
|
130911
130892
|
}
|
|
130912
130893
|
}], [{
|
|
130913
130894
|
key: "getDerivedStateFromProps",
|
|
130914
|
-
value: function getDerivedStateFromProps(nextProps
|
|
130915
|
-
/*: Props*/, prevState
|
|
130916
|
-
/*: State*/) /*: $Shape<State>*/
|
|
130917
|
-
{
|
|
130895
|
+
value: function getDerivedStateFromProps(nextProps /*: Props*/, prevState /*: State*/) /*: $Shape<State>*/{
|
|
130918
130896
|
if (nextProps.isControlled) {
|
|
130919
130897
|
return {};
|
|
130920
130898
|
}
|
|
130921
130899
|
if (nextProps.scrollToColumn !== prevState.instanceProps.prevScrollToColumn || nextProps.scrollToRow !== prevState.instanceProps.prevScrollToRow) {
|
|
130922
|
-
return ArrowKeyStepper_objectSpread({}, prevState, {
|
|
130900
|
+
return ArrowKeyStepper_objectSpread(ArrowKeyStepper_objectSpread({}, prevState), {}, {
|
|
130923
130901
|
scrollToColumn: nextProps.scrollToColumn,
|
|
130924
130902
|
scrollToRow: nextProps.scrollToRow,
|
|
130925
130903
|
instanceProps: {
|
|
@@ -130931,7 +130909,6 @@ function (_React$PureComponent) {
|
|
|
130931
130909
|
return {};
|
|
130932
130910
|
}
|
|
130933
130911
|
}]);
|
|
130934
|
-
return ArrowKeyStepper;
|
|
130935
130912
|
}(react.PureComponent);
|
|
130936
130913
|
(0,defineProperty/* default */.A)(ArrowKeyStepper, "defaultProps", {
|
|
130937
130914
|
disabled: false,
|
|
@@ -130953,18 +130930,25 @@ function (_React$PureComponent) {
|
|
|
130953
130930
|
|
|
130954
130931
|
|
|
130955
130932
|
|
|
130956
|
-
|
|
130933
|
+
function CellMeasurer_callSuper(t, o, e) {
|
|
130934
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, CellMeasurer_isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
130935
|
+
}
|
|
130936
|
+
function CellMeasurer_isNativeReflectConstruct() {
|
|
130937
|
+
try {
|
|
130938
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
130939
|
+
} catch (t) {}
|
|
130940
|
+
return (CellMeasurer_isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
|
130941
|
+
return !!t;
|
|
130942
|
+
})();
|
|
130943
|
+
}
|
|
130957
130944
|
|
|
130958
130945
|
|
|
130959
130946
|
/*:: import type {CellMeasureCache} from './types';*/
|
|
130960
|
-
|
|
130961
130947
|
/*:: type Children = (params: {measure: () => void}) => React.Element<*>;*/
|
|
130962
|
-
|
|
130963
130948
|
/*:: type Cell = {
|
|
130964
130949
|
columnIndex: number,
|
|
130965
130950
|
rowIndex: number,
|
|
130966
130951
|
};*/
|
|
130967
|
-
|
|
130968
130952
|
/*:: type Props = {
|
|
130969
130953
|
cache: CellMeasureCache,
|
|
130970
130954
|
children: Children | React.Element<*>,
|
|
@@ -130976,25 +130960,21 @@ function (_React$PureComponent) {
|
|
|
130976
130960
|
},
|
|
130977
130961
|
rowIndex?: number,
|
|
130978
130962
|
};*/
|
|
130979
|
-
|
|
130980
130963
|
/**
|
|
130981
130964
|
* Wraps a cell and measures its rendered content.
|
|
130982
130965
|
* Measurements are stored in a per-cell cache.
|
|
130983
130966
|
* Cached-content is not be re-measured.
|
|
130984
130967
|
*/
|
|
130985
|
-
var CellMeasurer_CellMeasurer = /*#__PURE__*/
|
|
130986
|
-
function (_React$PureComponent) {
|
|
130987
|
-
_inherits(CellMeasurer, _React$PureComponent);
|
|
130968
|
+
var CellMeasurer_CellMeasurer = /*#__PURE__*/function (_React$PureComponent) {
|
|
130988
130969
|
function CellMeasurer() {
|
|
130989
|
-
var _getPrototypeOf2;
|
|
130990
130970
|
var _this;
|
|
130991
130971
|
_classCallCheck(this, CellMeasurer);
|
|
130992
130972
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
130993
130973
|
args[_key] = arguments[_key];
|
|
130994
130974
|
}
|
|
130995
|
-
_this =
|
|
130996
|
-
(0,defineProperty/* default */.A)(
|
|
130997
|
-
(0,defineProperty/* default */.A)(
|
|
130975
|
+
_this = CellMeasurer_callSuper(this, CellMeasurer, [].concat(args));
|
|
130976
|
+
(0,defineProperty/* default */.A)(_this, "_child", void 0);
|
|
130977
|
+
(0,defineProperty/* default */.A)(_this, "_measure", function () {
|
|
130998
130978
|
var _this$props = _this.props,
|
|
130999
130979
|
cache = _this$props.cache,
|
|
131000
130980
|
_this$props$columnInd = _this$props.columnIndex,
|
|
@@ -131015,7 +130995,7 @@ function (_React$PureComponent) {
|
|
|
131015
130995
|
}
|
|
131016
130996
|
}
|
|
131017
130997
|
});
|
|
131018
|
-
(0,defineProperty/* default */.A)(
|
|
130998
|
+
(0,defineProperty/* default */.A)(_this, "_registerChild", function (element) {
|
|
131019
130999
|
if (element && !(element instanceof Element)) {
|
|
131020
131000
|
console.warn('CellMeasurer registerChild expects to be passed Element or null');
|
|
131021
131001
|
}
|
|
@@ -131026,7 +131006,8 @@ function (_React$PureComponent) {
|
|
|
131026
131006
|
});
|
|
131027
131007
|
return _this;
|
|
131028
131008
|
}
|
|
131029
|
-
|
|
131009
|
+
_inherits(CellMeasurer, _React$PureComponent);
|
|
131010
|
+
return _createClass(CellMeasurer, [{
|
|
131030
131011
|
key: "componentDidMount",
|
|
131031
131012
|
value: function componentDidMount() {
|
|
131032
131013
|
this._maybeMeasureCell();
|
|
@@ -131049,11 +131030,15 @@ function (_React$PureComponent) {
|
|
|
131049
131030
|
key: "_getCellMeasurements",
|
|
131050
131031
|
value: function _getCellMeasurements() {
|
|
131051
131032
|
var cache = this.props.cache;
|
|
131052
|
-
var node = this._child || (0,react_dom.findDOMNode)(this);
|
|
131033
|
+
var node = this._child || (0,react_dom.findDOMNode)(this);
|
|
131034
|
+
|
|
131035
|
+
// TODO Check for a bad combination of fixedWidth and missing numeric width or vice versa with height
|
|
131053
131036
|
|
|
131054
131037
|
if (node && node.ownerDocument && node.ownerDocument.defaultView && node instanceof node.ownerDocument.defaultView.HTMLElement) {
|
|
131055
131038
|
var styleWidth = node.style.width;
|
|
131056
|
-
var styleHeight = node.style.height;
|
|
131039
|
+
var styleHeight = node.style.height;
|
|
131040
|
+
|
|
131041
|
+
// If we are re-measuring a cell that has already been measured,
|
|
131057
131042
|
// It will have a hard-coded width/height from the previous measurement.
|
|
131058
131043
|
// The fact that we are measuring indicates this measurement is probably stale,
|
|
131059
131044
|
// So explicitly clear it out (eg set to "auto") so we can recalculate.
|
|
@@ -131062,7 +131047,6 @@ function (_React$PureComponent) {
|
|
|
131062
131047
|
// Explicitly clear width/height before measuring to avoid being tainted by another Grid.
|
|
131063
131048
|
// eg top/left Grid renders before bottom/right Grid
|
|
131064
131049
|
// Since the CellMeasurerCache is shared between them this taints derived cell size values.
|
|
131065
|
-
|
|
131066
131050
|
if (!cache.hasFixedWidth()) {
|
|
131067
131051
|
node.style.width = 'auto';
|
|
131068
131052
|
}
|
|
@@ -131070,8 +131054,9 @@ function (_React$PureComponent) {
|
|
|
131070
131054
|
node.style.height = 'auto';
|
|
131071
131055
|
}
|
|
131072
131056
|
var height = Math.ceil(node.offsetHeight);
|
|
131073
|
-
var width = Math.ceil(node.offsetWidth);
|
|
131057
|
+
var width = Math.ceil(node.offsetWidth);
|
|
131074
131058
|
|
|
131059
|
+
// Reset after measuring to avoid breaking styles; see #660
|
|
131075
131060
|
if (styleWidth) {
|
|
131076
131061
|
node.style.width = styleWidth;
|
|
131077
131062
|
}
|
|
@@ -131103,8 +131088,9 @@ function (_React$PureComponent) {
|
|
|
131103
131088
|
var _this$_getCellMeasure2 = this._getCellMeasurements(),
|
|
131104
131089
|
height = _this$_getCellMeasure2.height,
|
|
131105
131090
|
width = _this$_getCellMeasure2.width;
|
|
131106
|
-
cache.set(rowIndex, columnIndex, width, height);
|
|
131091
|
+
cache.set(rowIndex, columnIndex, width, height);
|
|
131107
131092
|
|
|
131093
|
+
// If size has changed, let Grid know to re-render.
|
|
131108
131094
|
if (parent && typeof parent.invalidateCellSizeAfterRender === 'function') {
|
|
131109
131095
|
parent.invalidateCellSizeAfterRender({
|
|
131110
131096
|
columnIndex: columnIndex,
|
|
@@ -131114,9 +131100,7 @@ function (_React$PureComponent) {
|
|
|
131114
131100
|
}
|
|
131115
131101
|
}
|
|
131116
131102
|
}]);
|
|
131117
|
-
return CellMeasurer;
|
|
131118
131103
|
}(react.PureComponent); // Used for DEV mode warning check
|
|
131119
|
-
|
|
131120
131104
|
(0,defineProperty/* default */.A)(CellMeasurer_CellMeasurer, "__internalCellMeasurerFlag", false);
|
|
131121
131105
|
|
|
131122
131106
|
if (false) {}
|
|
@@ -131124,14 +131108,13 @@ if (false) {}
|
|
|
131124
131108
|
|
|
131125
131109
|
|
|
131126
131110
|
|
|
131127
|
-
|
|
131128
131111
|
/*:: import type {CellMeasureCache} from './types';*/
|
|
131129
131112
|
var DEFAULT_HEIGHT = 30;
|
|
131130
|
-
var DEFAULT_WIDTH = 100;
|
|
131131
|
-
// This prevents a cell cache from being invalidated when its parent collection is modified.
|
|
131113
|
+
var DEFAULT_WIDTH = 100;
|
|
131132
131114
|
|
|
131115
|
+
// Enables more intelligent mapping of a given column and row index to an item ID.
|
|
131116
|
+
// This prevents a cell cache from being invalidated when its parent collection is modified.
|
|
131133
131117
|
/*:: type KeyMapper = (rowIndex: number, columnIndex: number) => any;*/
|
|
131134
|
-
|
|
131135
131118
|
/*:: type CellMeasurerCacheParams = {
|
|
131136
131119
|
defaultHeight?: number,
|
|
131137
131120
|
defaultWidth?: number,
|
|
@@ -131141,24 +131124,19 @@ var DEFAULT_WIDTH = 100; // Enables more intelligent mapping of a given column a
|
|
|
131141
131124
|
minWidth?: number,
|
|
131142
131125
|
keyMapper?: KeyMapper,
|
|
131143
131126
|
};*/
|
|
131144
|
-
|
|
131145
131127
|
/*:: type Cache = {
|
|
131146
131128
|
[key: any]: number,
|
|
131147
131129
|
};*/
|
|
131148
|
-
|
|
131149
131130
|
/*:: type IndexParam = {
|
|
131150
131131
|
index: number,
|
|
131151
131132
|
};*/
|
|
131152
|
-
|
|
131153
131133
|
/**
|
|
131154
131134
|
* Caches measurements for a given cell.
|
|
131155
131135
|
*/
|
|
131156
|
-
var CellMeasurerCache = /*#__PURE__*/
|
|
131157
|
-
function () {
|
|
131136
|
+
var CellMeasurerCache = /*#__PURE__*/function () {
|
|
131158
131137
|
function CellMeasurerCache() {
|
|
131159
131138
|
var _this = this;
|
|
131160
|
-
var params
|
|
131161
|
-
/*: CellMeasurerCacheParams*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
131139
|
+
var params /*: CellMeasurerCacheParams*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
131162
131140
|
_classCallCheck(this, CellMeasurerCache);
|
|
131163
131141
|
(0,defineProperty/* default */.A)(this, "_cellHeightCache", {});
|
|
131164
131142
|
(0,defineProperty/* default */.A)(this, "_cellWidthCache", {});
|
|
@@ -131173,13 +131151,13 @@ function () {
|
|
|
131173
131151
|
(0,defineProperty/* default */.A)(this, "_hasFixedWidth", void 0);
|
|
131174
131152
|
(0,defineProperty/* default */.A)(this, "_columnCount", 0);
|
|
131175
131153
|
(0,defineProperty/* default */.A)(this, "_rowCount", 0);
|
|
131176
|
-
(0,defineProperty/* default */.A)(this, "columnWidth", function (_ref) {
|
|
131177
|
-
var index = _ref
|
|
131154
|
+
(0,defineProperty/* default */.A)(this, "columnWidth", function (_ref /*:: */) {
|
|
131155
|
+
var index = _ref /*:: */.index;
|
|
131178
131156
|
var key = _this._keyMapper(0, index);
|
|
131179
131157
|
return _this._columnWidthCache[key] !== undefined ? _this._columnWidthCache[key] : _this._defaultWidth;
|
|
131180
131158
|
});
|
|
131181
|
-
(0,defineProperty/* default */.A)(this, "rowHeight", function (_ref2) {
|
|
131182
|
-
var index = _ref2
|
|
131159
|
+
(0,defineProperty/* default */.A)(this, "rowHeight", function (_ref2 /*:: */) {
|
|
131160
|
+
var index = _ref2 /*:: */.index;
|
|
131183
131161
|
var key = _this._keyMapper(index, 0);
|
|
131184
131162
|
return _this._rowHeightCache[key] !== undefined ? _this._rowHeightCache[key] : _this._defaultHeight;
|
|
131185
131163
|
});
|
|
@@ -131199,12 +131177,10 @@ function () {
|
|
|
131199
131177
|
this._defaultWidth = Math.max(this._minWidth, typeof defaultWidth === 'number' ? defaultWidth : DEFAULT_WIDTH);
|
|
131200
131178
|
if (false) {}
|
|
131201
131179
|
}
|
|
131202
|
-
_createClass(CellMeasurerCache, [{
|
|
131180
|
+
return _createClass(CellMeasurerCache, [{
|
|
131203
131181
|
key: "clear",
|
|
131204
|
-
value: function clear(rowIndex
|
|
131205
|
-
|
|
131206
|
-
var columnIndex
|
|
131207
|
-
/*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
131182
|
+
value: function clear(rowIndex /*: number*/) {
|
|
131183
|
+
var columnIndex /*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
131208
131184
|
var key = this._keyMapper(rowIndex, columnIndex);
|
|
131209
131185
|
delete this._cellHeightCache[key];
|
|
131210
131186
|
delete this._cellWidthCache[key];
|
|
@@ -131220,25 +131196,30 @@ function () {
|
|
|
131220
131196
|
this._rowCount = 0;
|
|
131221
131197
|
this._columnCount = 0;
|
|
131222
131198
|
}
|
|
131199
|
+
}, {
|
|
131200
|
+
key: "defaultHeight",
|
|
131201
|
+
get: function get() /*: number*/{
|
|
131202
|
+
return this._defaultHeight;
|
|
131203
|
+
}
|
|
131204
|
+
}, {
|
|
131205
|
+
key: "defaultWidth",
|
|
131206
|
+
get: function get() /*: number*/{
|
|
131207
|
+
return this._defaultWidth;
|
|
131208
|
+
}
|
|
131223
131209
|
}, {
|
|
131224
131210
|
key: "hasFixedHeight",
|
|
131225
|
-
value: function hasFixedHeight() /*: boolean*/
|
|
131226
|
-
{
|
|
131211
|
+
value: function hasFixedHeight() /*: boolean*/{
|
|
131227
131212
|
return this._hasFixedHeight;
|
|
131228
131213
|
}
|
|
131229
131214
|
}, {
|
|
131230
131215
|
key: "hasFixedWidth",
|
|
131231
|
-
value: function hasFixedWidth() /*: boolean*/
|
|
131232
|
-
{
|
|
131216
|
+
value: function hasFixedWidth() /*: boolean*/{
|
|
131233
131217
|
return this._hasFixedWidth;
|
|
131234
131218
|
}
|
|
131235
131219
|
}, {
|
|
131236
131220
|
key: "getHeight",
|
|
131237
|
-
value: function getHeight(rowIndex
|
|
131238
|
-
|
|
131239
|
-
{
|
|
131240
|
-
var columnIndex
|
|
131241
|
-
/*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
131221
|
+
value: function getHeight(rowIndex /*: number*/) /*: number*/{
|
|
131222
|
+
var columnIndex /*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
131242
131223
|
if (this._hasFixedHeight) {
|
|
131243
131224
|
return this._defaultHeight;
|
|
131244
131225
|
} else {
|
|
@@ -131248,11 +131229,8 @@ function () {
|
|
|
131248
131229
|
}
|
|
131249
131230
|
}, {
|
|
131250
131231
|
key: "getWidth",
|
|
131251
|
-
value: function getWidth(rowIndex
|
|
131252
|
-
|
|
131253
|
-
{
|
|
131254
|
-
var columnIndex
|
|
131255
|
-
/*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
131232
|
+
value: function getWidth(rowIndex /*: number*/) /*: number*/{
|
|
131233
|
+
var columnIndex /*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
131256
131234
|
if (this._hasFixedWidth) {
|
|
131257
131235
|
return this._defaultWidth;
|
|
131258
131236
|
} else {
|
|
@@ -131262,39 +131240,30 @@ function () {
|
|
|
131262
131240
|
}
|
|
131263
131241
|
}, {
|
|
131264
131242
|
key: "has",
|
|
131265
|
-
value: function has(rowIndex
|
|
131266
|
-
|
|
131267
|
-
{
|
|
131268
|
-
var columnIndex
|
|
131269
|
-
/*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
131243
|
+
value: function has(rowIndex /*: number*/) /*: boolean*/{
|
|
131244
|
+
var columnIndex /*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
131270
131245
|
var key = this._keyMapper(rowIndex, columnIndex);
|
|
131271
131246
|
return this._cellHeightCache[key] !== undefined;
|
|
131272
131247
|
}
|
|
131273
131248
|
}, {
|
|
131274
131249
|
key: "set",
|
|
131275
|
-
value: function set(rowIndex
|
|
131276
|
-
/*: number*/, columnIndex
|
|
131277
|
-
/*: number*/, width
|
|
131278
|
-
/*: number*/, height
|
|
131279
|
-
/*: number*/) /*: void*/
|
|
131280
|
-
{
|
|
131250
|
+
value: function set(rowIndex /*: number*/, columnIndex /*: number*/, width /*: number*/, height /*: number*/) /*: void*/{
|
|
131281
131251
|
var key = this._keyMapper(rowIndex, columnIndex);
|
|
131282
131252
|
if (columnIndex >= this._columnCount) {
|
|
131283
131253
|
this._columnCount = columnIndex + 1;
|
|
131284
131254
|
}
|
|
131285
131255
|
if (rowIndex >= this._rowCount) {
|
|
131286
131256
|
this._rowCount = rowIndex + 1;
|
|
131287
|
-
}
|
|
131257
|
+
}
|
|
131288
131258
|
|
|
131259
|
+
// Size is cached per cell so we don't have to re-measure if cells are re-ordered.
|
|
131289
131260
|
this._cellHeightCache[key] = height;
|
|
131290
131261
|
this._cellWidthCache[key] = width;
|
|
131291
131262
|
this._updateCachedColumnAndRowSizes(rowIndex, columnIndex);
|
|
131292
131263
|
}
|
|
131293
131264
|
}, {
|
|
131294
131265
|
key: "_updateCachedColumnAndRowSizes",
|
|
131295
|
-
value: function _updateCachedColumnAndRowSizes(rowIndex
|
|
131296
|
-
/*: number*/, columnIndex
|
|
131297
|
-
/*: number*/) {
|
|
131266
|
+
value: function _updateCachedColumnAndRowSizes(rowIndex /*: number*/, columnIndex /*: number*/) {
|
|
131298
131267
|
// :columnWidth and :rowHeight are derived based on all cells in a column/row.
|
|
131299
131268
|
// Pre-cache these derived values for faster lookup later.
|
|
131300
131269
|
// Reads are expected to occur more frequently than writes in this case.
|
|
@@ -131316,25 +131285,10 @@ function () {
|
|
|
131316
131285
|
this._rowHeightCache[rowKey] = rowHeight;
|
|
131317
131286
|
}
|
|
131318
131287
|
}
|
|
131319
|
-
}, {
|
|
131320
|
-
key: "defaultHeight",
|
|
131321
|
-
get: function get() /*: number*/
|
|
131322
|
-
{
|
|
131323
|
-
return this._defaultHeight;
|
|
131324
|
-
}
|
|
131325
|
-
}, {
|
|
131326
|
-
key: "defaultWidth",
|
|
131327
|
-
get: function get() /*: number*/
|
|
131328
|
-
{
|
|
131329
|
-
return this._defaultWidth;
|
|
131330
|
-
}
|
|
131331
131288
|
}]);
|
|
131332
|
-
return CellMeasurerCache;
|
|
131333
131289
|
}();
|
|
131334
131290
|
|
|
131335
|
-
function defaultKeyMapper(rowIndex
|
|
131336
|
-
/*: number*/, columnIndex
|
|
131337
|
-
/*: number*/) {
|
|
131291
|
+
function defaultKeyMapper(rowIndex /*: number*/, columnIndex /*: number*/) {
|
|
131338
131292
|
return "".concat(rowIndex, "-").concat(columnIndex);
|
|
131339
131293
|
}
|
|
131340
131294
|
;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/CellMeasurer/index.js
|
|
@@ -132706,32 +132660,28 @@ var isString_default = /*#__PURE__*/__webpack_require__.n(isString);
|
|
|
132706
132660
|
columnIndexOffset: number,
|
|
132707
132661
|
rowIndexOffset: number,
|
|
132708
132662
|
};*/
|
|
132709
|
-
|
|
132710
132663
|
/*:: type IndexParam = {
|
|
132711
132664
|
index: number,
|
|
132712
132665
|
};*/
|
|
132713
|
-
|
|
132714
132666
|
/**
|
|
132715
132667
|
* Caches measurements for a given cell.
|
|
132716
132668
|
*/
|
|
132717
|
-
var CellMeasurerCacheDecorator = /*#__PURE__*/
|
|
132718
|
-
function () {
|
|
132669
|
+
var CellMeasurerCacheDecorator = /*#__PURE__*/function () {
|
|
132719
132670
|
function CellMeasurerCacheDecorator() {
|
|
132720
132671
|
var _this = this;
|
|
132721
|
-
var params
|
|
132722
|
-
/*: CellMeasurerCacheDecoratorParams*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
132672
|
+
var params /*: CellMeasurerCacheDecoratorParams*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
132723
132673
|
_classCallCheck(this, CellMeasurerCacheDecorator);
|
|
132724
132674
|
(0,defineProperty/* default */.A)(this, "_cellMeasurerCache", void 0);
|
|
132725
132675
|
(0,defineProperty/* default */.A)(this, "_columnIndexOffset", void 0);
|
|
132726
132676
|
(0,defineProperty/* default */.A)(this, "_rowIndexOffset", void 0);
|
|
132727
|
-
(0,defineProperty/* default */.A)(this, "columnWidth", function (_ref) {
|
|
132728
|
-
var index = _ref
|
|
132677
|
+
(0,defineProperty/* default */.A)(this, "columnWidth", function (_ref /*:: */) {
|
|
132678
|
+
var index = _ref /*:: */.index;
|
|
132729
132679
|
_this._cellMeasurerCache.columnWidth({
|
|
132730
132680
|
index: index + _this._columnIndexOffset
|
|
132731
132681
|
});
|
|
132732
132682
|
});
|
|
132733
|
-
(0,defineProperty/* default */.A)(this, "rowHeight", function (_ref2) {
|
|
132734
|
-
var index = _ref2
|
|
132683
|
+
(0,defineProperty/* default */.A)(this, "rowHeight", function (_ref2 /*:: */) {
|
|
132684
|
+
var index = _ref2 /*:: */.index;
|
|
132735
132685
|
_this._cellMeasurerCache.rowHeight({
|
|
132736
132686
|
index: index + _this._rowIndexOffset
|
|
132737
132687
|
});
|
|
@@ -132745,85 +132695,60 @@ function () {
|
|
|
132745
132695
|
this._columnIndexOffset = columnIndexOffset;
|
|
132746
132696
|
this._rowIndexOffset = rowIndexOffset;
|
|
132747
132697
|
}
|
|
132748
|
-
_createClass(CellMeasurerCacheDecorator, [{
|
|
132698
|
+
return _createClass(CellMeasurerCacheDecorator, [{
|
|
132749
132699
|
key: "clear",
|
|
132750
|
-
value: function clear(rowIndex
|
|
132751
|
-
/*: number*/, columnIndex
|
|
132752
|
-
/*: number*/) /*: void*/
|
|
132753
|
-
{
|
|
132700
|
+
value: function clear(rowIndex /*: number*/, columnIndex /*: number*/) /*: void*/{
|
|
132754
132701
|
this._cellMeasurerCache.clear(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);
|
|
132755
132702
|
}
|
|
132756
132703
|
}, {
|
|
132757
132704
|
key: "clearAll",
|
|
132758
|
-
value: function clearAll() /*: void*/
|
|
132759
|
-
{
|
|
132705
|
+
value: function clearAll() /*: void*/{
|
|
132760
132706
|
this._cellMeasurerCache.clearAll();
|
|
132761
132707
|
}
|
|
132708
|
+
}, {
|
|
132709
|
+
key: "defaultHeight",
|
|
132710
|
+
get: function get() /*: number*/{
|
|
132711
|
+
return this._cellMeasurerCache.defaultHeight;
|
|
132712
|
+
}
|
|
132713
|
+
}, {
|
|
132714
|
+
key: "defaultWidth",
|
|
132715
|
+
get: function get() /*: number*/{
|
|
132716
|
+
return this._cellMeasurerCache.defaultWidth;
|
|
132717
|
+
}
|
|
132762
132718
|
}, {
|
|
132763
132719
|
key: "hasFixedHeight",
|
|
132764
|
-
value: function hasFixedHeight() /*: boolean*/
|
|
132765
|
-
{
|
|
132720
|
+
value: function hasFixedHeight() /*: boolean*/{
|
|
132766
132721
|
return this._cellMeasurerCache.hasFixedHeight();
|
|
132767
132722
|
}
|
|
132768
132723
|
}, {
|
|
132769
132724
|
key: "hasFixedWidth",
|
|
132770
|
-
value: function hasFixedWidth() /*: boolean*/
|
|
132771
|
-
{
|
|
132725
|
+
value: function hasFixedWidth() /*: boolean*/{
|
|
132772
132726
|
return this._cellMeasurerCache.hasFixedWidth();
|
|
132773
132727
|
}
|
|
132774
132728
|
}, {
|
|
132775
132729
|
key: "getHeight",
|
|
132776
|
-
value: function getHeight(rowIndex
|
|
132777
|
-
|
|
132778
|
-
{
|
|
132779
|
-
var columnIndex
|
|
132780
|
-
/*: ?number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
132730
|
+
value: function getHeight(rowIndex /*: number*/) /*: ?number*/{
|
|
132731
|
+
var columnIndex /*: ?number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
132781
132732
|
return this._cellMeasurerCache.getHeight(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);
|
|
132782
132733
|
}
|
|
132783
132734
|
}, {
|
|
132784
132735
|
key: "getWidth",
|
|
132785
|
-
value: function getWidth(rowIndex
|
|
132786
|
-
|
|
132787
|
-
{
|
|
132788
|
-
var columnIndex
|
|
132789
|
-
/*: ?number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
132736
|
+
value: function getWidth(rowIndex /*: number*/) /*: ?number*/{
|
|
132737
|
+
var columnIndex /*: ?number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
132790
132738
|
return this._cellMeasurerCache.getWidth(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);
|
|
132791
132739
|
}
|
|
132792
132740
|
}, {
|
|
132793
132741
|
key: "has",
|
|
132794
|
-
value: function has(rowIndex
|
|
132795
|
-
|
|
132796
|
-
{
|
|
132797
|
-
var columnIndex
|
|
132798
|
-
/*: ?number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
132742
|
+
value: function has(rowIndex /*: number*/) /*: boolean*/{
|
|
132743
|
+
var columnIndex /*: ?number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
132799
132744
|
return this._cellMeasurerCache.has(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);
|
|
132800
132745
|
}
|
|
132801
132746
|
}, {
|
|
132802
132747
|
key: "set",
|
|
132803
|
-
value: function set(rowIndex
|
|
132804
|
-
|
|
132805
|
-
/*: number*/, width
|
|
132806
|
-
/*: number*/, height
|
|
132807
|
-
/*: number*/) /*: void*/
|
|
132808
|
-
{
|
|
132809
|
-
this._cellMeasurerCache.set(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset, width
|
|
132810
|
-
/*: number*/, height
|
|
132811
|
-
/*: number*/);
|
|
132812
|
-
}
|
|
132813
|
-
}, {
|
|
132814
|
-
key: "defaultHeight",
|
|
132815
|
-
get: function get() /*: number*/
|
|
132816
|
-
{
|
|
132817
|
-
return this._cellMeasurerCache.defaultHeight;
|
|
132818
|
-
}
|
|
132819
|
-
}, {
|
|
132820
|
-
key: "defaultWidth",
|
|
132821
|
-
get: function get() /*: number*/
|
|
132822
|
-
{
|
|
132823
|
-
return this._cellMeasurerCache.defaultWidth;
|
|
132748
|
+
value: function set(rowIndex /*: number*/, columnIndex /*: number*/, width /*: number*/, height /*: number*/) /*: void*/{
|
|
132749
|
+
this._cellMeasurerCache.set(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset, width /*: number*/, height /*: number*/);
|
|
132824
132750
|
}
|
|
132825
132751
|
}]);
|
|
132826
|
-
return CellMeasurerCacheDecorator;
|
|
132827
132752
|
}();
|
|
132828
132753
|
|
|
132829
132754
|
;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/MultiGrid/MultiGrid.js
|
|
@@ -132835,34 +132760,41 @@ function () {
|
|
|
132835
132760
|
|
|
132836
132761
|
|
|
132837
132762
|
|
|
132838
|
-
|
|
132839
|
-
|
|
132840
|
-
|
|
132763
|
+
var MultiGrid_excluded = ["rowIndex"],
|
|
132764
|
+
MultiGrid_excluded2 = ["columnIndex", "rowIndex"],
|
|
132765
|
+
_excluded3 = ["columnIndex"],
|
|
132766
|
+
_excluded4 = ["onScroll", "onSectionRendered", "onScrollbarPresenceChange", "scrollLeft", "scrollToColumn", "scrollTop", "scrollToRow"];
|
|
132767
|
+
function MultiGrid_ownKeys(e, r) {
|
|
132768
|
+
var t = Object.keys(e);
|
|
132841
132769
|
if (Object.getOwnPropertySymbols) {
|
|
132842
|
-
var
|
|
132843
|
-
|
|
132844
|
-
return Object.getOwnPropertyDescriptor(
|
|
132845
|
-
});
|
|
132846
|
-
keys.push.apply(keys, symbols);
|
|
132770
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
132771
|
+
r && (o = o.filter(function (r) {
|
|
132772
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
132773
|
+
})), t.push.apply(t, o);
|
|
132847
132774
|
}
|
|
132848
|
-
return
|
|
132775
|
+
return t;
|
|
132849
132776
|
}
|
|
132850
|
-
function MultiGrid_objectSpread(
|
|
132851
|
-
for (var
|
|
132852
|
-
var
|
|
132853
|
-
|
|
132854
|
-
|
|
132855
|
-
|
|
132856
|
-
|
|
132857
|
-
}
|
|
132858
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
132859
|
-
} else {
|
|
132860
|
-
MultiGrid_ownKeys(source).forEach(function (key) {
|
|
132861
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
132862
|
-
});
|
|
132863
|
-
}
|
|
132777
|
+
function MultiGrid_objectSpread(e) {
|
|
132778
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
132779
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
132780
|
+
r % 2 ? MultiGrid_ownKeys(Object(t), !0).forEach(function (r) {
|
|
132781
|
+
(0,defineProperty/* default */.A)(e, r, t[r]);
|
|
132782
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : MultiGrid_ownKeys(Object(t)).forEach(function (r) {
|
|
132783
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
132784
|
+
});
|
|
132864
132785
|
}
|
|
132865
|
-
return
|
|
132786
|
+
return e;
|
|
132787
|
+
}
|
|
132788
|
+
function MultiGrid_callSuper(t, o, e) {
|
|
132789
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, MultiGrid_isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
132790
|
+
}
|
|
132791
|
+
function MultiGrid_isNativeReflectConstruct() {
|
|
132792
|
+
try {
|
|
132793
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
132794
|
+
} catch (t) {}
|
|
132795
|
+
return (MultiGrid_isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
|
132796
|
+
return !!t;
|
|
132797
|
+
})();
|
|
132866
132798
|
}
|
|
132867
132799
|
|
|
132868
132800
|
|
|
@@ -132870,6 +132802,7 @@ function MultiGrid_objectSpread(target) {
|
|
|
132870
132802
|
|
|
132871
132803
|
|
|
132872
132804
|
var SCROLLBAR_SIZE_BUFFER = 20;
|
|
132805
|
+
|
|
132873
132806
|
/**
|
|
132874
132807
|
* Renders 1, 2, or 4 Grids depending on configuration.
|
|
132875
132808
|
* A main (body) Grid will always be rendered.
|
|
@@ -132877,32 +132810,29 @@ var SCROLLBAR_SIZE_BUFFER = 20;
|
|
|
132877
132810
|
* If no sticky columns, only 1 sticky header Grid will be rendered.
|
|
132878
132811
|
* If sticky columns, 2 sticky header Grids will be rendered.
|
|
132879
132812
|
*/
|
|
132880
|
-
|
|
132881
|
-
var MultiGrid = /*#__PURE__*/
|
|
132882
|
-
function (_React$PureComponent) {
|
|
132883
|
-
_inherits(MultiGrid, _React$PureComponent);
|
|
132813
|
+
var MultiGrid = /*#__PURE__*/function (_React$PureComponent) {
|
|
132884
132814
|
function MultiGrid(props, context) {
|
|
132885
132815
|
var _this;
|
|
132886
132816
|
_classCallCheck(this, MultiGrid);
|
|
132887
|
-
_this =
|
|
132888
|
-
(0,defineProperty/* default */.A)(
|
|
132817
|
+
_this = MultiGrid_callSuper(this, MultiGrid, [props, context]);
|
|
132818
|
+
(0,defineProperty/* default */.A)(_this, "state", {
|
|
132889
132819
|
scrollLeft: 0,
|
|
132890
132820
|
scrollTop: 0,
|
|
132891
132821
|
scrollbarSize: 0,
|
|
132892
132822
|
showHorizontalScrollbar: false,
|
|
132893
132823
|
showVerticalScrollbar: false
|
|
132894
132824
|
});
|
|
132895
|
-
(0,defineProperty/* default */.A)(
|
|
132896
|
-
(0,defineProperty/* default */.A)(
|
|
132897
|
-
(0,defineProperty/* default */.A)(
|
|
132825
|
+
(0,defineProperty/* default */.A)(_this, "_deferredInvalidateColumnIndex", null);
|
|
132826
|
+
(0,defineProperty/* default */.A)(_this, "_deferredInvalidateRowIndex", null);
|
|
132827
|
+
(0,defineProperty/* default */.A)(_this, "_bottomLeftGridRef", function (ref) {
|
|
132898
132828
|
_this._bottomLeftGrid = ref;
|
|
132899
132829
|
});
|
|
132900
|
-
(0,defineProperty/* default */.A)(
|
|
132830
|
+
(0,defineProperty/* default */.A)(_this, "_bottomRightGridRef", function (ref) {
|
|
132901
132831
|
_this._bottomRightGrid = ref;
|
|
132902
132832
|
});
|
|
132903
|
-
(0,defineProperty/* default */.A)(
|
|
132833
|
+
(0,defineProperty/* default */.A)(_this, "_cellRendererBottomLeftGrid", function (_ref) {
|
|
132904
132834
|
var rowIndex = _ref.rowIndex,
|
|
132905
|
-
rest = objectWithoutProperties_objectWithoutProperties(_ref,
|
|
132835
|
+
rest = objectWithoutProperties_objectWithoutProperties(_ref, MultiGrid_excluded);
|
|
132906
132836
|
var _this$props = _this.props,
|
|
132907
132837
|
cellRenderer = _this$props.cellRenderer,
|
|
132908
132838
|
fixedRowCount = _this$props.fixedRowCount,
|
|
@@ -132910,34 +132840,34 @@ function (_React$PureComponent) {
|
|
|
132910
132840
|
if (rowIndex === rowCount - fixedRowCount) {
|
|
132911
132841
|
return /*#__PURE__*/react.createElement("div", {
|
|
132912
132842
|
key: rest.key,
|
|
132913
|
-
style: MultiGrid_objectSpread({}, rest.style, {
|
|
132843
|
+
style: MultiGrid_objectSpread(MultiGrid_objectSpread({}, rest.style), {}, {
|
|
132914
132844
|
height: SCROLLBAR_SIZE_BUFFER
|
|
132915
132845
|
})
|
|
132916
132846
|
});
|
|
132917
132847
|
} else {
|
|
132918
|
-
return cellRenderer(MultiGrid_objectSpread({}, rest, {
|
|
132919
|
-
parent:
|
|
132848
|
+
return cellRenderer(MultiGrid_objectSpread(MultiGrid_objectSpread({}, rest), {}, {
|
|
132849
|
+
parent: _this,
|
|
132920
132850
|
rowIndex: rowIndex + fixedRowCount
|
|
132921
132851
|
}));
|
|
132922
132852
|
}
|
|
132923
132853
|
});
|
|
132924
|
-
(0,defineProperty/* default */.A)(
|
|
132854
|
+
(0,defineProperty/* default */.A)(_this, "_cellRendererBottomRightGrid", function (_ref2) {
|
|
132925
132855
|
var columnIndex = _ref2.columnIndex,
|
|
132926
132856
|
rowIndex = _ref2.rowIndex,
|
|
132927
|
-
rest = objectWithoutProperties_objectWithoutProperties(_ref2,
|
|
132857
|
+
rest = objectWithoutProperties_objectWithoutProperties(_ref2, MultiGrid_excluded2);
|
|
132928
132858
|
var _this$props2 = _this.props,
|
|
132929
132859
|
cellRenderer = _this$props2.cellRenderer,
|
|
132930
132860
|
fixedColumnCount = _this$props2.fixedColumnCount,
|
|
132931
132861
|
fixedRowCount = _this$props2.fixedRowCount;
|
|
132932
|
-
return cellRenderer(MultiGrid_objectSpread({}, rest, {
|
|
132862
|
+
return cellRenderer(MultiGrid_objectSpread(MultiGrid_objectSpread({}, rest), {}, {
|
|
132933
132863
|
columnIndex: columnIndex + fixedColumnCount,
|
|
132934
|
-
parent:
|
|
132864
|
+
parent: _this,
|
|
132935
132865
|
rowIndex: rowIndex + fixedRowCount
|
|
132936
132866
|
}));
|
|
132937
132867
|
});
|
|
132938
|
-
(0,defineProperty/* default */.A)(
|
|
132868
|
+
(0,defineProperty/* default */.A)(_this, "_cellRendererTopRightGrid", function (_ref3) {
|
|
132939
132869
|
var columnIndex = _ref3.columnIndex,
|
|
132940
|
-
rest = objectWithoutProperties_objectWithoutProperties(_ref3,
|
|
132870
|
+
rest = objectWithoutProperties_objectWithoutProperties(_ref3, _excluded3);
|
|
132941
132871
|
var _this$props3 = _this.props,
|
|
132942
132872
|
cellRenderer = _this$props3.cellRenderer,
|
|
132943
132873
|
columnCount = _this$props3.columnCount,
|
|
@@ -132945,18 +132875,18 @@ function (_React$PureComponent) {
|
|
|
132945
132875
|
if (columnIndex === columnCount - fixedColumnCount) {
|
|
132946
132876
|
return /*#__PURE__*/react.createElement("div", {
|
|
132947
132877
|
key: rest.key,
|
|
132948
|
-
style: MultiGrid_objectSpread({}, rest.style, {
|
|
132878
|
+
style: MultiGrid_objectSpread(MultiGrid_objectSpread({}, rest.style), {}, {
|
|
132949
132879
|
width: SCROLLBAR_SIZE_BUFFER
|
|
132950
132880
|
})
|
|
132951
132881
|
});
|
|
132952
132882
|
} else {
|
|
132953
|
-
return cellRenderer(MultiGrid_objectSpread({}, rest, {
|
|
132883
|
+
return cellRenderer(MultiGrid_objectSpread(MultiGrid_objectSpread({}, rest), {}, {
|
|
132954
132884
|
columnIndex: columnIndex + fixedColumnCount,
|
|
132955
|
-
parent:
|
|
132885
|
+
parent: _this
|
|
132956
132886
|
}));
|
|
132957
132887
|
}
|
|
132958
132888
|
});
|
|
132959
|
-
(0,defineProperty/* default */.A)(
|
|
132889
|
+
(0,defineProperty/* default */.A)(_this, "_columnWidthRightGrid", function (_ref4) {
|
|
132960
132890
|
var index = _ref4.index;
|
|
132961
132891
|
var _this$props4 = _this.props,
|
|
132962
132892
|
columnCount = _this$props4.columnCount,
|
|
@@ -132964,11 +132894,12 @@ function (_React$PureComponent) {
|
|
|
132964
132894
|
columnWidth = _this$props4.columnWidth;
|
|
132965
132895
|
var _this$state = _this.state,
|
|
132966
132896
|
scrollbarSize = _this$state.scrollbarSize,
|
|
132967
|
-
showHorizontalScrollbar = _this$state.showHorizontalScrollbar;
|
|
132897
|
+
showHorizontalScrollbar = _this$state.showHorizontalScrollbar;
|
|
132898
|
+
|
|
132899
|
+
// An extra cell is added to the count
|
|
132968
132900
|
// This gives the smaller Grid extra room for offset,
|
|
132969
132901
|
// In case the main (bottom right) Grid has a scrollbar
|
|
132970
132902
|
// If no scrollbar, the extra space is overflow:hidden anyway
|
|
132971
|
-
|
|
132972
132903
|
if (showHorizontalScrollbar && index === columnCount - fixedColumnCount) {
|
|
132973
132904
|
return scrollbarSize;
|
|
132974
132905
|
}
|
|
@@ -132976,7 +132907,7 @@ function (_React$PureComponent) {
|
|
|
132976
132907
|
index: index + fixedColumnCount
|
|
132977
132908
|
}) : columnWidth;
|
|
132978
132909
|
});
|
|
132979
|
-
(0,defineProperty/* default */.A)(
|
|
132910
|
+
(0,defineProperty/* default */.A)(_this, "_onScroll", function (scrollInfo) {
|
|
132980
132911
|
var scrollLeft = scrollInfo.scrollLeft,
|
|
132981
132912
|
scrollTop = scrollInfo.scrollTop;
|
|
132982
132913
|
_this.setState({
|
|
@@ -132988,7 +132919,7 @@ function (_React$PureComponent) {
|
|
|
132988
132919
|
onScroll(scrollInfo);
|
|
132989
132920
|
}
|
|
132990
132921
|
});
|
|
132991
|
-
(0,defineProperty/* default */.A)(
|
|
132922
|
+
(0,defineProperty/* default */.A)(_this, "_onScrollbarPresenceChange", function (_ref5) {
|
|
132992
132923
|
var horizontal = _ref5.horizontal,
|
|
132993
132924
|
size = _ref5.size,
|
|
132994
132925
|
vertical = _ref5.vertical;
|
|
@@ -133011,21 +132942,21 @@ function (_React$PureComponent) {
|
|
|
133011
132942
|
}
|
|
133012
132943
|
}
|
|
133013
132944
|
});
|
|
133014
|
-
(0,defineProperty/* default */.A)(
|
|
132945
|
+
(0,defineProperty/* default */.A)(_this, "_onScrollLeft", function (scrollInfo) {
|
|
133015
132946
|
var scrollLeft = scrollInfo.scrollLeft;
|
|
133016
132947
|
_this._onScroll({
|
|
133017
132948
|
scrollLeft: scrollLeft,
|
|
133018
132949
|
scrollTop: _this.state.scrollTop
|
|
133019
132950
|
});
|
|
133020
132951
|
});
|
|
133021
|
-
(0,defineProperty/* default */.A)(
|
|
132952
|
+
(0,defineProperty/* default */.A)(_this, "_onScrollTop", function (scrollInfo) {
|
|
133022
132953
|
var scrollTop = scrollInfo.scrollTop;
|
|
133023
132954
|
_this._onScroll({
|
|
133024
132955
|
scrollTop: scrollTop,
|
|
133025
132956
|
scrollLeft: _this.state.scrollLeft
|
|
133026
132957
|
});
|
|
133027
132958
|
});
|
|
133028
|
-
(0,defineProperty/* default */.A)(
|
|
132959
|
+
(0,defineProperty/* default */.A)(_this, "_rowHeightBottomGrid", function (_ref6) {
|
|
133029
132960
|
var index = _ref6.index;
|
|
133030
132961
|
var _this$props5 = _this.props,
|
|
133031
132962
|
fixedRowCount = _this$props5.fixedRowCount,
|
|
@@ -133033,11 +132964,12 @@ function (_React$PureComponent) {
|
|
|
133033
132964
|
rowHeight = _this$props5.rowHeight;
|
|
133034
132965
|
var _this$state3 = _this.state,
|
|
133035
132966
|
scrollbarSize = _this$state3.scrollbarSize,
|
|
133036
|
-
showVerticalScrollbar = _this$state3.showVerticalScrollbar;
|
|
132967
|
+
showVerticalScrollbar = _this$state3.showVerticalScrollbar;
|
|
132968
|
+
|
|
132969
|
+
// An extra cell is added to the count
|
|
133037
132970
|
// This gives the smaller Grid extra room for offset,
|
|
133038
132971
|
// In case the main (bottom right) Grid has a scrollbar
|
|
133039
132972
|
// If no scrollbar, the extra space is overflow:hidden anyway
|
|
133040
|
-
|
|
133041
132973
|
if (showVerticalScrollbar && index === rowCount - fixedRowCount) {
|
|
133042
132974
|
return scrollbarSize;
|
|
133043
132975
|
}
|
|
@@ -133045,10 +132977,10 @@ function (_React$PureComponent) {
|
|
|
133045
132977
|
index: index + fixedRowCount
|
|
133046
132978
|
}) : rowHeight;
|
|
133047
132979
|
});
|
|
133048
|
-
(0,defineProperty/* default */.A)(
|
|
132980
|
+
(0,defineProperty/* default */.A)(_this, "_topLeftGridRef", function (ref) {
|
|
133049
132981
|
_this._topLeftGrid = ref;
|
|
133050
132982
|
});
|
|
133051
|
-
(0,defineProperty/* default */.A)(
|
|
132983
|
+
(0,defineProperty/* default */.A)(_this, "_topRightGridRef", function (ref) {
|
|
133052
132984
|
_this._topRightGrid = ref;
|
|
133053
132985
|
});
|
|
133054
132986
|
var deferredMeasurementCache = props.deferredMeasurementCache,
|
|
@@ -133074,7 +133006,8 @@ function (_React$PureComponent) {
|
|
|
133074
133006
|
}
|
|
133075
133007
|
return _this;
|
|
133076
133008
|
}
|
|
133077
|
-
|
|
133009
|
+
_inherits(MultiGrid, _React$PureComponent);
|
|
133010
|
+
return _createClass(MultiGrid, [{
|
|
133078
133011
|
key: "forceUpdateGrids",
|
|
133079
133012
|
value: function forceUpdateGrids() {
|
|
133080
133013
|
this._bottomLeftGrid && this._bottomLeftGrid.forceUpdate();
|
|
@@ -133082,6 +133015,7 @@ function (_React$PureComponent) {
|
|
|
133082
133015
|
this._topLeftGrid && this._topLeftGrid.forceUpdate();
|
|
133083
133016
|
this._topRightGrid && this._topRightGrid.forceUpdate();
|
|
133084
133017
|
}
|
|
133018
|
+
|
|
133085
133019
|
/** See Grid#invalidateCellSizeAfterRender */
|
|
133086
133020
|
}, {
|
|
133087
133021
|
key: "invalidateCellSizeAfterRender",
|
|
@@ -133094,6 +133028,7 @@ function (_React$PureComponent) {
|
|
|
133094
133028
|
this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex === 'number' ? Math.min(this._deferredInvalidateColumnIndex, columnIndex) : columnIndex;
|
|
133095
133029
|
this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex === 'number' ? Math.min(this._deferredInvalidateRowIndex, rowIndex) : rowIndex;
|
|
133096
133030
|
}
|
|
133031
|
+
|
|
133097
133032
|
/** See Grid#measureAllCells */
|
|
133098
133033
|
}, {
|
|
133099
133034
|
key: "measureAllCells",
|
|
@@ -133103,6 +133038,7 @@ function (_React$PureComponent) {
|
|
|
133103
133038
|
this._topLeftGrid && this._topLeftGrid.measureAllCells();
|
|
133104
133039
|
this._topRightGrid && this._topRightGrid.measureAllCells();
|
|
133105
133040
|
}
|
|
133041
|
+
|
|
133106
133042
|
/** See Grid#recomputeGridSize */
|
|
133107
133043
|
}, {
|
|
133108
133044
|
key: "recomputeGridSize",
|
|
@@ -133171,14 +133107,17 @@ function (_React$PureComponent) {
|
|
|
133171
133107
|
scrollToColumn = _this$props8.scrollToColumn,
|
|
133172
133108
|
scrollTopProp = _this$props8.scrollTop,
|
|
133173
133109
|
scrollToRow = _this$props8.scrollToRow,
|
|
133174
|
-
rest = objectWithoutProperties_objectWithoutProperties(_this$props8,
|
|
133175
|
-
this._prepareForRender();
|
|
133110
|
+
rest = objectWithoutProperties_objectWithoutProperties(_this$props8, _excluded4);
|
|
133111
|
+
this._prepareForRender();
|
|
133112
|
+
|
|
133113
|
+
// Don't render any of our Grids if there are no cells.
|
|
133176
133114
|
// This mirrors what Grid does,
|
|
133177
133115
|
// And prevents us from recording inaccurage measurements when used with CellMeasurer.
|
|
133178
|
-
|
|
133179
133116
|
if (this.props.width === 0 || this.props.height === 0) {
|
|
133180
133117
|
return null;
|
|
133181
|
-
}
|
|
133118
|
+
}
|
|
133119
|
+
|
|
133120
|
+
// scrollTop and scrollLeft props are explicitly filtered out and ignored
|
|
133182
133121
|
|
|
133183
133122
|
var _this$state4 = this.state,
|
|
133184
133123
|
scrollLeft = _this$state4.scrollLeft,
|
|
@@ -133187,15 +133126,15 @@ function (_React$PureComponent) {
|
|
|
133187
133126
|
style: this._containerOuterStyle
|
|
133188
133127
|
}, /*#__PURE__*/react.createElement("div", {
|
|
133189
133128
|
style: this._containerTopStyle
|
|
133190
|
-
}, this._renderTopLeftGrid(rest), this._renderTopRightGrid(MultiGrid_objectSpread({}, rest, {
|
|
133129
|
+
}, this._renderTopLeftGrid(rest), this._renderTopRightGrid(MultiGrid_objectSpread(MultiGrid_objectSpread({}, rest), {}, {
|
|
133191
133130
|
onScroll: onScroll,
|
|
133192
133131
|
scrollLeft: scrollLeft
|
|
133193
133132
|
}))), /*#__PURE__*/react.createElement("div", {
|
|
133194
133133
|
style: this._containerBottomStyle
|
|
133195
|
-
}, this._renderBottomLeftGrid(MultiGrid_objectSpread({}, rest, {
|
|
133134
|
+
}, this._renderBottomLeftGrid(MultiGrid_objectSpread(MultiGrid_objectSpread({}, rest), {}, {
|
|
133196
133135
|
onScroll: onScroll,
|
|
133197
133136
|
scrollTop: scrollTop
|
|
133198
|
-
})), this._renderBottomRightGrid(MultiGrid_objectSpread({}, rest, {
|
|
133137
|
+
})), this._renderBottomRightGrid(MultiGrid_objectSpread(MultiGrid_objectSpread({}, rest), {}, {
|
|
133199
133138
|
onScroll: onScroll,
|
|
133200
133139
|
onSectionRendered: onSectionRendered,
|
|
133201
133140
|
scrollLeft: scrollLeft,
|
|
@@ -133273,6 +133212,7 @@ function (_React$PureComponent) {
|
|
|
133273
133212
|
this.forceUpdate();
|
|
133274
133213
|
}
|
|
133275
133214
|
}
|
|
133215
|
+
|
|
133276
133216
|
/**
|
|
133277
133217
|
* Avoid recreating inline styles each render; this bypasses Grid's shallowCompare.
|
|
133278
133218
|
* This method recalculates styles only when specific props change.
|
|
@@ -133412,7 +133352,7 @@ function (_React$PureComponent) {
|
|
|
133412
133352
|
if (hideBottomLeftGridScrollbar) {
|
|
133413
133353
|
return /*#__PURE__*/react.createElement("div", {
|
|
133414
133354
|
className: "BottomLeftGrid_ScrollWrapper",
|
|
133415
|
-
style: MultiGrid_objectSpread({}, this._bottomLeftGridStyle, {
|
|
133355
|
+
style: MultiGrid_objectSpread(MultiGrid_objectSpread({}, this._bottomLeftGridStyle), {}, {
|
|
133416
133356
|
height: height,
|
|
133417
133357
|
width: width,
|
|
133418
133358
|
overflowY: 'hidden'
|
|
@@ -133490,7 +133430,7 @@ function (_React$PureComponent) {
|
|
|
133490
133430
|
style = this._topRightGridStyle;
|
|
133491
133431
|
if (hideTopRightGridScrollbar) {
|
|
133492
133432
|
gridHeight = height + additionalHeight;
|
|
133493
|
-
style = MultiGrid_objectSpread({}, this._topRightGridStyle, {
|
|
133433
|
+
style = MultiGrid_objectSpread(MultiGrid_objectSpread({}, this._topRightGridStyle), {}, {
|
|
133494
133434
|
left: 0
|
|
133495
133435
|
});
|
|
133496
133436
|
}
|
|
@@ -133512,7 +133452,7 @@ function (_React$PureComponent) {
|
|
|
133512
133452
|
if (hideTopRightGridScrollbar) {
|
|
133513
133453
|
return /*#__PURE__*/react.createElement("div", {
|
|
133514
133454
|
className: "TopRightGrid_ScrollWrapper",
|
|
133515
|
-
style: MultiGrid_objectSpread({}, this._topRightGridStyle, {
|
|
133455
|
+
style: MultiGrid_objectSpread(MultiGrid_objectSpread({}, this._topRightGridStyle), {}, {
|
|
133516
133456
|
height: height,
|
|
133517
133457
|
width: width,
|
|
133518
133458
|
overflowX: 'hidden'
|
|
@@ -133533,7 +133473,6 @@ function (_React$PureComponent) {
|
|
|
133533
133473
|
return null;
|
|
133534
133474
|
}
|
|
133535
133475
|
}]);
|
|
133536
|
-
return MultiGrid;
|
|
133537
133476
|
}(react.PureComponent);
|
|
133538
133477
|
(0,defineProperty/* default */.A)(MultiGrid, "defaultProps", {
|
|
133539
133478
|
classNameBottomLeftGrid: '',
|