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/uploader.js CHANGED
@@ -44866,11 +44866,10 @@ const makeDroppable = ({
44866
44866
  ;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Table/defaultHeaderRowRenderer.js
44867
44867
 
44868
44868
  /*:: import type {HeaderRowRendererParams} from './types';*/
44869
-
44870
- function defaultHeaderRowRenderer(_ref) {
44871
- var className = _ref.className,
44872
- columns = _ref.columns,
44873
- style = _ref.style;
44869
+ function defaultHeaderRowRenderer(_ref /*:: */) {
44870
+ var className = _ref /*:: */.className,
44871
+ columns = _ref /*:: */.columns,
44872
+ style = _ref /*:: */.style;
44874
44873
  return /*#__PURE__*/react.createElement("div", {
44875
44874
  role: "rowgroup",
44876
44875
  className: "ReactVirtualized__Table__headerRowGroup"
@@ -44912,10 +44911,10 @@ var SortDirection = {
44912
44911
 
44913
44912
 
44914
44913
 
44914
+
44915
44915
  /**
44916
44916
  * Displayed beside a header to indicate that a Table is currently sorted by this column.
44917
44917
  */
44918
-
44919
44918
  function SortIndicator(_ref) {
44920
44919
  var sortDirection = _ref.sortDirection;
44921
44920
  var classNames = clsx_m('ReactVirtualized__Table__sortableHeaderIcon', {
@@ -44941,15 +44940,14 @@ SortIndicator.propTypes = false ? 0 : {};
44941
44940
 
44942
44941
 
44943
44942
  /*:: import type {HeaderRendererParams} from './types';*/
44944
-
44945
44943
  /**
44946
44944
  * Default table header renderer.
44947
44945
  */
44948
- function defaultHeaderRenderer(_ref) {
44949
- var dataKey = _ref.dataKey,
44950
- label = _ref.label,
44951
- sortBy = _ref.sortBy,
44952
- sortDirection = _ref.sortDirection;
44946
+ function defaultHeaderRenderer(_ref /*:: */) {
44947
+ var dataKey = _ref /*:: */.dataKey,
44948
+ label = _ref /*:: */.label,
44949
+ sortBy = _ref /*:: */.sortBy,
44950
+ sortDirection = _ref /*:: */.sortDirection;
44953
44951
  var showSortIndicator = sortBy === dataKey;
44954
44952
  var children = [/*#__PURE__*/react.createElement("span", {
44955
44953
  className: "ReactVirtualized__Table__headerTruncatedText",
@@ -44968,22 +44966,21 @@ function defaultHeaderRenderer(_ref) {
44968
44966
 
44969
44967
 
44970
44968
  /*:: import type {RowRendererParams} from './types';*/
44971
-
44972
44969
  /**
44973
44970
  * Default row renderer for Table.
44974
44971
  */
44975
- function defaultRowRenderer(_ref) {
44976
- var className = _ref.className,
44977
- columns = _ref.columns,
44978
- index = _ref.index,
44979
- key = _ref.key,
44980
- onRowClick = _ref.onRowClick,
44981
- onRowDoubleClick = _ref.onRowDoubleClick,
44982
- onRowMouseOut = _ref.onRowMouseOut,
44983
- onRowMouseOver = _ref.onRowMouseOver,
44984
- onRowRightClick = _ref.onRowRightClick,
44985
- rowData = _ref.rowData,
44986
- style = _ref.style;
44972
+ function defaultRowRenderer(_ref /*:: */) {
44973
+ var className = _ref /*:: */.className,
44974
+ columns = _ref /*:: */.columns,
44975
+ index = _ref /*:: */.index,
44976
+ key = _ref /*:: */.key,
44977
+ onRowClick = _ref /*:: */.onRowClick,
44978
+ onRowDoubleClick = _ref /*:: */.onRowDoubleClick,
44979
+ onRowMouseOut = _ref /*:: */.onRowMouseOut,
44980
+ onRowMouseOver = _ref /*:: */.onRowMouseOver,
44981
+ onRowRightClick = _ref /*:: */.onRowRightClick,
44982
+ rowData = _ref /*:: */.rowData,
44983
+ style = _ref /*:: */.style;
44987
44984
  var a11yProps = {
44988
44985
  'aria-rowindex': index + 1
44989
44986
  };
@@ -45042,11 +45039,6 @@ function defaultRowRenderer(_ref) {
45042
45039
  style: style
45043
45040
  }), columns);
45044
45041
  }
45045
- ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
45046
- function _classCallCheck(a, n) {
45047
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
45048
- }
45049
-
45050
45042
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
45051
45043
  function _typeof(o) {
45052
45044
  "@babel/helpers - typeof";
@@ -45058,6 +45050,46 @@ function _typeof(o) {
45058
45050
  }, _typeof(o);
45059
45051
  }
45060
45052
 
45053
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
45054
+
45055
+ function toPrimitive(t, r) {
45056
+ if ("object" != _typeof(t) || !t) return t;
45057
+ var e = t[Symbol.toPrimitive];
45058
+ if (void 0 !== e) {
45059
+ var i = e.call(t, r || "default");
45060
+ if ("object" != _typeof(i)) return i;
45061
+ throw new TypeError("@@toPrimitive must return a primitive value.");
45062
+ }
45063
+ return ("string" === r ? String : Number)(t);
45064
+ }
45065
+
45066
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
45067
+
45068
+
45069
+ function toPropertyKey(t) {
45070
+ var i = toPrimitive(t, "string");
45071
+ return "symbol" == _typeof(i) ? i : i + "";
45072
+ }
45073
+
45074
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
45075
+
45076
+ function _defineProperties(e, r) {
45077
+ for (var t = 0; t < r.length; t++) {
45078
+ var o = r[t];
45079
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
45080
+ }
45081
+ }
45082
+ function _createClass(e, r, t) {
45083
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
45084
+ writable: !1
45085
+ }), e;
45086
+ }
45087
+
45088
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
45089
+ function _classCallCheck(a, n) {
45090
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
45091
+ }
45092
+
45061
45093
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
45062
45094
  function _assertThisInitialized(e) {
45063
45095
  if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
@@ -45095,27 +45127,6 @@ function _inherits(t, e) {
45095
45127
  }), e && _setPrototypeOf(t, e);
45096
45128
  }
45097
45129
 
45098
- ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
45099
-
45100
- function toPrimitive(t, r) {
45101
- if ("object" != _typeof(t) || !t) return t;
45102
- var e = t[Symbol.toPrimitive];
45103
- if (void 0 !== e) {
45104
- var i = e.call(t, r || "default");
45105
- if ("object" != _typeof(i)) return i;
45106
- throw new TypeError("@@toPrimitive must return a primitive value.");
45107
- }
45108
- return ("string" === r ? String : Number)(t);
45109
- }
45110
-
45111
- ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
45112
-
45113
-
45114
- function toPropertyKey(t) {
45115
- var i = toPrimitive(t, "string");
45116
- return "symbol" == _typeof(i) ? i : i + "";
45117
- }
45118
-
45119
45130
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
45120
45131
 
45121
45132
  function defineProperty_defineProperty(e, r, t) {
@@ -45129,14 +45140,12 @@ function defineProperty_defineProperty(e, r, t) {
45129
45140
 
45130
45141
  ;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Table/defaultCellRenderer.js
45131
45142
  /*:: import type {CellRendererParams} from './types';*/
45132
-
45133
45143
  /**
45134
45144
  * Default cell renderer that displays an attribute as a simple string
45135
45145
  * You should override the column's cellRenderer if your data is some other type of object.
45136
45146
  */
45137
- function defaultCellRenderer(_ref) /*: string*/
45138
- {
45139
- var cellData = _ref.cellData;
45147
+ function defaultCellRenderer(_ref /*:: */) /*: string*/{
45148
+ var cellData = _ref /*:: */.cellData;
45140
45149
  if (cellData == null) {
45141
45150
  return '';
45142
45151
  } else {
@@ -45145,15 +45154,14 @@ function defaultCellRenderer(_ref) /*: string*/
45145
45154
  }
45146
45155
  ;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Table/defaultCellDataGetter.js
45147
45156
  /*:: import type {CellDataGetterParams} from './types';*/
45148
-
45149
45157
  /**
45150
45158
  * Default accessor for returning a cell value for a given attribute.
45151
45159
  * This function expects to operate on either a vanilla Object or an Immutable Map.
45152
45160
  * You should override the column's cellDataGetter if your data is some other type of object.
45153
45161
  */
45154
- function defaultCellDataGetter(_ref) {
45155
- var dataKey = _ref.dataKey,
45156
- rowData = _ref.rowData;
45162
+ function defaultCellDataGetter(_ref /*:: */) {
45163
+ var dataKey = _ref /*:: */.dataKey,
45164
+ rowData = _ref /*:: */.rowData;
45157
45165
  if (typeof rowData.get === 'function') {
45158
45166
  return rowData.get(dataKey);
45159
45167
  } else {
@@ -45167,6 +45175,19 @@ function defaultCellDataGetter(_ref) {
45167
45175
 
45168
45176
 
45169
45177
 
45178
+ function _callSuper(t, o, e) {
45179
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
45180
+ }
45181
+ function _isNativeReflectConstruct() {
45182
+ try {
45183
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
45184
+ } catch (t) {}
45185
+ return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
45186
+ return !!t;
45187
+ })();
45188
+ }
45189
+
45190
+
45170
45191
 
45171
45192
 
45172
45193
 
@@ -45175,15 +45196,13 @@ function defaultCellDataGetter(_ref) {
45175
45196
  /**
45176
45197
  * Describes the header and cell contents of a table column.
45177
45198
  */
45178
-
45179
- var Column = /*#__PURE__*/
45180
- function (_React$Component) {
45181
- _inherits(Column, _React$Component);
45199
+ var Column = /*#__PURE__*/function (_React$Component) {
45182
45200
  function Column() {
45183
45201
  _classCallCheck(this, Column);
45184
- return _possibleConstructorReturn(this, _getPrototypeOf(Column).apply(this, arguments));
45202
+ return _callSuper(this, Column, arguments);
45185
45203
  }
45186
- return Column;
45204
+ _inherits(Column, _React$Component);
45205
+ return _createClass(Column);
45187
45206
  }(react.Component);
45188
45207
  defineProperty_defineProperty(Column, "defaultProps", {
45189
45208
  cellDataGetter: defaultCellDataGetter,
@@ -45198,25 +45217,10 @@ defineProperty_defineProperty(Column, "defaultProps", {
45198
45217
  });
45199
45218
 
45200
45219
  Column.propTypes = false ? 0 : {};
45201
- ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
45202
-
45203
- function _defineProperties(e, r) {
45204
- for (var t = 0; t < r.length; t++) {
45205
- var o = r[t];
45206
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
45207
- }
45208
- }
45209
- function _createClass(e, r, t) {
45210
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
45211
- writable: !1
45212
- }), e;
45213
- }
45214
-
45215
45220
  ;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Grid/utils/calculateSizeAndPositionDataAndUpdateScrollOffset.js
45216
45221
  /**
45217
45222
  * Helper method that determines when to recalculate row or column metadata.
45218
45223
  */
45219
-
45220
45224
  /*:: type Params<T> = {
45221
45225
  // Number of rows or columns in the current axis
45222
45226
  cellCount: number,
@@ -45245,23 +45249,23 @@ function _createClass(e, r, t) {
45245
45249
  // Callback to invoke if the scroll position should be recalculated
45246
45250
  updateScrollOffsetForScrollToIndex: () => void,
45247
45251
  };*/
45248
- function calculateSizeAndPositionDataAndUpdateScrollOffset(_ref) {
45249
- var cellCount = _ref.cellCount,
45250
- cellSize = _ref.cellSize,
45251
- computeMetadataCallback = _ref.computeMetadataCallback,
45252
- computeMetadataCallbackProps = _ref.computeMetadataCallbackProps,
45253
- nextCellsCount = _ref.nextCellsCount,
45254
- nextCellSize = _ref.nextCellSize,
45255
- nextScrollToIndex = _ref.nextScrollToIndex,
45256
- scrollToIndex = _ref.scrollToIndex,
45257
- updateScrollOffsetForScrollToIndex = _ref.updateScrollOffsetForScrollToIndex;
45258
-
45252
+ function calculateSizeAndPositionDataAndUpdateScrollOffset(_ref /*:: */) {
45253
+ var cellCount = _ref /*:: */.cellCount,
45254
+ cellSize = _ref /*:: */.cellSize,
45255
+ computeMetadataCallback = _ref /*:: */.computeMetadataCallback,
45256
+ computeMetadataCallbackProps = _ref /*:: */.computeMetadataCallbackProps,
45257
+ nextCellsCount = _ref /*:: */.nextCellsCount,
45258
+ nextCellSize = _ref /*:: */.nextCellSize,
45259
+ nextScrollToIndex = _ref /*:: */.nextScrollToIndex,
45260
+ scrollToIndex = _ref /*:: */.scrollToIndex,
45261
+ updateScrollOffsetForScrollToIndex = _ref /*:: */.updateScrollOffsetForScrollToIndex;
45259
45262
  // Don't compare cell sizes if they are functions because inline functions would cause infinite loops.
45260
45263
  // In that event users should use the manual recompute methods to inform of changes.
45261
45264
  if (cellCount !== nextCellsCount || (typeof cellSize === 'number' || typeof nextCellSize === 'number') && cellSize !== nextCellSize) {
45262
- computeMetadataCallback(computeMetadataCallbackProps); // Updated cell metadata may have hidden the previous scrolled-to item.
45263
- // In this case we should also update the scrollTop to ensure it stays visible.
45265
+ computeMetadataCallback(computeMetadataCallbackProps);
45264
45266
 
45267
+ // Updated cell metadata may have hidden the previous scrolled-to item.
45268
+ // In this case we should also update the scrollTop to ensure it stays visible.
45265
45269
  if (scrollToIndex >= 0 && scrollToIndex === nextScrollToIndex) {
45266
45270
  updateScrollOffsetForScrollToIndex();
45267
45271
  }
@@ -45285,54 +45289,46 @@ function objectWithoutProperties_objectWithoutProperties(e, t) {
45285
45289
 
45286
45290
 
45287
45291
 
45288
-
45289
45292
  /*:: import type {Alignment, CellSizeGetter, VisibleCellRange} from '../types';*/
45290
-
45291
45293
  /*:: type CellSizeAndPositionManagerParams = {
45292
45294
  cellCount: number,
45293
45295
  cellSizeGetter: CellSizeGetter,
45294
45296
  estimatedCellSize: number,
45295
45297
  };*/
45296
-
45297
45298
  /*:: type ConfigureParams = {
45298
45299
  cellCount: number,
45299
45300
  estimatedCellSize: number,
45300
45301
  cellSizeGetter: CellSizeGetter,
45301
45302
  };*/
45302
-
45303
45303
  /*:: type GetUpdatedOffsetForIndex = {
45304
45304
  align: Alignment,
45305
45305
  containerSize: number,
45306
45306
  currentOffset: number,
45307
45307
  targetIndex: number,
45308
45308
  };*/
45309
-
45310
45309
  /*:: type GetVisibleCellRangeParams = {
45311
45310
  containerSize: number,
45312
45311
  offset: number,
45313
45312
  };*/
45314
-
45315
45313
  /*:: type SizeAndPositionData = {
45316
45314
  offset: number,
45317
45315
  size: number,
45318
45316
  };*/
45319
-
45320
45317
  /**
45321
45318
  * Just-in-time calculates and caches size and position information for a collection of cells.
45322
45319
  */
45323
- var CellSizeAndPositionManager = /*#__PURE__*/
45324
- function () {
45325
- // Cache of size and position data for cells, mapped by cell index.
45326
- // Note that invalid values may exist in this map so only rely on cells up to this._lastMeasuredIndex
45327
- // Measurements for cells up to this index can be trusted; cells afterward should be estimated.
45328
- // Used in deferred mode to track which cells have been queued for measurement.
45329
- function CellSizeAndPositionManager(_ref) {
45330
- var cellCount = _ref.cellCount,
45331
- cellSizeGetter = _ref.cellSizeGetter,
45332
- estimatedCellSize = _ref.estimatedCellSize;
45320
+ var CellSizeAndPositionManager = /*#__PURE__*/function () {
45321
+ function CellSizeAndPositionManager(_ref /*:: */) {
45322
+ var cellCount = _ref /*:: */.cellCount,
45323
+ cellSizeGetter = _ref /*:: */.cellSizeGetter,
45324
+ estimatedCellSize = _ref /*:: */.estimatedCellSize;
45333
45325
  _classCallCheck(this, CellSizeAndPositionManager);
45326
+ // Cache of size and position data for cells, mapped by cell index.
45327
+ // Note that invalid values may exist in this map so only rely on cells up to this._lastMeasuredIndex
45334
45328
  defineProperty_defineProperty(this, "_cellSizeAndPositionData", {});
45329
+ // Measurements for cells up to this index can be trusted; cells afterward should be estimated.
45335
45330
  defineProperty_defineProperty(this, "_lastMeasuredIndex", -1);
45331
+ // Used in deferred mode to track which cells have been queued for measurement.
45336
45332
  defineProperty_defineProperty(this, "_lastBatchedIndex", -1);
45337
45333
  defineProperty_defineProperty(this, "_cellCount", void 0);
45338
45334
  defineProperty_defineProperty(this, "_cellSizeGetter", void 0);
@@ -45341,37 +45337,34 @@ function () {
45341
45337
  this._cellCount = cellCount;
45342
45338
  this._estimatedCellSize = estimatedCellSize;
45343
45339
  }
45344
- _createClass(CellSizeAndPositionManager, [{
45340
+ return _createClass(CellSizeAndPositionManager, [{
45345
45341
  key: "areOffsetsAdjusted",
45346
45342
  value: function areOffsetsAdjusted() {
45347
45343
  return false;
45348
45344
  }
45349
45345
  }, {
45350
45346
  key: "configure",
45351
- value: function configure(_ref2) {
45352
- var cellCount = _ref2.cellCount,
45353
- estimatedCellSize = _ref2.estimatedCellSize,
45354
- cellSizeGetter = _ref2.cellSizeGetter;
45347
+ value: function configure(_ref2 /*:: */) {
45348
+ var cellCount = _ref2 /*:: */.cellCount,
45349
+ estimatedCellSize = _ref2 /*:: */.estimatedCellSize,
45350
+ cellSizeGetter = _ref2 /*:: */.cellSizeGetter;
45355
45351
  this._cellCount = cellCount;
45356
45352
  this._estimatedCellSize = estimatedCellSize;
45357
45353
  this._cellSizeGetter = cellSizeGetter;
45358
45354
  }
45359
45355
  }, {
45360
45356
  key: "getCellCount",
45361
- value: function getCellCount() /*: number*/
45362
- {
45357
+ value: function getCellCount() /*: number*/{
45363
45358
  return this._cellCount;
45364
45359
  }
45365
45360
  }, {
45366
45361
  key: "getEstimatedCellSize",
45367
- value: function getEstimatedCellSize() /*: number*/
45368
- {
45362
+ value: function getEstimatedCellSize() /*: number*/{
45369
45363
  return this._estimatedCellSize;
45370
45364
  }
45371
45365
  }, {
45372
45366
  key: "getLastMeasuredIndex",
45373
- value: function getLastMeasuredIndex() /*: number*/
45374
- {
45367
+ value: function getLastMeasuredIndex() /*: number*/{
45375
45368
  return this._lastMeasuredIndex;
45376
45369
  }
45377
45370
  }, {
@@ -45379,15 +45372,14 @@ function () {
45379
45372
  value: function getOffsetAdjustment() {
45380
45373
  return 0;
45381
45374
  }
45375
+
45382
45376
  /**
45383
45377
  * This method returns the size and position for the cell at the specified index.
45384
45378
  * It just-in-time calculates (or used cached values) for cells leading up to the index.
45385
45379
  */
45386
45380
  }, {
45387
45381
  key: "getSizeAndPositionOfCell",
45388
- value: function getSizeAndPositionOfCell(index
45389
- /*: number*/) /*: SizeAndPositionData*/
45390
- {
45382
+ value: function getSizeAndPositionOfCell(index /*: number*/) /*: SizeAndPositionData*/{
45391
45383
  if (index < 0 || index >= this._cellCount) {
45392
45384
  throw Error("Requested index ".concat(index, " is outside of range 0..").concat(this._cellCount));
45393
45385
  }
@@ -45397,9 +45389,10 @@ function () {
45397
45389
  for (var i = this._lastMeasuredIndex + 1; i <= index; i++) {
45398
45390
  var size = this._cellSizeGetter({
45399
45391
  index: i
45400
- }); // undefined or NaN probably means a logic error in the size getter.
45401
- // null means we're using CellMeasurer and haven't yet measured a given index.
45392
+ });
45402
45393
 
45394
+ // undefined or NaN probably means a logic error in the size getter.
45395
+ // null means we're using CellMeasurer and haven't yet measured a given index.
45403
45396
  if (size === undefined || isNaN(size)) {
45404
45397
  throw Error("Invalid size returned for cell ".concat(i, " of value ").concat(size));
45405
45398
  } else if (size === null) {
@@ -45422,13 +45415,13 @@ function () {
45422
45415
  }
45423
45416
  }, {
45424
45417
  key: "getSizeAndPositionOfLastMeasuredCell",
45425
- value: function getSizeAndPositionOfLastMeasuredCell() /*: SizeAndPositionData*/
45426
- {
45418
+ value: function getSizeAndPositionOfLastMeasuredCell() /*: SizeAndPositionData*/{
45427
45419
  return this._lastMeasuredIndex >= 0 ? this._cellSizeAndPositionData[this._lastMeasuredIndex] : {
45428
45420
  offset: 0,
45429
45421
  size: 0
45430
45422
  };
45431
45423
  }
45424
+
45432
45425
  /**
45433
45426
  * Total size of all cells being measured.
45434
45427
  * This value will be completely estimated initially.
@@ -45436,14 +45429,14 @@ function () {
45436
45429
  */
45437
45430
  }, {
45438
45431
  key: "getTotalSize",
45439
- value: function getTotalSize() /*: number*/
45440
- {
45432
+ value: function getTotalSize() /*: number*/{
45441
45433
  var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();
45442
45434
  var totalSizeOfMeasuredCells = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size;
45443
45435
  var numUnmeasuredCells = this._cellCount - this._lastMeasuredIndex - 1;
45444
45436
  var totalSizeOfUnmeasuredCells = numUnmeasuredCells * this._estimatedCellSize;
45445
45437
  return totalSizeOfMeasuredCells + totalSizeOfUnmeasuredCells;
45446
45438
  }
45439
+
45447
45440
  /**
45448
45441
  * Determines a new offset that ensures a certain cell is visible, given the current offset.
45449
45442
  * If the cell is already visible then the current offset will be returned.
@@ -45457,13 +45450,12 @@ function () {
45457
45450
  */
45458
45451
  }, {
45459
45452
  key: "getUpdatedOffsetForIndex",
45460
- value: function getUpdatedOffsetForIndex(_ref3) /*: number*/
45461
- {
45462
- var _ref3$align = _ref3.align,
45453
+ value: function getUpdatedOffsetForIndex(_ref3 /*:: */) /*: number*/{
45454
+ var _ref3$align = _ref3 /*:: */.align,
45463
45455
  align = _ref3$align === void 0 ? 'auto' : _ref3$align,
45464
- containerSize = _ref3.containerSize,
45465
- currentOffset = _ref3.currentOffset,
45466
- targetIndex = _ref3.targetIndex;
45456
+ containerSize = _ref3 /*:: */.containerSize,
45457
+ currentOffset = _ref3 /*:: */.currentOffset,
45458
+ targetIndex = _ref3 /*:: */.targetIndex;
45467
45459
  if (containerSize <= 0) {
45468
45460
  return 0;
45469
45461
  }
@@ -45490,9 +45482,7 @@ function () {
45490
45482
  }
45491
45483
  }, {
45492
45484
  key: "getVisibleCellRange",
45493
- value: function getVisibleCellRange(params
45494
- /*: GetVisibleCellRangeParams*/) /*: VisibleCellRange*/
45495
- {
45485
+ value: function getVisibleCellRange(params /*: GetVisibleCellRangeParams*/) /*: VisibleCellRange*/{
45496
45486
  var containerSize = params.containerSize,
45497
45487
  offset = params.offset;
45498
45488
  var totalSize = this.getTotalSize();
@@ -45513,6 +45503,7 @@ function () {
45513
45503
  stop: stop
45514
45504
  };
45515
45505
  }
45506
+
45516
45507
  /**
45517
45508
  * Clear all cached values for cells after the specified index.
45518
45509
  * This method should be called for any cell that has changed its size.
@@ -45520,18 +45511,12 @@ function () {
45520
45511
  */
45521
45512
  }, {
45522
45513
  key: "resetCell",
45523
- value: function resetCell(index
45524
- /*: number*/) /*: void*/
45525
- {
45514
+ value: function resetCell(index /*: number*/) /*: void*/{
45526
45515
  this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, index - 1);
45527
45516
  }
45528
45517
  }, {
45529
45518
  key: "_binarySearch",
45530
- value: function _binarySearch(high
45531
- /*: number*/, low
45532
- /*: number*/, offset
45533
- /*: number*/) /*: number*/
45534
- {
45519
+ value: function _binarySearch(high /*: number*/, low /*: number*/, offset /*: number*/) /*: number*/{
45535
45520
  while (low <= high) {
45536
45521
  var middle = low + Math.floor((high - low) / 2);
45537
45522
  var currentOffset = this.getSizeAndPositionOfCell(middle).offset;
@@ -45551,10 +45536,7 @@ function () {
45551
45536
  }
45552
45537
  }, {
45553
45538
  key: "_exponentialSearch",
45554
- value: function _exponentialSearch(index
45555
- /*: number*/, offset
45556
- /*: number*/) /*: number*/
45557
- {
45539
+ value: function _exponentialSearch(index /*: number*/, offset /*: number*/) /*: number*/{
45558
45540
  var interval = 1;
45559
45541
  while (index < this._cellCount && this.getSizeAndPositionOfCell(index).offset < offset) {
45560
45542
  index += interval;
@@ -45562,6 +45544,7 @@ function () {
45562
45544
  }
45563
45545
  return this._binarySearch(Math.min(index, this._cellCount - 1), Math.floor(index / 2), offset);
45564
45546
  }
45547
+
45565
45548
  /**
45566
45549
  * Searches for the cell (index) nearest the specified offset.
45567
45550
  *
@@ -45570,14 +45553,13 @@ function () {
45570
45553
  */
45571
45554
  }, {
45572
45555
  key: "_findNearestCell",
45573
- value: function _findNearestCell(offset
45574
- /*: number*/) /*: number*/
45575
- {
45556
+ value: function _findNearestCell(offset /*: number*/) /*: number*/{
45576
45557
  if (isNaN(offset)) {
45577
45558
  throw Error("Invalid offset ".concat(offset, " specified"));
45578
- } // Our search algorithms find the nearest match at or below the specified offset.
45579
- // So make sure the offset is at least 0 or no match will be found.
45559
+ }
45580
45560
 
45561
+ // Our search algorithms find the nearest match at or below the specified offset.
45562
+ // So make sure the offset is at least 0 or no match will be found.
45581
45563
  offset = Math.max(0, offset);
45582
45564
  var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();
45583
45565
  var lastMeasuredIndex = Math.max(0, this._lastMeasuredIndex);
@@ -45592,7 +45574,6 @@ function () {
45592
45574
  }
45593
45575
  }
45594
45576
  }]);
45595
- return CellSizeAndPositionManager;
45596
45577
  }();
45597
45578
 
45598
45579
  ;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Grid/utils/maxElementSize.js
@@ -45604,8 +45585,7 @@ var maxElementSize_isBrowser = function isBrowser() {
45604
45585
  var isChrome = function isChrome() {
45605
45586
  return !!window.chrome;
45606
45587
  };
45607
- var getMaxElementSize = function getMaxElementSize() /*: number*/
45608
- {
45588
+ var getMaxElementSize = function getMaxElementSize() /*: number*/{
45609
45589
  if (maxElementSize_isBrowser()) {
45610
45590
  if (isChrome()) {
45611
45591
  return CHROME_MAX_ELEMENT_SIZE;
@@ -45618,7 +45598,7 @@ var getMaxElementSize = function getMaxElementSize() /*: number*/
45618
45598
 
45619
45599
 
45620
45600
 
45621
-
45601
+ var ScalingCellSizeAndPositionManager_excluded = ["maxScrollSize"];
45622
45602
  /*:: import type {Alignment, CellSizeGetter, VisibleCellRange} from '../types';*/
45623
45603
 
45624
45604
 
@@ -45626,35 +45606,35 @@ var getMaxElementSize = function getMaxElementSize() /*: number*/
45626
45606
  containerSize: number,
45627
45607
  offset: number,
45628
45608
  };*/
45629
-
45630
45609
  /*:: type Params = {
45631
45610
  maxScrollSize?: number,
45632
45611
  cellCount: number,
45633
45612
  cellSizeGetter: CellSizeGetter,
45634
45613
  estimatedCellSize: number,
45635
45614
  };*/
45636
-
45615
+ /**
45616
+ * Browsers have scroll offset limitations (eg Chrome stops scrolling at ~33.5M pixels where as Edge tops out at ~1.5M pixels).
45617
+ * After a certain position, the browser won't allow the user to scroll further (even via JavaScript scroll offset adjustments).
45618
+ * This util picks a lower ceiling for max size and artificially adjusts positions within to make it transparent for users.
45619
+ */
45637
45620
  /**
45638
45621
  * Extends CellSizeAndPositionManager and adds scaling behavior for lists that are too large to fit within a browser's native limits.
45639
45622
  */
45640
- var ScalingCellSizeAndPositionManager = /*#__PURE__*/
45641
- function () {
45642
- function ScalingCellSizeAndPositionManager(_ref) {
45643
- var _ref$maxScrollSize = _ref.maxScrollSize,
45623
+ var ScalingCellSizeAndPositionManager = /*#__PURE__*/function () {
45624
+ function ScalingCellSizeAndPositionManager(_ref /*:: */) {
45625
+ var _ref$maxScrollSize = _ref /*:: */.maxScrollSize,
45644
45626
  maxScrollSize = _ref$maxScrollSize === void 0 ? getMaxElementSize() : _ref$maxScrollSize,
45645
- params = objectWithoutProperties_objectWithoutProperties(_ref, ["maxScrollSize"]);
45627
+ params = objectWithoutProperties_objectWithoutProperties(_ref /*:: */, ScalingCellSizeAndPositionManager_excluded);
45646
45628
  _classCallCheck(this, ScalingCellSizeAndPositionManager);
45647
45629
  defineProperty_defineProperty(this, "_cellSizeAndPositionManager", void 0);
45648
45630
  defineProperty_defineProperty(this, "_maxScrollSize", void 0);
45649
-
45650
45631
  // Favor composition over inheritance to simplify IE10 support
45651
45632
  this._cellSizeAndPositionManager = new CellSizeAndPositionManager(params);
45652
45633
  this._maxScrollSize = maxScrollSize;
45653
45634
  }
45654
- _createClass(ScalingCellSizeAndPositionManager, [{
45635
+ return _createClass(ScalingCellSizeAndPositionManager, [{
45655
45636
  key: "areOffsetsAdjusted",
45656
- value: function areOffsetsAdjusted() /*: boolean*/
45657
- {
45637
+ value: function areOffsetsAdjusted() /*: boolean*/{
45658
45638
  return this._cellSizeAndPositionManager.getTotalSize() > this._maxScrollSize;
45659
45639
  }
45660
45640
  }, {
@@ -45669,32 +45649,29 @@ function () {
45669
45649
  }
45670
45650
  }, {
45671
45651
  key: "getCellCount",
45672
- value: function getCellCount() /*: number*/
45673
- {
45652
+ value: function getCellCount() /*: number*/{
45674
45653
  return this._cellSizeAndPositionManager.getCellCount();
45675
45654
  }
45676
45655
  }, {
45677
45656
  key: "getEstimatedCellSize",
45678
- value: function getEstimatedCellSize() /*: number*/
45679
- {
45657
+ value: function getEstimatedCellSize() /*: number*/{
45680
45658
  return this._cellSizeAndPositionManager.getEstimatedCellSize();
45681
45659
  }
45682
45660
  }, {
45683
45661
  key: "getLastMeasuredIndex",
45684
- value: function getLastMeasuredIndex() /*: number*/
45685
- {
45662
+ value: function getLastMeasuredIndex() /*: number*/{
45686
45663
  return this._cellSizeAndPositionManager.getLastMeasuredIndex();
45687
45664
  }
45665
+
45688
45666
  /**
45689
45667
  * Number of pixels a cell at the given position (offset) should be shifted in order to fit within the scaled container.
45690
45668
  * The offset passed to this function is scaled (safe) as well.
45691
45669
  */
45692
45670
  }, {
45693
45671
  key: "getOffsetAdjustment",
45694
- value: function getOffsetAdjustment(_ref2) /*: number*/
45695
- {
45696
- var containerSize = _ref2.containerSize,
45697
- offset = _ref2.offset;
45672
+ value: function getOffsetAdjustment(_ref2 /*:: */) /*: number*/{
45673
+ var containerSize = _ref2 /*:: */.containerSize,
45674
+ offset = _ref2 /*:: */.offset;
45698
45675
  var totalSize = this._cellSizeAndPositionManager.getTotalSize();
45699
45676
  var safeTotalSize = this.getTotalSize();
45700
45677
  var offsetPercentage = this._getOffsetPercentage({
@@ -45706,8 +45683,7 @@ function () {
45706
45683
  }
45707
45684
  }, {
45708
45685
  key: "getSizeAndPositionOfCell",
45709
- value: function getSizeAndPositionOfCell(index
45710
- /*: number*/) {
45686
+ value: function getSizeAndPositionOfCell(index /*: number*/) {
45711
45687
  return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index);
45712
45688
  }
45713
45689
  }, {
@@ -45715,22 +45691,23 @@ function () {
45715
45691
  value: function getSizeAndPositionOfLastMeasuredCell() {
45716
45692
  return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();
45717
45693
  }
45694
+
45718
45695
  /** See CellSizeAndPositionManager#getTotalSize */
45719
45696
  }, {
45720
45697
  key: "getTotalSize",
45721
- value: function getTotalSize() /*: number*/
45722
- {
45698
+ value: function getTotalSize() /*: number*/{
45723
45699
  return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());
45724
45700
  }
45701
+
45725
45702
  /** See CellSizeAndPositionManager#getUpdatedOffsetForIndex */
45726
45703
  }, {
45727
45704
  key: "getUpdatedOffsetForIndex",
45728
- value: function getUpdatedOffsetForIndex(_ref3) {
45729
- var _ref3$align = _ref3.align,
45705
+ value: function getUpdatedOffsetForIndex(_ref3 /*:: */) {
45706
+ var _ref3$align = _ref3 /*:: */.align,
45730
45707
  align = _ref3$align === void 0 ? 'auto' : _ref3$align,
45731
- containerSize = _ref3.containerSize,
45732
- currentOffset = _ref3.currentOffset,
45733
- targetIndex = _ref3.targetIndex;
45708
+ containerSize = _ref3 /*:: */.containerSize,
45709
+ currentOffset = _ref3 /*:: */.currentOffset,
45710
+ targetIndex = _ref3 /*:: */.targetIndex;
45734
45711
  currentOffset = this._safeOffsetToOffset({
45735
45712
  containerSize: containerSize,
45736
45713
  offset: currentOffset
@@ -45746,13 +45723,13 @@ function () {
45746
45723
  offset: offset
45747
45724
  });
45748
45725
  }
45726
+
45749
45727
  /** See CellSizeAndPositionManager#getVisibleCellRange */
45750
45728
  }, {
45751
45729
  key: "getVisibleCellRange",
45752
- value: function getVisibleCellRange(_ref4) /*: VisibleCellRange*/
45753
- {
45754
- var containerSize = _ref4.containerSize,
45755
- offset = _ref4.offset;
45730
+ value: function getVisibleCellRange(_ref4 /*:: */) /*: VisibleCellRange*/{
45731
+ var containerSize = _ref4 /*:: */.containerSize,
45732
+ offset = _ref4 /*:: */.offset;
45756
45733
  offset = this._safeOffsetToOffset({
45757
45734
  containerSize: containerSize,
45758
45735
  offset: offset
@@ -45764,25 +45741,22 @@ function () {
45764
45741
  }
45765
45742
  }, {
45766
45743
  key: "resetCell",
45767
- value: function resetCell(index
45768
- /*: number*/) /*: void*/
45769
- {
45744
+ value: function resetCell(index /*: number*/) /*: void*/{
45770
45745
  this._cellSizeAndPositionManager.resetCell(index);
45771
45746
  }
45772
45747
  }, {
45773
45748
  key: "_getOffsetPercentage",
45774
- value: function _getOffsetPercentage(_ref5) {
45775
- var containerSize = _ref5.containerSize,
45776
- offset = _ref5.offset,
45777
- totalSize = _ref5.totalSize;
45749
+ value: function _getOffsetPercentage(_ref5 /*:: */) {
45750
+ var containerSize = _ref5 /*:: */.containerSize,
45751
+ offset = _ref5 /*:: */.offset,
45752
+ totalSize = _ref5 /*:: */.totalSize;
45778
45753
  return totalSize <= containerSize ? 0 : offset / (totalSize - containerSize);
45779
45754
  }
45780
45755
  }, {
45781
45756
  key: "_offsetToSafeOffset",
45782
- value: function _offsetToSafeOffset(_ref6) /*: number*/
45783
- {
45784
- var containerSize = _ref6.containerSize,
45785
- offset = _ref6.offset;
45757
+ value: function _offsetToSafeOffset(_ref6 /*:: */) /*: number*/{
45758
+ var containerSize = _ref6 /*:: */.containerSize,
45759
+ offset = _ref6 /*:: */.offset;
45786
45760
  var totalSize = this._cellSizeAndPositionManager.getTotalSize();
45787
45761
  var safeTotalSize = this.getTotalSize();
45788
45762
  if (totalSize === safeTotalSize) {
@@ -45798,10 +45772,9 @@ function () {
45798
45772
  }
45799
45773
  }, {
45800
45774
  key: "_safeOffsetToOffset",
45801
- value: function _safeOffsetToOffset(_ref7) /*: number*/
45802
- {
45803
- var containerSize = _ref7.containerSize,
45804
- offset = _ref7.offset;
45775
+ value: function _safeOffsetToOffset(_ref7 /*:: */) /*: number*/{
45776
+ var containerSize = _ref7 /*:: */.containerSize,
45777
+ offset = _ref7 /*:: */.offset;
45805
45778
  var totalSize = this._cellSizeAndPositionManager.getTotalSize();
45806
45779
  var safeTotalSize = this.getTotalSize();
45807
45780
  if (totalSize === safeTotalSize) {
@@ -45816,7 +45789,6 @@ function () {
45816
45789
  }
45817
45790
  }
45818
45791
  }]);
45819
- return ScalingCellSizeAndPositionManager;
45820
45792
  }();
45821
45793
 
45822
45794
  ;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/utils/createCallbackMemoizer.js
@@ -45851,18 +45823,18 @@ var SCROLL_DIRECTION_BACKWARD = -1;
45851
45823
  var SCROLL_DIRECTION_FORWARD = 1;
45852
45824
  var SCROLL_DIRECTION_HORIZONTAL = 'horizontal';
45853
45825
  var SCROLL_DIRECTION_VERTICAL = 'vertical';
45826
+
45854
45827
  /**
45855
45828
  * Calculates the number of cells to overscan before and after a specified range.
45856
45829
  * This function ensures that overscanning doesn't exceed the available cells.
45857
45830
  */
45858
45831
 
45859
- function defaultOverscanIndicesGetter(_ref) /*: OverscanIndices*/
45860
- {
45861
- var cellCount = _ref.cellCount,
45862
- overscanCellsCount = _ref.overscanCellsCount,
45863
- scrollDirection = _ref.scrollDirection,
45864
- startIndex = _ref.startIndex,
45865
- stopIndex = _ref.stopIndex;
45832
+ function defaultOverscanIndicesGetter(_ref /*:: */) /*: OverscanIndices*/{
45833
+ var cellCount = _ref /*:: */.cellCount,
45834
+ overscanCellsCount = _ref /*:: */.overscanCellsCount,
45835
+ scrollDirection = _ref /*:: */.scrollDirection,
45836
+ startIndex = _ref /*:: */.startIndex,
45837
+ stopIndex = _ref /*:: */.stopIndex;
45866
45838
  if (scrollDirection === SCROLL_DIRECTION_FORWARD) {
45867
45839
  return {
45868
45840
  overscanStartIndex: Math.max(0, startIndex),
@@ -45878,11 +45850,11 @@ function defaultOverscanIndicesGetter(_ref) /*: OverscanIndices*/
45878
45850
  ;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Grid/utils/updateScrollIndexHelper.js
45879
45851
  /*:: import type {Alignment, CellSize} from '../types';*/
45880
45852
 
45853
+
45881
45854
  /**
45882
45855
  * Helper function that determines when to update scroll offsets to ensure that a scroll-to-index remains visible.
45883
45856
  * This function also ensures that the scroll ofset isn't past the last column/row of cells.
45884
45857
  */
45885
-
45886
45858
  /*:: type Params = {
45887
45859
  // Width or height of cells for the current axis
45888
45860
  cellSize?: CellSize,
@@ -45920,28 +45892,30 @@ function defaultOverscanIndicesGetter(_ref) /*: OverscanIndices*/
45920
45892
  // Callback to invoke with an scroll-to-index value
45921
45893
  updateScrollIndexCallback: (index: number) => void,
45922
45894
  };*/
45923
-
45924
- function updateScrollIndexHelper(_ref) {
45925
- var cellSize = _ref.cellSize,
45926
- cellSizeAndPositionManager = _ref.cellSizeAndPositionManager,
45927
- previousCellsCount = _ref.previousCellsCount,
45928
- previousCellSize = _ref.previousCellSize,
45929
- previousScrollToAlignment = _ref.previousScrollToAlignment,
45930
- previousScrollToIndex = _ref.previousScrollToIndex,
45931
- previousSize = _ref.previousSize,
45932
- scrollOffset = _ref.scrollOffset,
45933
- scrollToAlignment = _ref.scrollToAlignment,
45934
- scrollToIndex = _ref.scrollToIndex,
45935
- size = _ref.size,
45936
- sizeJustIncreasedFromZero = _ref.sizeJustIncreasedFromZero,
45937
- updateScrollIndexCallback = _ref.updateScrollIndexCallback;
45895
+ function updateScrollIndexHelper(_ref /*:: */) {
45896
+ var cellSize = _ref /*:: */.cellSize,
45897
+ cellSizeAndPositionManager = _ref /*:: */.cellSizeAndPositionManager,
45898
+ previousCellsCount = _ref /*:: */.previousCellsCount,
45899
+ previousCellSize = _ref /*:: */.previousCellSize,
45900
+ previousScrollToAlignment = _ref /*:: */.previousScrollToAlignment,
45901
+ previousScrollToIndex = _ref /*:: */.previousScrollToIndex,
45902
+ previousSize = _ref /*:: */.previousSize,
45903
+ scrollOffset = _ref /*:: */.scrollOffset,
45904
+ scrollToAlignment = _ref /*:: */.scrollToAlignment,
45905
+ scrollToIndex = _ref /*:: */.scrollToIndex,
45906
+ size = _ref /*:: */.size,
45907
+ sizeJustIncreasedFromZero = _ref /*:: */.sizeJustIncreasedFromZero,
45908
+ updateScrollIndexCallback = _ref /*:: */.updateScrollIndexCallback;
45938
45909
  var cellCount = cellSizeAndPositionManager.getCellCount();
45939
45910
  var hasScrollToIndex = scrollToIndex >= 0 && scrollToIndex < cellCount;
45940
- var sizeHasChanged = size !== previousSize || sizeJustIncreasedFromZero || !previousCellSize || typeof cellSize === 'number' && cellSize !== previousCellSize; // If we have a new scroll target OR if height/row-height has changed,
45941
- // We should ensure that the scroll target is visible.
45911
+ var sizeHasChanged = size !== previousSize || sizeJustIncreasedFromZero || !previousCellSize || typeof cellSize === 'number' && cellSize !== previousCellSize;
45942
45912
 
45913
+ // If we have a new scroll target OR if height/row-height has changed,
45914
+ // We should ensure that the scroll target is visible.
45943
45915
  if (hasScrollToIndex && (sizeHasChanged || scrollToAlignment !== previousScrollToAlignment || scrollToIndex !== previousScrollToIndex)) {
45944
- updateScrollIndexCallback(scrollToIndex); // If we don't have a selected item but list size or number of children have decreased,
45916
+ updateScrollIndexCallback(scrollToIndex);
45917
+
45918
+ // If we don't have a selected item but list size or number of children have decreased,
45945
45919
  // Make sure we aren't scrolled too far past the current content.
45946
45920
  } else if (!hasScrollToIndex && cellCount > 0 && (size < previousSize || cellCount < previousCellsCount)) {
45947
45921
  // We need to ensure that the current scroll offset is still within the collection's range.
@@ -45956,35 +45930,37 @@ function updateScrollIndexHelper(_ref) {
45956
45930
  ;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/Grid/defaultCellRangeRenderer.js
45957
45931
  /*:: import type {CellRangeRendererParams} from './types';*/
45958
45932
 
45933
+
45959
45934
  /**
45960
45935
  * Default implementation of cellRangeRenderer used by Grid.
45961
45936
  * This renderer supports cell-caching while the user is scrolling.
45962
45937
  */
45963
45938
 
45964
- function defaultCellRangeRenderer(_ref) {
45965
- var cellCache = _ref.cellCache,
45966
- cellRenderer = _ref.cellRenderer,
45967
- columnSizeAndPositionManager = _ref.columnSizeAndPositionManager,
45968
- columnStartIndex = _ref.columnStartIndex,
45969
- columnStopIndex = _ref.columnStopIndex,
45970
- deferredMeasurementCache = _ref.deferredMeasurementCache,
45971
- horizontalOffsetAdjustment = _ref.horizontalOffsetAdjustment,
45972
- isScrolling = _ref.isScrolling,
45973
- isScrollingOptOut = _ref.isScrollingOptOut,
45974
- parent = _ref.parent,
45975
- rowSizeAndPositionManager = _ref.rowSizeAndPositionManager,
45976
- rowStartIndex = _ref.rowStartIndex,
45977
- rowStopIndex = _ref.rowStopIndex,
45978
- styleCache = _ref.styleCache,
45979
- verticalOffsetAdjustment = _ref.verticalOffsetAdjustment,
45980
- visibleColumnIndices = _ref.visibleColumnIndices,
45981
- visibleRowIndices = _ref.visibleRowIndices;
45982
- var renderedCells = []; // Browsers have native size limits for elements (eg Chrome 33M pixels, IE 1.5M pixes).
45939
+ function defaultCellRangeRenderer(_ref /*:: */) {
45940
+ var cellCache = _ref /*:: */.cellCache,
45941
+ cellRenderer = _ref /*:: */.cellRenderer,
45942
+ columnSizeAndPositionManager = _ref /*:: */.columnSizeAndPositionManager,
45943
+ columnStartIndex = _ref /*:: */.columnStartIndex,
45944
+ columnStopIndex = _ref /*:: */.columnStopIndex,
45945
+ deferredMeasurementCache = _ref /*:: */.deferredMeasurementCache,
45946
+ horizontalOffsetAdjustment = _ref /*:: */.horizontalOffsetAdjustment,
45947
+ isScrolling = _ref /*:: */.isScrolling,
45948
+ isScrollingOptOut = _ref /*:: */.isScrollingOptOut,
45949
+ parent = _ref /*:: */.parent,
45950
+ rowSizeAndPositionManager = _ref /*:: */.rowSizeAndPositionManager,
45951
+ rowStartIndex = _ref /*:: */.rowStartIndex,
45952
+ rowStopIndex = _ref /*:: */.rowStopIndex,
45953
+ styleCache = _ref /*:: */.styleCache,
45954
+ verticalOffsetAdjustment = _ref /*:: */.verticalOffsetAdjustment,
45955
+ visibleColumnIndices = _ref /*:: */.visibleColumnIndices,
45956
+ visibleRowIndices = _ref /*:: */.visibleRowIndices;
45957
+ var renderedCells = [];
45958
+
45959
+ // Browsers have native size limits for elements (eg Chrome 33M pixels, IE 1.5M pixes).
45983
45960
  // User cannot scroll beyond these size limitations.
45984
45961
  // In order to work around this, ScalingCellSizeAndPositionManager compresses offsets.
45985
45962
  // We should never cache styles for compressed offsets though as this can lead to bugs.
45986
45963
  // See issue #576 for more.
45987
-
45988
45964
  var areOffsetsAdjusted = columnSizeAndPositionManager.areOffsetsAdjusted() || rowSizeAndPositionManager.areOffsetsAdjusted();
45989
45965
  var canCacheStyle = !isScrolling && !areOffsetsAdjusted;
45990
45966
  for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {
@@ -45993,8 +45969,9 @@ function defaultCellRangeRenderer(_ref) {
45993
45969
  var columnDatum = columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex);
45994
45970
  var isVisible = columnIndex >= visibleColumnIndices.start && columnIndex <= visibleColumnIndices.stop && rowIndex >= visibleRowIndices.start && rowIndex <= visibleRowIndices.stop;
45995
45971
  var key = "".concat(rowIndex, "-").concat(columnIndex);
45996
- var style = void 0; // Cache style objects so shallow-compare doesn't re-render unnecessarily.
45972
+ var style = void 0;
45997
45973
 
45974
+ // Cache style objects so shallow-compare doesn't re-render unnecessarily.
45998
45975
  if (canCacheStyle && styleCache[key]) {
45999
45976
  style = styleCache[key];
46000
45977
  } else {
@@ -46031,7 +46008,9 @@ function defaultCellRangeRenderer(_ref) {
46031
46008
  rowIndex: rowIndex,
46032
46009
  style: style
46033
46010
  };
46034
- var renderedCell = void 0; // Avoid re-creating cells while scrolling.
46011
+ var renderedCell = void 0;
46012
+
46013
+ // Avoid re-creating cells while scrolling.
46035
46014
  // This can lead to the same cell being created many times and can cause performance issues for "heavy" cells.
46036
46015
  // If a scroll is in progress- cache and reuse cells.
46037
46016
  // This cache will be thrown away once scrolling completes.
@@ -46041,12 +46020,13 @@ function defaultCellRangeRenderer(_ref) {
46041
46020
  //
46042
46021
  // If isScrollingOptOut is specified, we always cache cells.
46043
46022
  // For more info refer to issue #1028
46044
-
46045
46023
  if ((isScrollingOptOut || isScrolling) && !horizontalOffsetAdjustment && !verticalOffsetAdjustment) {
46046
46024
  if (!cellCache[key]) {
46047
46025
  cellCache[key] = cellRenderer(cellRendererParams);
46048
46026
  }
46049
- renderedCell = cellCache[key]; // If the user is no longer scrolling, don't cache cells.
46027
+ renderedCell = cellCache[key];
46028
+
46029
+ // If the user is no longer scrolling, don't cache cells.
46050
46030
  // This makes dynamic cell content difficult for users and would also lead to a heavier memory footprint.
46051
46031
  } else {
46052
46032
  renderedCell = cellRenderer(cellRendererParams);
@@ -46093,9 +46073,7 @@ function scrollbarSize(recalc) {
46093
46073
  var react_lifecycles_compat_es = __webpack_require__(62135);
46094
46074
  ;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/utils/animationFrame.js
46095
46075
  /*:: type Callback = (timestamp: number) => void;*/
46096
-
46097
46076
  /*:: type CancelAnimationFrame = (requestId: number) => void;*/
46098
-
46099
46077
  /*:: type RequestAnimationFrame = (callback: Callback) => number;*/
46100
46078
  // Properly handle server-side rendering.
46101
46079
  var win;
@@ -46105,49 +46083,36 @@ if (typeof window !== 'undefined') {
46105
46083
  win = self;
46106
46084
  } else {
46107
46085
  win = {};
46108
- } // requestAnimationFrame() shim by Paul Irish
46109
- // http://paulirish.com/2011/requestanimationframe-for-smart-animating/
46086
+ }
46110
46087
 
46111
- var request = win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || win.oRequestAnimationFrame || win.msRequestAnimationFrame || function (callback
46112
- /*: Callback*/) /*: RequestAnimationFrame*/
46113
- {
46114
- return win
46115
- /*: any*/.setTimeout(callback, 1000 / 60);
46088
+ // requestAnimationFrame() shim by Paul Irish
46089
+ // http://paulirish.com/2011/requestanimationframe-for-smart-animating/
46090
+ var request = win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || win.oRequestAnimationFrame || win.msRequestAnimationFrame || function (callback /*: Callback*/) /*: RequestAnimationFrame*/{
46091
+ return win /*: any*/.setTimeout(callback, 1000 / 60);
46116
46092
  };
46117
- var cancel = win.cancelAnimationFrame || win.webkitCancelAnimationFrame || win.mozCancelAnimationFrame || win.oCancelAnimationFrame || win.msCancelAnimationFrame || function (id
46118
- /*: number*/) {
46119
- win
46120
- /*: any*/.clearTimeout(id);
46093
+ var cancel = win.cancelAnimationFrame || win.webkitCancelAnimationFrame || win.mozCancelAnimationFrame || win.oCancelAnimationFrame || win.msCancelAnimationFrame || function (id /*: number*/) {
46094
+ win /*: any*/.clearTimeout(id);
46121
46095
  };
46122
- var raf
46123
- /*: RequestAnimationFrame*/ = request
46124
- /*: any*/;
46125
- var caf
46126
- /*: CancelAnimationFrame*/ = cancel
46127
- /*: any*/;
46096
+ var raf /*: RequestAnimationFrame*/ = request /*: any*/;
46097
+ var caf /*: CancelAnimationFrame*/ = cancel /*: any*/;
46128
46098
  ;// CONCATENATED MODULE: ./node_modules/@box/react-virtualized/dist/es/utils/requestAnimationTimeout.js
46129
46099
 
46130
46100
  /*:: export type AnimationTimeoutId = {
46131
46101
  id: number,
46132
46102
  };*/
46133
-
46134
- var cancelAnimationTimeout = function cancelAnimationTimeout(frame
46135
- /*: AnimationTimeoutId*/) {
46103
+ var cancelAnimationTimeout = function cancelAnimationTimeout(frame /*: AnimationTimeoutId*/) {
46136
46104
  return caf(frame.id);
46137
46105
  };
46106
+
46138
46107
  /**
46139
46108
  * Recursively calls requestAnimationFrame until a specified delay has been met or exceeded.
46140
46109
  * When the delay time has been reached the function you're timing out will be called.
46141
46110
  *
46142
46111
  * Credit: Joe Lambert (https://gist.github.com/joelambert/1002116#file-requesttimeout-js)
46143
46112
  */
46144
-
46145
- var requestAnimationTimeout = function requestAnimationTimeout(callback
46146
- /*: Function*/, delay
46147
- /*: number*/) /*: AnimationTimeoutId*/
46148
- {
46149
- var start; // wait for end of processing current event handler, because event handler may be long
46150
-
46113
+ var requestAnimationTimeout = function requestAnimationTimeout(callback /*: Function*/, delay /*: number*/) /*: AnimationTimeoutId*/{
46114
+ var start;
46115
+ // wait for end of processing current event handler, because event handler may be long
46151
46116
  Promise.resolve().then(function () {
46152
46117
  start = Date.now();
46153
46118
  });
@@ -46158,8 +46123,7 @@ var requestAnimationTimeout = function requestAnimationTimeout(callback
46158
46123
  frame.id = raf(timeout);
46159
46124
  }
46160
46125
  };
46161
- var frame
46162
- /*: AnimationTimeoutId*/ = {
46126
+ var frame /*: AnimationTimeoutId*/ = {
46163
46127
  id: raf(timeout)
46164
46128
  };
46165
46129
  return frame;
@@ -46173,36 +46137,38 @@ function _extends2() { return _extends2 = Object.assign ? Object.assign.bind() :
46173
46137
 
46174
46138
 
46175
46139
 
46176
-
46177
- function Grid_ownKeys(object, enumerableOnly) {
46178
- var keys = Object.keys(object);
46140
+ function Grid_ownKeys(e, r) {
46141
+ var t = Object.keys(e);
46179
46142
  if (Object.getOwnPropertySymbols) {
46180
- var symbols = Object.getOwnPropertySymbols(object);
46181
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
46182
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
46183
- });
46184
- keys.push.apply(keys, symbols);
46143
+ var o = Object.getOwnPropertySymbols(e);
46144
+ r && (o = o.filter(function (r) {
46145
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
46146
+ })), t.push.apply(t, o);
46185
46147
  }
46186
- return keys;
46148
+ return t;
46187
46149
  }
46188
- function Grid_objectSpread(target) {
46189
- for (var i = 1; i < arguments.length; i++) {
46190
- var source = arguments[i] != null ? arguments[i] : {};
46191
- if (i % 2) {
46192
- Grid_ownKeys(source, true).forEach(function (key) {
46193
- defineProperty_defineProperty(target, key, source[key]);
46194
- });
46195
- } else if (Object.getOwnPropertyDescriptors) {
46196
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
46197
- } else {
46198
- Grid_ownKeys(source).forEach(function (key) {
46199
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
46200
- });
46201
- }
46150
+ function Grid_objectSpread(e) {
46151
+ for (var r = 1; r < arguments.length; r++) {
46152
+ var t = null != arguments[r] ? arguments[r] : {};
46153
+ r % 2 ? Grid_ownKeys(Object(t), !0).forEach(function (r) {
46154
+ defineProperty_defineProperty(e, r, t[r]);
46155
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Grid_ownKeys(Object(t)).forEach(function (r) {
46156
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
46157
+ });
46202
46158
  }
46203
- return target;
46159
+ return e;
46160
+ }
46161
+ function Grid_callSuper(t, o, e) {
46162
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, Grid_isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
46163
+ }
46164
+ function Grid_isNativeReflectConstruct() {
46165
+ try {
46166
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
46167
+ } catch (t) {}
46168
+ return (Grid_isNativeReflectConstruct = function _isNativeReflectConstruct() {
46169
+ return !!t;
46170
+ })();
46204
46171
  }
46205
-
46206
46172
  /*:: import type {
46207
46173
  CellRenderer,
46208
46174
  CellRangeRenderer,
@@ -46218,7 +46184,6 @@ function Grid_objectSpread(target) {
46218
46184
  CellCache,
46219
46185
  StyleCache,
46220
46186
  } from './types';*/
46221
-
46222
46187
  /*:: import type {AnimationTimeoutId} from '../utils/requestAnimationTimeout';*/
46223
46188
 
46224
46189
 
@@ -46231,30 +46196,28 @@ function Grid_objectSpread(target) {
46231
46196
 
46232
46197
 
46233
46198
 
46199
+
46234
46200
  /**
46235
46201
  * Specifies the number of milliseconds during which to disable pointer events while a scroll is in progress.
46236
46202
  * This improves performance and makes scrolling smoother.
46237
46203
  */
46238
-
46239
46204
  var DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150;
46205
+
46240
46206
  /**
46241
46207
  * Controls whether the Grid updates the DOM element's scrollLeft/scrollTop based on the current state or just observes it.
46242
46208
  * This prevents Grid from interrupting mouse-wheel animations (see issue #2).
46243
46209
  */
46244
-
46245
46210
  var SCROLL_POSITION_CHANGE_REASONS = {
46246
46211
  OBSERVED: 'observed',
46247
46212
  REQUESTED: 'requested'
46248
46213
  };
46249
- var renderNull
46250
- /*: NoContentRenderer*/ = function renderNull() {
46214
+ var renderNull /*: NoContentRenderer*/ = function renderNull /*: NoContentRenderer*/() {
46251
46215
  return null;
46252
46216
  };
46253
46217
  /*:: type ScrollPosition = {
46254
46218
  scrollTop?: number,
46255
46219
  scrollLeft?: number,
46256
46220
  };*/
46257
-
46258
46221
  /*:: type Props = {
46259
46222
  'aria-label': string,
46260
46223
  'aria-readonly'?: boolean,
@@ -46420,7 +46383,6 @@ var renderNull
46420
46383
  /** Width of Grid; this property determines the number of visible (vs virtualized) columns. *-/
46421
46384
  width: number,
46422
46385
  };*/
46423
-
46424
46386
  /*:: type InstanceProps = {
46425
46387
  prevColumnWidth: CellSize,
46426
46388
  prevRowHeight: CellSize,
@@ -46437,7 +46399,6 @@ var renderNull
46437
46399
  scrollbarSize: number,
46438
46400
  scrollbarSizeMeasured: boolean,
46439
46401
  };*/
46440
-
46441
46402
  /*:: type State = {
46442
46403
  instanceProps: InstanceProps,
46443
46404
  isScrolling: boolean,
@@ -46448,54 +46409,49 @@ var renderNull
46448
46409
  scrollPositionChangeReason: 'observed' | 'requested' | null,
46449
46410
  needToResetStyleCache: boolean,
46450
46411
  };*/
46451
-
46452
46412
  /**
46453
46413
  * Renders tabular data with virtualization along the vertical and horizontal axes.
46454
46414
  * Row heights and column widths must be known ahead of time and specified as properties.
46455
46415
  */
46456
- var Grid = /*#__PURE__*/
46457
- function (_React$PureComponent) {
46458
- _inherits(Grid, _React$PureComponent);
46459
-
46460
- // Invokes onSectionRendered callback only when start/stop row or column indices change
46461
- function Grid(props
46462
- /*: Props*/) {
46416
+ var Grid = /*#__PURE__*/function (_React$PureComponent) {
46417
+ function Grid(props /*: Props*/) {
46463
46418
  var _this;
46464
46419
  _classCallCheck(this, Grid);
46465
- _this = _possibleConstructorReturn(this, _getPrototypeOf(Grid).call(this, props));
46466
- defineProperty_defineProperty(_assertThisInitialized(_this), "_onGridRenderedMemoizer", createCallbackMemoizer());
46467
- defineProperty_defineProperty(_assertThisInitialized(_this), "_onScrollMemoizer", createCallbackMemoizer(false));
46468
- defineProperty_defineProperty(_assertThisInitialized(_this), "_deferredInvalidateColumnIndex", null);
46469
- defineProperty_defineProperty(_assertThisInitialized(_this), "_deferredInvalidateRowIndex", null);
46470
- defineProperty_defineProperty(_assertThisInitialized(_this), "_recomputeScrollLeftFlag", false);
46471
- defineProperty_defineProperty(_assertThisInitialized(_this), "_recomputeScrollTopFlag", false);
46472
- defineProperty_defineProperty(_assertThisInitialized(_this), "_horizontalScrollBarSize", 0);
46473
- defineProperty_defineProperty(_assertThisInitialized(_this), "_verticalScrollBarSize", 0);
46474
- defineProperty_defineProperty(_assertThisInitialized(_this), "_scrollbarPresenceChanged", false);
46475
- defineProperty_defineProperty(_assertThisInitialized(_this), "_scrollingContainer", void 0);
46476
- defineProperty_defineProperty(_assertThisInitialized(_this), "_childrenToDisplay", void 0);
46477
- defineProperty_defineProperty(_assertThisInitialized(_this), "_columnStartIndex", void 0);
46478
- defineProperty_defineProperty(_assertThisInitialized(_this), "_columnStopIndex", void 0);
46479
- defineProperty_defineProperty(_assertThisInitialized(_this), "_rowStartIndex", void 0);
46480
- defineProperty_defineProperty(_assertThisInitialized(_this), "_rowStopIndex", void 0);
46481
- defineProperty_defineProperty(_assertThisInitialized(_this), "_renderedColumnStartIndex", 0);
46482
- defineProperty_defineProperty(_assertThisInitialized(_this), "_renderedColumnStopIndex", 0);
46483
- defineProperty_defineProperty(_assertThisInitialized(_this), "_renderedRowStartIndex", 0);
46484
- defineProperty_defineProperty(_assertThisInitialized(_this), "_renderedRowStopIndex", 0);
46485
- defineProperty_defineProperty(_assertThisInitialized(_this), "_initialScrollTop", void 0);
46486
- defineProperty_defineProperty(_assertThisInitialized(_this), "_initialScrollLeft", void 0);
46487
- defineProperty_defineProperty(_assertThisInitialized(_this), "_disablePointerEventsTimeoutId", void 0);
46488
- defineProperty_defineProperty(_assertThisInitialized(_this), "_styleCache", {});
46489
- defineProperty_defineProperty(_assertThisInitialized(_this), "_cellCache", {});
46490
- defineProperty_defineProperty(_assertThisInitialized(_this), "_debounceScrollEndedCallback", function () {
46491
- _this._disablePointerEventsTimeoutId = null; // isScrolling is used to determine if we reset styleCache
46492
-
46420
+ _this = Grid_callSuper(this, Grid, [props]);
46421
+ // Invokes onSectionRendered callback only when start/stop row or column indices change
46422
+ defineProperty_defineProperty(_this, "_onGridRenderedMemoizer", createCallbackMemoizer());
46423
+ defineProperty_defineProperty(_this, "_onScrollMemoizer", createCallbackMemoizer(false));
46424
+ defineProperty_defineProperty(_this, "_deferredInvalidateColumnIndex", null);
46425
+ defineProperty_defineProperty(_this, "_deferredInvalidateRowIndex", null);
46426
+ defineProperty_defineProperty(_this, "_recomputeScrollLeftFlag", false);
46427
+ defineProperty_defineProperty(_this, "_recomputeScrollTopFlag", false);
46428
+ defineProperty_defineProperty(_this, "_horizontalScrollBarSize", 0);
46429
+ defineProperty_defineProperty(_this, "_verticalScrollBarSize", 0);
46430
+ defineProperty_defineProperty(_this, "_scrollbarPresenceChanged", false);
46431
+ defineProperty_defineProperty(_this, "_scrollingContainer", void 0);
46432
+ defineProperty_defineProperty(_this, "_childrenToDisplay", void 0);
46433
+ defineProperty_defineProperty(_this, "_columnStartIndex", void 0);
46434
+ defineProperty_defineProperty(_this, "_columnStopIndex", void 0);
46435
+ defineProperty_defineProperty(_this, "_rowStartIndex", void 0);
46436
+ defineProperty_defineProperty(_this, "_rowStopIndex", void 0);
46437
+ defineProperty_defineProperty(_this, "_renderedColumnStartIndex", 0);
46438
+ defineProperty_defineProperty(_this, "_renderedColumnStopIndex", 0);
46439
+ defineProperty_defineProperty(_this, "_renderedRowStartIndex", 0);
46440
+ defineProperty_defineProperty(_this, "_renderedRowStopIndex", 0);
46441
+ defineProperty_defineProperty(_this, "_initialScrollTop", void 0);
46442
+ defineProperty_defineProperty(_this, "_initialScrollLeft", void 0);
46443
+ defineProperty_defineProperty(_this, "_disablePointerEventsTimeoutId", void 0);
46444
+ defineProperty_defineProperty(_this, "_styleCache", {});
46445
+ defineProperty_defineProperty(_this, "_cellCache", {});
46446
+ defineProperty_defineProperty(_this, "_debounceScrollEndedCallback", function () {
46447
+ _this._disablePointerEventsTimeoutId = null;
46448
+ // isScrolling is used to determine if we reset styleCache
46493
46449
  _this.setState({
46494
46450
  isScrolling: false,
46495
46451
  needToResetStyleCache: false
46496
46452
  });
46497
46453
  });
46498
- defineProperty_defineProperty(_assertThisInitialized(_this), "_invokeOnGridRenderedHelper", function () {
46454
+ defineProperty_defineProperty(_this, "_invokeOnGridRenderedHelper", function () {
46499
46455
  var onSectionRendered = _this.props.onSectionRendered;
46500
46456
  _this._onGridRenderedMemoizer({
46501
46457
  callback: onSectionRendered,
@@ -46511,18 +46467,15 @@ function (_React$PureComponent) {
46511
46467
  }
46512
46468
  });
46513
46469
  });
46514
- defineProperty_defineProperty(_assertThisInitialized(_this), "_setScrollingContainerRef", function (ref
46515
- /*: Element*/) {
46470
+ defineProperty_defineProperty(_this, "_setScrollingContainerRef", function (ref /*: Element*/) {
46516
46471
  _this._scrollingContainer = ref;
46517
46472
  });
46518
- defineProperty_defineProperty(_assertThisInitialized(_this), "_onScroll", function (event
46519
- /*: Event*/) {
46473
+ defineProperty_defineProperty(_this, "_onScroll", function (event /*: Event*/) {
46520
46474
  // In certain edge-cases React dispatches an onScroll event with an invalid target.scrollLeft / target.scrollTop.
46521
46475
  // This invalid event can be detected by comparing event.target to this component's scrollable DOM element.
46522
46476
  // See issue #404 for more information.
46523
46477
  if (event.target === _this._scrollingContainer) {
46524
- _this.handleScrollEvent(event.target
46525
- /*: any*/);
46478
+ _this.handleScrollEvent(event.target /*: any*/);
46526
46479
  }
46527
46480
  });
46528
46481
  var columnSizeAndPositionManager = new ScalingCellSizeAndPositionManager({
@@ -46569,11 +46522,12 @@ function (_React$PureComponent) {
46569
46522
  }
46570
46523
  return _this;
46571
46524
  }
46525
+
46572
46526
  /**
46573
46527
  * Gets offsets for a given cell and alignment.
46574
46528
  */
46575
-
46576
- _createClass(Grid, [{
46529
+ _inherits(Grid, _React$PureComponent);
46530
+ return _createClass(Grid, [{
46577
46531
  key: "getOffsetForCell",
46578
46532
  value: function getOffsetForCell() {
46579
46533
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
@@ -46583,7 +46537,7 @@ function (_React$PureComponent) {
46583
46537
  columnIndex = _ref$columnIndex === void 0 ? this.props.scrollToColumn : _ref$columnIndex,
46584
46538
  _ref$rowIndex = _ref.rowIndex,
46585
46539
  rowIndex = _ref$rowIndex === void 0 ? this.props.scrollToRow : _ref$rowIndex;
46586
- var offsetProps = Grid_objectSpread({}, this.props, {
46540
+ var offsetProps = Grid_objectSpread(Grid_objectSpread({}, this.props), {}, {
46587
46541
  scrollToAlignment: alignment,
46588
46542
  scrollToColumn: columnIndex,
46589
46543
  scrollToRow: rowIndex
@@ -46593,6 +46547,7 @@ function (_React$PureComponent) {
46593
46547
  scrollTop: this._getCalculatedScrollTop(offsetProps)
46594
46548
  };
46595
46549
  }
46550
+
46596
46551
  /**
46597
46552
  * Gets estimated total rows' height.
46598
46553
  */
@@ -46601,6 +46556,7 @@ function (_React$PureComponent) {
46601
46556
  value: function getTotalRowsHeight() {
46602
46557
  return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize();
46603
46558
  }
46559
+
46604
46560
  /**
46605
46561
  * Gets estimated total columns' width.
46606
46562
  */
@@ -46609,51 +46565,53 @@ function (_React$PureComponent) {
46609
46565
  value: function getTotalColumnsWidth() {
46610
46566
  return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize();
46611
46567
  }
46568
+
46612
46569
  /**
46613
46570
  * This method handles a scroll event originating from an external scroll control.
46614
46571
  * It's an advanced method and should probably not be used unless you're implementing a custom scroll-bar solution.
46615
46572
  */
46616
46573
  }, {
46617
46574
  key: "handleScrollEvent",
46618
- value: function handleScrollEvent(_ref2) {
46619
- var _ref2$scrollLeft = _ref2.scrollLeft,
46575
+ value: function handleScrollEvent(_ref2 /*:: */) {
46576
+ var _ref2$scrollLeft = _ref2 /*:: */.scrollLeft,
46620
46577
  scrollLeftParam = _ref2$scrollLeft === void 0 ? 0 : _ref2$scrollLeft,
46621
- _ref2$scrollTop = _ref2.scrollTop,
46578
+ _ref2$scrollTop = _ref2 /*:: */.scrollTop,
46622
46579
  scrollTopParam = _ref2$scrollTop === void 0 ? 0 : _ref2$scrollTop;
46623
-
46624
46580
  // On iOS, we can arrive at negative offsets by swiping past the start.
46625
46581
  // To prevent flicker here, we make playing in the negative offset zone cause nothing to happen.
46626
46582
  if (scrollTopParam < 0) {
46627
46583
  return;
46628
- } // Prevent pointer events from interrupting a smooth scroll
46584
+ }
46629
46585
 
46586
+ // Prevent pointer events from interrupting a smooth scroll
46630
46587
  this._debounceScrollEnded();
46631
46588
  var _this$props = this.props,
46632
46589
  autoHeight = _this$props.autoHeight,
46633
46590
  autoWidth = _this$props.autoWidth,
46634
46591
  height = _this$props.height,
46635
46592
  width = _this$props.width;
46636
- var instanceProps = this.state.instanceProps; // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,
46593
+ var instanceProps = this.state.instanceProps;
46594
+
46595
+ // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,
46637
46596
  // Gradually converging on a scrollTop that is within the bounds of the new, smaller height.
46638
46597
  // This causes a series of rapid renders that is slow for long lists.
46639
46598
  // We can avoid that by doing some simple bounds checking to ensure that scroll offsets never exceed their bounds.
46640
-
46641
46599
  var scrollbarSize = instanceProps.scrollbarSize;
46642
46600
  var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();
46643
46601
  var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();
46644
46602
  var scrollLeft = Math.min(Math.max(0, totalColumnsWidth - width + scrollbarSize), scrollLeftParam);
46645
- var scrollTop = Math.min(Math.max(0, totalRowsHeight - height + scrollbarSize), scrollTopParam); // Certain devices (like Apple touchpad) rapid-fire duplicate events.
46603
+ var scrollTop = Math.min(Math.max(0, totalRowsHeight - height + scrollbarSize), scrollTopParam);
46604
+
46605
+ // Certain devices (like Apple touchpad) rapid-fire duplicate events.
46646
46606
  // Don't force a re-render if this is the case.
46647
46607
  // The mouse may move faster then the animation frame does.
46648
46608
  // Use requestAnimationFrame to avoid over-updating.
46649
-
46650
46609
  if (this.state.scrollLeft !== scrollLeft || this.state.scrollTop !== scrollTop) {
46651
46610
  // Track scrolling direction so we can more efficiently overscan rows to reduce empty space around the edges while scrolling.
46652
46611
  // Don't change direction for an axis unless scroll offset has changed.
46653
46612
  var scrollDirectionHorizontal = scrollLeft !== this.state.scrollLeft ? scrollLeft > this.state.scrollLeft ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_BACKWARD : this.state.scrollDirectionHorizontal;
46654
46613
  var scrollDirectionVertical = scrollTop !== this.state.scrollTop ? scrollTop > this.state.scrollTop ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_BACKWARD : this.state.scrollDirectionVertical;
46655
- var newState
46656
- /*: $Shape<State>*/ = {
46614
+ var newState /*: $Shape<State>*/ = {
46657
46615
  isScrolling: true,
46658
46616
  scrollDirectionHorizontal: scrollDirectionHorizontal,
46659
46617
  scrollDirectionVertical: scrollDirectionVertical,
@@ -46675,6 +46633,7 @@ function (_React$PureComponent) {
46675
46633
  totalRowsHeight: totalRowsHeight
46676
46634
  });
46677
46635
  }
46636
+
46678
46637
  /**
46679
46638
  * Invalidate Grid size and recompute visible cells.
46680
46639
  * This is a deferred wrapper for recomputeGridSize().
@@ -46684,12 +46643,13 @@ function (_React$PureComponent) {
46684
46643
  // @TODO (bvaughn) Add automated test coverage for this.
46685
46644
  }, {
46686
46645
  key: "invalidateCellSizeAfterRender",
46687
- value: function invalidateCellSizeAfterRender(_ref3) {
46688
- var columnIndex = _ref3.columnIndex,
46689
- rowIndex = _ref3.rowIndex;
46646
+ value: function invalidateCellSizeAfterRender(_ref3 /*:: */) {
46647
+ var columnIndex = _ref3 /*:: */.columnIndex,
46648
+ rowIndex = _ref3 /*:: */.rowIndex;
46690
46649
  this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex === 'number' ? Math.min(this._deferredInvalidateColumnIndex, columnIndex) : columnIndex;
46691
46650
  this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex === 'number' ? Math.min(this._deferredInvalidateRowIndex, rowIndex) : rowIndex;
46692
46651
  }
46652
+
46693
46653
  /**
46694
46654
  * Pre-measure all columns and rows in a Grid.
46695
46655
  * Typically cells are only measured as needed and estimated sizes are used for cells that have not yet been measured.
@@ -46705,6 +46665,7 @@ function (_React$PureComponent) {
46705
46665
  instanceProps.columnSizeAndPositionManager.getSizeAndPositionOfCell(columnCount - 1);
46706
46666
  instanceProps.rowSizeAndPositionManager.getSizeAndPositionOfCell(rowCount - 1);
46707
46667
  }
46668
+
46708
46669
  /**
46709
46670
  * Forced recompute of row heights and column widths.
46710
46671
  * This function should be called if dynamic column or row sizes have changed but nothing else has.
@@ -46723,37 +46684,41 @@ function (_React$PureComponent) {
46723
46684
  scrollToRow = _this$props3.scrollToRow;
46724
46685
  var instanceProps = this.state.instanceProps;
46725
46686
  instanceProps.columnSizeAndPositionManager.resetCell(columnIndex);
46726
- instanceProps.rowSizeAndPositionManager.resetCell(rowIndex); // Cell sizes may be determined by a function property.
46687
+ instanceProps.rowSizeAndPositionManager.resetCell(rowIndex);
46688
+
46689
+ // Cell sizes may be determined by a function property.
46727
46690
  // In this case the cDU handler can't know if they changed.
46728
46691
  // Store this flag to let the next cDU pass know it needs to recompute the scroll offset.
46729
-
46730
46692
  this._recomputeScrollLeftFlag = scrollToColumn >= 0 && (this.state.scrollDirectionHorizontal === SCROLL_DIRECTION_FORWARD ? columnIndex <= scrollToColumn : columnIndex >= scrollToColumn);
46731
- this._recomputeScrollTopFlag = scrollToRow >= 0 && (this.state.scrollDirectionVertical === SCROLL_DIRECTION_FORWARD ? rowIndex <= scrollToRow : rowIndex >= scrollToRow); // Clear cell cache in case we are scrolling;
46732
- // Invalid row heights likely mean invalid cached content as well.
46693
+ this._recomputeScrollTopFlag = scrollToRow >= 0 && (this.state.scrollDirectionVertical === SCROLL_DIRECTION_FORWARD ? rowIndex <= scrollToRow : rowIndex >= scrollToRow);
46733
46694
 
46695
+ // Clear cell cache in case we are scrolling;
46696
+ // Invalid row heights likely mean invalid cached content as well.
46734
46697
  this._styleCache = {};
46735
46698
  this._cellCache = {};
46736
46699
  this.forceUpdate();
46737
46700
  }
46701
+
46738
46702
  /**
46739
46703
  * Ensure column and row are visible.
46740
46704
  */
46741
46705
  }, {
46742
46706
  key: "scrollToCell",
46743
- value: function scrollToCell(_ref5) {
46744
- var columnIndex = _ref5.columnIndex,
46745
- rowIndex = _ref5.rowIndex;
46707
+ value: function scrollToCell(_ref5 /*:: */) {
46708
+ var columnIndex = _ref5 /*:: */.columnIndex,
46709
+ rowIndex = _ref5 /*:: */.rowIndex;
46746
46710
  var columnCount = this.props.columnCount;
46747
- var props = this.props; // Don't adjust scroll offset for single-column grids (eg List, Table).
46748
- // This can cause a funky scroll offset because of the vertical scrollbar width.
46711
+ var props = this.props;
46749
46712
 
46713
+ // Don't adjust scroll offset for single-column grids (eg List, Table).
46714
+ // This can cause a funky scroll offset because of the vertical scrollbar width.
46750
46715
  if (columnCount > 1 && columnIndex !== undefined) {
46751
- this._updateScrollLeftForScrollToColumn(Grid_objectSpread({}, props, {
46716
+ this._updateScrollLeftForScrollToColumn(Grid_objectSpread(Grid_objectSpread({}, props), {}, {
46752
46717
  scrollToColumn: columnIndex
46753
46718
  }));
46754
46719
  }
46755
46720
  if (rowIndex !== undefined) {
46756
- this._updateScrollTopForScrollToRow(Grid_objectSpread({}, props, {
46721
+ this._updateScrollTopForScrollToRow(Grid_objectSpread(Grid_objectSpread({}, props), {}, {
46757
46722
  scrollToRow: rowIndex
46758
46723
  }));
46759
46724
  }
@@ -46769,18 +46734,21 @@ function (_React$PureComponent) {
46769
46734
  scrollTop = _this$props4.scrollTop,
46770
46735
  scrollToRow = _this$props4.scrollToRow,
46771
46736
  width = _this$props4.width;
46772
- var instanceProps = this.state.instanceProps; // Reset initial offsets to be ignored in browser
46737
+ var instanceProps = this.state.instanceProps;
46773
46738
 
46739
+ // Reset initial offsets to be ignored in browser
46774
46740
  this._initialScrollTop = 0;
46775
- this._initialScrollLeft = 0; // If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.
46741
+ this._initialScrollLeft = 0;
46742
+
46743
+ // If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.
46776
46744
  // We must do this at the start of the method as we may calculate and update scroll position below.
46745
+ this._handleInvalidatedGridSize();
46777
46746
 
46778
- this._handleInvalidatedGridSize(); // If this component was first rendered server-side, scrollbar size will be undefined.
46747
+ // If this component was first rendered server-side, scrollbar size will be undefined.
46779
46748
  // In that event we need to remeasure.
46780
-
46781
46749
  if (!instanceProps.scrollbarSizeMeasured) {
46782
46750
  this.setState(function (prevState) {
46783
- var stateUpdate = Grid_objectSpread({}, prevState, {
46751
+ var stateUpdate = Grid_objectSpread(Grid_objectSpread({}, prevState), {}, {
46784
46752
  needToResetStyleCache: false
46785
46753
  });
46786
46754
  stateUpdate.instanceProps.scrollbarSize = getScrollbarSize();
@@ -46798,8 +46766,9 @@ function (_React$PureComponent) {
46798
46766
  stateUpdate.needToResetStyleCache = false;
46799
46767
  this.setState(stateUpdate);
46800
46768
  }
46801
- } // refs don't work in `react-test-renderer`
46769
+ }
46802
46770
 
46771
+ // refs don't work in `react-test-renderer`
46803
46772
  if (this._scrollingContainer) {
46804
46773
  // setting the ref's scrollLeft and scrollTop.
46805
46774
  // Somehow in MultiGrid the main grid doesn't trigger a update on mount.
@@ -46809,19 +46778,22 @@ function (_React$PureComponent) {
46809
46778
  if (this._scrollingContainer.scrollTop !== this.state.scrollTop) {
46810
46779
  this._scrollingContainer.scrollTop = this.state.scrollTop;
46811
46780
  }
46812
- } // Don't update scroll offset if the size is 0; we don't render any cells in this case.
46813
- // Setting a state may cause us to later thing we've updated the offce when we haven't.
46781
+ }
46814
46782
 
46783
+ // Don't update scroll offset if the size is 0; we don't render any cells in this case.
46784
+ // Setting a state may cause us to later thing we've updated the offce when we haven't.
46815
46785
  var sizeIsBiggerThanZero = height > 0 && width > 0;
46816
46786
  if (scrollToColumn >= 0 && sizeIsBiggerThanZero) {
46817
46787
  this._updateScrollLeftForScrollToColumn();
46818
46788
  }
46819
46789
  if (scrollToRow >= 0 && sizeIsBiggerThanZero) {
46820
46790
  this._updateScrollTopForScrollToRow();
46821
- } // Update onRowsRendered callback
46791
+ }
46822
46792
 
46823
- this._invokeOnGridRenderedHelper(); // Initialize onScroll callback
46793
+ // Update onRowsRendered callback
46794
+ this._invokeOnGridRenderedHelper();
46824
46795
 
46796
+ // Initialize onScroll callback
46825
46797
  this._invokeOnScrollMemoizer({
46826
46798
  scrollLeft: scrollLeft || 0,
46827
46799
  scrollTop: scrollTop || 0,
@@ -46830,6 +46802,7 @@ function (_React$PureComponent) {
46830
46802
  });
46831
46803
  this._maybeCallOnScrollbarPresenceChange();
46832
46804
  }
46805
+
46833
46806
  /**
46834
46807
  * @private
46835
46808
  * This method updates scrollLeft/scrollTop in state for the following conditions:
@@ -46837,9 +46810,7 @@ function (_React$PureComponent) {
46837
46810
  */
46838
46811
  }, {
46839
46812
  key: "componentDidUpdate",
46840
- value: function componentDidUpdate(prevProps
46841
- /*: Props*/, prevState
46842
- /*: State*/) {
46813
+ value: function componentDidUpdate(prevProps /*: Props*/, prevState /*: State*/) {
46843
46814
  var _this2 = this;
46844
46815
  var _this$props5 = this.props,
46845
46816
  autoHeight = _this$props5.autoHeight,
@@ -46855,19 +46826,21 @@ function (_React$PureComponent) {
46855
46826
  scrollLeft = _this$state.scrollLeft,
46856
46827
  scrollPositionChangeReason = _this$state.scrollPositionChangeReason,
46857
46828
  scrollTop = _this$state.scrollTop,
46858
- instanceProps = _this$state.instanceProps; // If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.
46829
+ instanceProps = _this$state.instanceProps;
46830
+ // If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.
46859
46831
  // We must do this at the start of the method as we may calculate and update scroll position below.
46832
+ this._handleInvalidatedGridSize();
46860
46833
 
46861
- this._handleInvalidatedGridSize(); // Handle edge case where column or row count has only just increased over 0.
46834
+ // Handle edge case where column or row count has only just increased over 0.
46862
46835
  // In this case we may have to restore a previously-specified scroll offset.
46863
46836
  // For more info see bvaughn/react-virtualized/issues/218
46837
+ var columnOrRowCountJustIncreasedFromZero = columnCount > 0 && prevProps.columnCount === 0 || rowCount > 0 && prevProps.rowCount === 0;
46864
46838
 
46865
- var columnOrRowCountJustIncreasedFromZero = columnCount > 0 && prevProps.columnCount === 0 || rowCount > 0 && prevProps.rowCount === 0; // Make sure requested changes to :scrollLeft or :scrollTop get applied.
46839
+ // Make sure requested changes to :scrollLeft or :scrollTop get applied.
46866
46840
  // Assigning to scrollLeft/scrollTop tells the browser to interrupt any running scroll animations,
46867
46841
  // 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).
46868
46842
  // So we only set these when we require an adjustment of the scroll position.
46869
46843
  // See issue #2 for more information.
46870
-
46871
46844
  if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED) {
46872
46845
  // @TRICKY :autoHeight and :autoWidth properties instructs Grid to leave :scrollTop and :scrollLeft management to an external HOC (eg WindowScroller).
46873
46846
  // In this case we should avoid checking scrollingContainer.scrollTop and scrollingContainer.scrollLeft since it forces layout/flow.
@@ -46877,13 +46850,15 @@ function (_React$PureComponent) {
46877
46850
  if (!autoHeight && scrollTop >= 0 && (scrollTop !== this._scrollingContainer.scrollTop || columnOrRowCountJustIncreasedFromZero)) {
46878
46851
  this._scrollingContainer.scrollTop = scrollTop;
46879
46852
  }
46880
- } // Special case where the previous size was 0:
46853
+ }
46854
+
46855
+ // Special case where the previous size was 0:
46881
46856
  // In this case we don't show any windowed cells at all.
46882
46857
  // So we should always recalculate offset afterwards.
46858
+ var sizeJustIncreasedFromZero = (prevProps.width === 0 || prevProps.height === 0) && height > 0 && width > 0;
46883
46859
 
46884
- var sizeJustIncreasedFromZero = (prevProps.width === 0 || prevProps.height === 0) && height > 0 && width > 0; // Update scroll offsets if the current :scrollToColumn or :scrollToRow values requires it
46860
+ // Update scroll offsets if the current :scrollToColumn or :scrollToRow values requires it
46885
46861
  // @TODO Do we also need this check or can the one in componentWillUpdate() suffice?
46886
-
46887
46862
  if (this._recomputeScrollLeftFlag) {
46888
46863
  this._recomputeScrollLeftFlag = false;
46889
46864
  this._updateScrollLeftForScrollToColumn(this.props);
@@ -46925,10 +46900,12 @@ function (_React$PureComponent) {
46925
46900
  return _this2._updateScrollTopForScrollToRow(_this2.props);
46926
46901
  }
46927
46902
  });
46928
- } // Update onRowsRendered callback if start/stop indices have changed
46903
+ }
46929
46904
 
46930
- this._invokeOnGridRenderedHelper(); // Changes to :scrollLeft or :scrollTop should also notify :onScroll listeners
46905
+ // Update onRowsRendered callback if start/stop indices have changed
46906
+ this._invokeOnGridRenderedHelper();
46931
46907
 
46908
+ // Changes to :scrollLeft or :scrollTop should also notify :onScroll listeners
46932
46909
  if (scrollLeft !== prevState.scrollLeft || scrollTop !== prevState.scrollTop) {
46933
46910
  var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();
46934
46911
  var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();
@@ -46948,6 +46925,7 @@ function (_React$PureComponent) {
46948
46925
  cancelAnimationTimeout(this._disablePointerEventsTimeoutId);
46949
46926
  }
46950
46927
  }
46928
+
46951
46929
  /**
46952
46930
  * This method updates scrollLeft/scrollTop in state for the following conditions:
46953
46931
  * 1) Empty content (0 rows or columns)
@@ -46976,8 +46954,7 @@ function (_React$PureComponent) {
46976
46954
  instanceProps = _this$state2.instanceProps,
46977
46955
  needToResetStyleCache = _this$state2.needToResetStyleCache;
46978
46956
  var isScrolling = this._isScrolling();
46979
- var gridStyle
46980
- /*: Object*/ = {
46957
+ var gridStyle /*: Object*/ = {
46981
46958
  boxSizing: 'border-box',
46982
46959
  direction: 'ltr',
46983
46960
  height: autoHeight ? 'auto' : height,
@@ -46988,31 +46965,35 @@ function (_React$PureComponent) {
46988
46965
  };
46989
46966
  if (needToResetStyleCache) {
46990
46967
  this._styleCache = {};
46991
- } // calculate _styleCache here
46992
- // if state.isScrolling (not from _isScrolling) then reset
46968
+ }
46993
46969
 
46970
+ // calculate _styleCache here
46971
+ // if state.isScrolling (not from _isScrolling) then reset
46994
46972
  if (!this.state.isScrolling) {
46995
46973
  this._resetStyleCache();
46996
- } // calculate children to render here
46974
+ }
46997
46975
 
46976
+ // calculate children to render here
46998
46977
  this._calculateChildrenToRender(this.props, this.state);
46999
46978
  var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();
47000
- var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize(); // Force browser to hide scrollbars when we know they aren't necessary.
46979
+ var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();
46980
+
46981
+ // Force browser to hide scrollbars when we know they aren't necessary.
47001
46982
  // Otherwise once scrollbars appear they may not disappear again.
47002
46983
  // For more info see issue #116
47003
-
47004
46984
  var verticalScrollBarSize = totalRowsHeight > height ? instanceProps.scrollbarSize : 0;
47005
46985
  var horizontalScrollBarSize = totalColumnsWidth > width ? instanceProps.scrollbarSize : 0;
47006
46986
  if (horizontalScrollBarSize !== this._horizontalScrollBarSize || verticalScrollBarSize !== this._verticalScrollBarSize) {
47007
46987
  this._horizontalScrollBarSize = horizontalScrollBarSize;
47008
46988
  this._verticalScrollBarSize = verticalScrollBarSize;
47009
46989
  this._scrollbarPresenceChanged = true;
47010
- } // Also explicitly init styles to 'auto' if scrollbars are required.
46990
+ }
46991
+
46992
+ // Also explicitly init styles to 'auto' if scrollbars are required.
47011
46993
  // This works around an obscure edge case where external CSS styles have not yet been loaded,
47012
46994
  // But an initial scroll index of offset is set as an external prop.
47013
46995
  // Without this style, Grid would render the correct range of cells but would NOT update its internal offset.
47014
46996
  // This was originally reported via clauderic/react-infinite-calendar/issues/23
47015
-
47016
46997
  gridStyle.overflowX = totalColumnsWidth + verticalScrollBarSize <= width ? 'hidden' : 'auto';
47017
46998
  gridStyle.overflowY = totalRowsHeight + horizontalScrollBarSize <= height ? 'hidden' : 'auto';
47018
46999
  var childrenToDisplay = this._childrenToDisplay;
@@ -47026,7 +47007,7 @@ function (_React$PureComponent) {
47026
47007
  id: id,
47027
47008
  onScroll: this._onScroll,
47028
47009
  role: role,
47029
- style: Grid_objectSpread({}, gridStyle, {}, style),
47010
+ style: Grid_objectSpread(Grid_objectSpread({}, gridStyle), style),
47030
47011
  tabIndex: tabIndex
47031
47012
  }), childrenToDisplay.length > 0 && /*#__PURE__*/react.createElement("div", {
47032
47013
  className: "ReactVirtualized__Grid__innerScrollContainer",
@@ -47042,14 +47023,13 @@ function (_React$PureComponent) {
47042
47023
  }, containerStyle)
47043
47024
  }, childrenToDisplay), showNoContentRenderer && noContentRenderer());
47044
47025
  }
47026
+
47045
47027
  /* ---------------------------- Helper methods ---------------------------- */
47046
47028
  }, {
47047
47029
  key: "_calculateChildrenToRender",
47048
47030
  value: function _calculateChildrenToRender() {
47049
- var props
47050
- /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
47051
- var state
47052
- /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
47031
+ var props /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
47032
+ var state /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
47053
47033
  var cellRenderer = props.cellRenderer,
47054
47034
  cellRangeRenderer = props.cellRangeRenderer,
47055
47035
  columnCount = props.columnCount,
@@ -47067,8 +47047,9 @@ function (_React$PureComponent) {
47067
47047
  var scrollTop = this._initialScrollTop > 0 ? this._initialScrollTop : state.scrollTop;
47068
47048
  var scrollLeft = this._initialScrollLeft > 0 ? this._initialScrollLeft : state.scrollLeft;
47069
47049
  var isScrolling = this._isScrolling(props, state);
47070
- this._childrenToDisplay = []; // Render only enough columns and rows to cover the visible area of the grid.
47050
+ this._childrenToDisplay = [];
47071
47051
 
47052
+ // Render only enough columns and rows to cover the visible area of the grid.
47072
47053
  if (height > 0 && width > 0) {
47073
47054
  var visibleColumnIndices = instanceProps.columnSizeAndPositionManager.getVisibleCellRange({
47074
47055
  containerSize: width,
@@ -47085,8 +47066,9 @@ function (_React$PureComponent) {
47085
47066
  var verticalOffsetAdjustment = instanceProps.rowSizeAndPositionManager.getOffsetAdjustment({
47086
47067
  containerSize: height,
47087
47068
  offset: scrollTop
47088
- }); // Store for _invokeOnGridRenderedHelper()
47069
+ });
47089
47070
 
47071
+ // Store for _invokeOnGridRenderedHelper()
47090
47072
  this._renderedColumnStartIndex = visibleColumnIndices.start;
47091
47073
  this._renderedColumnStopIndex = visibleColumnIndices.stop;
47092
47074
  this._renderedRowStartIndex = visibleRowIndices.start;
@@ -47106,13 +47088,15 @@ function (_React$PureComponent) {
47106
47088
  scrollDirection: scrollDirectionVertical,
47107
47089
  startIndex: typeof visibleRowIndices.start === 'number' ? visibleRowIndices.start : 0,
47108
47090
  stopIndex: typeof visibleRowIndices.stop === 'number' ? visibleRowIndices.stop : -1
47109
- }); // Store for _invokeOnGridRenderedHelper()
47091
+ });
47110
47092
 
47093
+ // Store for _invokeOnGridRenderedHelper()
47111
47094
  var columnStartIndex = overscanColumnIndices.overscanStartIndex;
47112
47095
  var columnStopIndex = overscanColumnIndices.overscanStopIndex;
47113
47096
  var rowStartIndex = overscanRowIndices.overscanStartIndex;
47114
- var rowStopIndex = overscanRowIndices.overscanStopIndex; // Advanced use-cases (eg CellMeasurer) require batched measurements to determine accurate sizes.
47097
+ var rowStopIndex = overscanRowIndices.overscanStopIndex;
47115
47098
 
47099
+ // Advanced use-cases (eg CellMeasurer) require batched measurements to determine accurate sizes.
47116
47100
  if (deferredMeasurementCache) {
47117
47101
  // If rows have a dynamic height, scan the rows we are about to render.
47118
47102
  // If any have not yet been measured, then we need to render all columns initially,
@@ -47126,11 +47110,12 @@ function (_React$PureComponent) {
47126
47110
  break;
47127
47111
  }
47128
47112
  }
47129
- } // If columns have a dynamic width, scan the columns we are about to render.
47113
+ }
47114
+
47115
+ // If columns have a dynamic width, scan the columns we are about to render.
47130
47116
  // If any have not yet been measured, then we need to render all rows initially,
47131
47117
  // Because the width of the column is equal to the widest cell within that column,
47132
47118
  // (And so we can't know the width without measuring all row-cells first).
47133
-
47134
47119
  if (!deferredMeasurementCache.hasFixedWidth()) {
47135
47120
  for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {
47136
47121
  if (!deferredMeasurementCache.has(0, columnIndex)) {
@@ -47161,14 +47146,16 @@ function (_React$PureComponent) {
47161
47146
  verticalOffsetAdjustment: verticalOffsetAdjustment,
47162
47147
  visibleColumnIndices: visibleColumnIndices,
47163
47148
  visibleRowIndices: visibleRowIndices
47164
- }); // update the indices
47149
+ });
47165
47150
 
47151
+ // update the indices
47166
47152
  this._columnStartIndex = columnStartIndex;
47167
47153
  this._columnStopIndex = columnStopIndex;
47168
47154
  this._rowStartIndex = rowStartIndex;
47169
47155
  this._rowStopIndex = rowStopIndex;
47170
47156
  }
47171
47157
  }
47158
+
47172
47159
  /**
47173
47160
  * Sets an :isScrolling flag for a small window of time.
47174
47161
  * This flag is used to disable pointer events on the scrollable portion of the Grid.
@@ -47185,11 +47172,12 @@ function (_React$PureComponent) {
47185
47172
  }
47186
47173
  }, {
47187
47174
  key: "_handleInvalidatedGridSize",
47175
+ value:
47188
47176
  /**
47189
47177
  * Check for batched CellMeasurer size invalidations.
47190
47178
  * This will occur the first time one or more previously unmeasured cells are rendered.
47191
47179
  */
47192
- value: function _handleInvalidatedGridSize() {
47180
+ function _handleInvalidatedGridSize() {
47193
47181
  if (typeof this._deferredInvalidateColumnIndex === 'number' && typeof this._deferredInvalidateRowIndex === 'number') {
47194
47182
  var columnIndex = this._deferredInvalidateColumnIndex;
47195
47183
  var rowIndex = this._deferredInvalidateRowIndex;
@@ -47203,12 +47191,12 @@ function (_React$PureComponent) {
47203
47191
  }
47204
47192
  }, {
47205
47193
  key: "_invokeOnScrollMemoizer",
47206
- value: function _invokeOnScrollMemoizer(_ref6) {
47194
+ value: function _invokeOnScrollMemoizer(_ref6 /*:: */) {
47207
47195
  var _this3 = this;
47208
- var scrollLeft = _ref6.scrollLeft,
47209
- scrollTop = _ref6.scrollTop,
47210
- totalColumnsWidth = _ref6.totalColumnsWidth,
47211
- totalRowsHeight = _ref6.totalRowsHeight;
47196
+ var scrollLeft = _ref6 /*:: */.scrollLeft,
47197
+ scrollTop = _ref6 /*:: */.scrollTop,
47198
+ totalColumnsWidth = _ref6 /*:: */.totalColumnsWidth,
47199
+ totalRowsHeight = _ref6 /*:: */.totalRowsHeight;
47212
47200
  this._onScrollMemoizer({
47213
47201
  callback: function callback(_ref7) {
47214
47202
  var scrollLeft = _ref7.scrollLeft,
@@ -47234,12 +47222,9 @@ function (_React$PureComponent) {
47234
47222
  }
47235
47223
  }, {
47236
47224
  key: "_isScrolling",
47237
- value: function _isScrolling() /*: boolean*/
47238
- {
47239
- var props
47240
- /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
47241
- var state
47242
- /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
47225
+ value: function _isScrolling() /*: boolean*/{
47226
+ var props /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
47227
+ var state /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
47243
47228
  // If isScrolling is defined in props, use it to override the value in state
47244
47229
  // This is a performance optimization for WindowScroller + Grid
47245
47230
  return Object.hasOwnProperty.call(props, 'isScrolling') ? Boolean(props.isScrolling) : Boolean(state.isScrolling);
@@ -47259,13 +47244,14 @@ function (_React$PureComponent) {
47259
47244
  }
47260
47245
  }, {
47261
47246
  key: "scrollToPosition",
47247
+ value:
47262
47248
  /**
47263
47249
  * Scroll to the specified offset(s).
47264
47250
  * Useful for animating position changes.
47265
47251
  */
47266
- value: function scrollToPosition(_ref8) {
47267
- var scrollLeft = _ref8.scrollLeft,
47268
- scrollTop = _ref8.scrollTop;
47252
+ function scrollToPosition(_ref8 /*:: */) {
47253
+ var scrollLeft = _ref8 /*:: */.scrollLeft,
47254
+ scrollTop = _ref8 /*:: */.scrollTop;
47269
47255
  var stateUpdate = Grid._getScrollToPositionStateUpdate({
47270
47256
  prevState: this.state,
47271
47257
  scrollLeft: scrollLeft,
@@ -47279,19 +47265,15 @@ function (_React$PureComponent) {
47279
47265
  }, {
47280
47266
  key: "_getCalculatedScrollLeft",
47281
47267
  value: function _getCalculatedScrollLeft() {
47282
- var props
47283
- /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
47284
- var state
47285
- /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
47268
+ var props /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
47269
+ var state /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
47286
47270
  return Grid._getCalculatedScrollLeft(props, state);
47287
47271
  }
47288
47272
  }, {
47289
47273
  key: "_updateScrollLeftForScrollToColumn",
47290
47274
  value: function _updateScrollLeftForScrollToColumn() {
47291
- var props
47292
- /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
47293
- var state
47294
- /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
47275
+ var props /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
47276
+ var state /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
47295
47277
  var stateUpdate = Grid._getScrollLeftForScrollToColumnStateUpdate(props, state);
47296
47278
  if (stateUpdate) {
47297
47279
  stateUpdate.needToResetStyleCache = false;
@@ -47301,10 +47283,8 @@ function (_React$PureComponent) {
47301
47283
  }, {
47302
47284
  key: "_getCalculatedScrollTop",
47303
47285
  value: function _getCalculatedScrollTop() {
47304
- var props
47305
- /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
47306
- var state
47307
- /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
47286
+ var props /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
47287
+ var state /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
47308
47288
  return Grid._getCalculatedScrollTop(props, state);
47309
47289
  }
47310
47290
  }, {
@@ -47312,16 +47292,18 @@ function (_React$PureComponent) {
47312
47292
  value: function _resetStyleCache() {
47313
47293
  var styleCache = this._styleCache;
47314
47294
  var cellCache = this._cellCache;
47315
- var isScrollingOptOut = this.props.isScrollingOptOut; // Reset cell and style caches once scrolling stops.
47295
+ var isScrollingOptOut = this.props.isScrollingOptOut;
47296
+
47297
+ // Reset cell and style caches once scrolling stops.
47316
47298
  // This makes Grid simpler to use (since cells commonly change).
47317
47299
  // And it keeps the caches from growing too large.
47318
47300
  // Performance is most sensitive when a user is scrolling.
47319
47301
  // Don't clear visible cells from cellCache if isScrollingOptOut is specified.
47320
47302
  // This keeps the cellCache to a resonable size.
47321
-
47322
47303
  this._cellCache = {};
47323
- this._styleCache = {}; // Copy over the visible cell styles so avoid unnecessary re-render.
47304
+ this._styleCache = {};
47324
47305
 
47306
+ // Copy over the visible cell styles so avoid unnecessary re-render.
47325
47307
  for (var rowIndex = this._rowStartIndex; rowIndex <= this._rowStopIndex; rowIndex++) {
47326
47308
  for (var columnIndex = this._columnStartIndex; columnIndex <= this._columnStopIndex; columnIndex++) {
47327
47309
  var key = "".concat(rowIndex, "-").concat(columnIndex);
@@ -47335,10 +47317,8 @@ function (_React$PureComponent) {
47335
47317
  }, {
47336
47318
  key: "_updateScrollTopForScrollToRow",
47337
47319
  value: function _updateScrollTopForScrollToRow() {
47338
- var props
47339
- /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
47340
- var state
47341
- /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
47320
+ var props /*: Props*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
47321
+ var state /*: State*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
47342
47322
  var stateUpdate = Grid._getScrollTopForScrollToRowStateUpdate(props, state);
47343
47323
  if (stateUpdate) {
47344
47324
  stateUpdate.needToResetStyleCache = false;
@@ -47347,14 +47327,13 @@ function (_React$PureComponent) {
47347
47327
  }
47348
47328
  }], [{
47349
47329
  key: "getDerivedStateFromProps",
47350
- value: function getDerivedStateFromProps(nextProps
47351
- /*: Props*/, prevState
47352
- /*: State*/) /*: $Shape<State>*/
47353
- {
47330
+ value: function getDerivedStateFromProps(nextProps /*: Props*/, prevState /*: State*/) /*: $Shape<State>*/{
47354
47331
  var newState = {};
47355
47332
  if (nextProps.columnCount === 0 && prevState.scrollLeft !== 0 || nextProps.rowCount === 0 && prevState.scrollTop !== 0) {
47356
47333
  newState.scrollLeft = 0;
47357
- newState.scrollTop = 0; // only use scroll{Left,Top} from props if scrollTo{Column,Row} isn't specified
47334
+ newState.scrollTop = 0;
47335
+
47336
+ // only use scroll{Left,Top} from props if scrollTo{Column,Row} isn't specified
47358
47337
  // scrollTo{Column,Row} should override scroll{Left,Top}
47359
47338
  } else if (nextProps.scrollLeft !== prevState.scrollLeft && nextProps.scrollToColumn < 0 || nextProps.scrollTop !== prevState.scrollTop && nextProps.scrollToRow < 0) {
47360
47339
  _extends2(newState, Grid._getScrollToPositionStateUpdate({
@@ -47363,8 +47342,9 @@ function (_React$PureComponent) {
47363
47342
  scrollTop: nextProps.scrollTop
47364
47343
  }));
47365
47344
  }
47366
- var instanceProps = prevState.instanceProps; // Initially we should not clearStyleCache
47345
+ var instanceProps = prevState.instanceProps;
47367
47346
 
47347
+ // Initially we should not clearStyleCache
47368
47348
  newState.needToResetStyleCache = false;
47369
47349
  if (nextProps.columnWidth !== instanceProps.prevColumnWidth || nextProps.rowHeight !== instanceProps.prevRowHeight) {
47370
47350
  // Reset cache. set it to {} in render
@@ -47383,8 +47363,9 @@ function (_React$PureComponent) {
47383
47363
  if (instanceProps.prevColumnCount === 0 || instanceProps.prevRowCount === 0) {
47384
47364
  instanceProps.prevColumnCount = 0;
47385
47365
  instanceProps.prevRowCount = 0;
47386
- } // If scrolling is controlled outside this component, clear cache when scrolling stops
47366
+ }
47387
47367
 
47368
+ // If scrolling is controlled outside this component, clear cache when scrolling stops
47388
47369
  if (nextProps.autoHeight && nextProps.isScrolling === false && instanceProps.prevIsScrolling === true) {
47389
47370
  _extends2(newState, {
47390
47371
  isScrolling: false
@@ -47428,8 +47409,9 @@ function (_React$PureComponent) {
47428
47409
  instanceProps.prevRowCount = nextProps.rowCount;
47429
47410
  instanceProps.prevRowHeight = nextProps.rowHeight;
47430
47411
  instanceProps.prevScrollToColumn = nextProps.scrollToColumn;
47431
- instanceProps.prevScrollToRow = nextProps.scrollToRow; // getting scrollBarSize (moved from componentWillMount)
47412
+ instanceProps.prevScrollToRow = nextProps.scrollToRow;
47432
47413
 
47414
+ // getting scrollBarSize (moved from componentWillMount)
47433
47415
  instanceProps.scrollbarSize = nextProps.getScrollbarSize();
47434
47416
  if (instanceProps.scrollbarSize === undefined) {
47435
47417
  instanceProps.scrollbarSizeMeasured = false;
@@ -47438,33 +47420,30 @@ function (_React$PureComponent) {
47438
47420
  instanceProps.scrollbarSizeMeasured = true;
47439
47421
  }
47440
47422
  newState.instanceProps = instanceProps;
47441
- return Grid_objectSpread({}, newState, {}, maybeStateA, {}, maybeStateB);
47423
+ return Grid_objectSpread(Grid_objectSpread(Grid_objectSpread({}, newState), maybeStateA), maybeStateB);
47442
47424
  }
47443
47425
  }, {
47444
47426
  key: "_getEstimatedColumnSize",
47445
- value: function _getEstimatedColumnSize(props
47446
- /*: Props*/) {
47427
+ value: function _getEstimatedColumnSize(props /*: Props*/) {
47447
47428
  return typeof props.columnWidth === 'number' ? props.columnWidth : props.estimatedColumnSize;
47448
47429
  }
47449
47430
  }, {
47450
47431
  key: "_getEstimatedRowSize",
47451
- value: function _getEstimatedRowSize(props
47452
- /*: Props*/) {
47432
+ value: function _getEstimatedRowSize(props /*: Props*/) {
47453
47433
  return typeof props.rowHeight === 'number' ? props.rowHeight : props.estimatedRowSize;
47454
47434
  }
47455
47435
  }, {
47456
47436
  key: "_getScrollToPositionStateUpdate",
47437
+ value:
47457
47438
  /**
47458
47439
  * Get the updated state after scrolling to
47459
47440
  * scrollLeft and scrollTop
47460
47441
  */
47461
- value: function _getScrollToPositionStateUpdate(_ref9) /*: $Shape<State>*/
47462
- {
47463
- var prevState = _ref9.prevState,
47464
- scrollLeft = _ref9.scrollLeft,
47465
- scrollTop = _ref9.scrollTop;
47466
- var newState
47467
- /*: Object*/ = {
47442
+ function _getScrollToPositionStateUpdate(_ref9 /*:: */) /*: $Shape<State>*/{
47443
+ var prevState = _ref9 /*:: */.prevState,
47444
+ scrollLeft = _ref9 /*:: */.scrollLeft,
47445
+ scrollTop = _ref9 /*:: */.scrollTop;
47446
+ var newState /*: Object*/ = {
47468
47447
  scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED
47469
47448
  };
47470
47449
  if (typeof scrollLeft === 'number' && scrollLeft >= 0) {
@@ -47482,19 +47461,14 @@ function (_React$PureComponent) {
47482
47461
  }
47483
47462
  }, {
47484
47463
  key: "_wrapSizeGetter",
47485
- value: function _wrapSizeGetter(value
47486
- /*: CellSize*/) /*: CellSizeGetter*/
47487
- {
47464
+ value: function _wrapSizeGetter(value /*: CellSize*/) /*: CellSizeGetter*/{
47488
47465
  return typeof value === 'function' ? value : function () {
47489
- return value
47490
- /*: any*/;
47466
+ return value /*: any*/;
47491
47467
  };
47492
47468
  }
47493
47469
  }, {
47494
47470
  key: "_getCalculatedScrollLeft",
47495
- value: function _getCalculatedScrollLeft(nextProps
47496
- /*: Props*/, prevState
47497
- /*: State*/) {
47471
+ value: function _getCalculatedScrollLeft(nextProps /*: Props*/, prevState /*: State*/) {
47498
47472
  var columnCount = nextProps.columnCount,
47499
47473
  height = nextProps.height,
47500
47474
  scrollToAlignment = nextProps.scrollToAlignment,
@@ -47518,10 +47492,7 @@ function (_React$PureComponent) {
47518
47492
  }
47519
47493
  }, {
47520
47494
  key: "_getScrollLeftForScrollToColumnStateUpdate",
47521
- value: function _getScrollLeftForScrollToColumnStateUpdate(nextProps
47522
- /*: Props*/, prevState
47523
- /*: State*/) /*: $Shape<State>*/
47524
- {
47495
+ value: function _getScrollLeftForScrollToColumnStateUpdate(nextProps /*: Props*/, prevState /*: State*/) /*: $Shape<State>*/{
47525
47496
  var scrollLeft = prevState.scrollLeft;
47526
47497
  var calculatedScrollLeft = Grid._getCalculatedScrollLeft(nextProps, prevState);
47527
47498
  if (typeof calculatedScrollLeft === 'number' && calculatedScrollLeft >= 0 && scrollLeft !== calculatedScrollLeft) {
@@ -47535,9 +47506,7 @@ function (_React$PureComponent) {
47535
47506
  }
47536
47507
  }, {
47537
47508
  key: "_getCalculatedScrollTop",
47538
- value: function _getCalculatedScrollTop(nextProps
47539
- /*: Props*/, prevState
47540
- /*: State*/) {
47509
+ value: function _getCalculatedScrollTop(nextProps /*: Props*/, prevState /*: State*/) {
47541
47510
  var height = nextProps.height,
47542
47511
  rowCount = nextProps.rowCount,
47543
47512
  scrollToAlignment = nextProps.scrollToAlignment,
@@ -47561,10 +47530,7 @@ function (_React$PureComponent) {
47561
47530
  }
47562
47531
  }, {
47563
47532
  key: "_getScrollTopForScrollToRowStateUpdate",
47564
- value: function _getScrollTopForScrollToRowStateUpdate(nextProps
47565
- /*: Props*/, prevState
47566
- /*: State*/) /*: $Shape<State>*/
47567
- {
47533
+ value: function _getScrollTopForScrollToRowStateUpdate(nextProps /*: Props*/, prevState /*: State*/) /*: $Shape<State>*/{
47568
47534
  var scrollTop = prevState.scrollTop;
47569
47535
  var calculatedScrollTop = Grid._getCalculatedScrollTop(nextProps, prevState);
47570
47536
  if (typeof calculatedScrollTop === 'number' && calculatedScrollTop >= 0 && scrollTop !== calculatedScrollTop) {
@@ -47577,7 +47543,6 @@ function (_React$PureComponent) {
47577
47543
  return {};
47578
47544
  }
47579
47545
  }]);
47580
- return Grid;
47581
47546
  }(react.PureComponent);
47582
47547
  defineProperty_defineProperty(Grid, "defaultProps", {
47583
47548
  'aria-label': 'grid',
@@ -47615,18 +47580,18 @@ var accessibilityOverscanIndicesGetter_SCROLL_DIRECTION_BACKWARD = (/* unused pu
47615
47580
  var accessibilityOverscanIndicesGetter_SCROLL_DIRECTION_FORWARD = 1;
47616
47581
  var accessibilityOverscanIndicesGetter_SCROLL_DIRECTION_HORIZONTAL = 'horizontal';
47617
47582
  var accessibilityOverscanIndicesGetter_SCROLL_DIRECTION_VERTICAL = 'vertical';
47583
+
47618
47584
  /**
47619
47585
  * Calculates the number of cells to overscan before and after a specified range.
47620
47586
  * This function ensures that overscanning doesn't exceed the available cells.
47621
47587
  */
47622
47588
 
47623
- function accessibilityOverscanIndicesGetter_defaultOverscanIndicesGetter(_ref) /*: OverscanIndices*/
47624
- {
47625
- var cellCount = _ref.cellCount,
47626
- overscanCellsCount = _ref.overscanCellsCount,
47627
- scrollDirection = _ref.scrollDirection,
47628
- startIndex = _ref.startIndex,
47629
- stopIndex = _ref.stopIndex;
47589
+ function accessibilityOverscanIndicesGetter_defaultOverscanIndicesGetter(_ref /*:: */) /*: OverscanIndices*/{
47590
+ var cellCount = _ref /*:: */.cellCount,
47591
+ overscanCellsCount = _ref /*:: */.overscanCellsCount,
47592
+ scrollDirection = _ref /*:: */.scrollDirection,
47593
+ startIndex = _ref /*:: */.startIndex,
47594
+ stopIndex = _ref /*:: */.stopIndex;
47630
47595
  // Make sure we render at least 1 cell extra before and after (except near boundaries)
47631
47596
  // This is necessary in order to support keyboard navigation (TAB/SHIFT+TAB) in some cases
47632
47597
  // For more info see issues #625
@@ -47667,36 +47632,38 @@ function accessibilityOverscanIndicesGetter_defaultOverscanIndicesGetter(_ref) /
47667
47632
 
47668
47633
 
47669
47634
 
47670
-
47671
- function Table_ownKeys(object, enumerableOnly) {
47672
- var keys = Object.keys(object);
47635
+ function Table_ownKeys(e, r) {
47636
+ var t = Object.keys(e);
47673
47637
  if (Object.getOwnPropertySymbols) {
47674
- var symbols = Object.getOwnPropertySymbols(object);
47675
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
47676
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
47677
- });
47678
- keys.push.apply(keys, symbols);
47638
+ var o = Object.getOwnPropertySymbols(e);
47639
+ r && (o = o.filter(function (r) {
47640
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
47641
+ })), t.push.apply(t, o);
47679
47642
  }
47680
- return keys;
47643
+ return t;
47681
47644
  }
47682
- function Table_objectSpread(target) {
47683
- for (var i = 1; i < arguments.length; i++) {
47684
- var source = arguments[i] != null ? arguments[i] : {};
47685
- if (i % 2) {
47686
- Table_ownKeys(source, true).forEach(function (key) {
47687
- defineProperty_defineProperty(target, key, source[key]);
47688
- });
47689
- } else if (Object.getOwnPropertyDescriptors) {
47690
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
47691
- } else {
47692
- Table_ownKeys(source).forEach(function (key) {
47693
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
47694
- });
47695
- }
47645
+ function Table_objectSpread(e) {
47646
+ for (var r = 1; r < arguments.length; r++) {
47647
+ var t = null != arguments[r] ? arguments[r] : {};
47648
+ r % 2 ? Table_ownKeys(Object(t), !0).forEach(function (r) {
47649
+ defineProperty_defineProperty(e, r, t[r]);
47650
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Table_ownKeys(Object(t)).forEach(function (r) {
47651
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
47652
+ });
47696
47653
  }
47697
- return target;
47654
+ return e;
47655
+ }
47656
+ function Table_callSuper(t, o, e) {
47657
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, Table_isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
47658
+ }
47659
+ function Table_isNativeReflectConstruct() {
47660
+ try {
47661
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
47662
+ } catch (t) {}
47663
+ return (Table_isNativeReflectConstruct = function _isNativeReflectConstruct() {
47664
+ return !!t;
47665
+ })();
47698
47666
  }
47699
-
47700
47667
  /*:: import type {CellPosition} from '../Grid';*/
47701
47668
 
47702
47669
 
@@ -47707,35 +47674,35 @@ function Table_objectSpread(target) {
47707
47674
 
47708
47675
 
47709
47676
 
47677
+
47710
47678
  /**
47711
47679
  * Table component with fixed headers and virtualized rows for improved performance with large data sets.
47712
47680
  * This component expects explicit width, height, and padding parameters.
47713
47681
  */
47714
-
47715
- var Table_Table = /*#__PURE__*/
47716
- function (_React$PureComponent) {
47717
- _inherits(Table, _React$PureComponent);
47682
+ var Table_Table = /*#__PURE__*/function (_React$PureComponent) {
47718
47683
  function Table(props) {
47719
47684
  var _this;
47720
47685
  _classCallCheck(this, Table);
47721
- _this = _possibleConstructorReturn(this, _getPrototypeOf(Table).call(this, props));
47686
+ _this = Table_callSuper(this, Table, [props]);
47722
47687
  _this.state = {
47723
47688
  scrollbarWidth: 0
47724
47689
  };
47725
- _this._createColumn = _this._createColumn.bind(_assertThisInitialized(_this));
47726
- _this._createRow = _this._createRow.bind(_assertThisInitialized(_this));
47727
- _this._onScroll = _this._onScroll.bind(_assertThisInitialized(_this));
47728
- _this._onSectionRendered = _this._onSectionRendered.bind(_assertThisInitialized(_this));
47729
- _this._setRef = _this._setRef.bind(_assertThisInitialized(_this));
47690
+ _this._createColumn = _this._createColumn.bind(_this);
47691
+ _this._createRow = _this._createRow.bind(_this);
47692
+ _this._onScroll = _this._onScroll.bind(_this);
47693
+ _this._onSectionRendered = _this._onSectionRendered.bind(_this);
47694
+ _this._setRef = _this._setRef.bind(_this);
47730
47695
  return _this;
47731
47696
  }
47732
- _createClass(Table, [{
47697
+ _inherits(Table, _React$PureComponent);
47698
+ return _createClass(Table, [{
47733
47699
  key: "forceUpdateGrid",
47734
47700
  value: function forceUpdateGrid() {
47735
47701
  if (this.Grid) {
47736
47702
  this.Grid.forceUpdate();
47737
47703
  }
47738
47704
  }
47705
+
47739
47706
  /** See Grid#getOffsetForCell */
47740
47707
  }, {
47741
47708
  key: "getOffsetForRow",
@@ -47752,12 +47719,13 @@ function (_React$PureComponent) {
47752
47719
  }
47753
47720
  return 0;
47754
47721
  }
47722
+
47755
47723
  /** CellMeasurer compatibility */
47756
47724
  }, {
47757
47725
  key: "invalidateCellSizeAfterRender",
47758
- value: function invalidateCellSizeAfterRender(_ref2) {
47759
- var columnIndex = _ref2.columnIndex,
47760
- rowIndex = _ref2.rowIndex;
47726
+ value: function invalidateCellSizeAfterRender(_ref2 /*:: */) {
47727
+ var columnIndex = _ref2 /*:: */.columnIndex,
47728
+ rowIndex = _ref2 /*:: */.rowIndex;
47761
47729
  if (this.Grid) {
47762
47730
  this.Grid.invalidateCellSizeAfterRender({
47763
47731
  rowIndex: rowIndex,
@@ -47765,6 +47733,7 @@ function (_React$PureComponent) {
47765
47733
  });
47766
47734
  }
47767
47735
  }
47736
+
47768
47737
  /** See Grid#measureAllCells */
47769
47738
  }, {
47770
47739
  key: "measureAllRows",
@@ -47773,6 +47742,7 @@ function (_React$PureComponent) {
47773
47742
  this.Grid.measureAllCells();
47774
47743
  }
47775
47744
  }
47745
+
47776
47746
  /** CellMeasurer compatibility */
47777
47747
  }, {
47778
47748
  key: "recomputeGridSize",
@@ -47789,6 +47759,7 @@ function (_React$PureComponent) {
47789
47759
  });
47790
47760
  }
47791
47761
  }
47762
+
47792
47763
  /** See Grid#recomputeGridSize */
47793
47764
  }, {
47794
47765
  key: "recomputeRowHeights",
@@ -47800,6 +47771,7 @@ function (_React$PureComponent) {
47800
47771
  });
47801
47772
  }
47802
47773
  }
47774
+
47803
47775
  /** See Grid#scrollToPosition */
47804
47776
  }, {
47805
47777
  key: "scrollToPosition",
@@ -47811,6 +47783,7 @@ function (_React$PureComponent) {
47811
47783
  });
47812
47784
  }
47813
47785
  }
47786
+
47814
47787
  /** See Grid#scrollToCell */
47815
47788
  }, {
47816
47789
  key: "scrollToRow",
@@ -47873,18 +47846,20 @@ function (_React$PureComponent) {
47873
47846
  }) : rowClassName;
47874
47847
  var rowStyleObject = typeof rowStyle === 'function' ? rowStyle({
47875
47848
  index: -1
47876
- }) : rowStyle; // Precompute and cache column styles before rendering rows and columns to speed things up
47849
+ }) : rowStyle;
47877
47850
 
47851
+ // Precompute and cache column styles before rendering rows and columns to speed things up
47878
47852
  this._cachedColumnStyles = [];
47879
47853
  react.Children.toArray(children).forEach(function (column, index) {
47880
47854
  var flexStyles = _this2._getFlexStyleForColumn(column, column.props.style);
47881
47855
  _this2._cachedColumnStyles[index] = Table_objectSpread({
47882
47856
  overflow: 'hidden'
47883
47857
  }, flexStyles);
47884
- }); // Note that we specify :rowCount, :scrollbarWidth, :sortBy, and :sortDirection as properties on Grid even though these have nothing to do with Grid.
47858
+ });
47859
+
47860
+ // Note that we specify :rowCount, :scrollbarWidth, :sortBy, and :sortDirection as properties on Grid even though these have nothing to do with Grid.
47885
47861
  // This is done because Grid is a pure component and won't update unless its properties or state has changed.
47886
47862
  // Any property that should trigger a re-render of Grid then is specified here to avoid a stale display.
47887
-
47888
47863
  return /*#__PURE__*/react.createElement("div", {
47889
47864
  "aria-label": this.props['aria-label'],
47890
47865
  "aria-labelledby": this.props['aria-labelledby'],
@@ -47920,7 +47895,7 @@ function (_React$PureComponent) {
47920
47895
  role: "rowgroup",
47921
47896
  scrollbarWidth: scrollbarWidth,
47922
47897
  scrollToRow: scrollToIndex,
47923
- style: Table_objectSpread({}, gridStyle, {
47898
+ style: Table_objectSpread(Table_objectSpread({}, gridStyle), {}, {
47924
47899
  overflowX: 'hidden'
47925
47900
  })
47926
47901
  })));
@@ -47966,10 +47941,11 @@ function (_React$PureComponent) {
47966
47941
  });
47967
47942
  };
47968
47943
  var style = this._cachedColumnStyles[columnIndex];
47969
- var title = typeof renderedCell === 'string' ? renderedCell : null; // Avoid using object-spread syntax with multiple objects here,
47944
+ var title = typeof renderedCell === 'string' ? renderedCell : null;
47945
+
47946
+ // Avoid using object-spread syntax with multiple objects here,
47970
47947
  // Since it results in an extra method call to 'babel-runtime/helpers/extends'
47971
47948
  // See PR https://github.com/bvaughn/react-virtualized/pull/942
47972
-
47973
47949
  return /*#__PURE__*/react.createElement("div", {
47974
47950
  "aria-colindex": columnIndex + 1,
47975
47951
  "aria-describedby": id,
@@ -48001,12 +47977,13 @@ function (_React$PureComponent) {
48001
47977
  headerRenderer = _column$props2.headerRenderer,
48002
47978
  headerRole = _column$props2.headerRole,
48003
47979
  id = _column$props2.id,
48004
- label = _column$props2.label;
47980
+ label = _column$props2.label,
47981
+ preventAriaLabel = _column$props2.preventAriaLabel;
48005
47982
  var sortEnabled = !disableSort && sort;
48006
47983
  var classNames = clsx_m('ReactVirtualized__Table__headerColumn', headerClassName, column.props.headerClassName, {
48007
47984
  ReactVirtualized__Table__sortableHeaderColumn: sortEnabled
48008
47985
  });
48009
- var style = this._getFlexStyleForColumn(column, Table_objectSpread({}, headerStyle, {}, column.props.headerStyle));
47986
+ var style = this._getFlexStyleForColumn(column, Table_objectSpread(Table_objectSpread({}, headerStyle), column.props.headerStyle));
48010
47987
  var renderedHeader = headerRenderer({
48011
47988
  columnData: columnData,
48012
47989
  dataKey: dataKey,
@@ -48015,13 +47992,22 @@ function (_React$PureComponent) {
48015
47992
  sortBy: sortBy,
48016
47993
  sortDirection: sortDirection
48017
47994
  });
48018
- var headerOnClick, headerOnKeyDown, headerTabIndex, headerAriaSort, headerAriaLabel;
47995
+ var headerOnClick, headerOnKeyDown, headerTabIndex, headerAriaSort;
47996
+ var headerAriaLabel = preventAriaLabel ? undefined : column.props['aria-label'] || label || dataKey;
48019
47997
  if (sortEnabled || onHeaderClick) {
48020
47998
  // If this is a sortable header, clicking it should update the table data's sorting.
48021
- var isFirstTimeSort = sortBy !== dataKey; // If this is the firstTime sort of this column, use the column default sort order.
48022
- // Otherwise, invert the direction of the sort.
47999
+ var isFirstTimeSort = sortBy !== dataKey;
48023
48000
 
48024
- var newSortDirection = isFirstTimeSort ? defaultSortDirection : sortDirection === Table_SortDirection.DESC ? Table_SortDirection.ASC : Table_SortDirection.DESC;
48001
+ // If this is the firstTime sort of this column, use the column default sort order.
48002
+ // Otherwise, invert the direction of the sort.
48003
+ var newSortDirection;
48004
+ if (isFirstTimeSort) {
48005
+ newSortDirection = defaultSortDirection;
48006
+ } else if (sortDirection === Table_SortDirection.DESC) {
48007
+ newSortDirection = Table_SortDirection.ASC;
48008
+ } else {
48009
+ newSortDirection = Table_SortDirection.DESC;
48010
+ }
48025
48011
  var onClick = function onClick(event) {
48026
48012
  sortEnabled && sort({
48027
48013
  defaultSortDirection: defaultSortDirection,
@@ -48040,7 +48026,6 @@ function (_React$PureComponent) {
48040
48026
  onClick(event);
48041
48027
  }
48042
48028
  };
48043
- headerAriaLabel = column.props['aria-label'] || label || dataKey;
48044
48029
  headerAriaSort = 'none';
48045
48030
  headerTabIndex = 0;
48046
48031
  headerOnClick = onClick;
@@ -48048,10 +48033,11 @@ function (_React$PureComponent) {
48048
48033
  }
48049
48034
  if (sortBy === dataKey) {
48050
48035
  headerAriaSort = sortDirection === Table_SortDirection.ASC ? 'ascending' : 'descending';
48051
- } // Avoid using object-spread syntax with multiple objects here,
48036
+ }
48037
+
48038
+ // Avoid using object-spread syntax with multiple objects here,
48052
48039
  // Since it results in an extra method call to 'babel-runtime/helpers/extends'
48053
48040
  // See PR https://github.com/bvaughn/react-virtualized/pull/942
48054
-
48055
48041
  return /*#__PURE__*/react.createElement("div", {
48056
48042
  "aria-label": headerAriaLabel,
48057
48043
  "aria-sort": headerAriaSort,
@@ -48107,7 +48093,7 @@ function (_React$PureComponent) {
48107
48093
  });
48108
48094
  });
48109
48095
  var className = clsx_m('ReactVirtualized__Table__row', rowClass);
48110
- var flattenedStyle = Table_objectSpread({}, style, {
48096
+ var flattenedStyle = Table_objectSpread(Table_objectSpread({}, style), {}, {
48111
48097
  height: this._getRowHeight(index),
48112
48098
  overflow: 'hidden',
48113
48099
  paddingRight: scrollbarWidth
@@ -48127,6 +48113,7 @@ function (_React$PureComponent) {
48127
48113
  style: flattenedStyle
48128
48114
  });
48129
48115
  }
48116
+
48130
48117
  /**
48131
48118
  * Determines the flex-shrink, flex-grow, and width values for a cell (header or column).
48132
48119
  */
@@ -48135,7 +48122,7 @@ function (_React$PureComponent) {
48135
48122
  value: function _getFlexStyleForColumn(column) {
48136
48123
  var customStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
48137
48124
  var flexValue = "".concat(column.props.flexGrow, " ").concat(column.props.flexShrink, " ").concat(column.props.width, "px");
48138
- var style = Table_objectSpread({}, customStyle, {
48125
+ var style = Table_objectSpread(Table_objectSpread({}, customStyle), {}, {
48139
48126
  flex: flexValue,
48140
48127
  msFlex: flexValue,
48141
48128
  WebkitFlex: flexValue
@@ -48213,7 +48200,6 @@ function (_React$PureComponent) {
48213
48200
  });
48214
48201
  }
48215
48202
  }]);
48216
- return Table;
48217
48203
  }(react.PureComponent);
48218
48204
  defineProperty_defineProperty(Table_Table, "defaultProps", {
48219
48205
  disableHeader: false,
@@ -48268,6 +48254,7 @@ Table_Table.propTypes = false ? 0 : {};
48268
48254
  * 4) Add nonce for style element.
48269
48255
  * 5) Added support for injecting custom window object
48270
48256
  **/
48257
+
48271
48258
  function createDetectElementResize(nonce, hostWindow) {
48272
48259
  // Check `document` and `window` in case of server-side rendering
48273
48260
  var _window;
@@ -48331,8 +48318,8 @@ function createDetectElementResize(nonce, hostWindow) {
48331
48318
  }
48332
48319
  });
48333
48320
  };
48334
- /* Detect CSS Animations support to detect element display/re-attach */
48335
48321
 
48322
+ /* Detect CSS Animations support to detect element display/re-attach */
48336
48323
  var animation = false,
48337
48324
  keyframeprefix = '',
48338
48325
  animationstartevent = 'animationstart',
@@ -48403,8 +48390,8 @@ function createDetectElementResize(nonce, hostWindow) {
48403
48390
  element.appendChild(element.__resizeTriggers__);
48404
48391
  resetTriggers(element);
48405
48392
  element.addEventListener('scroll', scrollListener, true);
48406
- /* Listen for a css animation to detect element display/re-attach */
48407
48393
 
48394
+ /* Listen for a css animation to detect element display/re-attach */
48408
48395
  if (animationstartevent) {
48409
48396
  element.__resizeTriggers__.__animationListener__ = function animationListener(e) {
48410
48397
  if (e.animationName == animationName) {
@@ -48430,7 +48417,8 @@ function createDetectElementResize(nonce, hostWindow) {
48430
48417
  }
48431
48418
  try {
48432
48419
  element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
48433
- } catch (e) {// Preact compat; see developit/preact-compat/issues/228
48420
+ } catch (e) {
48421
+ // Preact compat; see developit/preact-compat/issues/228
48434
48422
  }
48435
48423
  }
48436
48424
  }
@@ -48447,34 +48435,37 @@ function createDetectElementResize(nonce, hostWindow) {
48447
48435
 
48448
48436
 
48449
48437
 
48450
-
48451
- function AutoSizer_ownKeys(object, enumerableOnly) {
48452
- var keys = Object.keys(object);
48438
+ function AutoSizer_ownKeys(e, r) {
48439
+ var t = Object.keys(e);
48453
48440
  if (Object.getOwnPropertySymbols) {
48454
- var symbols = Object.getOwnPropertySymbols(object);
48455
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
48456
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
48457
- });
48458
- keys.push.apply(keys, symbols);
48441
+ var o = Object.getOwnPropertySymbols(e);
48442
+ r && (o = o.filter(function (r) {
48443
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
48444
+ })), t.push.apply(t, o);
48459
48445
  }
48460
- return keys;
48446
+ return t;
48461
48447
  }
48462
- function AutoSizer_objectSpread(target) {
48463
- for (var i = 1; i < arguments.length; i++) {
48464
- var source = arguments[i] != null ? arguments[i] : {};
48465
- if (i % 2) {
48466
- AutoSizer_ownKeys(source, true).forEach(function (key) {
48467
- defineProperty_defineProperty(target, key, source[key]);
48468
- });
48469
- } else if (Object.getOwnPropertyDescriptors) {
48470
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
48471
- } else {
48472
- AutoSizer_ownKeys(source).forEach(function (key) {
48473
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
48474
- });
48475
- }
48448
+ function AutoSizer_objectSpread(e) {
48449
+ for (var r = 1; r < arguments.length; r++) {
48450
+ var t = null != arguments[r] ? arguments[r] : {};
48451
+ r % 2 ? AutoSizer_ownKeys(Object(t), !0).forEach(function (r) {
48452
+ defineProperty_defineProperty(e, r, t[r]);
48453
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : AutoSizer_ownKeys(Object(t)).forEach(function (r) {
48454
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
48455
+ });
48476
48456
  }
48477
- return target;
48457
+ return e;
48458
+ }
48459
+ function AutoSizer_callSuper(t, o, e) {
48460
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, AutoSizer_isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
48461
+ }
48462
+ function AutoSizer_isNativeReflectConstruct() {
48463
+ try {
48464
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
48465
+ } catch (t) {}
48466
+ return (AutoSizer_isNativeReflectConstruct = function _isNativeReflectConstruct() {
48467
+ return !!t;
48468
+ })();
48478
48469
  }
48479
48470
 
48480
48471
 
@@ -48482,7 +48473,6 @@ function AutoSizer_objectSpread(target) {
48482
48473
  height: number,
48483
48474
  width: number,
48484
48475
  };*/
48485
-
48486
48476
  /*:: type Props = {
48487
48477
  /** Function responsible for rendering children.*-/
48488
48478
  children: Size => React.Element<*>,
@@ -48511,39 +48501,33 @@ function AutoSizer_objectSpread(target) {
48511
48501
  /** Optional inline style *-/
48512
48502
  style: ?Object,
48513
48503
  };*/
48514
-
48515
48504
  /*:: type State = {
48516
48505
  height: number,
48517
48506
  width: number,
48518
48507
  };*/
48519
-
48520
48508
  /*:: type ResizeHandler = (element: HTMLElement, onResize: () => void) => void;*/
48521
-
48522
48509
  /*:: type DetectElementResize = {
48523
48510
  addResizeListener: ResizeHandler,
48524
48511
  removeResizeListener: ResizeHandler,
48525
48512
  };*/
48526
-
48527
- var AutoSizer = /*#__PURE__*/
48528
- function (_React$Component) {
48529
- _inherits(AutoSizer, _React$Component);
48513
+ var AutoSizer = /*#__PURE__*/function (_React$Component) {
48530
48514
  function AutoSizer() {
48531
- var _getPrototypeOf2;
48532
48515
  var _this;
48533
48516
  _classCallCheck(this, AutoSizer);
48534
48517
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
48535
48518
  args[_key] = arguments[_key];
48536
48519
  }
48537
- _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(AutoSizer)).call.apply(_getPrototypeOf2, [this].concat(args)));
48538
- defineProperty_defineProperty(_assertThisInitialized(_this), "state", {
48520
+ _this = AutoSizer_callSuper(this, AutoSizer, [].concat(args));
48521
+ defineProperty_defineProperty(_this, "state", {
48539
48522
  height: _this.props.defaultHeight || 0,
48540
48523
  width: _this.props.defaultWidth || 0
48541
48524
  });
48542
- defineProperty_defineProperty(_assertThisInitialized(_this), "_parentNode", void 0);
48543
- defineProperty_defineProperty(_assertThisInitialized(_this), "_autoSizer", void 0);
48544
- defineProperty_defineProperty(_assertThisInitialized(_this), "_window", void 0);
48545
- defineProperty_defineProperty(_assertThisInitialized(_this), "_detectElementResize", void 0);
48546
- defineProperty_defineProperty(_assertThisInitialized(_this), "_onResize", function () {
48525
+ defineProperty_defineProperty(_this, "_parentNode", void 0);
48526
+ defineProperty_defineProperty(_this, "_autoSizer", void 0);
48527
+ defineProperty_defineProperty(_this, "_window", void 0);
48528
+ // uses any instead of Window because Flow doesn't have window type
48529
+ defineProperty_defineProperty(_this, "_detectElementResize", void 0);
48530
+ defineProperty_defineProperty(_this, "_onResize", function () {
48547
48531
  var _this$props = _this.props,
48548
48532
  disableHeight = _this$props.disableHeight,
48549
48533
  disableWidth = _this$props.disableWidth,
@@ -48552,6 +48536,7 @@ function (_React$Component) {
48552
48536
  // Guard against AutoSizer component being removed from the DOM immediately after being added.
48553
48537
  // This can result in invalid style values which can result in NaN values if we don't handle them.
48554
48538
  // See issue #150 for more context.
48539
+
48555
48540
  var height = _this._parentNode.offsetHeight || 0;
48556
48541
  var width = _this._parentNode.offsetWidth || 0;
48557
48542
  var win = _this._window || window;
@@ -48574,13 +48559,13 @@ function (_React$Component) {
48574
48559
  }
48575
48560
  }
48576
48561
  });
48577
- defineProperty_defineProperty(_assertThisInitialized(_this), "_setRef", function (autoSizer
48578
- /*: ?HTMLElement*/) {
48562
+ defineProperty_defineProperty(_this, "_setRef", function (autoSizer /*: ?HTMLElement*/) {
48579
48563
  _this._autoSizer = autoSizer;
48580
48564
  });
48581
48565
  return _this;
48582
48566
  }
48583
- _createClass(AutoSizer, [{
48567
+ _inherits(AutoSizer, _React$Component);
48568
+ return _createClass(AutoSizer, [{
48584
48569
  key: "componentDidMount",
48585
48570
  value: function componentDidMount() {
48586
48571
  var nonce = this.props.nonce;
@@ -48589,9 +48574,10 @@ function (_React$Component) {
48589
48574
  // This handles edge-cases where the component has already been unmounted before its ref has been set,
48590
48575
  // As well as libraries like react-lite which have a slightly different lifecycle.
48591
48576
  this._parentNode = this._autoSizer.parentNode;
48592
- this._window = this._autoSizer.parentNode.ownerDocument.defaultView; // Defer requiring resize handler in order to support server-side rendering.
48593
- // See issue #41
48577
+ this._window = this._autoSizer.parentNode.ownerDocument.defaultView;
48594
48578
 
48579
+ // Defer requiring resize handler in order to support server-side rendering.
48580
+ // See issue #41
48595
48581
  this._detectElementResize = createDetectElementResize(nonce, this._window);
48596
48582
  this._detectElementResize.addResizeListener(this._parentNode, this._onResize);
48597
48583
  this._onResize();
@@ -48615,16 +48601,15 @@ function (_React$Component) {
48615
48601
  style = _this$props2.style;
48616
48602
  var _this$state = this.state,
48617
48603
  height = _this$state.height,
48618
- width = _this$state.width; // Outer div should not force width/height since that may prevent containers from shrinking.
48604
+ width = _this$state.width;
48605
+
48606
+ // Outer div should not force width/height since that may prevent containers from shrinking.
48619
48607
  // Inner component should overflow and use calculated width/height.
48620
48608
  // See issue #68 for more information.
48621
-
48622
- var outerStyle
48623
- /*: Object*/ = {
48609
+ var outerStyle /*: Object*/ = {
48624
48610
  overflow: 'visible'
48625
48611
  };
48626
- var childParams
48627
- /*: Object*/ = {};
48612
+ var childParams /*: Object*/ = {};
48628
48613
  if (!disableHeight) {
48629
48614
  outerStyle.height = 0;
48630
48615
  childParams.height = height;
@@ -48633,6 +48618,7 @@ function (_React$Component) {
48633
48618
  outerStyle.width = 0;
48634
48619
  childParams.width = width;
48635
48620
  }
48621
+
48636
48622
  /**
48637
48623
  * TODO: Avoid rendering children before the initial measurements have been collected.
48638
48624
  * At best this would just be wasting cycles.
@@ -48649,11 +48635,10 @@ function (_React$Component) {
48649
48635
  return /*#__PURE__*/react.createElement("div", {
48650
48636
  className: className,
48651
48637
  ref: this._setRef,
48652
- style: AutoSizer_objectSpread({}, outerStyle, {}, style)
48638
+ style: AutoSizer_objectSpread(AutoSizer_objectSpread({}, outerStyle), style)
48653
48639
  }, children(childParams));
48654
48640
  }
48655
48641
  }]);
48656
- return AutoSizer;
48657
48642
  }(react.Component);
48658
48643
  defineProperty_defineProperty(AutoSizer, "defaultProps", {
48659
48644
  onResize: function onResize() {},