node_modules/react-select/.publish/app.js
/**
 * Returns all of the ranges within a larger range that contain unloaded rows.
 */
Returns all of the ranges within a larger range that contain unloaded rows.
Returns all of the ranges within a larger range that contain unloaded rows .
function scanForUnloadedRanges(_ref3) {
  var isRowLoaded = _ref3.isRowLoaded;
  var minimumBatchSize = _ref3.minimumBatchSize;
  var rowsCount = _ref3.rowsCount;
  var startIndex = _ref3.startIndex;
  var stopIndex = _ref3.stopIndex;
  var unloadedRanges = [];
  var rangeStartIndex = null;
  var rangeStopIndex = null;
  for (var i = startIndex; i <= stopIndex; i++) {
    var loaded = isRowLoaded(i);
    if (!loaded) {
      rangeStopIndex = i;
      if (rangeStartIndex === null) {
        rangeStartIndex = i;
      }
    } else if (rangeStopIndex !== null) {
      unloadedRanges.push({
        startIndex: rangeStartIndex,
        stopIndex: rangeStopIndex
      });
      rangeStartIndex = rangeStopIndex = null;
    }
  }
  if (rangeStopIndex !== null) {
    var potentialStopIndex = Math.min(Math.max(rangeStopIndex, rangeStartIndex + minimumBatchSize - 1), rowsCount - 1);
    for (var i = rangeStopIndex + 1; i <= potentialStopIndex; i++) {
      if (!isRowLoaded(i)) {
        rangeStopIndex = i;
      } else {
        break;
      }
    }
    unloadedRanges.push({
      startIndex: rangeStartIndex,
      stopIndex: rangeStopIndex
    });
  }
  return unloadedRanges;
}
function scanForUnloadedRanges ( _ref3 ) { var isRowLoaded = _ref3 . isRowLoaded ; var minimumBatchSize = _ref3 . minimumBatchSize ; var rowsCount = _ref3 . rowsCount ; var startIndex = _ref3 . startIndex ; var stopIndex = _ref3 . stopIndex ; var unloadedRanges = [ ] ; var rangeStartIndex = null ; var rangeStopIndex = null ; for ( var i = startIndex ; i <= stopIndex ; i ++ ) { var loaded = isRowLoaded ( i ) ; if ( ! loaded ) { rangeStopIndex = i ; if ( rangeStartIndex === null ) { rangeStartIndex = i ; } } else if ( rangeStopIndex !== null ) { unloadedRanges . push ( { startIndex : rangeStartIndex , stopIndex : rangeStopIndex } ) ; rangeStartIndex = rangeStopIndex = null ; } } if ( rangeStopIndex !== null ) { var potentialStopIndex = Math . min ( Math . max ( rangeStopIndex , rangeStartIndex + minimumBatchSize - 1 ) , rowsCount - 1 ) ; for ( var i = rangeStopIndex + 1 ; i <= potentialStopIndex ; i ++ ) { if ( ! isRowLoaded ( i ) ) { rangeStopIndex = i ; } else { break ; } } unloadedRanges . push ( { startIndex : rangeStartIndex , stopIndex : rangeStopIndex } ) ; } return unloadedRanges ; }
Returns all of the ranges within a larger range that contain unloaded rows.
Returns all of the ranges within a larger range that contain unloaded rows .
// Attempt to satisfy :minimumBatchSize requirement but don't exceed :rowsCount