Files
2017-05-10 16:33:00 +08:00

6476 lines
366 KiB
JavaScript

!function(root, factory) {
"object" == typeof exports && "object" == typeof module ? module.exports = factory(require("React"), require("ReactDOM")) : "function" == typeof define && define.amd ? define([ "React", "ReactDOM" ], factory) : "object" == typeof exports ? exports.ReactVirtualized = factory(require("React"), require("ReactDOM")) : root.ReactVirtualized = factory(root.React, root.ReactDOM);
}(this, function(__WEBPACK_EXTERNAL_MODULE_97__, __WEBPACK_EXTERNAL_MODULE_103__) {
/******/
return function(modules) {
/******/
/******/
// The require function
/******/
function __webpack_require__(moduleId) {
/******/
/******/
// Check if module is in cache
/******/
if (installedModules[moduleId]) /******/
return installedModules[moduleId].exports;
/******/
/******/
// Create a new module (and put it into the cache)
/******/
var module = installedModules[moduleId] = {
/******/
exports: {},
/******/
id: moduleId,
/******/
loaded: !1
};
/******/
/******/
// Return the exports of the module
/******/
/******/
/******/
// Execute the module function
/******/
/******/
/******/
// Flag the module as loaded
/******/
return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__),
module.loaded = !0, module.exports;
}
// webpackBootstrap
/******/
// The module cache
/******/
var installedModules = {};
/******/
/******/
// Load entry module and return exports
/******/
/******/
/******/
/******/
// expose the modules object (__webpack_modules__)
/******/
/******/
/******/
// expose the module cache
/******/
/******/
/******/
// __webpack_public_path__
/******/
return __webpack_require__.m = modules, __webpack_require__.c = installedModules,
__webpack_require__.p = "", __webpack_require__(0);
}([ /* 0 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _ArrowKeyStepper = __webpack_require__(1);
Object.defineProperty(exports, "ArrowKeyStepper", {
enumerable: !0,
get: function() {
return _ArrowKeyStepper.ArrowKeyStepper;
}
});
var _AutoSizer = __webpack_require__(98);
Object.defineProperty(exports, "AutoSizer", {
enumerable: !0,
get: function() {
return _AutoSizer.AutoSizer;
}
});
var _CellMeasurer = __webpack_require__(101);
Object.defineProperty(exports, "CellMeasurer", {
enumerable: !0,
get: function() {
return _CellMeasurer.CellMeasurer;
}
}), Object.defineProperty(exports, "CellMeasurerCache", {
enumerable: !0,
get: function() {
return _CellMeasurer.CellMeasurerCache;
}
});
var _Collection = __webpack_require__(105);
Object.defineProperty(exports, "Collection", {
enumerable: !0,
get: function() {
return _Collection.Collection;
}
});
var _ColumnSizer = __webpack_require__(125);
Object.defineProperty(exports, "ColumnSizer", {
enumerable: !0,
get: function() {
return _ColumnSizer.ColumnSizer;
}
});
var _Grid = __webpack_require__(127);
Object.defineProperty(exports, "accessibilityOverscanIndicesGetter", {
enumerable: !0,
get: function() {
return _Grid.accessibilityOverscanIndicesGetter;
}
}), Object.defineProperty(exports, "defaultCellRangeRenderer", {
enumerable: !0,
get: function() {
return _Grid.defaultCellRangeRenderer;
}
}), Object.defineProperty(exports, "defaultOverscanIndicesGetter", {
enumerable: !0,
get: function() {
return _Grid.defaultOverscanIndicesGetter;
}
}), Object.defineProperty(exports, "Grid", {
enumerable: !0,
get: function() {
return _Grid.Grid;
}
});
var _InfiniteLoader = __webpack_require__(136);
Object.defineProperty(exports, "InfiniteLoader", {
enumerable: !0,
get: function() {
return _InfiniteLoader.InfiniteLoader;
}
});
var _List = __webpack_require__(138);
Object.defineProperty(exports, "List", {
enumerable: !0,
get: function() {
return _List.List;
}
});
var _Masonry = __webpack_require__(143);
Object.defineProperty(exports, "createMasonryCellPositioner", {
enumerable: !0,
get: function() {
return _Masonry.createCellPositioner;
}
}), Object.defineProperty(exports, "Masonry", {
enumerable: !0,
get: function() {
return _Masonry.Masonry;
}
});
var _MultiGrid = __webpack_require__(158);
Object.defineProperty(exports, "MultiGrid", {
enumerable: !0,
get: function() {
return _MultiGrid.MultiGrid;
}
});
var _ScrollSync = __webpack_require__(161);
Object.defineProperty(exports, "ScrollSync", {
enumerable: !0,
get: function() {
return _ScrollSync.ScrollSync;
}
});
var _Table = __webpack_require__(163);
Object.defineProperty(exports, "defaultTableCellDataGetter", {
enumerable: !0,
get: function() {
return _Table.defaultCellDataGetter;
}
}), Object.defineProperty(exports, "defaultTableCellRenderer", {
enumerable: !0,
get: function() {
return _Table.defaultCellRenderer;
}
}), Object.defineProperty(exports, "defaultTableHeaderRenderer", {
enumerable: !0,
get: function() {
return _Table.defaultHeaderRenderer;
}
}), Object.defineProperty(exports, "defaultTableHeaderRowRenderer", {
enumerable: !0,
get: function() {
return _Table.defaultHeaderRowRenderer;
}
}), Object.defineProperty(exports, "defaultTableRowRenderer", {
enumerable: !0,
get: function() {
return _Table.defaultRowRenderer;
}
}), Object.defineProperty(exports, "Table", {
enumerable: !0,
get: function() {
return _Table.Table;
}
}), Object.defineProperty(exports, "Column", {
enumerable: !0,
get: function() {
return _Table.Column;
}
}), Object.defineProperty(exports, "SortDirection", {
enumerable: !0,
get: function() {
return _Table.SortDirection;
}
}), Object.defineProperty(exports, "SortIndicator", {
enumerable: !0,
get: function() {
return _Table.SortIndicator;
}
});
var _WindowScroller = __webpack_require__(173);
Object.defineProperty(exports, "WindowScroller", {
enumerable: !0,
get: function() {
return _WindowScroller.WindowScroller;
}
});
}, /* 1 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.ArrowKeyStepper = exports.default = void 0;
var _ArrowKeyStepper2 = __webpack_require__(2), _ArrowKeyStepper3 = _interopRequireDefault(_ArrowKeyStepper2);
exports.default = _ArrowKeyStepper3.default, exports.ArrowKeyStepper = _ArrowKeyStepper3.default;
}, /* 2 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(89), _react = (_interopRequireDefault(_propTypes),
__webpack_require__(97)), _react2 = _interopRequireDefault(_react), ArrowKeyStepper = function(_PureComponent) {
function ArrowKeyStepper(props, context) {
(0, _classCallCheck3.default)(this, ArrowKeyStepper);
var _this = (0, _possibleConstructorReturn3.default)(this, (ArrowKeyStepper.__proto__ || (0,
_getPrototypeOf2.default)(ArrowKeyStepper)).call(this, props, context));
return _this.state = {
scrollToColumn: props.scrollToColumn,
scrollToRow: props.scrollToRow
}, _this._columnStartIndex = 0, _this._columnStopIndex = 0, _this._rowStartIndex = 0,
_this._rowStopIndex = 0, _this._onKeyDown = _this._onKeyDown.bind(_this), _this._onSectionRendered = _this._onSectionRendered.bind(_this),
_this;
}
return (0, _inherits3.default)(ArrowKeyStepper, _PureComponent), (0, _createClass3.default)(ArrowKeyStepper, [ {
key: "componentWillReceiveProps",
value: function(nextProps) {
var scrollToColumn = nextProps.scrollToColumn, scrollToRow = nextProps.scrollToRow, _props = this.props, prevScrollToColumn = _props.scrollToColumn, prevScrollToRow = _props.scrollToRow;
prevScrollToColumn !== scrollToColumn && prevScrollToRow !== scrollToRow ? this.setState({
scrollToColumn: scrollToColumn,
scrollToRow: scrollToRow
}) : prevScrollToColumn !== scrollToColumn ? this.setState({
scrollToColumn: scrollToColumn
}) : prevScrollToRow !== scrollToRow && this.setState({
scrollToRow: scrollToRow
});
}
}, {
key: "setScrollIndexes",
value: function(_ref) {
var scrollToColumn = _ref.scrollToColumn, scrollToRow = _ref.scrollToRow;
this.setState({
scrollToRow: scrollToRow,
scrollToColumn: scrollToColumn
});
}
}, {
key: "render",
value: function() {
var _props2 = this.props, className = _props2.className, children = _props2.children, _state = this.state, scrollToColumn = _state.scrollToColumn, scrollToRow = _state.scrollToRow;
return _react2.default.createElement("div", {
className: className,
onKeyDown: this._onKeyDown
}, children({
onSectionRendered: this._onSectionRendered,
scrollToColumn: scrollToColumn,
scrollToRow: scrollToRow
}));
}
}, {
key: "_onKeyDown",
value: function(event) {
var _props3 = this.props, columnCount = _props3.columnCount, disabled = _props3.disabled, mode = _props3.mode, rowCount = _props3.rowCount;
if (!disabled) {
var _state2 = this.state, scrollToColumnPrevious = _state2.scrollToColumn, scrollToRowPrevious = _state2.scrollToRow, _state3 = this.state, scrollToColumn = _state3.scrollToColumn, scrollToRow = _state3.scrollToRow;
switch (event.key) {
case "ArrowDown":
scrollToRow = "cells" === mode ? Math.min(scrollToRow + 1, rowCount - 1) : Math.min(this._rowStopIndex + 1, rowCount - 1);
break;
case "ArrowLeft":
scrollToColumn = "cells" === mode ? Math.max(scrollToColumn - 1, 0) : Math.max(this._columnStartIndex - 1, 0);
break;
case "ArrowRight":
scrollToColumn = "cells" === mode ? Math.min(scrollToColumn + 1, columnCount - 1) : Math.min(this._columnStopIndex + 1, columnCount - 1);
break;
case "ArrowUp":
scrollToRow = "cells" === mode ? Math.max(scrollToRow - 1, 0) : Math.max(this._rowStartIndex - 1, 0);
}
scrollToColumn === scrollToColumnPrevious && scrollToRow === scrollToRowPrevious || (event.preventDefault(),
this.setState({
scrollToColumn: scrollToColumn,
scrollToRow: scrollToRow
}));
}
}
}, {
key: "_onSectionRendered",
value: function(_ref2) {
var columnStartIndex = _ref2.columnStartIndex, columnStopIndex = _ref2.columnStopIndex, rowStartIndex = _ref2.rowStartIndex, rowStopIndex = _ref2.rowStopIndex;
this._columnStartIndex = columnStartIndex, this._columnStopIndex = columnStopIndex,
this._rowStartIndex = rowStartIndex, this._rowStopIndex = rowStopIndex;
}
} ]), ArrowKeyStepper;
}(_react.PureComponent);
ArrowKeyStepper.defaultProps = {
disabled: !1,
mode: "edges",
scrollToColumn: 0,
scrollToRow: 0
}, exports.default = ArrowKeyStepper;
}, /* 3 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(4),
__esModule: !0
};
}, /* 4 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(5), module.exports = __webpack_require__(16).Object.getPrototypeOf;
}, /* 5 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.2.9 Object.getPrototypeOf(O)
var toObject = __webpack_require__(6), $getPrototypeOf = __webpack_require__(8);
__webpack_require__(14)("getPrototypeOf", function() {
return function(it) {
return $getPrototypeOf(toObject(it));
};
});
}, /* 6 */
/***/
function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(7);
module.exports = function(it) {
return Object(defined(it));
};
}, /* 7 */
/***/
function(module, exports) {
// 7.2.1 RequireObjectCoercible(argument)
module.exports = function(it) {
if (void 0 == it) throw TypeError("Can't call method on " + it);
return it;
};
}, /* 8 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(9), toObject = __webpack_require__(6), IE_PROTO = __webpack_require__(10)("IE_PROTO"), ObjectProto = Object.prototype;
module.exports = Object.getPrototypeOf || function(O) {
return O = toObject(O), has(O, IE_PROTO) ? O[IE_PROTO] : "function" == typeof O.constructor && O instanceof O.constructor ? O.constructor.prototype : O instanceof Object ? ObjectProto : null;
};
}, /* 9 */
/***/
function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function(it, key) {
return hasOwnProperty.call(it, key);
};
}, /* 10 */
/***/
function(module, exports, __webpack_require__) {
var shared = __webpack_require__(11)("keys"), uid = __webpack_require__(13);
module.exports = function(key) {
return shared[key] || (shared[key] = uid(key));
};
}, /* 11 */
/***/
function(module, exports, __webpack_require__) {
var global = __webpack_require__(12), SHARED = "__core-js_shared__", store = global[SHARED] || (global[SHARED] = {});
module.exports = function(key) {
return store[key] || (store[key] = {});
};
}, /* 12 */
/***/
function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")();
"number" == typeof __g && (__g = global);
}, /* 13 */
/***/
function(module, exports) {
var id = 0, px = Math.random();
module.exports = function(key) {
return "Symbol(".concat(void 0 === key ? "" : key, ")_", (++id + px).toString(36));
};
}, /* 14 */
/***/
function(module, exports, __webpack_require__) {
// most Object methods by ES6 should accept primitives
var $export = __webpack_require__(15), core = __webpack_require__(16), fails = __webpack_require__(25);
module.exports = function(KEY, exec) {
var fn = (core.Object || {})[KEY] || Object[KEY], exp = {};
exp[KEY] = exec(fn), $export($export.S + $export.F * fails(function() {
fn(1);
}), "Object", exp);
};
}, /* 15 */
/***/
function(module, exports, __webpack_require__) {
var global = __webpack_require__(12), core = __webpack_require__(16), ctx = __webpack_require__(17), hide = __webpack_require__(19), PROTOTYPE = "prototype", $export = function(type, name, source) {
var key, own, out, IS_FORCED = type & $export.F, IS_GLOBAL = type & $export.G, IS_STATIC = type & $export.S, IS_PROTO = type & $export.P, IS_BIND = type & $export.B, IS_WRAP = type & $export.W, exports = IS_GLOBAL ? core : core[name] || (core[name] = {}), expProto = exports[PROTOTYPE], target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
IS_GLOBAL && (source = name);
for (key in source) // contains in native
own = !IS_FORCED && target && void 0 !== target[key], own && key in exports || (// export native or passed
out = own ? target[key] : source[key], // prevent global pollution for namespaces
exports[key] = IS_GLOBAL && "function" != typeof target[key] ? source[key] : IS_BIND && own ? ctx(out, global) : IS_WRAP && target[key] == out ? function(C) {
var F = function(a, b, c) {
if (this instanceof C) {
switch (arguments.length) {
case 0:
return new C();
case 1:
return new C(a);
case 2:
return new C(a, b);
}
return new C(a, b, c);
}
return C.apply(this, arguments);
};
return F[PROTOTYPE] = C[PROTOTYPE], F;
}(out) : IS_PROTO && "function" == typeof out ? ctx(Function.call, out) : out, // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
IS_PROTO && ((exports.virtual || (exports.virtual = {}))[key] = out, // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
type & $export.R && expProto && !expProto[key] && hide(expProto, key, out)));
};
// type bitmap
$export.F = 1, // forced
$export.G = 2, // global
$export.S = 4, // static
$export.P = 8, // proto
$export.B = 16, // bind
$export.W = 32, // wrap
$export.U = 64, // safe
$export.R = 128, // real proto method for `library`
module.exports = $export;
}, /* 16 */
/***/
function(module, exports) {
var core = module.exports = {
version: "2.4.0"
};
"number" == typeof __e && (__e = core);
}, /* 17 */
/***/
function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(18);
module.exports = function(fn, that, length) {
if (aFunction(fn), void 0 === that) return fn;
switch (length) {
case 1:
return function(a) {
return fn.call(that, a);
};
case 2:
return function(a, b) {
return fn.call(that, a, b);
};
case 3:
return function(a, b, c) {
return fn.call(that, a, b, c);
};
}
return function() {
return fn.apply(that, arguments);
};
};
}, /* 18 */
/***/
function(module, exports) {
module.exports = function(it) {
if ("function" != typeof it) throw TypeError(it + " is not a function!");
return it;
};
}, /* 19 */
/***/
function(module, exports, __webpack_require__) {
var dP = __webpack_require__(20), createDesc = __webpack_require__(28);
module.exports = __webpack_require__(24) ? function(object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function(object, key, value) {
return object[key] = value, object;
};
}, /* 20 */
/***/
function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(21), IE8_DOM_DEFINE = __webpack_require__(23), toPrimitive = __webpack_require__(27), dP = Object.defineProperty;
exports.f = __webpack_require__(24) ? Object.defineProperty : function(O, P, Attributes) {
if (anObject(O), P = toPrimitive(P, !0), anObject(Attributes), IE8_DOM_DEFINE) try {
return dP(O, P, Attributes);
} catch (e) {}
if ("get" in Attributes || "set" in Attributes) throw TypeError("Accessors not supported!");
return "value" in Attributes && (O[P] = Attributes.value), O;
};
}, /* 21 */
/***/
function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(22);
module.exports = function(it) {
if (!isObject(it)) throw TypeError(it + " is not an object!");
return it;
};
}, /* 22 */
/***/
function(module, exports) {
module.exports = function(it) {
return "object" == typeof it ? null !== it : "function" == typeof it;
};
}, /* 23 */
/***/
function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(24) && !__webpack_require__(25)(function() {
return 7 != Object.defineProperty(__webpack_require__(26)("div"), "a", {
get: function() {
return 7;
}
}).a;
});
}, /* 24 */
/***/
function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(25)(function() {
return 7 != Object.defineProperty({}, "a", {
get: function() {
return 7;
}
}).a;
});
}, /* 25 */
/***/
function(module, exports) {
module.exports = function(exec) {
try {
return !!exec();
} catch (e) {
return !0;
}
};
}, /* 26 */
/***/
function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(22), document = __webpack_require__(12).document, is = isObject(document) && isObject(document.createElement);
module.exports = function(it) {
return is ? document.createElement(it) : {};
};
}, /* 27 */
/***/
function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(22);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function(it, S) {
if (!isObject(it)) return it;
var fn, val;
if (S && "function" == typeof (fn = it.toString) && !isObject(val = fn.call(it))) return val;
if ("function" == typeof (fn = it.valueOf) && !isObject(val = fn.call(it))) return val;
if (!S && "function" == typeof (fn = it.toString) && !isObject(val = fn.call(it))) return val;
throw TypeError("Can't convert object to primitive value");
};
}, /* 28 */
/***/
function(module, exports) {
module.exports = function(bitmap, value) {
return {
enumerable: !(1 & bitmap),
configurable: !(2 & bitmap),
writable: !(4 & bitmap),
value: value
};
};
}, /* 29 */
/***/
function(module, exports) {
"use strict";
exports.__esModule = !0, exports.default = function(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
};
}, /* 30 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
exports.__esModule = !0;
var _defineProperty = __webpack_require__(31), _defineProperty2 = _interopRequireDefault(_defineProperty);
exports.default = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), (0, _defineProperty2.default)(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}();
}, /* 31 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(32),
__esModule: !0
};
}, /* 32 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(33);
var $Object = __webpack_require__(16).Object;
module.exports = function(it, key, desc) {
return $Object.defineProperty(it, key, desc);
};
}, /* 33 */
/***/
function(module, exports, __webpack_require__) {
var $export = __webpack_require__(15);
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
$export($export.S + $export.F * !__webpack_require__(24), "Object", {
defineProperty: __webpack_require__(20).f
});
}, /* 34 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
exports.__esModule = !0;
var _typeof2 = __webpack_require__(35), _typeof3 = _interopRequireDefault(_typeof2);
exports.default = function(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" !== ("undefined" == typeof call ? "undefined" : (0, _typeof3.default)(call)) && "function" != typeof call ? self : call;
};
}, /* 35 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
exports.__esModule = !0;
var _iterator = __webpack_require__(36), _iterator2 = _interopRequireDefault(_iterator), _symbol = __webpack_require__(65), _symbol2 = _interopRequireDefault(_symbol), _typeof = "function" == typeof _symbol2.default && "symbol" == typeof _iterator2.default ? function(obj) {
return typeof obj;
} : function(obj) {
return obj && "function" == typeof _symbol2.default && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj;
};
exports.default = "function" == typeof _symbol2.default && "symbol" === _typeof(_iterator2.default) ? function(obj) {
return "undefined" == typeof obj ? "undefined" : _typeof(obj);
} : function(obj) {
return obj && "function" == typeof _symbol2.default && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : "undefined" == typeof obj ? "undefined" : _typeof(obj);
};
}, /* 36 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(37),
__esModule: !0
};
}, /* 37 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(38), __webpack_require__(60), module.exports = __webpack_require__(64).f("iterator");
}, /* 38 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
var $at = __webpack_require__(39)(!0);
// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(41)(String, "String", function(iterated) {
this._t = String(iterated), // target
this._i = 0;
}, function() {
var point, O = this._t, index = this._i;
return index >= O.length ? {
value: void 0,
done: !0
} : (point = $at(O, index), this._i += point.length, {
value: point,
done: !1
});
});
}, /* 39 */
/***/
function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(40), defined = __webpack_require__(7);
// true -> String#at
// false -> String#codePointAt
module.exports = function(TO_STRING) {
return function(that, pos) {
var a, b, s = String(defined(that)), i = toInteger(pos), l = s.length;
return i < 0 || i >= l ? TO_STRING ? "" : void 0 : (a = s.charCodeAt(i), a < 55296 || a > 56319 || i + 1 === l || (b = s.charCodeAt(i + 1)) < 56320 || b > 57343 ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 55296 << 10) + (b - 56320) + 65536);
};
};
}, /* 40 */
/***/
function(module, exports) {
// 7.1.4 ToInteger
var ceil = Math.ceil, floor = Math.floor;
module.exports = function(it) {
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
}, /* 41 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__(42), $export = __webpack_require__(15), redefine = __webpack_require__(43), hide = __webpack_require__(19), has = __webpack_require__(9), Iterators = __webpack_require__(44), $iterCreate = __webpack_require__(45), setToStringTag = __webpack_require__(58), getPrototypeOf = __webpack_require__(8), ITERATOR = __webpack_require__(59)("iterator"), BUGGY = !([].keys && "next" in [].keys()), FF_ITERATOR = "@@iterator", KEYS = "keys", VALUES = "values", returnThis = function() {
return this;
};
module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
$iterCreate(Constructor, NAME, next);
var methods, key, IteratorPrototype, getMethod = function(kind) {
if (!BUGGY && kind in proto) return proto[kind];
switch (kind) {
case KEYS:
return function() {
return new Constructor(this, kind);
};
case VALUES:
return function() {
return new Constructor(this, kind);
};
}
return function() {
return new Constructor(this, kind);
};
}, TAG = NAME + " Iterator", DEF_VALUES = DEFAULT == VALUES, VALUES_BUG = !1, proto = Base.prototype, $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT], $default = $native || getMethod(DEFAULT), $entries = DEFAULT ? DEF_VALUES ? getMethod("entries") : $default : void 0, $anyNative = "Array" == NAME ? proto.entries || $native : $native;
if (// Fix native
$anyNative && (IteratorPrototype = getPrototypeOf($anyNative.call(new Base())),
IteratorPrototype !== Object.prototype && (// Set @@toStringTag to native iterators
setToStringTag(IteratorPrototype, TAG, !0), // fix for some old engines
LIBRARY || has(IteratorPrototype, ITERATOR) || hide(IteratorPrototype, ITERATOR, returnThis))),
// fix Array#{values, @@iterator}.name in V8 / FF
DEF_VALUES && $native && $native.name !== VALUES && (VALUES_BUG = !0, $default = function() {
return $native.call(this);
}), // Define iterator
LIBRARY && !FORCED || !BUGGY && !VALUES_BUG && proto[ITERATOR] || hide(proto, ITERATOR, $default),
// Plug for library
Iterators[NAME] = $default, Iterators[TAG] = returnThis, DEFAULT) if (methods = {
values: DEF_VALUES ? $default : getMethod(VALUES),
keys: IS_SET ? $default : getMethod(KEYS),
entries: $entries
}, FORCED) for (key in methods) key in proto || redefine(proto, key, methods[key]); else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
return methods;
};
}, /* 42 */
/***/
function(module, exports) {
module.exports = !0;
}, /* 43 */
/***/
function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(19);
}, /* 44 */
/***/
function(module, exports) {
module.exports = {};
}, /* 45 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
var create = __webpack_require__(46), descriptor = __webpack_require__(28), setToStringTag = __webpack_require__(58), IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(19)(IteratorPrototype, __webpack_require__(59)("iterator"), function() {
return this;
}), module.exports = function(Constructor, NAME, next) {
Constructor.prototype = create(IteratorPrototype, {
next: descriptor(1, next)
}), setToStringTag(Constructor, NAME + " Iterator");
};
}, /* 46 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(21), dPs = __webpack_require__(47), enumBugKeys = __webpack_require__(56), IE_PROTO = __webpack_require__(10)("IE_PROTO"), Empty = function() {}, PROTOTYPE = "prototype", createDict = function() {
// Thrash, waste and sodomy: IE GC bug
var iframeDocument, iframe = __webpack_require__(26)("iframe"), i = enumBugKeys.length, lt = "<", gt = ">";
for (iframe.style.display = "none", __webpack_require__(57).appendChild(iframe),
iframe.src = "javascript:", // eslint-disable-line no-script-url
// createDict = iframe.contentWindow.Object;
// html.removeChild(iframe);
iframeDocument = iframe.contentWindow.document, iframeDocument.open(), iframeDocument.write(lt + "script" + gt + "document.F=Object" + lt + "/script" + gt),
iframeDocument.close(), createDict = iframeDocument.F; i--; ) delete createDict[PROTOTYPE][enumBugKeys[i]];
return createDict();
};
module.exports = Object.create || function(O, Properties) {
var result;
// add "__proto__" for Object.getPrototypeOf polyfill
return null !== O ? (Empty[PROTOTYPE] = anObject(O), result = new Empty(), Empty[PROTOTYPE] = null,
result[IE_PROTO] = O) : result = createDict(), void 0 === Properties ? result : dPs(result, Properties);
};
}, /* 47 */
/***/
function(module, exports, __webpack_require__) {
var dP = __webpack_require__(20), anObject = __webpack_require__(21), getKeys = __webpack_require__(48);
module.exports = __webpack_require__(24) ? Object.defineProperties : function(O, Properties) {
anObject(O);
for (var P, keys = getKeys(Properties), length = keys.length, i = 0; length > i; ) dP.f(O, P = keys[i++], Properties[P]);
return O;
};
}, /* 48 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(49), enumBugKeys = __webpack_require__(56);
module.exports = Object.keys || function(O) {
return $keys(O, enumBugKeys);
};
}, /* 49 */
/***/
function(module, exports, __webpack_require__) {
var has = __webpack_require__(9), toIObject = __webpack_require__(50), arrayIndexOf = __webpack_require__(53)(!1), IE_PROTO = __webpack_require__(10)("IE_PROTO");
module.exports = function(object, names) {
var key, O = toIObject(object), i = 0, result = [];
for (key in O) key != IE_PROTO && has(O, key) && result.push(key);
// Don't enum bug & hidden keys
for (;names.length > i; ) has(O, key = names[i++]) && (~arrayIndexOf(result, key) || result.push(key));
return result;
};
}, /* 50 */
/***/
function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(51), defined = __webpack_require__(7);
module.exports = function(it) {
return IObject(defined(it));
};
}, /* 51 */
/***/
function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(52);
module.exports = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
return "String" == cof(it) ? it.split("") : Object(it);
};
}, /* 52 */
/***/
function(module, exports) {
var toString = {}.toString;
module.exports = function(it) {
return toString.call(it).slice(8, -1);
};
}, /* 53 */
/***/
function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__(50), toLength = __webpack_require__(54), toIndex = __webpack_require__(55);
module.exports = function(IS_INCLUDES) {
return function($this, el, fromIndex) {
var value, O = toIObject($this), length = toLength(O.length), index = toIndex(fromIndex, length);
// Array#includes uses SameValueZero equality algorithm
if (IS_INCLUDES && el != el) {
for (;length > index; ) if (value = O[index++], value != value) return !0;
} else for (;length > index; index++) if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
return !IS_INCLUDES && -1;
};
};
}, /* 54 */
/***/
function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__(40), min = Math.min;
module.exports = function(it) {
return it > 0 ? min(toInteger(it), 9007199254740991) : 0;
};
}, /* 55 */
/***/
function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(40), max = Math.max, min = Math.min;
module.exports = function(index, length) {
return index = toInteger(index), index < 0 ? max(index + length, 0) : min(index, length);
};
}, /* 56 */
/***/
function(module, exports) {
// IE 8- don't enum bug keys
module.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");
}, /* 57 */
/***/
function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(12).document && document.documentElement;
}, /* 58 */
/***/
function(module, exports, __webpack_require__) {
var def = __webpack_require__(20).f, has = __webpack_require__(9), TAG = __webpack_require__(59)("toStringTag");
module.exports = function(it, tag, stat) {
it && !has(it = stat ? it : it.prototype, TAG) && def(it, TAG, {
configurable: !0,
value: tag
});
};
}, /* 59 */
/***/
function(module, exports, __webpack_require__) {
var store = __webpack_require__(11)("wks"), uid = __webpack_require__(13), Symbol = __webpack_require__(12).Symbol, USE_SYMBOL = "function" == typeof Symbol, $exports = module.exports = function(name) {
return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)("Symbol." + name));
};
$exports.store = store;
}, /* 60 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(61);
for (var global = __webpack_require__(12), hide = __webpack_require__(19), Iterators = __webpack_require__(44), TO_STRING_TAG = __webpack_require__(59)("toStringTag"), collections = [ "NodeList", "DOMTokenList", "MediaList", "StyleSheetList", "CSSRuleList" ], i = 0; i < 5; i++) {
var NAME = collections[i], Collection = global[NAME], proto = Collection && Collection.prototype;
proto && !proto[TO_STRING_TAG] && hide(proto, TO_STRING_TAG, NAME), Iterators[NAME] = Iterators.Array;
}
}, /* 61 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
var addToUnscopables = __webpack_require__(62), step = __webpack_require__(63), Iterators = __webpack_require__(44), toIObject = __webpack_require__(50);
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__(41)(Array, "Array", function(iterated, kind) {
this._t = toIObject(iterated), // target
this._i = 0, // next index
this._k = kind;
}, function() {
var O = this._t, kind = this._k, index = this._i++;
return !O || index >= O.length ? (this._t = void 0, step(1)) : "keys" == kind ? step(0, index) : "values" == kind ? step(0, O[index]) : step(0, [ index, O[index] ]);
}, "values"), // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array, addToUnscopables("keys"), addToUnscopables("values"),
addToUnscopables("entries");
}, /* 62 */
/***/
function(module, exports) {
module.exports = function() {};
}, /* 63 */
/***/
function(module, exports) {
module.exports = function(done, value) {
return {
value: value,
done: !!done
};
};
}, /* 64 */
/***/
function(module, exports, __webpack_require__) {
exports.f = __webpack_require__(59);
}, /* 65 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(66),
__esModule: !0
};
}, /* 66 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(67), __webpack_require__(78), __webpack_require__(79), __webpack_require__(80),
module.exports = __webpack_require__(16).Symbol;
}, /* 67 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
// ECMAScript 6 symbols shim
var global = __webpack_require__(12), has = __webpack_require__(9), DESCRIPTORS = __webpack_require__(24), $export = __webpack_require__(15), redefine = __webpack_require__(43), META = __webpack_require__(68).KEY, $fails = __webpack_require__(25), shared = __webpack_require__(11), setToStringTag = __webpack_require__(58), uid = __webpack_require__(13), wks = __webpack_require__(59), wksExt = __webpack_require__(64), wksDefine = __webpack_require__(69), keyOf = __webpack_require__(70), enumKeys = __webpack_require__(71), isArray = __webpack_require__(74), anObject = __webpack_require__(21), toIObject = __webpack_require__(50), toPrimitive = __webpack_require__(27), createDesc = __webpack_require__(28), _create = __webpack_require__(46), gOPNExt = __webpack_require__(75), $GOPD = __webpack_require__(77), $DP = __webpack_require__(20), $keys = __webpack_require__(48), gOPD = $GOPD.f, dP = $DP.f, gOPN = gOPNExt.f, $Symbol = global.Symbol, $JSON = global.JSON, _stringify = $JSON && $JSON.stringify, PROTOTYPE = "prototype", HIDDEN = wks("_hidden"), TO_PRIMITIVE = wks("toPrimitive"), isEnum = {}.propertyIsEnumerable, SymbolRegistry = shared("symbol-registry"), AllSymbols = shared("symbols"), OPSymbols = shared("op-symbols"), ObjectProto = Object[PROTOTYPE], USE_NATIVE = "function" == typeof $Symbol, QObject = global.QObject, setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild, setSymbolDesc = DESCRIPTORS && $fails(function() {
return 7 != _create(dP({}, "a", {
get: function() {
return dP(this, "a", {
value: 7
}).a;
}
})).a;
}) ? function(it, key, D) {
var protoDesc = gOPD(ObjectProto, key);
protoDesc && delete ObjectProto[key], dP(it, key, D), protoDesc && it !== ObjectProto && dP(ObjectProto, key, protoDesc);
} : dP, wrap = function(tag) {
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
return sym._k = tag, sym;
}, isSymbol = USE_NATIVE && "symbol" == typeof $Symbol.iterator ? function(it) {
return "symbol" == typeof it;
} : function(it) {
return it instanceof $Symbol;
}, $defineProperty = function(it, key, D) {
return it === ObjectProto && $defineProperty(OPSymbols, key, D), anObject(it), key = toPrimitive(key, !0),
anObject(D), has(AllSymbols, key) ? (D.enumerable ? (has(it, HIDDEN) && it[HIDDEN][key] && (it[HIDDEN][key] = !1),
D = _create(D, {
enumerable: createDesc(0, !1)
})) : (has(it, HIDDEN) || dP(it, HIDDEN, createDesc(1, {})), it[HIDDEN][key] = !0),
setSymbolDesc(it, key, D)) : dP(it, key, D);
}, $defineProperties = function(it, P) {
anObject(it);
for (var key, keys = enumKeys(P = toIObject(P)), i = 0, l = keys.length; l > i; ) $defineProperty(it, key = keys[i++], P[key]);
return it;
}, $create = function(it, P) {
return void 0 === P ? _create(it) : $defineProperties(_create(it), P);
}, $propertyIsEnumerable = function(key) {
var E = isEnum.call(this, key = toPrimitive(key, !0));
return !(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) && (!(E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]) || E);
}, $getOwnPropertyDescriptor = function(it, key) {
if (it = toIObject(it), key = toPrimitive(key, !0), it !== ObjectProto || !has(AllSymbols, key) || has(OPSymbols, key)) {
var D = gOPD(it, key);
return !D || !has(AllSymbols, key) || has(it, HIDDEN) && it[HIDDEN][key] || (D.enumerable = !0),
D;
}
}, $getOwnPropertyNames = function(it) {
for (var key, names = gOPN(toIObject(it)), result = [], i = 0; names.length > i; ) has(AllSymbols, key = names[i++]) || key == HIDDEN || key == META || result.push(key);
return result;
}, $getOwnPropertySymbols = function(it) {
for (var key, IS_OP = it === ObjectProto, names = gOPN(IS_OP ? OPSymbols : toIObject(it)), result = [], i = 0; names.length > i; ) !has(AllSymbols, key = names[i++]) || IS_OP && !has(ObjectProto, key) || result.push(AllSymbols[key]);
return result;
};
// 19.4.1.1 Symbol([description])
USE_NATIVE || ($Symbol = function() {
if (this instanceof $Symbol) throw TypeError("Symbol is not a constructor!");
var tag = uid(arguments.length > 0 ? arguments[0] : void 0), $set = function(value) {
this === ObjectProto && $set.call(OPSymbols, value), has(this, HIDDEN) && has(this[HIDDEN], tag) && (this[HIDDEN][tag] = !1),
setSymbolDesc(this, tag, createDesc(1, value));
};
return DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
configurable: !0,
set: $set
}), wrap(tag);
}, redefine($Symbol[PROTOTYPE], "toString", function() {
return this._k;
}), $GOPD.f = $getOwnPropertyDescriptor, $DP.f = $defineProperty, __webpack_require__(76).f = gOPNExt.f = $getOwnPropertyNames,
__webpack_require__(73).f = $propertyIsEnumerable, __webpack_require__(72).f = $getOwnPropertySymbols,
DESCRIPTORS && !__webpack_require__(42) && redefine(ObjectProto, "propertyIsEnumerable", $propertyIsEnumerable, !0),
wksExt.f = function(name) {
return wrap(wks(name));
}), $export($export.G + $export.W + $export.F * !USE_NATIVE, {
Symbol: $Symbol
});
for (var symbols = "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), i = 0; symbols.length > i; ) wks(symbols[i++]);
for (var symbols = $keys(wks.store), i = 0; symbols.length > i; ) wksDefine(symbols[i++]);
$export($export.S + $export.F * !USE_NATIVE, "Symbol", {
// 19.4.2.1 Symbol.for(key)
for: function(key) {
return has(SymbolRegistry, key += "") ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key);
},
// 19.4.2.5 Symbol.keyFor(sym)
keyFor: function(key) {
if (isSymbol(key)) return keyOf(SymbolRegistry, key);
throw TypeError(key + " is not a symbol!");
},
useSetter: function() {
setter = !0;
},
useSimple: function() {
setter = !1;
}
}), $export($export.S + $export.F * !USE_NATIVE, "Object", {
// 19.1.2.2 Object.create(O [, Properties])
create: $create,
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
defineProperty: $defineProperty,
// 19.1.2.3 Object.defineProperties(O, Properties)
defineProperties: $defineProperties,
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
// 19.1.2.7 Object.getOwnPropertyNames(O)
getOwnPropertyNames: $getOwnPropertyNames,
// 19.1.2.8 Object.getOwnPropertySymbols(O)
getOwnPropertySymbols: $getOwnPropertySymbols
}), // 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function() {
var S = $Symbol();
// MS Edge converts symbol values to JSON as {}
// WebKit converts symbol values to JSON as null
// V8 throws on boxed symbols
return "[null]" != _stringify([ S ]) || "{}" != _stringify({
a: S
}) || "{}" != _stringify(Object(S));
})), "JSON", {
stringify: function(it) {
if (void 0 !== it && !isSymbol(it)) {
for (// IE8 returns string on undefined
var replacer, $replacer, args = [ it ], i = 1; arguments.length > i; ) args.push(arguments[i++]);
return replacer = args[1], "function" == typeof replacer && ($replacer = replacer),
!$replacer && isArray(replacer) || (replacer = function(key, value) {
if ($replacer && (value = $replacer.call(this, key, value)), !isSymbol(value)) return value;
}), args[1] = replacer, _stringify.apply($JSON, args);
}
}
}), // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(19)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf),
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, "Symbol"), // 20.2.1.9 Math[@@toStringTag]
setToStringTag(Math, "Math", !0), // 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, "JSON", !0);
}, /* 68 */
/***/
function(module, exports, __webpack_require__) {
var META = __webpack_require__(13)("meta"), isObject = __webpack_require__(22), has = __webpack_require__(9), setDesc = __webpack_require__(20).f, id = 0, isExtensible = Object.isExtensible || function() {
return !0;
}, FREEZE = !__webpack_require__(25)(function() {
return isExtensible(Object.preventExtensions({}));
}), setMeta = function(it) {
setDesc(it, META, {
value: {
i: "O" + ++id,
// object ID
w: {}
}
});
}, fastKey = function(it, create) {
// return primitive with prefix
if (!isObject(it)) return "symbol" == typeof it ? it : ("string" == typeof it ? "S" : "P") + it;
if (!has(it, META)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return "F";
// not necessary to add metadata
if (!create) return "E";
// add missing metadata
setMeta(it);
}
return it[META].i;
}, getWeak = function(it, create) {
if (!has(it, META)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return !0;
// not necessary to add metadata
if (!create) return !1;
// add missing metadata
setMeta(it);
}
return it[META].w;
}, onFreeze = function(it) {
return FREEZE && meta.NEED && isExtensible(it) && !has(it, META) && setMeta(it),
it;
}, meta = module.exports = {
KEY: META,
NEED: !1,
fastKey: fastKey,
getWeak: getWeak,
onFreeze: onFreeze
};
}, /* 69 */
/***/
function(module, exports, __webpack_require__) {
var global = __webpack_require__(12), core = __webpack_require__(16), LIBRARY = __webpack_require__(42), wksExt = __webpack_require__(64), defineProperty = __webpack_require__(20).f;
module.exports = function(name) {
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
"_" == name.charAt(0) || name in $Symbol || defineProperty($Symbol, name, {
value: wksExt.f(name)
});
};
}, /* 70 */
/***/
function(module, exports, __webpack_require__) {
var getKeys = __webpack_require__(48), toIObject = __webpack_require__(50);
module.exports = function(object, el) {
for (var key, O = toIObject(object), keys = getKeys(O), length = keys.length, index = 0; length > index; ) if (O[key = keys[index++]] === el) return key;
};
}, /* 71 */
/***/
function(module, exports, __webpack_require__) {
// all enumerable object keys, includes symbols
var getKeys = __webpack_require__(48), gOPS = __webpack_require__(72), pIE = __webpack_require__(73);
module.exports = function(it) {
var result = getKeys(it), getSymbols = gOPS.f;
if (getSymbols) for (var key, symbols = getSymbols(it), isEnum = pIE.f, i = 0; symbols.length > i; ) isEnum.call(it, key = symbols[i++]) && result.push(key);
return result;
};
}, /* 72 */
/***/
function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
}, /* 73 */
/***/
function(module, exports) {
exports.f = {}.propertyIsEnumerable;
}, /* 74 */
/***/
function(module, exports, __webpack_require__) {
// 7.2.2 IsArray(argument)
var cof = __webpack_require__(52);
module.exports = Array.isArray || function(arg) {
return "Array" == cof(arg);
};
}, /* 75 */
/***/
function(module, exports, __webpack_require__) {
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = __webpack_require__(50), gOPN = __webpack_require__(76).f, toString = {}.toString, windowNames = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [], getWindowNames = function(it) {
try {
return gOPN(it);
} catch (e) {
return windowNames.slice();
}
};
module.exports.f = function(it) {
return windowNames && "[object Window]" == toString.call(it) ? getWindowNames(it) : gOPN(toIObject(it));
};
}, /* 76 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__(49), hiddenKeys = __webpack_require__(56).concat("length", "prototype");
exports.f = Object.getOwnPropertyNames || function(O) {
return $keys(O, hiddenKeys);
};
}, /* 77 */
/***/
function(module, exports, __webpack_require__) {
var pIE = __webpack_require__(73), createDesc = __webpack_require__(28), toIObject = __webpack_require__(50), toPrimitive = __webpack_require__(27), has = __webpack_require__(9), IE8_DOM_DEFINE = __webpack_require__(23), gOPD = Object.getOwnPropertyDescriptor;
exports.f = __webpack_require__(24) ? gOPD : function(O, P) {
if (O = toIObject(O), P = toPrimitive(P, !0), IE8_DOM_DEFINE) try {
return gOPD(O, P);
} catch (e) {}
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
};
}, /* 78 */
/***/
function(module, exports) {}, /* 79 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(69)("asyncIterator");
}, /* 80 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(69)("observable");
}, /* 81 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
exports.__esModule = !0;
var _setPrototypeOf = __webpack_require__(82), _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf), _create = __webpack_require__(86), _create2 = _interopRequireDefault(_create), _typeof2 = __webpack_require__(35), _typeof3 = _interopRequireDefault(_typeof2);
exports.default = function(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + ("undefined" == typeof superClass ? "undefined" : (0,
_typeof3.default)(superClass)));
subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (_setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass);
};
}, /* 82 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(83),
__esModule: !0
};
}, /* 83 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(84), module.exports = __webpack_require__(16).Object.setPrototypeOf;
}, /* 84 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = __webpack_require__(15);
$export($export.S, "Object", {
setPrototypeOf: __webpack_require__(85).set
});
}, /* 85 */
/***/
function(module, exports, __webpack_require__) {
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
var isObject = __webpack_require__(22), anObject = __webpack_require__(21), check = function(O, proto) {
if (anObject(O), !isObject(proto) && null !== proto) throw TypeError(proto + ": can't set as prototype!");
};
module.exports = {
set: Object.setPrototypeOf || ("__proto__" in {} ? // eslint-disable-line
function(test, buggy, set) {
try {
set = __webpack_require__(17)(Function.call, __webpack_require__(77).f(Object.prototype, "__proto__").set, 2),
set(test, []), buggy = !(test instanceof Array);
} catch (e) {
buggy = !0;
}
return function(O, proto) {
return check(O, proto), buggy ? O.__proto__ = proto : set(O, proto), O;
};
}({}, !1) : void 0),
check: check
};
}, /* 86 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(87),
__esModule: !0
};
}, /* 87 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(88);
var $Object = __webpack_require__(16).Object;
module.exports = function(P, D) {
return $Object.create(P, D);
};
}, /* 88 */
/***/
function(module, exports, __webpack_require__) {
var $export = __webpack_require__(15);
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
$export($export.S, "Object", {
create: __webpack_require__(46)
});
}, /* 89 */
/***/
function(module, exports, __webpack_require__) {
function isValidElement(object) {
return "object" == typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
}
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var factory = __webpack_require__(90), REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
module.exports = factory(isValidElement);
}, /* 90 */
/***/
function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */
(function(process) {
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
"use strict";
var emptyFunction = __webpack_require__(92), invariant = __webpack_require__(93), warning = __webpack_require__(94), ReactPropTypesSecret = __webpack_require__(95), checkPropTypes = __webpack_require__(96);
module.exports = function(isValidElement) {
// Before Symbol spec.
/**
* Returns the iterator method function contained on the iterable object.
*
* Be sure to invoke the function with the iterable as context:
*
* var iteratorFn = getIteratorFn(myIterable);
* if (iteratorFn) {
* var iterator = iteratorFn.call(myIterable);
* ...
* }
*
* @param {?object} maybeIterable
* @return {?function}
*/
function getIteratorFn(maybeIterable) {
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
if ("function" == typeof iteratorFn) return iteratorFn;
}
/**
* inlined Object.is polyfill to avoid requiring consumers ship their own
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
*/
/*eslint-disable no-self-compare*/
function is(x, y) {
// SameValue algorithm
// SameValue algorithm
return x === y ? 0 !== x || 1 / x === 1 / y : x !== x && y !== y;
}
/*eslint-enable no-self-compare*/
/**
* We use an Error-like object for backward compatibility as people may call
* PropTypes directly and inspect their output. However, we don't use real
* Errors anymore. We don't inspect their stack anyway, and creating them
* is prohibitively expensive if they are created too often, such as what
* happens in oneOfType() for any type before the one that matched.
*/
function PropTypeError(message) {
this.message = message, this.stack = "";
}
function createChainableTypeChecker(validate) {
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
if (componentName = componentName || ANONYMOUS, propFullName = propFullName || propName,
"production" !== process.env.NODE_ENV && secret !== ReactPropTypesSecret && "undefined" != typeof console) {
var cacheKey = componentName + ":" + propName;
manualPropTypeCallCache[cacheKey] || ("production" !== process.env.NODE_ENV ? warning(!1, "You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will not work in production with the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.", propFullName, componentName) : void 0,
manualPropTypeCallCache[cacheKey] = !0);
}
return null == props[propName] ? isRequired ? new PropTypeError(null === props[propName] ? "The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`.") : "The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`.")) : null : validate(props, propName, componentName, location, propFullName);
}
if ("production" !== process.env.NODE_ENV) var manualPropTypeCallCache = {};
var chainedCheckType = checkType.bind(null, !1);
return chainedCheckType.isRequired = checkType.bind(null, !0), chainedCheckType;
}
function createPrimitiveTypeChecker(expectedType) {
function validate(props, propName, componentName, location, propFullName, secret) {
var propValue = props[propName], propType = getPropType(propValue);
if (propType !== expectedType) {
// `propValue` being instance of, say, date/regexp, pass the 'object'
// check, but we can offer a more precise error message here rather than
// 'of type `object`'.
var preciseType = getPreciseType(propValue);
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createAnyTypeChecker() {
return createChainableTypeChecker(emptyFunction.thatReturnsNull);
}
function createArrayOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location, propFullName) {
if ("function" != typeof typeChecker) return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
var propValue = props[propName];
if (!Array.isArray(propValue)) {
var propType = getPropType(propValue);
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
}
for (var i = 0; i < propValue.length; i++) {
var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
if (error instanceof Error) return error;
}
return null;
}
return createChainableTypeChecker(validate);
}
function createElementTypeChecker() {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
if (!isValidElement(propValue)) {
var propType = getPropType(propValue);
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createInstanceTypeChecker(expectedClass) {
function validate(props, propName, componentName, location, propFullName) {
if (!(props[propName] instanceof expectedClass)) {
var expectedClassName = expectedClass.name || ANONYMOUS, actualClassName = getClassName(props[propName]);
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createEnumTypeChecker(expectedValues) {
function validate(props, propName, componentName, location, propFullName) {
for (var propValue = props[propName], i = 0; i < expectedValues.length; i++) if (is(propValue, expectedValues[i])) return null;
var valuesString = JSON.stringify(expectedValues);
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + propValue + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
}
return Array.isArray(expectedValues) ? createChainableTypeChecker(validate) : ("production" !== process.env.NODE_ENV ? warning(!1, "Invalid argument supplied to oneOf, expected an instance of array.") : void 0,
emptyFunction.thatReturnsNull);
}
function createObjectOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location, propFullName) {
if ("function" != typeof typeChecker) return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
var propValue = props[propName], propType = getPropType(propValue);
if ("object" !== propType) return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
for (var key in propValue) if (propValue.hasOwnProperty(key)) {
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
if (error instanceof Error) return error;
}
return null;
}
return createChainableTypeChecker(validate);
}
function createUnionTypeChecker(arrayOfTypeCheckers) {
function validate(props, propName, componentName, location, propFullName) {
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
var checker = arrayOfTypeCheckers[i];
if (null == checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret)) return null;
}
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`."));
}
return Array.isArray(arrayOfTypeCheckers) ? createChainableTypeChecker(validate) : ("production" !== process.env.NODE_ENV ? warning(!1, "Invalid argument supplied to oneOfType, expected an instance of array.") : void 0,
emptyFunction.thatReturnsNull);
}
function createNodeChecker() {
function validate(props, propName, componentName, location, propFullName) {
return isNode(props[propName]) ? null : new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
}
return createChainableTypeChecker(validate);
}
function createShapeTypeChecker(shapeTypes) {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName], propType = getPropType(propValue);
if ("object" !== propType) return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
for (var key in shapeTypes) {
var checker = shapeTypes[key];
if (checker) {
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
if (error) return error;
}
}
return null;
}
return createChainableTypeChecker(validate);
}
function isNode(propValue) {
switch (typeof propValue) {
case "number":
case "string":
case "undefined":
return !0;
case "boolean":
return !propValue;
case "object":
if (Array.isArray(propValue)) return propValue.every(isNode);
if (null === propValue || isValidElement(propValue)) return !0;
var iteratorFn = getIteratorFn(propValue);
if (!iteratorFn) return !1;
var step, iterator = iteratorFn.call(propValue);
if (iteratorFn !== propValue.entries) {
for (;!(step = iterator.next()).done; ) if (!isNode(step.value)) return !1;
} else // Iterator will provide entry [k,v] tuples rather than values.
for (;!(step = iterator.next()).done; ) {
var entry = step.value;
if (entry && !isNode(entry[1])) return !1;
}
return !0;
default:
return !1;
}
}
function isSymbol(propType, propValue) {
// Native Symbol.
// Native Symbol.
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
return "symbol" === propType || ("Symbol" === propValue["@@toStringTag"] || "function" == typeof Symbol && propValue instanceof Symbol);
}
// Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) {
var propType = typeof propValue;
return Array.isArray(propValue) ? "array" : propValue instanceof RegExp ? "object" : isSymbol(propType, propValue) ? "symbol" : propType;
}
// This handles more types than `getPropType`. Only used for error messages.
// See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) {
var propType = getPropType(propValue);
if ("object" === propType) {
if (propValue instanceof Date) return "date";
if (propValue instanceof RegExp) return "regexp";
}
return propType;
}
// Returns class name of the object, if any.
function getClassName(propValue) {
return propValue.constructor && propValue.constructor.name ? propValue.constructor.name : ANONYMOUS;
}
/* global Symbol */
var ReactPropTypes, ITERATOR_SYMBOL = "function" == typeof Symbol && Symbol.iterator, FAUX_ITERATOR_SYMBOL = "@@iterator", ANONYMOUS = "<<anonymous>>";
if ("production" !== process.env.NODE_ENV) // Keep in sync with production version below
ReactPropTypes = {
array: createPrimitiveTypeChecker("array"),
bool: createPrimitiveTypeChecker("boolean"),
func: createPrimitiveTypeChecker("function"),
number: createPrimitiveTypeChecker("number"),
object: createPrimitiveTypeChecker("object"),
string: createPrimitiveTypeChecker("string"),
symbol: createPrimitiveTypeChecker("symbol"),
any: createAnyTypeChecker(),
arrayOf: createArrayOfTypeChecker,
element: createElementTypeChecker(),
instanceOf: createInstanceTypeChecker,
node: createNodeChecker(),
objectOf: createObjectOfTypeChecker,
oneOf: createEnumTypeChecker,
oneOfType: createUnionTypeChecker,
shape: createShapeTypeChecker
}; else {
var productionTypeChecker = function() {
invariant(!1, "React.PropTypes type checking code is stripped in production.");
};
productionTypeChecker.isRequired = productionTypeChecker;
var getProductionTypeChecker = function() {
return productionTypeChecker;
};
// Keep in sync with development version above
ReactPropTypes = {
array: productionTypeChecker,
bool: productionTypeChecker,
func: productionTypeChecker,
number: productionTypeChecker,
object: productionTypeChecker,
string: productionTypeChecker,
symbol: productionTypeChecker,
any: productionTypeChecker,
arrayOf: getProductionTypeChecker,
element: productionTypeChecker,
instanceOf: getProductionTypeChecker,
node: productionTypeChecker,
objectOf: getProductionTypeChecker,
oneOf: getProductionTypeChecker,
oneOfType: getProductionTypeChecker,
shape: getProductionTypeChecker
};
}
// Make `instanceof Error` still work for returned errors.
return PropTypeError.prototype = Error.prototype, ReactPropTypes.checkPropTypes = checkPropTypes,
ReactPropTypes.PropTypes = ReactPropTypes, ReactPropTypes;
};
}).call(exports, __webpack_require__(91));
}, /* 91 */
/***/
function(module, exports) {
function defaultSetTimout() {
throw new Error("setTimeout has not been defined");
}
function defaultClearTimeout() {
throw new Error("clearTimeout has not been defined");
}
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) //normal enviroments in sane situations
return setTimeout(fun, 0);
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) return cachedSetTimeout = setTimeout,
setTimeout(fun, 0);
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch (e) {
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch (e) {
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) //normal enviroments in sane situations
return clearTimeout(marker);
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) return cachedClearTimeout = clearTimeout,
clearTimeout(marker);
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e) {
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e) {
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
function cleanUpNextTick() {
draining && currentQueue && (draining = !1, currentQueue.length ? queue = currentQueue.concat(queue) : queueIndex = -1,
queue.length && drainQueue());
}
function drainQueue() {
if (!draining) {
var timeout = runTimeout(cleanUpNextTick);
draining = !0;
for (var len = queue.length; len; ) {
for (currentQueue = queue, queue = []; ++queueIndex < len; ) currentQueue && currentQueue[queueIndex].run();
queueIndex = -1, len = queue.length;
}
currentQueue = null, draining = !1, runClearTimeout(timeout);
}
}
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun, this.array = array;
}
function noop() {}
// shim for using process in browser
var cachedSetTimeout, cachedClearTimeout, process = module.exports = {};
!function() {
try {
cachedSetTimeout = "function" == typeof setTimeout ? setTimeout : defaultSetTimout;
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
cachedClearTimeout = "function" == typeof clearTimeout ? clearTimeout : defaultClearTimeout;
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
}();
var currentQueue, queue = [], draining = !1, queueIndex = -1;
process.nextTick = function(fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) for (var i = 1; i < arguments.length; i++) args[i - 1] = arguments[i];
queue.push(new Item(fun, args)), 1 !== queue.length || draining || runTimeout(drainQueue);
}, Item.prototype.run = function() {
this.fun.apply(null, this.array);
}, process.title = "browser", process.browser = !0, process.env = {}, process.argv = [],
process.version = "", // empty string to avoid regexp issues
process.versions = {}, process.on = noop, process.addListener = noop, process.once = noop,
process.off = noop, process.removeListener = noop, process.removeAllListeners = noop,
process.emit = noop, process.binding = function(name) {
throw new Error("process.binding is not supported");
}, process.cwd = function() {
return "/";
}, process.chdir = function(dir) {
throw new Error("process.chdir is not supported");
}, process.umask = function() {
return 0;
};
}, /* 92 */
/***/
function(module, exports) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
function makeEmptyFunction(arg) {
return function() {
return arg;
};
}
/**
* This function accepts and discards inputs; it has no side effects. This is
* primarily useful idiomatically for overridable function endpoints which
* always need to be callable, since JS lacks a null-call idiom ala Cocoa.
*/
var emptyFunction = function() {};
emptyFunction.thatReturns = makeEmptyFunction, emptyFunction.thatReturnsFalse = makeEmptyFunction(!1),
emptyFunction.thatReturnsTrue = makeEmptyFunction(!0), emptyFunction.thatReturnsNull = makeEmptyFunction(null),
emptyFunction.thatReturnsThis = function() {
return this;
}, emptyFunction.thatReturnsArgument = function(arg) {
return arg;
}, module.exports = emptyFunction;
}, /* 93 */
/***/
function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */
(function(process) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
"use strict";
function invariant(condition, format, a, b, c, d, e, f) {
if (validateFormat(format), !condition) {
var error;
if (void 0 === format) error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else {
var args = [ a, b, c, d, e, f ], argIndex = 0;
error = new Error(format.replace(/%s/g, function() {
return args[argIndex++];
})), error.name = "Invariant Violation";
}
// we don't care about invariant's own frame
throw error.framesToPop = 1, error;
}
}
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var validateFormat = function(format) {};
"production" !== process.env.NODE_ENV && (validateFormat = function(format) {
if (void 0 === format) throw new Error("invariant requires an error message argument");
}), module.exports = invariant;
}).call(exports, __webpack_require__(91));
}, /* 94 */
/***/
function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */
(function(process) {
/**
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
"use strict";
var emptyFunction = __webpack_require__(92), warning = emptyFunction;
"production" !== process.env.NODE_ENV && !function() {
var printWarning = function(format) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key];
var argIndex = 0, message = "Warning: " + format.replace(/%s/g, function() {
return args[argIndex++];
});
"undefined" != typeof console && console.error(message);
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
};
warning = function(condition, format) {
if (void 0 === format) throw new Error("`warning(condition, format, ...args)` requires a warning message argument");
if (0 !== format.indexOf("Failed Composite propType: ") && !condition) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) args[_key2 - 2] = arguments[_key2];
printWarning.apply(void 0, [ format ].concat(args));
}
};
}(), module.exports = warning;
}).call(exports, __webpack_require__(91));
}, /* 95 */
/***/
function(module, exports) {
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
"use strict";
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
module.exports = ReactPropTypesSecret;
}, /* 96 */
/***/
function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */
(function(process) {
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
"use strict";
/**
* Assert that the values match with the type specs.
* Error messages are memorized and will only be shown once.
*
* @param {object} typeSpecs Map of name to a ReactPropType
* @param {object} values Runtime values that need to be type-checked
* @param {string} location e.g. "prop", "context", "child context"
* @param {string} componentName Name of the component for error messages.
* @param {?Function} getStack Returns the component stack.
* @private
*/
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
if ("production" !== process.env.NODE_ENV) for (var typeSpecName in typeSpecs) if (typeSpecs.hasOwnProperty(typeSpecName)) {
var error;
// Prop type validation may throw. In case they do, we don't want to
// fail the render phase where it didn't fail before. So we log it.
// After these have been cleaned up, we'll let them throw.
try {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
invariant("function" == typeof typeSpecs[typeSpecName], "%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.", componentName || "React class", location, typeSpecName),
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
} catch (ex) {
error = ex;
}
if ("production" !== process.env.NODE_ENV ? warning(!error || error instanceof Error, "%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error) : void 0,
error instanceof Error && !(error.message in loggedTypeFailures)) {
// Only monitor this failure once because there tends to be a lot of the
// same error.
loggedTypeFailures[error.message] = !0;
var stack = getStack ? getStack() : "";
"production" !== process.env.NODE_ENV ? warning(!1, "Failed %s type: %s%s", location, error.message, null != stack ? stack : "") : void 0;
}
}
}
var invariant = __webpack_require__(93), warning = __webpack_require__(94), ReactPropTypesSecret = __webpack_require__(95), loggedTypeFailures = {};
module.exports = checkPropTypes;
}).call(exports, __webpack_require__(91));
}, /* 97 */
/***/
function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_97__;
}, /* 98 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.AutoSizer = exports.default = void 0;
var _AutoSizer2 = __webpack_require__(99), _AutoSizer3 = _interopRequireDefault(_AutoSizer2);
exports.default = _AutoSizer3.default, exports.AutoSizer = _AutoSizer3.default;
}, /* 99 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(89), _react = (_interopRequireDefault(_propTypes),
__webpack_require__(97)), _react2 = _interopRequireDefault(_react), _detectElementResize = __webpack_require__(100), _detectElementResize2 = _interopRequireDefault(_detectElementResize), AutoSizer = function(_PureComponent) {
function AutoSizer(props) {
(0, _classCallCheck3.default)(this, AutoSizer);
var _this = (0, _possibleConstructorReturn3.default)(this, (AutoSizer.__proto__ || (0,
_getPrototypeOf2.default)(AutoSizer)).call(this, props));
return _this.state = {
height: 0,
width: 0
}, _this._onResize = _this._onResize.bind(_this), _this._setRef = _this._setRef.bind(_this),
_this;
}
return (0, _inherits3.default)(AutoSizer, _PureComponent), (0, _createClass3.default)(AutoSizer, [ {
key: "componentDidMount",
value: function() {
var nonce = this.props.nonce;
this._parentNode = this._autoSizer.parentNode, this._detectElementResize = (0, _detectElementResize2.default)(nonce),
this._detectElementResize.addResizeListener(this._parentNode, this._onResize), this._onResize();
}
}, {
key: "componentWillUnmount",
value: function() {
this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);
}
}, {
key: "render",
value: function() {
var _props = this.props, children = _props.children, disableHeight = _props.disableHeight, disableWidth = _props.disableWidth, _state = this.state, height = _state.height, width = _state.width, outerStyle = {
overflow: "visible"
};
return disableHeight || (outerStyle.height = 0), disableWidth || (outerStyle.width = 0),
_react2.default.createElement("div", {
ref: this._setRef,
style: outerStyle
}, children({
height: height,
width: width
}));
}
}, {
key: "_onResize",
value: function() {
var _props2 = this.props, disableHeight = _props2.disableHeight, disableWidth = _props2.disableWidth, onResize = _props2.onResize, height = this._parentNode.offsetHeight || 0, width = this._parentNode.offsetWidth || 0, style = window.getComputedStyle(this._parentNode) || {}, paddingLeft = parseInt(style.paddingLeft, 10) || 0, paddingRight = parseInt(style.paddingRight, 10) || 0, paddingTop = parseInt(style.paddingTop, 10) || 0, paddingBottom = parseInt(style.paddingBottom, 10) || 0, newHeight = height - paddingTop - paddingBottom, newWidth = width - paddingLeft - paddingRight;
(!disableHeight && this.state.height !== newHeight || !disableWidth && this.state.width !== newWidth) && (this.setState({
height: height - paddingTop - paddingBottom,
width: width - paddingLeft - paddingRight
}), onResize({
height: height,
width: width
}));
}
}, {
key: "_setRef",
value: function(autoSizer) {
this._autoSizer = autoSizer;
}
} ]), AutoSizer;
}(_react.PureComponent);
AutoSizer.defaultProps = {
onResize: function() {}
}, exports.default = AutoSizer;
}, /* 100 */
/***/
function(module, exports) {
"use strict";
function createDetectElementResize(nonce) {
var _window;
_window = "undefined" != typeof window ? window : "undefined" != typeof self ? self : this;
var attachEvent = "undefined" != typeof document && document.attachEvent;
if (!attachEvent) {
var requestFrame = function() {
var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame || function(fn) {
return _window.setTimeout(fn, 20);
};
return function(fn) {
return raf(fn);
};
}(), cancelFrame = function() {
var cancel = _window.cancelAnimationFrame || _window.mozCancelAnimationFrame || _window.webkitCancelAnimationFrame || _window.clearTimeout;
return function(id) {
return cancel(id);
};
}(), resetTriggers = function(element) {
var triggers = element.__resizeTriggers__, expand = triggers.firstElementChild, contract = triggers.lastElementChild, expandChild = expand.firstElementChild;
contract.scrollLeft = contract.scrollWidth, contract.scrollTop = contract.scrollHeight,
expandChild.style.width = expand.offsetWidth + 1 + "px", expandChild.style.height = expand.offsetHeight + 1 + "px",
expand.scrollLeft = expand.scrollWidth, expand.scrollTop = expand.scrollHeight;
}, checkTriggers = function(element) {
return element.offsetWidth != element.__resizeLast__.width || element.offsetHeight != element.__resizeLast__.height;
}, scrollListener = function(e) {
if (!(e.target.className.indexOf("contract-trigger") < 0 && e.target.className.indexOf("expand-trigger") < 0)) {
var element = this;
resetTriggers(this), this.__resizeRAF__ && cancelFrame(this.__resizeRAF__), this.__resizeRAF__ = requestFrame(function() {
checkTriggers(element) && (element.__resizeLast__.width = element.offsetWidth, element.__resizeLast__.height = element.offsetHeight,
element.__resizeListeners__.forEach(function(fn) {
fn.call(element, e);
}));
});
}
}, animation = !1, animationstring = "animation", keyframeprefix = "", animationstartevent = "animationstart", domPrefixes = "Webkit Moz O ms".split(" "), startEvents = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), pfx = "", elm = document.createElement("fakeelement");
if (void 0 !== elm.style.animationName && (animation = !0), animation === !1) for (var i = 0; i < domPrefixes.length; i++) if (void 0 !== elm.style[domPrefixes[i] + "AnimationName"]) {
pfx = domPrefixes[i], animationstring = pfx + "Animation", keyframeprefix = "-" + pfx.toLowerCase() + "-",
animationstartevent = startEvents[i], animation = !0;
break;
}
var animationName = "resizeanim", animationKeyframes = "@" + keyframeprefix + "keyframes " + animationName + " { from { opacity: 0; } to { opacity: 0; } } ", animationStyle = keyframeprefix + "animation: 1ms " + animationName + "; ";
}
var createStyles = function() {
if (!document.getElementById("detectElementResize")) {
var css = (animationKeyframes ? animationKeyframes : "") + ".resize-triggers { " + (animationStyle ? animationStyle : "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', head = document.head || document.getElementsByTagName("head")[0], style = document.createElement("style");
style.id = "detectElementResize", style.type = "text/css", null != nonce && style.setAttribute("nonce", nonce),
style.styleSheet ? style.styleSheet.cssText = css : style.appendChild(document.createTextNode(css)),
head.appendChild(style);
}
}, addResizeListener = function(element, fn) {
if (attachEvent) element.attachEvent("onresize", fn); else {
if (!element.__resizeTriggers__) {
var elementStyle = _window.getComputedStyle(element);
elementStyle && "static" == elementStyle.position && (element.style.position = "relative"),
createStyles(), element.__resizeLast__ = {}, element.__resizeListeners__ = [], (element.__resizeTriggers__ = document.createElement("div")).className = "resize-triggers",
element.__resizeTriggers__.innerHTML = '<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',
element.appendChild(element.__resizeTriggers__), resetTriggers(element), element.addEventListener("scroll", scrollListener, !0),
animationstartevent && (element.__resizeTriggers__.__animationListener__ = function(e) {
e.animationName == animationName && resetTriggers(element);
}, element.__resizeTriggers__.addEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__));
}
element.__resizeListeners__.push(fn);
}
}, removeResizeListener = function(element, fn) {
if (attachEvent) element.detachEvent("onresize", fn); else if (element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1),
!element.__resizeListeners__.length) {
element.removeEventListener("scroll", scrollListener, !0), element.__resizeTriggers__.__animationListener__ && (element.__resizeTriggers__.removeEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__),
element.__resizeTriggers__.__animationListener__ = null);
try {
element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
} catch (e) {}
}
};
return {
addResizeListener: addResizeListener,
removeResizeListener: removeResizeListener
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = createDetectElementResize;
}, /* 101 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.CellMeasurerCache = exports.CellMeasurer = exports.default = void 0;
var _CellMeasurer2 = __webpack_require__(102), _CellMeasurer3 = _interopRequireDefault(_CellMeasurer2), _CellMeasurerCache2 = __webpack_require__(104), _CellMeasurerCache3 = _interopRequireDefault(_CellMeasurerCache2);
exports.default = _CellMeasurer3.default, exports.CellMeasurer = _CellMeasurer3.default,
exports.CellMeasurerCache = _CellMeasurerCache3.default;
}, /* 102 */
/***/
function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */
(function(process) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _react = __webpack_require__(97), _reactDom = __webpack_require__(103), CellMeasurer = function(_PureComponent) {
function CellMeasurer(props, context) {
(0, _classCallCheck3.default)(this, CellMeasurer);
var _this = (0, _possibleConstructorReturn3.default)(this, (CellMeasurer.__proto__ || (0,
_getPrototypeOf2.default)(CellMeasurer)).call(this, props, context));
return _this._measure = _this._measure.bind(_this), _this;
}
return (0, _inherits3.default)(CellMeasurer, _PureComponent), (0, _createClass3.default)(CellMeasurer, [ {
key: "componentDidMount",
value: function() {
this._maybeMeasureCell();
}
}, {
key: "componentDidUpdate",
value: function(prevProps, prevState) {
this._maybeMeasureCell();
}
}, {
key: "render",
value: function() {
var children = this.props.children;
return "function" == typeof children ? children({
measure: this._measure
}) : children;
}
}, {
key: "_maybeMeasureCell",
value: function() {
var _props = this.props, cache = _props.cache, _props$columnIndex = _props.columnIndex, columnIndex = void 0 === _props$columnIndex ? 0 : _props$columnIndex, parent = _props.parent, _props$rowIndex = _props.rowIndex, rowIndex = void 0 === _props$rowIndex ? this.props.index : _props$rowIndex;
if (!cache.has(rowIndex, columnIndex)) {
var node = (0, _reactDom.findDOMNode)(this);
cache.hasFixedWidth() || (node.style.width = "auto"), cache.hasFixedHeight() || (node.style.height = "auto");
var height = Math.ceil(node.offsetHeight), width = Math.ceil(node.offsetWidth);
cache.set(rowIndex, columnIndex, width, height), parent && "function" == typeof parent.invalidateCellSizeAfterRender && parent.invalidateCellSizeAfterRender({
columnIndex: columnIndex,
rowIndex: rowIndex
});
}
}
}, {
key: "_measure",
value: function() {
var _props2 = this.props, cache = _props2.cache, _props2$columnIndex = _props2.columnIndex, columnIndex = void 0 === _props2$columnIndex ? 0 : _props2$columnIndex, parent = _props2.parent, _props2$rowIndex = _props2.rowIndex, rowIndex = void 0 === _props2$rowIndex ? this.props.index : _props2$rowIndex, node = (0,
_reactDom.findDOMNode)(this);
cache.hasFixedWidth() || (node.style.width = "auto"), cache.hasFixedHeight() || (node.style.height = "auto");
var height = Math.ceil(node.offsetHeight), width = Math.ceil(node.offsetWidth);
height === cache.getHeight(rowIndex, columnIndex) && width === cache.getWidth(rowIndex, columnIndex) || (cache.set(rowIndex, columnIndex, width, height),
parent && "function" == typeof parent.recomputeGridSize && parent.recomputeGridSize({
columnIndex: columnIndex,
rowIndex: rowIndex
}));
}
} ]), CellMeasurer;
}(_react.PureComponent);
exports.default = CellMeasurer, "production" !== process.env.NODE_ENV && (CellMeasurer.__internalCellMeasurerFlag = !0);
}).call(exports, __webpack_require__(91));
}, /* 103 */
/***/
function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_103__;
}, /* 104 */
/***/
function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */
(function(process) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function defaultKeyMapper(rowIndex, columnIndex) {
return rowIndex + "-" + columnIndex;
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.DEFAULT_WIDTH = exports.DEFAULT_HEIGHT = void 0;
var _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), DEFAULT_HEIGHT = exports.DEFAULT_HEIGHT = 30, DEFAULT_WIDTH = exports.DEFAULT_WIDTH = 100, CellMeasurerCache = function() {
function CellMeasurerCache() {
var _this = this, params = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
(0, _classCallCheck3.default)(this, CellMeasurerCache), this.columnWidth = function(_ref) {
var index = _ref.index, key = _this._keyMapper(0, index);
return _this._columnWidthCache.hasOwnProperty(key) ? _this._columnWidthCache[key] : _this._defaultWidth;
}, this.rowHeight = function(_ref2) {
var index = _ref2.index, key = _this._keyMapper(index, 0);
return _this._rowHeightCache.hasOwnProperty(key) ? _this._rowHeightCache[key] : _this._defaultHeight;
};
var defaultHeight = params.defaultHeight, defaultWidth = params.defaultWidth, fixedHeight = params.fixedHeight, fixedWidth = params.fixedWidth, keyMapper = params.keyMapper, minHeight = params.minHeight, minWidth = params.minWidth;
this._hasFixedHeight = fixedHeight === !0, this._hasFixedWidth = fixedWidth === !0,
this._minHeight = minHeight || 0, this._minWidth = minWidth || 0, this._keyMapper = keyMapper || defaultKeyMapper,
this._defaultHeight = Math.max(this._minHeight, "number" == typeof defaultHeight ? defaultHeight : DEFAULT_HEIGHT),
this._defaultWidth = Math.max(this._minWidth, "number" == typeof defaultWidth ? defaultWidth : DEFAULT_WIDTH),
"production" !== process.env.NODE_ENV && (this._hasFixedHeight === !1 && this._hasFixedWidth === !1 && console.warn("CellMeasurerCache should only measure a cell's width or height. You have configured CellMeasurerCache to measure both. This will result in poor performance."),
this._hasFixedHeight === !1 && 0 === this._defaultHeight && console.warn("Fixed height CellMeasurerCache should specify a :defaultHeight greater than 0. Failing to do so will lead to unnecessary layout and poor performance."),
this._hasFixedWidth === !1 && 0 === this._defaultWidth && console.warn("Fixed width CellMeasurerCache should specify a :defaultWidth greater than 0. Failing to do so will lead to unnecessary layout and poor performance.")),
this._columnCount = 0, this._rowCount = 0, this._cellHeightCache = {}, this._cellWidthCache = {},
this._columnWidthCache = {}, this._rowHeightCache = {};
}
return (0, _createClass3.default)(CellMeasurerCache, [ {
key: "clear",
value: function(rowIndex, columnIndex) {
var key = this._keyMapper(rowIndex, columnIndex);
delete this._cellHeightCache[key], delete this._cellWidthCache[key], this._updateCachedColumnAndRowSizes(rowIndex, columnIndex);
}
}, {
key: "clearAll",
value: function() {
this._cellHeightCache = {}, this._cellWidthCache = {}, this._columnWidthCache = {},
this._rowHeightCache = {};
}
}, {
key: "hasFixedHeight",
value: function() {
return this._hasFixedHeight;
}
}, {
key: "hasFixedWidth",
value: function() {
return this._hasFixedWidth;
}
}, {
key: "getHeight",
value: function(rowIndex) {
var columnIndex = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
if (this._hasFixedHeight) return this._defaultHeight;
var _key = this._keyMapper(rowIndex, columnIndex);
return this._cellHeightCache.hasOwnProperty(_key) ? Math.max(this._minHeight, this._cellHeightCache[_key]) : this._defaultHeight;
}
}, {
key: "getWidth",
value: function(rowIndex) {
var columnIndex = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
if (this._hasFixedWidth) return this._defaultWidth;
var _key2 = this._keyMapper(rowIndex, columnIndex);
return this._cellWidthCache.hasOwnProperty(_key2) ? Math.max(this._minWidth, this._cellWidthCache[_key2]) : this._defaultWidth;
}
}, {
key: "has",
value: function(rowIndex) {
var columnIndex = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, key = this._keyMapper(rowIndex, columnIndex);
return this._cellHeightCache.hasOwnProperty(key);
}
}, {
key: "set",
value: function(rowIndex, columnIndex, width, height) {
var key = this._keyMapper(rowIndex, columnIndex);
columnIndex >= this._columnCount && (this._columnCount = columnIndex + 1), rowIndex >= this._rowCount && (this._rowCount = rowIndex + 1),
this._cellHeightCache[key] = height, this._cellWidthCache[key] = width, this._updateCachedColumnAndRowSizes(rowIndex, columnIndex);
}
}, {
key: "_updateCachedColumnAndRowSizes",
value: function(rowIndex, columnIndex) {
if (!this._hasFixedWidth) {
for (var columnWidth = 0, i = 0; i < this._rowCount; i++) columnWidth = Math.max(columnWidth, this.getWidth(i, columnIndex));
var columnKey = this._keyMapper(0, columnIndex);
this._columnWidthCache[columnKey] = columnWidth;
}
if (!this._hasFixedHeight) {
for (var rowHeight = 0, _i = 0; _i < this._columnCount; _i++) rowHeight = Math.max(rowHeight, this.getHeight(rowIndex, _i));
var rowKey = this._keyMapper(rowIndex, 0);
this._rowHeightCache[rowKey] = rowHeight;
}
}
}, {
key: "defaultHeight",
get: function() {
return this._defaultHeight;
}
}, {
key: "defaultWidth",
get: function() {
return this._defaultWidth;
}
} ]), CellMeasurerCache;
}();
exports.default = CellMeasurerCache;
}).call(exports, __webpack_require__(91));
}, /* 105 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Collection = exports.default = void 0;
var _Collection2 = __webpack_require__(106), _Collection3 = _interopRequireDefault(_Collection2);
exports.default = _Collection3.default, exports.Collection = _Collection3.default;
}, /* 106 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function defaultCellGroupRenderer(_ref4) {
var cellCache = _ref4.cellCache, cellRenderer = _ref4.cellRenderer, cellSizeAndPositionGetter = _ref4.cellSizeAndPositionGetter, indices = _ref4.indices, isScrolling = _ref4.isScrolling;
return indices.map(function(index) {
var cellMetadata = cellSizeAndPositionGetter({
index: index
}), cellRendererProps = {
index: index,
isScrolling: isScrolling,
key: index,
style: {
height: cellMetadata.height,
left: cellMetadata.x,
position: "absolute",
top: cellMetadata.y,
width: cellMetadata.width
}
};
return isScrolling ? (index in cellCache || (cellCache[index] = cellRenderer(cellRendererProps)),
cellCache[index]) : cellRenderer(cellRendererProps);
}).filter(function(renderedCell) {
return !!renderedCell;
});
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _extends2 = __webpack_require__(107), _extends3 = _interopRequireDefault(_extends2), _objectWithoutProperties2 = __webpack_require__(112), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(89), _react = (_interopRequireDefault(_propTypes),
__webpack_require__(97)), _react2 = _interopRequireDefault(_react), _CollectionView = __webpack_require__(113), _CollectionView2 = _interopRequireDefault(_CollectionView), _calculateSizeAndPositionData2 = __webpack_require__(121), _calculateSizeAndPositionData3 = _interopRequireDefault(_calculateSizeAndPositionData2), _getUpdatedOffsetForIndex = __webpack_require__(124), _getUpdatedOffsetForIndex2 = _interopRequireDefault(_getUpdatedOffsetForIndex), Collection = function(_PureComponent) {
function Collection(props, context) {
(0, _classCallCheck3.default)(this, Collection);
var _this = (0, _possibleConstructorReturn3.default)(this, (Collection.__proto__ || (0,
_getPrototypeOf2.default)(Collection)).call(this, props, context));
return _this._cellMetadata = [], _this._lastRenderedCellIndices = [], _this._cellCache = [],
_this._isScrollingChange = _this._isScrollingChange.bind(_this), _this._setCollectionViewRef = _this._setCollectionViewRef.bind(_this),
_this;
}
return (0, _inherits3.default)(Collection, _PureComponent), (0, _createClass3.default)(Collection, [ {
key: "forceUpdate",
value: function() {
void 0 !== this._collectionView && this._collectionView.forceUpdate();
}
}, {
key: "recomputeCellSizesAndPositions",
value: function() {
this._cellCache = [], this._collectionView.recomputeCellSizesAndPositions();
}
}, {
key: "render",
value: function() {
var props = (0, _objectWithoutProperties3.default)(this.props, []);
return _react2.default.createElement(_CollectionView2.default, (0, _extends3.default)({
cellLayoutManager: this,
isScrollingChange: this._isScrollingChange,
ref: this._setCollectionViewRef
}, props));
}
}, {
key: "calculateSizeAndPositionData",
value: function() {
var _props = this.props, cellCount = _props.cellCount, cellSizeAndPositionGetter = _props.cellSizeAndPositionGetter, sectionSize = _props.sectionSize, data = (0,
_calculateSizeAndPositionData3.default)({
cellCount: cellCount,
cellSizeAndPositionGetter: cellSizeAndPositionGetter,
sectionSize: sectionSize
});
this._cellMetadata = data.cellMetadata, this._sectionManager = data.sectionManager,
this._height = data.height, this._width = data.width;
}
}, {
key: "getLastRenderedIndices",
value: function() {
return this._lastRenderedCellIndices;
}
}, {
key: "getScrollPositionForCell",
value: function(_ref) {
var align = _ref.align, cellIndex = _ref.cellIndex, height = _ref.height, scrollLeft = _ref.scrollLeft, scrollTop = _ref.scrollTop, width = _ref.width, cellCount = this.props.cellCount;
if (cellIndex >= 0 && cellIndex < cellCount) {
var cellMetadata = this._cellMetadata[cellIndex];
scrollLeft = (0, _getUpdatedOffsetForIndex2.default)({
align: align,
cellOffset: cellMetadata.x,
cellSize: cellMetadata.width,
containerSize: width,
currentOffset: scrollLeft,
targetIndex: cellIndex
}), scrollTop = (0, _getUpdatedOffsetForIndex2.default)({
align: align,
cellOffset: cellMetadata.y,
cellSize: cellMetadata.height,
containerSize: height,
currentOffset: scrollTop,
targetIndex: cellIndex
});
}
return {
scrollLeft: scrollLeft,
scrollTop: scrollTop
};
}
}, {
key: "getTotalSize",
value: function() {
return {
height: this._height,
width: this._width
};
}
}, {
key: "cellRenderers",
value: function(_ref2) {
var _this2 = this, height = _ref2.height, isScrolling = _ref2.isScrolling, width = _ref2.width, x = _ref2.x, y = _ref2.y, _props2 = this.props, cellGroupRenderer = _props2.cellGroupRenderer, cellRenderer = _props2.cellRenderer;
return this._lastRenderedCellIndices = this._sectionManager.getCellIndices({
height: height,
width: width,
x: x,
y: y
}), cellGroupRenderer({
cellCache: this._cellCache,
cellRenderer: cellRenderer,
cellSizeAndPositionGetter: function(_ref3) {
var index = _ref3.index;
return _this2._sectionManager.getCellMetadata({
index: index
});
},
indices: this._lastRenderedCellIndices,
isScrolling: isScrolling
});
}
}, {
key: "_isScrollingChange",
value: function(isScrolling) {
isScrolling || (this._cellCache = []);
}
}, {
key: "_setCollectionViewRef",
value: function(ref) {
this._collectionView = ref;
}
} ]), Collection;
}(_react.PureComponent);
Collection.defaultProps = {
"aria-label": "grid",
cellGroupRenderer: defaultCellGroupRenderer
}, exports.default = Collection;
}, /* 107 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
exports.__esModule = !0;
var _assign = __webpack_require__(108), _assign2 = _interopRequireDefault(_assign);
exports.default = _assign2.default || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
};
}, /* 108 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(109),
__esModule: !0
};
}, /* 109 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(110), module.exports = __webpack_require__(16).Object.assign;
}, /* 110 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.3.1 Object.assign(target, source)
var $export = __webpack_require__(15);
$export($export.S + $export.F, "Object", {
assign: __webpack_require__(111)
});
}, /* 111 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
// 19.1.2.1 Object.assign(target, source, ...)
var getKeys = __webpack_require__(48), gOPS = __webpack_require__(72), pIE = __webpack_require__(73), toObject = __webpack_require__(6), IObject = __webpack_require__(51), $assign = Object.assign;
// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !$assign || __webpack_require__(25)(function() {
var A = {}, B = {}, S = Symbol(), K = "abcdefghijklmnopqrst";
return A[S] = 7, K.split("").forEach(function(k) {
B[k] = k;
}), 7 != $assign({}, A)[S] || Object.keys($assign({}, B)).join("") != K;
}) ? function(target, source) {
for (// eslint-disable-line no-unused-vars
var T = toObject(target), aLen = arguments.length, index = 1, getSymbols = gOPS.f, isEnum = pIE.f; aLen > index; ) for (var key, S = IObject(arguments[index++]), keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S), length = keys.length, j = 0; length > j; ) isEnum.call(S, key = keys[j++]) && (T[key] = S[key]);
return T;
} : $assign;
}, /* 112 */
/***/
function(module, exports) {
"use strict";
exports.__esModule = !0, exports.default = function(obj, keys) {
var target = {};
for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
return target;
};
}, /* 113 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _extends2 = __webpack_require__(107), _extends3 = _interopRequireDefault(_extends2), _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(89), _react = (_interopRequireDefault(_propTypes),
__webpack_require__(97)), _react2 = _interopRequireDefault(_react), _classnames = __webpack_require__(114), _classnames2 = _interopRequireDefault(_classnames), _createCallbackMemoizer = __webpack_require__(115), _createCallbackMemoizer2 = _interopRequireDefault(_createCallbackMemoizer), _scrollbarSize = __webpack_require__(119), _scrollbarSize2 = _interopRequireDefault(_scrollbarSize), IS_SCROLLING_TIMEOUT = 150, SCROLL_POSITION_CHANGE_REASONS = {
OBSERVED: "observed",
REQUESTED: "requested"
}, CollectionView = function(_PureComponent) {
function CollectionView(props, context) {
(0, _classCallCheck3.default)(this, CollectionView);
var _this = (0, _possibleConstructorReturn3.default)(this, (CollectionView.__proto__ || (0,
_getPrototypeOf2.default)(CollectionView)).call(this, props, context));
return _this.state = {
isScrolling: !1,
scrollLeft: 0,
scrollTop: 0
}, _this._calculateSizeAndPositionDataOnNextUpdate = !1, _this._onSectionRenderedMemoizer = (0,
_createCallbackMemoizer2.default)(), _this._onScrollMemoizer = (0, _createCallbackMemoizer2.default)(!1),
_this._invokeOnSectionRenderedHelper = _this._invokeOnSectionRenderedHelper.bind(_this),
_this._onScroll = _this._onScroll.bind(_this), _this._setScrollingContainerRef = _this._setScrollingContainerRef.bind(_this),
_this._updateScrollPositionForScrollToCell = _this._updateScrollPositionForScrollToCell.bind(_this),
_this;
}
return (0, _inherits3.default)(CollectionView, _PureComponent), (0, _createClass3.default)(CollectionView, [ {
key: "recomputeCellSizesAndPositions",
value: function() {
this._calculateSizeAndPositionDataOnNextUpdate = !0, this.forceUpdate();
}
}, {
key: "componentDidMount",
value: function() {
var _props = this.props, cellLayoutManager = _props.cellLayoutManager, scrollLeft = _props.scrollLeft, scrollToCell = _props.scrollToCell, scrollTop = _props.scrollTop;
this._scrollbarSizeMeasured || (this._scrollbarSize = (0, _scrollbarSize2.default)(),
this._scrollbarSizeMeasured = !0, this.setState({})), scrollToCell >= 0 ? this._updateScrollPositionForScrollToCell() : (scrollLeft >= 0 || scrollTop >= 0) && this._setScrollPosition({
scrollLeft: scrollLeft,
scrollTop: scrollTop
}), this._invokeOnSectionRenderedHelper();
var _cellLayoutManager$ge = cellLayoutManager.getTotalSize(), totalHeight = _cellLayoutManager$ge.height, totalWidth = _cellLayoutManager$ge.width;
this._invokeOnScrollMemoizer({
scrollLeft: scrollLeft || 0,
scrollTop: scrollTop || 0,
totalHeight: totalHeight,
totalWidth: totalWidth
});
}
}, {
key: "componentDidUpdate",
value: function(prevProps, prevState) {
var _props2 = this.props, height = _props2.height, scrollToAlignment = _props2.scrollToAlignment, scrollToCell = _props2.scrollToCell, width = _props2.width, _state = this.state, scrollLeft = _state.scrollLeft, scrollPositionChangeReason = _state.scrollPositionChangeReason, scrollTop = _state.scrollTop;
scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED && (scrollLeft >= 0 && scrollLeft !== prevState.scrollLeft && scrollLeft !== this._scrollingContainer.scrollLeft && (this._scrollingContainer.scrollLeft = scrollLeft),
scrollTop >= 0 && scrollTop !== prevState.scrollTop && scrollTop !== this._scrollingContainer.scrollTop && (this._scrollingContainer.scrollTop = scrollTop)),
height === prevProps.height && scrollToAlignment === prevProps.scrollToAlignment && scrollToCell === prevProps.scrollToCell && width === prevProps.width || this._updateScrollPositionForScrollToCell(),
this._invokeOnSectionRenderedHelper();
}
}, {
key: "componentWillMount",
value: function() {
var cellLayoutManager = this.props.cellLayoutManager;
cellLayoutManager.calculateSizeAndPositionData(), this._scrollbarSize = (0, _scrollbarSize2.default)(),
void 0 === this._scrollbarSize ? (this._scrollbarSizeMeasured = !1, this._scrollbarSize = 0) : this._scrollbarSizeMeasured = !0;
}
}, {
key: "componentWillUnmount",
value: function() {
this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId);
}
}, {
key: "componentWillReceiveProps",
value: function(nextProps) {
var _state2 = this.state, scrollLeft = _state2.scrollLeft, scrollTop = _state2.scrollTop;
0 !== nextProps.cellCount || 0 === scrollLeft && 0 === scrollTop ? nextProps.scrollLeft === this.props.scrollLeft && nextProps.scrollTop === this.props.scrollTop || this._setScrollPosition({
scrollLeft: nextProps.scrollLeft,
scrollTop: nextProps.scrollTop
}) : this._setScrollPosition({
scrollLeft: 0,
scrollTop: 0
}), (nextProps.cellCount !== this.props.cellCount || nextProps.cellLayoutManager !== this.props.cellLayoutManager || this._calculateSizeAndPositionDataOnNextUpdate) && nextProps.cellLayoutManager.calculateSizeAndPositionData(),
this._calculateSizeAndPositionDataOnNextUpdate && (this._calculateSizeAndPositionDataOnNextUpdate = !1);
}
}, {
key: "render",
value: function() {
var _props3 = this.props, autoHeight = _props3.autoHeight, cellCount = _props3.cellCount, cellLayoutManager = _props3.cellLayoutManager, className = _props3.className, height = _props3.height, horizontalOverscanSize = _props3.horizontalOverscanSize, id = _props3.id, noContentRenderer = _props3.noContentRenderer, style = _props3.style, verticalOverscanSize = _props3.verticalOverscanSize, width = _props3.width, _state3 = this.state, isScrolling = _state3.isScrolling, scrollLeft = _state3.scrollLeft, scrollTop = _state3.scrollTop, _cellLayoutManager$ge2 = cellLayoutManager.getTotalSize(), totalHeight = _cellLayoutManager$ge2.height, totalWidth = _cellLayoutManager$ge2.width, left = Math.max(0, scrollLeft - horizontalOverscanSize), top = Math.max(0, scrollTop - verticalOverscanSize), right = Math.min(totalWidth, scrollLeft + width + horizontalOverscanSize), bottom = Math.min(totalHeight, scrollTop + height + verticalOverscanSize), childrenToDisplay = height > 0 && width > 0 ? cellLayoutManager.cellRenderers({
height: bottom - top,
isScrolling: isScrolling,
width: right - left,
x: left,
y: top
}) : [], collectionStyle = {
boxSizing: "border-box",
direction: "ltr",
height: autoHeight ? "auto" : height,
position: "relative",
WebkitOverflowScrolling: "touch",
width: width,
willChange: "transform"
}, verticalScrollBarSize = totalHeight > height ? this._scrollbarSize : 0, horizontalScrollBarSize = totalWidth > width ? this._scrollbarSize : 0;
return collectionStyle.overflowX = totalWidth + verticalScrollBarSize <= width ? "hidden" : "auto",
collectionStyle.overflowY = totalHeight + horizontalScrollBarSize <= height ? "hidden" : "auto",
_react2.default.createElement("div", {
ref: this._setScrollingContainerRef,
"aria-label": this.props["aria-label"],
className: (0, _classnames2.default)("ReactVirtualized__Collection", className),
id: id,
onScroll: this._onScroll,
role: "grid",
style: (0, _extends3.default)({}, collectionStyle, style),
tabIndex: 0
}, cellCount > 0 && _react2.default.createElement("div", {
className: "ReactVirtualized__Collection__innerScrollContainer",
style: {
height: totalHeight,
maxHeight: totalHeight,
maxWidth: totalWidth,
overflow: "hidden",
pointerEvents: isScrolling ? "none" : "",
width: totalWidth
}
}, childrenToDisplay), 0 === cellCount && noContentRenderer());
}
}, {
key: "_enablePointerEventsAfterDelay",
value: function() {
var _this2 = this;
this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId),
this._disablePointerEventsTimeoutId = setTimeout(function() {
var isScrollingChange = _this2.props.isScrollingChange;
isScrollingChange(!1), _this2._disablePointerEventsTimeoutId = null, _this2.setState({
isScrolling: !1
});
}, IS_SCROLLING_TIMEOUT);
}
}, {
key: "_invokeOnSectionRenderedHelper",
value: function() {
var _props4 = this.props, cellLayoutManager = _props4.cellLayoutManager, onSectionRendered = _props4.onSectionRendered;
this._onSectionRenderedMemoizer({
callback: onSectionRendered,
indices: {
indices: cellLayoutManager.getLastRenderedIndices()
}
});
}
}, {
key: "_invokeOnScrollMemoizer",
value: function(_ref) {
var _this3 = this, scrollLeft = _ref.scrollLeft, scrollTop = _ref.scrollTop, totalHeight = _ref.totalHeight, totalWidth = _ref.totalWidth;
this._onScrollMemoizer({
callback: function(_ref2) {
var scrollLeft = _ref2.scrollLeft, scrollTop = _ref2.scrollTop, _props5 = _this3.props, height = _props5.height, onScroll = _props5.onScroll, width = _props5.width;
onScroll({
clientHeight: height,
clientWidth: width,
scrollHeight: totalHeight,
scrollLeft: scrollLeft,
scrollTop: scrollTop,
scrollWidth: totalWidth
});
},
indices: {
scrollLeft: scrollLeft,
scrollTop: scrollTop
}
});
}
}, {
key: "_setScrollingContainerRef",
value: function(ref) {
this._scrollingContainer = ref;
}
}, {
key: "_setScrollPosition",
value: function(_ref3) {
var scrollLeft = _ref3.scrollLeft, scrollTop = _ref3.scrollTop, newState = {
scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED
};
scrollLeft >= 0 && (newState.scrollLeft = scrollLeft), scrollTop >= 0 && (newState.scrollTop = scrollTop),
(scrollLeft >= 0 && scrollLeft !== this.state.scrollLeft || scrollTop >= 0 && scrollTop !== this.state.scrollTop) && this.setState(newState);
}
}, {
key: "_updateScrollPositionForScrollToCell",
value: function() {
var _props6 = this.props, cellLayoutManager = _props6.cellLayoutManager, height = _props6.height, scrollToAlignment = _props6.scrollToAlignment, scrollToCell = _props6.scrollToCell, width = _props6.width, _state4 = this.state, scrollLeft = _state4.scrollLeft, scrollTop = _state4.scrollTop;
if (scrollToCell >= 0) {
var scrollPosition = cellLayoutManager.getScrollPositionForCell({
align: scrollToAlignment,
cellIndex: scrollToCell,
height: height,
scrollLeft: scrollLeft,
scrollTop: scrollTop,
width: width
});
scrollPosition.scrollLeft === scrollLeft && scrollPosition.scrollTop === scrollTop || this._setScrollPosition(scrollPosition);
}
}
}, {
key: "_onScroll",
value: function(event) {
if (event.target === this._scrollingContainer) {
this._enablePointerEventsAfterDelay();
var _props7 = this.props, cellLayoutManager = _props7.cellLayoutManager, height = _props7.height, isScrollingChange = _props7.isScrollingChange, width = _props7.width, scrollbarSize = this._scrollbarSize, _cellLayoutManager$ge3 = cellLayoutManager.getTotalSize(), totalHeight = _cellLayoutManager$ge3.height, totalWidth = _cellLayoutManager$ge3.width, scrollLeft = Math.max(0, Math.min(totalWidth - width + scrollbarSize, event.target.scrollLeft)), scrollTop = Math.max(0, Math.min(totalHeight - height + scrollbarSize, event.target.scrollTop));
if (this.state.scrollLeft !== scrollLeft || this.state.scrollTop !== scrollTop) {
var scrollPositionChangeReason = event.cancelable ? SCROLL_POSITION_CHANGE_REASONS.OBSERVED : SCROLL_POSITION_CHANGE_REASONS.REQUESTED;
this.state.isScrolling || isScrollingChange(!0), this.setState({
isScrolling: !0,
scrollLeft: scrollLeft,
scrollPositionChangeReason: scrollPositionChangeReason,
scrollTop: scrollTop
});
}
this._invokeOnScrollMemoizer({
scrollLeft: scrollLeft,
scrollTop: scrollTop,
totalWidth: totalWidth,
totalHeight: totalHeight
});
}
}
} ]), CollectionView;
}(_react.PureComponent);
CollectionView.defaultProps = {
"aria-label": "grid",
horizontalOverscanSize: 0,
noContentRenderer: function() {
return null;
},
onScroll: function() {
return null;
},
onSectionRendered: function() {
return null;
},
scrollToAlignment: "auto",
scrollToCell: -1,
style: {},
verticalOverscanSize: 0
}, exports.default = CollectionView;
}, /* 114 */
/***/
function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
/*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/* global define */
!function() {
"use strict";
function classNames() {
for (var classes = [], i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (arg) {
var argType = typeof arg;
if ("string" === argType || "number" === argType) classes.push(arg); else if (Array.isArray(arg)) classes.push(classNames.apply(null, arg)); else if ("object" === argType) for (var key in arg) hasOwn.call(arg, key) && arg[key] && classes.push(key);
}
}
return classes.join(" ");
}
var hasOwn = {}.hasOwnProperty;
"undefined" != typeof module && module.exports ? module.exports = classNames : (__WEBPACK_AMD_DEFINE_ARRAY__ = [],
__WEBPACK_AMD_DEFINE_RESULT__ = function() {
return classNames;
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), // register as 'classnames', consistent with npm package name
!(void 0 !== __WEBPACK_AMD_DEFINE_RESULT__ && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)));
}();
}, /* 115 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function createCallbackMemoizer() {
var requireAllKeys = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0], cachedIndices = {};
return function(_ref) {
var callback = _ref.callback, indices = _ref.indices, keys = (0, _keys2.default)(indices), allInitialized = !requireAllKeys || keys.every(function(key) {
var value = indices[key];
return Array.isArray(value) ? value.length > 0 : value >= 0;
}), indexChanged = keys.length !== (0, _keys2.default)(cachedIndices).length || keys.some(function(key) {
var cachedValue = cachedIndices[key], value = indices[key];
return Array.isArray(value) ? cachedValue.join(",") !== value.join(",") : cachedValue !== value;
});
cachedIndices = indices, allInitialized && indexChanged && callback(indices);
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _keys = __webpack_require__(116), _keys2 = _interopRequireDefault(_keys);
exports.default = createCallbackMemoizer;
}, /* 116 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(117),
__esModule: !0
};
}, /* 117 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(118), module.exports = __webpack_require__(16).Object.keys;
}, /* 118 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.2.14 Object.keys(O)
var toObject = __webpack_require__(6), $keys = __webpack_require__(48);
__webpack_require__(14)("keys", function() {
return function(it) {
return $keys(toObject(it));
};
});
}, /* 119 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = function(recalc) {
if ((!size || recalc) && _inDOM2.default) {
var scrollDiv = document.createElement("div");
scrollDiv.style.position = "absolute", scrollDiv.style.top = "-9999px", scrollDiv.style.width = "50px",
scrollDiv.style.height = "50px", scrollDiv.style.overflow = "scroll", document.body.appendChild(scrollDiv),
size = scrollDiv.offsetWidth - scrollDiv.clientWidth, document.body.removeChild(scrollDiv);
}
return size;
};
var _inDOM = __webpack_require__(120), _inDOM2 = _interopRequireDefault(_inDOM), size = void 0;
module.exports = exports.default;
}, /* 120 */
/***/
function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = !("undefined" == typeof window || !window.document || !window.document.createElement),
module.exports = exports.default;
}, /* 121 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function calculateSizeAndPositionData(_ref) {
for (var cellCount = _ref.cellCount, cellSizeAndPositionGetter = _ref.cellSizeAndPositionGetter, sectionSize = _ref.sectionSize, cellMetadata = [], sectionManager = new _SectionManager2.default(sectionSize), height = 0, width = 0, index = 0; index < cellCount; index++) {
var cellMetadatum = cellSizeAndPositionGetter({
index: index
});
if (null == cellMetadatum.height || isNaN(cellMetadatum.height) || null == cellMetadatum.width || isNaN(cellMetadatum.width) || null == cellMetadatum.x || isNaN(cellMetadatum.x) || null == cellMetadatum.y || isNaN(cellMetadatum.y)) throw Error("Invalid metadata returned for cell " + index + ":\n x:" + cellMetadatum.x + ", y:" + cellMetadatum.y + ", width:" + cellMetadatum.width + ", height:" + cellMetadatum.height);
height = Math.max(height, cellMetadatum.y + cellMetadatum.height), width = Math.max(width, cellMetadatum.x + cellMetadatum.width),
cellMetadata[index] = cellMetadatum, sectionManager.registerCell({
cellMetadatum: cellMetadatum,
index: index
});
}
return {
cellMetadata: cellMetadata,
height: height,
sectionManager: sectionManager,
width: width
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = calculateSizeAndPositionData;
var _SectionManager = __webpack_require__(122), _SectionManager2 = _interopRequireDefault(_SectionManager);
}, /* 122 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _keys = __webpack_require__(116), _keys2 = _interopRequireDefault(_keys), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _Section = __webpack_require__(123), _Section2 = _interopRequireDefault(_Section), SECTION_SIZE = 100, SectionManager = function() {
function SectionManager() {
var sectionSize = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : SECTION_SIZE;
(0, _classCallCheck3.default)(this, SectionManager), this._sectionSize = sectionSize,
this._cellMetadata = [], this._sections = {};
}
return (0, _createClass3.default)(SectionManager, [ {
key: "getCellIndices",
value: function(_ref) {
var height = _ref.height, width = _ref.width, x = _ref.x, y = _ref.y, indices = {};
return this.getSections({
height: height,
width: width,
x: x,
y: y
}).forEach(function(section) {
return section.getCellIndices().forEach(function(index) {
indices[index] = index;
});
}), (0, _keys2.default)(indices).map(function(index) {
return indices[index];
});
}
}, {
key: "getCellMetadata",
value: function(_ref2) {
var index = _ref2.index;
return this._cellMetadata[index];
}
}, {
key: "getSections",
value: function(_ref3) {
for (var height = _ref3.height, width = _ref3.width, x = _ref3.x, y = _ref3.y, sectionXStart = Math.floor(x / this._sectionSize), sectionXStop = Math.floor((x + width - 1) / this._sectionSize), sectionYStart = Math.floor(y / this._sectionSize), sectionYStop = Math.floor((y + height - 1) / this._sectionSize), sections = [], sectionX = sectionXStart; sectionX <= sectionXStop; sectionX++) for (var sectionY = sectionYStart; sectionY <= sectionYStop; sectionY++) {
var key = sectionX + "." + sectionY;
this._sections[key] || (this._sections[key] = new _Section2.default({
height: this._sectionSize,
width: this._sectionSize,
x: sectionX * this._sectionSize,
y: sectionY * this._sectionSize
})), sections.push(this._sections[key]);
}
return sections;
}
}, {
key: "getTotalSectionCount",
value: function() {
return (0, _keys2.default)(this._sections).length;
}
}, {
key: "toString",
value: function() {
var _this = this;
return (0, _keys2.default)(this._sections).map(function(index) {
return _this._sections[index].toString();
});
}
}, {
key: "registerCell",
value: function(_ref4) {
var cellMetadatum = _ref4.cellMetadatum, index = _ref4.index;
this._cellMetadata[index] = cellMetadatum, this.getSections(cellMetadatum).forEach(function(section) {
return section.addCellIndex({
index: index
});
});
}
} ]), SectionManager;
}();
exports.default = SectionManager;
}, /* 123 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), Section = function() {
function Section(_ref) {
var height = _ref.height, width = _ref.width, x = _ref.x, y = _ref.y;
(0, _classCallCheck3.default)(this, Section), this.height = height, this.width = width,
this.x = x, this.y = y, this._indexMap = {}, this._indices = [];
}
return (0, _createClass3.default)(Section, [ {
key: "addCellIndex",
value: function(_ref2) {
var index = _ref2.index;
this._indexMap[index] || (this._indexMap[index] = !0, this._indices.push(index));
}
}, {
key: "getCellIndices",
value: function() {
return this._indices;
}
}, {
key: "toString",
value: function() {
return this.x + "," + this.y + " " + this.width + "x" + this.height;
}
} ]), Section;
}();
exports.default = Section;
}, /* 124 */
/***/
function(module, exports) {
"use strict";
function getUpdatedOffsetForIndex(_ref) {
var _ref$align = _ref.align, align = void 0 === _ref$align ? "auto" : _ref$align, cellOffset = _ref.cellOffset, cellSize = _ref.cellSize, containerSize = _ref.containerSize, currentOffset = _ref.currentOffset, maxOffset = cellOffset, minOffset = maxOffset - containerSize + cellSize;
switch (align) {
case "start":
return maxOffset;
case "end":
return minOffset;
case "center":
return maxOffset - (containerSize - cellSize) / 2;
default:
return Math.max(minOffset, Math.min(maxOffset, currentOffset));
}
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = getUpdatedOffsetForIndex;
}, /* 125 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.ColumnSizer = exports.default = void 0;
var _ColumnSizer2 = __webpack_require__(126), _ColumnSizer3 = _interopRequireDefault(_ColumnSizer2);
exports.default = _ColumnSizer3.default, exports.ColumnSizer = _ColumnSizer3.default;
}, /* 126 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(89), _react = (_interopRequireDefault(_propTypes),
__webpack_require__(97)), ColumnSizer = function(_PureComponent) {
function ColumnSizer(props, context) {
(0, _classCallCheck3.default)(this, ColumnSizer);
var _this = (0, _possibleConstructorReturn3.default)(this, (ColumnSizer.__proto__ || (0,
_getPrototypeOf2.default)(ColumnSizer)).call(this, props, context));
return _this._registerChild = _this._registerChild.bind(_this), _this;
}
return (0, _inherits3.default)(ColumnSizer, _PureComponent), (0, _createClass3.default)(ColumnSizer, [ {
key: "componentDidUpdate",
value: function(prevProps, prevState) {
var _props = this.props, columnMaxWidth = _props.columnMaxWidth, columnMinWidth = _props.columnMinWidth, columnCount = _props.columnCount, width = _props.width;
columnMaxWidth === prevProps.columnMaxWidth && columnMinWidth === prevProps.columnMinWidth && columnCount === prevProps.columnCount && width === prevProps.width || this._registeredChild && this._registeredChild.recomputeGridSize();
}
}, {
key: "render",
value: function() {
var _props2 = this.props, children = _props2.children, columnMaxWidth = _props2.columnMaxWidth, columnMinWidth = _props2.columnMinWidth, columnCount = _props2.columnCount, width = _props2.width, safeColumnMinWidth = columnMinWidth || 1, safeColumnMaxWidth = columnMaxWidth ? Math.min(columnMaxWidth, width) : width, columnWidth = width / columnCount;
columnWidth = Math.max(safeColumnMinWidth, columnWidth), columnWidth = Math.min(safeColumnMaxWidth, columnWidth),
columnWidth = Math.floor(columnWidth);
var adjustedWidth = Math.min(width, columnWidth * columnCount);
return children({
adjustedWidth: adjustedWidth,
columnWidth: columnWidth,
getColumnWidth: function() {
return columnWidth;
},
registerChild: this._registerChild
});
}
}, {
key: "_registerChild",
value: function(child) {
if (child && "function" != typeof child.recomputeGridSize) throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");
this._registeredChild = child, this._registeredChild && this._registeredChild.recomputeGridSize();
}
} ]), ColumnSizer;
}(_react.PureComponent);
exports.default = ColumnSizer;
}, /* 127 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.defaultOverscanIndicesGetter = exports.defaultCellRangeRenderer = exports.accessibilityOverscanIndicesGetter = exports.Grid = exports.default = void 0;
var _Grid2 = __webpack_require__(128), _Grid3 = _interopRequireDefault(_Grid2), _accessibilityOverscanIndicesGetter2 = __webpack_require__(135), _accessibilityOverscanIndicesGetter3 = _interopRequireDefault(_accessibilityOverscanIndicesGetter2), _defaultCellRangeRenderer2 = __webpack_require__(134), _defaultCellRangeRenderer3 = _interopRequireDefault(_defaultCellRangeRenderer2), _defaultOverscanIndicesGetter2 = __webpack_require__(132), _defaultOverscanIndicesGetter3 = _interopRequireDefault(_defaultOverscanIndicesGetter2);
exports.default = _Grid3.default, exports.Grid = _Grid3.default, exports.accessibilityOverscanIndicesGetter = _accessibilityOverscanIndicesGetter3.default,
exports.defaultCellRangeRenderer = _defaultCellRangeRenderer3.default, exports.defaultOverscanIndicesGetter = _defaultOverscanIndicesGetter3.default;
}, /* 128 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.DEFAULT_SCROLLING_RESET_TIME_INTERVAL = void 0;
var _extends2 = __webpack_require__(107), _extends3 = _interopRequireDefault(_extends2), _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _react = __webpack_require__(97), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(89), _classnames = (_interopRequireDefault(_propTypes),
__webpack_require__(114)), _classnames2 = _interopRequireDefault(_classnames), _calculateSizeAndPositionDataAndUpdateScrollOffset = __webpack_require__(129), _calculateSizeAndPositionDataAndUpdateScrollOffset2 = _interopRequireDefault(_calculateSizeAndPositionDataAndUpdateScrollOffset), _ScalingCellSizeAndPositionManager = __webpack_require__(130), _ScalingCellSizeAndPositionManager2 = _interopRequireDefault(_ScalingCellSizeAndPositionManager), _createCallbackMemoizer = __webpack_require__(115), _createCallbackMemoizer2 = _interopRequireDefault(_createCallbackMemoizer), _defaultOverscanIndicesGetter = __webpack_require__(132), _defaultOverscanIndicesGetter2 = _interopRequireDefault(_defaultOverscanIndicesGetter), _updateScrollIndexHelper = __webpack_require__(133), _updateScrollIndexHelper2 = _interopRequireDefault(_updateScrollIndexHelper), _defaultCellRangeRenderer = __webpack_require__(134), _defaultCellRangeRenderer2 = _interopRequireDefault(_defaultCellRangeRenderer), _scrollbarSize = __webpack_require__(119), _scrollbarSize2 = _interopRequireDefault(_scrollbarSize), DEFAULT_SCROLLING_RESET_TIME_INTERVAL = exports.DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150, SCROLL_POSITION_CHANGE_REASONS = {
OBSERVED: "observed",
REQUESTED: "requested"
}, Grid = function(_PureComponent) {
function Grid(props, context) {
(0, _classCallCheck3.default)(this, Grid);
var _this = (0, _possibleConstructorReturn3.default)(this, (Grid.__proto__ || (0,
_getPrototypeOf2.default)(Grid)).call(this, props, context));
_this.state = {
isScrolling: !1,
scrollDirectionHorizontal: _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD,
scrollDirectionVertical: _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD,
scrollLeft: 0,
scrollTop: 0
}, _this._onGridRenderedMemoizer = (0, _createCallbackMemoizer2.default)(), _this._onScrollMemoizer = (0,
_createCallbackMemoizer2.default)(!1), _this._debounceScrollEndedCallback = _this._debounceScrollEndedCallback.bind(_this),
_this._invokeOnGridRenderedHelper = _this._invokeOnGridRenderedHelper.bind(_this),
_this._onScroll = _this._onScroll.bind(_this), _this._setScrollingContainerRef = _this._setScrollingContainerRef.bind(_this),
_this._columnWidthGetter = _this._wrapSizeGetter(props.columnWidth), _this._rowHeightGetter = _this._wrapSizeGetter(props.rowHeight),
_this._deferredInvalidateColumnIndex = null, _this._deferredInvalidateRowIndex = null,
_this._recomputeScrollLeftFlag = !1, _this._recomputeScrollTopFlag = !1;
var deferredMeasurementCache = props.deferredMeasurementCache, deferredMode = "undefined" != typeof deferredMeasurementCache;
return _this._columnSizeAndPositionManager = new _ScalingCellSizeAndPositionManager2.default({
batchAllCells: deferredMode && !deferredMeasurementCache.hasFixedHeight(),
cellCount: props.columnCount,
cellSizeGetter: function(params) {
return _this._columnWidthGetter(params);
},
estimatedCellSize: _this._getEstimatedColumnSize(props)
}), _this._rowSizeAndPositionManager = new _ScalingCellSizeAndPositionManager2.default({
batchAllCells: deferredMode && !deferredMeasurementCache.hasFixedWidth(),
cellCount: props.rowCount,
cellSizeGetter: function(params) {
return _this._rowHeightGetter(params);
},
estimatedCellSize: _this._getEstimatedRowSize(props)
}), _this._cellCache = {}, _this._styleCache = {}, _this;
}
return (0, _inherits3.default)(Grid, _PureComponent), (0, _createClass3.default)(Grid, [ {
key: "getOffsetForCell",
value: function() {
var _ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, _ref$alignment = _ref.alignment, alignment = void 0 === _ref$alignment ? this.props.scrollToAlignment : _ref$alignment, _ref$columnIndex = _ref.columnIndex, columnIndex = void 0 === _ref$columnIndex ? this.props.scrollToColumn : _ref$columnIndex, _ref$rowIndex = _ref.rowIndex, rowIndex = void 0 === _ref$rowIndex ? this.props.scrollToRow : _ref$rowIndex, offsetProps = (0,
_extends3.default)({}, this.props, {
scrollToAlignment: alignment,
scrollToColumn: columnIndex,
scrollToRow: rowIndex
});
return {
scrollLeft: this._getCalculatedScrollLeft(offsetProps),
scrollTop: this._getCalculatedScrollTop(offsetProps)
};
}
}, {
key: "invalidateCellSizeAfterRender",
value: function(_ref2) {
var columnIndex = _ref2.columnIndex, rowIndex = _ref2.rowIndex;
this._deferredInvalidateColumnIndex = "number" == typeof this._deferredInvalidateColumnIndex ? Math.min(this._deferredInvalidateColumnIndex, columnIndex) : columnIndex,
this._deferredInvalidateRowIndex = "number" == typeof this._deferredInvalidateRowIndex ? Math.min(this._deferredInvalidateRowIndex, rowIndex) : rowIndex;
}
}, {
key: "measureAllCells",
value: function() {
var _props = this.props, columnCount = _props.columnCount, rowCount = _props.rowCount;
this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnCount - 1), this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowCount - 1);
}
}, {
key: "recomputeGridSize",
value: function() {
var _ref3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, _ref3$columnIndex = _ref3.columnIndex, columnIndex = void 0 === _ref3$columnIndex ? 0 : _ref3$columnIndex, _ref3$rowIndex = _ref3.rowIndex, rowIndex = void 0 === _ref3$rowIndex ? 0 : _ref3$rowIndex, _props2 = this.props, scrollToColumn = _props2.scrollToColumn, scrollToRow = _props2.scrollToRow;
this._columnSizeAndPositionManager.resetCell(columnIndex), this._rowSizeAndPositionManager.resetCell(rowIndex),
this._recomputeScrollLeftFlag = scrollToColumn >= 0 && columnIndex <= scrollToColumn,
this._recomputeScrollTopFlag = scrollToRow >= 0 && rowIndex <= scrollToRow, this._cellCache = {},
this._styleCache = {}, this.forceUpdate();
}
}, {
key: "scrollToCell",
value: function(_ref4) {
var columnIndex = _ref4.columnIndex, rowIndex = _ref4.rowIndex, columnCount = this.props.columnCount, props = this.props;
columnCount > 1 && this._updateScrollLeftForScrollToColumn((0, _extends3.default)({}, props, {
scrollToColumn: columnIndex
})), this._updateScrollTopForScrollToRow((0, _extends3.default)({}, props, {
scrollToRow: rowIndex
}));
}
}, {
key: "scrollToPosition",
value: function() {
var _ref5 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, scrollLeft = _ref5.scrollLeft, scrollTop = _ref5.scrollTop;
this._setScrollPosition({
scrollLeft: scrollLeft,
scrollTop: scrollTop
});
}
}, {
key: "componentDidMount",
value: function() {
var _props3 = this.props, getScrollbarSize = _props3.getScrollbarSize, scrollLeft = _props3.scrollLeft, scrollToColumn = _props3.scrollToColumn, scrollTop = _props3.scrollTop, scrollToRow = _props3.scrollToRow;
this._handleInvalidatedGridSize(), this._scrollbarSizeMeasured || (this._scrollbarSize = getScrollbarSize(),
this._scrollbarSizeMeasured = !0, this.setState({})), (scrollLeft >= 0 || scrollTop >= 0) && this._setScrollPosition({
scrollLeft: scrollLeft,
scrollTop: scrollTop
}), (scrollToColumn >= 0 || scrollToRow >= 0) && (this._updateScrollLeftForScrollToColumn(),
this._updateScrollTopForScrollToRow()), this._invokeOnGridRenderedHelper(), this._invokeOnScrollMemoizer({
scrollLeft: scrollLeft || 0,
scrollTop: scrollTop || 0,
totalColumnsWidth: this._columnSizeAndPositionManager.getTotalSize(),
totalRowsHeight: this._rowSizeAndPositionManager.getTotalSize()
});
}
}, {
key: "componentDidUpdate",
value: function(prevProps, prevState) {
var _this2 = this, _props4 = this.props, autoHeight = _props4.autoHeight, autoWidth = _props4.autoWidth, columnCount = _props4.columnCount, height = _props4.height, rowCount = _props4.rowCount, scrollToAlignment = _props4.scrollToAlignment, scrollToColumn = _props4.scrollToColumn, scrollToRow = _props4.scrollToRow, width = _props4.width, _state = this.state, scrollLeft = _state.scrollLeft, scrollPositionChangeReason = _state.scrollPositionChangeReason, scrollTop = _state.scrollTop;
this._handleInvalidatedGridSize();
var columnOrRowCountJustIncreasedFromZero = columnCount > 0 && 0 === prevProps.columnCount || rowCount > 0 && 0 === prevProps.rowCount;
if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED && (!autoWidth && scrollLeft >= 0 && (scrollLeft !== prevState.scrollLeft && scrollLeft !== this._scrollingContainer.scrollLeft || columnOrRowCountJustIncreasedFromZero) && (this._scrollingContainer.scrollLeft = scrollLeft),
!autoHeight && scrollTop >= 0 && (scrollTop !== prevState.scrollTop && scrollTop !== this._scrollingContainer.scrollTop || columnOrRowCountJustIncreasedFromZero) && (this._scrollingContainer.scrollTop = scrollTop)),
this._recomputeScrollLeftFlag ? (this._recomputeScrollLeftFlag = !1, this._updateScrollLeftForScrollToColumn(this.props)) : (0,
_updateScrollIndexHelper2.default)({
cellSizeAndPositionManager: this._columnSizeAndPositionManager,
previousCellsCount: prevProps.columnCount,
previousCellSize: prevProps.columnWidth,
previousScrollToAlignment: prevProps.scrollToAlignment,
previousScrollToIndex: prevProps.scrollToColumn,
previousSize: prevProps.width,
scrollOffset: scrollLeft,
scrollToAlignment: scrollToAlignment,
scrollToIndex: scrollToColumn,
size: width,
updateScrollIndexCallback: function(scrollToColumn) {
return _this2._updateScrollLeftForScrollToColumn(_this2.props);
}
}), this._recomputeScrollTopFlag ? (this._recomputeScrollTopFlag = !1, this._updateScrollTopForScrollToRow(this.props)) : (0,
_updateScrollIndexHelper2.default)({
cellSizeAndPositionManager: this._rowSizeAndPositionManager,
previousCellsCount: prevProps.rowCount,
previousCellSize: prevProps.rowHeight,
previousScrollToAlignment: prevProps.scrollToAlignment,
previousScrollToIndex: prevProps.scrollToRow,
previousSize: prevProps.height,
scrollOffset: scrollTop,
scrollToAlignment: scrollToAlignment,
scrollToIndex: scrollToRow,
size: height,
updateScrollIndexCallback: function(scrollToRow) {
return _this2._updateScrollTopForScrollToRow(_this2.props);
}
}), this._invokeOnGridRenderedHelper(), scrollLeft !== prevState.scrollLeft || scrollTop !== prevState.scrollTop) {
var totalRowsHeight = this._rowSizeAndPositionManager.getTotalSize(), totalColumnsWidth = this._columnSizeAndPositionManager.getTotalSize();
this._invokeOnScrollMemoizer({
scrollLeft: scrollLeft,
scrollTop: scrollTop,
totalColumnsWidth: totalColumnsWidth,
totalRowsHeight: totalRowsHeight
});
}
}
}, {
key: "componentWillMount",
value: function() {
var getScrollbarSize = this.props.getScrollbarSize;
this._scrollbarSize = getScrollbarSize(), void 0 === this._scrollbarSize ? (this._scrollbarSizeMeasured = !1,
this._scrollbarSize = 0) : this._scrollbarSizeMeasured = !0, this._calculateChildrenToRender();
}
}, {
key: "componentWillUnmount",
value: function() {
this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId);
}
}, {
key: "componentWillReceiveProps",
value: function(nextProps) {
var _this3 = this, _state2 = this.state, scrollLeft = _state2.scrollLeft, scrollTop = _state2.scrollTop;
if (0 === nextProps.columnCount && 0 !== scrollLeft || 0 === nextProps.rowCount && 0 !== scrollTop) this._setScrollPosition({
scrollLeft: 0,
scrollTop: 0
}); else if (nextProps.scrollLeft !== this.props.scrollLeft || nextProps.scrollTop !== this.props.scrollTop) {
var newState = {};
null != nextProps.scrollLeft && (newState.scrollLeft = nextProps.scrollLeft), null != nextProps.scrollTop && (newState.scrollTop = nextProps.scrollTop),
this._setScrollPosition(newState);
}
nextProps.columnWidth === this.props.columnWidth && nextProps.rowHeight === this.props.rowHeight || (this._styleCache = {}),
this._columnWidthGetter = this._wrapSizeGetter(nextProps.columnWidth), this._rowHeightGetter = this._wrapSizeGetter(nextProps.rowHeight),
this._columnSizeAndPositionManager.configure({
cellCount: nextProps.columnCount,
estimatedCellSize: this._getEstimatedColumnSize(nextProps)
}), this._rowSizeAndPositionManager.configure({
cellCount: nextProps.rowCount,
estimatedCellSize: this._getEstimatedRowSize(nextProps)
});
var _props5 = this.props, columnCount = _props5.columnCount, rowCount = _props5.rowCount;
0 !== columnCount && 0 !== rowCount || (columnCount = 0, rowCount = 0), nextProps.autoHeight && nextProps.isScrolling === !1 && this.props.isScrolling === !0 && this._resetStyleCache(),
(0, _calculateSizeAndPositionDataAndUpdateScrollOffset2.default)({
cellCount: columnCount,
cellSize: this.props.columnWidth,
computeMetadataCallback: function() {
return _this3._columnSizeAndPositionManager.resetCell(0);
},
computeMetadataCallbackProps: nextProps,
nextCellsCount: nextProps.columnCount,
nextCellSize: nextProps.columnWidth,
nextScrollToIndex: nextProps.scrollToColumn,
scrollToIndex: this.props.scrollToColumn,
updateScrollOffsetForScrollToIndex: function() {
return _this3._updateScrollLeftForScrollToColumn(nextProps, _this3.state);
}
}), (0, _calculateSizeAndPositionDataAndUpdateScrollOffset2.default)({
cellCount: rowCount,
cellSize: this.props.rowHeight,
computeMetadataCallback: function() {
return _this3._rowSizeAndPositionManager.resetCell(0);
},
computeMetadataCallbackProps: nextProps,
nextCellsCount: nextProps.rowCount,
nextCellSize: nextProps.rowHeight,
nextScrollToIndex: nextProps.scrollToRow,
scrollToIndex: this.props.scrollToRow,
updateScrollOffsetForScrollToIndex: function() {
return _this3._updateScrollTopForScrollToRow(nextProps, _this3.state);
}
});
}
}, {
key: "componentWillUpdate",
value: function(nextProps, nextState) {
this._calculateChildrenToRender(nextProps, nextState);
}
}, {
key: "render",
value: function() {
var _props6 = this.props, autoContainerWidth = _props6.autoContainerWidth, autoHeight = _props6.autoHeight, autoWidth = _props6.autoWidth, className = _props6.className, containerStyle = _props6.containerStyle, height = _props6.height, id = _props6.id, noContentRenderer = _props6.noContentRenderer, role = _props6.role, style = _props6.style, tabIndex = _props6.tabIndex, width = _props6.width, isScrolling = this._isScrolling(), gridStyle = {
boxSizing: "border-box",
direction: "ltr",
height: autoHeight ? "auto" : height,
position: "relative",
width: autoWidth ? "auto" : width,
WebkitOverflowScrolling: "touch",
willChange: "transform"
}, totalColumnsWidth = this._columnSizeAndPositionManager.getTotalSize(), totalRowsHeight = this._rowSizeAndPositionManager.getTotalSize(), verticalScrollBarSize = totalRowsHeight > height ? this._scrollbarSize : 0, horizontalScrollBarSize = totalColumnsWidth > width ? this._scrollbarSize : 0;
gridStyle.overflowX = totalColumnsWidth + verticalScrollBarSize <= width ? "hidden" : "auto",
gridStyle.overflowY = totalRowsHeight + horizontalScrollBarSize <= height ? "hidden" : "auto";
var childrenToDisplay = this._childrenToDisplay, showNoContentRenderer = 0 === childrenToDisplay.length && height > 0 && width > 0;
return _react2.default.createElement("div", {
ref: this._setScrollingContainerRef,
"aria-label": this.props["aria-label"],
className: (0, _classnames2.default)("ReactVirtualized__Grid", className),
id: id,
onScroll: this._onScroll,
role: role,
style: (0, _extends3.default)({}, gridStyle, style),
tabIndex: tabIndex
}, childrenToDisplay.length > 0 && _react2.default.createElement("div", {
className: "ReactVirtualized__Grid__innerScrollContainer",
style: (0, _extends3.default)({
width: autoContainerWidth ? "auto" : totalColumnsWidth,
height: totalRowsHeight,
maxWidth: totalColumnsWidth,
maxHeight: totalRowsHeight,
overflow: "hidden",
pointerEvents: isScrolling ? "none" : "",
position: "relative"
}, containerStyle)
}, childrenToDisplay), showNoContentRenderer && noContentRenderer());
}
}, {
key: "_calculateChildrenToRender",
value: function() {
var props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.props, state = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.state, cellRenderer = props.cellRenderer, cellRangeRenderer = props.cellRangeRenderer, columnCount = props.columnCount, deferredMeasurementCache = props.deferredMeasurementCache, height = props.height, overscanColumnCount = props.overscanColumnCount, overscanIndicesGetter = props.overscanIndicesGetter, overscanRowCount = props.overscanRowCount, rowCount = props.rowCount, width = props.width, scrollDirectionHorizontal = state.scrollDirectionHorizontal, scrollDirectionVertical = state.scrollDirectionVertical, scrollLeft = state.scrollLeft, scrollTop = state.scrollTop, isScrolling = this._isScrolling(props, state);
if (this._childrenToDisplay = [], height > 0 && width > 0) {
var visibleColumnIndices = this._columnSizeAndPositionManager.getVisibleCellRange({
containerSize: width,
offset: scrollLeft
}), visibleRowIndices = this._rowSizeAndPositionManager.getVisibleCellRange({
containerSize: height,
offset: scrollTop
}), horizontalOffsetAdjustment = this._columnSizeAndPositionManager.getOffsetAdjustment({
containerSize: width,
offset: scrollLeft
}), verticalOffsetAdjustment = this._rowSizeAndPositionManager.getOffsetAdjustment({
containerSize: height,
offset: scrollTop
});
this._renderedColumnStartIndex = visibleColumnIndices.start, this._renderedColumnStopIndex = visibleColumnIndices.stop,
this._renderedRowStartIndex = visibleRowIndices.start, this._renderedRowStopIndex = visibleRowIndices.stop;
var overscanColumnIndices = overscanIndicesGetter({
direction: "horizontal",
cellCount: columnCount,
overscanCellsCount: overscanColumnCount,
scrollDirection: scrollDirectionHorizontal,
startIndex: this._renderedColumnStartIndex,
stopIndex: this._renderedColumnStopIndex
}), overscanRowIndices = overscanIndicesGetter({
direction: "vertical",
cellCount: rowCount,
overscanCellsCount: overscanRowCount,
scrollDirection: scrollDirectionVertical,
startIndex: this._renderedRowStartIndex,
stopIndex: this._renderedRowStopIndex
});
this._columnStartIndex = overscanColumnIndices.overscanStartIndex, this._columnStopIndex = overscanColumnIndices.overscanStopIndex,
this._rowStartIndex = overscanRowIndices.overscanStartIndex, this._rowStopIndex = overscanRowIndices.overscanStopIndex,
this._childrenToDisplay = cellRangeRenderer({
cellCache: this._cellCache,
cellRenderer: cellRenderer,
columnSizeAndPositionManager: this._columnSizeAndPositionManager,
columnStartIndex: this._columnStartIndex,
columnStopIndex: this._columnStopIndex,
deferredMeasurementCache: deferredMeasurementCache,
horizontalOffsetAdjustment: horizontalOffsetAdjustment,
isScrolling: isScrolling,
parent: this,
rowSizeAndPositionManager: this._rowSizeAndPositionManager,
rowStartIndex: this._rowStartIndex,
rowStopIndex: this._rowStopIndex,
scrollLeft: scrollLeft,
scrollTop: scrollTop,
styleCache: this._styleCache,
verticalOffsetAdjustment: verticalOffsetAdjustment,
visibleColumnIndices: visibleColumnIndices,
visibleRowIndices: visibleRowIndices
});
}
}
}, {
key: "_debounceScrollEnded",
value: function() {
var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval;
this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId),
this._disablePointerEventsTimeoutId = setTimeout(this._debounceScrollEndedCallback, scrollingResetTimeInterval);
}
}, {
key: "_debounceScrollEndedCallback",
value: function() {
this._disablePointerEventsTimeoutId = null, this._resetStyleCache();
}
}, {
key: "_getEstimatedColumnSize",
value: function(props) {
return "number" == typeof props.columnWidth ? props.columnWidth : props.estimatedColumnSize;
}
}, {
key: "_getEstimatedRowSize",
value: function(props) {
return "number" == typeof props.rowHeight ? props.rowHeight : props.estimatedRowSize;
}
}, {
key: "_handleInvalidatedGridSize",
value: function() {
if ("number" == typeof this._deferredInvalidateColumnIndex) {
var columnIndex = this._deferredInvalidateColumnIndex, rowIndex = this._deferredInvalidateRowIndex;
this._deferredInvalidateColumnIndex = null, this._deferredInvalidateRowIndex = null,
this.recomputeGridSize({
columnIndex: columnIndex,
rowIndex: rowIndex
});
}
}
}, {
key: "_invokeOnGridRenderedHelper",
value: function() {
var onSectionRendered = this.props.onSectionRendered;
this._onGridRenderedMemoizer({
callback: onSectionRendered,
indices: {
columnOverscanStartIndex: this._columnStartIndex,
columnOverscanStopIndex: this._columnStopIndex,
columnStartIndex: this._renderedColumnStartIndex,
columnStopIndex: this._renderedColumnStopIndex,
rowOverscanStartIndex: this._rowStartIndex,
rowOverscanStopIndex: this._rowStopIndex,
rowStartIndex: this._renderedRowStartIndex,
rowStopIndex: this._renderedRowStopIndex
}
});
}
}, {
key: "_invokeOnScrollMemoizer",
value: function(_ref6) {
var _this4 = this, scrollLeft = _ref6.scrollLeft, scrollTop = _ref6.scrollTop, totalColumnsWidth = _ref6.totalColumnsWidth, totalRowsHeight = _ref6.totalRowsHeight;
this._onScrollMemoizer({
callback: function(_ref7) {
var scrollLeft = _ref7.scrollLeft, scrollTop = _ref7.scrollTop, _props7 = _this4.props, height = _props7.height, onScroll = _props7.onScroll, width = _props7.width;
onScroll({
clientHeight: height,
clientWidth: width,
scrollHeight: totalRowsHeight,
scrollLeft: scrollLeft,
scrollTop: scrollTop,
scrollWidth: totalColumnsWidth
});
},
indices: {
scrollLeft: scrollLeft,
scrollTop: scrollTop
}
});
}
}, {
key: "_isScrolling",
value: function() {
var props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.props, state = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.state;
return Object.hasOwnProperty.call(props, "isScrolling") ? props.isScrolling : state.isScrolling;
}
}, {
key: "_setScrollingContainerRef",
value: function(ref) {
this._scrollingContainer = ref;
}
}, {
key: "_setScrollPosition",
value: function(_ref8) {
var scrollLeft = _ref8.scrollLeft, scrollTop = _ref8.scrollTop, newState = {
scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED
};
scrollLeft >= 0 && (newState.scrollDirectionHorizontal = scrollLeft > this.state.scrollLeft ? _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD : _defaultOverscanIndicesGetter.SCROLL_DIRECTION_BACKWARD,
newState.scrollLeft = scrollLeft), scrollTop >= 0 && (newState.scrollDirectionVertical = scrollTop > this.state.scrollTop ? _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD : _defaultOverscanIndicesGetter.SCROLL_DIRECTION_BACKWARD,
newState.scrollTop = scrollTop), (scrollLeft >= 0 && scrollLeft !== this.state.scrollLeft || scrollTop >= 0 && scrollTop !== this.state.scrollTop) && this.setState(newState);
}
}, {
key: "_wrapPropertyGetter",
value: function(value) {
return "function" == typeof value ? value : function() {
return value;
};
}
}, {
key: "_wrapSizeGetter",
value: function(size) {
return this._wrapPropertyGetter(size);
}
}, {
key: "_getCalculatedScrollLeft",
value: function() {
var props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.props, state = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.state, columnCount = props.columnCount, height = props.height, scrollToAlignment = props.scrollToAlignment, scrollToColumn = props.scrollToColumn, width = props.width, scrollLeft = state.scrollLeft;
if (scrollToColumn >= 0 && columnCount > 0) {
var targetIndex = Math.max(0, Math.min(columnCount - 1, scrollToColumn)), totalRowsHeight = this._rowSizeAndPositionManager.getTotalSize(), scrollBarSize = totalRowsHeight > height ? this._scrollbarSize : 0;
return this._columnSizeAndPositionManager.getUpdatedOffsetForIndex({
align: scrollToAlignment,
containerSize: width - scrollBarSize,
currentOffset: scrollLeft,
targetIndex: targetIndex
});
}
}
}, {
key: "_updateScrollLeftForScrollToColumn",
value: function() {
var props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.props, state = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.state, scrollLeft = state.scrollLeft, calculatedScrollLeft = this._getCalculatedScrollLeft(props, state);
calculatedScrollLeft >= 0 && scrollLeft !== calculatedScrollLeft && this._setScrollPosition({
scrollLeft: calculatedScrollLeft
});
}
}, {
key: "_getCalculatedScrollTop",
value: function() {
var props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.props, state = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.state, height = props.height, rowCount = props.rowCount, scrollToAlignment = props.scrollToAlignment, scrollToRow = props.scrollToRow, width = props.width, scrollTop = state.scrollTop;
if (scrollToRow >= 0 && rowCount > 0) {
var targetIndex = Math.max(0, Math.min(rowCount - 1, scrollToRow)), totalColumnsWidth = this._columnSizeAndPositionManager.getTotalSize(), scrollBarSize = totalColumnsWidth > width ? this._scrollbarSize : 0;
return this._rowSizeAndPositionManager.getUpdatedOffsetForIndex({
align: scrollToAlignment,
containerSize: height - scrollBarSize,
currentOffset: scrollTop,
targetIndex: targetIndex
});
}
}
}, {
key: "_resetStyleCache",
value: function() {
var styleCache = this._styleCache;
this._cellCache = {}, this._styleCache = {};
for (var rowIndex = this._rowStartIndex; rowIndex <= this._rowStopIndex; rowIndex++) for (var columnIndex = this._columnStartIndex; columnIndex <= this._columnStopIndex; columnIndex++) {
var key = rowIndex + "-" + columnIndex;
this._styleCache[key] = styleCache[key];
}
this.setState({
isScrolling: !1
});
}
}, {
key: "_updateScrollTopForScrollToRow",
value: function() {
var props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.props, state = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.state, scrollTop = state.scrollTop, calculatedScrollTop = this._getCalculatedScrollTop(props, state);
calculatedScrollTop >= 0 && scrollTop !== calculatedScrollTop && this._setScrollPosition({
scrollTop: calculatedScrollTop
});
}
}, {
key: "_onScroll",
value: function(event) {
if (event.target === this._scrollingContainer && !(event.target.scrollTop < 0)) {
this._debounceScrollEnded();
var _props8 = this.props, autoHeight = _props8.autoHeight, autoWidth = _props8.autoWidth, height = _props8.height, width = _props8.width, _event$target = event.target, eventScrollLeft = _event$target.scrollLeft, eventScrollTop = _event$target.scrollTop, scrollbarSize = this._scrollbarSize, totalRowsHeight = this._rowSizeAndPositionManager.getTotalSize(), totalColumnsWidth = this._columnSizeAndPositionManager.getTotalSize(), scrollLeft = Math.min(Math.max(0, totalColumnsWidth - width + scrollbarSize), eventScrollLeft), scrollTop = Math.min(Math.max(0, totalRowsHeight - height + scrollbarSize), eventScrollTop);
if (this.state.scrollLeft !== scrollLeft || this.state.scrollTop !== scrollTop) {
var scrollDirectionHorizontal = scrollLeft !== this.state.scrollLeft ? scrollLeft > this.state.scrollLeft ? _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD : _defaultOverscanIndicesGetter.SCROLL_DIRECTION_BACKWARD : this.state.scrollDirectionHorizontal, scrollDirectionVertical = scrollTop !== this.state.scrollTop ? scrollTop > this.state.scrollTop ? _defaultOverscanIndicesGetter.SCROLL_DIRECTION_FORWARD : _defaultOverscanIndicesGetter.SCROLL_DIRECTION_BACKWARD : this.state.scrollDirectionVertical, newState = {
isScrolling: !0,
scrollDirectionHorizontal: scrollDirectionHorizontal,
scrollDirectionVertical: scrollDirectionVertical,
scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.OBSERVED
};
autoHeight || (newState.scrollTop = scrollTop), autoWidth || (newState.scrollLeft = scrollLeft),
this.setState(newState);
}
this._invokeOnScrollMemoizer({
scrollLeft: scrollLeft,
scrollTop: scrollTop,
totalColumnsWidth: totalColumnsWidth,
totalRowsHeight: totalRowsHeight
});
}
}
} ]), Grid;
}(_react.PureComponent);
Grid.defaultProps = {
"aria-label": "grid",
cellRangeRenderer: _defaultCellRangeRenderer2.default,
estimatedColumnSize: 100,
estimatedRowSize: 30,
getScrollbarSize: _scrollbarSize2.default,
noContentRenderer: function() {
return null;
},
onScroll: function() {
return null;
},
onSectionRendered: function() {
return null;
},
overscanColumnCount: 0,
overscanIndicesGetter: _defaultOverscanIndicesGetter2.default,
overscanRowCount: 10,
role: "grid",
scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL,
scrollToAlignment: "auto",
scrollToColumn: -1,
scrollToRow: -1,
style: {},
tabIndex: 0
}, exports.default = Grid;
}, /* 129 */
/***/
function(module, exports) {
"use strict";
function calculateSizeAndPositionDataAndUpdateScrollOffset(_ref) {
var cellCount = _ref.cellCount, cellSize = _ref.cellSize, computeMetadataCallback = _ref.computeMetadataCallback, computeMetadataCallbackProps = _ref.computeMetadataCallbackProps, nextCellsCount = _ref.nextCellsCount, nextCellSize = _ref.nextCellSize, nextScrollToIndex = _ref.nextScrollToIndex, scrollToIndex = _ref.scrollToIndex, updateScrollOffsetForScrollToIndex = _ref.updateScrollOffsetForScrollToIndex;
cellCount === nextCellsCount && ("number" != typeof cellSize && "number" != typeof nextCellSize || cellSize === nextCellSize) || (computeMetadataCallback(computeMetadataCallbackProps),
scrollToIndex >= 0 && scrollToIndex === nextScrollToIndex && updateScrollOffsetForScrollToIndex());
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = calculateSizeAndPositionDataAndUpdateScrollOffset;
}, /* 130 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.DEFAULT_MAX_SCROLL_SIZE = void 0;
var _objectWithoutProperties2 = __webpack_require__(112), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _CellSizeAndPositionManager = __webpack_require__(131), _CellSizeAndPositionManager2 = _interopRequireDefault(_CellSizeAndPositionManager), DEFAULT_MAX_SCROLL_SIZE = exports.DEFAULT_MAX_SCROLL_SIZE = 15e5, ScalingCellSizeAndPositionManager = function() {
function ScalingCellSizeAndPositionManager(_ref) {
var _ref$maxScrollSize = _ref.maxScrollSize, maxScrollSize = void 0 === _ref$maxScrollSize ? DEFAULT_MAX_SCROLL_SIZE : _ref$maxScrollSize, params = (0,
_objectWithoutProperties3.default)(_ref, [ "maxScrollSize" ]);
(0, _classCallCheck3.default)(this, ScalingCellSizeAndPositionManager), this._cellSizeAndPositionManager = new _CellSizeAndPositionManager2.default(params),
this._maxScrollSize = maxScrollSize;
}
return (0, _createClass3.default)(ScalingCellSizeAndPositionManager, [ {
key: "areOffsetsAdjusted",
value: function() {
return this._cellSizeAndPositionManager.getTotalSize() > this._maxScrollSize;
}
}, {
key: "configure",
value: function(params) {
this._cellSizeAndPositionManager.configure(params);
}
}, {
key: "getCellCount",
value: function() {
return this._cellSizeAndPositionManager.getCellCount();
}
}, {
key: "getEstimatedCellSize",
value: function() {
return this._cellSizeAndPositionManager.getEstimatedCellSize();
}
}, {
key: "getLastMeasuredIndex",
value: function() {
return this._cellSizeAndPositionManager.getLastMeasuredIndex();
}
}, {
key: "getOffsetAdjustment",
value: function(_ref2) {
var containerSize = _ref2.containerSize, offset = _ref2.offset, totalSize = this._cellSizeAndPositionManager.getTotalSize(), safeTotalSize = this.getTotalSize(), offsetPercentage = this._getOffsetPercentage({
containerSize: containerSize,
offset: offset,
totalSize: safeTotalSize
});
return Math.round(offsetPercentage * (safeTotalSize - totalSize));
}
}, {
key: "getSizeAndPositionOfCell",
value: function(index) {
return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index);
}
}, {
key: "getSizeAndPositionOfLastMeasuredCell",
value: function() {
return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();
}
}, {
key: "getTotalSize",
value: function() {
return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());
}
}, {
key: "getUpdatedOffsetForIndex",
value: function(_ref3) {
var _ref3$align = _ref3.align, align = void 0 === _ref3$align ? "auto" : _ref3$align, containerSize = _ref3.containerSize, currentOffset = _ref3.currentOffset, targetIndex = _ref3.targetIndex, totalSize = _ref3.totalSize;
currentOffset = this._safeOffsetToOffset({
containerSize: containerSize,
offset: currentOffset
});
var offset = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({
align: align,
containerSize: containerSize,
currentOffset: currentOffset,
targetIndex: targetIndex,
totalSize: totalSize
});
return this._offsetToSafeOffset({
containerSize: containerSize,
offset: offset
});
}
}, {
key: "getVisibleCellRange",
value: function(_ref4) {
var containerSize = _ref4.containerSize, offset = _ref4.offset;
return offset = this._safeOffsetToOffset({
containerSize: containerSize,
offset: offset
}), this._cellSizeAndPositionManager.getVisibleCellRange({
containerSize: containerSize,
offset: offset
});
}
}, {
key: "resetCell",
value: function(index) {
this._cellSizeAndPositionManager.resetCell(index);
}
}, {
key: "_getOffsetPercentage",
value: function(_ref5) {
var containerSize = _ref5.containerSize, offset = _ref5.offset, totalSize = _ref5.totalSize;
return totalSize <= containerSize ? 0 : offset / (totalSize - containerSize);
}
}, {
key: "_offsetToSafeOffset",
value: function(_ref6) {
var containerSize = _ref6.containerSize, offset = _ref6.offset, totalSize = this._cellSizeAndPositionManager.getTotalSize(), safeTotalSize = this.getTotalSize();
if (totalSize === safeTotalSize) return offset;
var offsetPercentage = this._getOffsetPercentage({
containerSize: containerSize,
offset: offset,
totalSize: totalSize
});
return Math.round(offsetPercentage * (safeTotalSize - containerSize));
}
}, {
key: "_safeOffsetToOffset",
value: function(_ref7) {
var containerSize = _ref7.containerSize, offset = _ref7.offset, totalSize = this._cellSizeAndPositionManager.getTotalSize(), safeTotalSize = this.getTotalSize();
if (totalSize === safeTotalSize) return offset;
var offsetPercentage = this._getOffsetPercentage({
containerSize: containerSize,
offset: offset,
totalSize: safeTotalSize
});
return Math.round(offsetPercentage * (totalSize - containerSize));
}
} ]), ScalingCellSizeAndPositionManager;
}();
exports.default = ScalingCellSizeAndPositionManager;
}, /* 131 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), CellSizeAndPositionManager = function() {
function CellSizeAndPositionManager(_ref) {
var _ref$batchAllCells = _ref.batchAllCells, batchAllCells = void 0 !== _ref$batchAllCells && _ref$batchAllCells, cellCount = _ref.cellCount, cellSizeGetter = _ref.cellSizeGetter, estimatedCellSize = _ref.estimatedCellSize;
(0, _classCallCheck3.default)(this, CellSizeAndPositionManager), this._batchAllCells = batchAllCells,
this._cellSizeGetter = cellSizeGetter, this._cellCount = cellCount, this._estimatedCellSize = estimatedCellSize,
this._cellSizeAndPositionData = {}, this._lastMeasuredIndex = -1, this._lastBatchedIndex = -1;
}
return (0, _createClass3.default)(CellSizeAndPositionManager, [ {
key: "areOffsetsAdjusted",
value: function() {
return !1;
}
}, {
key: "configure",
value: function(_ref2) {
var cellCount = _ref2.cellCount, estimatedCellSize = _ref2.estimatedCellSize;
this._cellCount = cellCount, this._estimatedCellSize = estimatedCellSize;
}
}, {
key: "getCellCount",
value: function() {
return this._cellCount;
}
}, {
key: "getEstimatedCellSize",
value: function() {
return this._estimatedCellSize;
}
}, {
key: "getLastMeasuredIndex",
value: function() {
return this._lastMeasuredIndex;
}
}, {
key: "getOffsetAdjustment",
value: function(_ref3) {
_ref3.containerSize, _ref3.offset;
return 0;
}
}, {
key: "getSizeAndPositionOfCell",
value: function(index) {
if (index < 0 || index >= this._cellCount) throw Error("Requested index " + index + " is outside of range 0.." + this._cellCount);
if (index > this._lastMeasuredIndex) for (var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell(), _offset = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size, i = this._lastMeasuredIndex + 1; i <= index; i++) {
var _size = this._cellSizeGetter({
index: i
});
if (void 0 === _size || isNaN(_size)) throw Error("Invalid size returned for cell " + i + " of value " + _size);
null === _size ? (this._cellSizeAndPositionData[i] = {
offset: _offset,
size: 0
}, this._lastBatchedIndex = index) : (this._cellSizeAndPositionData[i] = {
offset: _offset,
size: _size
}, _offset += _size, this._lastMeasuredIndex = index);
}
return this._cellSizeAndPositionData[index];
}
}, {
key: "getSizeAndPositionOfLastMeasuredCell",
value: function() {
return this._lastMeasuredIndex >= 0 ? this._cellSizeAndPositionData[this._lastMeasuredIndex] : {
offset: 0,
size: 0
};
}
}, {
key: "getTotalSize",
value: function() {
var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();
return lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size + (this._cellCount - this._lastMeasuredIndex - 1) * this._estimatedCellSize;
}
}, {
key: "getUpdatedOffsetForIndex",
value: function(_ref4) {
var _ref4$align = _ref4.align, align = void 0 === _ref4$align ? "auto" : _ref4$align, containerSize = _ref4.containerSize, currentOffset = _ref4.currentOffset, targetIndex = _ref4.targetIndex;
if (containerSize <= 0) return 0;
var datum = this.getSizeAndPositionOfCell(targetIndex), maxOffset = datum.offset, minOffset = maxOffset - containerSize + datum.size, idealOffset = void 0;
switch (align) {
case "start":
idealOffset = maxOffset;
break;
case "end":
idealOffset = minOffset;
break;
case "center":
idealOffset = maxOffset - (containerSize - datum.size) / 2;
break;
default:
idealOffset = Math.max(minOffset, Math.min(maxOffset, currentOffset));
}
var totalSize = this.getTotalSize();
return Math.max(0, Math.min(totalSize - containerSize, idealOffset));
}
}, {
key: "getVisibleCellRange",
value: function(params) {
if (this._batchAllCells) return {
start: 0,
stop: this._cellCount - 1
};
var containerSize = params.containerSize, offset = params.offset, totalSize = this.getTotalSize();
if (0 === totalSize) return {};
var maxOffset = offset + containerSize, start = this._findNearestCell(offset), datum = this.getSizeAndPositionOfCell(start);
offset = datum.offset + datum.size;
for (var stop = start; offset < maxOffset && stop < this._cellCount - 1; ) stop++,
offset += this.getSizeAndPositionOfCell(stop).size;
return {
start: start,
stop: stop
};
}
}, {
key: "resetCell",
value: function(index) {
this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, index - 1);
}
}, {
key: "_binarySearch",
value: function(_ref5) {
for (var high = _ref5.high, low = _ref5.low, offset = _ref5.offset, middle = void 0, currentOffset = void 0; low <= high; ) {
if (middle = low + Math.floor((high - low) / 2), currentOffset = this.getSizeAndPositionOfCell(middle).offset,
currentOffset === offset) return middle;
currentOffset < offset ? low = middle + 1 : currentOffset > offset && (high = middle - 1);
}
if (low > 0) return low - 1;
}
}, {
key: "_exponentialSearch",
value: function(_ref6) {
for (var index = _ref6.index, offset = _ref6.offset, interval = 1; index < this._cellCount && this.getSizeAndPositionOfCell(index).offset < offset; ) index += interval,
interval *= 2;
return this._binarySearch({
high: Math.min(index, this._cellCount - 1),
low: Math.floor(index / 2),
offset: offset
});
}
}, {
key: "_findNearestCell",
value: function(offset) {
if (isNaN(offset)) throw Error("Invalid offset " + offset + " specified");
offset = Math.max(0, offset);
var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell(), lastMeasuredIndex = Math.max(0, this._lastMeasuredIndex);
return lastMeasuredCellSizeAndPosition.offset >= offset ? this._binarySearch({
high: lastMeasuredIndex,
low: 0,
offset: offset
}) : this._exponentialSearch({
index: lastMeasuredIndex,
offset: offset
});
}
} ]), CellSizeAndPositionManager;
}();
exports.default = CellSizeAndPositionManager;
}, /* 132 */
/***/
function(module, exports) {
"use strict";
function defaultOverscanIndicesGetter(_ref) {
var cellCount = (_ref.direction, _ref.cellCount), overscanCellsCount = _ref.overscanCellsCount, scrollDirection = _ref.scrollDirection, startIndex = _ref.startIndex, stopIndex = _ref.stopIndex, overscanStartIndex = void 0, overscanStopIndex = void 0;
switch (scrollDirection) {
case SCROLL_DIRECTION_FORWARD:
overscanStartIndex = startIndex, overscanStopIndex = stopIndex + overscanCellsCount;
break;
case SCROLL_DIRECTION_BACKWARD:
overscanStartIndex = startIndex - overscanCellsCount, overscanStopIndex = stopIndex;
}
return {
overscanStartIndex: Math.max(0, overscanStartIndex),
overscanStopIndex: Math.min(cellCount - 1, overscanStopIndex)
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = defaultOverscanIndicesGetter;
var SCROLL_DIRECTION_BACKWARD = exports.SCROLL_DIRECTION_BACKWARD = -1, SCROLL_DIRECTION_FORWARD = exports.SCROLL_DIRECTION_FORWARD = 1;
exports.SCROLL_DIRECTION_HORIZONTAL = "horizontal", exports.SCROLL_DIRECTION_VERTICAL = "vertical";
}, /* 133 */
/***/
function(module, exports) {
"use strict";
function updateScrollIndexHelper(_ref) {
var cellSize = _ref.cellSize, cellSizeAndPositionManager = _ref.cellSizeAndPositionManager, previousCellsCount = _ref.previousCellsCount, previousCellSize = _ref.previousCellSize, previousScrollToAlignment = _ref.previousScrollToAlignment, previousScrollToIndex = _ref.previousScrollToIndex, previousSize = _ref.previousSize, scrollOffset = _ref.scrollOffset, scrollToAlignment = _ref.scrollToAlignment, scrollToIndex = _ref.scrollToIndex, size = _ref.size, updateScrollIndexCallback = _ref.updateScrollIndexCallback, cellCount = cellSizeAndPositionManager.getCellCount(), hasScrollToIndex = scrollToIndex >= 0 && scrollToIndex < cellCount, sizeHasChanged = size !== previousSize || !previousCellSize || "number" == typeof cellSize && cellSize !== previousCellSize;
hasScrollToIndex && (sizeHasChanged || scrollToAlignment !== previousScrollToAlignment || scrollToIndex !== previousScrollToIndex) ? updateScrollIndexCallback(scrollToIndex) : !hasScrollToIndex && cellCount > 0 && (size < previousSize || cellCount < previousCellsCount) && scrollOffset > cellSizeAndPositionManager.getTotalSize() - size && updateScrollIndexCallback(cellCount - 1);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = updateScrollIndexHelper;
}, /* 134 */
/***/
function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */
(function(process) {
"use strict";
function defaultCellRangeRenderer(_ref) {
for (var cellCache = _ref.cellCache, cellRenderer = _ref.cellRenderer, columnSizeAndPositionManager = _ref.columnSizeAndPositionManager, columnStartIndex = _ref.columnStartIndex, columnStopIndex = _ref.columnStopIndex, deferredMeasurementCache = _ref.deferredMeasurementCache, horizontalOffsetAdjustment = _ref.horizontalOffsetAdjustment, isScrolling = _ref.isScrolling, parent = _ref.parent, rowSizeAndPositionManager = _ref.rowSizeAndPositionManager, rowStartIndex = _ref.rowStartIndex, rowStopIndex = _ref.rowStopIndex, styleCache = (_ref.scrollLeft,
_ref.scrollTop, _ref.styleCache), verticalOffsetAdjustment = _ref.verticalOffsetAdjustment, visibleColumnIndices = _ref.visibleColumnIndices, visibleRowIndices = _ref.visibleRowIndices, deferredMode = "undefined" != typeof deferredMeasurementCache, renderedCells = [], areOffsetsAdjusted = columnSizeAndPositionManager.areOffsetsAdjusted() || rowSizeAndPositionManager.areOffsetsAdjusted(), canCacheStyle = !isScrolling || !areOffsetsAdjusted, rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) for (var rowDatum = rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex), columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {
var columnDatum = columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex), isVisible = columnIndex >= visibleColumnIndices.start && columnIndex <= visibleColumnIndices.stop && rowIndex >= visibleRowIndices.start && rowIndex <= visibleRowIndices.stop, key = rowIndex + "-" + columnIndex, style = void 0;
canCacheStyle && styleCache[key] ? style = styleCache[key] : deferredMode && !deferredMeasurementCache.has(rowIndex, columnIndex) ? style = {
height: "auto",
left: 0,
position: "absolute",
top: 0,
width: "auto"
} : (style = {
height: rowDatum.size,
left: columnDatum.offset + horizontalOffsetAdjustment,
position: "absolute",
top: rowDatum.offset + verticalOffsetAdjustment,
width: columnDatum.size
}, styleCache[key] = style);
var cellRendererParams = {
columnIndex: columnIndex,
isScrolling: isScrolling,
isVisible: isVisible,
key: key,
parent: parent,
rowIndex: rowIndex,
style: style
}, renderedCell = void 0;
!isScrolling || horizontalOffsetAdjustment || verticalOffsetAdjustment ? renderedCell = cellRenderer(cellRendererParams) : (cellCache[key] || (cellCache[key] = cellRenderer(cellRendererParams)),
renderedCell = cellCache[key]), null != renderedCell && renderedCell !== !1 && ("production" !== process.env.NODE_ENV && warnAboutMissingStyle(parent, renderedCell),
renderedCells.push(renderedCell));
}
return renderedCells;
}
function warnAboutMissingStyle(parent, renderedCell) {
"production" !== process.env.NODE_ENV && renderedCell && (renderedCell.type && renderedCell.type.__internalCellMeasurerFlag && (renderedCell = renderedCell.props.children),
renderedCell && renderedCell.props && void 0 === renderedCell.props.style && parent.__warnedAboutMissingStyle !== !0 && (parent.__warnedAboutMissingStyle = !0,
console.warn("Rendered cell should include style property for positioning.")));
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = defaultCellRangeRenderer;
}).call(exports, __webpack_require__(91));
}, /* 135 */
/***/
function(module, exports) {
"use strict";
function defaultOverscanIndicesGetter(_ref) {
var cellCount = (_ref.direction, _ref.cellCount), overscanCellsCount = _ref.overscanCellsCount, scrollDirection = _ref.scrollDirection, startIndex = _ref.startIndex, stopIndex = _ref.stopIndex, overscanStartIndex = void 0, overscanStopIndex = void 0;
switch (overscanCellsCount = Math.max(1, overscanCellsCount), scrollDirection) {
case SCROLL_DIRECTION_FORWARD:
overscanStartIndex = startIndex - 1, overscanStopIndex = stopIndex + overscanCellsCount;
break;
case SCROLL_DIRECTION_BACKWARD:
overscanStartIndex = startIndex - overscanCellsCount, overscanStopIndex = stopIndex + 1;
}
return {
overscanStartIndex: Math.max(0, overscanStartIndex),
overscanStopIndex: Math.min(cellCount - 1, overscanStopIndex)
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = defaultOverscanIndicesGetter;
var SCROLL_DIRECTION_BACKWARD = exports.SCROLL_DIRECTION_BACKWARD = -1, SCROLL_DIRECTION_FORWARD = exports.SCROLL_DIRECTION_FORWARD = 1;
exports.SCROLL_DIRECTION_HORIZONTAL = "horizontal", exports.SCROLL_DIRECTION_VERTICAL = "vertical";
}, /* 136 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.InfiniteLoader = exports.default = void 0;
var _InfiniteLoader2 = __webpack_require__(137), _InfiniteLoader3 = _interopRequireDefault(_InfiniteLoader2);
exports.default = _InfiniteLoader3.default, exports.InfiniteLoader = _InfiniteLoader3.default;
}, /* 137 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function isRangeVisible(_ref2) {
var lastRenderedStartIndex = _ref2.lastRenderedStartIndex, lastRenderedStopIndex = _ref2.lastRenderedStopIndex, startIndex = _ref2.startIndex, stopIndex = _ref2.stopIndex;
return !(startIndex > lastRenderedStopIndex || stopIndex < lastRenderedStartIndex);
}
function scanForUnloadedRanges(_ref3) {
for (var isRowLoaded = _ref3.isRowLoaded, minimumBatchSize = _ref3.minimumBatchSize, rowCount = _ref3.rowCount, startIndex = _ref3.startIndex, stopIndex = _ref3.stopIndex, unloadedRanges = [], rangeStartIndex = null, rangeStopIndex = null, index = startIndex; index <= stopIndex; index++) {
var loaded = isRowLoaded({
index: index
});
loaded ? null !== rangeStopIndex && (unloadedRanges.push({
startIndex: rangeStartIndex,
stopIndex: rangeStopIndex
}), rangeStartIndex = rangeStopIndex = null) : (rangeStopIndex = index, null === rangeStartIndex && (rangeStartIndex = index));
}
if (null !== rangeStopIndex) {
for (var potentialStopIndex = Math.min(Math.max(rangeStopIndex, rangeStartIndex + minimumBatchSize - 1), rowCount - 1), _index = rangeStopIndex + 1; _index <= potentialStopIndex && !isRowLoaded({
index: _index
}); _index++) rangeStopIndex = _index;
unloadedRanges.push({
startIndex: rangeStartIndex,
stopIndex: rangeStopIndex
});
}
if (unloadedRanges.length) for (var firstUnloadedRange = unloadedRanges[0]; firstUnloadedRange.stopIndex - firstUnloadedRange.startIndex + 1 < minimumBatchSize && firstUnloadedRange.startIndex > 0; ) {
var _index2 = firstUnloadedRange.startIndex - 1;
if (isRowLoaded({
index: _index2
})) break;
firstUnloadedRange.startIndex = _index2;
}
return unloadedRanges;
}
function forceUpdateReactVirtualizedComponent(component) {
var currentIndex = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, recomputeSize = "function" == typeof component.recomputeGridSize ? component.recomputeGridSize : component.recomputeRowHeights;
recomputeSize ? recomputeSize.call(component, currentIndex) : component.forceUpdate();
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2);
exports.isRangeVisible = isRangeVisible, exports.scanForUnloadedRanges = scanForUnloadedRanges,
exports.forceUpdateReactVirtualizedComponent = forceUpdateReactVirtualizedComponent;
var _react = __webpack_require__(97), _propTypes = __webpack_require__(89), _createCallbackMemoizer = (_interopRequireDefault(_propTypes),
__webpack_require__(115)), _createCallbackMemoizer2 = _interopRequireDefault(_createCallbackMemoizer), InfiniteLoader = function(_PureComponent) {
function InfiniteLoader(props, context) {
(0, _classCallCheck3.default)(this, InfiniteLoader);
var _this = (0, _possibleConstructorReturn3.default)(this, (InfiniteLoader.__proto__ || (0,
_getPrototypeOf2.default)(InfiniteLoader)).call(this, props, context));
return _this._loadMoreRowsMemoizer = (0, _createCallbackMemoizer2.default)(), _this._onRowsRendered = _this._onRowsRendered.bind(_this),
_this._registerChild = _this._registerChild.bind(_this), _this;
}
return (0, _inherits3.default)(InfiniteLoader, _PureComponent), (0, _createClass3.default)(InfiniteLoader, [ {
key: "resetLoadMoreRowsCache",
value: function() {
this._loadMoreRowsMemoizer = (0, _createCallbackMemoizer2.default)();
}
}, {
key: "render",
value: function() {
var children = this.props.children;
return children({
onRowsRendered: this._onRowsRendered,
registerChild: this._registerChild
});
}
}, {
key: "_loadUnloadedRanges",
value: function(unloadedRanges) {
var _this2 = this, loadMoreRows = this.props.loadMoreRows;
unloadedRanges.forEach(function(unloadedRange) {
var promise = loadMoreRows(unloadedRange);
promise && promise.then(function() {
isRangeVisible({
lastRenderedStartIndex: _this2._lastRenderedStartIndex,
lastRenderedStopIndex: _this2._lastRenderedStopIndex,
startIndex: unloadedRange.startIndex,
stopIndex: unloadedRange.stopIndex
}) && _this2._registeredChild && forceUpdateReactVirtualizedComponent(_this2._registeredChild, _this2._lastRenderedStartIndex);
});
});
}
}, {
key: "_onRowsRendered",
value: function(_ref) {
var _this3 = this, startIndex = _ref.startIndex, stopIndex = _ref.stopIndex, _props = this.props, isRowLoaded = _props.isRowLoaded, minimumBatchSize = _props.minimumBatchSize, rowCount = _props.rowCount, threshold = _props.threshold;
this._lastRenderedStartIndex = startIndex, this._lastRenderedStopIndex = stopIndex;
var unloadedRanges = scanForUnloadedRanges({
isRowLoaded: isRowLoaded,
minimumBatchSize: minimumBatchSize,
rowCount: rowCount,
startIndex: Math.max(0, startIndex - threshold),
stopIndex: Math.min(rowCount - 1, stopIndex + threshold)
}), squashedUnloadedRanges = unloadedRanges.reduce(function(reduced, unloadedRange) {
return reduced.concat([ unloadedRange.startIndex, unloadedRange.stopIndex ]);
}, []);
this._loadMoreRowsMemoizer({
callback: function() {
_this3._loadUnloadedRanges(unloadedRanges);
},
indices: {
squashedUnloadedRanges: squashedUnloadedRanges
}
});
}
}, {
key: "_registerChild",
value: function(registeredChild) {
this._registeredChild = registeredChild;
}
} ]), InfiniteLoader;
}(_react.PureComponent);
InfiniteLoader.defaultProps = {
minimumBatchSize: 10,
rowCount: 0,
threshold: 15
}, exports.default = InfiniteLoader;
}, /* 138 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.List = exports.default = void 0;
var _List2 = __webpack_require__(139), _List3 = _interopRequireDefault(_List2);
exports.default = _List3.default, exports.List = _List3.default;
}, /* 139 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _getOwnPropertyDescriptor = __webpack_require__(140), _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor), _objectWithoutProperties2 = __webpack_require__(112), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _extends2 = __webpack_require__(107), _extends3 = _interopRequireDefault(_extends2), _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _Grid = __webpack_require__(127), _Grid2 = _interopRequireDefault(_Grid), _propTypes = __webpack_require__(89), _react = (_interopRequireDefault(_propTypes),
__webpack_require__(97)), _react2 = _interopRequireDefault(_react), _classnames = __webpack_require__(114), _classnames2 = _interopRequireDefault(_classnames), List = function(_PureComponent) {
function List(props, context) {
(0, _classCallCheck3.default)(this, List);
var _this = (0, _possibleConstructorReturn3.default)(this, (List.__proto__ || (0,
_getPrototypeOf2.default)(List)).call(this, props, context));
return _this._cellRenderer = _this._cellRenderer.bind(_this), _this._onScroll = _this._onScroll.bind(_this),
_this._onSectionRendered = _this._onSectionRendered.bind(_this), _this._setRef = _this._setRef.bind(_this),
_this;
}
return (0, _inherits3.default)(List, _PureComponent), (0, _createClass3.default)(List, [ {
key: "forceUpdateGrid",
value: function() {
this.Grid.forceUpdate();
}
}, {
key: "measureAllRows",
value: function() {
this.Grid.measureAllCells();
}
}, {
key: "recomputeRowHeights",
value: function() {
var index = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
this.Grid.recomputeGridSize({
rowIndex: index
});
}
}, {
key: "getOffsetForRow",
value: function(_ref) {
var alignment = _ref.alignment, index = _ref.index, _Grid$getOffsetForCel = this.Grid.getOffsetForCell({
alignment: alignment,
rowIndex: index
}), scrollTop = _Grid$getOffsetForCel.scrollTop;
return scrollTop;
}
}, {
key: "scrollToPosition",
value: function() {
var scrollTop = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
this.Grid.scrollToPosition({
scrollTop: scrollTop
});
}
}, {
key: "scrollToRow",
value: function() {
var index = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
this.Grid.scrollToCell({
columnIndex: 0,
rowIndex: index
});
}
}, {
key: "render",
value: function() {
var _props = this.props, className = _props.className, noRowsRenderer = _props.noRowsRenderer, scrollToIndex = _props.scrollToIndex, width = _props.width, classNames = (0,
_classnames2.default)("ReactVirtualized__List", className);
return _react2.default.createElement(_Grid2.default, (0, _extends3.default)({}, this.props, {
autoContainerWidth: !0,
cellRenderer: this._cellRenderer,
className: classNames,
columnWidth: width,
columnCount: 1,
noContentRenderer: noRowsRenderer,
onScroll: this._onScroll,
onSectionRendered: this._onSectionRendered,
ref: this._setRef,
scrollToRow: scrollToIndex
}));
}
}, {
key: "_cellRenderer",
value: function(_ref2) {
var rowIndex = _ref2.rowIndex, style = _ref2.style, rest = (0, _objectWithoutProperties3.default)(_ref2, [ "rowIndex", "style" ]), rowRenderer = this.props.rowRenderer, _Object$getOwnPropert = (0,
_getOwnPropertyDescriptor2.default)(style, "width"), writable = _Object$getOwnPropert.writable;
return writable && (style.width = "100%"), rowRenderer((0, _extends3.default)({
index: rowIndex,
style: style
}, rest));
}
}, {
key: "_setRef",
value: function(ref) {
this.Grid = ref;
}
}, {
key: "_onScroll",
value: function(_ref3) {
var clientHeight = _ref3.clientHeight, scrollHeight = _ref3.scrollHeight, scrollTop = _ref3.scrollTop, onScroll = this.props.onScroll;
onScroll({
clientHeight: clientHeight,
scrollHeight: scrollHeight,
scrollTop: scrollTop
});
}
}, {
key: "_onSectionRendered",
value: function(_ref4) {
var rowOverscanStartIndex = _ref4.rowOverscanStartIndex, rowOverscanStopIndex = _ref4.rowOverscanStopIndex, rowStartIndex = _ref4.rowStartIndex, rowStopIndex = _ref4.rowStopIndex, onRowsRendered = this.props.onRowsRendered;
onRowsRendered({
overscanStartIndex: rowOverscanStartIndex,
overscanStopIndex: rowOverscanStopIndex,
startIndex: rowStartIndex,
stopIndex: rowStopIndex
});
}
} ]), List;
}(_react.PureComponent);
List.defaultProps = {
estimatedRowSize: 30,
noRowsRenderer: function() {
return null;
},
onRowsRendered: function() {
return null;
},
onScroll: function() {
return null;
},
overscanIndicesGetter: _Grid.accessibilityOverscanIndicesGetter,
overscanRowCount: 10,
scrollToAlignment: "auto",
scrollToIndex: -1,
style: {}
}, exports.default = List;
}, /* 140 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(141),
__esModule: !0
};
}, /* 141 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(142);
var $Object = __webpack_require__(16).Object;
module.exports = function(it, key) {
return $Object.getOwnPropertyDescriptor(it, key);
};
}, /* 142 */
/***/
function(module, exports, __webpack_require__) {
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
var toIObject = __webpack_require__(50), $getOwnPropertyDescriptor = __webpack_require__(77).f;
__webpack_require__(14)("getOwnPropertyDescriptor", function() {
return function(it, key) {
return $getOwnPropertyDescriptor(toIObject(it), key);
};
});
}, /* 143 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.createCellPositioner = exports.Masonry = exports.default = void 0;
var _Masonry2 = __webpack_require__(144), _Masonry3 = _interopRequireDefault(_Masonry2), _createCellPositioner2 = __webpack_require__(157), _createCellPositioner3 = _interopRequireDefault(_createCellPositioner2);
exports.default = _Masonry3.default, exports.Masonry = _Masonry3.default, exports.createCellPositioner = _createCellPositioner3.default;
}, /* 144 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function identity(value) {
return value;
}
function noop() {}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.DEFAULT_SCROLLING_RESET_TIME_INTERVAL = void 0;
var _extends2 = __webpack_require__(107), _extends3 = _interopRequireDefault(_extends2), _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _react = __webpack_require__(97), _react2 = _interopRequireDefault(_react), _classnames = __webpack_require__(114), _classnames2 = _interopRequireDefault(_classnames), _PositionCache = __webpack_require__(145), _PositionCache2 = _interopRequireDefault(_PositionCache), DEFAULT_SCROLLING_RESET_TIME_INTERVAL = exports.DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150, Masonry = function(_PureComponent) {
function Masonry(props, context) {
(0, _classCallCheck3.default)(this, Masonry);
var _this = (0, _possibleConstructorReturn3.default)(this, (Masonry.__proto__ || (0,
_getPrototypeOf2.default)(Masonry)).call(this, props, context));
return _this._invalidateOnUpdateStartIndex = null, _this._invalidateOnUpdateStopIndex = null,
_this._positionCache = new _PositionCache2.default(), _this._startIndex = null,
_this._startIndexMemoized = null, _this._stopIndex = null, _this._stopIndexMemoized = null,
_this.state = {
isScrolling: !1,
scrollTop: 0
}, _this._debounceResetIsScrollingCallback = _this._debounceResetIsScrollingCallback.bind(_this),
_this._setScrollingContainerRef = _this._setScrollingContainerRef.bind(_this), _this._onScroll = _this._onScroll.bind(_this),
_this;
}
return (0, _inherits3.default)(Masonry, _PureComponent), (0, _createClass3.default)(Masonry, [ {
key: "clearCellPositions",
value: function() {
this._positionCache = new _PositionCache2.default(), this.forceUpdate();
}
}, {
key: "invalidateCellSizeAfterRender",
value: function(_ref) {
var index = _ref.rowIndex;
null === this._invalidateOnUpdateStartIndex ? (this._invalidateOnUpdateStartIndex = index,
this._invalidateOnUpdateStopIndex = index) : (this._invalidateOnUpdateStartIndex = Math.min(this._invalidateOnUpdateStartIndex, index),
this._invalidateOnUpdateStopIndex = Math.max(this._invalidateOnUpdateStopIndex, index));
}
}, {
key: "recomputeCellPositions",
value: function() {
var stopIndex = this._positionCache.count - 1;
this._positionCache = new _PositionCache2.default(), this._populatePositionCache(0, stopIndex),
this.forceUpdate();
}
}, {
key: "componentDidMount",
value: function() {
this._checkInvalidateOnUpdate(), this._invokeOnScrollCallback(), this._invokeOnCellsRenderedCallback();
}
}, {
key: "componentDidUpdate",
value: function(prevProps, prevState) {
this._checkInvalidateOnUpdate(), this._invokeOnScrollCallback(), this._invokeOnCellsRenderedCallback();
}
}, {
key: "componentWillUnmount",
value: function() {
this._debounceResetIsScrollingId && clearTimeout(this._debounceResetIsScrollingId);
}
}, {
key: "componentWillReceiveProps",
value: function(nextProps) {
var scrollTop = this.props.scrollTop;
scrollTop !== nextProps.scrollTop && (this._debounceResetIsScrolling(), this.setState({
isScrolling: !0,
scrollTop: nextProps.scrollTop
}));
}
}, {
key: "render",
value: function() {
var _this2 = this, _props = this.props, autoHeight = _props.autoHeight, cellCount = _props.cellCount, cellMeasurerCache = _props.cellMeasurerCache, cellRenderer = _props.cellRenderer, className = _props.className, height = _props.height, id = _props.id, keyMapper = _props.keyMapper, overscanByPixels = _props.overscanByPixels, role = _props.role, style = _props.style, tabIndex = _props.tabIndex, width = _props.width, _state = this.state, isScrolling = _state.isScrolling, scrollTop = _state.scrollTop, children = [], estimateTotalHeight = this._getEstimatedTotalHeight(), shortestColumnSize = this._positionCache.shortestColumnSize, measuredCellCount = this._positionCache.count;
if (shortestColumnSize < scrollTop + height + overscanByPixels && measuredCellCount < cellCount) for (var batchSize = Math.min(cellCount - measuredCellCount, Math.ceil((scrollTop + height + overscanByPixels - shortestColumnSize) / cellMeasurerCache.defaultHeight * width / cellMeasurerCache.defaultWidth)), _index = measuredCellCount; _index < measuredCellCount + batchSize; _index++) children.push(cellRenderer({
index: _index,
isScrolling: isScrolling,
key: keyMapper(_index),
parent: this,
style: {
width: cellMeasurerCache.getWidth(_index)
}
})); else !function() {
var stopIndex = void 0, startIndex = void 0;
_this2._positionCache.range(scrollTop - overscanByPixels, height + overscanByPixels, function(index, left, top) {
"undefined" == typeof startIndex ? (startIndex = index, stopIndex = index) : (startIndex = Math.min(startIndex, index),
stopIndex = Math.max(stopIndex, index)), children.push(cellRenderer({
index: index,
isScrolling: isScrolling,
key: keyMapper(index),
parent: _this2,
style: {
height: cellMeasurerCache.getHeight(index),
left: left,
position: "absolute",
top: top,
width: cellMeasurerCache.getWidth(index)
}
})), _this2._startIndex = startIndex, _this2._stopIndex = stopIndex;
});
}();
return _react2.default.createElement("div", {
ref: this._setScrollingContainerRef,
"aria-label": this.props["aria-label"],
className: (0, _classnames2.default)("ReactVirtualized__Masonry", className),
id: id,
onScroll: this._onScroll,
role: role,
style: (0, _extends3.default)({
boxSizing: "border-box",
direction: "ltr",
height: autoHeight ? "auto" : height,
overflowX: "hidden",
overflowY: estimateTotalHeight < height ? "hidden" : "auto",
position: "relative",
width: width,
WebkitOverflowScrolling: "touch",
willChange: "transform"
}, style),
tabIndex: tabIndex
}, _react2.default.createElement("div", {
className: "ReactVirtualized__Masonry__innerScrollContainer",
style: {
width: "100%",
height: estimateTotalHeight,
maxWidth: "100%",
maxHeight: estimateTotalHeight,
overflow: "hidden",
pointerEvents: isScrolling ? "none" : "",
position: "relative"
}
}, children));
}
}, {
key: "_checkInvalidateOnUpdate",
value: function() {
if ("number" == typeof this._invalidateOnUpdateStartIndex) {
var _startIndex = this._invalidateOnUpdateStartIndex, _stopIndex = this._invalidateOnUpdateStopIndex;
this._invalidateOnUpdateStartIndex = null, this._invalidateOnUpdateStopIndex = null,
this._populatePositionCache(_startIndex, _stopIndex), this.forceUpdate();
}
}
}, {
key: "_debounceResetIsScrolling",
value: function() {
var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval;
this._debounceResetIsScrollingId && clearTimeout(this._debounceResetIsScrollingId),
this._debounceResetIsScrollingId = setTimeout(this._debounceResetIsScrollingCallback, scrollingResetTimeInterval);
}
}, {
key: "_debounceResetIsScrollingCallback",
value: function() {
this.setState({
isScrolling: !1
});
}
}, {
key: "_getEstimatedTotalHeight",
value: function() {
var _props2 = this.props, cellCount = _props2.cellCount, cellMeasurerCache = _props2.cellMeasurerCache, width = _props2.width, estimatedColumnCount = Math.floor(width / cellMeasurerCache.defaultWidth);
return this._positionCache.estimateTotalHeight(cellCount, estimatedColumnCount, cellMeasurerCache.defaultHeight);
}
}, {
key: "_invokeOnScrollCallback",
value: function() {
var _props3 = this.props, height = _props3.height, onScroll = _props3.onScroll, scrollTop = this.state.scrollTop;
this._onScrollMemoized !== scrollTop && (onScroll({
clientHeight: height,
scrollHeight: this._getEstimatedTotalHeight(),
scrollTop: scrollTop
}), this._onScrollMemoized = scrollTop);
}
}, {
key: "_invokeOnCellsRenderedCallback",
value: function() {
if (this._startIndexMemoized !== this._startIndex || this._stopIndexMemoized !== this._stopIndex) {
var _onCellsRendered = this.props.onCellsRendered;
_onCellsRendered({
startIndex: this._startIndex,
stopIndex: this._stopIndex
}), this._startIndexMemoized = this._startIndex, this._stopIndexMemoized = this._stopIndex;
}
}
}, {
key: "_populatePositionCache",
value: function(startIndex, stopIndex) {
for (var _props4 = this.props, cellMeasurerCache = _props4.cellMeasurerCache, cellPositioner = _props4.cellPositioner, _index2 = startIndex; _index2 <= stopIndex; _index2++) {
var _cellPositioner = cellPositioner(_index2), _left = _cellPositioner.left, _top = _cellPositioner.top;
this._positionCache.setPosition(_index2, _left, _top, cellMeasurerCache.getHeight(_index2));
}
}
}, {
key: "_setScrollingContainerRef",
value: function(ref) {
this._scrollingContainer = ref;
}
}, {
key: "_onScroll",
value: function(event) {
var height = this.props.height, eventScrollTop = event.target.scrollTop, scrollTop = Math.min(Math.max(0, this._getEstimatedTotalHeight() - height), eventScrollTop);
eventScrollTop === scrollTop && (this._debounceResetIsScrolling(), this.state.scrollTop !== scrollTop && this.setState({
isScrolling: !0,
scrollTop: scrollTop
}));
}
} ]), Masonry;
}(_react.PureComponent);
Masonry.defaultProps = {
autoHeight: !1,
keyMapper: identity,
onCellsRendered: noop,
onScroll: noop,
overscanByPixels: 20,
role: "grid",
scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL,
style: emptyObject,
tabIndex: 0
}, exports.default = Masonry;
var emptyObject = {};
}, /* 145 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _slicedToArray2 = __webpack_require__(146), _slicedToArray3 = _interopRequireDefault(_slicedToArray2), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _intervalTree = __webpack_require__(155), _intervalTree2 = _interopRequireDefault(_intervalTree), PositionCache = function() {
function PositionCache() {
(0, _classCallCheck3.default)(this, PositionCache), this._columnSizeMap = {}, this._intervalTree = (0,
_intervalTree2.default)(), this._leftMap = {};
}
return (0, _createClass3.default)(PositionCache, [ {
key: "estimateTotalHeight",
value: function(cellCount, columnCount, defaultCellHeight) {
var unmeasuredCellCount = cellCount - this.count;
return this.tallestColumnSize + Math.ceil(unmeasuredCellCount / columnCount) * defaultCellHeight;
}
}, {
key: "range",
value: function(scrollTop, clientHeight, renderCallback) {
var _this = this;
this._intervalTree.queryInterval(scrollTop, scrollTop + clientHeight, function(_ref) {
var _ref2 = (0, _slicedToArray3.default)(_ref, 3), top = _ref2[0], index = (_ref2[1],
_ref2[2]);
return renderCallback(index, _this._leftMap[index], top);
});
}
}, {
key: "setPosition",
value: function(index, left, top, height) {
this._intervalTree.insert([ top, top + height, index ]), this._leftMap[index] = left;
var columnSizeMap = this._columnSizeMap, columnHeight = columnSizeMap[left];
void 0 === columnHeight ? columnSizeMap[left] = top + height : columnSizeMap[left] = Math.max(columnHeight, top + height);
}
}, {
key: "count",
get: function() {
return this._intervalTree.count;
}
}, {
key: "shortestColumnSize",
get: function() {
var columnSizeMap = this._columnSizeMap, size = 0;
for (var i in columnSizeMap) {
var height = columnSizeMap[i];
size = 0 === size ? height : Math.min(size, height);
}
return size;
}
}, {
key: "tallestColumnSize",
get: function() {
var columnSizeMap = this._columnSizeMap, size = 0;
for (var i in columnSizeMap) {
var height = columnSizeMap[i];
size = Math.max(size, height);
}
return size;
}
} ]), PositionCache;
}();
exports.default = PositionCache;
}, /* 146 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
exports.__esModule = !0;
var _isIterable2 = __webpack_require__(147), _isIterable3 = _interopRequireDefault(_isIterable2), _getIterator2 = __webpack_require__(151), _getIterator3 = _interopRequireDefault(_getIterator2);
exports.default = function() {
function sliceIterator(arr, i) {
var _arr = [], _n = !0, _d = !1, _e = void 0;
try {
for (var _s, _i = (0, _getIterator3.default)(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value),
!i || _arr.length !== i); _n = !0) ;
} catch (err) {
_d = !0, _e = err;
} finally {
try {
!_n && _i.return && _i.return();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
return function(arr, i) {
if (Array.isArray(arr)) return arr;
if ((0, _isIterable3.default)(Object(arr))) return sliceIterator(arr, i);
throw new TypeError("Invalid attempt to destructure non-iterable instance");
};
}();
}, /* 147 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(148),
__esModule: !0
};
}, /* 148 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(60), __webpack_require__(38), module.exports = __webpack_require__(149);
}, /* 149 */
/***/
function(module, exports, __webpack_require__) {
var classof = __webpack_require__(150), ITERATOR = __webpack_require__(59)("iterator"), Iterators = __webpack_require__(44);
module.exports = __webpack_require__(16).isIterable = function(it) {
var O = Object(it);
return void 0 !== O[ITERATOR] || "@@iterator" in O || Iterators.hasOwnProperty(classof(O));
};
}, /* 150 */
/***/
function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(52), TAG = __webpack_require__(59)("toStringTag"), ARG = "Arguments" == cof(function() {
return arguments;
}()), tryGet = function(it, key) {
try {
return it[key];
} catch (e) {}
};
module.exports = function(it) {
var O, T, B;
return void 0 === it ? "Undefined" : null === it ? "Null" : "string" == typeof (T = tryGet(O = Object(it), TAG)) ? T : ARG ? cof(O) : "Object" == (B = cof(O)) && "function" == typeof O.callee ? "Arguments" : B;
};
}, /* 151 */
/***/
function(module, exports, __webpack_require__) {
module.exports = {
default: __webpack_require__(152),
__esModule: !0
};
}, /* 152 */
/***/
function(module, exports, __webpack_require__) {
__webpack_require__(60), __webpack_require__(38), module.exports = __webpack_require__(153);
}, /* 153 */
/***/
function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(21), get = __webpack_require__(154);
module.exports = __webpack_require__(16).getIterator = function(it) {
var iterFn = get(it);
if ("function" != typeof iterFn) throw TypeError(it + " is not iterable!");
return anObject(iterFn.call(it));
};
}, /* 154 */
/***/
function(module, exports, __webpack_require__) {
var classof = __webpack_require__(150), ITERATOR = __webpack_require__(59)("iterator"), Iterators = __webpack_require__(44);
module.exports = __webpack_require__(16).getIteratorMethod = function(it) {
if (void 0 != it) return it[ITERATOR] || it["@@iterator"] || Iterators[classof(it)];
};
}, /* 155 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function IntervalTreeNode(mid, left, right, leftPoints, rightPoints) {
this.mid = mid, this.left = left, this.right = right, this.leftPoints = leftPoints,
this.rightPoints = rightPoints, this.count = (left ? left.count : 0) + (right ? right.count : 0) + leftPoints.length;
}
function copy(a, b) {
a.mid = b.mid, a.left = b.left, a.right = b.right, a.leftPoints = b.leftPoints,
a.rightPoints = b.rightPoints, a.count = b.count;
}
function rebuild(node, intervals) {
var ntree = createIntervalTree(intervals);
node.mid = ntree.mid, node.left = ntree.left, node.right = ntree.right, node.leftPoints = ntree.leftPoints,
node.rightPoints = ntree.rightPoints, node.count = ntree.count;
}
function rebuildWithInterval(node, interval) {
var intervals = node.intervals([]);
intervals.push(interval), rebuild(node, intervals);
}
function rebuildWithoutInterval(node, interval) {
var intervals = node.intervals([]), idx = intervals.indexOf(interval);
return idx < 0 ? NOT_FOUND : (intervals.splice(idx, 1), rebuild(node, intervals),
SUCCESS);
}
function reportLeftRange(arr, hi, cb) {
for (var i = 0; i < arr.length && arr[i][0] <= hi; ++i) {
var r = cb(arr[i]);
if (r) return r;
}
}
function reportRightRange(arr, lo, cb) {
for (var i = arr.length - 1; i >= 0 && arr[i][1] >= lo; --i) {
var r = cb(arr[i]);
if (r) return r;
}
}
function reportRange(arr, cb) {
for (var i = 0; i < arr.length; ++i) {
var r = cb(arr[i]);
if (r) return r;
}
}
function compareNumbers(a, b) {
return a - b;
}
function compareBegin(a, b) {
var d = a[0] - b[0];
return d ? d : a[1] - b[1];
}
function compareEnd(a, b) {
var d = a[1] - b[1];
return d ? d : a[0] - b[0];
}
function createIntervalTree(intervals) {
if (0 === intervals.length) return null;
for (var pts = [], i = 0; i < intervals.length; ++i) pts.push(intervals[i][0], intervals[i][1]);
pts.sort(compareNumbers);
for (var mid = pts[pts.length >> 1], leftIntervals = [], rightIntervals = [], centerIntervals = [], i = 0; i < intervals.length; ++i) {
var s = intervals[i];
s[1] < mid ? leftIntervals.push(s) : mid < s[0] ? rightIntervals.push(s) : centerIntervals.push(s);
}
var leftPoints = centerIntervals, rightPoints = centerIntervals.slice();
return leftPoints.sort(compareBegin), rightPoints.sort(compareEnd), new IntervalTreeNode(mid, createIntervalTree(leftIntervals), createIntervalTree(rightIntervals), leftPoints, rightPoints);
}
function IntervalTree(root) {
this.root = root;
}
function createWrapper(intervals) {
return new IntervalTree(intervals && 0 !== intervals.length ? createIntervalTree(intervals) : null);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = createWrapper;
var _binarySearchBounds = __webpack_require__(156), _binarySearchBounds2 = _interopRequireDefault(_binarySearchBounds), NOT_FOUND = 0, SUCCESS = 1, EMPTY = 2, proto = IntervalTreeNode.prototype;
proto.intervals = function(result) {
return result.push.apply(result, this.leftPoints), this.left && this.left.intervals(result),
this.right && this.right.intervals(result), result;
}, proto.insert = function(interval) {
var weight = this.count - this.leftPoints.length;
if (this.count += 1, interval[1] < this.mid) this.left ? 4 * (this.left.count + 1) > 3 * (weight + 1) ? rebuildWithInterval(this, interval) : this.left.insert(interval) : this.left = createIntervalTree([ interval ]); else if (interval[0] > this.mid) this.right ? 4 * (this.right.count + 1) > 3 * (weight + 1) ? rebuildWithInterval(this, interval) : this.right.insert(interval) : this.right = createIntervalTree([ interval ]); else {
var l = _binarySearchBounds2.default.ge(this.leftPoints, interval, compareBegin), r = _binarySearchBounds2.default.ge(this.rightPoints, interval, compareEnd);
this.leftPoints.splice(l, 0, interval), this.rightPoints.splice(r, 0, interval);
}
}, proto.remove = function(interval) {
var weight = this.count - this.leftPoints;
if (interval[1] < this.mid) {
if (!this.left) return NOT_FOUND;
var rw = this.right ? this.right.count : 0;
if (4 * rw > 3 * (weight - 1)) return rebuildWithoutInterval(this, interval);
var r = this.left.remove(interval);
return r === EMPTY ? (this.left = null, this.count -= 1, SUCCESS) : (r === SUCCESS && (this.count -= 1),
r);
}
if (interval[0] > this.mid) {
if (!this.right) return NOT_FOUND;
var lw = this.left ? this.left.count : 0;
if (4 * lw > 3 * (weight - 1)) return rebuildWithoutInterval(this, interval);
var r = this.right.remove(interval);
return r === EMPTY ? (this.right = null, this.count -= 1, SUCCESS) : (r === SUCCESS && (this.count -= 1),
r);
}
if (1 === this.count) return this.leftPoints[0] === interval ? EMPTY : NOT_FOUND;
if (1 === this.leftPoints.length && this.leftPoints[0] === interval) {
if (this.left && this.right) {
for (var p = this, n = this.left; n.right; ) p = n, n = n.right;
if (p === this) n.right = this.right; else {
var l = this.left, r = this.right;
p.count -= n.count, p.right = n.left, n.left = l, n.right = r;
}
copy(this, n), this.count = (this.left ? this.left.count : 0) + (this.right ? this.right.count : 0) + this.leftPoints.length;
} else this.left ? copy(this, this.left) : copy(this, this.right);
return SUCCESS;
}
for (var l = _binarySearchBounds2.default.ge(this.leftPoints, interval, compareBegin); l < this.leftPoints.length && this.leftPoints[l][0] === interval[0]; ++l) if (this.leftPoints[l] === interval) {
this.count -= 1, this.leftPoints.splice(l, 1);
for (var r = _binarySearchBounds2.default.ge(this.rightPoints, interval, compareEnd); r < this.rightPoints.length && this.rightPoints[r][1] === interval[1]; ++r) if (this.rightPoints[r] === interval) return this.rightPoints.splice(r, 1),
SUCCESS;
}
return NOT_FOUND;
}, proto.queryPoint = function(x, cb) {
if (x < this.mid) {
if (this.left) {
var r = this.left.queryPoint(x, cb);
if (r) return r;
}
return reportLeftRange(this.leftPoints, x, cb);
}
if (x > this.mid) {
if (this.right) {
var r = this.right.queryPoint(x, cb);
if (r) return r;
}
return reportRightRange(this.rightPoints, x, cb);
}
return reportRange(this.leftPoints, cb);
}, proto.queryInterval = function(lo, hi, cb) {
if (lo < this.mid && this.left) {
var r = this.left.queryInterval(lo, hi, cb);
if (r) return r;
}
if (hi > this.mid && this.right) {
var r = this.right.queryInterval(lo, hi, cb);
if (r) return r;
}
return hi < this.mid ? reportLeftRange(this.leftPoints, hi, cb) : lo > this.mid ? reportRightRange(this.rightPoints, lo, cb) : reportRange(this.leftPoints, cb);
};
var tproto = IntervalTree.prototype;
tproto.insert = function(interval) {
this.root ? this.root.insert(interval) : this.root = new IntervalTreeNode(interval[0], null, null, [ interval ], [ interval ]);
}, tproto.remove = function(interval) {
if (this.root) {
var r = this.root.remove(interval);
return r === EMPTY && (this.root = null), r !== NOT_FOUND;
}
return !1;
}, tproto.queryPoint = function(p, cb) {
if (this.root) return this.root.queryPoint(p, cb);
}, tproto.queryInterval = function(lo, hi, cb) {
if (lo <= hi && this.root) return this.root.queryInterval(lo, hi, cb);
}, Object.defineProperty(tproto, "count", {
get: function() {
return this.root ? this.root.count : 0;
}
}), Object.defineProperty(tproto, "intervals", {
get: function() {
return this.root ? this.root.intervals([]) : [];
}
});
}, /* 156 */
/***/
function(module, exports) {
"use strict";
function _GEA(a, l, h, y) {
for (var i = h + 1; l <= h; ) {
var m = l + h >>> 1, x = a[m];
x >= y ? (i = m, h = m - 1) : l = m + 1;
}
return i;
}
function _GEP(a, l, h, y, c) {
for (var i = h + 1; l <= h; ) {
var m = l + h >>> 1, x = a[m];
c(x, y) >= 0 ? (i = m, h = m - 1) : l = m + 1;
}
return i;
}
function dispatchBsearchGE(a, y, c, l, h) {
return "function" == typeof c ? _GEP(a, void 0 === l ? 0 : 0 | l, void 0 === h ? a.length - 1 : 0 | h, y, c) : _GEA(a, void 0 === c ? 0 : 0 | c, void 0 === l ? a.length - 1 : 0 | l, y);
}
function _GTA(a, l, h, y) {
for (var i = h + 1; l <= h; ) {
var m = l + h >>> 1, x = a[m];
x > y ? (i = m, h = m - 1) : l = m + 1;
}
return i;
}
function _GTP(a, l, h, y, c) {
for (var i = h + 1; l <= h; ) {
var m = l + h >>> 1, x = a[m];
c(x, y) > 0 ? (i = m, h = m - 1) : l = m + 1;
}
return i;
}
function dispatchBsearchGT(a, y, c, l, h) {
return "function" == typeof c ? _GTP(a, void 0 === l ? 0 : 0 | l, void 0 === h ? a.length - 1 : 0 | h, y, c) : _GTA(a, void 0 === c ? 0 : 0 | c, void 0 === l ? a.length - 1 : 0 | l, y);
}
function _LTA(a, l, h, y) {
for (var i = l - 1; l <= h; ) {
var m = l + h >>> 1, x = a[m];
x < y ? (i = m, l = m + 1) : h = m - 1;
}
return i;
}
function _LTP(a, l, h, y, c) {
for (var i = l - 1; l <= h; ) {
var m = l + h >>> 1, x = a[m];
c(x, y) < 0 ? (i = m, l = m + 1) : h = m - 1;
}
return i;
}
function dispatchBsearchLT(a, y, c, l, h) {
return "function" == typeof c ? _LTP(a, void 0 === l ? 0 : 0 | l, void 0 === h ? a.length - 1 : 0 | h, y, c) : _LTA(a, void 0 === c ? 0 : 0 | c, void 0 === l ? a.length - 1 : 0 | l, y);
}
function _LEA(a, l, h, y) {
for (var i = l - 1; l <= h; ) {
var m = l + h >>> 1, x = a[m];
x <= y ? (i = m, l = m + 1) : h = m - 1;
}
return i;
}
function _LEP(a, l, h, y, c) {
for (var i = l - 1; l <= h; ) {
var m = l + h >>> 1, x = a[m];
c(x, y) <= 0 ? (i = m, l = m + 1) : h = m - 1;
}
return i;
}
function dispatchBsearchLE(a, y, c, l, h) {
return "function" == typeof c ? _LEP(a, void 0 === l ? 0 : 0 | l, void 0 === h ? a.length - 1 : 0 | h, y, c) : _LEA(a, void 0 === c ? 0 : 0 | c, void 0 === l ? a.length - 1 : 0 | l, y);
}
function _EQA(a, l, h, y) {
for (;l <= h; ) {
var m = l + h >>> 1, x = a[m];
if (x === y) return m;
x <= y ? l = m + 1 : h = m - 1;
}
return -1;
}
function _EQP(a, l, h, y, c) {
for (;l <= h; ) {
var m = l + h >>> 1, x = a[m], p = c(x, y);
if (0 === p) return m;
p <= 0 ? l = m + 1 : h = m - 1;
}
return -1;
}
function dispatchBsearchEQ(a, y, c, l, h) {
return "function" == typeof c ? _EQP(a, void 0 === l ? 0 : 0 | l, void 0 === h ? a.length - 1 : 0 | h, y, c) : _EQA(a, void 0 === c ? 0 : 0 | c, void 0 === l ? a.length - 1 : 0 | l, y);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = {
ge: dispatchBsearchGE,
gt: dispatchBsearchGT,
lt: dispatchBsearchLT,
le: dispatchBsearchLE,
eq: dispatchBsearchEQ
};
}, /* 157 */
/***/
function(module, exports) {
"use strict";
function createCellPositioner(_ref) {
function cellPositioner(index) {
for (var columnIndex = 0, i = 1; i < columnHeights.length; i++) columnHeights[i] < columnHeights[columnIndex] && (columnIndex = i);
var left = columnIndex * (columnWidth + spacer), top = columnHeights[columnIndex] || 0;
return columnHeights[columnIndex] = top + cellMeasurerCache.getHeight(index) + spacer,
{
left: left,
top: top
};
}
function initOrResetDerivedValues() {
columnHeights = [];
for (var i = 0; i < columnCount; i++) columnHeights[i] = 0;
}
function reset(params) {
columnCount = params.columnCount, columnWidth = params.columnWidth, spacer = params.spacer,
initOrResetDerivedValues();
}
var cellMeasurerCache = _ref.cellMeasurerCache, columnCount = _ref.columnCount, columnWidth = _ref.columnWidth, _ref$spacer = _ref.spacer, spacer = void 0 === _ref$spacer ? 0 : _ref$spacer, columnHeights = void 0;
return initOrResetDerivedValues(), cellPositioner.reset = reset, cellPositioner;
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = createCellPositioner;
}, /* 158 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.MultiGrid = exports.default = void 0;
var _MultiGrid2 = __webpack_require__(159), _MultiGrid3 = _interopRequireDefault(_MultiGrid2);
exports.default = _MultiGrid3.default, exports.MultiGrid = _MultiGrid3.default;
}, /* 159 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _extends2 = __webpack_require__(107), _extends3 = _interopRequireDefault(_extends2), _objectWithoutProperties2 = __webpack_require__(112), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(89), _react = (_interopRequireDefault(_propTypes),
__webpack_require__(97)), _react2 = _interopRequireDefault(_react), _CellMeasurerCacheDecorator = __webpack_require__(160), _CellMeasurerCacheDecorator2 = _interopRequireDefault(_CellMeasurerCacheDecorator), _Grid = __webpack_require__(127), _Grid2 = _interopRequireDefault(_Grid), SCROLLBAR_SIZE_BUFFER = 20, MultiGrid = function(_PureComponent) {
function MultiGrid(props, context) {
(0, _classCallCheck3.default)(this, MultiGrid);
var _this = (0, _possibleConstructorReturn3.default)(this, (MultiGrid.__proto__ || (0,
_getPrototypeOf2.default)(MultiGrid)).call(this, props, context));
return _this.state = {
scrollLeft: 0,
scrollTop: 0
}, _this._deferredInvalidateColumnIndex = null, _this._deferredInvalidateRowIndex = null,
_this._bottomLeftGridRef = _this._bottomLeftGridRef.bind(_this), _this._bottomRightGridRef = _this._bottomRightGridRef.bind(_this),
_this._cellRendererBottomLeftGrid = _this._cellRendererBottomLeftGrid.bind(_this),
_this._cellRendererBottomRightGrid = _this._cellRendererBottomRightGrid.bind(_this),
_this._cellRendererTopRightGrid = _this._cellRendererTopRightGrid.bind(_this), _this._columnWidthRightGrid = _this._columnWidthRightGrid.bind(_this),
_this._onScroll = _this._onScroll.bind(_this), _this._rowHeightBottomGrid = _this._rowHeightBottomGrid.bind(_this),
_this._topLeftGridRef = _this._topLeftGridRef.bind(_this), _this._topRightGridRef = _this._topRightGridRef.bind(_this),
_this;
}
return (0, _inherits3.default)(MultiGrid, _PureComponent), (0, _createClass3.default)(MultiGrid, [ {
key: "forceUpdateGrids",
value: function() {
this._bottomLeftGrid && this._bottomLeftGrid.forceUpdate(), this._bottomRightGrid && this._bottomRightGrid.forceUpdate(),
this._topLeftGrid && this._topLeftGrid.forceUpdate(), this._topRightGrid && this._topRightGrid.forceUpdate();
}
}, {
key: "invalidateCellSizeAfterRender",
value: function() {
var _ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, _ref$columnIndex = _ref.columnIndex, columnIndex = void 0 === _ref$columnIndex ? 0 : _ref$columnIndex, _ref$rowIndex = _ref.rowIndex, rowIndex = void 0 === _ref$rowIndex ? 0 : _ref$rowIndex;
this._deferredInvalidateColumnIndex = "number" == typeof this._deferredInvalidateColumnIndex ? Math.min(this._deferredInvalidateColumnIndex, columnIndex) : columnIndex,
this._deferredInvalidateRowIndex = "number" == typeof this._deferredInvalidateRowIndex ? Math.min(this._deferredInvalidateRowIndex, rowIndex) : rowIndex;
}
}, {
key: "measureAllCells",
value: function() {
this._bottomLeftGrid && this._bottomLeftGrid.measureAllCells(), this._bottomRightGrid && this._bottomRightGrid.measureAllCells(),
this._topLeftGrid && this._topLeftGrid.measureAllCells(), this._topRightGrid && this._topRightGrid.measureAllCells();
}
}, {
key: "recomputeGridSize",
value: function() {
var _ref2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, _ref2$columnIndex = _ref2.columnIndex, columnIndex = void 0 === _ref2$columnIndex ? 0 : _ref2$columnIndex, _ref2$rowIndex = _ref2.rowIndex, rowIndex = void 0 === _ref2$rowIndex ? 0 : _ref2$rowIndex, _props = this.props, fixedColumnCount = _props.fixedColumnCount, fixedRowCount = _props.fixedRowCount, adjustedColumnIndex = Math.max(0, columnIndex - fixedColumnCount), adjustedRowIndex = Math.max(0, rowIndex - fixedRowCount);
this._bottomLeftGrid && this._bottomLeftGrid.recomputeGridSize({
columnIndex: columnIndex,
rowIndex: adjustedRowIndex
}), this._bottomRightGrid && this._bottomRightGrid.recomputeGridSize({
columnIndex: adjustedColumnIndex,
rowIndex: adjustedRowIndex
}), this._topLeftGrid && this._topLeftGrid.recomputeGridSize({
columnIndex: columnIndex,
rowIndex: rowIndex
}), this._topRightGrid && this._topRightGrid.recomputeGridSize({
columnIndex: adjustedColumnIndex,
rowIndex: rowIndex
}), this._leftGridWidth = null, this._topGridHeight = null, this._maybeCalculateCachedStyles(null, this.props, null, this.state);
}
}, {
key: "componentDidMount",
value: function() {
var _props2 = this.props, scrollLeft = _props2.scrollLeft, scrollTop = _props2.scrollTop;
if (scrollLeft > 0 || scrollTop > 0) {
var newState = {};
scrollLeft > 0 && (newState.scrollLeft = scrollLeft), scrollTop > 0 && (newState.scrollTop = scrollTop),
this.setState(newState);
}
this._handleInvalidatedGridSize();
}
}, {
key: "componentDidUpdate",
value: function(prevProps, prevState) {
this._handleInvalidatedGridSize();
}
}, {
key: "componentWillMount",
value: function() {
var _props3 = this.props, deferredMeasurementCache = _props3.deferredMeasurementCache, fixedColumnCount = _props3.fixedColumnCount, fixedRowCount = _props3.fixedRowCount;
this._maybeCalculateCachedStyles(null, this.props, null, this.state), deferredMeasurementCache && (this._deferredMeasurementCacheBottomLeftGrid = fixedRowCount > 0 ? new _CellMeasurerCacheDecorator2.default({
cellMeasurerCache: deferredMeasurementCache,
columnIndexOffset: 0,
rowIndexOffset: fixedRowCount
}) : deferredMeasurementCache, this._deferredMeasurementCacheBottomRightGrid = fixedColumnCount > 0 || fixedRowCount > 0 ? new _CellMeasurerCacheDecorator2.default({
cellMeasurerCache: deferredMeasurementCache,
columnIndexOffset: fixedColumnCount,
rowIndexOffset: fixedRowCount
}) : deferredMeasurementCache, this._deferredMeasurementCacheTopRightGrid = fixedColumnCount > 0 ? new _CellMeasurerCacheDecorator2.default({
cellMeasurerCache: deferredMeasurementCache,
columnIndexOffset: fixedColumnCount,
rowIndexOffset: 0
}) : deferredMeasurementCache);
}
}, {
key: "componentWillReceiveProps",
value: function(nextProps, nextState) {
var _props4 = this.props, columnWidth = _props4.columnWidth, fixedColumnCount = _props4.fixedColumnCount, fixedRowCount = _props4.fixedRowCount, rowHeight = _props4.rowHeight;
if (columnWidth === nextProps.columnWidth && fixedColumnCount === nextProps.fixedColumnCount || (this._leftGridWidth = null),
fixedRowCount === nextProps.fixedRowCount && rowHeight === nextProps.rowHeight || (this._topGridHeight = null),
nextProps.scrollLeft !== this.props.scrollLeft || nextProps.scrollTop !== this.props.scrollTop) {
var newState = {};
null != nextProps.scrollLeft && nextProps.scrollLeft >= 0 && (newState.scrollLeft = nextProps.scrollLeft),
null != nextProps.scrollTop && nextProps.scrollTop >= 0 && (newState.scrollTop = nextProps.scrollTop),
this.setState(newState);
}
this._maybeCalculateCachedStyles(this.props, nextProps, this.state, nextState);
}
}, {
key: "render",
value: function() {
var _props5 = this.props, onScroll = _props5.onScroll, onSectionRendered = _props5.onSectionRendered, scrollToColumn = (_props5.scrollLeft,
_props5.scrollToColumn), scrollToRow = (_props5.scrollTop, _props5.scrollToRow), rest = (0,
_objectWithoutProperties3.default)(_props5, [ "onScroll", "onSectionRendered", "scrollLeft", "scrollToColumn", "scrollTop", "scrollToRow" ]);
if (0 === this.props.width || 0 === this.props.height) return null;
var _state = this.state, scrollLeft = _state.scrollLeft, scrollTop = _state.scrollTop;
return _react2.default.createElement("div", {
style: this._containerOuterStyle
}, _react2.default.createElement("div", {
style: this._containerTopStyle
}, this._renderTopLeftGrid(rest), this._renderTopRightGrid((0, _extends3.default)({}, rest, {
scrollLeft: scrollLeft
}))), _react2.default.createElement("div", {
style: this._containerBottomStyle
}, this._renderBottomLeftGrid((0, _extends3.default)({}, rest, {
scrollTop: scrollTop
})), this._renderBottomRightGrid((0, _extends3.default)({}, rest, {
onScroll: onScroll,
onSectionRendered: onSectionRendered,
scrollLeft: scrollLeft,
scrollToColumn: scrollToColumn,
scrollToRow: scrollToRow,
scrollTop: scrollTop
}))));
}
}, {
key: "_bottomLeftGridRef",
value: function(ref) {
this._bottomLeftGrid = ref;
}
}, {
key: "_bottomRightGridRef",
value: function(ref) {
this._bottomRightGrid = ref;
}
}, {
key: "_cellRendererBottomLeftGrid",
value: function(_ref3) {
var rowIndex = _ref3.rowIndex, rest = (0, _objectWithoutProperties3.default)(_ref3, [ "rowIndex" ]), _props6 = this.props, cellRenderer = _props6.cellRenderer, fixedRowCount = _props6.fixedRowCount, rowCount = _props6.rowCount;
return rowIndex === rowCount - fixedRowCount ? _react2.default.createElement("div", {
key: rest.key,
style: (0, _extends3.default)({}, rest.style, {
height: SCROLLBAR_SIZE_BUFFER
})
}) : cellRenderer((0, _extends3.default)({}, rest, {
parent: this,
rowIndex: rowIndex + fixedRowCount
}));
}
}, {
key: "_cellRendererBottomRightGrid",
value: function(_ref4) {
var columnIndex = _ref4.columnIndex, rowIndex = _ref4.rowIndex, rest = (0, _objectWithoutProperties3.default)(_ref4, [ "columnIndex", "rowIndex" ]), _props7 = this.props, cellRenderer = _props7.cellRenderer, fixedColumnCount = _props7.fixedColumnCount, fixedRowCount = _props7.fixedRowCount;
return cellRenderer((0, _extends3.default)({}, rest, {
columnIndex: columnIndex + fixedColumnCount,
parent: this,
rowIndex: rowIndex + fixedRowCount
}));
}
}, {
key: "_cellRendererTopRightGrid",
value: function(_ref5) {
var columnIndex = _ref5.columnIndex, rest = (0, _objectWithoutProperties3.default)(_ref5, [ "columnIndex" ]), _props8 = this.props, cellRenderer = _props8.cellRenderer, columnCount = _props8.columnCount, fixedColumnCount = _props8.fixedColumnCount;
return columnIndex === columnCount - fixedColumnCount ? _react2.default.createElement("div", {
key: rest.key,
style: (0, _extends3.default)({}, rest.style, {
width: SCROLLBAR_SIZE_BUFFER
})
}) : cellRenderer((0, _extends3.default)({}, rest, {
columnIndex: columnIndex + fixedColumnCount,
parent: this
}));
}
}, {
key: "_columnWidthRightGrid",
value: function(_ref6) {
var index = _ref6.index, _props9 = this.props, columnCount = _props9.columnCount, fixedColumnCount = _props9.fixedColumnCount, columnWidth = _props9.columnWidth;
return index === columnCount - fixedColumnCount ? SCROLLBAR_SIZE_BUFFER : "function" == typeof columnWidth ? columnWidth({
index: index + fixedColumnCount
}) : columnWidth;
}
}, {
key: "_getBottomGridHeight",
value: function(props) {
var height = props.height, topGridHeight = this._getTopGridHeight(props);
return height - topGridHeight;
}
}, {
key: "_getLeftGridWidth",
value: function(props) {
var fixedColumnCount = props.fixedColumnCount, columnWidth = props.columnWidth;
if (null == this._leftGridWidth) if ("function" == typeof columnWidth) {
for (var leftGridWidth = 0, index = 0; index < fixedColumnCount; index++) leftGridWidth += columnWidth({
index: index
});
this._leftGridWidth = leftGridWidth;
} else this._leftGridWidth = columnWidth * fixedColumnCount;
return this._leftGridWidth;
}
}, {
key: "_getRightGridWidth",
value: function(props) {
var width = props.width, leftGridWidth = this._getLeftGridWidth(props);
return width - leftGridWidth;
}
}, {
key: "_getTopGridHeight",
value: function(props) {
var fixedRowCount = props.fixedRowCount, rowHeight = props.rowHeight;
if (null == this._topGridHeight) if ("function" == typeof rowHeight) {
for (var topGridHeight = 0, index = 0; index < fixedRowCount; index++) topGridHeight += rowHeight({
index: index
});
this._topGridHeight = topGridHeight;
} else this._topGridHeight = rowHeight * fixedRowCount;
return this._topGridHeight;
}
}, {
key: "_handleInvalidatedGridSize",
value: function() {
if ("number" == typeof this._deferredInvalidateColumnIndex) {
var columnIndex = this._deferredInvalidateColumnIndex, rowIndex = this._deferredInvalidateRowIndex;
this._deferredInvalidateColumnIndex = null, this._deferredInvalidateRowIndex = null,
this.recomputeGridSize({
columnIndex: columnIndex,
rowIndex: rowIndex
}), this.forceUpdate();
}
}
}, {
key: "_maybeCalculateCachedStyles",
value: function(prevProps, props, prevState, state) {
var columnWidth = props.columnWidth, height = props.height, fixedColumnCount = props.fixedColumnCount, fixedRowCount = props.fixedRowCount, rowHeight = props.rowHeight, style = props.style, styleBottomLeftGrid = props.styleBottomLeftGrid, styleBottomRightGrid = props.styleBottomRightGrid, styleTopLeftGrid = props.styleTopLeftGrid, styleTopRightGrid = props.styleTopRightGrid, width = props.width, firstRender = !prevProps, sizeChange = firstRender || height !== prevProps.height || width !== prevProps.width, leftSizeChange = firstRender || columnWidth !== prevProps.columnWidth || fixedColumnCount !== prevProps.fixedColumnCount, topSizeChange = firstRender || fixedRowCount !== prevProps.fixedRowCount || rowHeight !== prevProps.rowHeight;
(firstRender || sizeChange || style !== prevProps.style) && (this._containerOuterStyle = (0,
_extends3.default)({
height: height,
overflow: "visible",
width: width
}, style)), (firstRender || sizeChange || topSizeChange) && (this._containerTopStyle = {
height: this._getTopGridHeight(props),
position: "relative",
width: width
}, this._containerBottomStyle = {
height: height - this._getTopGridHeight(props),
overflow: "visible",
position: "relative",
width: width
}), (firstRender || styleBottomLeftGrid !== prevProps.styleBottomLeftGrid) && (this._bottomLeftGridStyle = (0,
_extends3.default)({
left: 0,
overflowX: "hidden",
overflowY: "hidden",
position: "absolute"
}, styleBottomLeftGrid)), (firstRender || leftSizeChange || styleBottomRightGrid !== prevProps.styleBottomRightGrid) && (this._bottomRightGridStyle = (0,
_extends3.default)({
left: this._getLeftGridWidth(props),
position: "absolute"
}, styleBottomRightGrid)), (firstRender || styleTopLeftGrid !== prevProps.styleTopLeftGrid) && (this._topLeftGridStyle = (0,
_extends3.default)({
left: 0,
overflowX: "hidden",
overflowY: "hidden",
position: "absolute",
top: 0
}, styleTopLeftGrid)), (firstRender || leftSizeChange || styleTopRightGrid !== prevProps.styleTopRightGrid) && (this._topRightGridStyle = (0,
_extends3.default)({
left: this._getLeftGridWidth(props),
overflowX: "hidden",
overflowY: "hidden",
position: "absolute",
top: 0
}, styleTopRightGrid));
}
}, {
key: "_onScroll",
value: function(scrollInfo) {
var scrollLeft = scrollInfo.scrollLeft, scrollTop = scrollInfo.scrollTop;
this.setState({
scrollLeft: scrollLeft,
scrollTop: scrollTop
});
var onScroll = this.props.onScroll;
onScroll && onScroll(scrollInfo);
}
}, {
key: "_renderBottomLeftGrid",
value: function(props) {
var fixedColumnCount = props.fixedColumnCount, fixedRowCount = props.fixedRowCount, rowCount = props.rowCount, scrollTop = props.scrollTop;
return fixedColumnCount ? _react2.default.createElement(_Grid2.default, (0, _extends3.default)({}, props, {
cellRenderer: this._cellRendererBottomLeftGrid,
columnCount: fixedColumnCount,
deferredMeasurementCache: this._deferredMeasurementCacheBottomLeftGrid,
height: this._getBottomGridHeight(props),
ref: this._bottomLeftGridRef,
rowCount: Math.max(0, rowCount - fixedRowCount) + 1,
rowHeight: this._rowHeightBottomGrid,
scrollTop: scrollTop,
style: this._bottomLeftGridStyle,
tabIndex: null,
width: this._getLeftGridWidth(props)
})) : null;
}
}, {
key: "_renderBottomRightGrid",
value: function(props) {
var columnCount = props.columnCount, fixedColumnCount = props.fixedColumnCount, fixedRowCount = props.fixedRowCount, rowCount = props.rowCount, scrollToColumn = props.scrollToColumn, scrollToRow = props.scrollToRow;
return _react2.default.createElement(_Grid2.default, (0, _extends3.default)({}, props, {
cellRenderer: this._cellRendererBottomRightGrid,
columnCount: Math.max(0, columnCount - fixedColumnCount),
columnWidth: this._columnWidthRightGrid,
deferredMeasurementCache: this._deferredMeasurementCacheBottomRightGrid,
height: this._getBottomGridHeight(props),
onScroll: this._onScroll,
ref: this._bottomRightGridRef,
rowCount: Math.max(0, rowCount - fixedRowCount),
rowHeight: this._rowHeightBottomGrid,
scrollToColumn: scrollToColumn - fixedColumnCount,
scrollToRow: scrollToRow - fixedRowCount,
style: this._bottomRightGridStyle,
width: this._getRightGridWidth(props)
}));
}
}, {
key: "_renderTopLeftGrid",
value: function(props) {
var fixedColumnCount = props.fixedColumnCount, fixedRowCount = props.fixedRowCount;
return fixedColumnCount && fixedRowCount ? _react2.default.createElement(_Grid2.default, (0,
_extends3.default)({}, props, {
columnCount: fixedColumnCount,
height: this._getTopGridHeight(props),
ref: this._topLeftGridRef,
rowCount: fixedRowCount,
style: this._topLeftGridStyle,
tabIndex: null,
width: this._getLeftGridWidth(props)
})) : null;
}
}, {
key: "_renderTopRightGrid",
value: function(props) {
var columnCount = props.columnCount, fixedColumnCount = props.fixedColumnCount, fixedRowCount = props.fixedRowCount, scrollLeft = props.scrollLeft;
return fixedRowCount ? _react2.default.createElement(_Grid2.default, (0, _extends3.default)({}, props, {
cellRenderer: this._cellRendererTopRightGrid,
columnCount: Math.max(0, columnCount - fixedColumnCount) + 1,
columnWidth: this._columnWidthRightGrid,
deferredMeasurementCache: this._deferredMeasurementCacheTopRightGrid,
height: this._getTopGridHeight(props),
ref: this._topRightGridRef,
rowCount: fixedRowCount,
scrollLeft: scrollLeft,
style: this._topRightGridStyle,
tabIndex: null,
width: this._getRightGridWidth(props)
})) : null;
}
}, {
key: "_rowHeightBottomGrid",
value: function(_ref7) {
var index = _ref7.index, _props10 = this.props, fixedRowCount = _props10.fixedRowCount, rowCount = _props10.rowCount, rowHeight = _props10.rowHeight;
return index === rowCount - fixedRowCount ? SCROLLBAR_SIZE_BUFFER : "function" == typeof rowHeight ? rowHeight({
index: index + fixedRowCount
}) : rowHeight;
}
}, {
key: "_topLeftGridRef",
value: function(ref) {
this._topLeftGrid = ref;
}
}, {
key: "_topRightGridRef",
value: function(ref) {
this._topRightGrid = ref;
}
} ]), MultiGrid;
}(_react.PureComponent);
MultiGrid.defaultProps = {
fixedColumnCount: 0,
fixedRowCount: 0,
style: {},
styleBottomLeftGrid: {},
styleBottomRightGrid: {},
styleTopLeftGrid: {},
styleTopRightGrid: {}
}, exports.default = MultiGrid;
}, /* 160 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), CellMeasurerCacheDecorator = (__webpack_require__(101),
function() {
function CellMeasurerCacheDecorator() {
var _this = this, params = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
(0, _classCallCheck3.default)(this, CellMeasurerCacheDecorator), this.columnWidth = function(_ref) {
var index = _ref.index;
_this._cellMeasurerCache.columnWidth({
index: index + _this._columnIndexOffset
});
}, this.rowHeight = function(_ref2) {
var index = _ref2.index;
_this._cellMeasurerCache.rowHeight({
index: index + _this._rowIndexOffset
});
};
var cellMeasurerCache = params.cellMeasurerCache, _params$columnIndexOf = params.columnIndexOffset, columnIndexOffset = void 0 === _params$columnIndexOf ? 0 : _params$columnIndexOf, _params$rowIndexOffse = params.rowIndexOffset, rowIndexOffset = void 0 === _params$rowIndexOffse ? 0 : _params$rowIndexOffse;
this._cellMeasurerCache = cellMeasurerCache, this._columnIndexOffset = columnIndexOffset,
this._rowIndexOffset = rowIndexOffset;
}
return (0, _createClass3.default)(CellMeasurerCacheDecorator, [ {
key: "clear",
value: function(rowIndex, columnIndex) {
this._cellMeasurerCache.clear(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);
}
}, {
key: "clearAll",
value: function() {
this._cellMeasurerCache.clearAll();
}
}, {
key: "hasFixedHeight",
value: function() {
return this._cellMeasurerCache.hasFixedHeight();
}
}, {
key: "hasFixedWidth",
value: function() {
return this._cellMeasurerCache.hasFixedWidth();
}
}, {
key: "getHeight",
value: function(rowIndex) {
var columnIndex = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return this._cellMeasurerCache.getHeight(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);
}
}, {
key: "getWidth",
value: function(rowIndex) {
var columnIndex = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return this._cellMeasurerCache.getWidth(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);
}
}, {
key: "has",
value: function(rowIndex) {
var columnIndex = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
return this._cellMeasurerCache.has(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);
}
}, {
key: "set",
value: function(rowIndex, columnIndex, width, height) {
this._cellMeasurerCache.set(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset, width, height);
}
}, {
key: "defaultHeight",
get: function() {
return this._cellMeasurerCache.defaultHeight;
}
}, {
key: "defaultWidth",
get: function() {
return this._cellMeasurerCache.defaultWidth;
}
} ]), CellMeasurerCacheDecorator;
}());
exports.default = CellMeasurerCacheDecorator;
}, /* 161 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.ScrollSync = exports.default = void 0;
var _ScrollSync2 = __webpack_require__(162), _ScrollSync3 = _interopRequireDefault(_ScrollSync2);
exports.default = _ScrollSync3.default, exports.ScrollSync = _ScrollSync3.default;
}, /* 162 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(89), _react = (_interopRequireDefault(_propTypes),
__webpack_require__(97)), ScrollSync = function(_PureComponent) {
function ScrollSync(props, context) {
(0, _classCallCheck3.default)(this, ScrollSync);
var _this = (0, _possibleConstructorReturn3.default)(this, (ScrollSync.__proto__ || (0,
_getPrototypeOf2.default)(ScrollSync)).call(this, props, context));
return _this.state = {
clientHeight: 0,
clientWidth: 0,
scrollHeight: 0,
scrollLeft: 0,
scrollTop: 0,
scrollWidth: 0
}, _this._onScroll = _this._onScroll.bind(_this), _this;
}
return (0, _inherits3.default)(ScrollSync, _PureComponent), (0, _createClass3.default)(ScrollSync, [ {
key: "render",
value: function() {
var children = this.props.children, _state = this.state, clientHeight = _state.clientHeight, clientWidth = _state.clientWidth, scrollHeight = _state.scrollHeight, scrollLeft = _state.scrollLeft, scrollTop = _state.scrollTop, scrollWidth = _state.scrollWidth;
return children({
clientHeight: clientHeight,
clientWidth: clientWidth,
onScroll: this._onScroll,
scrollHeight: scrollHeight,
scrollLeft: scrollLeft,
scrollTop: scrollTop,
scrollWidth: scrollWidth
});
}
}, {
key: "_onScroll",
value: function(_ref) {
var clientHeight = _ref.clientHeight, clientWidth = _ref.clientWidth, scrollHeight = _ref.scrollHeight, scrollLeft = _ref.scrollLeft, scrollTop = _ref.scrollTop, scrollWidth = _ref.scrollWidth;
this.setState({
clientHeight: clientHeight,
clientWidth: clientWidth,
scrollHeight: scrollHeight,
scrollLeft: scrollLeft,
scrollTop: scrollTop,
scrollWidth: scrollWidth
});
}
} ]), ScrollSync;
}(_react.PureComponent);
exports.default = ScrollSync;
}, /* 163 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.SortIndicator = exports.SortDirection = exports.Column = exports.Table = exports.defaultRowRenderer = exports.defaultHeaderRenderer = exports.defaultHeaderRowRenderer = exports.defaultCellRenderer = exports.defaultCellDataGetter = exports.default = void 0;
var _Table2 = __webpack_require__(164), _Table3 = _interopRequireDefault(_Table2), _defaultCellDataGetter2 = __webpack_require__(170), _defaultCellDataGetter3 = _interopRequireDefault(_defaultCellDataGetter2), _defaultCellRenderer2 = __webpack_require__(169), _defaultCellRenderer3 = _interopRequireDefault(_defaultCellRenderer2), _defaultHeaderRowRenderer2 = __webpack_require__(172), _defaultHeaderRowRenderer3 = _interopRequireDefault(_defaultHeaderRowRenderer2), _defaultHeaderRenderer2 = __webpack_require__(166), _defaultHeaderRenderer3 = _interopRequireDefault(_defaultHeaderRenderer2), _defaultRowRenderer2 = __webpack_require__(171), _defaultRowRenderer3 = _interopRequireDefault(_defaultRowRenderer2), _Column2 = __webpack_require__(165), _Column3 = _interopRequireDefault(_Column2), _SortDirection2 = __webpack_require__(168), _SortDirection3 = _interopRequireDefault(_SortDirection2), _SortIndicator2 = __webpack_require__(167), _SortIndicator3 = _interopRequireDefault(_SortIndicator2);
exports.default = _Table3.default, exports.defaultCellDataGetter = _defaultCellDataGetter3.default,
exports.defaultCellRenderer = _defaultCellRenderer3.default, exports.defaultHeaderRowRenderer = _defaultHeaderRowRenderer3.default,
exports.defaultHeaderRenderer = _defaultHeaderRenderer3.default, exports.defaultRowRenderer = _defaultRowRenderer3.default,
exports.Table = _Table3.default, exports.Column = _Column3.default, exports.SortDirection = _SortDirection3.default,
exports.SortIndicator = _SortIndicator3.default;
}, /* 164 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _extends2 = __webpack_require__(107), _extends3 = _interopRequireDefault(_extends2), _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _classnames = __webpack_require__(114), _classnames2 = _interopRequireDefault(_classnames), _Column = __webpack_require__(165), _propTypes = (_interopRequireDefault(_Column),
__webpack_require__(89)), _react = (_interopRequireDefault(_propTypes), __webpack_require__(97)), _react2 = _interopRequireDefault(_react), _reactDom = __webpack_require__(103), _Grid = __webpack_require__(127), _Grid2 = _interopRequireDefault(_Grid), _defaultRowRenderer = __webpack_require__(171), _defaultRowRenderer2 = _interopRequireDefault(_defaultRowRenderer), _defaultHeaderRowRenderer = __webpack_require__(172), _defaultHeaderRowRenderer2 = _interopRequireDefault(_defaultHeaderRowRenderer), _SortDirection = __webpack_require__(168), _SortDirection2 = _interopRequireDefault(_SortDirection), Table = function(_PureComponent) {
function Table(props) {
(0, _classCallCheck3.default)(this, Table);
var _this = (0, _possibleConstructorReturn3.default)(this, (Table.__proto__ || (0,
_getPrototypeOf2.default)(Table)).call(this, props));
return _this.state = {
scrollbarWidth: 0
}, _this._createColumn = _this._createColumn.bind(_this), _this._createRow = _this._createRow.bind(_this),
_this._onScroll = _this._onScroll.bind(_this), _this._onSectionRendered = _this._onSectionRendered.bind(_this),
_this._setRef = _this._setRef.bind(_this), _this;
}
return (0, _inherits3.default)(Table, _PureComponent), (0, _createClass3.default)(Table, [ {
key: "forceUpdateGrid",
value: function() {
this.Grid.forceUpdate();
}
}, {
key: "getOffsetForRow",
value: function(_ref) {
var alignment = _ref.alignment, index = _ref.index, _Grid$getOffsetForCel = this.Grid.getOffsetForCell({
alignment: alignment,
rowIndex: index
}), scrollTop = _Grid$getOffsetForCel.scrollTop;
return scrollTop;
}
}, {
key: "measureAllRows",
value: function() {
this.Grid.measureAllCells();
}
}, {
key: "recomputeRowHeights",
value: function() {
var index = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
this.Grid.recomputeGridSize({
rowIndex: index
});
}
}, {
key: "scrollToPosition",
value: function() {
var scrollTop = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
this.Grid.scrollToPosition({
scrollTop: scrollTop
});
}
}, {
key: "scrollToRow",
value: function() {
var index = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
this.Grid.scrollToCell({
columnIndex: 0,
rowIndex: index
});
}
}, {
key: "componentDidMount",
value: function() {
this._setScrollbarWidth();
}
}, {
key: "componentDidUpdate",
value: function() {
this._setScrollbarWidth();
}
}, {
key: "render",
value: function() {
var _this2 = this, _props = this.props, children = _props.children, className = _props.className, disableHeader = _props.disableHeader, gridClassName = _props.gridClassName, gridStyle = _props.gridStyle, headerHeight = _props.headerHeight, headerRowRenderer = _props.headerRowRenderer, height = _props.height, id = _props.id, noRowsRenderer = _props.noRowsRenderer, rowClassName = _props.rowClassName, rowStyle = _props.rowStyle, scrollToIndex = _props.scrollToIndex, style = _props.style, width = _props.width, scrollbarWidth = this.state.scrollbarWidth, availableRowsHeight = disableHeader ? height : height - headerHeight, rowClass = "function" == typeof rowClassName ? rowClassName({
index: -1
}) : rowClassName, rowStyleObject = "function" == typeof rowStyle ? rowStyle({
index: -1
}) : rowStyle;
return this._cachedColumnStyles = [], _react2.default.Children.toArray(children).forEach(function(column, index) {
var flexStyles = _this2._getFlexStyleForColumn(column, column.props.style);
_this2._cachedColumnStyles[index] = (0, _extends3.default)({}, flexStyles, {
overflow: "hidden"
});
}), _react2.default.createElement("div", {
className: (0, _classnames2.default)("ReactVirtualized__Table", className),
id: id,
role: "grid",
style: style
}, !disableHeader && headerRowRenderer({
className: (0, _classnames2.default)("ReactVirtualized__Table__headerRow", rowClass),
columns: this._getHeaderColumns(),
style: (0, _extends3.default)({}, rowStyleObject, {
height: headerHeight,
overflow: "hidden",
paddingRight: scrollbarWidth,
width: width
})
}), _react2.default.createElement(_Grid2.default, (0, _extends3.default)({}, this.props, {
autoContainerWidth: !0,
className: (0, _classnames2.default)("ReactVirtualized__Table__Grid", gridClassName),
cellRenderer: this._createRow,
columnWidth: width,
columnCount: 1,
height: availableRowsHeight,
id: void 0,
noContentRenderer: noRowsRenderer,
onScroll: this._onScroll,
onSectionRendered: this._onSectionRendered,
ref: this._setRef,
role: "rowgroup",
scrollbarWidth: scrollbarWidth,
scrollToRow: scrollToIndex,
style: (0, _extends3.default)({}, gridStyle, {
overflowX: "hidden"
})
})));
}
}, {
key: "_createColumn",
value: function(_ref2) {
var column = _ref2.column, columnIndex = _ref2.columnIndex, isScrolling = _ref2.isScrolling, parent = _ref2.parent, rowData = _ref2.rowData, rowIndex = _ref2.rowIndex, _column$props = column.props, cellDataGetter = _column$props.cellDataGetter, cellRenderer = _column$props.cellRenderer, className = _column$props.className, columnData = _column$props.columnData, dataKey = _column$props.dataKey, cellData = cellDataGetter({
columnData: columnData,
dataKey: dataKey,
rowData: rowData
}), renderedCell = cellRenderer({
cellData: cellData,
columnData: columnData,
columnIndex: columnIndex,
dataKey: dataKey,
isScrolling: isScrolling,
parent: parent,
rowData: rowData,
rowIndex: rowIndex
}), style = this._cachedColumnStyles[columnIndex], title = "string" == typeof renderedCell ? renderedCell : null;
return _react2.default.createElement("div", {
key: "Row" + rowIndex + "-Col" + columnIndex,
className: (0, _classnames2.default)("ReactVirtualized__Table__rowColumn", className),
style: style,
title: title
}, renderedCell);
}
}, {
key: "_createHeader",
value: function(_ref3) {
var column = _ref3.column, index = _ref3.index, _props2 = this.props, headerClassName = _props2.headerClassName, headerStyle = _props2.headerStyle, onHeaderClick = _props2.onHeaderClick, sort = _props2.sort, sortBy = _props2.sortBy, sortDirection = _props2.sortDirection, _column$props2 = column.props, dataKey = _column$props2.dataKey, disableSort = _column$props2.disableSort, headerRenderer = _column$props2.headerRenderer, label = _column$props2.label, columnData = _column$props2.columnData, sortEnabled = !disableSort && sort, classNames = (0,
_classnames2.default)("ReactVirtualized__Table__headerColumn", headerClassName, column.props.headerClassName, {
ReactVirtualized__Table__sortableHeaderColumn: sortEnabled
}), style = this._getFlexStyleForColumn(column, headerStyle), renderedHeader = headerRenderer({
columnData: columnData,
dataKey: dataKey,
disableSort: disableSort,
label: label,
sortBy: sortBy,
sortDirection: sortDirection
}), a11yProps = {};
return (sortEnabled || onHeaderClick) && !function() {
var newSortDirection = sortBy !== dataKey || sortDirection === _SortDirection2.default.DESC ? _SortDirection2.default.ASC : _SortDirection2.default.DESC, onClick = function(event) {
sortEnabled && sort({
sortBy: dataKey,
sortDirection: newSortDirection
}), onHeaderClick && onHeaderClick({
columnData: columnData,
dataKey: dataKey,
event: event
});
}, onKeyDown = function(event) {
"Enter" !== event.key && " " !== event.key || onClick(event);
};
a11yProps["aria-label"] = column.props["aria-label"] || label || dataKey, a11yProps.role = "rowheader",
a11yProps.tabIndex = 0, a11yProps.onClick = onClick, a11yProps.onKeyDown = onKeyDown;
}(), _react2.default.createElement("div", (0, _extends3.default)({}, a11yProps, {
key: "Header-Col" + index,
className: classNames,
style: style
}), renderedHeader);
}
}, {
key: "_createRow",
value: function(_ref4) {
var _this3 = this, index = _ref4.rowIndex, isScrolling = _ref4.isScrolling, key = _ref4.key, parent = _ref4.parent, style = _ref4.style, _props3 = this.props, children = _props3.children, onRowClick = _props3.onRowClick, onRowDoubleClick = _props3.onRowDoubleClick, onRowMouseOver = _props3.onRowMouseOver, onRowMouseOut = _props3.onRowMouseOut, rowClassName = _props3.rowClassName, rowGetter = _props3.rowGetter, rowRenderer = _props3.rowRenderer, rowStyle = _props3.rowStyle, scrollbarWidth = this.state.scrollbarWidth, rowClass = "function" == typeof rowClassName ? rowClassName({
index: index
}) : rowClassName, rowStyleObject = "function" == typeof rowStyle ? rowStyle({
index: index
}) : rowStyle, rowData = rowGetter({
index: index
}), columns = _react2.default.Children.toArray(children).map(function(column, columnIndex) {
return _this3._createColumn({
column: column,
columnIndex: columnIndex,
isScrolling: isScrolling,
parent: parent,
rowData: rowData,
rowIndex: index,
scrollbarWidth: scrollbarWidth
});
}), className = (0, _classnames2.default)("ReactVirtualized__Table__row", rowClass), flattenedStyle = (0,
_extends3.default)({}, style, rowStyleObject, {
height: this._getRowHeight(index),
overflow: "hidden",
paddingRight: scrollbarWidth
});
return rowRenderer({
className: className,
columns: columns,
index: index,
isScrolling: isScrolling,
key: key,
onRowClick: onRowClick,
onRowDoubleClick: onRowDoubleClick,
onRowMouseOver: onRowMouseOver,
onRowMouseOut: onRowMouseOut,
rowData: rowData,
style: flattenedStyle
});
}
}, {
key: "_getFlexStyleForColumn",
value: function(column) {
var customStyle = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, flexValue = column.props.flexGrow + " " + column.props.flexShrink + " " + column.props.width + "px", style = (0,
_extends3.default)({}, customStyle, {
flex: flexValue,
msFlex: flexValue,
WebkitFlex: flexValue
});
return column.props.maxWidth && (style.maxWidth = column.props.maxWidth), column.props.minWidth && (style.minWidth = column.props.minWidth),
style;
}
}, {
key: "_getHeaderColumns",
value: function() {
var _this4 = this, _props4 = this.props, children = _props4.children, disableHeader = _props4.disableHeader, items = disableHeader ? [] : _react2.default.Children.toArray(children);
return items.map(function(column, index) {
return _this4._createHeader({
column: column,
index: index
});
});
}
}, {
key: "_getRowHeight",
value: function(rowIndex) {
var rowHeight = this.props.rowHeight;
return "function" == typeof rowHeight ? rowHeight({
index: rowIndex
}) : rowHeight;
}
}, {
key: "_onScroll",
value: function(_ref5) {
var clientHeight = _ref5.clientHeight, scrollHeight = _ref5.scrollHeight, scrollTop = _ref5.scrollTop, onScroll = this.props.onScroll;
onScroll({
clientHeight: clientHeight,
scrollHeight: scrollHeight,
scrollTop: scrollTop
});
}
}, {
key: "_onSectionRendered",
value: function(_ref6) {
var rowOverscanStartIndex = _ref6.rowOverscanStartIndex, rowOverscanStopIndex = _ref6.rowOverscanStopIndex, rowStartIndex = _ref6.rowStartIndex, rowStopIndex = _ref6.rowStopIndex, onRowsRendered = this.props.onRowsRendered;
onRowsRendered({
overscanStartIndex: rowOverscanStartIndex,
overscanStopIndex: rowOverscanStopIndex,
startIndex: rowStartIndex,
stopIndex: rowStopIndex
});
}
}, {
key: "_setRef",
value: function(ref) {
this.Grid = ref;
}
}, {
key: "_setScrollbarWidth",
value: function() {
var Grid = (0, _reactDom.findDOMNode)(this.Grid), clientWidth = Grid.clientWidth || 0, offsetWidth = Grid.offsetWidth || 0, scrollbarWidth = offsetWidth - clientWidth;
this.setState({
scrollbarWidth: scrollbarWidth
});
}
} ]), Table;
}(_react.PureComponent);
Table.defaultProps = {
disableHeader: !1,
estimatedRowSize: 30,
headerHeight: 0,
headerStyle: {},
noRowsRenderer: function() {
return null;
},
onRowsRendered: function() {
return null;
},
onScroll: function() {
return null;
},
overscanIndicesGetter: _Grid.accessibilityOverscanIndicesGetter,
overscanRowCount: 10,
rowRenderer: _defaultRowRenderer2.default,
headerRowRenderer: _defaultHeaderRowRenderer2.default,
rowStyle: {},
scrollToAlignment: "auto",
scrollToIndex: -1,
style: {}
}, exports.default = Table;
}, /* 165 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(89), _react = (_interopRequireDefault(_propTypes),
__webpack_require__(97)), _defaultHeaderRenderer = __webpack_require__(166), _defaultHeaderRenderer2 = _interopRequireDefault(_defaultHeaderRenderer), _defaultCellRenderer = __webpack_require__(169), _defaultCellRenderer2 = _interopRequireDefault(_defaultCellRenderer), _defaultCellDataGetter = __webpack_require__(170), _defaultCellDataGetter2 = _interopRequireDefault(_defaultCellDataGetter), Column = function(_Component) {
function Column() {
return (0, _classCallCheck3.default)(this, Column), (0, _possibleConstructorReturn3.default)(this, (Column.__proto__ || (0,
_getPrototypeOf2.default)(Column)).apply(this, arguments));
}
return (0, _inherits3.default)(Column, _Component), Column;
}(_react.Component);
Column.defaultProps = {
cellDataGetter: _defaultCellDataGetter2.default,
cellRenderer: _defaultCellRenderer2.default,
flexGrow: 0,
flexShrink: 1,
headerRenderer: _defaultHeaderRenderer2.default,
style: {}
}, exports.default = Column;
}, /* 166 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function defaultHeaderRenderer(_ref) {
var dataKey = (_ref.columnData, _ref.dataKey), label = (_ref.disableSort, _ref.label), sortBy = _ref.sortBy, sortDirection = _ref.sortDirection, showSortIndicator = sortBy === dataKey, children = [ _react2.default.createElement("span", {
className: "ReactVirtualized__Table__headerTruncatedText",
key: "label",
title: label
}, label) ];
return showSortIndicator && children.push(_react2.default.createElement(_SortIndicator2.default, {
key: "SortIndicator",
sortDirection: sortDirection
})), children;
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = defaultHeaderRenderer;
var _react = __webpack_require__(97), _react2 = _interopRequireDefault(_react), _SortIndicator = __webpack_require__(167), _SortIndicator2 = _interopRequireDefault(_SortIndicator);
}, /* 167 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function SortIndicator(_ref) {
var sortDirection = _ref.sortDirection, classNames = (0, _classnames2.default)("ReactVirtualized__Table__sortableHeaderIcon", {
"ReactVirtualized__Table__sortableHeaderIcon--ASC": sortDirection === _SortDirection2.default.ASC,
"ReactVirtualized__Table__sortableHeaderIcon--DESC": sortDirection === _SortDirection2.default.DESC
});
return _react2.default.createElement("svg", {
className: classNames,
width: 18,
height: 18,
viewBox: "0 0 24 24"
}, sortDirection === _SortDirection2.default.ASC ? _react2.default.createElement("path", {
d: "M7 14l5-5 5 5z"
}) : _react2.default.createElement("path", {
d: "M7 10l5 5 5-5z"
}), _react2.default.createElement("path", {
d: "M0 0h24v24H0z",
fill: "none"
}));
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = SortIndicator;
var _classnames = __webpack_require__(114), _classnames2 = _interopRequireDefault(_classnames), _propTypes = __webpack_require__(89), _react = (_interopRequireDefault(_propTypes),
__webpack_require__(97)), _react2 = _interopRequireDefault(_react), _SortDirection = __webpack_require__(168), _SortDirection2 = _interopRequireDefault(_SortDirection);
}, /* 168 */
/***/
function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
});
var SortDirection = {
ASC: "ASC",
DESC: "DESC"
};
exports.default = SortDirection;
}, /* 169 */
/***/
function(module, exports) {
"use strict";
function defaultCellRenderer(_ref) {
var cellData = _ref.cellData;
_ref.columnData, _ref.columnIndex, _ref.dataKey, _ref.isScrolling, _ref.rowData,
_ref.rowIndex;
return null == cellData ? "" : String(cellData);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = defaultCellRenderer;
}, /* 170 */
/***/
function(module, exports) {
"use strict";
function defaultCellDataGetter(_ref) {
var dataKey = (_ref.columnData, _ref.dataKey), rowData = _ref.rowData;
return "function" == typeof rowData.get ? rowData.get(dataKey) : rowData[dataKey];
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = defaultCellDataGetter;
}, /* 171 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function defaultRowRenderer(_ref) {
var className = _ref.className, columns = _ref.columns, index = _ref.index, key = (_ref.isScrolling,
_ref.key), onRowClick = _ref.onRowClick, onRowDoubleClick = _ref.onRowDoubleClick, onRowMouseOver = _ref.onRowMouseOver, onRowMouseOut = _ref.onRowMouseOut, rowData = _ref.rowData, style = _ref.style, a11yProps = {};
return (onRowClick || onRowDoubleClick || onRowMouseOver || onRowMouseOut) && (a11yProps["aria-label"] = "row",
a11yProps.tabIndex = 0, onRowClick && (a11yProps.onClick = function(event) {
return onRowClick({
event: event,
index: index,
rowData: rowData
});
}), onRowDoubleClick && (a11yProps.onDoubleClick = function(event) {
return onRowDoubleClick({
event: event,
index: index,
rowData: rowData
});
}), onRowMouseOut && (a11yProps.onMouseOut = function(event) {
return onRowMouseOut({
event: event,
index: index,
rowData: rowData
});
}), onRowMouseOver && (a11yProps.onMouseOver = function(event) {
return onRowMouseOver({
event: event,
index: index,
rowData: rowData
});
})), _react2.default.createElement("div", (0, _extends3.default)({}, a11yProps, {
className: className,
key: key,
role: "row",
style: style
}), columns);
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _extends2 = __webpack_require__(107), _extends3 = _interopRequireDefault(_extends2);
exports.default = defaultRowRenderer;
var _react = __webpack_require__(97), _react2 = _interopRequireDefault(_react);
}, /* 172 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function defaultHeaderRowRenderer(_ref) {
var className = _ref.className, columns = _ref.columns, style = _ref.style;
return _react2.default.createElement("div", {
className: className,
role: "row",
style: style
}, columns);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = defaultHeaderRowRenderer;
var _react = __webpack_require__(97), _react2 = _interopRequireDefault(_react);
}, /* 173 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.IS_SCROLLING_TIMEOUT = exports.WindowScroller = exports.default = void 0;
var _onScroll = __webpack_require__(174);
Object.defineProperty(exports, "IS_SCROLLING_TIMEOUT", {
enumerable: !0,
get: function() {
return _onScroll.IS_SCROLLING_TIMEOUT;
}
});
var _WindowScroller2 = __webpack_require__(175), _WindowScroller3 = _interopRequireDefault(_WindowScroller2);
exports.default = _WindowScroller3.default, exports.WindowScroller = _WindowScroller3.default;
}, /* 174 */
/***/
function(module, exports) {
"use strict";
function enablePointerEventsIfDisabled() {
disablePointerEventsTimeoutId && (disablePointerEventsTimeoutId = null, document.body.style.pointerEvents = originalBodyPointerEvents,
originalBodyPointerEvents = null);
}
function enablePointerEventsAfterDelayCallback() {
enablePointerEventsIfDisabled(), mountedInstances.forEach(function(instance) {
return instance.__resetIsScrolling();
});
}
function enablePointerEventsAfterDelay() {
disablePointerEventsTimeoutId && clearTimeout(disablePointerEventsTimeoutId), disablePointerEventsTimeoutId = setTimeout(enablePointerEventsAfterDelayCallback, IS_SCROLLING_TIMEOUT);
}
function onScrollWindow(event) {
event.currentTarget === window && null == originalBodyPointerEvents && (originalBodyPointerEvents = document.body.style.pointerEvents,
document.body.style.pointerEvents = "none"), enablePointerEventsAfterDelay(), mountedInstances.forEach(function(instance) {
instance.scrollElement === event.currentTarget && instance.__handleWindowScrollEvent(event);
});
}
function registerScrollListener(component, element) {
mountedInstances.some(function(instance) {
return instance.scrollElement === element;
}) || element.addEventListener("scroll", onScrollWindow), mountedInstances.push(component);
}
function unregisterScrollListener(component, element) {
mountedInstances = mountedInstances.filter(function(instance) {
return instance !== component;
}), mountedInstances.length || (element.removeEventListener("scroll", onScrollWindow),
disablePointerEventsTimeoutId && (clearTimeout(disablePointerEventsTimeoutId), enablePointerEventsIfDisabled()));
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.registerScrollListener = registerScrollListener, exports.unregisterScrollListener = unregisterScrollListener;
var mountedInstances = [], originalBodyPointerEvents = null, disablePointerEventsTimeoutId = null, IS_SCROLLING_TIMEOUT = exports.IS_SCROLLING_TIMEOUT = 150;
}, /* 175 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _getPrototypeOf = __webpack_require__(3), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(34), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(81), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(89), _react = (_interopRequireDefault(_propTypes),
__webpack_require__(97)), _reactDom = __webpack_require__(103), _reactDom2 = _interopRequireDefault(_reactDom), _onScroll = __webpack_require__(174), _dimensions = __webpack_require__(176), WindowScroller = function(_PureComponent) {
function WindowScroller(props) {
(0, _classCallCheck3.default)(this, WindowScroller);
var _this = (0, _possibleConstructorReturn3.default)(this, (WindowScroller.__proto__ || (0,
_getPrototypeOf2.default)(WindowScroller)).call(this, props)), _ref = "undefined" != typeof window ? (0,
_dimensions.getDimensions)(props.scrollElement || window) : {
width: 0,
height: 0
}, width = _ref.width, height = _ref.height;
return _this.state = {
height: height,
width: width,
isScrolling: !1,
scrollLeft: 0,
scrollTop: 0
}, _this._onResize = _this._onResize.bind(_this), _this.__handleWindowScrollEvent = _this.__handleWindowScrollEvent.bind(_this),
_this.__resetIsScrolling = _this.__resetIsScrolling.bind(_this), _this;
}
return (0, _inherits3.default)(WindowScroller, _PureComponent), (0, _createClass3.default)(WindowScroller, [ {
key: "updatePosition",
value: function(scrollElement) {
var onResize = this.props.onResize, _state = this.state, height = _state.height, width = _state.width;
scrollElement = scrollElement || this.props.scrollElement || window;
var offset = (0, _dimensions.getPositionOffset)(_reactDom2.default.findDOMNode(this), scrollElement);
this._positionFromTop = offset.top, this._positionFromLeft = offset.left;
var dimensions = (0, _dimensions.getDimensions)(scrollElement);
height === dimensions.height && width === dimensions.width || (this.setState({
height: dimensions.height,
width: dimensions.width
}), onResize({
height: dimensions.height,
width: dimensions.width
}));
}
}, {
key: "componentDidMount",
value: function() {
var scrollElement = this.props.scrollElement || window;
this.updatePosition(scrollElement), (0, _onScroll.registerScrollListener)(this, scrollElement),
window.addEventListener("resize", this._onResize, !1);
}
}, {
key: "componentWillReceiveProps",
value: function(nextProps) {
var scrollElement = this.props.scrollElement || window, nextScrollElement = nextProps.scrollElement || window;
scrollElement !== nextScrollElement && (this.updatePosition(nextScrollElement),
(0, _onScroll.unregisterScrollListener)(this, scrollElement), (0, _onScroll.registerScrollListener)(this, nextScrollElement));
}
}, {
key: "componentWillUnmount",
value: function() {
(0, _onScroll.unregisterScrollListener)(this, this.props.scrollElement || window),
window.removeEventListener("resize", this._onResize, !1);
}
}, {
key: "render",
value: function() {
var children = this.props.children, _state2 = this.state, isScrolling = _state2.isScrolling, scrollTop = _state2.scrollTop, scrollLeft = _state2.scrollLeft, height = _state2.height, width = _state2.width;
return children({
width: width,
height: height,
isScrolling: isScrolling,
scrollLeft: scrollLeft,
scrollTop: scrollTop
});
}
}, {
key: "_onResize",
value: function(event) {
this.updatePosition();
}
}, {
key: "__handleWindowScrollEvent",
value: function(event) {
var onScroll = this.props.onScroll, scrollElement = this.props.scrollElement || window, scrollOffset = (0,
_dimensions.getScrollOffset)(scrollElement), scrollLeft = Math.max(0, scrollOffset.left - this._positionFromLeft), scrollTop = Math.max(0, scrollOffset.top - this._positionFromTop);
this.setState({
isScrolling: !0,
scrollLeft: scrollLeft,
scrollTop: scrollTop
}), onScroll({
scrollLeft: scrollLeft,
scrollTop: scrollTop
});
}
}, {
key: "__resetIsScrolling",
value: function() {
this.setState({
isScrolling: !1
});
}
}, {
key: "scrollElement",
get: function() {
return this.props.scrollElement || window;
}
} ]), WindowScroller;
}(_react.PureComponent);
WindowScroller.defaultProps = {
onResize: function() {},
onScroll: function() {}
}, exports.default = WindowScroller;
}, /* 176 */
/***/
function(module, exports) {
"use strict";
function getDimensions(element) {
if (element === window) return {
height: "number" == typeof window.innerHeight ? window.innerHeight : 0,
width: "number" == typeof window.innerWidth ? window.innerWidth : 0
};
var _element$getBoundingC = element.getBoundingClientRect(), width = _element$getBoundingC.width, height = _element$getBoundingC.height;
return {
width: width,
height: height
};
}
function getPositionOffset(element, container) {
var scrollOffset = container === window ? {
top: 0,
left: 0
} : getScrollOffset(container), containerElement = container === window ? document.documentElement : container, elementRect = element.getBoundingClientRect(), containerRect = containerElement.getBoundingClientRect();
return {
top: elementRect.top + scrollOffset.top - containerRect.top,
left: elementRect.left + scrollOffset.left - containerRect.left
};
}
function getScrollOffset(element) {
return element === window ? {
top: "scrollY" in window ? window.scrollY : document.documentElement.scrollTop,
left: "scrollX" in window ? window.scrollX : document.documentElement.scrollLeft
} : {
top: element.scrollTop,
left: element.scrollLeft
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.getDimensions = getDimensions, exports.getPositionOffset = getPositionOffset,
exports.getScrollOffset = getScrollOffset;
} ]);
});
//# sourceMappingURL=react-virtualized.js.map