diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /devtools/client/shared/vendor/react-virtualized.js | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | uxp-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz |
Add m-esr52 at 52.6.0
Diffstat (limited to 'devtools/client/shared/vendor/react-virtualized.js')
-rw-r--r-- | devtools/client/shared/vendor/react-virtualized.js | 4296 |
1 files changed, 4296 insertions, 0 deletions
diff --git a/devtools/client/shared/vendor/react-virtualized.js b/devtools/client/shared/vendor/react-virtualized.js new file mode 100644 index 0000000000..dab201ac62 --- /dev/null +++ b/devtools/client/shared/vendor/react-virtualized.js @@ -0,0 +1,4296 @@ +var REACT_PATH = "devtools/client/shared/vendor/react"; +var REACT_DOM_PATH = "devtools/client/shared/vendor/react-dom"; +var REACT_SHALLOW_COMPARE = "devtools/client/shared/vendor/react-addons-shallow-compare"; + +!function(root, factory) { + let React = require(REACT_PATH); + let shallowCompare = require(REACT_SHALLOW_COMPARE); + let ReactDOM = require(REACT_DOM_PATH); + module.exports = factory(React, shallowCompare, ReactDOM); +}(this, function(__WEBPACK_EXTERNAL_MODULE_89__, __WEBPACK_EXTERNAL_MODULE_90__, __WEBPACK_EXTERNAL_MODULE_96__) { + /******/ + 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__(91); + Object.defineProperty(exports, "AutoSizer", { + enumerable: !0, + get: function() { + return _AutoSizer.AutoSizer; + } + }); + var _CellMeasurer = __webpack_require__(94); + Object.defineProperty(exports, "CellMeasurer", { + enumerable: !0, + get: function() { + return _CellMeasurer.CellMeasurer; + } + }), Object.defineProperty(exports, "defaultCellMeasurerCellSizeCache", { + enumerable: !0, + get: function() { + return _CellMeasurer.defaultCellSizeCache; + } + }), Object.defineProperty(exports, "uniformSizeCellMeasurerCellSizeCache", { + enumerable: !0, + get: function() { + return _CellMeasurer.defaultCellSizeCache; + } + }); + var _Collection = __webpack_require__(98); + Object.defineProperty(exports, "Collection", { + enumerable: !0, + get: function() { + return _Collection.Collection; + } + }); + var _ColumnSizer = __webpack_require__(118); + Object.defineProperty(exports, "ColumnSizer", { + enumerable: !0, + get: function() { + return _ColumnSizer.ColumnSizer; + } + }); + var _Table = __webpack_require__(128); + 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, "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 _Grid = __webpack_require__(120); + Object.defineProperty(exports, "defaultCellRangeRenderer", { + enumerable: !0, + get: function() { + return _Grid.defaultCellRangeRenderer; + } + }), Object.defineProperty(exports, "Grid", { + enumerable: !0, + get: function() { + return _Grid.Grid; + } + }); + var _InfiniteLoader = __webpack_require__(137); + Object.defineProperty(exports, "InfiniteLoader", { + enumerable: !0, + get: function() { + return _InfiniteLoader.InfiniteLoader; + } + }); + var _ScrollSync = __webpack_require__(139); + Object.defineProperty(exports, "ScrollSync", { + enumerable: !0, + get: function() { + return _ScrollSync.ScrollSync; + } + }); + var _List = __webpack_require__(141); + Object.defineProperty(exports, "List", { + enumerable: !0, + get: function() { + return _List.List; + } + }); + var _WindowScroller = __webpack_require__(143); + 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), _react = __webpack_require__(89), _react2 = _interopRequireDefault(_react), _reactAddonsShallowCompare = __webpack_require__(90), _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare), ArrowKeyStepper = function(_Component) { + 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: 0, + scrollToRow: 0 + }, _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, _Component), (0, _createClass3.default)(ArrowKeyStepper, [ { + key: "render", + value: function() { + var _props = this.props, className = _props.className, children = _props.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: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); + } + }, { + key: "_onKeyDown", + value: function(event) { + var _props2 = this.props, columnCount = _props2.columnCount, rowCount = _props2.rowCount; + switch (event.key) { + case "ArrowDown": + event.preventDefault(), this.setState({ + scrollToRow: Math.min(this._rowStopIndex + 1, rowCount - 1) + }); + break; + + case "ArrowLeft": + event.preventDefault(), this.setState({ + scrollToColumn: Math.max(this._columnStartIndex - 1, 0) + }); + break; + + case "ArrowRight": + event.preventDefault(), this.setState({ + scrollToColumn: Math.min(this._columnStopIndex + 1, columnCount - 1) + }); + break; + + case "ArrowUp": + event.preventDefault(), this.setState({ + scrollToRow: Math.max(this._rowStartIndex - 1, 0) + }); + } + } + }, { + key: "_onSectionRendered", + value: function(_ref) { + var columnStartIndex = _ref.columnStartIndex, columnStopIndex = _ref.columnStopIndex, rowStartIndex = _ref.rowStartIndex, rowStopIndex = _ref.rowStopIndex; + this._columnStartIndex = columnStartIndex, this._columnStopIndex = columnStopIndex, + this._rowStartIndex = rowStartIndex, this._rowStopIndex = rowStopIndex; + } + } ]), ArrowKeyStepper; + }(_react.Component); + 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.createElementNS("http://www.w3.org/1999/xhtml",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) { + module.exports = __WEBPACK_EXTERNAL_MODULE_89__; + }, /* 90 */ + /***/ + function(module, exports) { + module.exports = __WEBPACK_EXTERNAL_MODULE_90__; + }, /* 91 */ + /***/ + 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__(92), _AutoSizer3 = _interopRequireDefault(_AutoSizer2); + exports.default = _AutoSizer3.default, exports.AutoSizer = _AutoSizer3.default; + }, /* 92 */ + /***/ + 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), _react = __webpack_require__(89), _react2 = _interopRequireDefault(_react), _reactAddonsShallowCompare = __webpack_require__(90), _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare), _detectElementResize = __webpack_require__(93), _detectElementResize2 = _interopRequireDefault(_detectElementResize), AutoSizer = function(_Component) { + 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, _Component), (0, _createClass3.default)(AutoSizer, [ { + key: "componentDidMount", + value: function() { + this._parentNode = this._autoSizer.parentNode, this._detectElementResize = (0, _detectElementResize2.default)(), + 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: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); + } + }, { + key: "_onResize", + value: function() { + var onResize = this.props.onResize, boundingRect = this._parentNode.getBoundingClientRect(), height = boundingRect.height || 0, width = boundingRect.width || 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; + 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.Component); + AutoSizer.defaultProps = { + onResize: function() {} + }, exports.default = AutoSizer; + }, /* 93 */ + /***/ + function(module, exports) { + "use strict"; + function createDetectElementResize() { + var _window; + _window = "undefined" != typeof window ? window : "undefined" != typeof self ? self : this; + var attachEvent = "undefined" != typeof document && document.attachEvent, stylesCreated = !1; + 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.createElementNS("http://www.w3.org/1999/xhtml","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 (!stylesCreated) { + 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.firstElementChild || document.getElementsByTagName("head")[0], style = document.createElementNS("http://www.w3.org/1999/xhtml","style"); + style.type = "text/css", style.styleSheet ? style.styleSheet.cssText = css : style.appendChild(document.createTextNode(css)), + head.appendChild(style), stylesCreated = !0; + } + }, addResizeListener = function(element, fn) { + attachEvent ? element.attachEvent("onresize", fn) : (element.__resizeTriggers__ || ("static" == _window.getComputedStyle(element).position && (element.style.position = "relative"), + createStyles(), element.__resizeLast__ = {}, element.__resizeListeners__ = [], (element.__resizeTriggers__ = document.createElementNS("http://www.w3.org/1999/xhtml","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) { + attachEvent ? element.detachEvent("onresize", fn) : (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), element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__))); + }; + return { + addResizeListener: addResizeListener, + removeResizeListener: removeResizeListener + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.default = createDetectElementResize; + }, /* 94 */ + /***/ + function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.defaultCellSizeCache = exports.CellMeasurer = exports.default = void 0; + var _CellMeasurer2 = __webpack_require__(95), _CellMeasurer3 = _interopRequireDefault(_CellMeasurer2), _defaultCellSizeCache2 = __webpack_require__(97), _defaultCellSizeCache3 = _interopRequireDefault(_defaultCellSizeCache2); + exports.default = _CellMeasurer3.default, exports.CellMeasurer = _CellMeasurer3.default, + exports.defaultCellSizeCache = _defaultCellSizeCache3.default; + }, /* 95 */ + /***/ + 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), _react = __webpack_require__(89), _reactAddonsShallowCompare = (_interopRequireDefault(_react), + __webpack_require__(90)), _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare), _reactDom = __webpack_require__(96), _reactDom2 = _interopRequireDefault(_reactDom), _defaultCellSizeCache = __webpack_require__(97), _defaultCellSizeCache2 = _interopRequireDefault(_defaultCellSizeCache), CellMeasurer = function(_Component) { + function CellMeasurer(props, state) { + (0, _classCallCheck3.default)(this, CellMeasurer); + var _this = (0, _possibleConstructorReturn3.default)(this, (CellMeasurer.__proto__ || (0, + _getPrototypeOf2.default)(CellMeasurer)).call(this, props, state)); + return _this._cellSizeCache = props.cellSizeCache || new _defaultCellSizeCache2.default(), + _this.getColumnWidth = _this.getColumnWidth.bind(_this), _this.getRowHeight = _this.getRowHeight.bind(_this), + _this.resetMeasurements = _this.resetMeasurements.bind(_this), _this.resetMeasurementForColumn = _this.resetMeasurementForColumn.bind(_this), + _this.resetMeasurementForRow = _this.resetMeasurementForRow.bind(_this), _this; + } + return (0, _inherits3.default)(CellMeasurer, _Component), (0, _createClass3.default)(CellMeasurer, [ { + key: "getColumnWidth", + value: function(_ref) { + var index = _ref.index; + if (this._cellSizeCache.hasColumnWidth(index)) return this._cellSizeCache.getColumnWidth(index); + for (var rowCount = this.props.rowCount, maxWidth = 0, rowIndex = 0; rowIndex < rowCount; rowIndex++) { + var _measureCell2 = this._measureCell({ + clientWidth: !0, + columnIndex: index, + rowIndex: rowIndex + }), width = _measureCell2.width; + maxWidth = Math.max(maxWidth, width); + } + return this._cellSizeCache.setColumnWidth(index, maxWidth), maxWidth; + } + }, { + key: "getRowHeight", + value: function(_ref2) { + var index = _ref2.index; + if (this._cellSizeCache.hasRowHeight(index)) return this._cellSizeCache.getRowHeight(index); + for (var columnCount = this.props.columnCount, maxHeight = 0, columnIndex = 0; columnIndex < columnCount; columnIndex++) { + var _measureCell3 = this._measureCell({ + clientHeight: !0, + columnIndex: columnIndex, + rowIndex: index + }), height = _measureCell3.height; + maxHeight = Math.max(maxHeight, height); + } + return this._cellSizeCache.setRowHeight(index, maxHeight), maxHeight; + } + }, { + key: "resetMeasurementForColumn", + value: function(columnIndex) { + this._cellSizeCache.clearColumnWidth(columnIndex); + } + }, { + key: "resetMeasurementForRow", + value: function(rowIndex) { + this._cellSizeCache.clearRowHeight(rowIndex); + } + }, { + key: "resetMeasurements", + value: function() { + this._cellSizeCache.clearAllColumnWidths(), this._cellSizeCache.clearAllRowHeights(); + } + }, { + key: "componentDidMount", + value: function() { + this._renderAndMount(); + } + }, { + key: "componentWillReceiveProps", + value: function(nextProps) { + var cellSizeCache = this.props.cellSizeCache; + cellSizeCache !== nextProps.cellSizeCache && (this._cellSizeCache = nextProps.cellSizeCache), + this._updateDivDimensions(nextProps); + } + }, { + key: "componentWillUnmount", + value: function() { + this._unmountContainer(); + } + }, { + key: "render", + value: function() { + var children = this.props.children; + return children({ + getColumnWidth: this.getColumnWidth, + getRowHeight: this.getRowHeight, + resetMeasurements: this.resetMeasurements, + resetMeasurementForColumn: this.resetMeasurementForColumn, + resetMeasurementForRow: this.resetMeasurementForRow + }); + } + }, { + key: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); + } + }, { + key: "_getContainerNode", + value: function(props) { + var container = props.container; + return container ? _reactDom2.default.findDOMNode("function" == typeof container ? container() : container) : document.firstElementChild; + } + }, { + key: "_measureCell", + value: function(_ref3) { + var _ref3$clientHeight = _ref3.clientHeight, clientHeight = void 0 !== _ref3$clientHeight && _ref3$clientHeight, _ref3$clientWidth = _ref3.clientWidth, clientWidth = void 0 === _ref3$clientWidth || _ref3$clientWidth, columnIndex = _ref3.columnIndex, rowIndex = _ref3.rowIndex, cellRenderer = this.props.cellRenderer, rendered = cellRenderer({ + columnIndex: columnIndex, + rowIndex: rowIndex + }); + this._renderAndMount(), _reactDom2.default.unstable_renderSubtreeIntoContainer(this, rendered, this._div); + var measurements = { + height: clientHeight && this._div.clientHeight, + width: clientWidth && this._div.clientWidth + }; + return _reactDom2.default.unmountComponentAtNode(this._div), measurements; + } + }, { + key: "_renderAndMount", + value: function() { + this._div || (this._div = document.createElementNS("http://www.w3.org/1999/xhtml","div"), this._div.style.display = "inline-block", + this._div.style.position = "absolute", this._div.style.visibility = "hidden", this._div.style.zIndex = -1, + this._updateDivDimensions(this.props), this._containerNode = this._getContainerNode(this.props), + this._containerNode.appendChild(this._div)); + } + }, { + key: "_unmountContainer", + value: function() { + this._div && (this._containerNode.removeChild(this._div), this._div = null), this._containerNode = null; + } + }, { + key: "_updateDivDimensions", + value: function(props) { + var height = props.height, width = props.width; + height && height !== this._divHeight && (this._divHeight = height, this._div.style.height = height + "px"), + width && width !== this._divWidth && (this._divWidth = width, this._div.style.width = width + "px"); + } + } ]), CellMeasurer; + }(_react.Component); + exports.default = CellMeasurer; + }, /* 96 */ + /***/ + function(module, exports) { + module.exports = __WEBPACK_EXTERNAL_MODULE_96__; + }, /* 97 */ + /***/ + 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), CellSizeCache = function() { + function CellSizeCache() { + var _ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, _ref$uniformRowHeight = _ref.uniformRowHeight, uniformRowHeight = void 0 !== _ref$uniformRowHeight && _ref$uniformRowHeight, _ref$uniformColumnWid = _ref.uniformColumnWidth, uniformColumnWidth = void 0 !== _ref$uniformColumnWid && _ref$uniformColumnWid; + (0, _classCallCheck3.default)(this, CellSizeCache), this._uniformRowHeight = uniformRowHeight, + this._uniformColumnWidth = uniformColumnWidth, this._cachedColumnWidths = {}, this._cachedRowHeights = {}; + } + return (0, _createClass3.default)(CellSizeCache, [ { + key: "clearAllColumnWidths", + value: function() { + this._cachedColumnWidth = void 0, this._cachedColumnWidths = {}; + } + }, { + key: "clearAllRowHeights", + value: function() { + this._cachedRowHeight = void 0, this._cachedRowHeights = {}; + } + }, { + key: "clearColumnWidth", + value: function(index) { + this._cachedColumnWidth = void 0, delete this._cachedColumnWidths[index]; + } + }, { + key: "clearRowHeight", + value: function(index) { + this._cachedRowHeight = void 0, delete this._cachedRowHeights[index]; + } + }, { + key: "getColumnWidth", + value: function(index) { + return this._uniformColumnWidth ? this._cachedColumnWidth : this._cachedColumnWidths[index]; + } + }, { + key: "getRowHeight", + value: function(index) { + return this._uniformRowHeight ? this._cachedRowHeight : this._cachedRowHeights[index]; + } + }, { + key: "hasColumnWidth", + value: function(index) { + return this._uniformColumnWidth ? !!this._cachedColumnWidth : !!this._cachedColumnWidths[index]; + } + }, { + key: "hasRowHeight", + value: function(index) { + return this._uniformRowHeight ? !!this._cachedRowHeight : !!this._cachedRowHeights[index]; + } + }, { + key: "setColumnWidth", + value: function(index, width) { + this._cachedColumnWidth = width, this._cachedColumnWidths[index] = width; + } + }, { + key: "setRowHeight", + value: function(index, height) { + this._cachedRowHeight = height, this._cachedRowHeights[index] = height; + } + } ]), CellSizeCache; + }(); + exports.default = CellSizeCache; + }, /* 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.Collection = exports.default = void 0; + var _Collection2 = __webpack_require__(99), _Collection3 = _interopRequireDefault(_Collection2); + exports.default = _Collection3.default, exports.Collection = _Collection3.default; + }, /* 99 */ + /***/ + function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + function defaultCellGroupRenderer(_ref5) { + var cellCache = _ref5.cellCache, cellRenderer = _ref5.cellRenderer, cellSizeAndPositionGetter = _ref5.cellSizeAndPositionGetter, indices = _ref5.indices, isScrolling = _ref5.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__(100), _extends3 = _interopRequireDefault(_extends2), _objectWithoutProperties2 = __webpack_require__(105), _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), _react = __webpack_require__(89), _react2 = _interopRequireDefault(_react), _CollectionView = __webpack_require__(106), _CollectionView2 = _interopRequireDefault(_CollectionView), _calculateSizeAndPositionData2 = __webpack_require__(114), _calculateSizeAndPositionData3 = _interopRequireDefault(_calculateSizeAndPositionData2), _getUpdatedOffsetForIndex = __webpack_require__(117), _getUpdatedOffsetForIndex2 = _interopRequireDefault(_getUpdatedOffsetForIndex), _reactAddonsShallowCompare = __webpack_require__(90), _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare), Collection = function(_Component) { + 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; + } + return (0, _inherits3.default)(Collection, _Component), (0, _createClass3.default)(Collection, [ { + key: "recomputeCellSizesAndPositions", + value: function() { + this._cellCache = [], this._collectionView.recomputeCellSizesAndPositions(); + } + }, { + key: "render", + value: function() { + var _this2 = this, props = (0, _objectWithoutProperties3.default)(this.props, []); + return _react2.default.createElement(_CollectionView2.default, (0, _extends3.default)({ + cellLayoutManager: this, + isScrollingChange: this._isScrollingChange, + ref: function(_ref) { + _this2._collectionView = _ref; + } + }, props)); + } + }, { + key: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); + } + }, { + 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(_ref2) { + var align = _ref2.align, cellIndex = _ref2.cellIndex, height = _ref2.height, scrollLeft = _ref2.scrollLeft, scrollTop = _ref2.scrollTop, width = _ref2.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(_ref3) { + var _this3 = this, height = _ref3.height, isScrolling = _ref3.isScrolling, width = _ref3.width, x = _ref3.x, y = _ref3.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(_ref4) { + var index = _ref4.index; + return _this3._sectionManager.getCellMetadata({ + index: index + }); + }, + indices: this._lastRenderedCellIndices, + isScrolling: isScrolling + }); + } + }, { + key: "_isScrollingChange", + value: function(isScrolling) { + isScrolling || (this._cellCache = []); + } + } ]), Collection; + }(_react.Component); + Collection.defaultProps = { + "aria-label": "grid", + cellGroupRenderer: defaultCellGroupRenderer + }, exports.default = Collection; + }, /* 100 */ + /***/ + function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + exports.__esModule = !0; + var _assign = __webpack_require__(101), _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; + }; + }, /* 101 */ + /***/ + function(module, exports, __webpack_require__) { + module.exports = { + default: __webpack_require__(102), + __esModule: !0 + }; + }, /* 102 */ + /***/ + function(module, exports, __webpack_require__) { + __webpack_require__(103), module.exports = __webpack_require__(16).Object.assign; + }, /* 103 */ + /***/ + 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__(104) + }); + }, /* 104 */ + /***/ + 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; + }, /* 105 */ + /***/ + 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; + }; + }, /* 106 */ + /***/ + 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__(100), _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__(89), _react2 = _interopRequireDefault(_react), _classnames = __webpack_require__(107), _classnames2 = _interopRequireDefault(_classnames), _createCallbackMemoizer = __webpack_require__(108), _createCallbackMemoizer2 = _interopRequireDefault(_createCallbackMemoizer), _scrollbarSize = __webpack_require__(112), _scrollbarSize2 = _interopRequireDefault(_scrollbarSize), _reactAddonsShallowCompare = __webpack_require__(90), _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare), IS_SCROLLING_TIMEOUT = 150, SCROLL_POSITION_CHANGE_REASONS = { + OBSERVED: "observed", + REQUESTED: "requested" + }, CollectionView = function(_Component) { + 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 = { + calculateSizeAndPositionDataOnNextUpdate: !1, + isScrolling: !1, + scrollLeft: 0, + scrollTop: 0 + }, _this._onSectionRenderedMemoizer = (0, _createCallbackMemoizer2.default)(), _this._onScrollMemoizer = (0, + _createCallbackMemoizer2.default)(!1), _this._invokeOnSectionRenderedHelper = _this._invokeOnSectionRenderedHelper.bind(_this), + _this._onScroll = _this._onScroll.bind(_this), _this._updateScrollPositionForScrollToCell = _this._updateScrollPositionForScrollToCell.bind(_this), + _this; + } + return (0, _inherits3.default)(CollectionView, _Component), (0, _createClass3.default)(CollectionView, [ { + key: "recomputeCellSizesAndPositions", + value: function() { + this.setState({ + calculateSizeAndPositionDataOnNextUpdate: !0 + }); + } + }, { + 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: "componentWillUpdate", + value: function(nextProps, nextState) { + 0 !== nextProps.cellCount || 0 === nextState.scrollLeft && 0 === nextState.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 || nextState.calculateSizeAndPositionDataOnNextUpdate) && nextProps.cellLayoutManager.calculateSizeAndPositionData(), + nextState.calculateSizeAndPositionDataOnNextUpdate && this.setState({ + calculateSizeAndPositionDataOnNextUpdate: !1 + }); + } + }, { + key: "render", + value: function() { + var _this2 = this, _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, _state2 = this.state, isScrolling = _state2.isScrolling, scrollLeft = _state2.scrollLeft, scrollTop = _state2.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", + height: autoHeight ? "auto" : height, + overflow: "auto", + position: "relative", + WebkitOverflowScrolling: "touch", + width: width, + willChange: "transform" + }, verticalScrollBarSize = totalHeight > height ? this._scrollbarSize : 0, horizontalScrollBarSize = totalWidth > width ? this._scrollbarSize : 0; + return totalWidth + verticalScrollBarSize <= width && (collectionStyle.overflowX = "hidden"), + totalHeight + horizontalScrollBarSize <= height && (collectionStyle.overflowY = "hidden"), + _react2.default.createElement("div", { + ref: function(_ref) { + _this2._scrollingContainer = _ref; + }, + "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: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); + } + }, { + key: "_enablePointerEventsAfterDelay", + value: function() { + var _this3 = this; + this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId), + this._disablePointerEventsTimeoutId = setTimeout(function() { + var isScrollingChange = _this3.props.isScrollingChange; + isScrollingChange(!1), _this3._disablePointerEventsTimeoutId = null, _this3.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(_ref2) { + var _this4 = this, scrollLeft = _ref2.scrollLeft, scrollTop = _ref2.scrollTop, totalHeight = _ref2.totalHeight, totalWidth = _ref2.totalWidth; + this._onScrollMemoizer({ + callback: function(_ref3) { + var scrollLeft = _ref3.scrollLeft, scrollTop = _ref3.scrollTop, _props5 = _this4.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: "_setScrollPosition", + value: function(_ref4) { + var scrollLeft = _ref4.scrollLeft, scrollTop = _ref4.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, _state3 = this.state, scrollLeft = _state3.scrollLeft, scrollTop = _state3.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.Component); + CollectionView.defaultProps = { + "aria-label": "grid", + horizontalOverscanSize: 0, + noContentRenderer: function() { + return null; + }, + onScroll: function() { + return null; + }, + onSectionRendered: function() { + return null; + }, + scrollToAlignment: "auto", + style: {}, + verticalOverscanSize: 0 + }, exports.default = CollectionView; + }, /* 107 */ + /***/ + 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__))); + }(); + }, /* 108 */ + /***/ + 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__(109), _keys2 = _interopRequireDefault(_keys); + exports.default = createCallbackMemoizer; + }, /* 109 */ + /***/ + function(module, exports, __webpack_require__) { + module.exports = { + default: __webpack_require__(110), + __esModule: !0 + }; + }, /* 110 */ + /***/ + function(module, exports, __webpack_require__) { + __webpack_require__(111), module.exports = __webpack_require__(16).Object.keys; + }, /* 111 */ + /***/ + 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)); + }; + }); + }, /* 112 */ + /***/ + function(module, exports, __webpack_require__) { + "use strict"; + var size, canUseDOM = __webpack_require__(113); + module.exports = function(recalc) { + if ((!size || recalc) && canUseDOM) { + var scrollDiv = document.createElementNS("http://www.w3.org/1999/xhtml","div"); + scrollDiv.style.position = "absolute", scrollDiv.style.top = "-9999px", scrollDiv.style.width = "50px", + scrollDiv.style.height = "50px", scrollDiv.style.overflow = "scroll", document.firstElementChild.appendChild(scrollDiv), + size = scrollDiv.offsetWidth - scrollDiv.clientWidth, document.firstElementChild.removeChild(scrollDiv); + } + return size; + }; + }, /* 113 */ + /***/ + function(module, exports) { + "use strict"; + module.exports = !("undefined" == typeof window || !window.document || !window.document.createElement); + }, /* 114 */ + /***/ + 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__(115), _SectionManager2 = _interopRequireDefault(_SectionManager); + }, /* 115 */ + /***/ + 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__(109), _keys2 = _interopRequireDefault(_keys), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _Section = __webpack_require__(116), _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; + }, /* 116 */ + /***/ + 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; + }, /* 117 */ + /***/ + 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; + }, /* 118 */ + /***/ + 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__(119), _ColumnSizer3 = _interopRequireDefault(_ColumnSizer2); + exports.default = _ColumnSizer3.default, exports.ColumnSizer = _ColumnSizer3.default; + }, /* 119 */ + /***/ + 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), _react = __webpack_require__(89), _reactAddonsShallowCompare = __webpack_require__(90), _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare), _Grid = __webpack_require__(120), _Grid2 = _interopRequireDefault(_Grid), ColumnSizer = function(_Component) { + 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, _Component), (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, + getColumnWidth: function() { + return columnWidth; + }, + registerChild: this._registerChild + }); + } + }, { + key: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); + } + }, { + key: "_registerChild", + value: function(child) { + if (null !== child && !(child instanceof _Grid2.default)) throw Error("Unexpected child type registered; only Grid children are supported."); + this._registeredChild = child, this._registeredChild && this._registeredChild.recomputeGridSize(); + } + } ]), ColumnSizer; + }(_react.Component); + exports.default = ColumnSizer; + }, /* 120 */ + /***/ + function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.defaultCellRangeRenderer = exports.Grid = exports.default = void 0; + var _Grid2 = __webpack_require__(121), _Grid3 = _interopRequireDefault(_Grid2), _defaultCellRangeRenderer2 = __webpack_require__(127), _defaultCellRangeRenderer3 = _interopRequireDefault(_defaultCellRangeRenderer2); + exports.default = _Grid3.default, exports.Grid = _Grid3.default, exports.defaultCellRangeRenderer = _defaultCellRangeRenderer3.default; + }, /* 121 */ + /***/ + 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__(100), _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__(89), _react2 = _interopRequireDefault(_react), _classnames = __webpack_require__(107), _classnames2 = _interopRequireDefault(_classnames), _calculateSizeAndPositionDataAndUpdateScrollOffset = __webpack_require__(122), _calculateSizeAndPositionDataAndUpdateScrollOffset2 = _interopRequireDefault(_calculateSizeAndPositionDataAndUpdateScrollOffset), _ScalingCellSizeAndPositionManager = __webpack_require__(123), _ScalingCellSizeAndPositionManager2 = _interopRequireDefault(_ScalingCellSizeAndPositionManager), _createCallbackMemoizer = __webpack_require__(108), _createCallbackMemoizer2 = _interopRequireDefault(_createCallbackMemoizer), _getOverscanIndices = __webpack_require__(125), _getOverscanIndices2 = _interopRequireDefault(_getOverscanIndices), _scrollbarSize = __webpack_require__(112), _scrollbarSize2 = _interopRequireDefault(_scrollbarSize), _reactAddonsShallowCompare = __webpack_require__(90), _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare), _updateScrollIndexHelper = __webpack_require__(126), _updateScrollIndexHelper2 = _interopRequireDefault(_updateScrollIndexHelper), _defaultCellRangeRenderer = __webpack_require__(127), _defaultCellRangeRenderer2 = _interopRequireDefault(_defaultCellRangeRenderer), DEFAULT_SCROLLING_RESET_TIME_INTERVAL = exports.DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150, SCROLL_POSITION_CHANGE_REASONS = { + OBSERVED: "observed", + REQUESTED: "requested" + }, Grid = function(_Component) { + 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)); + return _this.state = { + isScrolling: !1, + scrollDirectionHorizontal: _getOverscanIndices.SCROLL_DIRECTION_FIXED, + scrollDirectionVertical: _getOverscanIndices.SCROLL_DIRECTION_FIXED, + scrollLeft: 0, + scrollTop: 0 + }, _this._onGridRenderedMemoizer = (0, _createCallbackMemoizer2.default)(), _this._onScrollMemoizer = (0, + _createCallbackMemoizer2.default)(!1), _this._enablePointerEventsAfterDelayCallback = _this._enablePointerEventsAfterDelayCallback.bind(_this), + _this._invokeOnGridRenderedHelper = _this._invokeOnGridRenderedHelper.bind(_this), + _this._onScroll = _this._onScroll.bind(_this), _this._updateScrollLeftForScrollToColumn = _this._updateScrollLeftForScrollToColumn.bind(_this), + _this._updateScrollTopForScrollToRow = _this._updateScrollTopForScrollToRow.bind(_this), + _this._columnWidthGetter = _this._wrapSizeGetter(props.columnWidth), _this._rowHeightGetter = _this._wrapSizeGetter(props.rowHeight), + _this._columnSizeAndPositionManager = new _ScalingCellSizeAndPositionManager2.default({ + cellCount: props.columnCount, + cellSizeGetter: function(index) { + return _this._columnWidthGetter(index); + }, + estimatedCellSize: _this._getEstimatedColumnSize(props) + }), _this._rowSizeAndPositionManager = new _ScalingCellSizeAndPositionManager2.default({ + cellCount: props.rowCount, + cellSizeGetter: function(index) { + return _this._rowHeightGetter(index); + }, + estimatedCellSize: _this._getEstimatedRowSize(props) + }), _this._cellCache = {}, _this; + } + return (0, _inherits3.default)(Grid, _Component), (0, _createClass3.default)(Grid, [ { + 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 _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._columnSizeAndPositionManager.resetCell(columnIndex), this._rowSizeAndPositionManager.resetCell(rowIndex), + this._cellCache = {}, this.forceUpdate(); + } + }, { + key: "componentDidMount", + value: function() { + var _props2 = this.props, scrollLeft = _props2.scrollLeft, scrollToColumn = _props2.scrollToColumn, scrollTop = _props2.scrollTop, scrollToRow = _props2.scrollToRow; + this._scrollbarSizeMeasured || (this._scrollbarSize = (0, _scrollbarSize2.default)(), + 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, _props3 = this.props, autoHeight = _props3.autoHeight, columnCount = _props3.columnCount, height = _props3.height, rowCount = _props3.rowCount, scrollToAlignment = _props3.scrollToAlignment, scrollToColumn = _props3.scrollToColumn, scrollToRow = _props3.scrollToRow, width = _props3.width, _state = this.state, scrollLeft = _state.scrollLeft, scrollPositionChangeReason = _state.scrollPositionChangeReason, scrollTop = _state.scrollTop, columnOrRowCountJustIncreasedFromZero = columnCount > 0 && 0 === prevProps.columnCount || rowCount > 0 && 0 === prevProps.rowCount; + if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED && (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)), + (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((0, _extends3.default)({}, _this2.props, { + scrollToColumn: scrollToColumn + })); + } + }), (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((0, _extends3.default)({}, _this2.props, { + scrollToRow: scrollToRow + })); + } + }), 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() { + this._scrollbarSize = (0, _scrollbarSize2.default)(), 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: "componentWillUpdate", + value: function(nextProps, nextState) { + var _this3 = this; + 0 === nextProps.columnCount && 0 !== nextState.scrollLeft || 0 === nextProps.rowCount && 0 !== nextState.scrollTop ? this._setScrollPosition({ + scrollLeft: 0, + scrollTop: 0 + }) : nextProps.scrollLeft === this.props.scrollLeft && nextProps.scrollTop === this.props.scrollTop || this._setScrollPosition({ + scrollLeft: nextProps.scrollLeft, + scrollTop: nextProps.scrollTop + }), 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) + }), (0, _calculateSizeAndPositionDataAndUpdateScrollOffset2.default)({ + cellCount: this.props.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, nextState); + } + }), (0, _calculateSizeAndPositionDataAndUpdateScrollOffset2.default)({ + cellCount: this.props.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, nextState); + } + }), this._calculateChildrenToRender(nextProps, nextState); + } + }, { + key: "render", + value: function() { + var _this4 = this, _props4 = this.props, autoContainerWidth = _props4.autoContainerWidth, autoHeight = _props4.autoHeight, className = _props4.className, containerStyle = _props4.containerStyle, height = _props4.height, id = _props4.id, noContentRenderer = _props4.noContentRenderer, style = _props4.style, tabIndex = _props4.tabIndex, width = _props4.width, isScrolling = this.state.isScrolling, gridStyle = { + boxSizing: "border-box", + height: autoHeight ? "auto" : height, + position: "relative", + width: 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: function(_ref2) { + _this4._scrollingContainer = _ref2; + }, + "aria-label": this.props["aria-label"], + className: (0, _classnames2.default)("ReactVirtualized__Grid", className), + id: id, + onScroll: this._onScroll, + role: "grid", + 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" : "" + }, containerStyle) + }, childrenToDisplay), showNoContentRenderer && noContentRenderer()); + } + }, { + key: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); + } + }, { + 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, height = props.height, overscanColumnCount = props.overscanColumnCount, overscanRowCount = props.overscanRowCount, rowCount = props.rowCount, width = props.width, isScrolling = state.isScrolling, scrollDirectionHorizontal = state.scrollDirectionHorizontal, scrollDirectionVertical = state.scrollDirectionVertical, scrollLeft = state.scrollLeft, scrollTop = state.scrollTop; + 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 = (0, _getOverscanIndices2.default)({ + cellCount: columnCount, + overscanCellsCount: overscanColumnCount, + scrollDirection: scrollDirectionHorizontal, + startIndex: this._renderedColumnStartIndex, + stopIndex: this._renderedColumnStopIndex + }), overscanRowIndices = (0, _getOverscanIndices2.default)({ + 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, + horizontalOffsetAdjustment: horizontalOffsetAdjustment, + isScrolling: isScrolling, + rowSizeAndPositionManager: this._rowSizeAndPositionManager, + rowStartIndex: this._rowStartIndex, + rowStopIndex: this._rowStopIndex, + scrollLeft: scrollLeft, + scrollTop: scrollTop, + verticalOffsetAdjustment: verticalOffsetAdjustment, + visibleColumnIndices: visibleColumnIndices, + visibleRowIndices: visibleRowIndices + }); + } + } + }, { + key: "_enablePointerEventsAfterDelay", + value: function() { + var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval; + this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId), + this._disablePointerEventsTimeoutId = setTimeout(this._enablePointerEventsAfterDelayCallback, scrollingResetTimeInterval); + } + }, { + key: "_enablePointerEventsAfterDelayCallback", + value: function() { + this._disablePointerEventsTimeoutId = null, this._cellCache = {}, this.setState({ + isScrolling: !1, + scrollDirectionHorizontal: _getOverscanIndices.SCROLL_DIRECTION_FIXED, + scrollDirectionVertical: _getOverscanIndices.SCROLL_DIRECTION_FIXED + }); + } + }, { + 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: "_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(_ref3) { + var _this5 = this, scrollLeft = _ref3.scrollLeft, scrollTop = _ref3.scrollTop, totalColumnsWidth = _ref3.totalColumnsWidth, totalRowsHeight = _ref3.totalRowsHeight; + this._onScrollMemoizer({ + callback: function(_ref4) { + var scrollLeft = _ref4.scrollLeft, scrollTop = _ref4.scrollTop, _props5 = _this5.props, height = _props5.height, onScroll = _props5.onScroll, width = _props5.width; + onScroll({ + clientHeight: height, + clientWidth: width, + scrollHeight: totalRowsHeight, + scrollLeft: scrollLeft, + scrollTop: scrollTop, + scrollWidth: totalColumnsWidth + }); + }, + indices: { + scrollLeft: scrollLeft, + scrollTop: scrollTop + } + }); + } + }, { + key: "_setScrollPosition", + value: function(_ref5) { + var scrollLeft = _ref5.scrollLeft, scrollTop = _ref5.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: "_wrapPropertyGetter", + value: function(value) { + return value instanceof Function ? value : function() { + return value; + }; + } + }, { + key: "_wrapSizeGetter", + value: function(size) { + return this._wrapPropertyGetter(size); + } + }, { + 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, columnCount = props.columnCount, 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)), calculatedScrollLeft = this._columnSizeAndPositionManager.getUpdatedOffsetForIndex({ + align: scrollToAlignment, + containerSize: width, + currentOffset: scrollLeft, + targetIndex: targetIndex + }); + scrollLeft !== calculatedScrollLeft && this._setScrollPosition({ + scrollLeft: calculatedScrollLeft + }); + } + } + }, { + 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, height = props.height, rowCount = props.rowCount, scrollToAlignment = props.scrollToAlignment, scrollToRow = props.scrollToRow, scrollTop = state.scrollTop; + if (scrollToRow >= 0 && rowCount > 0) { + var targetIndex = Math.max(0, Math.min(rowCount - 1, scrollToRow)), calculatedScrollTop = this._rowSizeAndPositionManager.getUpdatedOffsetForIndex({ + align: scrollToAlignment, + containerSize: height, + currentOffset: scrollTop, + targetIndex: targetIndex + }); + scrollTop !== calculatedScrollTop && this._setScrollPosition({ + scrollTop: calculatedScrollTop + }); + } + } + }, { + key: "_onScroll", + value: function(event) { + if (event.target === this._scrollingContainer) { + this._enablePointerEventsAfterDelay(); + var _props6 = this.props, height = _props6.height, width = _props6.width, scrollbarSize = this._scrollbarSize, totalRowsHeight = this._rowSizeAndPositionManager.getTotalSize(), totalColumnsWidth = this._columnSizeAndPositionManager.getTotalSize(), scrollLeft = Math.min(Math.max(0, totalColumnsWidth - width + scrollbarSize), event.target.scrollLeft), scrollTop = Math.min(Math.max(0, totalRowsHeight - height + scrollbarSize), event.target.scrollTop); + if (this.state.scrollLeft !== scrollLeft || this.state.scrollTop !== scrollTop) { + var scrollDirectionVertical = scrollTop > this.state.scrollTop ? _getOverscanIndices.SCROLL_DIRECTION_FORWARD : _getOverscanIndices.SCROLL_DIRECTION_BACKWARD, scrollDirectionHorizontal = scrollLeft > this.state.scrollLeft ? _getOverscanIndices.SCROLL_DIRECTION_FORWARD : _getOverscanIndices.SCROLL_DIRECTION_BACKWARD; + this.setState({ + isScrolling: !0, + scrollDirectionHorizontal: scrollDirectionHorizontal, + scrollDirectionVertical: scrollDirectionVertical, + scrollLeft: scrollLeft, + scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.OBSERVED, + scrollTop: scrollTop + }); + } + this._invokeOnScrollMemoizer({ + scrollLeft: scrollLeft, + scrollTop: scrollTop, + totalColumnsWidth: totalColumnsWidth, + totalRowsHeight: totalRowsHeight + }); + } + } + } ]), Grid; + }(_react.Component); + Grid.defaultProps = { + "aria-label": "grid", + cellRangeRenderer: _defaultCellRangeRenderer2.default, + estimatedColumnSize: 100, + estimatedRowSize: 30, + noContentRenderer: function() { + return null; + }, + onScroll: function() { + return null; + }, + onSectionRendered: function() { + return null; + }, + overscanColumnCount: 0, + overscanRowCount: 10, + scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL, + scrollToAlignment: "auto", + style: {}, + tabIndex: 0 + }, exports.default = Grid; + }, /* 122 */ + /***/ + 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; + }, /* 123 */ + /***/ + 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__(105), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _classCallCheck2 = __webpack_require__(29), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(30), _createClass3 = _interopRequireDefault(_createClass2), _CellSizeAndPositionManager = __webpack_require__(124), _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: "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; + }, /* 124 */ + /***/ + 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 cellCount = _ref.cellCount, cellSizeGetter = _ref.cellSizeGetter, estimatedCellSize = _ref.estimatedCellSize; + (0, _classCallCheck3.default)(this, CellSizeAndPositionManager), this._cellSizeGetter = cellSizeGetter, + this._cellCount = cellCount, this._estimatedCellSize = estimatedCellSize, this._cellSizeAndPositionData = {}, + this._lastMeasuredIndex = -1; + } + return (0, _createClass3.default)(CellSizeAndPositionManager, [ { + 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: "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 (null == _size || isNaN(_size)) throw Error("Invalid size returned for cell " + i + " of value " + _size); + 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(_ref3) { + var _ref3$align = _ref3.align, align = void 0 === _ref3$align ? "auto" : _ref3$align, containerSize = _ref3.containerSize, currentOffset = _ref3.currentOffset, targetIndex = _ref3.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(_ref4) { + var containerSize = _ref4.containerSize, offset = _ref4.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; + }, /* 125 */ + /***/ + function(module, exports) { + "use strict"; + function getOverscanIndices(_ref) { + var cellCount = _ref.cellCount, overscanCellsCount = _ref.overscanCellsCount, scrollDirection = _ref.scrollDirection, startIndex = _ref.startIndex, stopIndex = _ref.stopIndex, overscanStartIndex = void 0, overscanStopIndex = void 0; + return scrollDirection === SCROLL_DIRECTION_FORWARD ? (overscanStartIndex = startIndex, + overscanStopIndex = stopIndex + 2 * overscanCellsCount) : scrollDirection === SCROLL_DIRECTION_BACKWARD ? (overscanStartIndex = startIndex - 2 * overscanCellsCount, + overscanStopIndex = stopIndex) : (overscanStartIndex = startIndex - overscanCellsCount, + overscanStopIndex = stopIndex + overscanCellsCount), { + overscanStartIndex: Math.max(0, overscanStartIndex), + overscanStopIndex: Math.min(cellCount - 1, overscanStopIndex) + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.default = getOverscanIndices; + var SCROLL_DIRECTION_BACKWARD = exports.SCROLL_DIRECTION_BACKWARD = -1, SCROLL_DIRECTION_FORWARD = (exports.SCROLL_DIRECTION_FIXED = 0, + exports.SCROLL_DIRECTION_FORWARD = 1); + }, /* 126 */ + /***/ + 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; + }, /* 127 */ + /***/ + function(module, exports) { + "use strict"; + function defaultCellRangeRenderer(_ref) { + for (var cellCache = _ref.cellCache, cellRenderer = _ref.cellRenderer, columnSizeAndPositionManager = _ref.columnSizeAndPositionManager, columnStartIndex = _ref.columnStartIndex, columnStopIndex = _ref.columnStopIndex, horizontalOffsetAdjustment = _ref.horizontalOffsetAdjustment, isScrolling = _ref.isScrolling, rowSizeAndPositionManager = _ref.rowSizeAndPositionManager, rowStartIndex = _ref.rowStartIndex, rowStopIndex = _ref.rowStopIndex, verticalOffsetAdjustment = (_ref.scrollLeft, + _ref.scrollTop, _ref.verticalOffsetAdjustment), visibleColumnIndices = _ref.visibleColumnIndices, visibleRowIndices = _ref.visibleRowIndices, renderedCells = [], 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 = { + height: rowDatum.size, + left: columnDatum.offset + horizontalOffsetAdjustment, + position: "absolute", + top: rowDatum.offset + verticalOffsetAdjustment, + width: columnDatum.size + }, cellRendererParams = { + columnIndex: columnIndex, + isScrolling: isScrolling, + isVisible: isVisible, + key: key, + 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 && renderedCells.push(renderedCell); + } + return renderedCells; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.default = defaultCellRangeRenderer; + }, /* 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.SortIndicator = exports.SortDirection = exports.Column = exports.Table = exports.defaultRowRenderer = exports.defaultHeaderRenderer = exports.defaultCellRenderer = exports.defaultCellDataGetter = exports.default = void 0; + var _Table2 = __webpack_require__(129), _Table3 = _interopRequireDefault(_Table2), _defaultCellDataGetter2 = __webpack_require__(135), _defaultCellDataGetter3 = _interopRequireDefault(_defaultCellDataGetter2), _defaultCellRenderer2 = __webpack_require__(134), _defaultCellRenderer3 = _interopRequireDefault(_defaultCellRenderer2), _defaultHeaderRenderer2 = __webpack_require__(131), _defaultHeaderRenderer3 = _interopRequireDefault(_defaultHeaderRenderer2), _defaultRowRenderer2 = __webpack_require__(136), _defaultRowRenderer3 = _interopRequireDefault(_defaultRowRenderer2), _Column2 = __webpack_require__(130), _Column3 = _interopRequireDefault(_Column2), _SortDirection2 = __webpack_require__(133), _SortDirection3 = _interopRequireDefault(_SortDirection2), _SortIndicator2 = __webpack_require__(132), _SortIndicator3 = _interopRequireDefault(_SortIndicator2); + exports.default = _Table3.default, exports.defaultCellDataGetter = _defaultCellDataGetter3.default, + exports.defaultCellRenderer = _defaultCellRenderer3.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; + }, /* 129 */ + /***/ + 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__(100), _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__(107), _classnames2 = _interopRequireDefault(_classnames), _Column = __webpack_require__(130), _react = (_interopRequireDefault(_Column), + __webpack_require__(89)), _react2 = _interopRequireDefault(_react), _reactDom = __webpack_require__(96), _reactAddonsShallowCompare = __webpack_require__(90), _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare), _Grid = __webpack_require__(120), _Grid2 = _interopRequireDefault(_Grid), _defaultRowRenderer = __webpack_require__(136), _defaultRowRenderer2 = _interopRequireDefault(_defaultRowRenderer), _SortDirection = __webpack_require__(133), _SortDirection2 = _interopRequireDefault(_SortDirection), Table = function(_Component) { + 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; + } + return (0, _inherits3.default)(Table, _Component), (0, _createClass3.default)(Table, [ { + 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 + }), this.forceUpdateGrid(); + } + }, { + 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, 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 = height - headerHeight, rowClass = rowClassName instanceof Function ? rowClassName({ + index: -1 + }) : rowClassName, rowStyleObject = rowStyle instanceof Function ? 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, + style: style + }, !disableHeader && _react2.default.createElement("div", { + className: (0, _classnames2.default)("ReactVirtualized__Table__headerRow", rowClass), + style: (0, _extends3.default)({}, rowStyleObject, { + height: headerHeight, + overflow: "hidden", + paddingRight: scrollbarWidth, + width: width + }) + }, this._getRenderedHeaderRow()), _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: function(_ref) { + _this2.Grid = _ref; + }, + scrollbarWidth: scrollbarWidth, + scrollToRow: scrollToIndex, + style: (0, _extends3.default)({}, gridStyle, { + overflowX: "hidden" + }) + }))); + } + }, { + key: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); + } + }, { + key: "_createColumn", + value: function(_ref2) { + var column = _ref2.column, columnIndex = _ref2.columnIndex, isScrolling = _ref2.isScrolling, 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, + dataKey: dataKey, + isScrolling: isScrolling, + 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() { + sortEnabled && sort({ + sortBy: dataKey, + sortDirection: newSortDirection + }), onHeaderClick && onHeaderClick({ + columnData: columnData, + dataKey: dataKey + }); + }, onKeyDown = function(event) { + "Enter" !== event.key && " " !== event.key || onClick(); + }; + 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, 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 = rowClassName instanceof Function ? rowClassName({ + index: index + }) : rowClassName, rowStyleObject = rowStyle instanceof Function ? 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, + 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: "_getRenderedHeaderRow", + 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 rowHeight instanceof Function ? 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: "_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.Component); + Table.defaultProps = { + disableHeader: !1, + estimatedRowSize: 30, + headerHeight: 0, + headerStyle: {}, + noRowsRenderer: function() { + return null; + }, + onRowsRendered: function() { + return null; + }, + onScroll: function() { + return null; + }, + overscanRowCount: 10, + rowRenderer: _defaultRowRenderer2.default, + rowStyle: {}, + scrollToAlignment: "auto", + style: {} + }, exports.default = Table; + }, /* 130 */ + /***/ + 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), _react = __webpack_require__(89), _defaultHeaderRenderer = __webpack_require__(131), _defaultHeaderRenderer2 = _interopRequireDefault(_defaultHeaderRenderer), _defaultCellRenderer = __webpack_require__(134), _defaultCellRenderer2 = _interopRequireDefault(_defaultCellRenderer), _defaultCellDataGetter = __webpack_require__(135), _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; + }, /* 131 */ + /***/ + 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__(89), _react2 = _interopRequireDefault(_react), _SortIndicator = __webpack_require__(132), _SortIndicator2 = _interopRequireDefault(_SortIndicator); + }, /* 132 */ + /***/ + 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 _react = __webpack_require__(89), _react2 = _interopRequireDefault(_react), _classnames = __webpack_require__(107), _classnames2 = _interopRequireDefault(_classnames), _SortDirection = __webpack_require__(133), _SortDirection2 = _interopRequireDefault(_SortDirection); + }, /* 133 */ + /***/ + function(module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var SortDirection = { + ASC: "ASC", + DESC: "DESC" + }; + exports.default = SortDirection; + }, /* 134 */ + /***/ + function(module, exports) { + "use strict"; + function defaultCellRenderer(_ref) { + var cellData = _ref.cellData; + _ref.cellDataKey, _ref.columnData, _ref.rowData, _ref.rowIndex; + return null == cellData ? "" : String(cellData); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.default = defaultCellRenderer; + }, /* 135 */ + /***/ + function(module, exports) { + "use strict"; + function defaultCellDataGetter(_ref) { + var dataKey = (_ref.columnData, _ref.dataKey), rowData = _ref.rowData; + return rowData.get instanceof Function ? rowData.get(dataKey) : rowData[dataKey]; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.default = defaultCellDataGetter; + }, /* 136 */ + /***/ + 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, style = (_ref.rowData, + _ref.style), a11yProps = {}; + return (onRowClick || onRowDoubleClick || onRowMouseOver || onRowMouseOut) && (a11yProps["aria-label"] = "row", + a11yProps.role = "row", a11yProps.tabIndex = 0, onRowClick && (a11yProps.onClick = function() { + return onRowClick({ + index: index + }); + }), onRowDoubleClick && (a11yProps.onDoubleClick = function() { + return onRowDoubleClick({ + index: index + }); + }), onRowMouseOut && (a11yProps.onMouseOut = function() { + return onRowMouseOut({ + index: index + }); + }), onRowMouseOver && (a11yProps.onMouseOver = function() { + return onRowMouseOver({ + index: index + }); + })), _react2.default.createElement("div", (0, _extends3.default)({}, a11yProps, { + className: className, + key: key, + style: style + }), columns); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var _extends2 = __webpack_require__(100), _extends3 = _interopRequireDefault(_extends2); + exports.default = defaultRowRenderer; + var _react = __webpack_require__(89), _react2 = _interopRequireDefault(_react); + }, /* 137 */ + /***/ + 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__(138), _InfiniteLoader3 = _interopRequireDefault(_InfiniteLoader2); + exports.default = _InfiniteLoader3.default, exports.InfiniteLoader = _InfiniteLoader3.default; + }, /* 138 */ + /***/ + 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) { + "function" == typeof component.forceUpdateGrid ? component.forceUpdateGrid() : 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__(89), _reactAddonsShallowCompare = __webpack_require__(90), _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare), _createCallbackMemoizer = __webpack_require__(108), _createCallbackMemoizer2 = _interopRequireDefault(_createCallbackMemoizer), InfiniteLoader = function(_Component) { + 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, _Component), (0, _createClass3.default)(InfiniteLoader, [ { + key: "render", + value: function() { + var children = this.props.children; + return children({ + onRowsRendered: this._onRowsRendered, + registerChild: this._registerChild + }); + } + }, { + key: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); + } + }, { + 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); + }); + }); + } + }, { + 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.Component); + InfiniteLoader.defaultProps = { + minimumBatchSize: 10, + rowCount: 0, + threshold: 15 + }, exports.default = InfiniteLoader; + }, /* 139 */ + /***/ + 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__(140), _ScrollSync3 = _interopRequireDefault(_ScrollSync2); + exports.default = _ScrollSync3.default, exports.ScrollSync = _ScrollSync3.default; + }, /* 140 */ + /***/ + 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), _react = __webpack_require__(89), _reactAddonsShallowCompare = __webpack_require__(90), _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare), ScrollSync = function(_Component) { + 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, _Component), (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: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); + } + }, { + 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.Component); + exports.default = ScrollSync; + }, /* 141 */ + /***/ + 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__(142), _List3 = _interopRequireDefault(_List2); + exports.default = _List3.default, exports.List = _List3.default; + }, /* 142 */ + /***/ + function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var _objectWithoutProperties2 = __webpack_require__(105), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _extends2 = __webpack_require__(100), _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__(120), _Grid2 = _interopRequireDefault(_Grid), _react = __webpack_require__(89), _react2 = _interopRequireDefault(_react), _classnames = __webpack_require__(107), _classnames2 = _interopRequireDefault(_classnames), _reactAddonsShallowCompare = __webpack_require__(90), _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare), List = function(_Component) { + 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; + } + return (0, _inherits3.default)(List, _Component), (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 + }), this.forceUpdateGrid(); + } + }, { + key: "render", + value: function() { + var _this2 = this, _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: function(_ref) { + _this2.Grid = _ref; + }, + scrollToRow: scrollToIndex + })); + } + }, { + key: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); + } + }, { + key: "_cellRenderer", + value: function(_ref2) { + var rowIndex = _ref2.rowIndex, style = _ref2.style, rest = (0, _objectWithoutProperties3.default)(_ref2, [ "rowIndex", "style" ]), rowRenderer = this.props.rowRenderer; + return style.width = "100%", rowRenderer((0, _extends3.default)({ + index: rowIndex, + style: style + }, rest)); + } + }, { + 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.Component); + List.defaultProps = { + estimatedRowSize: 30, + noRowsRenderer: function() { + return null; + }, + onRowsRendered: function() { + return null; + }, + onScroll: function() { + return null; + }, + overscanRowCount: 10, + scrollToAlignment: "auto", + style: {} + }, exports.default = List; + }, /* 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.IS_SCROLLING_TIMEOUT = exports.WindowScroller = exports.default = void 0; + var _onScroll = __webpack_require__(144); + Object.defineProperty(exports, "IS_SCROLLING_TIMEOUT", { + enumerable: !0, + get: function() { + return _onScroll.IS_SCROLLING_TIMEOUT; + } + }); + var _WindowScroller2 = __webpack_require__(145), _WindowScroller3 = _interopRequireDefault(_WindowScroller2); + exports.default = _WindowScroller3.default, exports.WindowScroller = _WindowScroller3.default; + }, /* 144 */ + /***/ + function(module, exports) { + "use strict"; + function enablePointerEventsIfDisabled() { + disablePointerEventsTimeoutId && (disablePointerEventsTimeoutId = null, document.firstElementChild.style.pointerEvents = originalBodyPointerEvents, + originalBodyPointerEvents = null); + } + function enablePointerEventsAfterDelayCallback() { + enablePointerEventsIfDisabled(), mountedInstances.forEach(function(component) { + return component._enablePointerEventsAfterDelayCallback(); + }); + } + function enablePointerEventsAfterDelay() { + disablePointerEventsTimeoutId && clearTimeout(disablePointerEventsTimeoutId), disablePointerEventsTimeoutId = setTimeout(enablePointerEventsAfterDelayCallback, IS_SCROLLING_TIMEOUT); + } + function onScrollWindow(event) { + null == originalBodyPointerEvents && (originalBodyPointerEvents = document.firstElementChild.style.pointerEvents, + document.firstElementChild.style.pointerEvents = "none", enablePointerEventsAfterDelay()), mountedInstances.forEach(function(component) { + return component._onScrollWindow(event); + }); + } + function registerScrollListener(component) { + mountedInstances.length || window.addEventListener("scroll", onScrollWindow), mountedInstances.push(component); + } + function unregisterScrollListener(component) { + mountedInstances = mountedInstances.filter(function(c) { + return c !== component; + }), mountedInstances.length || (window.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; + }, /* 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 _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__(89), _react2 = _interopRequireDefault(_react), _reactDom = __webpack_require__(96), _reactDom2 = _interopRequireDefault(_reactDom), _reactAddonsShallowCompare = __webpack_require__(90), _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare), _onScroll = __webpack_require__(144), WindowScroller = function(_Component) { + function WindowScroller(props) { + (0, _classCallCheck3.default)(this, WindowScroller); + var _this = (0, _possibleConstructorReturn3.default)(this, (WindowScroller.__proto__ || (0, + _getPrototypeOf2.default)(WindowScroller)).call(this, props)), height = "undefined" != typeof window ? window.innerHeight : 0; + return _this.state = { + isScrolling: !1, + height: height, + scrollTop: 0 + }, _this._onScrollWindow = _this._onScrollWindow.bind(_this), _this._onResizeWindow = _this._onResizeWindow.bind(_this), + _this._enablePointerEventsAfterDelayCallback = _this._enablePointerEventsAfterDelayCallback.bind(_this), + _this; + } + return (0, _inherits3.default)(WindowScroller, _Component), (0, _createClass3.default)(WindowScroller, [ { + key: "componentDidMount", + value: function() { + var height = this.state.height; + this._positionFromTop = _reactDom2.default.findDOMNode(this).getBoundingClientRect().top - document.documentElement.getBoundingClientRect().top, + height !== window.innerHeight && this.setState({ + height: window.innerHeight + }), (0, _onScroll.registerScrollListener)(this), window.addEventListener("resize", this._onResizeWindow, !1); + } + }, { + key: "componentWillUnmount", + value: function() { + (0, _onScroll.unregisterScrollListener)(this), window.removeEventListener("resize", this._onResizeWindow, !1); + } + }, { + key: "render", + value: function() { + var children = this.props.children, _state = this.state, isScrolling = _state.isScrolling, scrollTop = _state.scrollTop, height = _state.height; + return _react2.default.createElement("div", null, children({ + height: height, + isScrolling: isScrolling, + scrollTop: scrollTop + })); + } + }, { + key: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); + } + }, { + key: "_enablePointerEventsAfterDelayCallback", + value: function() { + this.setState({ + isScrolling: !1 + }); + } + }, { + key: "_onResizeWindow", + value: function(event) { + var onResize = this.props.onResize, height = window.innerHeight || 0; + this.setState({ + height: height + }), onResize({ + height: height + }); + } + }, { + key: "_onScrollWindow", + value: function(event) { + var onScroll = this.props.onScroll, scrollY = "scrollY" in window ? window.scrollY : document.documentElement.scrollTop, scrollTop = Math.max(0, scrollY - this._positionFromTop); + this.setState({ + isScrolling: !0, + scrollTop: scrollTop + }), onScroll({ + scrollTop: scrollTop + }); + } + } ]), WindowScroller; + }(_react.Component); + WindowScroller.defaultProps = { + onResize: function() {}, + onScroll: function() {} + }, exports.default = WindowScroller; + } ]); +}); +//# sourceMappingURL=react-virtualized.js.map
\ No newline at end of file |