diff --git a/examples/dist/app.js b/examples/dist/app.js index 673e9674e9..dbb7f1cdf5 100644 --- a/examples/dist/app.js +++ b/examples/dist/app.js @@ -1,9995 +1,31 @@ -require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o -1 - } - } - - function normalizeName(name) { - if (typeof name !== 'string') { - name = String(name) - } - if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) { - throw new TypeError('Invalid character in header field name') - } - return name.toLowerCase() - } - - function normalizeValue(value) { - if (typeof value !== 'string') { - value = String(value) - } - return value - } - - // Build a destructive iterator for the value list - function iteratorFor(items) { - var iterator = { - next: function() { - var value = items.shift() - return {done: value === undefined, value: value} - } - } - - if (support.iterable) { - iterator[Symbol.iterator] = function() { - return iterator - } - } - - return iterator - } - - function Headers(headers) { - this.map = {} - - if (headers instanceof Headers) { - headers.forEach(function(value, name) { - this.append(name, value) - }, this) - } else if (Array.isArray(headers)) { - headers.forEach(function(header) { - this.append(header[0], header[1]) - }, this) - } else if (headers) { - Object.getOwnPropertyNames(headers).forEach(function(name) { - this.append(name, headers[name]) - }, this) - } - } - - Headers.prototype.append = function(name, value) { - name = normalizeName(name) - value = normalizeValue(value) - var oldValue = this.map[name] - this.map[name] = oldValue ? oldValue+','+value : value - } - - Headers.prototype['delete'] = function(name) { - delete this.map[normalizeName(name)] - } - - Headers.prototype.get = function(name) { - name = normalizeName(name) - return this.has(name) ? this.map[name] : null - } - - Headers.prototype.has = function(name) { - return this.map.hasOwnProperty(normalizeName(name)) - } - - Headers.prototype.set = function(name, value) { - this.map[normalizeName(name)] = normalizeValue(value) - } - - Headers.prototype.forEach = function(callback, thisArg) { - for (var name in this.map) { - if (this.map.hasOwnProperty(name)) { - callback.call(thisArg, this.map[name], name, this) - } - } - } - - Headers.prototype.keys = function() { - var items = [] - this.forEach(function(value, name) { items.push(name) }) - return iteratorFor(items) - } - - Headers.prototype.values = function() { - var items = [] - this.forEach(function(value) { items.push(value) }) - return iteratorFor(items) - } - - Headers.prototype.entries = function() { - var items = [] - this.forEach(function(value, name) { items.push([name, value]) }) - return iteratorFor(items) - } - - if (support.iterable) { - Headers.prototype[Symbol.iterator] = Headers.prototype.entries - } - - function consumed(body) { - if (body.bodyUsed) { - return Promise.reject(new TypeError('Already read')) - } - body.bodyUsed = true - } - - function fileReaderReady(reader) { - return new Promise(function(resolve, reject) { - reader.onload = function() { - resolve(reader.result) - } - reader.onerror = function() { - reject(reader.error) - } - }) - } - - function readBlobAsArrayBuffer(blob) { - var reader = new FileReader() - var promise = fileReaderReady(reader) - reader.readAsArrayBuffer(blob) - return promise - } - - function readBlobAsText(blob) { - var reader = new FileReader() - var promise = fileReaderReady(reader) - reader.readAsText(blob) - return promise - } - - function readArrayBufferAsText(buf) { - var view = new Uint8Array(buf) - var chars = new Array(view.length) - - for (var i = 0; i < view.length; i++) { - chars[i] = String.fromCharCode(view[i]) - } - return chars.join('') - } - - function bufferClone(buf) { - if (buf.slice) { - return buf.slice(0) - } else { - var view = new Uint8Array(buf.byteLength) - view.set(new Uint8Array(buf)) - return view.buffer - } - } - - function Body() { - this.bodyUsed = false - - this._initBody = function(body) { - this._bodyInit = body - if (!body) { - this._bodyText = '' - } else if (typeof body === 'string') { - this._bodyText = body - } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { - this._bodyBlob = body - } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { - this._bodyFormData = body - } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { - this._bodyText = body.toString() - } else if (support.arrayBuffer && support.blob && isDataView(body)) { - this._bodyArrayBuffer = bufferClone(body.buffer) - // IE 10-11 can't handle a DataView body. - this._bodyInit = new Blob([this._bodyArrayBuffer]) - } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { - this._bodyArrayBuffer = bufferClone(body) - } else { - throw new Error('unsupported BodyInit type') - } - - if (!this.headers.get('content-type')) { - if (typeof body === 'string') { - this.headers.set('content-type', 'text/plain;charset=UTF-8') - } else if (this._bodyBlob && this._bodyBlob.type) { - this.headers.set('content-type', this._bodyBlob.type) - } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { - this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8') - } - } - } - - if (support.blob) { - this.blob = function() { - var rejected = consumed(this) - if (rejected) { - return rejected - } - - if (this._bodyBlob) { - return Promise.resolve(this._bodyBlob) - } else if (this._bodyArrayBuffer) { - return Promise.resolve(new Blob([this._bodyArrayBuffer])) - } else if (this._bodyFormData) { - throw new Error('could not read FormData body as blob') - } else { - return Promise.resolve(new Blob([this._bodyText])) - } - } - - this.arrayBuffer = function() { - if (this._bodyArrayBuffer) { - return consumed(this) || Promise.resolve(this._bodyArrayBuffer) - } else { - return this.blob().then(readBlobAsArrayBuffer) - } - } - } - - this.text = function() { - var rejected = consumed(this) - if (rejected) { - return rejected - } - - if (this._bodyBlob) { - return readBlobAsText(this._bodyBlob) - } else if (this._bodyArrayBuffer) { - return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) - } else if (this._bodyFormData) { - throw new Error('could not read FormData body as text') - } else { - return Promise.resolve(this._bodyText) - } - } - - if (support.formData) { - this.formData = function() { - return this.text().then(decode) - } - } - - this.json = function() { - return this.text().then(JSON.parse) - } - - return this - } - - // HTTP methods whose capitalization should be normalized - var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'] - - function normalizeMethod(method) { - var upcased = method.toUpperCase() - return (methods.indexOf(upcased) > -1) ? upcased : method - } - - function Request(input, options) { - options = options || {} - var body = options.body - - if (input instanceof Request) { - if (input.bodyUsed) { - throw new TypeError('Already read') - } - this.url = input.url - this.credentials = input.credentials - if (!options.headers) { - this.headers = new Headers(input.headers) - } - this.method = input.method - this.mode = input.mode - if (!body && input._bodyInit != null) { - body = input._bodyInit - input.bodyUsed = true - } - } else { - this.url = String(input) - } - - this.credentials = options.credentials || this.credentials || 'omit' - if (options.headers || !this.headers) { - this.headers = new Headers(options.headers) - } - this.method = normalizeMethod(options.method || this.method || 'GET') - this.mode = options.mode || this.mode || null - this.referrer = null - - if ((this.method === 'GET' || this.method === 'HEAD') && body) { - throw new TypeError('Body not allowed for GET or HEAD requests') - } - this._initBody(body) - } - - Request.prototype.clone = function() { - return new Request(this, { body: this._bodyInit }) - } - - function decode(body) { - var form = new FormData() - body.trim().split('&').forEach(function(bytes) { - if (bytes) { - var split = bytes.split('=') - var name = split.shift().replace(/\+/g, ' ') - var value = split.join('=').replace(/\+/g, ' ') - form.append(decodeURIComponent(name), decodeURIComponent(value)) - } - }) - return form - } - - function parseHeaders(rawHeaders) { - var headers = new Headers() - rawHeaders.split(/\r?\n/).forEach(function(line) { - var parts = line.split(':') - var key = parts.shift().trim() - if (key) { - var value = parts.join(':').trim() - headers.append(key, value) - } - }) - return headers - } - - Body.call(Request.prototype) - - function Response(bodyInit, options) { - if (!options) { - options = {} - } - - this.type = 'default' - this.status = 'status' in options ? options.status : 200 - this.ok = this.status >= 200 && this.status < 300 - this.statusText = 'statusText' in options ? options.statusText : 'OK' - this.headers = new Headers(options.headers) - this.url = options.url || '' - this._initBody(bodyInit) - } - - Body.call(Response.prototype) - - Response.prototype.clone = function() { - return new Response(this._bodyInit, { - status: this.status, - statusText: this.statusText, - headers: new Headers(this.headers), - url: this.url - }) - } - - Response.error = function() { - var response = new Response(null, {status: 0, statusText: ''}) - response.type = 'error' - return response - } - - var redirectStatuses = [301, 302, 303, 307, 308] - - Response.redirect = function(url, status) { - if (redirectStatuses.indexOf(status) === -1) { - throw new RangeError('Invalid status code') - } - - return new Response(null, {status: status, headers: {location: url}}) - } - - self.Headers = Headers - self.Request = Request - self.Response = Response - - self.fetch = function(input, init) { - return new Promise(function(resolve, reject) { - var request = new Request(input, init) - var xhr = new XMLHttpRequest() - - xhr.onload = function() { - var options = { - status: xhr.status, - statusText: xhr.statusText, - headers: parseHeaders(xhr.getAllResponseHeaders() || '') - } - options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL') - var body = 'response' in xhr ? xhr.response : xhr.responseText - resolve(new Response(body, options)) - } - - xhr.onerror = function() { - reject(new TypeError('Network request failed')) - } - - xhr.ontimeout = function() { - reject(new TypeError('Network request failed')) - } - - xhr.open(request.method, request.url, true) - - if (request.credentials === 'include') { - xhr.withCredentials = true - } - - if ('responseType' in xhr && support.blob) { - xhr.responseType = 'blob' - } - - request.headers.forEach(function(value, name) { - xhr.setRequestHeader(name, value) - }) - - xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit) - }) - } - self.fetch.polyfill = true -})(typeof self !== 'undefined' ? self : this); - -},{}],18:[function(require,module,exports){ -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule shallowCompare - */ - -'use strict'; - -var shallowEqual = require('fbjs/lib/shallowEqual'); - -/** - * Does a shallow comparison for props and state. - * See ReactComponentWithPureRenderMixin - * See also https://facebook.github.io/react/docs/shallow-compare.html - */ -function shallowCompare(instance, nextProps, nextState) { - return ( - !shallowEqual(instance.props, nextProps) || - !shallowEqual(instance.state, nextState) - ); -} - -module.exports = shallowCompare; - -},{"fbjs/lib/shallowEqual":19}],19:[function(require,module,exports){ -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks - * - */ - -/*eslint-disable no-self-compare */ - -'use strict'; - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - */ -function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - // Added the nonzero y check to make Flow happy, but it is redundant - return x !== 0 || y !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } -} - -/** - * Performs equality by iterating through keys on an object and returning false - * when any key has values which are not strictly equal between the arguments. - * Returns true when the values of all keys are strictly equal. - */ -function shallowEqual(objA, objB) { - if (is(objA, objB)) { - return true; - } - - if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { - return false; - } - - var keysA = Object.keys(objA); - var keysB = Object.keys(objB); - - if (keysA.length !== keysB.length) { - return false; - } - - // Test for A's keys different from B. - for (var i = 0; i < keysA.length; i++) { - if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { - return false; - } - } - - return true; -} - -module.exports = shallowEqual; -},{}],20:[function(require,module,exports){ -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - -},{}],21:[function(require,module,exports){ -'use strict'; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _md = require('md5'); - -var _md2 = _interopRequireDefault(_md); - -var _queryString = require('query-string'); - -var _queryString2 = _interopRequireDefault(_queryString); - -var _isRetina = require('is-retina'); - -var _isRetina2 = _interopRequireDefault(_isRetina); - -var _propTypes = require('prop-types'); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var Gravatar = function (_React$Component) { - _inherits(Gravatar, _React$Component); - - function Gravatar() { - _classCallCheck(this, Gravatar); - - return _possibleConstructorReturn(this, (Gravatar.__proto__ || Object.getPrototypeOf(Gravatar)).apply(this, arguments)); - } - - _createClass(Gravatar, [{ - key: 'render', - value: function render() { - var base = this.props.protocol + 'www.gravatar.com/avatar/'; - - var query = _queryString2.default.stringify({ - s: this.props.size, - r: this.props.rating, - d: this.props.default - }); - - var retinaQuery = _queryString2.default.stringify({ - s: this.props.size * 2, - r: this.props.rating, - d: this.props.default - }); - - // Gravatar service currently trims and lowercases all registered emails - var formattedEmail = ('' + this.props.email).trim().toLowerCase(); - - var hash = void 0; - if (this.props.md5) { - hash = this.props.md5; - } else if (typeof this.props.email === 'string') { - hash = (0, _md2.default)(formattedEmail, { encoding: "binary" }); - } else { - console.warn('Gravatar image can not be fetched. Either the "email" or "md5" prop must be specified.'); - return _react2.default.createElement('script', null); - } - - var src = '' + base + hash + '?' + query; - var retinaSrc = '' + base + hash + '?' + retinaQuery; - - var modernBrowser = true; // server-side, we render for modern browsers - - if (typeof window !== 'undefined') { - // this is not NodeJS - modernBrowser = 'srcset' in document.createElement('img'); - } - - var className = 'react-gravatar'; - if (this.props.className) { - className = className + ' ' + this.props.className; - } - - // Clone this.props and then delete Component specific props so we can - // spread the rest into the img. - - var rest = _objectWithoutProperties(this.props, []); - - delete rest.md5; - delete rest.email; - delete rest.protocol; - delete rest.rating; - delete rest.size; - delete rest.style; - delete rest.className; - delete rest.default; - if (!modernBrowser && (0, _isRetina2.default)()) { - return _react2.default.createElement('img', _extends({ - alt: 'Gravatar for ' + formattedEmail, - style: this.props.style, - src: retinaSrc, - height: this.props.size, - width: this.props.size - }, rest, { - className: className - })); - } - return _react2.default.createElement('img', _extends({ - alt: 'Gravatar for ' + formattedEmail, - style: this.props.style, - src: src, - srcSet: retinaSrc + ' 2x', - height: this.props.size, - width: this.props.size - }, rest, { - className: className - })); - } - }]); - - return Gravatar; -}(_react2.default.Component); - -Gravatar.displayName = 'Gravatar'; -Gravatar.propTypes = { - email: _propTypes2.default.string, - md5: _propTypes2.default.string, - size: _propTypes2.default.number, - rating: _propTypes2.default.string, - default: _propTypes2.default.string, - className: _propTypes2.default.string, - protocol: _propTypes2.default.string, - style: _propTypes2.default.object -}; -Gravatar.defaultProps = { - size: 50, - rating: 'g', - default: 'retro', - protocol: '//' -}; - - -module.exports = Gravatar; -},{"is-retina":22,"md5":23,"prop-types":undefined,"query-string":27,"react":undefined}],22:[function(require,module,exports){ -module.exports = function() { - var mediaQuery; - if (typeof window !== "undefined" && window !== null) { - mediaQuery = "(-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5/4), (min-resolution: 1.25dppx)"; - if (window.devicePixelRatio > 1.25) { - return true; - } - if (window.matchMedia && window.matchMedia(mediaQuery).matches) { - return true; - } - } - return false; -}; - -},{}],23:[function(require,module,exports){ -(function(){ - var crypt = require('crypt'), - utf8 = require('charenc').utf8, - isBuffer = require('is-buffer'), - bin = require('charenc').bin, - - // The core - md5 = function (message, options) { - // Convert to byte array - if (message.constructor == String) - if (options && options.encoding === 'binary') - message = bin.stringToBytes(message); - else - message = utf8.stringToBytes(message); - else if (isBuffer(message)) - message = Array.prototype.slice.call(message, 0); - else if (!Array.isArray(message)) - message = message.toString(); - // else, assume byte array already - - var m = crypt.bytesToWords(message), - l = message.length * 8, - a = 1732584193, - b = -271733879, - c = -1732584194, - d = 271733878; - - // Swap endian - for (var i = 0; i < m.length; i++) { - m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF | - ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00; - } - - // Padding - m[l >>> 5] |= 0x80 << (l % 32); - m[(((l + 64) >>> 9) << 4) + 14] = l; - - // Method shortcuts - var FF = md5._ff, - GG = md5._gg, - HH = md5._hh, - II = md5._ii; - - for (var i = 0; i < m.length; i += 16) { - - var aa = a, - bb = b, - cc = c, - dd = d; - - a = FF(a, b, c, d, m[i+ 0], 7, -680876936); - d = FF(d, a, b, c, m[i+ 1], 12, -389564586); - c = FF(c, d, a, b, m[i+ 2], 17, 606105819); - b = FF(b, c, d, a, m[i+ 3], 22, -1044525330); - a = FF(a, b, c, d, m[i+ 4], 7, -176418897); - d = FF(d, a, b, c, m[i+ 5], 12, 1200080426); - c = FF(c, d, a, b, m[i+ 6], 17, -1473231341); - b = FF(b, c, d, a, m[i+ 7], 22, -45705983); - a = FF(a, b, c, d, m[i+ 8], 7, 1770035416); - d = FF(d, a, b, c, m[i+ 9], 12, -1958414417); - c = FF(c, d, a, b, m[i+10], 17, -42063); - b = FF(b, c, d, a, m[i+11], 22, -1990404162); - a = FF(a, b, c, d, m[i+12], 7, 1804603682); - d = FF(d, a, b, c, m[i+13], 12, -40341101); - c = FF(c, d, a, b, m[i+14], 17, -1502002290); - b = FF(b, c, d, a, m[i+15], 22, 1236535329); - - a = GG(a, b, c, d, m[i+ 1], 5, -165796510); - d = GG(d, a, b, c, m[i+ 6], 9, -1069501632); - c = GG(c, d, a, b, m[i+11], 14, 643717713); - b = GG(b, c, d, a, m[i+ 0], 20, -373897302); - a = GG(a, b, c, d, m[i+ 5], 5, -701558691); - d = GG(d, a, b, c, m[i+10], 9, 38016083); - c = GG(c, d, a, b, m[i+15], 14, -660478335); - b = GG(b, c, d, a, m[i+ 4], 20, -405537848); - a = GG(a, b, c, d, m[i+ 9], 5, 568446438); - d = GG(d, a, b, c, m[i+14], 9, -1019803690); - c = GG(c, d, a, b, m[i+ 3], 14, -187363961); - b = GG(b, c, d, a, m[i+ 8], 20, 1163531501); - a = GG(a, b, c, d, m[i+13], 5, -1444681467); - d = GG(d, a, b, c, m[i+ 2], 9, -51403784); - c = GG(c, d, a, b, m[i+ 7], 14, 1735328473); - b = GG(b, c, d, a, m[i+12], 20, -1926607734); - - a = HH(a, b, c, d, m[i+ 5], 4, -378558); - d = HH(d, a, b, c, m[i+ 8], 11, -2022574463); - c = HH(c, d, a, b, m[i+11], 16, 1839030562); - b = HH(b, c, d, a, m[i+14], 23, -35309556); - a = HH(a, b, c, d, m[i+ 1], 4, -1530992060); - d = HH(d, a, b, c, m[i+ 4], 11, 1272893353); - c = HH(c, d, a, b, m[i+ 7], 16, -155497632); - b = HH(b, c, d, a, m[i+10], 23, -1094730640); - a = HH(a, b, c, d, m[i+13], 4, 681279174); - d = HH(d, a, b, c, m[i+ 0], 11, -358537222); - c = HH(c, d, a, b, m[i+ 3], 16, -722521979); - b = HH(b, c, d, a, m[i+ 6], 23, 76029189); - a = HH(a, b, c, d, m[i+ 9], 4, -640364487); - d = HH(d, a, b, c, m[i+12], 11, -421815835); - c = HH(c, d, a, b, m[i+15], 16, 530742520); - b = HH(b, c, d, a, m[i+ 2], 23, -995338651); - - a = II(a, b, c, d, m[i+ 0], 6, -198630844); - d = II(d, a, b, c, m[i+ 7], 10, 1126891415); - c = II(c, d, a, b, m[i+14], 15, -1416354905); - b = II(b, c, d, a, m[i+ 5], 21, -57434055); - a = II(a, b, c, d, m[i+12], 6, 1700485571); - d = II(d, a, b, c, m[i+ 3], 10, -1894986606); - c = II(c, d, a, b, m[i+10], 15, -1051523); - b = II(b, c, d, a, m[i+ 1], 21, -2054922799); - a = II(a, b, c, d, m[i+ 8], 6, 1873313359); - d = II(d, a, b, c, m[i+15], 10, -30611744); - c = II(c, d, a, b, m[i+ 6], 15, -1560198380); - b = II(b, c, d, a, m[i+13], 21, 1309151649); - a = II(a, b, c, d, m[i+ 4], 6, -145523070); - d = II(d, a, b, c, m[i+11], 10, -1120210379); - c = II(c, d, a, b, m[i+ 2], 15, 718787259); - b = II(b, c, d, a, m[i+ 9], 21, -343485551); - - a = (a + aa) >>> 0; - b = (b + bb) >>> 0; - c = (c + cc) >>> 0; - d = (d + dd) >>> 0; - } - - return crypt.endian([a, b, c, d]); - }; - - // Auxiliary functions - md5._ff = function (a, b, c, d, x, s, t) { - var n = a + (b & c | ~b & d) + (x >>> 0) + t; - return ((n << s) | (n >>> (32 - s))) + b; - }; - md5._gg = function (a, b, c, d, x, s, t) { - var n = a + (b & d | c & ~d) + (x >>> 0) + t; - return ((n << s) | (n >>> (32 - s))) + b; - }; - md5._hh = function (a, b, c, d, x, s, t) { - var n = a + (b ^ c ^ d) + (x >>> 0) + t; - return ((n << s) | (n >>> (32 - s))) + b; - }; - md5._ii = function (a, b, c, d, x, s, t) { - var n = a + (c ^ (b | ~d)) + (x >>> 0) + t; - return ((n << s) | (n >>> (32 - s))) + b; - }; - - // Package private blocksize - md5._blocksize = 16; - md5._digestsize = 16; - - module.exports = function (message, options) { - if (message === undefined || message === null) - throw new Error('Illegal argument ' + message); - - var digestbytes = crypt.wordsToBytes(md5(message, options)); - return options && options.asBytes ? digestbytes : - options && options.asString ? bin.bytesToString(digestbytes) : - crypt.bytesToHex(digestbytes); - }; - -})(); - -},{"charenc":24,"crypt":25,"is-buffer":26}],24:[function(require,module,exports){ -var charenc = { - // UTF-8 encoding - utf8: { - // Convert a string to a byte array - stringToBytes: function(str) { - return charenc.bin.stringToBytes(unescape(encodeURIComponent(str))); - }, - - // Convert a byte array to a string - bytesToString: function(bytes) { - return decodeURIComponent(escape(charenc.bin.bytesToString(bytes))); - } - }, - - // Binary encoding - bin: { - // Convert a string to a byte array - stringToBytes: function(str) { - for (var bytes = [], i = 0; i < str.length; i++) - bytes.push(str.charCodeAt(i) & 0xFF); - return bytes; - }, - - // Convert a byte array to a string - bytesToString: function(bytes) { - for (var str = [], i = 0; i < bytes.length; i++) - str.push(String.fromCharCode(bytes[i])); - return str.join(''); - } - } -}; - -module.exports = charenc; - -},{}],25:[function(require,module,exports){ -(function() { - var base64map - = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', - - crypt = { - // Bit-wise rotation left - rotl: function(n, b) { - return (n << b) | (n >>> (32 - b)); - }, - - // Bit-wise rotation right - rotr: function(n, b) { - return (n << (32 - b)) | (n >>> b); - }, - - // Swap big-endian to little-endian and vice versa - endian: function(n) { - // If number given, swap endian - if (n.constructor == Number) { - return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00; - } - - // Else, assume array and swap all items - for (var i = 0; i < n.length; i++) - n[i] = crypt.endian(n[i]); - return n; - }, - - // Generate an array of any length of random bytes - randomBytes: function(n) { - for (var bytes = []; n > 0; n--) - bytes.push(Math.floor(Math.random() * 256)); - return bytes; - }, - - // Convert a byte array to big-endian 32-bit words - bytesToWords: function(bytes) { - for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8) - words[b >>> 5] |= bytes[i] << (24 - b % 32); - return words; - }, - - // Convert big-endian 32-bit words to a byte array - wordsToBytes: function(words) { - for (var bytes = [], b = 0; b < words.length * 32; b += 8) - bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF); - return bytes; - }, - - // Convert a byte array to a hex string - bytesToHex: function(bytes) { - for (var hex = [], i = 0; i < bytes.length; i++) { - hex.push((bytes[i] >>> 4).toString(16)); - hex.push((bytes[i] & 0xF).toString(16)); - } - return hex.join(''); - }, - - // Convert a hex string to a byte array - hexToBytes: function(hex) { - for (var bytes = [], c = 0; c < hex.length; c += 2) - bytes.push(parseInt(hex.substr(c, 2), 16)); - return bytes; - }, - - // Convert a byte array to a base-64 string - bytesToBase64: function(bytes) { - for (var base64 = [], i = 0; i < bytes.length; i += 3) { - var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]; - for (var j = 0; j < 4; j++) - if (i * 8 + j * 6 <= bytes.length * 8) - base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F)); - else - base64.push('='); - } - return base64.join(''); - }, - - // Convert a base-64 string to a byte array - base64ToBytes: function(base64) { - // Remove non-base-64 characters - base64 = base64.replace(/[^A-Z0-9+\/]/ig, ''); - - for (var bytes = [], i = 0, imod4 = 0; i < base64.length; - imod4 = ++i % 4) { - if (imod4 == 0) continue; - bytes.push(((base64map.indexOf(base64.charAt(i - 1)) - & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2)) - | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2))); - } - return bytes; - } - }; - - module.exports = crypt; -})(); - -},{}],26:[function(require,module,exports){ -/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh - * @license MIT - */ - -// The _isBuffer check is for Safari 5-7 support, because it's missing -// Object.prototype.constructor. Remove this eventually -module.exports = function (obj) { - return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) -} - -function isBuffer (obj) { - return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) -} - -// For Node v0.10 support. Remove this eventually. -function isSlowBuffer (obj) { - return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) -} - -},{}],27:[function(require,module,exports){ -'use strict'; -var strictUriEncode = require('strict-uri-encode'); -var objectAssign = require('object-assign'); - -function encoderForArrayFormat(opts) { - switch (opts.arrayFormat) { - case 'index': - return function (key, value, index) { - return value === null ? [ - encode(key, opts), - '[', - index, - ']' - ].join('') : [ - encode(key, opts), - '[', - encode(index, opts), - ']=', - encode(value, opts) - ].join(''); - }; - - case 'bracket': - return function (key, value) { - return value === null ? encode(key, opts) : [ - encode(key, opts), - '[]=', - encode(value, opts) - ].join(''); - }; - - default: - return function (key, value) { - return value === null ? encode(key, opts) : [ - encode(key, opts), - '=', - encode(value, opts) - ].join(''); - }; - } -} - -function parserForArrayFormat(opts) { - var result; - - switch (opts.arrayFormat) { - case 'index': - return function (key, value, accumulator) { - result = /\[(\d*)\]$/.exec(key); - - key = key.replace(/\[\d*\]$/, ''); - - if (!result) { - accumulator[key] = value; - return; - } - - if (accumulator[key] === undefined) { - accumulator[key] = {}; - } - - accumulator[key][result[1]] = value; - }; - - case 'bracket': - return function (key, value, accumulator) { - result = /(\[\])$/.exec(key); - key = key.replace(/\[\]$/, ''); - - if (!result) { - accumulator[key] = value; - return; - } else if (accumulator[key] === undefined) { - accumulator[key] = [value]; - return; - } - - accumulator[key] = [].concat(accumulator[key], value); - }; - - default: - return function (key, value, accumulator) { - if (accumulator[key] === undefined) { - accumulator[key] = value; - return; - } - - accumulator[key] = [].concat(accumulator[key], value); - }; - } -} - -function encode(value, opts) { - if (opts.encode) { - return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); - } - - return value; -} - -function keysSorter(input) { - if (Array.isArray(input)) { - return input.sort(); - } else if (typeof input === 'object') { - return keysSorter(Object.keys(input)).sort(function (a, b) { - return Number(a) - Number(b); - }).map(function (key) { - return input[key]; - }); - } - - return input; -} - -exports.extract = function (str) { - return str.split('?')[1] || ''; -}; - -exports.parse = function (str, opts) { - opts = objectAssign({arrayFormat: 'none'}, opts); - - var formatter = parserForArrayFormat(opts); - - // Create an object with no prototype - // https://github.com/sindresorhus/query-string/issues/47 - var ret = Object.create(null); - - if (typeof str !== 'string') { - return ret; - } - - str = str.trim().replace(/^(\?|#|&)/, ''); - - if (!str) { - return ret; - } - - str.split('&').forEach(function (param) { - var parts = param.replace(/\+/g, ' ').split('='); - // Firefox (pre 40) decodes `%3D` to `=` - // https://github.com/sindresorhus/query-string/pull/37 - var key = parts.shift(); - var val = parts.length > 0 ? parts.join('=') : undefined; - - // missing `=` should be `null`: - // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters - val = val === undefined ? null : decodeURIComponent(val); - - formatter(decodeURIComponent(key), val, ret); - }); - - return Object.keys(ret).sort().reduce(function (result, key) { - var val = ret[key]; - if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) { - // Sort object keys, not values - result[key] = keysSorter(val); - } else { - result[key] = val; - } - - return result; - }, Object.create(null)); -}; - -exports.stringify = function (obj, opts) { - var defaults = { - encode: true, - strict: true, - arrayFormat: 'none' - }; - - opts = objectAssign(defaults, opts); - - var formatter = encoderForArrayFormat(opts); - - return obj ? Object.keys(obj).sort().map(function (key) { - var val = obj[key]; - - if (val === undefined) { - return ''; - } - - if (val === null) { - return encode(key, opts); - } - - if (Array.isArray(val)) { - var result = []; - - val.slice().forEach(function (val2) { - if (val2 === undefined) { - return; - } - - result.push(formatter(key, val2, result.length)); - }); - - return result.join('&'); - } - - return encode(key, opts) + '=' + encode(val, opts); - }).filter(function (x) { - return x.length > 0; - }).join('&') : ''; -}; - -},{"object-assign":28,"strict-uri-encode":29}],28:[function(require,module,exports){ -/* +webpackJsonp([0],[function(e,t,n){e.exports=n(192)()},function(e,t,n){"use strict";function r(e,t,n,r,a,i,l,s){if(o(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,i,l,s],p=0;u=new Error(t.replace(/%s/g,function(){return c[p++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}var o=function(e){};e.exports=r},function(e,t,n){"use strict";e.exports=n(18)},function(e,t,n){"use strict";var r=n(9),o=r;e.exports=o},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;rs (wrapping highlighted words). - */ - - function Highlighter(_ref) { - var _ref$highlightClassName = _ref.highlightClassName; - var highlightClassName = _ref$highlightClassName === undefined ? '' : _ref$highlightClassName; - var _ref$highlightStyle = _ref.highlightStyle; - var highlightStyle = _ref$highlightStyle === undefined ? {} : _ref$highlightStyle; - var searchWords = _ref.searchWords; - var textToHighlight = _ref.textToHighlight; - var sanitize = _ref.sanitize; - - var chunks = Chunks.findAll(textToHighlight, searchWords, sanitize); - - return _react2['default'].createElement( - 'span', - null, - chunks.map(function (chunk, index) { - var text = textToHighlight.substr(chunk.start, chunk.end - chunk.start); - - if (chunk.highlight) { - return _react2['default'].createElement( - 'mark', - { - className: highlightClassName, - key: index, - style: highlightStyle - }, - text - ); - } else { - return _react2['default'].createElement( - 'span', - { key: index }, - text - ); - } - }) - ); - } - - module.exports = exports['default']; - -/***/ }, -/* 3 */ -/***/ function(module, exports) { - - module.exports = require("react"); - -/***/ }, -/* 4 */ -/***/ function(module, exports) { - - /** - * Creates an array of chunk objects representing both higlightable and non highlightable pieces of text that match each search word. - * @param searchWords string[] - * @param textToSearch string - * @return {start:number, end:number, highlight:boolean}[] - */ - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - var findAll = function findAll(textToSearch, wordsToFind, sanitize) { - return fillInChunks(combineChunks(findChunks(textToSearch, wordsToFind, sanitize)), textToSearch.length); - }; - - exports.findAll = findAll; - /** - * Takes an array of {start:number, end:number} objects and combines chunks that overlap into single chunks. - * @param chunks {start:number, end:number}[] - * @return {start:number, end:number}[] - */ - var combineChunks = function combineChunks(chunks) { - chunks = chunks.sort(function (first, second) { - return first.start - second.start; - }).reduce(function (processedChunks, nextChunk) { - // First chunk just goes straight in the array... - if (processedChunks.length === 0) { - return [nextChunk]; - } else { - // ... subsequent chunks get checked to see if they overlap... - var prevChunk = processedChunks.pop(); - if (nextChunk.start <= prevChunk.end) { - // It may be the case that prevChunk completely surrounds nextChunk, so take the - // largest of the end indeces. - var endIndex = Math.max(prevChunk.end, nextChunk.end); - processedChunks.push({ start: prevChunk.start, end: endIndex }); - } else { - processedChunks.push(prevChunk, nextChunk); - } - return processedChunks; - } - }, []); - - return chunks; - }; - - exports.combineChunks = combineChunks; - /** - * Examine textToSearch for any matches. - * If we find matches, add them to the returned array as a "chunk" object ({start:number, end:number}). - * @param textToSearch string - * @param wordsToFind string[] - * @param sanitize Process and optionally modify textToSearch and wordsToFind before comparison; this can be used to eg. remove accents - * @return {start:number, end:number}[] - */ - var findChunks = function findChunks(textToSearch, wordsToFind) { - var sanitize = arguments.length <= 2 || arguments[2] === undefined ? identity : arguments[2]; - return wordsToFind.filter(function (searchWord) { - return searchWord; - }) // Remove empty words - .reduce(function (chunks, searchWord) { - var normalizedWord = sanitize(searchWord); - var normalizedText = sanitize(textToSearch); - var regex = new RegExp(normalizedWord, 'gi'); - var match = undefined; - while ((match = regex.exec(normalizedText)) != null) { - chunks.push({ start: match.index, end: regex.lastIndex }); - } - return chunks; - }, []); - }; - - exports.findChunks = findChunks; - /** - * Given a set of chunks to highlight, create an additional set of chunks - * to represent the bits of text between the highlighted text. - * @param chunksToHighlight {start:number, end:number}[] - * @param totalLength number - * @return {start:number, end:number, highlight:boolean}[] - */ - var fillInChunks = function fillInChunks(chunksToHighlight, totalLength) { - var allChunks = []; - var append = function append(start, end, highlight) { - if (end - start > 0) { - allChunks.push({ start: start, end: end, highlight: highlight }); - } - }; - - if (chunksToHighlight.length === 0) { - append(0, totalLength, false); - } else { - (function () { - var lastIndex = 0; - chunksToHighlight.forEach(function (chunk) { - append(lastIndex, chunk.start, false); - append(chunk.start, chunk.end, true); - lastIndex = chunk.end; - }); - append(lastIndex, totalLength, false); - })(); - } - return allChunks; - }; - - exports.fillInChunks = fillInChunks; - function identity(value) { - return value; - } - -/***/ } -/******/ ]); - -},{"react":undefined}],31:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _reactSelect = require('react-select'); - -var _reactSelect2 = _interopRequireDefault(_reactSelect); - -var _reactVirtualized = require('react-virtualized'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var VirtualizedSelect = function (_Component) { - _inherits(VirtualizedSelect, _Component); - - function VirtualizedSelect(props, context) { - _classCallCheck(this, VirtualizedSelect); - - var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(VirtualizedSelect).call(this, props, context)); - - _this._renderMenu = _this._renderMenu.bind(_this); - _this._optionRenderer = _this._optionRenderer.bind(_this); - return _this; - } - - /** See VirtualScroll#recomputeRowHeights */ - - - _createClass(VirtualizedSelect, [{ - key: 'recomputeOptionHeights', - value: function recomputeOptionHeights() { - var index = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0]; - - if (this._virtualScroll) { - this._virtualScroll.recomputeRowHeights(index); - } - } - }, { - key: 'render', - value: function render() { - var SelectComponent = this._getSelectComponent(); - - return _react2.default.createElement(SelectComponent, _extends({}, this.props, { - menuRenderer: this._renderMenu, - menuStyle: { overflow: 'hidden' } - })); - } - - // See https://github.com/JedWatson/react-select/#effeciently-rendering-large-lists-with-windowing - - }, { - key: '_renderMenu', - value: function _renderMenu(_ref) { - var _this2 = this; - - var focusedOption = _ref.focusedOption; - var focusOption = _ref.focusOption; - var labelKey = _ref.labelKey; - var options = _ref.options; - var selectValue = _ref.selectValue; - var valueArray = _ref.valueArray; - var optionRenderer = this.props.optionRenderer; - - var focusedOptionIndex = options.indexOf(focusedOption); - var height = this._calculateVirtualScrollHeight({ options: options }); - var innerRowRenderer = optionRenderer || this._optionRenderer; - - function wrappedRowRenderer(_ref2) { - var index = _ref2.index; - - var option = options[index]; - - return innerRowRenderer({ - focusedOption: focusedOption, - focusedOptionIndex: focusedOptionIndex, - focusOption: focusOption, - labelKey: labelKey, - option: option, - optionIndex: index, - options: options, - selectValue: selectValue, - valueArray: valueArray - }); - } - - return _react2.default.createElement( - _reactVirtualized.AutoSizer, - { disableHeight: true }, - function (_ref3) { - var width = _ref3.width; - return _react2.default.createElement(_reactVirtualized.VirtualScroll, { - className: 'VirtualSelectGrid', - height: height, - ref: function ref(_ref5) { - return _this2._virtualScroll = _ref5; - }, - rowCount: options.length, - rowHeight: function rowHeight(_ref4) { - var index = _ref4.index; - return _this2._getOptionHeight({ - option: options[index] - }); - }, - rowRenderer: wrappedRowRenderer, - scrollToIndex: focusedOptionIndex, - width: width - }); - } - ); - } - }, { - key: '_calculateVirtualScrollHeight', - value: function _calculateVirtualScrollHeight(_ref6) { - var options = _ref6.options; - var maxHeight = this.props.maxHeight; - - - var height = 0; - - for (var optionIndex = 0; optionIndex < options.length; optionIndex++) { - var option = options[optionIndex]; - - height += this._getOptionHeight({ option: option }); - - if (height > maxHeight) { - return maxHeight; - } - } - - return height; - } - }, { - key: '_getOptionHeight', - value: function _getOptionHeight(_ref7) { - var option = _ref7.option; - var optionHeight = this.props.optionHeight; - - - return optionHeight instanceof Function ? optionHeight({ option: option }) : optionHeight; - } - }, { - key: '_getSelectComponent', - value: function _getSelectComponent() { - var _props = this.props; - var async = _props.async; - var selectComponent = _props.selectComponent; - - - if (selectComponent) { - return selectComponent; - } else if (async) { - return _reactSelect2.default.Async; - } else { - return _reactSelect2.default; - } - } - }, { - key: '_optionRenderer', - value: function _optionRenderer(_ref8) { - var focusedOption = _ref8.focusedOption; - var focusOption = _ref8.focusOption; - var labelKey = _ref8.labelKey; - var option = _ref8.option; - var selectValue = _ref8.selectValue; - - var height = this._getOptionHeight({ option: option }); - - var className = ['VirtualizedSelectOption']; - - if (option === focusedOption) { - className.push('VirtualizedSelectFocusedOption'); - } - - if (option.disabled) { - className.push('VirtualizedSelectDisabledOption'); - } - - var events = option.disabled ? {} : { - onClick: function onClick() { - return selectValue(option); - }, - onMouseOver: function onMouseOver() { - return focusOption(option); - } - }; - - return _react2.default.createElement( - 'div', - _extends({ - className: className.join(' '), - style: { height: height } - }, events), - option[labelKey] - ); - } - }]); - - return VirtualizedSelect; -}(_react.Component); - -VirtualizedSelect.propTypes = { - async: _react.PropTypes.bool, - maxHeight: _react.PropTypes.number.isRequired, - optionHeight: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.func]).isRequired, - optionRenderer: _react.PropTypes.func, - selectComponent: _react.PropTypes.func -}; -VirtualizedSelect.defaultProps = { - async: false, - maxHeight: 200, - optionHeight: 35 -}; -exports.default = VirtualizedSelect; -},{"react":undefined,"react-select":undefined,"react-virtualized":75}],32:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; - -var _VirtualizedSelect = require('./VirtualizedSelect'); - -var _VirtualizedSelect2 = _interopRequireDefault(_VirtualizedSelect); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _VirtualizedSelect2.default; -},{"./VirtualizedSelect":31}],33:[function(require,module,exports){ -arguments[4][32][0].apply(exports,arguments) -},{"./VirtualizedSelect":32,"dup":32}],34:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _reactAddonsShallowCompare = require('react-addons-shallow-compare'); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -/** - * This HOC decorates a virtualized component and responds to arrow-key events by scrolling one row or column at a time. - */ -var ArrowKeyStepper = function (_Component) { - _inherits(ArrowKeyStepper, _Component); - - function ArrowKeyStepper(props, context) { - _classCallCheck(this, ArrowKeyStepper); - - var _this = _possibleConstructorReturn(this, (ArrowKeyStepper.__proto__ || Object.getPrototypeOf(ArrowKeyStepper)).call(this, props, context)); - - _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); - return _this; - } - - _createClass(ArrowKeyStepper, [{ - key: 'render', - value: function render() { - var _props = this.props; - var className = _props.className; - var children = _props.children; - var _state = this.state; - var scrollToColumn = _state.scrollToColumn; - var 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 shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); - } - }, { - key: '_onKeyDown', - value: function _onKeyDown(event) { - var _props2 = this.props; - var columnCount = _props2.columnCount; - var rowCount = _props2.rowCount; - - // The above cases all prevent default event event behavior. - // This is to keep the grid from scrolling after the snap-to update. - - 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) - }); - break; - } - } - }, { - key: '_onSectionRendered', - value: function _onSectionRendered(_ref) { - var columnStartIndex = _ref.columnStartIndex; - var columnStopIndex = _ref.columnStopIndex; - var rowStartIndex = _ref.rowStartIndex; - var rowStopIndex = _ref.rowStopIndex; - - this._columnStartIndex = columnStartIndex; - this._columnStopIndex = columnStopIndex; - this._rowStartIndex = rowStartIndex; - this._rowStopIndex = rowStopIndex; - } - }]); - - return ArrowKeyStepper; -}(_react.Component); - -ArrowKeyStepper.propTypes = { - children: _react.PropTypes.func.isRequired, - className: _react.PropTypes.string, - columnCount: _react.PropTypes.number.isRequired, - rowCount: _react.PropTypes.number.isRequired -}; -exports.default = ArrowKeyStepper; -},{"react":undefined,"react-addons-shallow-compare":18}],35:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ArrowKeyStepper = exports.default = undefined; - -var _ArrowKeyStepper2 = require('./ArrowKeyStepper'); - -var _ArrowKeyStepper3 = _interopRequireDefault(_ArrowKeyStepper2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _ArrowKeyStepper3.default; -exports.ArrowKeyStepper = _ArrowKeyStepper3.default; -},{"./ArrowKeyStepper":34}],36:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _reactAddonsShallowCompare = require('react-addons-shallow-compare'); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -/** - * Decorator component that automatically adjusts the width and height of a single child. - * Child component should not be declared as a child but should rather be specified by a `ChildComponent` property. - * All other properties will be passed through to the child component. - */ -var AutoSizer = function (_Component) { - _inherits(AutoSizer, _Component); - - function AutoSizer(props) { - _classCallCheck(this, AutoSizer); - - var _this = _possibleConstructorReturn(this, (AutoSizer.__proto__ || Object.getPrototypeOf(AutoSizer)).call(this, props)); - - _this.state = { - height: 0, - width: 0 - }; - - _this._onResize = _this._onResize.bind(_this); - _this._onScroll = _this._onScroll.bind(_this); - _this._setRef = _this._setRef.bind(_this); - return _this; - } - - _createClass(AutoSizer, [{ - key: 'componentDidMount', - value: function componentDidMount() { - // Delay access of parentNode until mount. - // This handles edge-cases where the component has already been unmounted before its ref has been set, - // As well as libraries like react-lite which have a slightly different lifecycle. - this._parentNode = this._autoSizer.parentNode; - - // Defer requiring resize handler in order to support server-side rendering. - // See issue #41 - this._detectElementResize = require('../vendor/detectElementResize'); - this._detectElementResize.addResizeListener(this._parentNode, this._onResize); - - this._onResize(); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - if (this._detectElementResize) { - this._detectElementResize.removeResizeListener(this._parentNode, this._onResize); - } - } - }, { - key: 'render', - value: function render() { - var _props = this.props; - var children = _props.children; - var disableHeight = _props.disableHeight; - var disableWidth = _props.disableWidth; - var _state = this.state; - var height = _state.height; - var width = _state.width; - - // Outer div should not force width/height since that may prevent containers from shrinking. - // Inner component should overflow and use calculated width/height. - // See issue #68 for more information. - - var outerStyle = { overflow: 'visible' }; - - if (!disableHeight) { - outerStyle.height = 0; - } - - if (!disableWidth) { - outerStyle.width = 0; - } - - return _react2.default.createElement( - 'div', - { - ref: this._setRef, - onScroll: this._onScroll, - style: outerStyle - }, - children({ height: height, width: width }) - ); - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); - } - }, { - key: '_onResize', - value: function _onResize() { - var onResize = this.props.onResize; - - // Gaurd against AutoSizer component being removed from the DOM immediately after being added. - // This can result in invalid style values which can result in NaN values if we don't handle them. - // See issue #150 for more context. - - var boundingRect = this._parentNode.getBoundingClientRect(); - var height = boundingRect.height || 0; - var width = boundingRect.width || 0; - - var style = getComputedStyle(this._parentNode); - var paddingLeft = parseInt(style.paddingLeft, 10) || 0; - var paddingRight = parseInt(style.paddingRight, 10) || 0; - var paddingTop = parseInt(style.paddingTop, 10) || 0; - var paddingBottom = parseInt(style.paddingBottom, 10) || 0; - - this.setState({ - height: height - paddingTop - paddingBottom, - width: width - paddingLeft - paddingRight - }); - - onResize({ height: height, width: width }); - } - }, { - key: '_onScroll', - value: function _onScroll(event) { - // Prevent detectElementResize library from being triggered by this scroll event. - event.stopPropagation(); - } - }, { - key: '_setRef', - value: function _setRef(autoSizer) { - this._autoSizer = autoSizer; - } - }]); - - return AutoSizer; -}(_react.Component); - -AutoSizer.propTypes = { - /** - * Function respondible for rendering children. - * This function should implement the following signature: - * ({ height, width }) => PropTypes.element - */ - children: _react.PropTypes.func.isRequired, - - /** Disable dynamic :height property */ - disableHeight: _react.PropTypes.bool, - - /** Disable dynamic :width property */ - disableWidth: _react.PropTypes.bool, - - /** Callback to be invoked on-resize: ({ height, width }) */ - onResize: _react.PropTypes.func.isRequired -}; -AutoSizer.defaultProps = { - onResize: function onResize() {} -}; -exports.default = AutoSizer; -},{"../vendor/detectElementResize":78,"react":undefined,"react-addons-shallow-compare":18}],37:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.AutoSizer = exports.default = undefined; - -var _AutoSizer2 = require('./AutoSizer'); - -var _AutoSizer3 = _interopRequireDefault(_AutoSizer2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _AutoSizer3.default; -exports.AutoSizer = _AutoSizer3.default; -},{"./AutoSizer":36}],38:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _reactAddonsShallowCompare = require('react-addons-shallow-compare'); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -var _reactDom = require('react-dom'); - -var _reactDom2 = _interopRequireDefault(_reactDom); - -var _defaultCellSizeCache = require('./defaultCellSizeCache'); - -var _defaultCellSizeCache2 = _interopRequireDefault(_defaultCellSizeCache); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -/** - * Measures a Grid cell's contents by rendering them in a way that is not visible to the user. - * Either a fixed width or height may be provided if it is desirable to measure only in one direction. - */ -var CellMeasurer = function (_Component) { - _inherits(CellMeasurer, _Component); - - function CellMeasurer(props, state) { - _classCallCheck(this, CellMeasurer); - - var _this = _possibleConstructorReturn(this, (CellMeasurer.__proto__ || Object.getPrototypeOf(CellMeasurer)).call(this, props, state)); - - _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); - return _this; - } - - _createClass(CellMeasurer, [{ - key: 'getColumnWidth', - value: function getColumnWidth(_ref) { - var index = _ref.index; - - if (this._cellSizeCache.hasColumnWidth(index)) { - return this._cellSizeCache.getColumnWidth(index); - } - - var rowCount = this.props.rowCount; - - - var maxWidth = 0; - - for (var rowIndex = 0; rowIndex < rowCount; rowIndex++) { - var _measureCell2 = this._measureCell({ - clientWidth: true, - columnIndex: index, - rowIndex: rowIndex - }); - - var width = _measureCell2.width; - - - maxWidth = Math.max(maxWidth, width); - } - - this._cellSizeCache.setColumnWidth(index, maxWidth); - - return maxWidth; - } - }, { - key: 'getRowHeight', - value: function getRowHeight(_ref2) { - var index = _ref2.index; - - if (this._cellSizeCache.hasRowHeight(index)) { - return this._cellSizeCache.getRowHeight(index); - } - - var columnCount = this.props.columnCount; - - - var maxHeight = 0; - - for (var columnIndex = 0; columnIndex < columnCount; columnIndex++) { - var _measureCell3 = this._measureCell({ - clientHeight: true, - columnIndex: columnIndex, - rowIndex: index - }); - - var height = _measureCell3.height; - - - maxHeight = Math.max(maxHeight, height); - } - - this._cellSizeCache.setRowHeight(index, maxHeight); - - return maxHeight; - } - }, { - key: 'resetMeasurementForColumn', - value: function resetMeasurementForColumn(columnIndex) { - this._cellSizeCache.clearColumnWidth(columnIndex); - } - }, { - key: 'resetMeasurementForRow', - value: function resetMeasurementForRow(rowIndex) { - this._cellSizeCache.clearRowHeight(rowIndex); - } - }, { - key: 'resetMeasurements', - value: function resetMeasurements() { - this._cellSizeCache.clearAllColumnWidths(); - this._cellSizeCache.clearAllRowHeights(); - } - }, { - key: 'componentDidMount', - value: function componentDidMount() { - this._renderAndMount(); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - var cellSizeCache = this.props.cellSizeCache; - - - if (cellSizeCache !== nextProps.cellSizeCache) { - this._cellSizeCache = nextProps.cellSizeCache; - } - - this._updateDivDimensions(nextProps); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this._unmountContainer(); - } - }, { - key: 'render', - value: function render() { - 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 shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); - } - }, { - key: '_getContainerNode', - value: function _getContainerNode(props) { - var container = props.container; - - - if (container) { - return _reactDom2.default.findDOMNode(typeof container === 'function' ? container() : container); - } else { - return document.body; - } - } - }, { - key: '_measureCell', - value: function _measureCell(_ref3) { - var _ref3$clientHeight = _ref3.clientHeight; - var clientHeight = _ref3$clientHeight === undefined ? false : _ref3$clientHeight; - var _ref3$clientWidth = _ref3.clientWidth; - var clientWidth = _ref3$clientWidth === undefined ? true : _ref3$clientWidth; - var columnIndex = _ref3.columnIndex; - var rowIndex = _ref3.rowIndex; - var cellRenderer = this.props.cellRenderer; - - - var rendered = cellRenderer({ - columnIndex: columnIndex, - rowIndex: rowIndex - }); - - // Handle edge case where this method is called before the CellMeasurer has completed its initial render (and mounted). - this._renderAndMount(); - - // @TODO Keep an eye on this for future React updates as the interface may change: - // https://twitter.com/soprano/status/737316379712331776 - _reactDom2.default.unstable_renderSubtreeIntoContainer(this, rendered, this._div); - - var measurements = { - height: clientHeight && this._div.clientHeight, - width: clientWidth && this._div.clientWidth - }; - - _reactDom2.default.unmountComponentAtNode(this._div); - - return measurements; - } - }, { - key: '_renderAndMount', - value: function _renderAndMount() { - if (!this._div) { - this._div = document.createElement('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 _unmountContainer() { - if (this._div) { - this._containerNode.removeChild(this._div); - - this._div = null; - } - - this._containerNode = null; - } - }, { - key: '_updateDivDimensions', - value: function _updateDivDimensions(props) { - var height = props.height; - var width = props.width; - - - if (height && height !== this._divHeight) { - this._divHeight = height; - this._div.style.height = height + 'px'; - } - - if (width && width !== this._divWidth) { - this._divWidth = width; - this._div.style.width = width + 'px'; - } - } - }]); - - return CellMeasurer; -}(_react.Component); - -CellMeasurer.propTypes = { - /** - * Renders a cell given its indices. - * Should implement the following interface: ({ columnIndex: number, rowIndex: number }): PropTypes.node - */ - cellRenderer: _react.PropTypes.func.isRequired, - - /** - * Optional, custom caching strategy for cell sizes. - */ - cellSizeCache: _react.PropTypes.object, - - /** - * Function respondible for rendering a virtualized component. - * This function should implement the following signature: - * ({ getColumnWidth, getRowHeight, resetMeasurements }) => PropTypes.element - */ - children: _react.PropTypes.func.isRequired, - - /** - * Number of columns in grid. - */ - columnCount: _react.PropTypes.number.isRequired, - - /** - * A Node, Component instance, or function that returns either. - * If this property is not specified the document body will be used. - */ - container: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.func, _react2.default.PropTypes.node]), - - /** - * Assign a fixed :height in order to measure dynamic text :width only. - */ - height: _react.PropTypes.number, - - /** - * Number of rows in grid. - */ - rowCount: _react.PropTypes.number.isRequired, - - /** - * Assign a fixed :width in order to measure dynamic text :height only. - */ - width: _react.PropTypes.number -}; -exports.default = CellMeasurer; -},{"./defaultCellSizeCache":39,"react":undefined,"react-addons-shallow-compare":18,"react-dom":undefined}],39:[function(require,module,exports){ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -/** - * Default CellMeasurer `cellSizeCache` implementation. - * Permanently caches all cell sizes (identified by column and row index) unless explicitly cleared. - * Can be configured to handle uniform cell widths and/or heights as a way of optimizing certain use cases. - */ -var CellSizeCache = function () { - function CellSizeCache() { - var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - var _ref$uniformRowHeight = _ref.uniformRowHeight; - var uniformRowHeight = _ref$uniformRowHeight === undefined ? false : _ref$uniformRowHeight; - var _ref$uniformColumnWid = _ref.uniformColumnWidth; - var uniformColumnWidth = _ref$uniformColumnWid === undefined ? false : _ref$uniformColumnWid; - - _classCallCheck(this, CellSizeCache); - - this._uniformRowHeight = uniformRowHeight; - this._uniformColumnWidth = uniformColumnWidth; - - this._cachedColumnWidths = {}; - this._cachedRowHeights = {}; - } - - _createClass(CellSizeCache, [{ - key: "clearAllColumnWidths", - value: function clearAllColumnWidths() { - this._cachedColumnWidth = undefined; - this._cachedColumnWidths = {}; - } - }, { - key: "clearAllRowHeights", - value: function clearAllRowHeights() { - this._cachedRowHeight = undefined; - this._cachedRowHeights = {}; - } - }, { - key: "clearColumnWidth", - value: function clearColumnWidth(index) { - this._cachedColumnWidth = undefined; - - delete this._cachedColumnWidths[index]; - } - }, { - key: "clearRowHeight", - value: function clearRowHeight(index) { - this._cachedRowHeight = undefined; - - delete this._cachedRowHeights[index]; - } - }, { - key: "getColumnWidth", - value: function getColumnWidth(index) { - return this._uniformColumnWidth ? this._cachedColumnWidth : this._cachedColumnWidths[index]; - } - }, { - key: "getRowHeight", - value: function getRowHeight(index) { - return this._uniformRowHeight ? this._cachedRowHeight : this._cachedRowHeights[index]; - } - }, { - key: "hasColumnWidth", - value: function hasColumnWidth(index) { - return this._uniformColumnWidth ? !!this._cachedColumnWidth : !!this._cachedColumnWidths[index]; - } - }, { - key: "hasRowHeight", - value: function hasRowHeight(index) { - return this._uniformRowHeight ? !!this._cachedRowHeight : !!this._cachedRowHeights[index]; - } - }, { - key: "setColumnWidth", - value: function setColumnWidth(index, width) { - this._cachedColumnWidth = width; - this._cachedColumnWidths[index] = width; - } - }, { - key: "setRowHeight", - value: function setRowHeight(index, height) { - this._cachedRowHeight = height; - this._cachedRowHeights[index] = height; - } - }]); - - return CellSizeCache; -}(); - -exports.default = CellSizeCache; -},{}],40:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.defaultCellSizeCache = exports.CellMeasurer = exports.default = undefined; - -var _CellMeasurer2 = require('./CellMeasurer'); - -var _CellMeasurer3 = _interopRequireDefault(_CellMeasurer2); - -var _defaultCellSizeCache2 = require('./defaultCellSizeCache'); - -var _defaultCellSizeCache3 = _interopRequireDefault(_defaultCellSizeCache2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _CellMeasurer3.default; -exports.CellMeasurer = _CellMeasurer3.default; -exports.defaultCellSizeCache = _defaultCellSizeCache3.default; -},{"./CellMeasurer":38,"./defaultCellSizeCache":39}],41:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _CollectionView = require('./CollectionView'); - -var _CollectionView2 = _interopRequireDefault(_CollectionView); - -var _calculateSizeAndPositionData2 = require('./utils/calculateSizeAndPositionData'); - -var _calculateSizeAndPositionData3 = _interopRequireDefault(_calculateSizeAndPositionData2); - -var _getUpdatedOffsetForIndex = require('../utils/getUpdatedOffsetForIndex'); - -var _getUpdatedOffsetForIndex2 = _interopRequireDefault(_getUpdatedOffsetForIndex); - -var _reactAddonsShallowCompare = require('react-addons-shallow-compare'); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -/** - * Renders scattered or non-linear data. - * Unlike Grid, which renders checkerboard data, Collection can render arbitrarily positioned- even overlapping- data. - */ -var Collection = function (_Component) { - _inherits(Collection, _Component); - - function Collection(props, context) { - _classCallCheck(this, Collection); - - var _this = _possibleConstructorReturn(this, (Collection.__proto__ || Object.getPrototypeOf(Collection)).call(this, props, context)); - - _this._cellMetadata = []; - _this._lastRenderedCellIndices = []; - - // Cell cache during scroll (for perforamnce) - _this._cellCache = []; - - _this._isScrollingChange = _this._isScrollingChange.bind(_this); - return _this; - } - - /** See Collection#recomputeCellSizesAndPositions */ - - - _createClass(Collection, [{ - key: 'recomputeCellSizesAndPositions', - value: function recomputeCellSizesAndPositions() { - this._cellCache = []; - this._collectionView.recomputeCellSizesAndPositions(); - } - - /** React lifecycle methods */ - - }, { - key: 'render', - value: function render() { - var _this2 = this; - - var props = _objectWithoutProperties(this.props, []); - - return _react2.default.createElement(_CollectionView2.default, _extends({ - cellLayoutManager: this, - isScrollingChange: this._isScrollingChange, - ref: function ref(_ref) { - _this2._collectionView = _ref; - } - }, props)); - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); - } - - /** CellLayoutManager interface */ - - }, { - key: 'calculateSizeAndPositionData', - value: function calculateSizeAndPositionData() { - var _props = this.props; - var cellCount = _props.cellCount; - var cellSizeAndPositionGetter = _props.cellSizeAndPositionGetter; - var sectionSize = _props.sectionSize; - - - var 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; - } - - /** - * Returns the most recently rendered set of cell indices. - */ - - }, { - key: 'getLastRenderedIndices', - value: function getLastRenderedIndices() { - return this._lastRenderedCellIndices; - } - - /** - * Calculates the minimum amount of change from the current scroll position to ensure the specified cell is (fully) visible. - */ - - }, { - key: 'getScrollPositionForCell', - value: function getScrollPositionForCell(_ref2) { - var align = _ref2.align; - var cellIndex = _ref2.cellIndex; - var height = _ref2.height; - var scrollLeft = _ref2.scrollLeft; - var scrollTop = _ref2.scrollTop; - var width = _ref2.width; - var 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 getTotalSize() { - return { - height: this._height, - width: this._width - }; - } - }, { - key: 'cellRenderers', - value: function cellRenderers(_ref3) { - var _this3 = this; - - var height = _ref3.height; - var isScrolling = _ref3.isScrolling; - var width = _ref3.width; - var x = _ref3.x; - var y = _ref3.y; - var _props2 = this.props; - var cellGroupRenderer = _props2.cellGroupRenderer; - var cellRenderer = _props2.cellRenderer; - - // Store for later calls to getLastRenderedIndices() - - this._lastRenderedCellIndices = this._sectionManager.getCellIndices({ - height: height, - width: width, - x: x, - y: y - }); - - return cellGroupRenderer({ - cellCache: this._cellCache, - cellRenderer: cellRenderer, - cellSizeAndPositionGetter: function cellSizeAndPositionGetter(_ref4) { - var index = _ref4.index; - return _this3._sectionManager.getCellMetadata({ index: index }); - }, - indices: this._lastRenderedCellIndices, - isScrolling: isScrolling - }); - } - }, { - key: '_isScrollingChange', - value: function _isScrollingChange(isScrolling) { - if (!isScrolling) { - this._cellCache = []; - } - } - }]); - - return Collection; -}(_react.Component); - -Collection.propTypes = { - 'aria-label': _react.PropTypes.string, - - /** - * Number of cells in Collection. - */ - cellCount: _react.PropTypes.number.isRequired, - - /** - * Responsible for rendering a group of cells given their indices. - * Should implement the following interface: ({ - * cellSizeAndPositionGetter:Function, - * indices: Array, - * cellRenderer: Function - * }): Array - */ - cellGroupRenderer: _react.PropTypes.func.isRequired, - - /** - * Responsible for rendering a cell given an row and column index. - * Should implement the following interface: ({ index: number }): PropTypes.element - */ - cellRenderer: _react.PropTypes.func.isRequired, - - /** - * Callback responsible for returning size and offset/position information for a given cell (index). - * ({ index: number }): { height: number, width: number, x: number, y: number } - */ - cellSizeAndPositionGetter: _react.PropTypes.func.isRequired, - - /** - * Optionally override the size of the sections a Collection's cells are split into. - */ - sectionSize: _react.PropTypes.number -}; -Collection.defaultProps = { - 'aria-label': 'grid', - cellGroupRenderer: defaultCellGroupRenderer -}; -exports.default = Collection; - - -function defaultCellGroupRenderer(_ref5) { - var cellCache = _ref5.cellCache; - var cellRenderer = _ref5.cellRenderer; - var cellSizeAndPositionGetter = _ref5.cellSizeAndPositionGetter; - var indices = _ref5.indices; - var isScrolling = _ref5.isScrolling; - - return indices.map(function (index) { - var cellMetadata = cellSizeAndPositionGetter({ index: index }); - - // Avoid re-creating cells while scrolling. - // This can lead to the same cell being created many times and can cause performance issues for "heavy" cells. - // If a scroll is in progress- cache and reuse cells. - // This cache will be thrown away once scrolling complets. - var renderedCell = void 0; - - if (isScrolling) { - if (!(index in cellCache)) { - cellCache[index] = cellRenderer({ - index: index, - isScrolling: isScrolling - }); - } - - renderedCell = cellCache[index]; - } else { - renderedCell = cellRenderer({ - index: index, - isScrolling: isScrolling - }); - } - - if (renderedCell == null || renderedCell === false) { - return null; - } - - return _react2.default.createElement( - 'div', - { - className: 'Collection__cell', - key: index, - style: { - height: cellMetadata.height, - left: cellMetadata.x, - top: cellMetadata.y, - width: cellMetadata.width - } - }, - renderedCell - ); - }).filter(function (renderedCell) { - return !!renderedCell; - }); -} -},{"../utils/getUpdatedOffsetForIndex":77,"./CollectionView":42,"./utils/calculateSizeAndPositionData":46,"react":undefined,"react-addons-shallow-compare":18}],42:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _classnames = require('classnames'); - -var _classnames2 = _interopRequireDefault(_classnames); - -var _createCallbackMemoizer = require('../utils/createCallbackMemoizer'); - -var _createCallbackMemoizer2 = _interopRequireDefault(_createCallbackMemoizer); - -var _scrollbarSize = require('dom-helpers/util/scrollbarSize'); - -var _scrollbarSize2 = _interopRequireDefault(_scrollbarSize); - -var _raf = require('raf'); - -var _raf2 = _interopRequireDefault(_raf); - -var _reactAddonsShallowCompare = require('react-addons-shallow-compare'); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -// @TODO It would be nice to refactor Grid to use this code as well. - -/** - * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress. - * This improves performance and makes scrolling smoother. - */ -var IS_SCROLLING_TIMEOUT = 150; - -/** - * Controls whether the Grid updates the DOM element's scrollLeft/scrollTop based on the current state or just observes it. - * This prevents Grid from interrupting mouse-wheel animations (see issue #2). - */ -var SCROLL_POSITION_CHANGE_REASONS = { - OBSERVED: 'observed', - REQUESTED: 'requested' -}; - -/** - * Monitors changes in properties (eg. cellCount) and state (eg. scroll offsets) to determine when rendering needs to occur. - * This component does not render any visible content itself; it defers to the specified :cellLayoutManager. - */ - -var CollectionView = function (_Component) { - _inherits(CollectionView, _Component); - - function CollectionView(props, context) { - _classCallCheck(this, CollectionView); - - var _this = _possibleConstructorReturn(this, (CollectionView.__proto__ || Object.getPrototypeOf(CollectionView)).call(this, props, context)); - - _this.state = { - calculateSizeAndPositionDataOnNextUpdate: false, - isScrolling: false, - scrollLeft: 0, - scrollTop: 0 - }; - - // Invokes callbacks only when their values have changed. - _this._onSectionRenderedMemoizer = (0, _createCallbackMemoizer2.default)(); - _this._onScrollMemoizer = (0, _createCallbackMemoizer2.default)(false); - - // Bind functions to instance so they don't lose context when passed around. - _this._invokeOnSectionRenderedHelper = _this._invokeOnSectionRenderedHelper.bind(_this); - _this._onScroll = _this._onScroll.bind(_this); - _this._updateScrollPositionForScrollToCell = _this._updateScrollPositionForScrollToCell.bind(_this); - return _this; - } - - /** - * Forced recompute of cell sizes and positions. - * This function should be called if cell sizes have changed but nothing else has. - * Since cell positions are calculated by callbacks, the collection view has no way of detecting when the underlying data has changed. - */ - - - _createClass(CollectionView, [{ - key: 'recomputeCellSizesAndPositions', - value: function recomputeCellSizesAndPositions() { - this.setState({ - calculateSizeAndPositionDataOnNextUpdate: true - }); - } - - /* ---------------------------- Component lifecycle methods ---------------------------- */ - - }, { - key: 'componentDidMount', - value: function componentDidMount() { - var _props = this.props; - var cellLayoutManager = _props.cellLayoutManager; - var scrollLeft = _props.scrollLeft; - var scrollToCell = _props.scrollToCell; - var scrollTop = _props.scrollTop; - - // If this component was first rendered server-side, scrollbar size will be undefined. - // In that event we need to remeasure. - - if (!this._scrollbarSizeMeasured) { - this._scrollbarSize = (0, _scrollbarSize2.default)(); - this._scrollbarSizeMeasured = true; - this.setState({}); - } - - if (scrollToCell >= 0) { - this._updateScrollPositionForScrollToCell(); - } else if (scrollLeft >= 0 || scrollTop >= 0) { - this._setScrollPosition({ scrollLeft: scrollLeft, scrollTop: scrollTop }); - } - - // Update onSectionRendered callback. - this._invokeOnSectionRenderedHelper(); - - var _cellLayoutManager$ge = cellLayoutManager.getTotalSize(); - - var totalHeight = _cellLayoutManager$ge.height; - var totalWidth = _cellLayoutManager$ge.width; - - // Initialize onScroll callback. - - this._invokeOnScrollMemoizer({ - scrollLeft: scrollLeft || 0, - scrollTop: scrollTop || 0, - totalHeight: totalHeight, - totalWidth: totalWidth - }); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate(prevProps, prevState) { - var _props2 = this.props; - var height = _props2.height; - var scrollToCell = _props2.scrollToCell; - var width = _props2.width; - var _state = this.state; - var scrollLeft = _state.scrollLeft; - var scrollPositionChangeReason = _state.scrollPositionChangeReason; - var scrollToAlignment = _state.scrollToAlignment; - var scrollTop = _state.scrollTop; - - // Make sure requested changes to :scrollLeft or :scrollTop get applied. - // Assigning to scrollLeft/scrollTop tells the browser to interrupt any running scroll animations, - // And to discard any pending async changes to the scroll position that may have happened in the meantime (e.g. on a separate scrolling thread). - // So we only set these when we require an adjustment of the scroll position. - // See issue #2 for more information. - - if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED) { - if (scrollLeft >= 0 && scrollLeft !== prevState.scrollLeft && scrollLeft !== this._scrollingContainer.scrollLeft) { - this._scrollingContainer.scrollLeft = scrollLeft; - } - if (scrollTop >= 0 && scrollTop !== prevState.scrollTop && scrollTop !== this._scrollingContainer.scrollTop) { - this._scrollingContainer.scrollTop = scrollTop; - } - } - - // Update scroll offsets if the current :scrollToCell values requires it - if (height !== prevProps.height || scrollToAlignment !== prevProps.scrollToAlignment || scrollToCell !== prevProps.scrollToCell || width !== prevProps.width) { - this._updateScrollPositionForScrollToCell(); - } - - // Update onRowsRendered callback if start/stop indices have changed - this._invokeOnSectionRenderedHelper(); - } - }, { - key: 'componentWillMount', - value: function componentWillMount() { - var cellLayoutManager = this.props.cellLayoutManager; - - - cellLayoutManager.calculateSizeAndPositionData(); - - // If this component is being rendered server-side, getScrollbarSize() will return undefined. - // We handle this case in componentDidMount() - this._scrollbarSize = (0, _scrollbarSize2.default)(); - if (this._scrollbarSize === undefined) { - this._scrollbarSizeMeasured = false; - this._scrollbarSize = 0; - } else { - this._scrollbarSizeMeasured = true; - } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - if (this._disablePointerEventsTimeoutId) { - clearTimeout(this._disablePointerEventsTimeoutId); - } - - if (this._setNextStateAnimationFrameId) { - _raf2.default.cancel(this._setNextStateAnimationFrameId); - } - } - - /** - * @private - * This method updates scrollLeft/scrollTop in state for the following conditions: - * 1) Empty content (0 rows or columns) - * 2) New scroll props overriding the current state - * 3) Cells-count or cells-size has changed, making previous scroll offsets invalid - */ - - }, { - key: 'componentWillUpdate', - value: function componentWillUpdate(nextProps, nextState) { - if (nextProps.cellCount === 0 && (nextState.scrollLeft !== 0 || nextState.scrollTop !== 0)) { - this._setScrollPosition({ - scrollLeft: 0, - scrollTop: 0 - }); - } else if (nextProps.scrollLeft !== this.props.scrollLeft || nextProps.scrollTop !== this.props.scrollTop) { - this._setScrollPosition({ - scrollLeft: nextProps.scrollLeft, - scrollTop: nextProps.scrollTop - }); - } - - if (nextProps.cellCount !== this.props.cellCount || nextProps.cellLayoutManager !== this.props.cellLayoutManager || nextState.calculateSizeAndPositionDataOnNextUpdate) { - nextProps.cellLayoutManager.calculateSizeAndPositionData(); - } - - if (nextState.calculateSizeAndPositionDataOnNextUpdate) { - this.setState({ - calculateSizeAndPositionDataOnNextUpdate: false - }); - } - } - }, { - key: 'render', - value: function render() { - var _this2 = this; - - var _props3 = this.props; - var autoHeight = _props3.autoHeight; - var cellCount = _props3.cellCount; - var cellLayoutManager = _props3.cellLayoutManager; - var className = _props3.className; - var height = _props3.height; - var horizontalOverscanSize = _props3.horizontalOverscanSize; - var noContentRenderer = _props3.noContentRenderer; - var style = _props3.style; - var verticalOverscanSize = _props3.verticalOverscanSize; - var width = _props3.width; - var _state2 = this.state; - var isScrolling = _state2.isScrolling; - var scrollLeft = _state2.scrollLeft; - var scrollTop = _state2.scrollTop; - - var _cellLayoutManager$ge2 = cellLayoutManager.getTotalSize(); - - var totalHeight = _cellLayoutManager$ge2.height; - var totalWidth = _cellLayoutManager$ge2.width; - - // Safely expand the rendered area by the specified overscan amount - - var left = Math.max(0, scrollLeft - horizontalOverscanSize); - var top = Math.max(0, scrollTop - verticalOverscanSize); - var right = Math.min(totalWidth, scrollLeft + width + horizontalOverscanSize); - var bottom = Math.min(totalHeight, scrollTop + height + verticalOverscanSize); - - var childrenToDisplay = height > 0 && width > 0 ? cellLayoutManager.cellRenderers({ - height: bottom - top, - isScrolling: isScrolling, - width: right - left, - x: left, - y: top - }) : []; - - var collectionStyle = { - height: autoHeight ? 'auto' : height, - width: width - }; - - // Force browser to hide scrollbars when we know they aren't necessary. - // Otherwise once scrollbars appear they may not disappear again. - // For more info see issue #116 - var verticalScrollBarSize = totalHeight > height ? this._scrollbarSize : 0; - var horizontalScrollBarSize = totalWidth > width ? this._scrollbarSize : 0; - if (totalWidth + verticalScrollBarSize <= width) { - collectionStyle.overflowX = 'hidden'; - } - if (totalHeight + horizontalScrollBarSize <= height) { - collectionStyle.overflowY = 'hidden'; - } - - return _react2.default.createElement( - 'div', - { - ref: function ref(_ref) { - _this2._scrollingContainer = _ref; - }, - 'aria-label': this.props['aria-label'], - className: (0, _classnames2.default)('Collection', className), - onScroll: this._onScroll, - role: 'grid', - style: _extends({}, collectionStyle, style), - tabIndex: 0 - }, - cellCount > 0 && _react2.default.createElement( - 'div', - { - className: 'Collection__innerScrollContainer', - style: { - height: totalHeight, - maxHeight: totalHeight, - maxWidth: totalWidth, - pointerEvents: isScrolling ? 'none' : '', - width: totalWidth - } - }, - childrenToDisplay - ), - cellCount === 0 && noContentRenderer() - ); - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); - } - - /* ---------------------------- Helper methods ---------------------------- */ - - /** - * Sets an :isScrolling flag for a small window of time. - * This flag is used to disable pointer events on the scrollable portion of the Collection. - * This prevents jerky/stuttery mouse-wheel scrolling. - */ - - }, { - key: '_enablePointerEventsAfterDelay', - value: function _enablePointerEventsAfterDelay() { - var _this3 = this; - - if (this._disablePointerEventsTimeoutId) { - clearTimeout(this._disablePointerEventsTimeoutId); - } - - this._disablePointerEventsTimeoutId = setTimeout(function () { - var isScrollingChange = _this3.props.isScrollingChange; - - - isScrollingChange(false); - - _this3._disablePointerEventsTimeoutId = null; - _this3.setState({ - isScrolling: false - }); - }, IS_SCROLLING_TIMEOUT); - } - }, { - key: '_invokeOnSectionRenderedHelper', - value: function _invokeOnSectionRenderedHelper() { - var _props4 = this.props; - var cellLayoutManager = _props4.cellLayoutManager; - var onSectionRendered = _props4.onSectionRendered; - - - this._onSectionRenderedMemoizer({ - callback: onSectionRendered, - indices: { - indices: cellLayoutManager.getLastRenderedIndices() - } - }); - } - }, { - key: '_invokeOnScrollMemoizer', - value: function _invokeOnScrollMemoizer(_ref2) { - var _this4 = this; - - var scrollLeft = _ref2.scrollLeft; - var scrollTop = _ref2.scrollTop; - var totalHeight = _ref2.totalHeight; - var totalWidth = _ref2.totalWidth; - - this._onScrollMemoizer({ - callback: function callback(_ref3) { - var scrollLeft = _ref3.scrollLeft; - var scrollTop = _ref3.scrollTop; - var _props5 = _this4.props; - var height = _props5.height; - var onScroll = _props5.onScroll; - var width = _props5.width; - - - onScroll({ - clientHeight: height, - clientWidth: width, - scrollHeight: totalHeight, - scrollLeft: scrollLeft, - scrollTop: scrollTop, - scrollWidth: totalWidth - }); - }, - indices: { - scrollLeft: scrollLeft, - scrollTop: scrollTop - } - }); - } - - /** - * Updates the state during the next animation frame. - * Use this method to avoid multiple renders in a small span of time. - * This helps performance for bursty events (like onScroll). - */ - - }, { - key: '_setNextState', - value: function _setNextState(state) { - var _this5 = this; - - if (this._setNextStateAnimationFrameId) { - _raf2.default.cancel(this._setNextStateAnimationFrameId); - } - - this._setNextStateAnimationFrameId = (0, _raf2.default)(function () { - _this5._setNextStateAnimationFrameId = null; - _this5.setState(state); - }); - } - }, { - key: '_setScrollPosition', - value: function _setScrollPosition(_ref4) { - var scrollLeft = _ref4.scrollLeft; - var scrollTop = _ref4.scrollTop; - - var newState = { - scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED - }; - - if (scrollLeft >= 0) { - newState.scrollLeft = scrollLeft; - } - - if (scrollTop >= 0) { - newState.scrollTop = scrollTop; - } - - if (scrollLeft >= 0 && scrollLeft !== this.state.scrollLeft || scrollTop >= 0 && scrollTop !== this.state.scrollTop) { - this.setState(newState); - } - } - }, { - key: '_updateScrollPositionForScrollToCell', - value: function _updateScrollPositionForScrollToCell() { - var _props6 = this.props; - var cellLayoutManager = _props6.cellLayoutManager; - var height = _props6.height; - var scrollToAlignment = _props6.scrollToAlignment; - var scrollToCell = _props6.scrollToCell; - var width = _props6.width; - var _state3 = this.state; - var scrollLeft = _state3.scrollLeft; - var scrollTop = _state3.scrollTop; - - - if (scrollToCell >= 0) { - var scrollPosition = cellLayoutManager.getScrollPositionForCell({ - align: scrollToAlignment, - cellIndex: scrollToCell, - height: height, - scrollLeft: scrollLeft, - scrollTop: scrollTop, - width: width - }); - - if (scrollPosition.scrollLeft !== scrollLeft || scrollPosition.scrollTop !== scrollTop) { - this._setScrollPosition(scrollPosition); - } - } - } - }, { - key: '_onScroll', - value: function _onScroll(event) { - // In certain edge-cases React dispatches an onScroll event with an invalid target.scrollLeft / target.scrollTop. - // This invalid event can be detected by comparing event.target to this component's scrollable DOM element. - // See issue #404 for more information. - if (event.target !== this._scrollingContainer) { - return; - } - - // Prevent pointer events from interrupting a smooth scroll - this._enablePointerEventsAfterDelay(); - - // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events, - // Gradually converging on a scrollTop that is within the bounds of the new, smaller height. - // This causes a series of rapid renders that is slow for long lists. - // We can avoid that by doing some simple bounds checking to ensure that scrollTop never exceeds the total height. - var _props7 = this.props; - var cellLayoutManager = _props7.cellLayoutManager; - var height = _props7.height; - var isScrollingChange = _props7.isScrollingChange; - var width = _props7.width; - - var scrollbarSize = this._scrollbarSize; - - var _cellLayoutManager$ge3 = cellLayoutManager.getTotalSize(); - - var totalHeight = _cellLayoutManager$ge3.height; - var totalWidth = _cellLayoutManager$ge3.width; - - var scrollLeft = Math.max(0, Math.min(totalWidth - width + scrollbarSize, event.target.scrollLeft)); - var scrollTop = Math.max(0, Math.min(totalHeight - height + scrollbarSize, event.target.scrollTop)); - - // Certain devices (like Apple touchpad) rapid-fire duplicate events. - // Don't force a re-render if this is the case. - // The mouse may move faster then the animation frame does. - // Use requestAnimationFrame to avoid over-updating. - if (this.state.scrollLeft !== scrollLeft || this.state.scrollTop !== scrollTop) { - // Browsers with cancelable scroll events (eg. Firefox) interrupt scrolling animations if scrollTop/scrollLeft is set. - // Other browsers (eg. Safari) don't scroll as well without the help under certain conditions (DOM or style changes during scrolling). - // All things considered, this seems to be the best current work around that I'm aware of. - // For more information see https://github.com/bvaughn/react-virtualized/pull/124 - var scrollPositionChangeReason = event.cancelable ? SCROLL_POSITION_CHANGE_REASONS.OBSERVED : SCROLL_POSITION_CHANGE_REASONS.REQUESTED; - - // Synchronously set :isScrolling the first time (since _setNextState will reschedule its animation frame each time it's called) - if (!this.state.isScrolling) { - isScrollingChange(true); - - this.setState({ - isScrolling: true - }); - } - - this._setNextState({ - isScrolling: true, - scrollLeft: scrollLeft, - scrollPositionChangeReason: scrollPositionChangeReason, - scrollTop: scrollTop - }); - } - - this._invokeOnScrollMemoizer({ - scrollLeft: scrollLeft, - scrollTop: scrollTop, - totalWidth: totalWidth, - totalHeight: totalHeight - }); - } - }]); - - return CollectionView; -}(_react.Component); - -CollectionView.propTypes = { - 'aria-label': _react.PropTypes.string, - - /** - * Removes fixed height from the scrollingContainer so that the total height - * of rows can stretch the window. Intended for use with WindowScroller - */ - autoHeight: _react.PropTypes.bool, - - /** - * Number of cells in collection. - */ - cellCount: _react.PropTypes.number.isRequired, - - /** - * Calculates cell sizes and positions and manages rendering the appropriate cells given a specified window. - */ - cellLayoutManager: _react.PropTypes.object.isRequired, - - /** - * Optional custom CSS class name to attach to root Collection element. - */ - className: _react.PropTypes.string, - - /** - * Height of Collection; this property determines the number of visible (vs virtualized) rows. - */ - height: _react.PropTypes.number.isRequired, - - /** - * Enables the `Collection` to horiontally "overscan" its content similar to how `Grid` does. - * This can reduce flicker around the edges when a user scrolls quickly. - */ - horizontalOverscanSize: _react.PropTypes.number.isRequired, - - isScrollingChange: _react.PropTypes.func, - - /** - * Optional renderer to be used in place of rows when either :rowCount or :cellCount is 0. - */ - noContentRenderer: _react.PropTypes.func.isRequired, - - /** - * Callback invoked whenever the scroll offset changes within the inner scrollable region. - * This callback can be used to sync scrolling between lists, tables, or grids. - * ({ clientHeight, clientWidth, scrollHeight, scrollLeft, scrollTop, scrollWidth }): void - */ - onScroll: _react.PropTypes.func.isRequired, - - /** - * Callback invoked with information about the section of the Collection that was just rendered. - * This callback is passed a named :indices parameter which is an Array of the most recently rendered section indices. - */ - onSectionRendered: _react.PropTypes.func.isRequired, - - /** - * Horizontal offset. - */ - scrollLeft: _react.PropTypes.number, - - /** - * Controls scroll-to-cell behavior of the Grid. - * The default ("auto") scrolls the least amount possible to ensure that the specified cell is fully visible. - * Use "start" to align cells to the top/left of the Grid and "end" to align bottom/right. - */ - scrollToAlignment: _react.PropTypes.oneOf(['auto', 'end', 'start', 'center']).isRequired, - - /** - * Cell index to ensure visible (by forcefully scrolling if necessary). - */ - scrollToCell: _react.PropTypes.number, - - /** - * Vertical offset. - */ - scrollTop: _react.PropTypes.number, - - /** - * Optional custom inline style to attach to root Collection element. - */ - style: _react.PropTypes.object, - - /** - * Enables the `Collection` to vertically "overscan" its content similar to how `Grid` does. - * This can reduce flicker around the edges when a user scrolls quickly. - */ - verticalOverscanSize: _react.PropTypes.number.isRequired, - - /** - * Width of Collection; this property determines the number of visible (vs virtualized) columns. - */ - width: _react.PropTypes.number.isRequired -}; -CollectionView.defaultProps = { - 'aria-label': 'grid', - horizontalOverscanSize: 0, - noContentRenderer: function noContentRenderer() { - return null; - }, - onScroll: function onScroll() { - return null; - }, - onSectionRendered: function onSectionRendered() { - return null; - }, - scrollToAlignment: 'auto', - style: {}, - verticalOverscanSize: 0 -}; -exports.default = CollectionView; -},{"../utils/createCallbackMemoizer":76,"classnames":undefined,"dom-helpers/util/scrollbarSize":80,"raf":81,"react":undefined,"react-addons-shallow-compare":18}],43:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -/** - * A section of the Window. - * Window Sections are used to group nearby cells. - * This enables us to more quickly determine which cells to display in a given region of the Window. - * Sections have a fixed size and contain 0 to many cells (tracked by their indices). - */ -var Section = function () { - function Section(_ref) { - var height = _ref.height; - var width = _ref.width; - var x = _ref.x; - var y = _ref.y; - - _classCallCheck(this, Section); - - this.height = height; - this.width = width; - this.x = x; - this.y = y; - - this._indexMap = {}; - this._indices = []; - } - - /** Add a cell to this section. */ - - - _createClass(Section, [{ - key: 'addCellIndex', - value: function addCellIndex(_ref2) { - var index = _ref2.index; - - if (!this._indexMap[index]) { - this._indexMap[index] = true; - this._indices.push(index); - } - } - - /** Get all cell indices that have been added to this section. */ - - }, { - key: 'getCellIndices', - value: function getCellIndices() { - return this._indices; - } - - /** Intended for debugger/test purposes only */ - - }, { - key: 'toString', - value: function toString() { - return this.x + ',' + this.y + ' ' + this.width + 'x' + this.height; - } - }]); - - return Section; -}(); /** @rlow */ - - -exports.default = Section; -},{}],44:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /** - * Window Sections are used to group nearby cells. - * This enables us to more quickly determine which cells to display in a given region of the Window. - * - */ - - -var _Section = require('./Section'); - -var _Section2 = _interopRequireDefault(_Section); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var SECTION_SIZE = 100; - -/** - * Contains 0 to many Sections. - * Grows (and adds Sections) dynamically as cells are registered. - * Automatically adds cells to the appropriate Section(s). - */ -var SectionManager = function () { - function SectionManager() { - var sectionSize = arguments.length <= 0 || arguments[0] === undefined ? SECTION_SIZE : arguments[0]; - - _classCallCheck(this, SectionManager); - - this._sectionSize = sectionSize; - - this._cellMetadata = []; - this._sections = {}; - } - - /** - * Gets all cell indices contained in the specified region. - * A region may encompass 1 or more Sections. - */ - - - _createClass(SectionManager, [{ - key: 'getCellIndices', - value: function getCellIndices(_ref) { - var height = _ref.height; - var width = _ref.width; - var x = _ref.x; - var y = _ref.y; - - var indices = {}; - - this.getSections({ height: height, width: width, x: x, y: y }).forEach(function (section) { - return section.getCellIndices().forEach(function (index) { - indices[index] = index; - }); - }); - - // Object keys are strings; this function returns numbers - return Object.keys(indices).map(function (index) { - return indices[index]; - }); - } - - /** Get size and position information for the cell specified. */ - - }, { - key: 'getCellMetadata', - value: function getCellMetadata(_ref2) { - var index = _ref2.index; - - return this._cellMetadata[index]; - } - - /** Get all Sections overlapping the specified region. */ - - }, { - key: 'getSections', - value: function getSections(_ref3) { - var height = _ref3.height; - var width = _ref3.width; - var x = _ref3.x; - var y = _ref3.y; - - var sectionXStart = Math.floor(x / this._sectionSize); - var sectionXStop = Math.floor((x + width - 1) / this._sectionSize); - var sectionYStart = Math.floor(y / this._sectionSize); - var sectionYStop = Math.floor((y + height - 1) / this._sectionSize); - - var sections = []; - - for (var sectionX = sectionXStart; sectionX <= sectionXStop; sectionX++) { - for (var sectionY = sectionYStart; sectionY <= sectionYStop; sectionY++) { - var key = sectionX + '.' + sectionY; - - if (!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; - } - - /** Total number of Sections based on the currently registered cells. */ - - }, { - key: 'getTotalSectionCount', - value: function getTotalSectionCount() { - return Object.keys(this._sections).length; - } - - /** Intended for debugger/test purposes only */ - - }, { - key: 'toString', - value: function toString() { - var _this = this; - - return Object.keys(this._sections).map(function (index) { - return _this._sections[index].toString(); - }); - } - - /** Adds a cell to the appropriate Sections and registers it metadata for later retrievable. */ - - }, { - key: 'registerCell', - value: function registerCell(_ref4) { - var cellMetadatum = _ref4.cellMetadatum; - var index = _ref4.index; - - this._cellMetadata[index] = cellMetadatum; - - this.getSections(cellMetadatum).forEach(function (section) { - return section.addCellIndex({ index: index }); - }); - } - }]); - - return SectionManager; -}(); - -exports.default = SectionManager; -},{"./Section":43}],45:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Collection = exports.default = undefined; - -var _Collection2 = require('./Collection'); - -var _Collection3 = _interopRequireDefault(_Collection2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _Collection3.default; -exports.Collection = _Collection3.default; -},{"./Collection":41}],46:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = calculateSizeAndPositionData; - -var _SectionManager = require('../SectionManager'); - -var _SectionManager2 = _interopRequireDefault(_SectionManager); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function calculateSizeAndPositionData(_ref) { - var cellCount = _ref.cellCount; - var cellSizeAndPositionGetter = _ref.cellSizeAndPositionGetter; - var sectionSize = _ref.sectionSize; - - var cellMetadata = []; - var sectionManager = new _SectionManager2.default(sectionSize); - var height = 0; - var width = 0; - - for (var index = 0; index < cellCount; index++) { - var cellMetadatum = cellSizeAndPositionGetter({ index: index }); - - if (cellMetadatum.height == null || isNaN(cellMetadatum.height) || cellMetadatum.width == null || isNaN(cellMetadatum.width) || cellMetadatum.x == null || isNaN(cellMetadatum.x) || cellMetadatum.y == null || 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 - }; -} -},{"../SectionManager":44}],47:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = require('react'); - -var _reactAddonsShallowCompare = require('react-addons-shallow-compare'); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -var _Grid = require('../Grid'); - -var _Grid2 = _interopRequireDefault(_Grid); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -/** - * High-order component that auto-calculates column-widths for `Grid` cells. - */ -var ColumnSizer = function (_Component) { - _inherits(ColumnSizer, _Component); - - function ColumnSizer(props, context) { - _classCallCheck(this, ColumnSizer); - - var _this = _possibleConstructorReturn(this, (ColumnSizer.__proto__ || Object.getPrototypeOf(ColumnSizer)).call(this, props, context)); - - _this._registerChild = _this._registerChild.bind(_this); - return _this; - } - - _createClass(ColumnSizer, [{ - key: 'componentDidUpdate', - value: function componentDidUpdate(prevProps, prevState) { - var _props = this.props; - var columnMaxWidth = _props.columnMaxWidth; - var columnMinWidth = _props.columnMinWidth; - var columnCount = _props.columnCount; - var width = _props.width; - - - if (columnMaxWidth !== prevProps.columnMaxWidth || columnMinWidth !== prevProps.columnMinWidth || columnCount !== prevProps.columnCount || width !== prevProps.width) { - if (this._registeredChild) { - this._registeredChild.recomputeGridSize(); - } - } - } - }, { - key: 'render', - value: function render() { - var _props2 = this.props; - var children = _props2.children; - var columnMaxWidth = _props2.columnMaxWidth; - var columnMinWidth = _props2.columnMinWidth; - var columnCount = _props2.columnCount; - var width = _props2.width; - - - var safeColumnMinWidth = columnMinWidth || 1; - - var safeColumnMaxWidth = columnMaxWidth ? Math.min(columnMaxWidth, width) : width; - - var 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 getColumnWidth() { - return columnWidth; - }, - registerChild: this._registerChild - }); - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); - } - }, { - key: '_registerChild', - value: function _registerChild(child) { - if (child !== null && !(child instanceof _Grid2.default)) { - throw Error('Unexpected child type registered; only Grid children are supported.'); - } - - this._registeredChild = child; - - if (this._registeredChild) { - this._registeredChild.recomputeGridSize(); - } - } - }]); - - return ColumnSizer; -}(_react.Component); - -ColumnSizer.propTypes = { - /** - * Function respondible for rendering a virtualized Grid. - * This function should implement the following signature: - * ({ adjustedWidth, getColumnWidth, registerChild }) => PropTypes.element - * - * The specified :getColumnWidth function should be passed to the Grid's :columnWidth property. - * The :registerChild should be passed to the Grid's :ref property. - * The :adjustedWidth property is optional; it reflects the lesser of the overall width or the width of all columns. - */ - children: _react.PropTypes.func.isRequired, - - /** Optional maximum allowed column width */ - columnMaxWidth: _react.PropTypes.number, - - /** Optional minimum allowed column width */ - columnMinWidth: _react.PropTypes.number, - - /** Number of columns in Grid or FlexTable child */ - columnCount: _react.PropTypes.number.isRequired, - - /** Width of Grid or FlexTable child */ - width: _react.PropTypes.number.isRequired -}; -exports.default = ColumnSizer; -},{"../Grid":60,"react":undefined,"react-addons-shallow-compare":18}],48:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ColumnSizer = exports.default = undefined; - -var _ColumnSizer2 = require('./ColumnSizer'); - -var _ColumnSizer3 = _interopRequireDefault(_ColumnSizer2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _ColumnSizer3.default; -exports.ColumnSizer = _ColumnSizer3.default; -},{"./ColumnSizer":47}],49:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = require('react'); - -var _defaultHeaderRenderer = require('./defaultHeaderRenderer'); - -var _defaultHeaderRenderer2 = _interopRequireDefault(_defaultHeaderRenderer); - -var _defaultCellRenderer = require('./defaultCellRenderer'); - -var _defaultCellRenderer2 = _interopRequireDefault(_defaultCellRenderer); - -var _defaultCellDataGetter = require('./defaultCellDataGetter'); - -var _defaultCellDataGetter2 = _interopRequireDefault(_defaultCellDataGetter); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -/** - * Describes the header and cell contents of a table column. - */ -var Column = function (_Component) { - _inherits(Column, _Component); - - function Column() { - _classCallCheck(this, Column); - - return _possibleConstructorReturn(this, (Column.__proto__ || Object.getPrototypeOf(Column)).apply(this, arguments)); - } - - return Column; -}(_react.Component); - -Column.defaultProps = { - cellDataGetter: _defaultCellDataGetter2.default, - cellRenderer: _defaultCellRenderer2.default, - flexGrow: 0, - flexShrink: 1, - headerRenderer: _defaultHeaderRenderer2.default, - style: {} -}; -Column.propTypes = { - /** Optional aria-label value to set on the column header */ - 'aria-label': _react.PropTypes.string, - - /** - * Callback responsible for returning a cell's data, given its :dataKey - * ({ columnData: any, dataKey: string, rowData: any }): any - */ - cellDataGetter: _react.PropTypes.func, - - /** - * Callback responsible for rendering a cell's contents. - * ({ cellData: any, columnData: any, dataKey: string, rowData: any, rowIndex: number }): node - */ - cellRenderer: _react.PropTypes.func, - - /** Optional CSS class to apply to cell */ - className: _react.PropTypes.string, - - /** Optional additional data passed to this column's :cellDataGetter */ - columnData: _react.PropTypes.object, - - /** Uniquely identifies the row-data attribute correspnding to this cell */ - dataKey: _react.PropTypes.any.isRequired, - - /** If sort is enabled for the table at large, disable it for this column */ - disableSort: _react.PropTypes.bool, - - /** Flex grow style; defaults to 0 */ - flexGrow: _react.PropTypes.number, - - /** Flex shrink style; defaults to 1 */ - flexShrink: _react.PropTypes.number, - - /** Optional CSS class to apply to this column's header */ - headerClassName: _react.PropTypes.string, - - /** - * Optional callback responsible for rendering a column header contents. - * ({ columnData: object, dataKey: string, disableSort: boolean, label: string, sortBy: string, sortDirection: string }): PropTypes.node - */ - headerRenderer: _react.PropTypes.func.isRequired, - - /** Header label for this column */ - label: _react.PropTypes.string, - - /** Maximum width of column; this property will only be used if :flexGrow is > 0. */ - maxWidth: _react.PropTypes.number, - - /** Minimum width of column. */ - minWidth: _react.PropTypes.number, - - /** Optional inline style to apply to cell */ - style: _react.PropTypes.object, - - /** Flex basis (width) for this column; This value can grow or shrink based on :flexGrow and :flexShrink properties. */ - width: _react.PropTypes.number.isRequired -}; -exports.default = Column; -},{"./defaultCellDataGetter":53,"./defaultCellRenderer":54,"./defaultHeaderRenderer":55,"react":undefined}],50:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _classnames = require('classnames'); - -var _classnames2 = _interopRequireDefault(_classnames); - -var _FlexColumn = require('./FlexColumn'); - -var _FlexColumn2 = _interopRequireDefault(_FlexColumn); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _reactDom = require('react-dom'); - -var _reactAddonsShallowCompare = require('react-addons-shallow-compare'); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -var _Grid = require('../Grid'); - -var _Grid2 = _interopRequireDefault(_Grid); - -var _defaultRowRenderer = require('./defaultRowRenderer'); - -var _defaultRowRenderer2 = _interopRequireDefault(_defaultRowRenderer); - -var _SortDirection = require('./SortDirection'); - -var _SortDirection2 = _interopRequireDefault(_SortDirection); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -/** - * Table component with fixed headers and virtualized rows for improved performance with large data sets. - * This component expects explicit width, height, and padding parameters. - */ -var FlexTable = function (_Component) { - _inherits(FlexTable, _Component); - - function FlexTable(props) { - _classCallCheck(this, FlexTable); - - var _this = _possibleConstructorReturn(this, (FlexTable.__proto__ || Object.getPrototypeOf(FlexTable)).call(this, props)); - - _this.state = { - scrollbarWidth: 0 - }; - - _this._cellClassName = _this._cellClassName.bind(_this); - _this._cellStyle = _this._cellStyle.bind(_this); - _this._createColumn = _this._createColumn.bind(_this); - _this._createRow = _this._createRow.bind(_this); - _this._onScroll = _this._onScroll.bind(_this); - _this._onSectionRendered = _this._onSectionRendered.bind(_this); - return _this; - } - - _createClass(FlexTable, [{ - key: 'forceUpdateGrid', - value: function forceUpdateGrid() { - this.Grid.forceUpdate(); - } - - /** See Grid#measureAllCells */ - - }, { - key: 'measureAllRows', - value: function measureAllRows() { - this.Grid.measureAllCells(); - } - - /** See Grid#recomputeGridSize */ - - }, { - key: 'recomputeRowHeights', - value: function recomputeRowHeights() { - var index = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0]; - - this.Grid.recomputeGridSize({ - rowIndex: index - }); - this.forceUpdateGrid(); - } - }, { - key: 'componentDidMount', - value: function componentDidMount() { - this._setScrollbarWidth(); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate() { - this._setScrollbarWidth(); - } - }, { - key: 'render', - value: function render() { - var _this2 = this; - - var _props = this.props; - var children = _props.children; - var className = _props.className; - var disableHeader = _props.disableHeader; - var gridClassName = _props.gridClassName; - var gridStyle = _props.gridStyle; - var headerHeight = _props.headerHeight; - var height = _props.height; - var noRowsRenderer = _props.noRowsRenderer; - var rowClassName = _props.rowClassName; - var rowStyle = _props.rowStyle; - var scrollToIndex = _props.scrollToIndex; - var style = _props.style; - var width = _props.width; - var scrollbarWidth = this.state.scrollbarWidth; - - - var availableRowsHeight = height - headerHeight; - - var rowClass = rowClassName instanceof Function ? rowClassName({ index: -1 }) : rowClassName; - var rowStyleObject = rowStyle instanceof Function ? rowStyle({ index: -1 }) : rowStyle; - - // Precompute and cache column styles before rendering rows and columns to speed things up - this._cachedColumnStyles = []; - _react2.default.Children.toArray(children).forEach(function (column, index) { - _this2._cachedColumnStyles[index] = _this2._getFlexStyleForColumn(column, column.props.style); - }); - - // Note that we specify :numChildren, :scrollbarWidth, :sortBy, and :sortDirection as properties on Grid even though these have nothing to do with Grid. - // This is done because Grid is a pure component and won't update unless its properties or state has changed. - // Any property that should trigger a re-render of Grid then is specified here to avoid a stale display. - return _react2.default.createElement( - 'div', - { - className: (0, _classnames2.default)('FlexTable', className), - style: style - }, - !disableHeader && _react2.default.createElement( - 'div', - { - className: (0, _classnames2.default)('FlexTable__headerRow', rowClass), - style: _extends({}, rowStyleObject, { - height: headerHeight, - paddingRight: scrollbarWidth, - width: width - }) - }, - this._getRenderedHeaderRow() - ), - _react2.default.createElement(_Grid2.default, _extends({}, this.props, { - autoContainerWidth: true, - className: (0, _classnames2.default)('FlexTable__Grid', gridClassName), - cellClassName: this._cellClassName, - cellRenderer: this._createRow, - cellStyle: this._cellStyle, - columnWidth: width, - columnCount: 1, - height: availableRowsHeight, - noContentRenderer: noRowsRenderer, - onScroll: this._onScroll, - onSectionRendered: this._onSectionRendered, - ref: function ref(_ref) { - _this2.Grid = _ref; - }, - scrollbarWidth: scrollbarWidth, - scrollToRow: scrollToIndex, - style: gridStyle - })) - ); - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); - } - }, { - key: '_cellClassName', - value: function _cellClassName(_ref2) { - var rowIndex = _ref2.rowIndex; - var rowWrapperClassName = this.props.rowWrapperClassName; - - - return rowWrapperClassName instanceof Function ? rowWrapperClassName({ index: rowIndex - 1 }) : rowWrapperClassName; - } - }, { - key: '_cellStyle', - value: function _cellStyle(_ref3) { - var rowIndex = _ref3.rowIndex; - var rowWrapperStyle = this.props.rowWrapperStyle; - - - return rowWrapperStyle instanceof Function ? rowWrapperStyle({ index: rowIndex - 1 }) : rowWrapperStyle; - } - }, { - key: '_createColumn', - value: function _createColumn(_ref4) { - var column = _ref4.column; - var columnIndex = _ref4.columnIndex; - var isScrolling = _ref4.isScrolling; - var rowData = _ref4.rowData; - var rowIndex = _ref4.rowIndex; - var _column$props = column.props; - var cellDataGetter = _column$props.cellDataGetter; - var cellRenderer = _column$props.cellRenderer; - var className = _column$props.className; - var columnData = _column$props.columnData; - var dataKey = _column$props.dataKey; - - - var cellData = cellDataGetter({ columnData: columnData, dataKey: dataKey, rowData: rowData }); - var renderedCell = cellRenderer({ cellData: cellData, columnData: columnData, dataKey: dataKey, isScrolling: isScrolling, rowData: rowData, rowIndex: rowIndex }); - - var style = this._cachedColumnStyles[columnIndex]; - - var title = typeof renderedCell === 'string' ? renderedCell : null; - - return _react2.default.createElement( - 'div', - { - key: 'Row' + rowIndex + '-Col' + columnIndex, - className: (0, _classnames2.default)('FlexTable__rowColumn', className), - style: style, - title: title - }, - renderedCell - ); - } - }, { - key: '_createHeader', - value: function _createHeader(_ref5) { - var column = _ref5.column; - var index = _ref5.index; - var _props2 = this.props; - var headerClassName = _props2.headerClassName; - var headerStyle = _props2.headerStyle; - var onHeaderClick = _props2.onHeaderClick; - var sort = _props2.sort; - var sortBy = _props2.sortBy; - var sortDirection = _props2.sortDirection; - var _column$props2 = column.props; - var dataKey = _column$props2.dataKey; - var disableSort = _column$props2.disableSort; - var headerRenderer = _column$props2.headerRenderer; - var label = _column$props2.label; - var columnData = _column$props2.columnData; - - var sortEnabled = !disableSort && sort; - - var classNames = (0, _classnames2.default)('FlexTable__headerColumn', headerClassName, column.props.headerClassName, { - 'FlexTable__sortableHeaderColumn': sortEnabled - }); - var style = this._getFlexStyleForColumn(column, headerStyle); - - var renderedHeader = headerRenderer({ - columnData: columnData, - dataKey: dataKey, - disableSort: disableSort, - label: label, - sortBy: sortBy, - sortDirection: sortDirection - }); - - var a11yProps = {}; - - if (sortEnabled || onHeaderClick) { - (function () { - // If this is a sortable header, clicking it should update the table data's sorting. - var newSortDirection = sortBy !== dataKey || sortDirection === _SortDirection2.default.DESC ? _SortDirection2.default.ASC : _SortDirection2.default.DESC; - - var onClick = function onClick() { - sortEnabled && sort({ - sortBy: dataKey, - sortDirection: newSortDirection - }); - onHeaderClick && onHeaderClick({ columnData: columnData, dataKey: dataKey }); - }; - - var onKeyDown = function onKeyDown(event) { - if (event.key === 'Enter' || event.key === ' ') { - onClick(); - } - }; - - a11yProps['aria-label'] = column.props['aria-label'] || label || dataKey; - a11yProps.role = 'rowheader'; - a11yProps.tabIndex = 0; - a11yProps.onClick = onClick; - a11yProps.onKeyDown = onKeyDown; - })(); - } - - return _react2.default.createElement( - 'div', - _extends({}, a11yProps, { - key: 'Header-Col' + index, - className: classNames, - style: style - }), - renderedHeader - ); - } - }, { - key: '_createRow', - value: function _createRow(_ref6) { - var _this3 = this; - - var index = _ref6.rowIndex; - var isScrolling = _ref6.isScrolling; - var _props3 = this.props; - var children = _props3.children; - var onRowClick = _props3.onRowClick; - var onRowDoubleClick = _props3.onRowDoubleClick; - var onRowMouseOver = _props3.onRowMouseOver; - var onRowMouseOut = _props3.onRowMouseOut; - var rowClassName = _props3.rowClassName; - var rowGetter = _props3.rowGetter; - var rowRenderer = _props3.rowRenderer; - var rowStyle = _props3.rowStyle; - var scrollbarWidth = this.state.scrollbarWidth; - - - var rowClass = rowClassName instanceof Function ? rowClassName({ index: index }) : rowClassName; - var rowStyleObject = rowStyle instanceof Function ? rowStyle({ index: index }) : rowStyle; - var rowData = rowGetter({ index: index }); - - var 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 - }); - }); - - var className = (0, _classnames2.default)('FlexTable__row', rowClass); - var style = _extends({}, rowStyleObject, { - height: this._getRowHeight(index), - paddingRight: scrollbarWidth - }); - - return rowRenderer({ - className: className, - columns: columns, - index: index, - isScrolling: isScrolling, - onRowClick: onRowClick, - onRowDoubleClick: onRowDoubleClick, - onRowMouseOver: onRowMouseOver, - onRowMouseOut: onRowMouseOut, - rowData: rowData, - style: style - }); - } - - /** - * Determines the flex-shrink, flex-grow, and width values for a cell (header or column). - */ - - }, { - key: '_getFlexStyleForColumn', - value: function _getFlexStyleForColumn(column) { - var customStyle = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var flexValue = column.props.flexGrow + ' ' + column.props.flexShrink + ' ' + column.props.width + 'px'; - - var style = _extends({}, customStyle, { - flex: flexValue, - msFlex: flexValue, - WebkitFlex: flexValue - }); - - if (column.props.maxWidth) { - style.maxWidth = column.props.maxWidth; - } - - if (column.props.minWidth) { - style.minWidth = column.props.minWidth; - } - - return style; - } - }, { - key: '_getRenderedHeaderRow', - value: function _getRenderedHeaderRow() { - var _this4 = this; - - var _props4 = this.props; - var children = _props4.children; - var disableHeader = _props4.disableHeader; - - var items = disableHeader ? [] : _react2.default.Children.toArray(children); - - return items.map(function (column, index) { - return _this4._createHeader({ column: column, index: index }); - }); - } - }, { - key: '_getRowHeight', - value: function _getRowHeight(rowIndex) { - var rowHeight = this.props.rowHeight; - - - return rowHeight instanceof Function ? rowHeight({ index: rowIndex }) : rowHeight; - } - }, { - key: '_onScroll', - value: function _onScroll(_ref7) { - var clientHeight = _ref7.clientHeight; - var scrollHeight = _ref7.scrollHeight; - var scrollTop = _ref7.scrollTop; - var onScroll = this.props.onScroll; - - - onScroll({ clientHeight: clientHeight, scrollHeight: scrollHeight, scrollTop: scrollTop }); - } - }, { - key: '_onSectionRendered', - value: function _onSectionRendered(_ref8) { - var rowOverscanStartIndex = _ref8.rowOverscanStartIndex; - var rowOverscanStopIndex = _ref8.rowOverscanStopIndex; - var rowStartIndex = _ref8.rowStartIndex; - var rowStopIndex = _ref8.rowStopIndex; - var onRowsRendered = this.props.onRowsRendered; - - - onRowsRendered({ - overscanStartIndex: rowOverscanStartIndex, - overscanStopIndex: rowOverscanStopIndex, - startIndex: rowStartIndex, - stopIndex: rowStopIndex - }); - } - }, { - key: '_setScrollbarWidth', - value: function _setScrollbarWidth() { - var Grid = (0, _reactDom.findDOMNode)(this.Grid); - var clientWidth = Grid.clientWidth || 0; - var offsetWidth = Grid.offsetWidth || 0; - var scrollbarWidth = offsetWidth - clientWidth; - - this.setState({ scrollbarWidth: scrollbarWidth }); - } - }]); - - return FlexTable; -}(_react.Component); - -FlexTable.propTypes = { - 'aria-label': _react.PropTypes.string, - - /** - * Removes fixed height from the scrollingContainer so that the total height - * of rows can stretch the window. Intended for use with WindowScroller - */ - autoHeight: _react.PropTypes.bool, - - /** One or more FlexColumns describing the data displayed in this row */ - children: function children(props, propName, componentName) { - var children = _react2.default.Children.toArray(props.children); - for (var i = 0; i < children.length; i++) { - if (children[i].type !== _FlexColumn2.default) { - return new Error('FlexTable only accepts children of type FlexColumn'); - } - } - }, - - /** Optional CSS class name */ - className: _react.PropTypes.string, - - /** Disable rendering the header at all */ - disableHeader: _react.PropTypes.bool, - - /** - * Used to estimate the total height of a FlexTable before all of its rows have actually been measured. - * The estimated total height is adjusted as rows are rendered. - */ - estimatedRowSize: _react.PropTypes.number.isRequired, - - /** Optional custom CSS class name to attach to inner Grid element. */ - gridClassName: _react.PropTypes.string, - - /** Optional inline style to attach to inner Grid element. */ - gridStyle: _react.PropTypes.object, - - /** Optional CSS class to apply to all column headers */ - headerClassName: _react.PropTypes.string, - - /** Fixed height of header row */ - headerHeight: _react.PropTypes.number.isRequired, - - /** Fixed/available height for out DOM element */ - height: _react.PropTypes.number.isRequired, - - /** Optional renderer to be used in place of table body rows when rowCount is 0 */ - noRowsRenderer: _react.PropTypes.func, - - /** - * Optional callback when a column's header is clicked. - * ({ columnData: any, dataKey: string }): void - */ - onHeaderClick: _react.PropTypes.func, - - /** Optional custom inline style to attach to table header columns. */ - headerStyle: _react.PropTypes.object, - - /** - * Callback invoked when a user clicks on a table row. - * ({ index: number }): void - */ - onRowClick: _react.PropTypes.func, - - /** - * Callback invoked when a user double-clicks on a table row. - * ({ index: number }): void - */ - onRowDoubleClick: _react.PropTypes.func, - - /** - * Callback invoked when the mouse leaves a table row. - * ({ index: number }): void - */ - onRowMouseOut: _react.PropTypes.func, - - /** - * Callback invoked when a user moves the mouse over a table row. - * ({ index: number }): void - */ - onRowMouseOver: _react.PropTypes.func, - - /** - * Callback invoked with information about the slice of rows that were just rendered. - * ({ startIndex, stopIndex }): void - */ - onRowsRendered: _react.PropTypes.func, - - /** - * Callback invoked whenever the scroll offset changes within the inner scrollable region. - * This callback can be used to sync scrolling between lists, tables, or grids. - * ({ clientHeight, scrollHeight, scrollTop }): void - */ - onScroll: _react.PropTypes.func.isRequired, - - /** - * Number of rows to render above/below the visible bounds of the list. - * These rows can help for smoother scrolling on touch devices. - */ - overscanRowCount: _react.PropTypes.number.isRequired, - - /** - * Optional CSS class to apply to all table rows (including the header row). - * This property can be a CSS class name (string) or a function that returns a class name. - * If a function is provided its signature should be: ({ index: number }): string - */ - rowClassName: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.func]), - - /** - * Callback responsible for returning a data row given an index. - * ({ index: number }): any - */ - rowGetter: _react.PropTypes.func.isRequired, - - /** - * Either a fixed row height (number) or a function that returns the height of a row given its index. - * ({ index: number }): number - */ - rowHeight: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.func]).isRequired, - - /** Number of rows in table. */ - rowCount: _react.PropTypes.number.isRequired, - - /** - * Responsible for rendering a table row given an array of columns: - * Should implement the following interface: ({ - * className: string, - * columns: Array, - * index: number, - * isScrolling: boolean, - * onRowClick: ?Function, - * onRowDoubleClick: ?Function, - * onRowMouseOver: ?Function, - * onRowMouseOut: ?Function, - * rowData: any, - * style: any - * }): PropTypes.node - */ - rowRenderer: _react.PropTypes.func, - - /** Optional custom inline style to attach to table rows. */ - rowStyle: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.func]).isRequired, - - /** Optional custom CSS class for individual rows */ - rowWrapperClassName: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.func]), - - /** Optional custom CSS class for individual rows */ - rowWrapperStyle: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.func]), - - /** See Grid#scrollToAlignment */ - scrollToAlignment: _react.PropTypes.oneOf(['auto', 'end', 'start', 'center']).isRequired, - - /** Row index to ensure visible (by forcefully scrolling if necessary) */ - scrollToIndex: _react.PropTypes.number, - - /** Vertical offset. */ - scrollTop: _react.PropTypes.number, - - /** - * Sort function to be called if a sortable header is clicked. - * ({ sortBy: string, sortDirection: SortDirection }): void - */ - sort: _react.PropTypes.func, - - /** FlexTable data is currently sorted by this :dataKey (if it is sorted at all) */ - sortBy: _react.PropTypes.string, - - /** FlexTable data is currently sorted in this direction (if it is sorted at all) */ - sortDirection: _react.PropTypes.oneOf([_SortDirection2.default.ASC, _SortDirection2.default.DESC]), - - /** Optional inline style */ - style: _react.PropTypes.object, - - /** Tab index for focus */ - tabIndex: _react.PropTypes.number, - - /** Width of list */ - width: _react.PropTypes.number.isRequired -}; -FlexTable.defaultProps = { - disableHeader: false, - estimatedRowSize: 30, - headerHeight: 0, - headerStyle: {}, - noRowsRenderer: function noRowsRenderer() { - return null; - }, - onRowsRendered: function onRowsRendered() { - return null; - }, - onScroll: function onScroll() { - return null; - }, - overscanRowCount: 10, - rowRenderer: _defaultRowRenderer2.default, - rowStyle: {}, - scrollToAlignment: 'auto', - style: {} -}; -exports.default = FlexTable; -},{"../Grid":60,"./FlexColumn":49,"./SortDirection":51,"./defaultRowRenderer":56,"classnames":undefined,"react":undefined,"react-addons-shallow-compare":18,"react-dom":undefined}],51:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var SortDirection = { - /** - * Sort items in ascending order. - * This means arranging from the lowest value to the highest (e.g. a-z, 0-9). - */ - ASC: 'ASC', - - /** - * Sort items in descending order. - * This means arranging from the highest value to the lowest (e.g. z-a, 9-0). - */ - DESC: 'DESC' -}; - -exports.default = SortDirection; -},{}],52:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = SortIndicator; - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _classnames = require('classnames'); - -var _classnames2 = _interopRequireDefault(_classnames); - -var _SortDirection = require('./SortDirection'); - -var _SortDirection2 = _interopRequireDefault(_SortDirection); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Displayed beside a header to indicate that a FlexTable is currently sorted by this column. - */ -function SortIndicator(_ref) { - var sortDirection = _ref.sortDirection; - - var classNames = (0, _classnames2.default)('FlexTable__sortableHeaderIcon', { - 'FlexTable__sortableHeaderIcon--ASC': sortDirection === _SortDirection2.default.ASC, - 'FlexTable__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' }) - ); -} -SortIndicator.propTypes = { - sortDirection: _react.PropTypes.oneOf([_SortDirection2.default.ASC, _SortDirection2.default.DESC]) -}; -},{"./SortDirection":51,"classnames":undefined,"react":undefined}],53:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = defaultCellDataGetter; - - -/** - * Default accessor for returning a cell value for a given attribute. - * This function expects to operate on either a vanilla Object or an Immutable Map. - * You should override the column's cellDataGetter if your data is some other type of object. - */ -function defaultCellDataGetter(_ref) { - var columnData = _ref.columnData; - var dataKey = _ref.dataKey; - var rowData = _ref.rowData; - - if (rowData.get instanceof Function) { - return rowData.get(dataKey); - } else { - return rowData[dataKey]; - } -} -},{}],54:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = defaultCellRenderer; - - -/** - * Default cell renderer that displays an attribute as a simple string - * You should override the column's cellRenderer if your data is some other type of object. - */ -function defaultCellRenderer(_ref) { - var cellData = _ref.cellData; - var cellDataKey = _ref.cellDataKey; - var columnData = _ref.columnData; - var rowData = _ref.rowData; - var rowIndex = _ref.rowIndex; - - if (cellData == null) { - return ''; - } else { - return String(cellData); - } -} -},{}],55:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = defaultHeaderRenderer; - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _SortIndicator = require('./SortIndicator'); - -var _SortIndicator2 = _interopRequireDefault(_SortIndicator); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Default table header renderer. - */ -function defaultHeaderRenderer(_ref) { - var columnData = _ref.columnData; - var dataKey = _ref.dataKey; - var disableSort = _ref.disableSort; - var label = _ref.label; - var sortBy = _ref.sortBy; - var sortDirection = _ref.sortDirection; - - var showSortIndicator = sortBy === dataKey; - var children = [_react2.default.createElement( - 'span', - { - className: 'FlexTable__headerTruncatedText', - key: 'label', - title: label - }, - label - )]; - - if (showSortIndicator) { - children.push(_react2.default.createElement(_SortIndicator2.default, { - key: 'SortIndicator', - sortDirection: sortDirection - })); - } - - return children; -} -},{"./SortIndicator":52,"react":undefined}],56:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -exports.default = defaultRowRenderer; - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Default row renderer for FlexTable. - */ -function defaultRowRenderer(_ref) { - var className = _ref.className; - var columns = _ref.columns; - var index = _ref.index; - var isScrolling = _ref.isScrolling; - var onRowClick = _ref.onRowClick; - var onRowDoubleClick = _ref.onRowDoubleClick; - var onRowMouseOver = _ref.onRowMouseOver; - var onRowMouseOut = _ref.onRowMouseOut; - var rowData = _ref.rowData; - var style = _ref.style; - - var a11yProps = {}; - - if (onRowClick || onRowDoubleClick || onRowMouseOver || onRowMouseOut) { - a11yProps['aria-label'] = 'row'; - a11yProps.role = 'row'; - a11yProps.tabIndex = 0; - - if (onRowClick) { - a11yProps.onClick = function () { - return onRowClick({ index: index }); - }; - } - if (onRowDoubleClick) { - a11yProps.onDoubleClick = function () { - return onRowDoubleClick({ index: index }); - }; - } - if (onRowMouseOut) { - a11yProps.onMouseOut = function () { - return onRowMouseOut({ index: index }); - }; - } - if (onRowMouseOver) { - a11yProps.onMouseOver = function () { - return onRowMouseOver({ index: index }); - }; - } - } - - return _react2.default.createElement( - 'div', - _extends({}, a11yProps, { - className: className, - style: style - }), - columns - ); -} -},{"react":undefined}],57:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.SortIndicator = exports.SortDirection = exports.FlexColumn = exports.FlexTable = exports.defaultRowRenderer = exports.defaultHeaderRenderer = exports.defaultCellRenderer = exports.defaultCellDataGetter = exports.default = undefined; - -var _FlexTable2 = require('./FlexTable'); - -var _FlexTable3 = _interopRequireDefault(_FlexTable2); - -var _defaultCellDataGetter2 = require('./defaultCellDataGetter'); - -var _defaultCellDataGetter3 = _interopRequireDefault(_defaultCellDataGetter2); - -var _defaultCellRenderer2 = require('./defaultCellRenderer'); - -var _defaultCellRenderer3 = _interopRequireDefault(_defaultCellRenderer2); - -var _defaultHeaderRenderer2 = require('./defaultHeaderRenderer'); - -var _defaultHeaderRenderer3 = _interopRequireDefault(_defaultHeaderRenderer2); - -var _defaultRowRenderer2 = require('./defaultRowRenderer'); - -var _defaultRowRenderer3 = _interopRequireDefault(_defaultRowRenderer2); - -var _FlexColumn2 = require('./FlexColumn'); - -var _FlexColumn3 = _interopRequireDefault(_FlexColumn2); - -var _SortDirection2 = require('./SortDirection'); - -var _SortDirection3 = _interopRequireDefault(_SortDirection2); - -var _SortIndicator2 = require('./SortIndicator'); - -var _SortIndicator3 = _interopRequireDefault(_SortIndicator2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _FlexTable3.default; -exports.defaultCellDataGetter = _defaultCellDataGetter3.default; -exports.defaultCellRenderer = _defaultCellRenderer3.default; -exports.defaultHeaderRenderer = _defaultHeaderRenderer3.default; -exports.defaultRowRenderer = _defaultRowRenderer3.default; -exports.FlexTable = _FlexTable3.default; -exports.FlexColumn = _FlexColumn3.default; -exports.SortDirection = _SortDirection3.default; -exports.SortIndicator = _SortIndicator3.default; -},{"./FlexColumn":49,"./FlexTable":50,"./SortDirection":51,"./SortIndicator":52,"./defaultCellDataGetter":53,"./defaultCellRenderer":54,"./defaultHeaderRenderer":55,"./defaultRowRenderer":56}],58:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.DEFAULT_SCROLLING_RESET_TIME_INTERVAL = undefined; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _classnames = require('classnames'); - -var _classnames2 = _interopRequireDefault(_classnames); - -var _calculateSizeAndPositionDataAndUpdateScrollOffset = require('./utils/calculateSizeAndPositionDataAndUpdateScrollOffset'); - -var _calculateSizeAndPositionDataAndUpdateScrollOffset2 = _interopRequireDefault(_calculateSizeAndPositionDataAndUpdateScrollOffset); - -var _ScalingCellSizeAndPositionManager = require('./utils/ScalingCellSizeAndPositionManager'); - -var _ScalingCellSizeAndPositionManager2 = _interopRequireDefault(_ScalingCellSizeAndPositionManager); - -var _createCallbackMemoizer = require('../utils/createCallbackMemoizer'); - -var _createCallbackMemoizer2 = _interopRequireDefault(_createCallbackMemoizer); - -var _getOverscanIndices = require('./utils/getOverscanIndices'); - -var _getOverscanIndices2 = _interopRequireDefault(_getOverscanIndices); - -var _scrollbarSize = require('dom-helpers/util/scrollbarSize'); - -var _scrollbarSize2 = _interopRequireDefault(_scrollbarSize); - -var _raf = require('raf'); - -var _raf2 = _interopRequireDefault(_raf); - -var _reactAddonsShallowCompare = require('react-addons-shallow-compare'); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -var _updateScrollIndexHelper = require('./utils/updateScrollIndexHelper'); - -var _updateScrollIndexHelper2 = _interopRequireDefault(_updateScrollIndexHelper); - -var _defaultCellRangeRenderer = require('./defaultCellRangeRenderer'); - -var _defaultCellRangeRenderer2 = _interopRequireDefault(_defaultCellRangeRenderer); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -/** - * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress. - * This improves performance and makes scrolling smoother. - */ -var DEFAULT_SCROLLING_RESET_TIME_INTERVAL = exports.DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150; - -/** - * Controls whether the Grid updates the DOM element's scrollLeft/scrollTop based on the current state or just observes it. - * This prevents Grid from interrupting mouse-wheel animations (see issue #2). - */ -var SCROLL_POSITION_CHANGE_REASONS = { - OBSERVED: 'observed', - REQUESTED: 'requested' -}; - -/** - * Renders tabular data with virtualization along the vertical and horizontal axes. - * Row heights and column widths must be known ahead of time and specified as properties. - */ - -var Grid = function (_Component) { - _inherits(Grid, _Component); - - function Grid(props, context) { - _classCallCheck(this, Grid); - - var _this = _possibleConstructorReturn(this, (Grid.__proto__ || Object.getPrototypeOf(Grid)).call(this, props, context)); - - _this.state = { - isScrolling: false, - scrollDirectionHorizontal: _getOverscanIndices.SCROLL_DIRECTION_FIXED, - scrollDirectionVertical: _getOverscanIndices.SCROLL_DIRECTION_FIXED, - scrollLeft: 0, - scrollTop: 0 - }; - - // Invokes onSectionRendered callback only when start/stop row or column indices change - _this._onGridRenderedMemoizer = (0, _createCallbackMemoizer2.default)(); - _this._onScrollMemoizer = (0, _createCallbackMemoizer2.default)(false); - - // Bind functions to instance so they don't lose context when passed around - _this._enablePointerEventsAfterDelayCallback = _this._enablePointerEventsAfterDelayCallback.bind(_this); - _this._invokeOnGridRenderedHelper = _this._invokeOnGridRenderedHelper.bind(_this); - _this._onScroll = _this._onScroll.bind(_this); - _this._setNextStateCallback = _this._setNextStateCallback.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 cellSizeGetter(index) { - return _this._columnWidthGetter(index); - }, - estimatedCellSize: _this._getEstimatedColumnSize(props) - }); - _this._rowSizeAndPositionManager = new _ScalingCellSizeAndPositionManager2.default({ - cellCount: props.rowCount, - cellSizeGetter: function cellSizeGetter(index) { - return _this._rowHeightGetter(index); - }, - estimatedCellSize: _this._getEstimatedRowSize(props) - }); - - // See defaultCellRangeRenderer() for more information on the usage of this cache - _this._cellCache = {}; - return _this; - } - - /** - * Pre-measure all columns and rows in a Grid. - * Typically cells are only measured as needed and estimated sizes are used for cells that have not yet been measured. - * This method ensures that the next call to getTotalSize() returns an exact size (as opposed to just an estimated one). - */ - - - _createClass(Grid, [{ - key: 'measureAllCells', - value: function measureAllCells() { - var _props = this.props; - var columnCount = _props.columnCount; - var rowCount = _props.rowCount; - - - this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnCount - 1); - this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowCount - 1); - } - - /** - * Forced recompute of row heights and column widths. - * This function should be called if dynamic column or row sizes have changed but nothing else has. - * Since Grid only receives :columnCount and :rowCount it has no way of detecting when the underlying data changes. - */ - - }, { - key: 'recomputeGridSize', - value: function recomputeGridSize() { - var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - var _ref$columnIndex = _ref.columnIndex; - var columnIndex = _ref$columnIndex === undefined ? 0 : _ref$columnIndex; - var _ref$rowIndex = _ref.rowIndex; - var rowIndex = _ref$rowIndex === undefined ? 0 : _ref$rowIndex; - - this._columnSizeAndPositionManager.resetCell(columnIndex); - this._rowSizeAndPositionManager.resetCell(rowIndex); - - // Clear cell cache in case we are scrolling; - // Invalid row heights likely mean invalid cached content as well. - this._cellCache = {}; - - this.forceUpdate(); - } - }, { - key: 'componentDidMount', - value: function componentDidMount() { - var _props2 = this.props; - var scrollLeft = _props2.scrollLeft; - var scrollToColumn = _props2.scrollToColumn; - var scrollTop = _props2.scrollTop; - var scrollToRow = _props2.scrollToRow; - - // If this component was first rendered server-side, scrollbar size will be undefined. - // In that event we need to remeasure. - - if (!this._scrollbarSizeMeasured) { - this._scrollbarSize = (0, _scrollbarSize2.default)(); - this._scrollbarSizeMeasured = true; - this.setState({}); - } - - if (scrollLeft >= 0 || scrollTop >= 0) { - this._setScrollPosition({ scrollLeft: scrollLeft, scrollTop: scrollTop }); - } - - if (scrollToColumn >= 0 || scrollToRow >= 0) { - this._updateScrollLeftForScrollToColumn(); - this._updateScrollTopForScrollToRow(); - } - - // Update onRowsRendered callback - this._invokeOnGridRenderedHelper(); - - // Initialize onScroll callback - this._invokeOnScrollMemoizer({ - scrollLeft: scrollLeft || 0, - scrollTop: scrollTop || 0, - totalColumnsWidth: this._columnSizeAndPositionManager.getTotalSize(), - totalRowsHeight: this._rowSizeAndPositionManager.getTotalSize() - }); - } - - /** - * @private - * This method updates scrollLeft/scrollTop in state for the following conditions: - * 1) New scroll-to-cell props have been set - */ - - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate(prevProps, prevState) { - var _this2 = this; - - var _props3 = this.props; - var autoHeight = _props3.autoHeight; - var columnCount = _props3.columnCount; - var height = _props3.height; - var rowCount = _props3.rowCount; - var scrollToAlignment = _props3.scrollToAlignment; - var scrollToColumn = _props3.scrollToColumn; - var scrollToRow = _props3.scrollToRow; - var width = _props3.width; - var _state = this.state; - var scrollLeft = _state.scrollLeft; - var scrollPositionChangeReason = _state.scrollPositionChangeReason; - var scrollTop = _state.scrollTop; - - // Handle edge case where column or row count has only just increased over 0. - // In this case we may have to restore a previously-specified scroll offset. - // For more info see bvaughn/react-virtualized/issues/218 - - var columnOrRowCountJustIncreasedFromZero = columnCount > 0 && prevProps.columnCount === 0 || rowCount > 0 && prevProps.rowCount === 0; - - // Make sure requested changes to :scrollLeft or :scrollTop get applied. - // Assigning to scrollLeft/scrollTop tells the browser to interrupt any running scroll animations, - // And to discard any pending async changes to the scroll position that may have happened in the meantime (e.g. on a separate scrolling thread). - // So we only set these when we require an adjustment of the scroll position. - // See issue #2 for more information. - if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED) { - if (scrollLeft >= 0 && (scrollLeft !== prevState.scrollLeft && scrollLeft !== this._scrollingContainer.scrollLeft || columnOrRowCountJustIncreasedFromZero)) { - this._scrollingContainer.scrollLeft = scrollLeft; - } - - // @TRICKY :autoHeight property instructs Grid to leave :scrollTop management to an external HOC (eg WindowScroller). - // In this case we should avoid checking scrollingContainer.scrollTop since it forces layout/flow. - if (!autoHeight && scrollTop >= 0 && (scrollTop !== prevState.scrollTop && scrollTop !== this._scrollingContainer.scrollTop || columnOrRowCountJustIncreasedFromZero)) { - this._scrollingContainer.scrollTop = scrollTop; - } - } - - // Update scroll offsets if the current :scrollToColumn or :scrollToRow values requires it - // @TODO Do we also need this check or can the one in componentWillUpdate() suffice? - (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 updateScrollIndexCallback(scrollToColumn) { - return _this2._updateScrollLeftForScrollToColumn(_extends({}, _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 updateScrollIndexCallback(scrollToRow) { - return _this2._updateScrollTopForScrollToRow(_extends({}, _this2.props, { scrollToRow: scrollToRow })); - } - }); - - // Update onRowsRendered callback if start/stop indices have changed - this._invokeOnGridRenderedHelper(); - } - }, { - key: 'componentWillMount', - value: function componentWillMount() { - // If this component is being rendered server-side, getScrollbarSize() will return undefined. - // We handle this case in componentDidMount() - this._scrollbarSize = (0, _scrollbarSize2.default)(); - if (this._scrollbarSize === undefined) { - this._scrollbarSizeMeasured = false; - this._scrollbarSize = 0; - } else { - this._scrollbarSizeMeasured = true; - } - - this._calculateChildrenToRender(); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - if (this._disablePointerEventsTimeoutId) { - clearTimeout(this._disablePointerEventsTimeoutId); - } - - if (this._setNextStateAnimationFrameId) { - _raf2.default.cancel(this._setNextStateAnimationFrameId); - } - } - - /** - * @private - * This method updates scrollLeft/scrollTop in state for the following conditions: - * 1) Empty content (0 rows or columns) - * 2) New scroll props overriding the current state - * 3) Cells-count or cells-size has changed, making previous scroll offsets invalid - */ - - }, { - key: 'componentWillUpdate', - value: function componentWillUpdate(nextProps, nextState) { - var _this3 = this; - - if (nextProps.columnCount === 0 && nextState.scrollLeft !== 0 || nextProps.rowCount === 0 && nextState.scrollTop !== 0) { - this._setScrollPosition({ - scrollLeft: 0, - scrollTop: 0 - }); - } else if (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) - }); - - // Update scroll offsets if the size or number of cells have changed, invalidating the previous value - (0, _calculateSizeAndPositionDataAndUpdateScrollOffset2.default)({ - cellCount: this.props.columnCount, - cellSize: this.props.columnWidth, - computeMetadataCallback: function computeMetadataCallback() { - return _this3._columnSizeAndPositionManager.resetCell(0); - }, - computeMetadataCallbackProps: nextProps, - nextCellsCount: nextProps.columnCount, - nextCellSize: nextProps.columnWidth, - nextScrollToIndex: nextProps.scrollToColumn, - scrollToIndex: this.props.scrollToColumn, - updateScrollOffsetForScrollToIndex: function updateScrollOffsetForScrollToIndex() { - return _this3._updateScrollLeftForScrollToColumn(nextProps, nextState); - } - }); - (0, _calculateSizeAndPositionDataAndUpdateScrollOffset2.default)({ - cellCount: this.props.rowCount, - cellSize: this.props.rowHeight, - computeMetadataCallback: function computeMetadataCallback() { - return _this3._rowSizeAndPositionManager.resetCell(0); - }, - computeMetadataCallbackProps: nextProps, - nextCellsCount: nextProps.rowCount, - nextCellSize: nextProps.rowHeight, - nextScrollToIndex: nextProps.scrollToRow, - scrollToIndex: this.props.scrollToRow, - updateScrollOffsetForScrollToIndex: function updateScrollOffsetForScrollToIndex() { - return _this3._updateScrollTopForScrollToRow(nextProps, nextState); - } - }); - - this._calculateChildrenToRender(nextProps, nextState); - } - }, { - key: 'render', - value: function render() { - var _this4 = this; - - var _props4 = this.props; - var autoContainerWidth = _props4.autoContainerWidth; - var autoHeight = _props4.autoHeight; - var className = _props4.className; - var height = _props4.height; - var noContentRenderer = _props4.noContentRenderer; - var style = _props4.style; - var tabIndex = _props4.tabIndex; - var width = _props4.width; - var isScrolling = this.state.isScrolling; - - - var gridStyle = { - height: autoHeight ? 'auto' : height, - width: width - }; - - var totalColumnsWidth = this._columnSizeAndPositionManager.getTotalSize(); - var totalRowsHeight = this._rowSizeAndPositionManager.getTotalSize(); - - // Force browser to hide scrollbars when we know they aren't necessary. - // Otherwise once scrollbars appear they may not disappear again. - // For more info see issue #116 - var verticalScrollBarSize = totalRowsHeight > height ? this._scrollbarSize : 0; - var horizontalScrollBarSize = totalColumnsWidth > width ? this._scrollbarSize : 0; - - // Also explicitly init styles to 'auto' if scrollbars are required. - // This works around an obscure edge case where external CSS styles have not yet been loaded, - // But an initial scroll index of offset is set as an external prop. - // Without this style, Grid would render the correct range of cells but would NOT update its internal offset. - // This was originally reported via clauderic/react-infinite-calendar/issues/23 - gridStyle.overflowX = totalColumnsWidth + verticalScrollBarSize <= width ? 'hidden' : 'auto'; - gridStyle.overflowY = totalRowsHeight + horizontalScrollBarSize <= height ? 'hidden' : 'auto'; - - var childrenToDisplay = this._childrenToDisplay; - - var showNoContentRenderer = childrenToDisplay.length === 0 && height > 0 && width > 0; - - return _react2.default.createElement( - 'div', - { - ref: function ref(_ref2) { - _this4._scrollingContainer = _ref2; - }, - 'aria-label': this.props['aria-label'], - className: (0, _classnames2.default)('Grid', className), - onScroll: this._onScroll, - role: 'grid', - style: _extends({}, gridStyle, style), - tabIndex: tabIndex - }, - childrenToDisplay.length > 0 && _react2.default.createElement( - 'div', - { - className: 'Grid__innerScrollContainer', - style: { - width: autoContainerWidth ? 'auto' : totalColumnsWidth, - height: totalRowsHeight, - maxWidth: totalColumnsWidth, - maxHeight: totalRowsHeight, - pointerEvents: isScrolling ? 'none' : '' - } - }, - childrenToDisplay - ), - showNoContentRenderer && noContentRenderer() - ); - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); - } - - /* ---------------------------- Helper methods ---------------------------- */ - - }, { - key: '_calculateChildrenToRender', - value: function _calculateChildrenToRender() { - var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0]; - var state = arguments.length <= 1 || arguments[1] === undefined ? this.state : arguments[1]; - var cellClassName = props.cellClassName; - var cellRenderer = props.cellRenderer; - var cellRangeRenderer = props.cellRangeRenderer; - var cellStyle = props.cellStyle; - var columnCount = props.columnCount; - var height = props.height; - var overscanColumnCount = props.overscanColumnCount; - var overscanRowCount = props.overscanRowCount; - var rowCount = props.rowCount; - var width = props.width; - var isScrolling = state.isScrolling; - var scrollDirectionHorizontal = state.scrollDirectionHorizontal; - var scrollDirectionVertical = state.scrollDirectionVertical; - var scrollLeft = state.scrollLeft; - var scrollTop = state.scrollTop; - - - this._childrenToDisplay = []; - - // Render only enough columns and rows to cover the visible area of the grid. - if (height > 0 && width > 0) { - var visibleColumnIndices = this._columnSizeAndPositionManager.getVisibleCellRange({ - containerSize: width, - offset: scrollLeft - }); - var visibleRowIndices = this._rowSizeAndPositionManager.getVisibleCellRange({ - containerSize: height, - offset: scrollTop - }); - - var horizontalOffsetAdjustment = this._columnSizeAndPositionManager.getOffsetAdjustment({ - containerSize: width, - offset: scrollLeft - }); - var verticalOffsetAdjustment = this._rowSizeAndPositionManager.getOffsetAdjustment({ - containerSize: height, - offset: scrollTop - }); - - // Store for _invokeOnGridRenderedHelper() - 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 - }); - - var overscanRowIndices = (0, _getOverscanIndices2.default)({ - cellCount: rowCount, - overscanCellsCount: overscanRowCount, - scrollDirection: scrollDirectionVertical, - startIndex: this._renderedRowStartIndex, - stopIndex: this._renderedRowStopIndex - }); - - // Store for _invokeOnGridRenderedHelper() - this._columnStartIndex = overscanColumnIndices.overscanStartIndex; - this._columnStopIndex = overscanColumnIndices.overscanStopIndex; - this._rowStartIndex = overscanRowIndices.overscanStartIndex; - this._rowStopIndex = overscanRowIndices.overscanStopIndex; - - this._childrenToDisplay = cellRangeRenderer({ - cellCache: this._cellCache, - cellClassName: this._wrapCellClassNameGetter(cellClassName), - cellRenderer: cellRenderer, - cellStyle: this._wrapCellStyleGetter(cellStyle), - 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 - }); - } - } - - /** - * Sets an :isScrolling flag for a small window of time. - * This flag is used to disable pointer events on the scrollable portion of the Grid. - * This prevents jerky/stuttery mouse-wheel scrolling. - */ - - }, { - key: '_enablePointerEventsAfterDelay', - value: function _enablePointerEventsAfterDelay() { - var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval; - - - if (this._disablePointerEventsTimeoutId) { - clearTimeout(this._disablePointerEventsTimeoutId); - } - - this._disablePointerEventsTimeoutId = setTimeout(this._enablePointerEventsAfterDelayCallback, scrollingResetTimeInterval); - } - }, { - key: '_enablePointerEventsAfterDelayCallback', - value: function _enablePointerEventsAfterDelayCallback() { - this._disablePointerEventsTimeoutId = null; - - // Throw away cell cache once scrolling is complete - this._cellCache = {}; - - this.setState({ - isScrolling: false, - scrollDirectionHorizontal: _getOverscanIndices.SCROLL_DIRECTION_FIXED, - scrollDirectionVertical: _getOverscanIndices.SCROLL_DIRECTION_FIXED - }); - } - }, { - key: '_getEstimatedColumnSize', - value: function _getEstimatedColumnSize(props) { - return typeof props.columnWidth === 'number' ? props.columnWidth : props.estimatedColumnSize; - } - }, { - key: '_getEstimatedRowSize', - value: function _getEstimatedRowSize(props) { - return typeof props.rowHeight === 'number' ? props.rowHeight : props.estimatedRowSize; - } - }, { - key: '_invokeOnGridRenderedHelper', - value: function _invokeOnGridRenderedHelper() { - 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 _invokeOnScrollMemoizer(_ref3) { - var _this5 = this; - - var scrollLeft = _ref3.scrollLeft; - var scrollTop = _ref3.scrollTop; - var totalColumnsWidth = _ref3.totalColumnsWidth; - var totalRowsHeight = _ref3.totalRowsHeight; - - this._onScrollMemoizer({ - callback: function callback(_ref4) { - var scrollLeft = _ref4.scrollLeft; - var scrollTop = _ref4.scrollTop; - var _props5 = _this5.props; - var height = _props5.height; - var onScroll = _props5.onScroll; - var width = _props5.width; - - - onScroll({ - clientHeight: height, - clientWidth: width, - scrollHeight: totalRowsHeight, - scrollLeft: scrollLeft, - scrollTop: scrollTop, - scrollWidth: totalColumnsWidth - }); - }, - indices: { - scrollLeft: scrollLeft, - scrollTop: scrollTop - } - }); - } - - /** - * Updates the state during the next animation frame. - * Use this method to avoid multiple renders in a small span of time. - * This helps performance for bursty events (like onScroll). - */ - - }, { - key: '_setNextState', - value: function _setNextState(state) { - this._nextState = state; - - if (!this._setNextStateAnimationFrameId) { - this._setNextStateAnimationFrameId = (0, _raf2.default)(this._setNextStateCallback); - } - } - }, { - key: '_setNextStateCallback', - value: function _setNextStateCallback() { - var state = this._nextState; - - this._setNextStateAnimationFrameId = null; - this._nextState = null; - - this.setState(state); - } - }, { - key: '_setScrollPosition', - value: function _setScrollPosition(_ref5) { - var scrollLeft = _ref5.scrollLeft; - var scrollTop = _ref5.scrollTop; - - var newState = { - scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED - }; - - if (scrollLeft >= 0) { - newState.scrollLeft = scrollLeft; - } - - if (scrollTop >= 0) { - newState.scrollTop = scrollTop; - } - - if (scrollLeft >= 0 && scrollLeft !== this.state.scrollLeft || scrollTop >= 0 && scrollTop !== this.state.scrollTop) { - this.setState(newState); - } - } - }, { - key: '_wrapCellClassNameGetter', - value: function _wrapCellClassNameGetter(className) { - return this._wrapPropertyGetter(className); - } - }, { - key: '_wrapCellStyleGetter', - value: function _wrapCellStyleGetter(style) { - return this._wrapPropertyGetter(style); - } - }, { - key: '_wrapPropertyGetter', - value: function _wrapPropertyGetter(value) { - return value instanceof Function ? value : function () { - return value; - }; - } - }, { - key: '_wrapSizeGetter', - value: function _wrapSizeGetter(size) { - return this._wrapPropertyGetter(size); - } - }, { - key: '_updateScrollLeftForScrollToColumn', - value: function _updateScrollLeftForScrollToColumn() { - var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0]; - var state = arguments.length <= 1 || arguments[1] === undefined ? this.state : arguments[1]; - var columnCount = props.columnCount; - var scrollToAlignment = props.scrollToAlignment; - var scrollToColumn = props.scrollToColumn; - var width = props.width; - var scrollLeft = state.scrollLeft; - - - if (scrollToColumn >= 0 && columnCount > 0) { - var targetIndex = Math.max(0, Math.min(columnCount - 1, scrollToColumn)); - - var calculatedScrollLeft = this._columnSizeAndPositionManager.getUpdatedOffsetForIndex({ - align: scrollToAlignment, - containerSize: width, - currentOffset: scrollLeft, - targetIndex: targetIndex - }); - - if (scrollLeft !== calculatedScrollLeft) { - this._setScrollPosition({ - scrollLeft: calculatedScrollLeft - }); - } - } - } - }, { - key: '_updateScrollTopForScrollToRow', - value: function _updateScrollTopForScrollToRow() { - var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0]; - var state = arguments.length <= 1 || arguments[1] === undefined ? this.state : arguments[1]; - var height = props.height; - var rowCount = props.rowCount; - var scrollToAlignment = props.scrollToAlignment; - var scrollToRow = props.scrollToRow; - var scrollTop = state.scrollTop; - - - if (scrollToRow >= 0 && rowCount > 0) { - var targetIndex = Math.max(0, Math.min(rowCount - 1, scrollToRow)); - - var calculatedScrollTop = this._rowSizeAndPositionManager.getUpdatedOffsetForIndex({ - align: scrollToAlignment, - containerSize: height, - currentOffset: scrollTop, - targetIndex: targetIndex - }); - - if (scrollTop !== calculatedScrollTop) { - this._setScrollPosition({ - scrollTop: calculatedScrollTop - }); - } - } - } - }, { - key: '_onScroll', - value: function _onScroll(event) { - // In certain edge-cases React dispatches an onScroll event with an invalid target.scrollLeft / target.scrollTop. - // This invalid event can be detected by comparing event.target to this component's scrollable DOM element. - // See issue #404 for more information. - if (event.target !== this._scrollingContainer) { - return; - } - - // Prevent pointer events from interrupting a smooth scroll - this._enablePointerEventsAfterDelay(); - - // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events, - // Gradually converging on a scrollTop that is within the bounds of the new, smaller height. - // This causes a series of rapid renders that is slow for long lists. - // We can avoid that by doing some simple bounds checking to ensure that scrollTop never exceeds the total height. - var _props6 = this.props; - var height = _props6.height; - var width = _props6.width; - - var scrollbarSize = this._scrollbarSize; - var totalRowsHeight = this._rowSizeAndPositionManager.getTotalSize(); - var totalColumnsWidth = this._columnSizeAndPositionManager.getTotalSize(); - var scrollLeft = Math.min(Math.max(0, totalColumnsWidth - width + scrollbarSize), event.target.scrollLeft); - var scrollTop = Math.min(Math.max(0, totalRowsHeight - height + scrollbarSize), event.target.scrollTop); - - // Certain devices (like Apple touchpad) rapid-fire duplicate events. - // Don't force a re-render if this is the case. - // The mouse may move faster then the animation frame does. - // Use requestAnimationFrame to avoid over-updating. - if (this.state.scrollLeft !== scrollLeft || this.state.scrollTop !== scrollTop) { - // Browsers with cancelable scroll events (eg. Firefox) interrupt scrolling animations if scrollTop/scrollLeft is set. - // Other browsers (eg. Safari) don't scroll as well without the help under certain conditions (DOM or style changes during scrolling). - // All things considered, this seems to be the best current work around that I'm aware of. - // For more information see https://github.com/bvaughn/react-virtualized/pull/124 - var scrollPositionChangeReason = event.cancelable ? SCROLL_POSITION_CHANGE_REASONS.OBSERVED : SCROLL_POSITION_CHANGE_REASONS.REQUESTED; - - // Track scrolling direction so we can more efficiently overscan rows to reduce empty space around the edges while scrolling. - var scrollDirectionVertical = scrollTop > this.state.scrollTop ? _getOverscanIndices.SCROLL_DIRECTION_FORWARD : _getOverscanIndices.SCROLL_DIRECTION_BACKWARD; - var scrollDirectionHorizontal = scrollLeft > this.state.scrollLeft ? _getOverscanIndices.SCROLL_DIRECTION_FORWARD : _getOverscanIndices.SCROLL_DIRECTION_BACKWARD; - - if (!this.state.isScrolling) { - this.setState({ - isScrolling: true - }); - } - - this._setNextState({ - isScrolling: true, - scrollDirectionHorizontal: scrollDirectionHorizontal, - scrollDirectionVertical: scrollDirectionVertical, - scrollLeft: scrollLeft, - scrollPositionChangeReason: scrollPositionChangeReason, - scrollTop: scrollTop - }); - } - - this._invokeOnScrollMemoizer({ scrollLeft: scrollLeft, scrollTop: scrollTop, totalColumnsWidth: totalColumnsWidth, totalRowsHeight: totalRowsHeight }); - } - }]); - - return Grid; -}(_react.Component); - -Grid.propTypes = { - 'aria-label': _react.PropTypes.string, - - /** - * Set the width of the inner scrollable container to 'auto'. - * This is useful for single-column Grids to ensure that the column doesn't extend below a vertical scrollbar. - */ - autoContainerWidth: _react.PropTypes.bool, - - /** - * Removes fixed height from the scrollingContainer so that the total height - * of rows can stretch the window. Intended for use with WindowScroller - */ - autoHeight: _react.PropTypes.bool, - - /** Optional custom CSS class for individual cells */ - cellClassName: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.func]), - - /** Optional custom styles for individual cells */ - cellStyle: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.func]), - - /** - * Responsible for rendering a cell given an row and column index. - * Should implement the following interface: ({ columnIndex: number, rowIndex: number }): PropTypes.node - */ - cellRenderer: _react.PropTypes.func.isRequired, - - /** - * Responsible for rendering a group of cells given their index ranges. - * Should implement the following interface: ({ - * cellCache: Map, - * cellRenderer: Function, - * columnSizeAndPositionManager: CellSizeAndPositionManager, - * columnStartIndex: number, - * columnStopIndex: number, - * isScrolling: boolean, - * rowSizeAndPositionManager: CellSizeAndPositionManager, - * rowStartIndex: number, - * rowStopIndex: number, - * scrollLeft: number, - * scrollTop: number - * }): Array - */ - cellRangeRenderer: _react.PropTypes.func.isRequired, - - /** - * Optional custom CSS class name to attach to root Grid element. - */ - className: _react.PropTypes.string, - - /** - * Number of columns in grid. - */ - columnCount: _react.PropTypes.number.isRequired, - - /** - * Either a fixed column width (number) or a function that returns the width of a column given its index. - * Should implement the following interface: (index: number): number - */ - columnWidth: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.func]).isRequired, - - /** - * Used to estimate the total width of a Grid before all of its columns have actually been measured. - * The estimated total width is adjusted as columns are rendered. - */ - estimatedColumnSize: _react.PropTypes.number.isRequired, - - /** - * Used to estimate the total height of a Grid before all of its rows have actually been measured. - * The estimated total height is adjusted as rows are rendered. - */ - estimatedRowSize: _react.PropTypes.number.isRequired, - - /** - * Height of Grid; this property determines the number of visible (vs virtualized) rows. - */ - height: _react.PropTypes.number.isRequired, - - /** - * Optional renderer to be used in place of rows when either :rowCount or :columnCount is 0. - */ - noContentRenderer: _react.PropTypes.func.isRequired, - - /** - * Callback invoked whenever the scroll offset changes within the inner scrollable region. - * This callback can be used to sync scrolling between lists, tables, or grids. - * ({ clientHeight, clientWidth, scrollHeight, scrollLeft, scrollTop, scrollWidth }): void - */ - onScroll: _react.PropTypes.func.isRequired, - - /** - * Callback invoked with information about the section of the Grid that was just rendered. - * ({ columnStartIndex, columnStopIndex, rowStartIndex, rowStopIndex }): void - */ - onSectionRendered: _react.PropTypes.func.isRequired, - - /** - * Number of columns to render before/after the visible section of the grid. - * These columns can help for smoother scrolling on touch devices or browsers that send scroll events infrequently. - */ - overscanColumnCount: _react.PropTypes.number.isRequired, - - /** - * Number of rows to render above/below the visible section of the grid. - * These rows can help for smoother scrolling on touch devices or browsers that send scroll events infrequently. - */ - overscanRowCount: _react.PropTypes.number.isRequired, - - /** - * Either a fixed row height (number) or a function that returns the height of a row given its index. - * Should implement the following interface: ({ index: number }): number - */ - rowHeight: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.func]).isRequired, - - /** - * Number of rows in grid. - */ - rowCount: _react.PropTypes.number.isRequired, - - /** Wait this amount of time after the last scroll event before resetting Grid `pointer-events`. */ - scrollingResetTimeInterval: _react.PropTypes.number, - - /** Horizontal offset. */ - scrollLeft: _react.PropTypes.number, - - /** - * Controls scroll-to-cell behavior of the Grid. - * The default ("auto") scrolls the least amount possible to ensure that the specified cell is fully visible. - * Use "start" to align cells to the top/left of the Grid and "end" to align bottom/right. - */ - scrollToAlignment: _react.PropTypes.oneOf(['auto', 'end', 'start', 'center']).isRequired, - - /** - * Column index to ensure visible (by forcefully scrolling if necessary) - */ - scrollToColumn: _react.PropTypes.number, - - /** Vertical offset. */ - scrollTop: _react.PropTypes.number, - - /** - * Row index to ensure visible (by forcefully scrolling if necessary) - */ - scrollToRow: _react.PropTypes.number, - - /** Optional inline style */ - style: _react.PropTypes.object, - - /** Tab index for focus */ - tabIndex: _react.PropTypes.number, - - /** - * Width of Grid; this property determines the number of visible (vs virtualized) columns. - */ - width: _react.PropTypes.number.isRequired -}; -Grid.defaultProps = { - 'aria-label': 'grid', - cellStyle: {}, - cellRangeRenderer: _defaultCellRangeRenderer2.default, - estimatedColumnSize: 100, - estimatedRowSize: 30, - noContentRenderer: function noContentRenderer() { - return null; - }, - onScroll: function onScroll() { - return null; - }, - onSectionRendered: function onSectionRendered() { - return null; - }, - overscanColumnCount: 0, - overscanRowCount: 10, - scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL, - scrollToAlignment: 'auto', - style: {}, - tabIndex: 0 -}; -exports.default = Grid; -},{"../utils/createCallbackMemoizer":76,"./defaultCellRangeRenderer":59,"./utils/ScalingCellSizeAndPositionManager":62,"./utils/calculateSizeAndPositionDataAndUpdateScrollOffset":63,"./utils/getOverscanIndices":64,"./utils/updateScrollIndexHelper":65,"classnames":undefined,"dom-helpers/util/scrollbarSize":80,"raf":81,"react":undefined,"react-addons-shallow-compare":18}],59:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -exports.default = defaultCellRangeRenderer; - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _classnames = require('classnames'); - -var _classnames2 = _interopRequireDefault(_classnames); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Default implementation of cellRangeRenderer used by Grid. - * This renderer supports cell-caching while the user is scrolling. - */ -function defaultCellRangeRenderer(_ref) { - var cellCache = _ref.cellCache; - var cellClassName = _ref.cellClassName; - var cellRenderer = _ref.cellRenderer; - var cellStyle = _ref.cellStyle; - var columnSizeAndPositionManager = _ref.columnSizeAndPositionManager; - var columnStartIndex = _ref.columnStartIndex; - var columnStopIndex = _ref.columnStopIndex; - var horizontalOffsetAdjustment = _ref.horizontalOffsetAdjustment; - var isScrolling = _ref.isScrolling; - var rowSizeAndPositionManager = _ref.rowSizeAndPositionManager; - var rowStartIndex = _ref.rowStartIndex; - var rowStopIndex = _ref.rowStopIndex; - var scrollLeft = _ref.scrollLeft; - var scrollTop = _ref.scrollTop; - var verticalOffsetAdjustment = _ref.verticalOffsetAdjustment; - - var renderedCells = []; - - for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) { - var rowDatum = rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex); - - for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) { - var columnDatum = columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex); - var key = rowIndex + '-' + columnIndex; - var cellStyleObject = cellStyle({ rowIndex: rowIndex, columnIndex: columnIndex }); - var renderedCell = void 0; - - // Avoid re-creating cells while scrolling. - // This can lead to the same cell being created many times and can cause performance issues for "heavy" cells. - // If a scroll is in progress- cache and reuse cells. - // This cache will be thrown away once scrolling complets. - if (isScrolling) { - if (!cellCache[key]) { - cellCache[key] = cellRenderer({ - columnIndex: columnIndex, - isScrolling: isScrolling, - rowIndex: rowIndex - }); - } - renderedCell = cellCache[key]; - // If the user is no longer scrolling, don't cache cells. - // This makes dynamic cell content difficult for users and would also lead to a heavier memory footprint. - } else { - renderedCell = cellRenderer({ - columnIndex: columnIndex, - isScrolling: isScrolling, - rowIndex: rowIndex - }); - } - - if (renderedCell == null || renderedCell === false) { - continue; - } - - var className = cellClassName({ columnIndex: columnIndex, rowIndex: rowIndex }); - - var child = _react2.default.createElement( - 'div', - { - key: key, - className: (0, _classnames2.default)('Grid__cell', className), - style: _extends({ - height: rowDatum.size, - left: columnDatum.offset + horizontalOffsetAdjustment, - top: rowDatum.offset + verticalOffsetAdjustment, - width: columnDatum.size - }, cellStyleObject) - }, - renderedCell - ); - - renderedCells.push(child); - } - } - - return renderedCells; -} -},{"classnames":undefined,"react":undefined}],60:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.defaultCellRangeRenderer = exports.Grid = exports.default = undefined; - -var _Grid2 = require('./Grid'); - -var _Grid3 = _interopRequireDefault(_Grid2); - -var _defaultCellRangeRenderer2 = require('./defaultCellRangeRenderer'); - -var _defaultCellRangeRenderer3 = _interopRequireDefault(_defaultCellRangeRenderer2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _Grid3.default; -exports.Grid = _Grid3.default; -exports.defaultCellRangeRenderer = _defaultCellRangeRenderer3.default; -},{"./Grid":58,"./defaultCellRangeRenderer":59}],61:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -/** - * Just-in-time calculates and caches size and position information for a collection of cells. - */ -var CellSizeAndPositionManager = function () { - function CellSizeAndPositionManager(_ref) { - var cellCount = _ref.cellCount; - var cellSizeGetter = _ref.cellSizeGetter; - var estimatedCellSize = _ref.estimatedCellSize; - - _classCallCheck(this, CellSizeAndPositionManager); - - this._cellSizeGetter = cellSizeGetter; - this._cellCount = cellCount; - this._estimatedCellSize = estimatedCellSize; - - // Cache of size and position data for cells, mapped by cell index. - // Note that invalid values may exist in this map so only rely on cells up to this._lastMeasuredIndex - this._cellSizeAndPositionData = {}; - - // Measurements for cells up to this index can be trusted; cells afterward should be estimated. - this._lastMeasuredIndex = -1; - } - - _createClass(CellSizeAndPositionManager, [{ - key: 'configure', - value: function configure(_ref2) { - var cellCount = _ref2.cellCount; - var estimatedCellSize = _ref2.estimatedCellSize; - - this._cellCount = cellCount; - this._estimatedCellSize = estimatedCellSize; - } - }, { - key: 'getCellCount', - value: function getCellCount() { - return this._cellCount; - } - }, { - key: 'getEstimatedCellSize', - value: function getEstimatedCellSize() { - return this._estimatedCellSize; - } - }, { - key: 'getLastMeasuredIndex', - value: function getLastMeasuredIndex() { - return this._lastMeasuredIndex; - } - - /** - * This method returns the size and position for the cell at the specified index. - * It just-in-time calculates (or used cached values) for cells leading up to the index. - */ - - }, { - key: 'getSizeAndPositionOfCell', - value: function getSizeAndPositionOfCell(index) { - if (index < 0 || index >= this._cellCount) { - throw Error('Requested index ' + index + ' is outside of range 0..' + this._cellCount); - } - - if (index > this._lastMeasuredIndex) { - var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell(); - var _offset = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size; - - for (var i = this._lastMeasuredIndex + 1; i <= index; i++) { - var _size = this._cellSizeGetter({ index: i }); - - if (_size == null || 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 getSizeAndPositionOfLastMeasuredCell() { - return this._lastMeasuredIndex >= 0 ? this._cellSizeAndPositionData[this._lastMeasuredIndex] : { - offset: 0, - size: 0 - }; - } - - /** - * Total size of all cells being measured. - * This value will be completedly estimated initially. - * As cells as measured the estimate will be updated. - */ - - }, { - key: 'getTotalSize', - value: function getTotalSize() { - var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell(); - - return lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size + (this._cellCount - this._lastMeasuredIndex - 1) * this._estimatedCellSize; - } - - /** - * Determines a new offset that ensures a certain cell is visible, given the current offset. - * If the cell is already visible then the current offset will be returned. - * If the current offset is too great or small, it will be adjusted just enough to ensure the specified index is visible. - * - * @param align Desired alignment within container; one of "auto" (default), "start", or "end" - * @param containerSize Size (width or height) of the container viewport - * @param currentOffset Container's current (x or y) offset - * @param totalSize Total size (width or height) of all cells - * @return Offset to use to ensure the specified cell is visible - */ - - }, { - key: 'getUpdatedOffsetForIndex', - value: function getUpdatedOffsetForIndex(_ref3) { - var _ref3$align = _ref3.align; - var align = _ref3$align === undefined ? 'auto' : _ref3$align; - var containerSize = _ref3.containerSize; - var currentOffset = _ref3.currentOffset; - var targetIndex = _ref3.targetIndex; - - var datum = this.getSizeAndPositionOfCell(targetIndex); - var maxOffset = datum.offset; - var minOffset = maxOffset - containerSize + datum.size; - - var 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)); - break; - } - - var totalSize = this.getTotalSize(); - - return Math.max(0, Math.min(totalSize - containerSize, idealOffset)); - } - }, { - key: 'getVisibleCellRange', - value: function getVisibleCellRange(_ref4) { - var containerSize = _ref4.containerSize; - var offset = _ref4.offset; - - var totalSize = this.getTotalSize(); - - if (totalSize === 0) { - return {}; - } - - var maxOffset = offset + containerSize; - var start = this._findNearestCell(offset); - - var datum = this.getSizeAndPositionOfCell(start); - offset = datum.offset + datum.size; - - var stop = start; - - while (offset < maxOffset && stop < this._cellCount - 1) { - stop++; - - offset += this.getSizeAndPositionOfCell(stop).size; - } - - return { - start: start, - stop: stop - }; - } - - /** - * Clear all cached values for cells after the specified index. - * This method should be called for any cell that has changed its size. - * It will not immediately perform any calculations; they'll be performed the next time getSizeAndPositionOfCell() is called. - */ - - }, { - key: 'resetCell', - value: function resetCell(index) { - this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, index - 1); - } - }, { - key: '_binarySearch', - value: function _binarySearch(_ref5) { - var high = _ref5.high; - var low = _ref5.low; - var offset = _ref5.offset; - - var middle = void 0; - var currentOffset = void 0; - - while (low <= high) { - middle = low + Math.floor((high - low) / 2); - currentOffset = this.getSizeAndPositionOfCell(middle).offset; - - if (currentOffset === offset) { - return middle; - } else if (currentOffset < offset) { - low = middle + 1; - } else if (currentOffset > offset) { - high = middle - 1; - } - } - - if (low > 0) { - return low - 1; - } - } - }, { - key: '_exponentialSearch', - value: function _exponentialSearch(_ref6) { - var index = _ref6.index; - var offset = _ref6.offset; - - var interval = 1; - - while (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 - }); - } - - /** - * Searches for the cell (index) nearest the specified offset. - * - * If no exact match is found the next lowest cell index will be returned. - * This allows partially visible cells (with offsets just before/above the fold) to be visible. - */ - - }, { - key: '_findNearestCell', - value: function _findNearestCell(offset) { - if (isNaN(offset)) { - throw Error('Invalid offset ' + offset + ' specified'); - } - - // Our search algorithms find the nearest match at or below the specified offset. - // So make sure the offset is at least 0 or no match will be found. - offset = Math.max(0, offset); - - var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell(); - var lastMeasuredIndex = Math.max(0, this._lastMeasuredIndex); - - if (lastMeasuredCellSizeAndPosition.offset >= offset) { - // If we've already measured cells within this range just use a binary search as it's faster. - return this._binarySearch({ - high: lastMeasuredIndex, - low: 0, - offset: offset - }); - } else { - // If we haven't yet measured this high, fallback to an exponential search with an inner binary search. - // The exponential search avoids pre-computing sizes for the full set of cells as a binary search would. - // The overall complexity for this approach is O(log n). - return this._exponentialSearch({ - index: lastMeasuredIndex, - offset: offset - }); - } - } - }]); - - return CellSizeAndPositionManager; -}(); - -exports.default = CellSizeAndPositionManager; -},{}],62:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.DEFAULT_MAX_SCROLL_SIZE = undefined; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _CellSizeAndPositionManager = require('./CellSizeAndPositionManager'); - -var _CellSizeAndPositionManager2 = _interopRequireDefault(_CellSizeAndPositionManager); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -/** - * Browsers have scroll offset limitations (eg Chrome stops scrolling at ~33.5M pixels where as Edge tops out at ~1.5M pixels). - * After a certain position, the browser won't allow the user to scroll further (even via JavaScript scroll offset adjustments). - * This util picks a lower ceiling for max size and artificially adjusts positions within to make it transparent for users. - */ -var DEFAULT_MAX_SCROLL_SIZE = exports.DEFAULT_MAX_SCROLL_SIZE = 1500000; - -/** - * Extends CellSizeAndPositionManager and adds scaling behavior for lists that are too large to fit within a browser's native limits. - */ - -var ScalingCellSizeAndPositionManager = function () { - function ScalingCellSizeAndPositionManager(_ref) { - var _ref$maxScrollSize = _ref.maxScrollSize; - var maxScrollSize = _ref$maxScrollSize === undefined ? DEFAULT_MAX_SCROLL_SIZE : _ref$maxScrollSize; - - var params = _objectWithoutProperties(_ref, ['maxScrollSize']); - - _classCallCheck(this, ScalingCellSizeAndPositionManager); - - // Favor composition over inheritance to simplify IE10 support - this._cellSizeAndPositionManager = new _CellSizeAndPositionManager2.default(params); - this._maxScrollSize = maxScrollSize; - } - - _createClass(ScalingCellSizeAndPositionManager, [{ - key: 'configure', - value: function configure(params) { - this._cellSizeAndPositionManager.configure(params); - } - }, { - key: 'getCellCount', - value: function getCellCount() { - return this._cellSizeAndPositionManager.getCellCount(); - } - }, { - key: 'getEstimatedCellSize', - value: function getEstimatedCellSize() { - return this._cellSizeAndPositionManager.getEstimatedCellSize(); - } - }, { - key: 'getLastMeasuredIndex', - value: function getLastMeasuredIndex() { - return this._cellSizeAndPositionManager.getLastMeasuredIndex(); - } - - /** - * Number of pixels a cell at the given position (offset) should be shifted in order to fit within the scaled container. - * The offset passed to this function is scalled (safe) as well. - */ - - }, { - key: 'getOffsetAdjustment', - value: function getOffsetAdjustment(_ref2) { - var containerSize = _ref2.containerSize; - var offset = _ref2.offset; - - var totalSize = this._cellSizeAndPositionManager.getTotalSize(); - var safeTotalSize = this.getTotalSize(); - var offsetPercentage = this._getOffsetPercentage({ - containerSize: containerSize, - offset: offset, - totalSize: safeTotalSize - }); - - return Math.round(offsetPercentage * (safeTotalSize - totalSize)); - } - }, { - key: 'getSizeAndPositionOfCell', - value: function getSizeAndPositionOfCell(index) { - return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index); - } - }, { - key: 'getSizeAndPositionOfLastMeasuredCell', - value: function getSizeAndPositionOfLastMeasuredCell() { - return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell(); - } - - /** See CellSizeAndPositionManager#getTotalSize */ - - }, { - key: 'getTotalSize', - value: function getTotalSize() { - return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize()); - } - - /** See CellSizeAndPositionManager#getUpdatedOffsetForIndex */ - - }, { - key: 'getUpdatedOffsetForIndex', - value: function getUpdatedOffsetForIndex(_ref3) { - var _ref3$align = _ref3.align; - var align = _ref3$align === undefined ? 'auto' : _ref3$align; - var containerSize = _ref3.containerSize; - var currentOffset = _ref3.currentOffset; - var targetIndex = _ref3.targetIndex; - var 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 - }); - } - - /** See CellSizeAndPositionManager#getVisibleCellRange */ - - }, { - key: 'getVisibleCellRange', - value: function getVisibleCellRange(_ref4) { - var containerSize = _ref4.containerSize; - var offset = _ref4.offset; - - offset = this._safeOffsetToOffset({ - containerSize: containerSize, - offset: offset - }); - - return this._cellSizeAndPositionManager.getVisibleCellRange({ - containerSize: containerSize, - offset: offset - }); - } - }, { - key: 'resetCell', - value: function resetCell(index) { - this._cellSizeAndPositionManager.resetCell(index); - } - }, { - key: '_getOffsetPercentage', - value: function _getOffsetPercentage(_ref5) { - var containerSize = _ref5.containerSize; - var offset = _ref5.offset; - var totalSize = _ref5.totalSize; - - return totalSize <= containerSize ? 0 : offset / (totalSize - containerSize); - } - }, { - key: '_offsetToSafeOffset', - value: function _offsetToSafeOffset(_ref6) { - var containerSize = _ref6.containerSize; - var offset = _ref6.offset; - - var totalSize = this._cellSizeAndPositionManager.getTotalSize(); - var safeTotalSize = this.getTotalSize(); - - if (totalSize === safeTotalSize) { - return offset; - } else { - var offsetPercentage = this._getOffsetPercentage({ - containerSize: containerSize, - offset: offset, - totalSize: totalSize - }); - - return Math.round(offsetPercentage * (safeTotalSize - containerSize)); - } - } - }, { - key: '_safeOffsetToOffset', - value: function _safeOffsetToOffset(_ref7) { - var containerSize = _ref7.containerSize; - var offset = _ref7.offset; - - var totalSize = this._cellSizeAndPositionManager.getTotalSize(); - var safeTotalSize = this.getTotalSize(); - - if (totalSize === safeTotalSize) { - return offset; - } else { - var offsetPercentage = this._getOffsetPercentage({ - containerSize: containerSize, - offset: offset, - totalSize: safeTotalSize - }); - - return Math.round(offsetPercentage * (totalSize - containerSize)); - } - } - }]); - - return ScalingCellSizeAndPositionManager; -}(); - -exports.default = ScalingCellSizeAndPositionManager; -},{"./CellSizeAndPositionManager":61}],63:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = calculateSizeAndPositionDataAndUpdateScrollOffset; -/** - * Helper method that determines when to recalculate row or column metadata. - * - * @param cellCount Number of rows or columns in the current axis - * @param cellsSize Width or height of cells for the current axis - * @param computeMetadataCallback Method to invoke if cell metadata should be recalculated - * @param computeMetadataCallbackProps Parameters to pass to :computeMetadataCallback - * @param nextCellsCount Newly updated number of rows or columns in the current axis - * @param nextCellsSize Newly updated width or height of cells for the current axis - * @param nextScrollToIndex Newly updated scroll-to-index - * @param scrollToIndex Scroll-to-index - * @param updateScrollOffsetForScrollToIndex Callback to invoke if the scroll position should be recalculated - */ -function calculateSizeAndPositionDataAndUpdateScrollOffset(_ref) { - var cellCount = _ref.cellCount; - var cellSize = _ref.cellSize; - var computeMetadataCallback = _ref.computeMetadataCallback; - var computeMetadataCallbackProps = _ref.computeMetadataCallbackProps; - var nextCellsCount = _ref.nextCellsCount; - var nextCellSize = _ref.nextCellSize; - var nextScrollToIndex = _ref.nextScrollToIndex; - var scrollToIndex = _ref.scrollToIndex; - var updateScrollOffsetForScrollToIndex = _ref.updateScrollOffsetForScrollToIndex; - - // Don't compare cell sizes if they are functions because inline functions would cause infinite loops. - // In that event users should use the manual recompute methods to inform of changes. - if (cellCount !== nextCellsCount || (typeof cellSize === 'number' || typeof nextCellSize === 'number') && cellSize !== nextCellSize) { - computeMetadataCallback(computeMetadataCallbackProps); - - // Updated cell metadata may have hidden the previous scrolled-to item. - // In this case we should also update the scrollTop to ensure it stays visible. - if (scrollToIndex >= 0 && scrollToIndex === nextScrollToIndex) { - updateScrollOffsetForScrollToIndex(); - } - } -} -},{}],64:[function(require,module,exports){ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getOverscanIndices; -var SCROLL_DIRECTION_BACKWARD = exports.SCROLL_DIRECTION_BACKWARD = -1; -var SCROLL_DIRECTION_FIXED = exports.SCROLL_DIRECTION_FIXED = 0; -var SCROLL_DIRECTION_FORWARD = exports.SCROLL_DIRECTION_FORWARD = 1; - -/** - * Calculates the number of cells to overscan before and after a specified range. - * This function ensures that overscanning doesn't exceed the available cells. +var o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,s=r(e),u=1;u1){for(var h=Array(f),m=0;m1){for(var g=Array(v),y=0;y]/,s=n(44),u=s(function(e,t){if(e.namespaceURI!==a.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML=""+t+"";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(o.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(u=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),i.test(t)||"<"===t[0]&&l.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),c=null}e.exports=u},function(e,t,n){"use strict";function r(e){var t=""+e,n=a.exec(t);if(!n)return t;var r,o="",i=0,l=0;for(i=n.index;i]/;e.exports=o},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=f++,p[e[m]]={}),p[e[m]]}var o,a=n(5),i=n(36),l=n(145),s=n(73),u=n(146),c=n(40),p={},d=!1,f=0,h={topAbort:"abort",topAnimationEnd:u("animationend")||"animationend",topAnimationIteration:u("animationiteration")||"animationiteration",topAnimationStart:u("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:u("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),v=a({},l,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,o=r(n),a=i.registrationNameDependencies[e],l=0;l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;ti.bottom?o.scrollTop=r.offsetTop+r.clientHeight-o.offsetHeight:a.topt.offsetHeight&&t.scrollHeight-t.offsetHeight-t.scrollTop<=0&&this.props.onMenuScrollToBottom()}}},{key:"handleRequired",value:function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)}},{key:"getOptionLabel",value:function(e){return e[this.props.labelKey]}},{key:"getValueArray",value:function(e,t){var n=this,r="object"===(void 0===t?"undefined":c(t))?t:this.props;if(r.multi){if("string"==typeof e&&(e=e.split(r.delimiter)),!Array.isArray(e)){if(null===e||void 0===e)return[];e=[e]}return e.map(function(e){return n.expandValue(e,r)}).filter(function(e){return e})}var o=this.expandValue(e,r);return o?[o]:[]}},{key:"expandValue",value:function(e,t){var n=void 0===e?"undefined":c(e);if("string"!==n&&"number"!==n&&"boolean"!==n)return e;var r=t.options,o=t.valueKey;if(r)for(var a=0;ar&&this.focusOption(n[r+1])}},{key:"popValue",value:function(){var e=this.getValueArray(this.props.value);e.length&&!1!==e[e.length-1].clearableValue&&this.setValue(this.props.multi?e.slice(0,e.length-1):null)}},{key:"removeValue",value:function(e){var t=this,n=this.getValueArray(this.props.value);this.setValue(n.filter(function(n){return n[t.props.valueKey]!==e[t.props.valueKey]})),this.focus()}},{key:"clearValue",value:function(e){e&&"mousedown"===e.type&&0!==e.button||(e.stopPropagation(),e.preventDefault(),this.setValue(this.getResetValue()),this.setState({isOpen:!1,inputValue:this.handleInputValueChange("")},this.focus))}},{key:"getResetValue",value:function(){return void 0!==this.props.resetValue?this.props.resetValue:this.props.multi?[]:null}},{key:"focusOption",value:function(e){this.setState({focusedOption:e})}},{key:"focusNextOption",value:function(){this.focusAdjacentOption("next")}},{key:"focusPreviousOption",value:function(){this.focusAdjacentOption("previous")}},{key:"focusPageUpOption",value:function(){this.focusAdjacentOption("page_up")}},{key:"focusPageDownOption",value:function(){this.focusAdjacentOption("page_down")}},{key:"focusStartOption",value:function(){this.focusAdjacentOption("start")}},{key:"focusEndOption",value:function(){this.focusAdjacentOption("end")}},{key:"focusAdjacentOption",value:function(e){var t=this._visibleOptions.map(function(e,t){return{option:e,index:t}}).filter(function(e){return!e.option.disabled});if(this._scrollToFocusedOptionOnUpdate=!0,!this.state.isOpen)return void this.setState({isOpen:!0,inputValue:"",focusedOption:this._focusedOption||(t.length?t["next"===e?0:t.length-1].option:null)});if(t.length){for(var n=-1,r=0;r0?n-=1:n=t.length-1;else if("start"===e)n=0;else if("end"===e)n=t.length-1;else if("page_up"===e){var o=n-this.props.pageSize;n=o<0?0:o}else if("page_down"===e){var o=n+this.props.pageSize;n=o>t.length-1?t.length-1:o}-1===n&&(n=0),this.setState({focusedIndex:t[n].index,focusedOption:t[n].option})}}},{key:"getFocusedOption",value:function(){return this._focusedOption}},{key:"selectFocusedOption",value:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)}},{key:"renderLoading",value:function(){if(this.props.isLoading)return f.default.createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},f.default.createElement("span",{className:"Select-loading"}))}},{key:"renderValue",value:function(e,t){var n=this,r=this.props.valueRenderer||this.getOptionLabel,o=this.props.valueComponent;if(!e.length)return this.state.inputValue?null:f.default.createElement("div",{className:"Select-placeholder"},this.props.placeholder);var a=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map(function(e,t){return f.default.createElement(o,{id:n._instancePrefix+"-value-"+t,instancePrefix:n._instancePrefix,disabled:n.props.disabled||!1===e.clearableValue,key:"value-"+t+"-"+e[n.props.valueKey],onClick:a,onRemove:n.removeValue,value:e},r(e,t),f.default.createElement("span",{className:"Select-aria-only"}," "))}):this.state.inputValue?void 0:(t&&(a=null),f.default.createElement(o,{id:this._instancePrefix+"-value-item",disabled:this.props.disabled,instancePrefix:this._instancePrefix,onClick:a,value:e[0]},r(e[0])))}},{key:"renderInput",value:function(e,t){var n,r=this,i=(0,_.default)("Select-input",this.props.inputProps.className),l=!!this.state.isOpen,s=(0,_.default)((n={},a(n,this._instancePrefix+"-list",l),a(n,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),n)),c=u({},this.props.inputProps,{role:"combobox","aria-expanded":""+l,"aria-owns":s,"aria-haspopup":""+l,"aria-activedescendant":l?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-describedby":this.props["aria-describedby"],"aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"],className:i,tabIndex:this.props.tabIndex,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return r.input=e},required:this.state.required,value:this.state.inputValue});if(this.props.inputRenderer)return this.props.inputRenderer(c);if(this.props.disabled||!this.props.searchable){var p=this.props.inputProps,d=(p.inputClassName,o(p,["inputClassName"])),h=(0,_.default)(a({},this._instancePrefix+"-list",l));return f.default.createElement("div",u({},d,{role:"combobox","aria-expanded":l,"aria-owns":h,"aria-activedescendant":l?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"],className:i,tabIndex:this.props.tabIndex||0,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return r.input=e},"aria-disabled":""+!!this.props.disabled,style:{border:0,width:1,display:"inline-block"}}))}return this.props.autosize?f.default.createElement(y.default,u({id:this.props.id},c,{minWidth:"5"})):f.default.createElement("div",{className:i,key:"input-wrap"},f.default.createElement("input",u({id:this.props.id},c)))}},{key:"renderClear",value:function(){var e=this.getValueArray(this.props.value);if(this.props.clearable&&e.length&&!this.props.disabled&&!this.props.isLoading){var t=this.props.clearRenderer();return f.default.createElement("span",{className:"Select-clear-zone",title:this.props.multi?this.props.clearAllText:this.props.clearValueText,"aria-label":this.props.multi?this.props.clearAllText:this.props.clearValueText,onMouseDown:this.clearValue,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEndClearValue},t)}}},{key:"renderArrow",value:function(){if(this.props.arrowRenderer){var e=this.handleMouseDownOnArrow,t=this.state.isOpen,n=this.props.arrowRenderer({onMouseDown:e,isOpen:t});return n?f.default.createElement("span",{className:"Select-arrow-zone",onMouseDown:e},n):null}}},{key:"filterOptions",value:function(e){var t=this.state.inputValue,n=this.props.options||[];if(this.props.filterOptions){return("function"==typeof this.props.filterOptions?this.props.filterOptions:w.default)(n,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,valueKey:this.props.valueKey,trimFilter:this.props.trimFilter})}return n}},{key:"onOptionRef",value:function(e,t){t&&(this.focused=e)}},{key:"renderMenu",value:function(e,t,n){return e&&e.length?this.props.menuRenderer({focusedOption:n,focusOption:this.focusOption,inputValue:this.state.inputValue,instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,selectValue:this.selectValue,removeValue:this.removeValue,valueArray:t,valueKey:this.props.valueKey,onOptionRef:this.onOptionRef}):this.props.noResultsText?f.default.createElement("div",{className:"Select-noresults"},this.props.noResultsText):null}},{key:"renderHiddenField",value:function(e){var t=this;if(this.props.name){if(this.props.joinValues){var n=e.map(function(e){return M(e[t.props.valueKey])}).join(this.props.delimiter);return f.default.createElement("input",{type:"hidden",ref:function(e){return t.value=e},name:this.props.name,value:n,disabled:this.props.disabled})}return e.map(function(e,n){return f.default.createElement("input",{key:"hidden."+n,type:"hidden",ref:"value"+n,name:t.props.name,value:M(e[t.props.valueKey]),disabled:t.props.disabled})})}}},{key:"getFocusableOptionIndex",value:function(e){var t=this._visibleOptions;if(!t.length)return null;var n=this.props.valueKey,r=this.state.focusedOption||e;if(r&&!r.disabled){var o=-1;if(t.some(function(e,t){var a=e[n]===r[n];return a&&(o=t),a}),-1!==o)return o}for(var a=0;a-1||i("96",e),!u.plugins[n]){t.extractEvents||i("97",e),u.plugins[n]=t;var r=t.eventTypes;for(var a in r)o(r[a],t,a)||i("98",a,e)}}}function o(e,t,n){u.eventNameDispatchConfigs.hasOwnProperty(n)&&i("99",n),u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var l=r[o];a(l,t,n)}return!0}return!!e.registrationName&&(a(e.registrationName,t,n),!0)}function a(e,t,n){u.registrationNameModules[e]&&i("100",e),u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=n(4),l=(n(1),null),s={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){l&&i("101"),l=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]&&i("102",n),s[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var o=u.registrationNameModules[n[r]];if(o)return o}}return null},_resetEventPlugins:function(){l=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=u},function(e,t,n){"use strict";function r(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function o(e){return"topMouseMove"===e||"topTouchMove"===e}function a(e){return"topMouseDown"===e||"topTouchStart"===e}function i(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=g.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(o,n,e):m.invokeGuardedCallback(o,n,e),e.currentTarget=null}function l(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o= 0 && scrollToIndex < cellCount; - var sizeHasChanged = size !== previousSize || !previousCellSize || typeof cellSize === 'number' && cellSize !== previousCellSize; - - // If we have a new scroll target OR if height/row-height has changed, - // We should ensure that the scroll target is visible. - if (hasScrollToIndex && (sizeHasChanged || scrollToAlignment !== previousScrollToAlignment || scrollToIndex !== previousScrollToIndex)) { - updateScrollIndexCallback(scrollToIndex); - - // If we don't have a selected item but list size or number of children have decreased, - // Make sure we aren't scrolled too far past the current content. - } else if (!hasScrollToIndex && cellCount > 0 && (size < previousSize || cellCount < previousCellsCount)) { - // We need to ensure that the current scroll offset is still within the collection's range. - // To do this, we don't need to measure everything; CellMeasurer would perform poorly. - // Just check to make sure we're still okay. - // Only adjust the scroll position if we've scrolled below the last set of rows. - if (scrollOffset > cellSizeAndPositionManager.getTotalSize() - size) { - updateScrollIndexCallback(cellCount - 1); - } - } -} -},{}],66:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -exports.isRangeVisible = isRangeVisible; -exports.scanForUnloadedRanges = scanForUnloadedRanges; -exports.forceUpdateReactVirtualizedComponent = forceUpdateReactVirtualizedComponent; - -var _react = require('react'); - -var _reactAddonsShallowCompare = require('react-addons-shallow-compare'); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -var _createCallbackMemoizer = require('../utils/createCallbackMemoizer'); - -var _createCallbackMemoizer2 = _interopRequireDefault(_createCallbackMemoizer); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -/** - * Higher-order component that manages lazy-loading for "infinite" data. - * This component decorates a virtual component and just-in-time prefetches rows as a user scrolls. - * It is intended as a convenience component; fork it if you'd like finer-grained control over data-loading. - */ -var InfiniteLoader = function (_Component) { - _inherits(InfiniteLoader, _Component); - - function InfiniteLoader(props, context) { - _classCallCheck(this, InfiniteLoader); - - var _this = _possibleConstructorReturn(this, (InfiniteLoader.__proto__ || Object.getPrototypeOf(InfiniteLoader)).call(this, props, context)); - - _this._loadMoreRowsMemoizer = (0, _createCallbackMemoizer2.default)(); - - _this._onRowsRendered = _this._onRowsRendered.bind(_this); - _this._registerChild = _this._registerChild.bind(_this); - return _this; - } - - _createClass(InfiniteLoader, [{ - key: 'render', - value: function render() { - var children = this.props.children; - - - return children({ - onRowsRendered: this._onRowsRendered, - registerChild: this._registerChild - }); - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); - } - }, { - key: '_loadUnloadedRanges', - value: function _loadUnloadedRanges(unloadedRanges) { - var _this2 = this; - - var loadMoreRows = this.props.loadMoreRows; - - - unloadedRanges.forEach(function (unloadedRange) { - var promise = loadMoreRows(unloadedRange); - if (promise) { - promise.then(function () { - // Refresh the visible rows if any of them have just been loaded. - // Otherwise they will remain in their unloaded visual state. - if (isRangeVisible({ - lastRenderedStartIndex: _this2._lastRenderedStartIndex, - lastRenderedStopIndex: _this2._lastRenderedStopIndex, - startIndex: unloadedRange.startIndex, - stopIndex: unloadedRange.stopIndex - })) { - if (_this2._registeredChild) { - forceUpdateReactVirtualizedComponent(_this2._registeredChild); - } - } - }); - } - }); - } - }, { - key: '_onRowsRendered', - value: function _onRowsRendered(_ref) { - var _this3 = this; - - var startIndex = _ref.startIndex; - var stopIndex = _ref.stopIndex; - var _props = this.props; - var isRowLoaded = _props.isRowLoaded; - var minimumBatchSize = _props.minimumBatchSize; - var rowCount = _props.rowCount; - var 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) - }); - - // For memoize comparison - var squashedUnloadedRanges = unloadedRanges.reduce(function (reduced, unloadedRange) { - return reduced.concat([unloadedRange.startIndex, unloadedRange.stopIndex]); - }, []); - - this._loadMoreRowsMemoizer({ - callback: function callback() { - _this3._loadUnloadedRanges(unloadedRanges); - }, - indices: { squashedUnloadedRanges: squashedUnloadedRanges } - }); - } - }, { - key: '_registerChild', - value: function _registerChild(registeredChild) { - this._registeredChild = registeredChild; - } - }]); - - return InfiniteLoader; -}(_react.Component); - -/** - * Determines if the specified start/stop range is visible based on the most recently rendered range. - */ - - -InfiniteLoader.propTypes = { - /** - * Function respondible for rendering a virtualized component. - * This function should implement the following signature: - * ({ onRowsRendered, registerChild }) => PropTypes.element - * - * The specified :onRowsRendered function should be passed through to the child's :onRowsRendered property. - * The :registerChild callback should be set as the virtualized component's :ref. - */ - children: _react.PropTypes.func.isRequired, - - /** - * Function responsible for tracking the loaded state of each row. - * It should implement the following signature: ({ index: number }): boolean - */ - isRowLoaded: _react.PropTypes.func.isRequired, - - /** - * Callback to be invoked when more rows must be loaded. - * It should implement the following signature: ({ startIndex, stopIndex }): Promise - * The returned Promise should be resolved once row data has finished loading. - * It will be used to determine when to refresh the list with the newly-loaded data. - * This callback may be called multiple times in reaction to a single scroll event. - */ - loadMoreRows: _react.PropTypes.func.isRequired, - - /** - * Minimum number of rows to be loaded at a time. - * This property can be used to batch requests to reduce HTTP requests. - */ - minimumBatchSize: _react.PropTypes.number.isRequired, - - /** - * Number of rows in list; can be arbitrary high number if actual number is unknown. - */ - rowCount: _react.PropTypes.number.isRequired, - - /** - * Threshold at which to pre-fetch data. - * A threshold X means that data will start loading when a user scrolls within X rows. - * This value defaults to 15. - */ - threshold: _react.PropTypes.number.isRequired -}; -InfiniteLoader.defaultProps = { - minimumBatchSize: 10, - rowCount: 0, - threshold: 15 -}; -exports.default = InfiniteLoader; -function isRangeVisible(_ref2) { - var lastRenderedStartIndex = _ref2.lastRenderedStartIndex; - var lastRenderedStopIndex = _ref2.lastRenderedStopIndex; - var startIndex = _ref2.startIndex; - var stopIndex = _ref2.stopIndex; - - return !(startIndex > lastRenderedStopIndex || stopIndex < lastRenderedStartIndex); -} - -/** - * Returns all of the ranges within a larger range that contain unloaded rows. - */ -function scanForUnloadedRanges(_ref3) { - var isRowLoaded = _ref3.isRowLoaded; - var minimumBatchSize = _ref3.minimumBatchSize; - var rowCount = _ref3.rowCount; - var startIndex = _ref3.startIndex; - var stopIndex = _ref3.stopIndex; - - var unloadedRanges = []; - - var rangeStartIndex = null; - var rangeStopIndex = null; - - for (var index = startIndex; index <= stopIndex; index++) { - var loaded = isRowLoaded({ index: index }); - - if (!loaded) { - rangeStopIndex = index; - if (rangeStartIndex === null) { - rangeStartIndex = index; - } - } else if (rangeStopIndex !== null) { - unloadedRanges.push({ - startIndex: rangeStartIndex, - stopIndex: rangeStopIndex - }); - - rangeStartIndex = rangeStopIndex = null; - } - } - - // If :rangeStopIndex is not null it means we haven't ran out of unloaded rows. - // Scan forward to try filling our :minimumBatchSize. - if (rangeStopIndex !== null) { - var potentialStopIndex = Math.min(Math.max(rangeStopIndex, rangeStartIndex + minimumBatchSize - 1), rowCount - 1); - - for (var _index = rangeStopIndex + 1; _index <= potentialStopIndex; _index++) { - if (!isRowLoaded({ index: _index })) { - rangeStopIndex = _index; - } else { - break; - } - } - - unloadedRanges.push({ - startIndex: rangeStartIndex, - stopIndex: rangeStopIndex - }); - } - - // Check to see if our first range ended prematurely. - // In this case we should scan backwards to try filling our :minimumBatchSize. - if (unloadedRanges.length) { - var firstUnloadedRange = unloadedRanges[0]; - - while (firstUnloadedRange.stopIndex - firstUnloadedRange.startIndex + 1 < minimumBatchSize && firstUnloadedRange.startIndex > 0) { - var _index2 = firstUnloadedRange.startIndex - 1; - - if (!isRowLoaded({ index: _index2 })) { - firstUnloadedRange.startIndex = _index2; - } else { - break; - } - } - } - - return unloadedRanges; -} - -/** - * Since RV components use shallowCompare we need to force a render (even though props haven't changed). - * However InfiniteLoader may wrap a Grid or it may wrap a FlexTable or VirtualScroll. - * In the first case the built-in React forceUpdate() method is sufficient to force a re-render, - * But in the latter cases we need to use the RV-specific forceUpdateGrid() method. - * Else the inner Grid will not be re-rendered and visuals may be stale. - */ -function forceUpdateReactVirtualizedComponent(component) { - typeof component.forceUpdateGrid === 'function' ? component.forceUpdateGrid() : component.forceUpdate(); -} -},{"../utils/createCallbackMemoizer":76,"react":undefined,"react-addons-shallow-compare":18}],67:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.InfiniteLoader = exports.default = undefined; - -var _InfiniteLoader2 = require('./InfiniteLoader'); - -var _InfiniteLoader3 = _interopRequireDefault(_InfiniteLoader2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _InfiniteLoader3.default; -exports.InfiniteLoader = _InfiniteLoader3.default; -},{"./InfiniteLoader":66}],68:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = require('react'); - -var _reactAddonsShallowCompare = require('react-addons-shallow-compare'); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -/** - * HOC that simplifies the process of synchronizing scrolling between two or more virtualized components. - */ -var ScrollSync = function (_Component) { - _inherits(ScrollSync, _Component); - - function ScrollSync(props, context) { - _classCallCheck(this, ScrollSync); - - var _this = _possibleConstructorReturn(this, (ScrollSync.__proto__ || Object.getPrototypeOf(ScrollSync)).call(this, props, context)); - - _this.state = { - clientHeight: 0, - clientWidth: 0, - scrollHeight: 0, - scrollLeft: 0, - scrollTop: 0, - scrollWidth: 0 - }; - - _this._onScroll = _this._onScroll.bind(_this); - return _this; - } - - _createClass(ScrollSync, [{ - key: 'render', - value: function render() { - var children = this.props.children; - var _state = this.state; - var clientHeight = _state.clientHeight; - var clientWidth = _state.clientWidth; - var scrollHeight = _state.scrollHeight; - var scrollLeft = _state.scrollLeft; - var scrollTop = _state.scrollTop; - var scrollWidth = _state.scrollWidth; - - - return children({ - clientHeight: clientHeight, - clientWidth: clientWidth, - onScroll: this._onScroll, - scrollHeight: scrollHeight, - scrollLeft: scrollLeft, - scrollTop: scrollTop, - scrollWidth: scrollWidth - }); - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); - } - }, { - key: '_onScroll', - value: function _onScroll(_ref) { - var clientHeight = _ref.clientHeight; - var clientWidth = _ref.clientWidth; - var scrollHeight = _ref.scrollHeight; - var scrollLeft = _ref.scrollLeft; - var scrollTop = _ref.scrollTop; - var scrollWidth = _ref.scrollWidth; - - this.setState({ clientHeight: clientHeight, clientWidth: clientWidth, scrollHeight: scrollHeight, scrollLeft: scrollLeft, scrollTop: scrollTop, scrollWidth: scrollWidth }); - } - }]); - - return ScrollSync; -}(_react.Component); - -ScrollSync.propTypes = { - /** - * Function respondible for rendering 2 or more virtualized components. - * This function should implement the following signature: - * ({ onScroll, scrollLeft, scrollTop }) => PropTypes.element - */ - children: _react.PropTypes.func.isRequired -}; -exports.default = ScrollSync; -},{"react":undefined,"react-addons-shallow-compare":18}],69:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ScrollSync = exports.default = undefined; - -var _ScrollSync2 = require('./ScrollSync'); - -var _ScrollSync3 = _interopRequireDefault(_ScrollSync2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _ScrollSync3.default; -exports.ScrollSync = _ScrollSync3.default; -},{"./ScrollSync":68}],70:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _Grid = require('../Grid'); - -var _Grid2 = _interopRequireDefault(_Grid); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _classnames = require('classnames'); - -var _classnames2 = _interopRequireDefault(_classnames); - -var _reactAddonsShallowCompare = require('react-addons-shallow-compare'); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -/** - * It is inefficient to create and manage a large list of DOM elements within a scrolling container - * if only a few of those elements are visible. The primary purpose of this component is to improve - * performance by only rendering the DOM nodes that a user is able to see based on their current - * scroll position. + * Borrows from Modernizr. * - * This component renders a virtualized list of elements with either fixed or dynamic heights. - */ -var VirtualScroll = function (_Component) { - _inherits(VirtualScroll, _Component); - - function VirtualScroll(props, context) { - _classCallCheck(this, VirtualScroll); - - var _this = _possibleConstructorReturn(this, (VirtualScroll.__proto__ || Object.getPrototypeOf(VirtualScroll)).call(this, props, context)); - - _this._cellRenderer = _this._cellRenderer.bind(_this); - _this._createRowClassNameGetter = _this._createRowClassNameGetter.bind(_this); - _this._createRowStyleGetter = _this._createRowStyleGetter.bind(_this); - _this._onScroll = _this._onScroll.bind(_this); - _this._onSectionRendered = _this._onSectionRendered.bind(_this); - return _this; - } - - _createClass(VirtualScroll, [{ - key: 'forceUpdateGrid', - value: function forceUpdateGrid() { - this.Grid.forceUpdate(); - } - - /** See Grid#measureAllCells */ - - }, { - key: 'measureAllRows', - value: function measureAllRows() { - this.Grid.measureAllCells(); - } - - /** See Grid#recomputeGridSize */ - - }, { - key: 'recomputeRowHeights', - value: function recomputeRowHeights() { - var index = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0]; - - this.Grid.recomputeGridSize({ - rowIndex: index - }); - this.forceUpdateGrid(); - } - }, { - key: 'render', - value: function render() { - var _this2 = this; - - var _props = this.props; - var className = _props.className; - var noRowsRenderer = _props.noRowsRenderer; - var scrollToIndex = _props.scrollToIndex; - var width = _props.width; - - - var classNames = (0, _classnames2.default)('VirtualScroll', className); - - return _react2.default.createElement(_Grid2.default, _extends({}, this.props, { - autoContainerWidth: true, - cellRenderer: this._cellRenderer, - cellClassName: this._createRowClassNameGetter(), - cellStyle: this._createRowStyleGetter(), - className: classNames, - columnWidth: width, - columnCount: 1, - noContentRenderer: noRowsRenderer, - onScroll: this._onScroll, - onSectionRendered: this._onSectionRendered, - ref: function ref(_ref) { - _this2.Grid = _ref; - }, - scrollToRow: scrollToIndex - })); - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); - } - }, { - key: '_cellRenderer', - value: function _cellRenderer(_ref2) { - var columnIndex = _ref2.columnIndex; - var isScrolling = _ref2.isScrolling; - var rowIndex = _ref2.rowIndex; - var rowRenderer = this.props.rowRenderer; - - - return rowRenderer({ - index: rowIndex, - isScrolling: isScrolling - }); - } - }, { - key: '_createRowClassNameGetter', - value: function _createRowClassNameGetter() { - var rowClassName = this.props.rowClassName; - - - return rowClassName instanceof Function ? function (_ref3) { - var rowIndex = _ref3.rowIndex; - return rowClassName({ index: rowIndex }); - } : function () { - return rowClassName; - }; - } - }, { - key: '_createRowStyleGetter', - value: function _createRowStyleGetter() { - var rowStyle = this.props.rowStyle; - - - var wrapped = rowStyle instanceof Function ? rowStyle : function () { - return rowStyle; - }; - - // Default width to 100% to prevent list rows from flowing under the vertical scrollbar - return function (_ref4) { - var rowIndex = _ref4.rowIndex; - return _extends({ - width: '100%' - }, wrapped({ index: rowIndex })); - }; - } - }, { - key: '_onScroll', - value: function _onScroll(_ref5) { - var clientHeight = _ref5.clientHeight; - var scrollHeight = _ref5.scrollHeight; - var scrollTop = _ref5.scrollTop; - var onScroll = this.props.onScroll; - - - onScroll({ clientHeight: clientHeight, scrollHeight: scrollHeight, scrollTop: scrollTop }); - } - }, { - key: '_onSectionRendered', - value: function _onSectionRendered(_ref6) { - var rowOverscanStartIndex = _ref6.rowOverscanStartIndex; - var rowOverscanStopIndex = _ref6.rowOverscanStopIndex; - var rowStartIndex = _ref6.rowStartIndex; - var rowStopIndex = _ref6.rowStopIndex; - var onRowsRendered = this.props.onRowsRendered; - - - onRowsRendered({ - overscanStartIndex: rowOverscanStartIndex, - overscanStopIndex: rowOverscanStopIndex, - startIndex: rowStartIndex, - stopIndex: rowStopIndex - }); - } - }]); - - return VirtualScroll; -}(_react.Component); - -VirtualScroll.propTypes = { - 'aria-label': _react.PropTypes.string, - - /** - * Removes fixed height from the scrollingContainer so that the total height - * of rows can stretch the window. Intended for use with WindowScroller - */ - autoHeight: _react.PropTypes.bool, - - /** Optional CSS class name */ - className: _react.PropTypes.string, - - /** - * Used to estimate the total height of a VirtualScroll before all of its rows have actually been measured. - * The estimated total height is adjusted as rows are rendered. - */ - estimatedRowSize: _react.PropTypes.number.isRequired, - - /** Height constraint for list (determines how many actual rows are rendered) */ - height: _react.PropTypes.number.isRequired, - - /** Optional renderer to be used in place of rows when rowCount is 0 */ - noRowsRenderer: _react.PropTypes.func.isRequired, - - /** - * Callback invoked with information about the slice of rows that were just rendered. - * ({ startIndex, stopIndex }): void - */ - onRowsRendered: _react.PropTypes.func.isRequired, - - /** - * Number of rows to render above/below the visible bounds of the list. - * These rows can help for smoother scrolling on touch devices. - */ - overscanRowCount: _react.PropTypes.number.isRequired, - - /** - * Callback invoked whenever the scroll offset changes within the inner scrollable region. - * This callback can be used to sync scrolling between lists, tables, or grids. - * ({ clientHeight, scrollHeight, scrollTop }): void - */ - onScroll: _react.PropTypes.func.isRequired, - - /** - * Either a fixed row height (number) or a function that returns the height of a row given its index. - * ({ index: number }): number - */ - rowHeight: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.func]).isRequired, - - /** Responsbile for rendering a row given an index; ({ index: number }): node */ - rowRenderer: _react.PropTypes.func.isRequired, - - /** Optional custom CSS class for individual rows */ - rowClassName: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.func]), - - /** Number of rows in list. */ - rowCount: _react.PropTypes.number.isRequired, - - /** Optional custom styles for individual cells */ - rowStyle: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.func]), - - /** See Grid#scrollToAlignment */ - scrollToAlignment: _react.PropTypes.oneOf(['auto', 'end', 'start', 'center']).isRequired, - - /** Row index to ensure visible (by forcefully scrolling if necessary) */ - scrollToIndex: _react.PropTypes.number, - - /** Vertical offset. */ - scrollTop: _react.PropTypes.number, - - /** Optional inline style */ - style: _react.PropTypes.object, - - /** Tab index for focus */ - tabIndex: _react.PropTypes.number, - - /** Width of list */ - width: _react.PropTypes.number.isRequired -}; -VirtualScroll.defaultProps = { - estimatedRowSize: 30, - noRowsRenderer: function noRowsRenderer() { - return null; - }, - onRowsRendered: function onRowsRendered() { - return null; - }, - onScroll: function onScroll() { - return null; - }, - overscanRowCount: 10, - scrollToAlignment: 'auto', - style: {} -}; -exports.default = VirtualScroll; -},{"../Grid":60,"classnames":undefined,"react":undefined,"react-addons-shallow-compare":18}],71:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.VirtualScroll = exports.default = undefined; - -var _VirtualScroll2 = require('./VirtualScroll'); - -var _VirtualScroll3 = _interopRequireDefault(_VirtualScroll2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _VirtualScroll3.default; -exports.VirtualScroll = _VirtualScroll3.default; -},{"./VirtualScroll":70}],72:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _reactDom = require('react-dom'); - -var _reactDom2 = _interopRequireDefault(_reactDom); - -var _reactAddonsShallowCompare = require('react-addons-shallow-compare'); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -var _raf = require('raf'); - -var _raf2 = _interopRequireDefault(_raf); - -var _onScroll = require('./utils/onScroll'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var WindowScroller = function (_Component) { - _inherits(WindowScroller, _Component); - - function WindowScroller(props) { - _classCallCheck(this, WindowScroller); - - var _this = _possibleConstructorReturn(this, (WindowScroller.__proto__ || Object.getPrototypeOf(WindowScroller)).call(this, props)); - - var height = typeof window !== 'undefined' ? window.innerHeight : 0; - - _this.state = { - isScrolling: false, - height: height, - scrollTop: 0 - }; - - _this._onScrollWindow = _this._onScrollWindow.bind(_this); - _this._onResizeWindow = _this._onResizeWindow.bind(_this); - _this._enablePointerEventsAfterDelayCallback = _this._enablePointerEventsAfterDelayCallback.bind(_this); - return _this; - } - - _createClass(WindowScroller, [{ - key: 'componentDidMount', - value: function componentDidMount() { - var height = this.state.height; - - // Subtract documentElement top to handle edge-case where a user is navigating back (history) from an already-scrolled bage. - // In this case the body's top position will be a negative number and this element's top will be increased (by that amount). - - this._positionFromTop = _reactDom2.default.findDOMNode(this).getBoundingClientRect().top - document.documentElement.getBoundingClientRect().top; - - if (height !== window.innerHeight) { - this.setState({ - height: window.innerHeight - }); - } - - (0, _onScroll.registerScrollListener)(this); - window.addEventListener('resize', this._onResizeWindow, false); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - (0, _onScroll.unregisterScrollListener)(this); - - window.removeEventListener('resize', this._onResizeWindow, false); - } - - /** - * Updates the state during the next animation frame. - * Use this method to avoid multiple renders in a small span of time. - * This helps performance for bursty events (like onScroll). - */ - - }, { - key: '_setNextState', - value: function _setNextState(state) { - var _this2 = this; - - if (this._setNextStateAnimationFrameId) { - _raf2.default.cancel(this._setNextStateAnimationFrameId); - } - - this._setNextStateAnimationFrameId = (0, _raf2.default)(function () { - _this2._setNextStateAnimationFrameId = null; - _this2.setState(state); - }); - } - }, { - key: 'render', - value: function render() { - var children = this.props.children; - var _state = this.state; - var isScrolling = _state.isScrolling; - var scrollTop = _state.scrollTop; - var height = _state.height; - - - return _react2.default.createElement( - 'div', - null, - children({ - height: height, - isScrolling: isScrolling, - scrollTop: scrollTop - }) - ); - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); - } - }, { - key: '_enablePointerEventsAfterDelayCallback', - value: function _enablePointerEventsAfterDelayCallback() { - this.setState({ - isScrolling: false - }); - } - }, { - key: '_onResizeWindow', - value: function _onResizeWindow(event) { - var onResize = this.props.onResize; - - - var height = window.innerHeight || 0; - - this.setState({ height: height }); - - onResize({ height: height }); - } - }, { - key: '_onScrollWindow', - value: function _onScrollWindow(event) { - var onScroll = this.props.onScroll; - - // In IE10+ scrollY is undefined, so we replace that with the latter - - var scrollY = 'scrollY' in window ? window.scrollY : document.documentElement.scrollTop; - - var scrollTop = Math.max(0, scrollY - this._positionFromTop); - - var state = { - isScrolling: true, - scrollTop: scrollTop - }; - - if (!this.state.isScrolling) { - this.setState(state); - } else { - this._setNextState(state); - } - - onScroll({ scrollTop: scrollTop }); - } - }]); - - return WindowScroller; -}(_react.Component); - -WindowScroller.propTypes = { - /** - * Function respondible for rendering children. - * This function should implement the following signature: - * ({ height, scrollTop }) => PropTypes.element - */ - children: _react.PropTypes.func.isRequired, - - /** Callback to be invoked on-resize: ({ height }) */ - onResize: _react.PropTypes.func.isRequired, - - /** Callback to be invoked on-scroll: ({ scrollTop }) */ - onScroll: _react.PropTypes.func.isRequired -}; -WindowScroller.defaultProps = { - onResize: function onResize() {}, - onScroll: function onScroll() {} -}; -exports.default = WindowScroller; -},{"./utils/onScroll":74,"raf":81,"react":undefined,"react-addons-shallow-compare":18,"react-dom":undefined}],73:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.IS_SCROLLING_TIMEOUT = exports.WindowScroller = exports.default = undefined; - -var _WindowScroller2 = require('./WindowScroller'); - -var _WindowScroller3 = _interopRequireDefault(_WindowScroller2); - -var _onScroll = require('./utils/onScroll'); - -var _onScroll2 = _interopRequireDefault(_onScroll); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _WindowScroller3.default; -exports.WindowScroller = _WindowScroller3.default; -exports.IS_SCROLLING_TIMEOUT = _onScroll2.default; -},{"./WindowScroller":72,"./utils/onScroll":74}],74:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.registerScrollListener = registerScrollListener; -exports.unregisterScrollListener = unregisterScrollListener; -var mountedInstances = []; -var originalBodyPointerEvents = null; -var disablePointerEventsTimeoutId = null; - -/** - * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress. - * This improves performance and makes scrolling smoother. + * @param {string} eventNameSuffix Event name, e.g. "click". + * @param {?boolean} capture Check if the capture phase is supported. + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT */ -var IS_SCROLLING_TIMEOUT = exports.IS_SCROLLING_TIMEOUT = 150; - -function enablePointerEventsIfDisabled() { - if (disablePointerEventsTimeoutId) { - disablePointerEventsTimeoutId = null; - - document.body.style.pointerEvents = originalBodyPointerEvents; - - originalBodyPointerEvents = null; - } -} - -function enablePointerEventsAfterDelayCallback() { - enablePointerEventsIfDisabled(); - mountedInstances.forEach(function (component) { - return component._enablePointerEventsAfterDelayCallback(); - }); -} - -function enablePointerEventsAfterDelay() { - if (disablePointerEventsTimeoutId) { - clearTimeout(disablePointerEventsTimeoutId); - } - - disablePointerEventsTimeoutId = setTimeout(enablePointerEventsAfterDelayCallback, IS_SCROLLING_TIMEOUT); -} - -function onScrollWindow(event) { - if (originalBodyPointerEvents == null) { - originalBodyPointerEvents = document.body.style.pointerEvents; - - document.body.style.pointerEvents = 'none'; - - enablePointerEventsAfterDelay(); - } - mountedInstances.forEach(function (component) { - return component._onScrollWindow(event); - }); -} - -function registerScrollListener(component) { - if (!mountedInstances.length) { - window.addEventListener('scroll', onScrollWindow); - } - mountedInstances.push(component); -} - -function unregisterScrollListener(component) { - mountedInstances = mountedInstances.filter(function (c) { - return c !== component; - }); - if (!mountedInstances.length) { - window.removeEventListener('scroll', onScrollWindow); - if (disablePointerEventsTimeoutId) { - clearTimeout(disablePointerEventsTimeoutId); - enablePointerEventsIfDisabled(); - } - } -} -},{}],75:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _ArrowKeyStepper = require('./ArrowKeyStepper'); - -Object.defineProperty(exports, 'ArrowKeyStepper', { - enumerable: true, - get: function get() { - return _ArrowKeyStepper.ArrowKeyStepper; - } -}); - -var _AutoSizer = require('./AutoSizer'); - -Object.defineProperty(exports, 'AutoSizer', { - enumerable: true, - get: function get() { - return _AutoSizer.AutoSizer; - } -}); - -var _CellMeasurer = require('./CellMeasurer'); - -Object.defineProperty(exports, 'CellMeasurer', { - enumerable: true, - get: function get() { - return _CellMeasurer.CellMeasurer; - } -}); -Object.defineProperty(exports, 'defaultCellMeasurerCellSizeCache', { - enumerable: true, - get: function get() { - return _CellMeasurer.defaultCellSizeCache; - } -}); -Object.defineProperty(exports, 'uniformSizeCellMeasurerCellSizeCache', { - enumerable: true, - get: function get() { - return _CellMeasurer.defaultCellSizeCache; - } -}); - -var _Collection = require('./Collection'); - -Object.defineProperty(exports, 'Collection', { - enumerable: true, - get: function get() { - return _Collection.Collection; - } -}); - -var _ColumnSizer = require('./ColumnSizer'); - -Object.defineProperty(exports, 'ColumnSizer', { - enumerable: true, - get: function get() { - return _ColumnSizer.ColumnSizer; - } -}); - -var _FlexTable = require('./FlexTable'); - -Object.defineProperty(exports, 'defaultFlexTableCellDataGetter', { - enumerable: true, - get: function get() { - return _FlexTable.defaultCellDataGetter; - } -}); -Object.defineProperty(exports, 'defaultFlexTableCellRenderer', { - enumerable: true, - get: function get() { - return _FlexTable.defaultCellRenderer; - } -}); -Object.defineProperty(exports, 'defaultFlexTableHeaderRenderer', { - enumerable: true, - get: function get() { - return _FlexTable.defaultHeaderRenderer; - } -}); -Object.defineProperty(exports, 'defaultFlexTableRowRenderer', { - enumerable: true, - get: function get() { - return _FlexTable.defaultRowRenderer; - } -}); -Object.defineProperty(exports, 'FlexTable', { - enumerable: true, - get: function get() { - return _FlexTable.FlexTable; - } -}); -Object.defineProperty(exports, 'FlexColumn', { - enumerable: true, - get: function get() { - return _FlexTable.FlexColumn; - } -}); -Object.defineProperty(exports, 'SortDirection', { - enumerable: true, - get: function get() { - return _FlexTable.SortDirection; - } -}); -Object.defineProperty(exports, 'SortIndicator', { - enumerable: true, - get: function get() { - return _FlexTable.SortIndicator; - } -}); - -var _Grid = require('./Grid'); - -Object.defineProperty(exports, 'defaultCellRangeRenderer', { - enumerable: true, - get: function get() { - return _Grid.defaultCellRangeRenderer; - } -}); -Object.defineProperty(exports, 'Grid', { - enumerable: true, - get: function get() { - return _Grid.Grid; - } -}); - -var _InfiniteLoader = require('./InfiniteLoader'); - -Object.defineProperty(exports, 'InfiniteLoader', { - enumerable: true, - get: function get() { - return _InfiniteLoader.InfiniteLoader; - } -}); - -var _ScrollSync = require('./ScrollSync'); - -Object.defineProperty(exports, 'ScrollSync', { - enumerable: true, - get: function get() { - return _ScrollSync.ScrollSync; - } -}); - -var _VirtualScroll = require('./VirtualScroll'); - -Object.defineProperty(exports, 'VirtualScroll', { - enumerable: true, - get: function get() { - return _VirtualScroll.VirtualScroll; - } -}); - -var _WindowScroller = require('./WindowScroller'); - -Object.defineProperty(exports, 'WindowScroller', { - enumerable: true, - get: function get() { - return _WindowScroller.WindowScroller; - } -}); -},{"./ArrowKeyStepper":35,"./AutoSizer":37,"./CellMeasurer":40,"./Collection":45,"./ColumnSizer":48,"./FlexTable":57,"./Grid":60,"./InfiniteLoader":67,"./ScrollSync":69,"./VirtualScroll":71,"./WindowScroller":73}],76:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = createCallbackMemoizer; -/** - * Helper utility that updates the specified callback whenever any of the specified indices have changed. - */ -function createCallbackMemoizer() { - var requireAllKeys = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0]; - - var cachedIndices = {}; - - return function (_ref) { - var callback = _ref.callback; - var indices = _ref.indices; - - var keys = Object.keys(indices); - var allInitialized = !requireAllKeys || keys.every(function (key) { - var value = indices[key]; - return Array.isArray(value) ? value.length > 0 : value >= 0; - }); - var indexChanged = keys.length !== Object.keys(cachedIndices).length || keys.some(function (key) { - var cachedValue = cachedIndices[key]; - var value = indices[key]; - - return Array.isArray(value) ? cachedValue.join(',') !== value.join(',') : cachedValue !== value; - }); - - cachedIndices = indices; - - if (allInitialized && indexChanged) { - callback(indices); - } - }; -} -},{}],77:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getUpdatedOffsetForIndex; -/** - * Determines a new offset that ensures a certain cell is visible, given the current offset. - * If the cell is already visible then the current offset will be returned. - * If the current offset is too great or small, it will be adjusted just enough to ensure the specified index is visible. +function r(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,a=n(8);a.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=r},function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=a[e];return!!r&&!!n[r]}function o(e){return r}var a={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=o},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){c.insertTreeBefore(e,t,n)}function a(e,t,n){Array.isArray(t)?l(e,t[0],t[1],n):m(e,t,n)}function i(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],s(e,t,n),e.removeChild(n)}e.removeChild(t)}function l(e,t,n,r){for(var o=t;;){var a=o.nextSibling;if(m(e,o,r),o===n)break;o=a}}function s(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function u(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&m(r,document.createTextNode(n),o):n?(h(o,n),s(r,o,t)):s(r,e,t)}var c=n(22),p=n(130),d=(n(7),n(10),n(44)),f=n(32),h=n(74),m=d(function(e,t,n){e.insertBefore(t,n)}),v=p.dangerouslyReplaceNodeWithMarkup,g={dangerouslyReplaceNodeWithMarkup:v,replaceDelimitedText:u,processUpdates:function(e,t){for(var n=0;n0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function a(e,t){var n=l.get(e);if(!n){return null}return n}var i=n(4),l=(n(14),n(28)),s=(n(10),n(12)),u=(n(1),n(3),{isMounted:function(e){var t=l.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){u.validateCallback(t,n);var o=a(e);if(!o)return null;o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],r(o)},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=a(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t,n){var o=a(e,"replaceState");o&&(o._pendingStateQueue=[t],o._pendingReplaceState=!0,void 0!==n&&null!==n&&(u.validateCallback(n,"replaceState"),o._pendingCallbacks?o._pendingCallbacks.push(n):o._pendingCallbacks=[n]),r(o))},enqueueSetState:function(e,t){var n=a(e,"setState");if(n){(n._pendingStateQueue||(n._pendingStateQueue=[])).push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e&&i("122",t,o(e))}});e.exports=u},function(e,t,n){"use strict";var r=(n(5),n(9)),o=(n(3),r);e.exports=o},function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,t>=32||13===t?t:0}e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r){var o=this;return r.ignoreAccents&&(t=(0,i.default)(t)),r.ignoreCase&&(t=t.toLowerCase()),r.trimFilter&&(t=(0,s.default)(t)),n&&(n=n.map(function(e){return e[r.valueKey]})),e.filter(function(e){if(n&&n.indexOf(e[r.valueKey])>-1)return!1;if(r.filterOption)return r.filterOption.call(o,e,t);if(!t)return!0;var a=String(e[r.valueKey]),l=String(e[r.labelKey]);return r.ignoreAccents&&("label"!==r.matchProp&&(a=(0,i.default)(a)),"value"!==r.matchProp&&(l=(0,i.default)(l))),r.ignoreCase&&("label"!==r.matchProp&&(a=a.toLowerCase()),"value"!==r.matchProp&&(l=l.toLowerCase())),"start"===r.matchPos?"label"!==r.matchProp&&a.substr(0,t.length)===t||"value"!==r.matchProp&&l.substr(0,t.length)===t:"label"!==r.matchProp&&a.indexOf(t)>=0||"value"!==r.matchProp&&l.indexOf(t)>=0})}Object.defineProperty(t,"__esModule",{value:!0});var a=n(92),i=r(a),l=n(194),s=r(l);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.focusedOption,n=e.instancePrefix,r=(e.labelKey,e.onFocus),o=e.onSelect,a=e.optionClassName,l=e.optionComponent,u=e.optionRenderer,c=e.options,p=e.valueArray,d=e.valueKey,f=e.onOptionRef,h=l;return c.map(function(e,l){var c=p&&p.some(function(t){return t[d]==e[d]}),m=e===t,v=(0,i.default)(a,{"Select-option":!0,"is-selected":c,"is-focused":m,"is-disabled":e.disabled});return s.default.createElement(h,{className:v,instancePrefix:n,isDisabled:e.disabled,isFocused:m,isSelected:c,key:"option-"+l+"-"+e[d],onFocus:r,onSelect:o,option:e,optionIndex:l,ref:function(e){f(e,m)}},u(e,l))})}Object.defineProperty(t,"__esModule",{value:!0});var a=n(23),i=r(a),l=n(2),s=r(l);t.default=o},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_MAX_SCROLL_SIZE=void 0;var a=function(){function e(e,t){for(var n=0;nthis._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{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(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize(),a=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:o});return Math.round(a*(o-r))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,o=e.currentOffset,a=e.targetIndex;o=this._safeOffsetToOffset({containerSize:r,offset:o});var i=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:r,currentOffset:o,targetIndex:a});return this._offsetToSafeOffset({containerSize:r,offset:i})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;return n=this._safeOffsetToOffset({containerSize:t,offset:n}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:n})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,n=e.offset,r=e.totalSize;return r<=t?0:n/(r-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return n;var a=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:r});return Math.round(a*(o-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return n;var a=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:o});return Math.round(a*(r-t))}}]),e}();t.default=u},function(e,t,n){"use strict";var r=n(2);!function(e){e&&e.__esModule}(r);Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_RowRendererParams",{value:{index:n(0).number.isRequired,isScrolling:n(0).bool.isRequired,isVisible:n(0).bool.isRequired,key:n(0).string.isRequired,parent:n(0).object.isRequired,style:n(0).object.isRequired},configurable:!0}),Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_RowRenderer",{value:n(0).func,configurable:!0}),Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_RenderedRows",{value:{overscanStartIndex:n(0).number.isRequired,overscanStopIndex:n(0).number.isRequired,startIndex:n(0).number.isRequired,stopIndex:n(0).number.isRequired},configurable:!0}),Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_Scroll",{value:{clientHeight:n(0).number.isRequired,scrollHeight:n(0).number.isRequired,scrollTop:n(0).number.isRequired},configurable:!0})},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||s}function o(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||s}function a(){}var i=n(24),l=n(5),s=n(58),u=(n(59),n(29));n(1),n(103);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&i("85"),this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};a.prototype=r.prototype,o.prototype=new a,o.prototype.constructor=o,l(o.prototype,r.prototype),o.prototype.isPureReactComponent=!0,e.exports={Component:r,PureComponent:o}},function(e,t,n){"use strict";var r=(n(3),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){},enqueueReplaceState:function(e,t){},enqueueSetState:function(e,t){}});e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},function(e,t,n){"use strict";var r=n(111);e.exports=function(e){return r(e,!1)}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e){return e}function o(e,t,n){function o(e,t){var n=y.hasOwnProperty(t)?y[t]:null;E.hasOwnProperty(t)&&l("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&l("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function u(e,n){if(n){l("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),l(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,a=r.__reactAutoBindPairs;n.hasOwnProperty(s)&&b.mixins(e,n.mixins);for(var i in n)if(n.hasOwnProperty(i)&&i!==s){var u=n[i],c=r.hasOwnProperty(i);if(o(c,i),b.hasOwnProperty(i))b[i](e,u);else{var p=y.hasOwnProperty(i),h="function"==typeof u,m=h&&!p&&!c&&!1!==n.autobind;if(m)a.push(i,u),r[i]=u;else if(c){var v=y[i];l(p&&("DEFINE_MANY_MERGED"===v||"DEFINE_MANY"===v),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",v,i),"DEFINE_MANY_MERGED"===v?r[i]=d(r[i],u):"DEFINE_MANY"===v&&(r[i]=f(r[i],u))}else r[i]=u}}}else;}function c(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in b;l(!o,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var a=n in e;l(!a,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),e[n]=r}}}function p(e,t){l(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in t)t.hasOwnProperty(n)&&(l(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function d(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return p(o,n),p(o,r),o}}function f(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function h(e,t){var n=t.bind(e);return n}function m(e){for(var t=e.__reactAutoBindPairs,n=0;n1)for(var n=1;n.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var i,l=v.createElement(j,{child:t});if(e){var s=E.get(e);i=s._processChildContext(s._context)}else i=k;var c=d(n);if(c){var p=c._currentElement,h=p.props.child;if(O(h,t)){var m=c._renderedComponent.getPublicInstance(),g=r&&function(){r.call(m)};return z._updateRootComponent(c,l,i,n,g),m}z.unmountComponentAtNode(n)}var y=o(n),b=y&&!!a(y),_=u(n),C=b&&!c&&!_,S=z._renderNewRootComponent(l,n,C,i)._renderedComponent.getPublicInstance();return r&&r.call(S),S},render:function(e,t,n){return z._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){c(e)||f("40");var t=d(e);if(!t){u(e),1===e.nodeType&&e.hasAttribute(I);return!1}return delete F[t._instance.rootID],T.batchedUpdates(s,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,a,i){if(c(t)||f("41"),a){var l=o(t);if(S.canReuseMarkup(e,l))return void y.precacheNode(n,l);var s=l.getAttribute(S.CHECKSUM_ATTR_NAME);l.removeAttribute(S.CHECKSUM_ATTR_NAME);var u=l.outerHTML;l.setAttribute(S.CHECKSUM_ATTR_NAME,s);var p=e,d=r(p,u),m=" (client) "+p.substring(d-20,d+20)+"\n (server) "+u.substring(d-20,d+20);t.nodeType===N&&f("42",m)}if(t.nodeType===N&&f("43"),i.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else R(t,e),y.precacheNode(n,t.firstChild)}};e.exports=z},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.HOST?e._renderedComponent:t===o.EMPTY?null:void 0}var o=n(81);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.onMouseDown;return i.default.createElement("span",{className:"Select-arrow",onMouseDown:t})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(2),i=r(a),l=n(0),s=r(l);o.propTypes={onMouseDown:s.default.func}},function(e,t,n){"use strict";function r(e){for(var t=0;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return g.default.createElement(C.default,e)}function u(e){var t=e.option,n=e.options,r=e.labelKey,o=e.valueKey;return 0===n.filter(function(e){return e[r]===t[r]||e[o]===t[o]}).length}function c(e){return!!e.label}function p(e){var t=e.label,n=e.labelKey,r=e.valueKey,o={};return o[r]=t,o[n]=t,o.className="Select-create-option-placeholder",o}function d(e){return'Create option "'+e+'"'}function f(e){switch(e.keyCode){case 9:case 13:case 188:return!0}return!1}Object.defineProperty(t,"__esModule",{value:!0});var h=Object.assign||function(e){for(var t=1;t=m.start&&E<=m.stop&&_>=v.start&&_<=v.stop,x=_+"-"+E,T=void 0;b&&f[x]?T=f[x]:i&&!i.has(_,E)?T={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(T={height:C.size,left:S.offset+l,position:"absolute",top:C.offset+h,width:S.size},f[x]=T);var k={columnIndex:E,isScrolling:s,isVisible:w,key:x,parent:u,rowIndex:_,style:T},P=void 0;!s||l||h?P=n(k):(t[x]||(t[x]=n(k)),P=t[x]),null!=P&&!1!==P&&g.push(P)}return g}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;n(6).babelPluginFlowReactPropTypes_proptype_CellRangeRendererParams||n(0).any},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestAnimationTimeout=t.cancelAnimationTimeout=void 0;var r=n(234);Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId",{value:{id:n(0).number.isRequired},configurable:!0});t.cancelAnimationTimeout=function(e){return(0,r.caf)(e.id)},t.requestAnimationTimeout=function(e,t){var n=Date.now(),o=function o(){Date.now()-n>=t?e.call():a.id=(0,r.raf)(o)},a={id:(0,r.raf)(o)};return a}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(2),a=r(o),i=n(64),l=r(i),s=n(11);r(s);n(196);var u=n(197),c=r(u),p=n(198),d=r(p),f=n(200),h=r(f),m=n(203),v=r(m),g=n(212),y=r(g),b=n(214),_=r(b),C=n(215),E=r(C),S=n(216),w=r(S),x=n(217),T=r(x),k=n(237),P=r(k);l.default.render(a.default.createElement("div",null,a.default.createElement(P.default,{label:"States",searchable:!0}),a.default.createElement(_.default,{label:"Multiselect"}),a.default.createElement(T.default,{label:"Virtualized"}),a.default.createElement(d.default,{label:"Contributors (Async)"}),a.default.createElement(h.default,{label:"GitHub users (Async with fetch.js)"}),a.default.createElement(E.default,{label:"Numeric Values"}),a.default.createElement(w.default,{label:"Boolean Values"}),a.default.createElement(y.default,{label:"Custom Render Methods"}),a.default.createElement(v.default,{label:"Custom Placeholder, Option, Value, and Arrow Components"}),a.default.createElement(c.default,{hint:"Enter a value that's NOT in the list, then hit return",label:"Custom tag creation"})),document.getElementById("example"))},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";function r(e){return(""+e).replace(_,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function a(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function i(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);g(e,a,r),o.release(r)}function l(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function s(e,t,n){var o=e.result,a=e.keyPrefix,i=e.func,l=e.context,s=i.call(l,t,e.count++);Array.isArray(s)?u(s,o,n,v.thatReturnsArgument):null!=s&&(m.isValidElement(s)&&(s=m.cloneAndReplaceKey(s,a+(!s.key||t&&t.key===s.key?"":r(s.key)+"/")+n)),o.push(s))}function u(e,t,n,o,a){var i="";null!=n&&(i=r(n)+"/");var u=l.getPooled(t,i,o,a);g(e,s,u),l.release(u)}function c(e,t,n){if(null==e)return e;var r=[];return u(e,r,null,t,n),r}function p(e,t,n){return null}function d(e,t){return g(e,p,null)}function f(e){var t=[];return u(e,t,null,v.thatReturnsArgument),t}var h=n(105),m=n(19),v=n(9),g=n(106),y=h.twoArgumentPooler,b=h.fourArgumentPooler,_=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,y),l.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(l,b);var C={forEach:i,map:c,mapIntoWithKeyPrefixInternal:u,count:d,toArray:f};e.exports=C},function(e,t,n){"use strict";var r=n(24),o=(n(1),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),a=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},i=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},l=function(e,t,n,r){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r),a}return new o(e,t,n,r)},s=function(e){var t=this;e instanceof t||r("25"),e.destructor(),t.instancePool.length8&&_<=11),S=32,w=String.fromCharCode(S),x={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},T=!1,k=null,P={eventTypes:x,extractEvents:function(e,t,n,r){return[s(e,t,n,r),p(e,t,n,r)]}};e.exports=P},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(5),a=n(17),i=n(68);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[i()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),a=o.length;for(e=0;e1?1-t:void 0;return this._fallbackText=o.slice(e,l),this._fallbackText}}),a.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(15),a={data:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(15),a={data:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=T.getPooled(A.change,e,t,n);return r.type="change",E.accumulateTwoPhaseDispatches(r),r}function o(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function a(e){var t=r(M,e,P(e));x.batchedUpdates(i,t)}function i(e){C.enqueueEvents(e),C.processEventQueue(!1)}function l(e,t){I=e,M=t,I.attachEvent("onchange",a)}function s(){I&&(I.detachEvent("onchange",a),I=null,M=null)}function u(e,t){var n=k.updateValueIfChanged(e),r=!0===t.simulated&&F._allowSimulatedPassThrough;if(n||r)return e}function c(e,t){if("topChange"===e)return t}function p(e,t,n){"topFocus"===e?(s(),l(t,n)):"topBlur"===e&&s()}function d(e,t){I=e,M=t,I.attachEvent("onpropertychange",h)}function f(){I&&(I.detachEvent("onpropertychange",h),I=null,M=null)}function h(e){"value"===e.propertyName&&u(M,e)&&a(e)}function m(e,t,n){"topFocus"===e?(f(),d(t,n)):"topBlur"===e&&f()}function v(e,t,n){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return u(M,n)}function g(e){var t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function y(e,t,n){if("topClick"===e)return u(t,n)}function b(e,t,n){if("topInput"===e||"topChange"===e)return u(t,n)}function _(e,t){if(null!=e){var n=e._wrapperState||t._wrapperState;if(n&&n.controlled&&"number"===t.type){var r=""+t.value;t.getAttribute("value")!==r&&t.setAttribute("value",r)}}}var C=n(26),E=n(25),S=n(8),w=n(7),x=n(12),T=n(15),k=n(71),P=n(39),R=n(40),O=n(72),A={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},I=null,M=null,N=!1;S.canUseDOM&&(N=R("change")&&(!document.documentMode||document.documentMode>8));var D=!1;S.canUseDOM&&(D=R("input")&&(!document.documentMode||document.documentMode>9));var F={eventTypes:A,_allowSimulatedPassThrough:!0,_isInputEventSupported:D,extractEvents:function(e,t,n,a){var i,l,s=t?w.getNodeFromInstance(t):window;if(o(s)?N?i=c:l=p:O(s)?D?i=b:(i=v,l=m):g(s)&&(i=y),i){var u=i(e,t,n);if(u){return r(u,n,a)}}l&&l(e,s,t),"topBlur"===e&&_(t,s)}};e.exports=F},function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):a.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):a.removeComponentAsRefFrom(t,e,n)}var a=n(125),i={};i.attachRefs=function(e,t){if(null!==t&&"object"==typeof t){var n=t.ref;null!=n&&r(n,e,t._owner)}},i.shouldUpdateRefs=function(e,t){var n=null,r=null;null!==e&&"object"==typeof e&&(n=e.ref,r=e._owner);var o=null,a=null;return null!==t&&"object"==typeof t&&(o=t.ref,a=t._owner),n!==o||"string"==typeof o&&a!==r},i.detachRefs=function(e,t){if(null!==t&&"object"==typeof t){var n=t.ref;null!=n&&o(n,e,t._owner)}},e.exports=i},function(e,t,n){"use strict";function r(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)}var o=n(4),a=(n(1),{addComponentAsRefTo:function(e,t,n){r(n)||o("119"),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){r(n)||o("120");var a=n.getPublicInstance();a&&a.refs[t]===e.getPublicInstance()&&n.detachRef(t)}});e.exports=a},function(e,t,n){"use strict";var r=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"];e.exports=r},function(e,t,n){"use strict";var r=n(25),o=n(7),a=n(31),i={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},l={eventTypes:i,extractEvents:function(e,t,n,l){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==e&&"topMouseOver"!==e)return null;var s;if(l.window===l)s=l;else{var u=l.ownerDocument;s=u?u.defaultView||u.parentWindow:window}var c,p;if("topMouseOut"===e){c=t;var d=n.relatedTarget||n.toElement;p=d?o.getClosestInstanceFromNode(d):null}else c=null,p=t;if(c===p)return null;var f=null==c?s:o.getNodeFromInstance(c),h=null==p?s:o.getNodeFromInstance(p),m=a.getPooled(i.mouseLeave,c,n,l);m.type="mouseleave",m.target=f,m.relatedTarget=h;var v=a.getPooled(i.mouseEnter,p,n,l);return v.type="mouseenter",v.target=h,v.relatedTarget=f,r.accumulateEnterLeaveDispatches(m,v,c,p),[m,v]}};e.exports=l},function(e,t,n){"use strict";var r=n(20),o=r.injection.MUST_USE_PROPERTY,a=r.injection.HAS_BOOLEAN_VALUE,i=r.injection.HAS_NUMERIC_VALUE,l=r.injection.HAS_POSITIVE_NUMERIC_VALUE,s=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,u={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:a,allowTransparency:0,alt:0,as:0,async:a,autoComplete:0,autoPlay:a,capture:a,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|a,cite:0,classID:0,className:0,cols:l,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:a,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:a,defer:a,dir:0,disabled:a,download:s,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:a,formTarget:0,frameBorder:0,headers:0,height:0,hidden:a,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:a,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|a,muted:o|a,name:0,nonce:0,noValidate:a,open:a,optimum:0,pattern:0,placeholder:0,playsInline:a,poster:0,preload:0,profile:0,radioGroup:0,readOnly:a,referrerPolicy:0,rel:0,required:a,reversed:a,role:0,rows:l,rowSpan:i,sandbox:0,scope:0,scoped:a,scrolling:0,seamless:a,selected:o|a,shape:0,size:l,sizes:0,span:l,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:i,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:a,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");"number"!==e.type||!1===e.hasAttribute("value")?e.setAttribute("value",""+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute("value",""+t)}}};e.exports=u},function(e,t,n){"use strict";var r=n(42),o=n(134),a={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};e.exports=a},function(e,t,n){"use strict";var r=n(4),o=n(22),a=n(8),i=n(131),l=n(9),s=(n(1),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(a.canUseDOM||r("56"),t||r("57"),"HTML"===e.nodeName&&r("58"),"string"==typeof t){var n=i(t,l)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}});e.exports=s},function(e,t,n){"use strict";function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function o(e,t){var n=u;u||s(!1);var o=r(e),a=o&&l(o);if(a){n.innerHTML=a[1]+e+a[2];for(var c=a[0];c--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t||s(!1),i(p).forEach(t));for(var d=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var a=n(8),i=n(132),l=n(133),s=n(1),u=a.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;e.exports=o},function(e,t,n){"use strict";function r(e){var t=e.length;if((Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e)&&i(!1),"number"!=typeof t&&i(!1),0===t||t-1 in e||i(!1),"function"==typeof e.callee&&i(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),r=0;r":"<"+e+">",l[e]=!i.firstChild),l[e]?d[e]:null}var o=n(8),a=n(1),i=o.canUseDOM?document.createElement("div"):null,l={},s=[1,'"],u=[1,"","
"],c=[3,"","
"],p=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c};["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"].forEach(function(e){d[e]=p,l[e]=!0}),e.exports=r},function(e,t,n){"use strict";var r=n(42),o=n(7),a={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=a},function(e,t,n){"use strict";function r(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function o(e,t){t&&(J[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&v("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&v("60"),"object"==typeof t.dangerouslySetInnerHTML&&W in t.dangerouslySetInnerHTML||v("61")),null!=t.style&&"object"!=typeof t.style&&v("62",r(e)))}function a(e,t,n,r){if(!(r instanceof N)){var o=e._hostContainerInfo,a=o._node&&o._node.nodeType===q,l=a?o._node:o._ownerDocument;B(t,l),r.getReactMountReady().enqueue(i,{inst:e,registrationName:t,listener:n})}}function i(){var e=this;w.putListener(e.inst,e.registrationName,e.listener)}function l(){var e=this;R.postMountWrapper(e)}function s(){var e=this;I.postMountWrapper(e)}function u(){var e=this;O.postMountWrapper(e)}function c(){F.track(this)}function p(){var e=this;e._rootNodeID||v("63");var t=z(e);switch(t||v("64"),e._tag){case"iframe":case"object":e._wrapperState.listeners=[T.trapBubbledEvent("topLoad","load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in K)K.hasOwnProperty(n)&&e._wrapperState.listeners.push(T.trapBubbledEvent(n,K[n],t));break;case"source":e._wrapperState.listeners=[T.trapBubbledEvent("topError","error",t)];break;case"img":e._wrapperState.listeners=[T.trapBubbledEvent("topError","error",t),T.trapBubbledEvent("topLoad","load",t)];break;case"form":e._wrapperState.listeners=[T.trapBubbledEvent("topReset","reset",t),T.trapBubbledEvent("topSubmit","submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[T.trapBubbledEvent("topInvalid","invalid",t)]}}function d(){A.postUpdateWrapper(this)}function f(e){$.call(Q,e)||(X.test(e)||v("65",e),Q[e]=!0)}function h(e,t){return e.indexOf("-")>=0||null!=t.is}function m(e){var t=e.type;f(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var v=n(4),g=n(5),y=n(136),b=n(137),_=n(22),C=n(43),E=n(20),S=n(77),w=n(26),x=n(36),T=n(34),k=n(65),P=n(7),R=n(147),O=n(149),A=n(78),I=n(150),M=(n(10),n(151)),N=n(158),D=(n(9),n(33)),F=(n(1),n(40),n(47),n(71)),L=(n(51),n(3),k),j=w.deleteListener,z=P.getNodeFromInstance,B=T.listenTo,V=x.registrationNameModules,U={string:!0,number:!0},W="__html",H={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},q=11,K={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},G={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Y={listing:!0,pre:!0,textarea:!0},J=g({menuitem:!0},G),X=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Q={},$={}.hasOwnProperty,Z=1;m.displayName="ReactDOMComponent",m.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=Z++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var a=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(p,this);break;case"input":R.mountWrapper(this,a,t),a=R.getHostProps(this,a),e.getReactMountReady().enqueue(c,this),e.getReactMountReady().enqueue(p,this);break;case"option":O.mountWrapper(this,a,t),a=O.getHostProps(this,a);break;case"select":A.mountWrapper(this,a,t),a=A.getHostProps(this,a),e.getReactMountReady().enqueue(p,this);break;case"textarea":I.mountWrapper(this,a,t),a=I.getHostProps(this,a),e.getReactMountReady().enqueue(c,this),e.getReactMountReady().enqueue(p,this)}o(this,a);var i,d;null!=t?(i=t._namespaceURI,d=t._tag):n._tag&&(i=n._namespaceURI,d=n._tag),(null==i||i===C.svg&&"foreignobject"===d)&&(i=C.html),i===C.html&&("svg"===this._tag?i=C.svg:"math"===this._tag&&(i=C.mathml)),this._namespaceURI=i;var f;if(e.useCreateElement){var h,m=n._ownerDocument;if(i===C.html)if("script"===this._tag){var v=m.createElement("div"),g=this._currentElement.type;v.innerHTML="<"+g+">",h=v.removeChild(v.firstChild)}else h=a.is?m.createElement(this._currentElement.type,a.is):m.createElement(this._currentElement.type);else h=m.createElementNS(i,this._currentElement.type);P.precacheNode(this,h),this._flags|=L.hasCachedChildNodes,this._hostParent||S.setAttributeForRoot(h),this._updateDOMProperties(null,a,e);var b=_(h);this._createInitialChildren(e,a,r,b),f=b}else{var E=this._createOpenTagMarkupAndPutListeners(e,a),w=this._createContentMarkup(e,a,r);f=!w&&G[this._tag]?E+"/>":E+">"+w+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(l,this),a.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(s,this),a.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"select":case"button":a.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(u,this)}return f},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(V.hasOwnProperty(r))o&&a(this,r,o,e);else{"style"===r&&(o&&(o=this._previousStyleCopy=g({},t.style)),o=b.createMarkupForStyles(o,this));var i=null;null!=this._tag&&h(this._tag,t)?H.hasOwnProperty(r)||(i=S.createMarkupForCustomAttribute(r,o)):i=S.createMarkupForProperty(r,o),i&&(n+=" "+i)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+S.createMarkupForRoot()),n+=" "+S.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var a=U[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)r=D(a);else if(null!=i){var l=this.mountChildren(i,e,n);r=l.join("")}}return Y[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&_.queueHTML(r,o.__html);else{var a=U[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)""!==a&&_.queueText(r,a);else if(null!=i)for(var l=this.mountChildren(i,e,n),s=0;s0;)e=e._hostParent,n--;for(;o-n>0;)t=t._hostParent,o--;for(var i=n;i--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function o(e,t){"_hostNode"in e||s("35"),"_hostNode"in t||s("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function a(e){return"_hostNode"in e||s("36"),e._hostParent}function i(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var o;for(o=r.length;o-- >0;)t(r[o],"captured",n);for(o=0;o0;)n(s[u],"captured",a)}var s=n(4);n(1);e.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:a,traverseTwoPhase:i,traverseEnterLeave:l}},function(e,t,n){"use strict";var r=n(4),o=n(5),a=n(42),i=n(22),l=n(7),s=n(33),u=(n(1),n(51),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(u.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,a=" react-text: "+o+" ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var u=n._ownerDocument,c=u.createComment(a),p=u.createComment(" /react-text "),d=i(u.createDocumentFragment());return i.queueChild(d,i(c)),this._stringText&&i.queueChild(d,i(u.createTextNode(this._stringText))),i.queueChild(d,i(p)),l.precacheNode(this,c),this._closingComment=p,d}var f=s(this._stringText);return e.renderToStaticMarkup?f:"\x3c!--"+a+"--\x3e"+f+"\x3c!-- /react-text --\x3e"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();a.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=l.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n&&r("67",this._domID),8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,l.uncacheNode(this)}}),e.exports=u},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(5),a=n(12),i=n(30),l=n(9),s={initialize:l,close:function(){d.isBatchingUpdates=!1}},u={initialize:l,close:a.flushBatchedUpdates.bind(a)},c=[u,s];o(r.prototype,i,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,a){var i=d.isBatchingUpdates;return d.isBatchingUpdates=!0,i?e(t,n,r,o,a):p.perform(e,null,t,n,r,o,a)}};e.exports=d},function(e,t,n){"use strict";function r(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function a(e){var t=f(e.nativeEvent),n=p.getClosestInstanceFromNode(t),o=n;do{e.ancestors.push(o),o=o&&r(o)}while(o);for(var a=0;at.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function l(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),a=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>a){var i=a;a=o,o=i}var l=u(e,o),s=u(e,a);if(l&&s){var p=document.createRange();p.setStart(l.node,l.offset),n.removeAllRanges(),o>a?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=n(8),u=n(169),c=n(68),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:a,setOffsets:p?i:l};e.exports=d},function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function a(e,t){for(var n=r(e),a=0,i=0;n;){if(3===n.nodeType){if(i=a+n.textContent.length,a<=t&&i>=t)return{node:n,offset:t-a};a=i}n=r(o(n))}}e.exports=a},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=n(171);e.exports=r},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(172);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!("function"==typeof n.Node?e instanceof n.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=r},function(e,t,n){"use strict";var r={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},a={Properties:{},DOMAttributeNamespaces:{xlinkActuate:r.xlink,xlinkArcrole:r.xlink,xlinkHref:r.xlink,xlinkRole:r.xlink,xlinkShow:r.xlink,xlinkTitle:r.xlink,xlinkType:r.xlink,xmlBase:r.xml,xmlLang:r.xml,xmlSpace:r.xml},DOMAttributeNames:{}};Object.keys(o).forEach(function(e){a.Properties[e]=0,o[e]&&(a.DOMAttributeNames[e]=o[e])}),e.exports=a},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&s.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(e,t){if(y||null==m||m!==c())return null;var n=r(m);if(!g||!d(g,n)){g=n;var o=u.getPooled(h.select,v,e,t);return o.type="select",o.target=m,a.accumulateTwoPhaseDispatches(o),o}return null}var a=n(25),i=n(8),l=n(7),s=n(87),u=n(15),c=n(88),p=n(72),d=n(47),f=i.canUseDOM&&"documentMode"in document&&document.documentMode<=11,h={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},m=null,v=null,g=null,y=!1,b=!1,_={eventTypes:h,extractEvents:function(e,t,n,r){if(!b)return null;var a=t?l.getNodeFromInstance(t):window;switch(e){case"topFocus":(p(a)||"true"===a.contentEditable)&&(m=a,v=t,g=null);break;case"topBlur":m=null,v=null,g=null;break;case"topMouseDown":y=!0;break;case"topContextMenu":case"topMouseUp":return y=!1,o(n,r);case"topSelectionChange":if(f)break;case"topKeyDown":case"topKeyUp":return o(n,r)}return null},didPutListener:function(e,t,n){"onSelect"===t&&(b=!0)}};e.exports=_},function(e,t,n){"use strict";function r(e){return"."+e._rootNodeID}function o(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}var a=n(4),i=n(86),l=n(25),s=n(7),u=n(176),c=n(177),p=n(15),d=n(178),f=n(179),h=n(31),m=n(181),v=n(182),g=n(183),y=n(27),b=n(184),_=n(9),C=n(52),E=(n(1),{}),S={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n="on"+t,r="top"+t,o={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[r]};E[e]=o,S[r]=o});var w={},x={eventTypes:E,extractEvents:function(e,t,n,r){var o=S[e];if(!o)return null;var i;switch(e){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":i=p;break;case"topKeyPress":if(0===C(n))return null;case"topKeyDown":case"topKeyUp":i=f;break;case"topBlur":case"topFocus":i=d;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":i=h;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":i=m;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":i=v;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":i=u;break;case"topTransitionEnd":i=g;break;case"topScroll":i=y;break;case"topWheel":i=b;break;case"topCopy":case"topCut":case"topPaste":i=c}i||a("86",e);var s=i.getPooled(o,t,n,r);return l.accumulateTwoPhaseDispatches(s),s},didPutListener:function(e,t,n){if("onClick"===t&&!o(e._tag)){var a=r(e),l=s.getNodeFromInstance(e);w[a]||(w[a]=i.listen(l,"click",_))}},willDeleteListener:function(e,t){if("onClick"===t&&!o(e._tag)){var n=r(e);w[n].remove(),delete w[n]}}};e.exports=x},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(15),a={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(15),a={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(27),a={relatedTarget:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(27),a=n(52),i=n(180),l=n(41),s={key:i,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:l,charCode:function(e){return"keypress"===e.type?a(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?a(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,s),e.exports=r},function(e,t,n){"use strict";function r(e){if(e.key){var t=a[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}var o=n(52),a={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(31),a={dataTransfer:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(27),a=n(41),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:a};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(15),a={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(31),a={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===o?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var o=(n(51),9);e.exports=r},function(e,t,n){"use strict";var r={useCreateElement:!0,useFiber:!1};e.exports=r},function(e,t,n){"use strict";var r=n(188),o=/\/?>/,a=/^<\!\-\-/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return a.test(e)?e:e.replace(o," "+i.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(i.CHECKSUM_ATTR_NAME);return n=n&&parseInt(n,10),r(e)===n}};e.exports=i},function(e,t,n){"use strict";function r(e){for(var t=1,n=0,r=0,a=e.length,i=-4&a;r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return d.default.createElement(v.default,e)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t-1?t:e}function f(e,t){t=t||{};var n=t.body;if(e instanceof f){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=d(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function m(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function v(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var g={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(g.arrayBuffer)var y=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(e){return e&&DataView.prototype.isPrototypeOf(e)},_=ArrayBuffer.isView||function(e){return e&&y.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},g.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var C=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this,{body:this._bodyInit})},p.call(f.prototype),p.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];v.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=f,e.Response=v,e.fetch=function(e,t){return new Promise(function(n,r){var o=new f(e,t),a=new XMLHttpRequest;a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:m(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;n(new v(t,e))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&g.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){return i.default.createElement("span",null,"+")}var a=n(2),i=r(a),l=n(13),s=r(l),u=n(0),c=r(u),p=n(11),d=r(p),f=n(204),h=r(f),m=n(211),v=(0,s.default)({propTypes:{children:c.default.node,className:c.default.string,isDisabled:c.default.bool,isFocused:c.default.bool,isSelected:c.default.bool,onFocus:c.default.func,onSelect:c.default.func,option:c.default.object.isRequired},handleMouseDown:function(e){e.preventDefault(),e.stopPropagation(),this.props.onSelect(this.props.option,e)},handleMouseEnter:function(e){this.props.onFocus(this.props.option,e)},handleMouseMove:function(e){this.props.isFocused||this.props.onFocus(this.props.option,e)},render:function(){var e={borderRadius:3,display:"inline-block",marginRight:10,position:"relative",top:-2,verticalAlign:"middle"};return i.default.createElement("div",{className:this.props.className,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,title:this.props.option.title},i.default.createElement(h.default,{email:this.props.option.email,size:15,style:e}),this.props.children)}}),g=(0,s.default)({propTypes:{children:c.default.node,placeholder:c.default.string,value:c.default.object},render:function(){var e={borderRadius:3,display:"inline-block",marginRight:10,position:"relative",top:-2,verticalAlign:"middle"};return i.default.createElement("div",{className:"Select-value",title:this.props.value.title},i.default.createElement("span",{className:"Select-value-label"},i.default.createElement(h.default,{email:this.props.value.email,size:15,style:e}),this.props.children))}}),y=(0,s.default)({propTypes:{hint:c.default.string,label:c.default.string},getInitialState:function(){return{}},setValue:function(e){this.setState({value:e})},render:function(){var e=i.default.createElement("span",null,"☺ Select User");return i.default.createElement("div",{className:"section"},i.default.createElement("h3",{className:"section-heading"},this.props.label," ",i.default.createElement("a",{href:"https://github.com/JedWatson/react-select/tree/master/examples/src/components/CustomComponents.js"},"(Source)")),i.default.createElement(d.default,{arrowRenderer:o,onChange:this.setValue,optionComponent:v,options:m,placeholder:e,value:this.state.value,valueComponent:g}),i.default.createElement("div",{className:"hint"},"This example implements custom Option and Value components to render a Gravatar image for each user based on their email. It also demonstrates rendering HTML elements as the placeholder."))}});e.exports=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=Object.assign||function(e){for(var t=1;t>>24)|4278255360&(l[f]<<24|l[f]>>>8);l[s>>>5]|=128<>>9<<4)]=s;for(var h=i._ff,m=i._gg,v=i._hh,g=i._ii,f=0;f>>0,c=c+b>>>0,p=p+_>>>0,d=d+C>>>0}return t.endian([u,c,p,d])};i._ff=function(e,t,n,r,o,a,i){var l=e+(t&n|~t&r)+(o>>>0)+i;return(l<>>32-a)+t},i._gg=function(e,t,n,r,o,a,i){var l=e+(t&r|n&~r)+(o>>>0)+i;return(l<>>32-a)+t},i._hh=function(e,t,n,r,o,a,i){var l=e+(t^n^r)+(o>>>0)+i;return(l<>>32-a)+t},i._ii=function(e,t,n,r,o,a,i){var l=e+(n^(t|~r))+(o>>>0)+i;return(l<>>32-a)+t},i._blocksize=16,i._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var r=t.wordsToBytes(i(e,n));return n&&n.asBytes?r:n&&n.asString?a.bytesToString(r):t.bytesToHex(r)}}()},function(e,t){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,o=0;r>>6-2*o);return n}};e.exports=n}()},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}/*! + * Determine if an object is a Buffer * - * @param align Desired alignment within container; one of "auto" (default), "start", or "end" - * @param cellOffset Offset (x or y) position for cell - * @param cellSize Size (width or height) of cell - * @param containerSize Total size (width or height) of the container - * @param currentOffset Container's current (x or y) offset - * @return Offset to use to ensure the specified cell is visible + * @author Feross Aboukhadijeh + * @license MIT */ -function getUpdatedOffsetForIndex(_ref) { - var _ref$align = _ref.align; - var align = _ref$align === undefined ? 'auto' : _ref$align; - var cellOffset = _ref.cellOffset; - var cellSize = _ref.cellSize; - var containerSize = _ref.containerSize; - var currentOffset = _ref.currentOffset; - - var maxOffset = cellOffset; - var 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)); - } -} -},{}],78:[function(require,module,exports){ -'use strict'; - -/** -* Detect Element Resize. -* Forked in order to guard against unsafe 'window' and 'document' references. -* -* https://github.com/sdecima/javascript-detect-element-resize -* Sebastian Decima -* -* version: 0.5.3 -**/ - -// Check `document` and `window` in case of server-side rendering -var _window; -if (typeof window !== 'undefined') { - _window = window; -} else if (typeof self !== 'undefined') { - _window = self; -} else { - _window = undefined; -} - -var attachEvent = typeof document !== 'undefined' && document.attachEvent; -var stylesCreated = false; - -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); - }; - }(); - - var cancelFrame = function () { - var cancel = _window.cancelAnimationFrame || _window.mozCancelAnimationFrame || _window.webkitCancelAnimationFrame || _window.clearTimeout; - return function (id) { - return cancel(id); - }; - }(); - - var resetTriggers = function resetTriggers(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; - }; - - var checkTriggers = function checkTriggers(element) { - return element.offsetWidth != element.__resizeLast__.width || element.offsetHeight != element.__resizeLast__.height; - }; - - var scrollListener = function scrollListener(e) { - var element = this; - resetTriggers(this); - if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__); - this.__resizeRAF__ = requestFrame(function () { - if (checkTriggers(element)) { - element.__resizeLast__.width = element.offsetWidth; - element.__resizeLast__.height = element.offsetHeight; - element.__resizeListeners__.forEach(function (fn) { - fn.call(element, e); - }); - } - }); - }; - - /* Detect CSS Animations support to detect element display/re-attach */ - var animation = false, - animationstring = 'animation', - keyframeprefix = '', - animationstartevent = 'animationstart', - domPrefixes = 'Webkit Moz O ms'.split(' '), - startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' '), - pfx = ''; - { - var elm = document.createElement('fakeelement'); - if (elm.style.animationName !== undefined) { - animation = true; - } - - if (animation === false) { - for (var i = 0; i < domPrefixes.length; i++) { - if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) { - pfx = domPrefixes[i]; - animationstring = pfx + 'Animation'; - keyframeprefix = '-' + pfx.toLowerCase() + '-'; - animationstartevent = startEvents[i]; - animation = true; - break; - } - } - } - } - - var animationName = 'resizeanim'; - var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } '; - var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; '; -} - -var createStyles = function createStyles() { - if (!stylesCreated) { - //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360 - 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; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', - head = document.head || document.getElementsByTagName('head')[0], - style = document.createElement('style'); - - style.type = 'text/css'; - if (style.styleSheet) { - style.styleSheet.cssText = css; - } else { - style.appendChild(document.createTextNode(css)); - } - - head.appendChild(style); - stylesCreated = true; - } -}; - -var addResizeListener = function addResizeListener(element, fn) { - if (attachEvent) element.attachEvent('onresize', fn);else { - if (!element.__resizeTriggers__) { - if (getComputedStyle(element).position == 'static') element.style.position = 'relative'; - createStyles(); - element.__resizeLast__ = {}; - element.__resizeListeners__ = []; - (element.__resizeTriggers__ = document.createElement('div')).className = 'resize-triggers'; - element.__resizeTriggers__.innerHTML = '
' + '
'; - element.appendChild(element.__resizeTriggers__); - resetTriggers(element); - element.addEventListener('scroll', scrollListener, true); - - /* Listen for a css animation to detect element display/re-attach */ - animationstartevent && element.__resizeTriggers__.addEventListener(animationstartevent, function (e) { - if (e.animationName == animationName) resetTriggers(element); - }); - } - element.__resizeListeners__.push(fn); - } -}; - -var removeResizeListener = function removeResizeListener(element, fn) { - if (attachEvent) element.detachEvent('onresize', fn);else { - element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1); - if (!element.__resizeListeners__.length) { - element.removeEventListener('scroll', scrollListener, true); - element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__); - } - } -}; - -module.exports = { - addResizeListener: addResizeListener, - removeResizeListener: removeResizeListener -}; -},{}],79:[function(require,module,exports){ -'use strict'; -module.exports = !!(typeof window !== 'undefined' && window.document && window.document.createElement); -},{}],80:[function(require,module,exports){ -'use strict'; - -var canUseDOM = require('./inDOM'); - -var size; - -module.exports = function (recalc) { - if (!size || recalc) { - if (canUseDOM) { - var scrollDiv = document.createElement('div'); - - scrollDiv.style.position = 'absolute'; - scrollDiv.style.top = '-9999px'; - scrollDiv.style.width = '50px'; - scrollDiv.style.height = '50px'; - scrollDiv.style.overflow = 'scroll'; - - document.body.appendChild(scrollDiv); - size = scrollDiv.offsetWidth - scrollDiv.clientWidth; - document.body.removeChild(scrollDiv); - } - } - - return size; -}; -},{"./inDOM":79}],81:[function(require,module,exports){ -(function (global){ -var now = require('performance-now') - , root = typeof window === 'undefined' ? global : window - , vendors = ['moz', 'webkit'] - , suffix = 'AnimationFrame' - , raf = root['request' + suffix] - , caf = root['cancel' + suffix] || root['cancelRequest' + suffix] - -for(var i = 0; !raf && i < vendors.length; i++) { - raf = root[vendors[i] + 'Request' + suffix] - caf = root[vendors[i] + 'Cancel' + suffix] - || root[vendors[i] + 'CancelRequest' + suffix] -} - -// Some versions of FF have rAF but not cAF -if(!raf || !caf) { - var last = 0 - , id = 0 - , queue = [] - , frameDuration = 1000 / 60 - - raf = function(callback) { - if(queue.length === 0) { - var _now = now() - , next = Math.max(0, frameDuration - (_now - last)) - last = next + _now - setTimeout(function() { - var cp = queue.slice(0) - // Clear queue here to prevent - // callbacks from appending listeners - // to the current frame's queue - queue.length = 0 - for(var i = 0; i < cp.length; i++) { - if(!cp[i].cancelled) { - try{ - cp[i].callback(last) - } catch(e) { - setTimeout(function() { throw e }, 0) - } - } - } - }, Math.round(next)) - } - queue.push({ - handle: ++id, - callback: callback, - cancelled: false - }) - return id - } - - caf = function(handle) { - for(var i = 0; i < queue.length; i++) { - if(queue[i].handle === handle) { - queue[i].cancelled = true - } - } - } -} - -module.exports = function(fn) { - // Wrap in a new function to prevent - // `cancel` potentially being assigned - // to the native rAF function - return raf.call(root, fn) -} -module.exports.cancel = function() { - caf.apply(root, arguments) -} -module.exports.polyfill = function() { - root.requestAnimationFrame = raf - root.cancelAnimationFrame = caf -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) - -},{"performance-now":82}],82:[function(require,module,exports){ -(function (process){ -// Generated by CoffeeScript 1.12.2 -(function() { - var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; - - if ((typeof performance !== "undefined" && performance !== null) && performance.now) { - module.exports = function() { - return performance.now(); - }; - } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { - module.exports = function() { - return (getNanoSeconds() - nodeLoadTime) / 1e6; - }; - hrtime = process.hrtime; - getNanoSeconds = function() { - var hr; - hr = hrtime(); - return hr[0] * 1e9 + hr[1]; - }; - moduleLoadTime = getNanoSeconds(); - upTime = process.uptime() * 1e9; - nodeLoadTime = moduleLoadTime - upTime; - } else if (Date.now) { - module.exports = function() { - return Date.now() - loadTime; - }; - loadTime = Date.now(); - } else { - module.exports = function() { - return new Date().getTime() - loadTime; - }; - loadTime = new Date().getTime(); - } - -}).call(this); - - - -}).call(this,require('_process')) - -},{"_process":20}]},{},[1]) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9yZWFjdC1jb21wb25lbnQtZ3VscC10YXNrcy9ub2RlX21vZHVsZXMvYnJvd3NlcmlmeS9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwiL1VzZXJzL3Nlcmthbm96ZXIvcHJvamVjdHMvcmVhY3Qtc2VsZWN0L2V4YW1wbGVzL3NyYy9hcHAuanMiLCIvVXNlcnMvc2Vya2Fub3plci9wcm9qZWN0cy9yZWFjdC1zZWxlY3QvZXhhbXBsZXMvc3JjL2NvbXBvbmVudHMvQm9vbGVhblNlbGVjdC5qcyIsIi9Vc2Vycy9zZXJrYW5vemVyL3Byb2plY3RzL3JlYWN0LXNlbGVjdC9leGFtcGxlcy9zcmMvY29tcG9uZW50cy9Db250cmlidXRvcnMuanMiLCIvVXNlcnMvc2Vya2Fub3plci9wcm9qZWN0cy9yZWFjdC1zZWxlY3QvZXhhbXBsZXMvc3JjL2NvbXBvbmVudHMvQ3JlYXRhYmxlLmpzIiwiL1VzZXJzL3Nlcmthbm96ZXIvcHJvamVjdHMvcmVhY3Qtc2VsZWN0L2V4YW1wbGVzL3NyYy9jb21wb25lbnRzL0N1c3RvbUNvbXBvbmVudHMuanMiLCIvVXNlcnMvc2Vya2Fub3plci9wcm9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0ZUVsZW1lbnQoX3JlYWN0VmlydHVhbGl6ZWQuVmlydHVhbFNjcm9sbCwge1xuICAgICAgICAgICAgY2xhc3NOYW1lOiAnVmlydHVhbFNlbGVjdEdyaWQnLFxuICAgICAgICAgICAgaGVpZ2h0OiBoZWlnaHQsXG4gICAgICAgICAgICByZWY6IGZ1bmN0aW9uIHJlZihfcmVmNSkge1xuICAgICAgICAgICAgICByZXR1cm4gX3RoaXMyLl92aXJ0dWFsU2Nyb2xsID0gX3JlZjU7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcm93Q291bnQ6IG9wdGlvbnMubGVuZ3RoLFxuICAgICAgICAgICAgcm93SGVpZ2h0OiBmdW5jdGlvbiByb3dIZWlnaHQoX3JlZjQpIHtcbiAgICAgICAgICAgICAgdmFyIGluZGV4ID0gX3JlZjQuaW5kZXg7XG4gICAgICAgICAgICAgIHJldHVybiBfdGhpczIuX2dldE9wdGlvbkhlaWdodCh7XG4gICAgICAgICAgICAgICAgb3B0aW9uOiBvcHRpb25zW2luZGV4XVxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByb3dSZW5kZXJlcjogd3JhcHBlZFJvd1JlbmRlcmVyLFxuICAgICAgICAgICAgc2Nyb2xsVG9JbmRleDogZm9jdXNlZE9wdGlvbkluZGV4LFxuICAgICAgICAgICAgd2lkdGg6IHdpZHRoXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiAnX2NhbGN1bGF0ZVZpcnR1YWxTY3JvbGxIZWlnaHQnLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBfY2FsY3VsYXRlVmlydHVhbFNjcm9sbEhlaWdodChfcmVmNikge1xuICAgICAgdmFyIG9wdGlvbnMgPSBfcmVmNi5vcHRpb25zO1xuICAgICAgdmFyIG1heEhlaWdodCA9IHRoaXMucHJvcHMubWF4SGVpZ2h0O1xuXG5cbiAgICAg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ZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7XG4gIHZhbHVlOiB0cnVlXG59KTtcblxudmFyIF9jcmVhdGVDbGFzcyA9IGZ1bmN0aW9uICgpIHsgZnVuY3Rpb24gZGVmaW5lUHJvcGVydGllcyh0YXJnZXQsIHByb3BzKSB7IGZvciAodmFyIGkgPSAwOyBpIDwgcHJvcHMubGVuZ3RoOyBpKyspIHsgdmFyIGRlc2NyaXB0b3IgPSBwcm9wc1tpXTsgZGVzY3JpcHRvci5lbnVtZXJhYmxlID0gZGVzY3JpcHRvci5lbnVtZXJhYmxlIHx8IGZhbHNlOyBkZXNjcmlwdG9yLmNvbmZpZ3VyYWJsZSA9IHRydWU7IGlmIChcInZhbHVlXCIgaW4gZGVzY3JpcHRvcikgZGVzY3JpcHRvci53cml0YWJsZSA9IHRydWU7IE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0YXJnZXQsIGRlc2NyaXB0b3Iua2V5LCBkZXNjcmlwdG9yKTsgfSB9IHJldHVybiBmdW5jdGlvbiAoQ29uc3RydWN0b3IsIHByb3RvUHJvcHMsIHN0YXRpY1Byb3BzKSB7IGlmIChwcm90b1Byb3BzKSBkZWZpbmVQcm9wZXJ0aWVzKENvbnN0cnVjdG9yLnByb3RvdHlwZSwgcHJvdG9Qcm9wcyk7IGlmIChzdGF0aWNQcm9wcykgZGVmaW5lUHJvcGVydGllcyhDb25zdHJ1Y3Rvciwgc3RhdGljUHJvcHMpOyByZXR1cm4gQ29uc3RydWN0b3I7IH07IH0oKTsgLyoqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogV2luZG93IFNlY3Rpb25zIGFyZSB1c2VkIHRvIGdyb3VwIG5lYXJieSBjZWxscy5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBUaGlzIGVuYWJsZXMgdXMgdG8gbW9yZSBxdWlja2x5IGRldGVybWluZSB3aGljaCBjZWxscyB0byBkaXNwbGF5IGluIGEgZ2l2ZW4gcmVnaW9uIG9mIHRoZSBXaW5kb3cuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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nRCeTogZGF0YUtleSxcbiAgICAgICAgICAgICAgc29ydERpcmVjdGlvbjogbmV3U29ydERpcmVjdGlvblxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBvbkhlYWRlckNsaWNrICYmIG9uSGVhZGVyQ2xpY2soeyBjb2x1bW5EYXRhOiBjb2x1bW5EYXRhLCBkYXRhS2V5OiBkYXRhS2V5IH0pO1xuICAgICAgICAgIH07XG5cbiAgICAgICAgICB2YXIgb25LZXlEb3duID0gZnVuY3Rpb24gb25LZXlEb3duKGV2ZW50KSB7XG4gICAgICAgICAgICBpZiAoZXZlbnQua2V5ID09PSAnRW50ZXInIHx8IGV2ZW50LmtleSA9PT0gJyAnKSB7XG4gICAgICAgICAgICAgIG9uQ2xpY2soKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuXG4gICAgICAgICAgYTExeVByb3BzWydhcmlhLWxhYmVsJ10gPSBjb2x1bW4ucHJvcHNbJ2FyaWEtbGFiZWwnXSB8fCBsYWJlbCB8fCBkYXRhS2V5O1xuICAgICAgICAgIGExMXlQcm9wcy5yb2xlID0gJ3Jvd2hlYWRlcic7XG4gICAgICAgICAgYTExeVByb3BzLnRhYkluZGV4ID0gMDtcbiAgICAgICAgICBhMTF5UHJvcHMub25DbGljayA9IG9uQ2xpY2s7XG4gICAgICAgICAgYTExeVByb3BzLm9uS2V5RG93biA9IG9uS2V5RG93bjtcbiAgICAgICAgfSkoKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIF9yZWFjdDIuZGVmYXVsdC5jcmVhdGVFbGVtZW50KFxuICAgICAgICAnZGl2JyxcbiAgICAgICAgX2V4dGVuZHMoe30sIGExMXlQcm9wcywge1xuICAgICAgICAgIGtleTogJ0hlYWRlci1Db2wnICsgaW5kZXgsXG4gICAgICAgICAgY2xhc3NOYW1lOiBjbGFzc05hbWVzLFxuICAgICAgICAgIHN0eWxlOiBzdHlsZVxuICAgICAgICB9KSxcbiAgICAgICAgcmVuZGVyZWRI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oRGF0ZS5ub3cpIHtcbiAgICBtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uKCkge1xuICAgICAgcmV0dXJuIERhdGUubm93KCkgLSBsb2FkVGltZTtcbiAgICB9O1xuICAgIGxvYWRUaW1lID0gRGF0ZS5ub3coKTtcbiAgfSBlbHNlIHtcbiAgICBtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uKCkge1xuICAgICAgcmV0dXJuIG5ldyBEYXRlKCkuZ2V0VGltZSgpIC0gbG9hZFRpbWU7XG4gICAgfTtcbiAgICBsb2FkVGltZSA9IG5ldyBEYXRlKCkuZ2V0VGltZSgpO1xuICB9XG5cbn0pLmNhbGwodGhpcyk7XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXBlcmZvcm1hbmNlLW5vdy5qcy5tYXBcbiJdfQ== +e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[a(t,e),"[",r,"]"].join(""):[a(t,e),"[",a(r,e),"]=",a(n,e)].join("")};case"bracket":return function(t,n){return null===n?a(t,e):[a(t,e),"[]=",a(n,e)].join("")};default:return function(t,n){return null===n?a(t,e):[a(t,e),"=",a(n,e)].join("")}}}function o(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),!t)return void(r[e]=n);void 0===r[e]&&(r[e]={}),r[e][t[1]]=n};case"bracket":return function(e,n,r){return t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0===r[e]?void(r[e]=[n]):void(r[e]=[].concat(r[e],n)):void(r[e]=n)};default:return function(e,t,n){if(void 0===n[e])return void(n[e]=t);n[e]=[].concat(n[e],t)}}}function a(e,t){return t.encode?t.strict?l(e):encodeURIComponent(e):e}function i(e){return Array.isArray(e)?e.sort():"object"==typeof e?i(Object.keys(e)).sort(function(e,t){return Number(e)-Number(t)}).map(function(t){return e[t]}):e}var l=n(209),s=n(5);t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e,t){t=s({arrayFormat:"none"},t);var n=o(t),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach(function(e){var t=e.replace(/\+/g," ").split("="),o=t.shift(),a=t.length>0?t.join("="):void 0;a=void 0===a?null:decodeURIComponent(a),n(decodeURIComponent(o),a,r)}),Object.keys(r).sort().reduce(function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=i(n):e[t]=n,e},Object.create(null))):r},t.stringify=function(e,t){t=s({encode:!0,strict:!0,arrayFormat:"none"},t);var n=r(t);return e?Object.keys(e).sort().map(function(r){var o=e[r];if(void 0===o)return"";if(null===o)return a(r,t);if(Array.isArray(o)){var i=[];return o.slice().forEach(function(e){void 0!==e&&i.push(n(r,e,i.length))}),i.join("&")}return a(r,t)+"="+a(o,t)}).filter(function(e){return e.length>0}).join("&"):""}},function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},function(e,t){e.exports=function(){var e;if("undefined"!=typeof window&&null!==window){if(e="(-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5/4), (min-resolution: 1.25dppx)",window.devicePixelRatio>1.25)return!0;if(window.matchMedia&&window.matchMedia(e).matches)return!0}return!1}},function(e,t,n){"use strict";e.exports=[{value:"John Smith",label:"John Smith",email:"john@smith.com"},{value:"Merry Jane",label:"Merry Jane",email:"merry@jane.com"},{value:"Stan Hoper",label:"Stan Hoper",email:"stan@hoper.com"}]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(2),a=r(o),i=n(13),l=r(i),s=n(0),u=r(s),c=n(11),p=r(c),d=n(213),f=r(d),h=(0,l.default)({displayName:"DisabledUpsellOptions",propTypes:{label:u.default.string},getInitialState:function(){return{}},setValue:function(e){this.setState({value:e}),e&&console.log("Support level selected:",e.label)},renderLink:function(){return a.default.createElement("a",{style:{marginLeft:5},href:"/upgrade",target:"_blank"},"Upgrade here!")},renderOption:function(e){return a.default.createElement(f.default,{searchWords:[this._inputValue],textToHighlight:e.label})},renderValue:function(e){return a.default.createElement("strong",{style:{color:e.color}},e.label)},render:function(){var e=this,t=[{label:"Basic customer support",value:"basic",color:"#E31864"},{label:"Premium customer support",value:"premium",color:"#6216A3"},{label:"Pro customer support",value:"pro",disabled:!0,link:this.renderLink()}];return a.default.createElement("div",{className:"section"},a.default.createElement("h3",{className:"section-heading"},this.props.label," ",a.default.createElement("a",{href:"https://github.com/JedWatson/react-select/tree/master/examples/src/components/CustomRender.js"},"(Source)")),a.default.createElement(p.default,{onInputChange:function(t){return e._inputValue=t},options:t,optionRenderer:this.renderOption,onChange:this.setValue,value:this.state.value,valueRenderer:this.renderValue}),a.default.createElement("div",{className:"hint"},"This demonstrates custom render methods and links in disabled options"))}});e.exports=h},function(e,t,n){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=o.default,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.activeClassName,n=void 0===t?"":t,r=e.activeIndex,o=void 0===r?-1:r,i=e.autoEscape,l=e.className,s=e.highlightClassName,c=void 0===s?"":s,p=e.highlightStyle,d=void 0===p?{}:p,f=e.highlightTag,h=void 0===f?"mark":f,m=e.sanitize,v=e.searchWords,g=e.textToHighlight,y=e.unhighlightClassName,b=void 0===y?"":y,_=e.unhighlightStyle,C=(0,a.findAll)({autoEscape:i,sanitize:m,searchWords:v,textToHighlight:g}),E=h,S=-1,w="";return u.default.createElement("span",{className:l},C.map(function(e,t){var r=g.substr(e.start,e.end-e.start);return e.highlight?(S++,w=c+" "+(S===+o?n:""),u.default.createElement(E,{className:w,key:t,style:d},r)):u.default.createElement("span",{className:b,key:t,style:_},r)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(3),i=n(4),l=r(i),s=n(13),u=r(s);o.propTypes={activeClassName:l.default.string,activeIndex:l.default.number,autoEscape:l.default.bool,className:l.default.string,highlightClassName:l.default.string,highlightStyle:l.default.object,highlightTag:l.default.string,sanitize:l.default.func,searchWords:l.default.arrayOf(l.default.string).isRequired,textToHighlight:l.default.string.isRequired,unhighlightClassName:l.default.string,unhighlightStyle:l.default.object},e.exports=t.default},function(e,t){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);Object.defineProperty(t,"combineChunks",{enumerable:!0,get:function(){return r.combineChunks}}),Object.defineProperty(t,"fillInChunks",{enumerable:!0,get:function(){return r.fillInChunks}}),Object.defineProperty(t,"findAll",{enumerable:!0,get:function(){return r.findAll}}),Object.defineProperty(t,"findChunks",{enumerable:!0,get:function(){return r.findChunks}})},function(e,t){"use strict";function n(e){return e}function r(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}Object.defineProperty(t,"__esModule",{value:!0});var o=(t.findAll=function(e){var t=e.autoEscape,n=e.sanitize,r=e.searchWords,l=e.textToHighlight;return i({chunksToHighlight:o({chunks:a({autoEscape:t,sanitize:n,searchWords:r,textToHighlight:l})}),totalLength:l.length})},t.combineChunks=function(e){var t=e.chunks;return t=t.sort(function(e,t){return e.start-t.start}).reduce(function(e,t){if(0===e.length)return[t];var n=e.pop();if(t.start<=n.end){var r=Math.max(n.end,t.end);e.push({start:n.start,end:r})}else e.push(n,t);return e},[])}),a=t.findChunks=function(e){var t=e.autoEscape,o=e.sanitize,a=void 0===o?n:o,i=e.searchWords,l=e.textToHighlight;return l=a(l),i.filter(function(e){return e}).reduce(function(e,n){n=a(n),t&&(n=r(n));for(var o=new RegExp(n,"gi"),i=void 0;i=o.exec(l);)e.push({start:i.index,end:o.lastIndex});return e},[])},i=t.fillInChunks=function(e){var t=e.chunksToHighlight,n=e.totalLength,r=[],o=function(e,t,n){t-e>0&&r.push({start:e,end:t,highlight:n})};return 0===t.length?o(0,n,!1):function(){var e=0;t.forEach(function(t){o(e,t.start,!1),o(t.start,t.end,!0),e=t.end}),o(e,n,!1)}(),r}}])},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r};e.exports=n(6)(o,!0)}else e.exports=n(12)()}).call(t,n(5))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function i(){m&&f&&(m=!1,f.length?h=f.concat(h):v=-1,h.length&&l())}function l(){if(!m){var e=o(i);m=!0;for(var t=h.length;t;){for(f=h,h=[];++v1)for(var n=1;n1?t-1:0),r=1;r2?r-2:0),a=2;a0&&void 0!==arguments[0]?arguments[0]:0;this._listRef&&this._listRef.recomputeRowHeights(e)}},{key:"focus",value:function(){if(this._selectRef)return this._selectRef.focus()}},{key:"render",value:function(){var e=this._getSelectComponent();return d.default.createElement(e,l({},this.props,{ref:this._setSelectRef,menuRenderer:this._renderMenu,menuStyle:{overflow:"hidden"}}))}},{key:"_renderMenu",value:function(e){function t(e){var t=e.index,n=e.key,l=e.style,c=s[t];return g({focusedOption:r,focusedOptionIndex:h,focusOption:o,key:n,labelKey:a,onSelect:i,option:c,optionIndex:t,options:s,selectValue:i,style:l,valueArray:u})}var n=this,r=e.focusedOption,o=e.focusOption,a=e.labelKey,i=e.onSelect,s=e.options,u=(e.selectValue,e.valueArray),c=this.props,p=c.listProps,f=c.optionRenderer,h=s.indexOf(r),m=this._calculateListHeight({options:s}),g=f||this._optionRenderer;return d.default.createElement(v.default,{disableHeight:!0},function(e){var r=e.width;return d.default.createElement(y.default,l({className:"VirtualSelectGrid",height:m,ref:n._setListRef,rowCount:s.length,rowHeight:function(e){var t=e.index;return n._getOptionHeight({option:s[t]})},rowRenderer:t,scrollToIndex:h,width:r},p))})}},{key:"_calculateListHeight",value:function(e){for(var t=e.options,n=this.props.maxHeight,r=0,o=0;on)return n}return r}},{key:"_getOptionHeight",value:function(e){var t=e.option,n=this.props.optionHeight;return n instanceof Function?n({option:t}):n}},{key:"_getSelectComponent",value:function(){var e=this.props,t=e.async,n=e.selectComponent;return n||(t?h.default.Async:h.default)}},{key:"_optionRenderer",value:function(e){var t=e.focusedOption,n=e.focusOption,r=e.key,o=e.labelKey,a=e.option,i=e.selectValue,s=e.style,u=e.valueArray,c=["VirtualizedSelectOption"];a===t&&c.push("VirtualizedSelectFocusedOption"),a.disabled&&c.push("VirtualizedSelectDisabledOption"),u&&u.indexOf(a)>=0&&c.push("VirtualizedSelectSelectedOption"),a.className&&c.push(a.className);var p=a.disabled?{}:{onClick:function(){return i(a)},onMouseOver:function(){return n(a)}};return d.default.createElement("div",l({className:c.join(" "),key:r,style:s,title:a.title},p),a[o])}},{key:"_setListRef",value:function(e){this._listRef=e}},{key:"_setSelectRef",value:function(e){this._selectRef=e}}]),t}(p.Component);b.propTypes={async:c.default.bool,listProps:c.default.object,maxHeight:c.default.number.isRequired,optionHeight:c.default.oneOfType([c.default.number,c.default.func]).isRequired,optionRenderer:c.default.func,selectComponent:c.default.func},b.defaultProps={async:!1,maxHeight:200,optionHeight:35},t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(222);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(o).default}}),Object.defineProperty(t,"AutoSizer",{enumerable:!0,get:function(){return r(o).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n 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%; }',n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.id="detectElementResize",r.type="text/css",null!=e&&r.setAttribute("nonce",e),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t)),n.appendChild(r)}};return{addResizeListener:function(e,r){if(n)e.attachEvent("onresize",r);else{if(!e.__resizeTriggers__){var o=t.getComputedStyle(e);o&&"static"==o.position&&(e.style.position="relative"),b(),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=document.createElement("div")).className="resize-triggers",e.__resizeTriggers__.innerHTML='
',e.appendChild(e.__resizeTriggers__),a(e),e.addEventListener("scroll",l,!0),c&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName==v&&a(e)},e.__resizeTriggers__.addEventListener(c,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(r)}},removeResizeListener:function(e,t){if(n)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",l,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(c,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"babelPluginFlowReactPropTypes_proptype_Size",{value:{height:n(0).number.isRequired,width:n(0).number.isRequired},configurable:!0})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(226);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(o).default}}),Object.defineProperty(t,"List",{enumerable:!0,get:function(){return r(o).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:o,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.noRowsRenderer,r=e.scrollToIndex,o=e.width,a=(0,h.default)("ReactVirtualized__List",t);return d.default.createElement(c.default,l({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:a,columnWidth:o,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}]),t}(d.default.PureComponent);_.defaultProps={autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:u.accessibilityOverscanIndicesGetter,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}},_.propTypes={"aria-label":n(0).string,autoHeight:n(0).bool.isRequired,className:n(0).string,estimatedRowSize:n(0).number.isRequired,height:n(0).number.isRequired,noRowsRenderer:"function"==typeof y?y.isRequired?y.isRequired:y:n(0).shape(y).isRequired,onRowsRendered:n(0).func.isRequired,onScroll:n(0).func.isRequired,overscanIndicesGetter:"function"==typeof m?m.isRequired?m.isRequired:m:n(0).shape(m).isRequired,overscanRowCount:n(0).number.isRequired,rowHeight:"function"==typeof v?v.isRequired?v.isRequired:v:n(0).shape(v).isRequired,rowRenderer:"function"==typeof b?b.isRequired?b.isRequired:b:n(0).shape(b).isRequired,rowCount:n(0).number.isRequired,scrollToAlignment:"function"==typeof g?g.isRequired?g.isRequired:g:n(0).shape(g).isRequired,scrollToIndex:n(0).number.isRequired,scrollTop:n(0).number,style:n(0).object.isRequired,tabIndex:n(0).number,width:n(0).number.isRequired},t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(null==e)throw new TypeError("Cannot destructure undefined")}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SCROLLING_RESET_TIME_INTERVAL=void 0;var s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?this.props.scrollToAlignment:t,r=e.columnIndex,o=void 0===r?this.props.scrollToColumn:r,a=e.rowIndex,i=void 0===a?this.props.scrollToRow:a,l=s({},this.props,{scrollToAlignment:n,scrollToColumn:o,scrollToRow:i});return{scrollLeft:this._getCalculatedScrollLeft(l),scrollTop:this._getCalculatedScrollTop(l)}}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,n=void 0===t?0:t,r=e.scrollTop,o=void 0===r?0:r;if(!(o<0)){this._debounceScrollEnded();var a=this.props,i=a.autoHeight,l=a.autoWidth,s=a.height,u=a.width,c=this._scrollbarSize,p=this._rowSizeAndPositionManager.getTotalSize(),d=this._columnSizeAndPositionManager.getTotalSize(),f=Math.min(Math.max(0,d-u+c),n),h=Math.min(Math.max(0,p-s+c),o);if(this.state.scrollLeft!==f||this.state.scrollTop!==h){var m=f!==this.state.scrollLeft?f>this.state.scrollLeft?_.SCROLL_DIRECTION_FORWARD:_.SCROLL_DIRECTION_BACKWARD:this.state.scrollDirectionHorizontal,v=h!==this.state.scrollTop?h>this.state.scrollTop?_.SCROLL_DIRECTION_FORWARD:_.SCROLL_DIRECTION_BACKWARD:this.state.scrollDirectionVertical,g={isScrolling:!0,scrollDirectionHorizontal:m,scrollDirectionVertical:v,scrollPositionChangeReason:F.OBSERVED};i||(g.scrollTop=h),l||(g.scrollLeft=f),this.setState(g)}this._invokeOnScrollMemoizer({scrollLeft:f,scrollTop:h,totalColumnsWidth:d,totalRowsHeight:p})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,n):n}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,n=e.rowCount;this._columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),this._rowSizeAndPositionManager.getSizeAndPositionOfCell(n-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r,a=this.props,i=a.scrollToColumn,l=a.scrollToRow;this._columnSizeAndPositionManager.resetCell(n),this._rowSizeAndPositionManager.resetCell(o),this._recomputeScrollLeftFlag=i>=0&&n<=i,this._recomputeScrollTopFlag=l>=0&&o<=l,this._cellCache={},this._styleCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,n=e.rowIndex,r=this.props.columnCount,o=this.props;r>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(s({},o,{scrollToColumn:t})),void 0!==n&&this._updateScrollTopForScrollToRow(s({},o,{scrollToRow:n}))}},{key:"componentDidMount",value:function(){var e=this.props,t=e.getScrollbarSize,n=e.height,r=e.scrollLeft,o=e.scrollToColumn,a=e.scrollTop,i=e.scrollToRow,l=e.width;this._handleInvalidatedGridSize(),this._scrollbarSizeMeasured||(this._scrollbarSize=t(),this._scrollbarSizeMeasured=!0,this.setState({})),("number"==typeof r&&r>=0||"number"==typeof a&&a>=0)&&this.scrollToPosition({scrollLeft:r,scrollTop:a});var s=n>0&&l>0;o>=0&&s&&this._updateScrollLeftForScrollToColumn(),i>=0&&s&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:r||0,scrollTop:a||0,totalColumnsWidth:this._columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:this._rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=this.props,o=r.autoHeight,a=r.autoWidth,i=r.columnCount,l=r.height,s=r.rowCount,u=r.scrollToAlignment,c=r.scrollToColumn,p=r.scrollToRow,d=r.width,f=this.state,h=f.scrollLeft,m=f.scrollPositionChangeReason,v=f.scrollTop;this._handleInvalidatedGridSize();var g=i>0&&0===e.columnCount||s>0&&0===e.rowCount;m===F.REQUESTED&&(!a&&h>=0&&(h!==t.scrollLeft&&h!==this._scrollingContainer.scrollLeft||g)&&(this._scrollingContainer.scrollLeft=h),!o&&v>=0&&(v!==t.scrollTop&&v!==this._scrollingContainer.scrollTop||g)&&(this._scrollingContainer.scrollTop=v));var y=(0===e.width||0===e.height)&&l>0&&d>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):(0,S.default)({cellSizeAndPositionManager:this._columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:h,scrollToAlignment:u,scrollToIndex:c,size:d,sizeJustIncreasedFromZero:y,updateScrollIndexCallback:function(){return n._updateScrollLeftForScrollToColumn(n.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):(0,S.default)({cellSizeAndPositionManager:this._rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:v,scrollToAlignment:u,scrollToIndex:p,size:l,sizeJustIncreasedFromZero:y,updateScrollIndexCallback:function(){return n._updateScrollTopForScrollToRow(n.props)}}),this._invokeOnGridRenderedHelper(),h!==t.scrollLeft||v!==t.scrollTop){var b=this._rowSizeAndPositionManager.getTotalSize(),_=this._columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:h,scrollTop:v,totalColumnsWidth:_,totalRowsHeight:b})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillMount",value:function(){var e=this.props.getScrollbarSize;this._scrollbarSize=e(),void 0===this._scrollbarSize?(this._scrollbarSizeMeasured=!1,this._scrollbarSize=0):this._scrollbarSizeMeasured=!0,this._calculateChildrenToRender()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&(0,P.cancelAnimationTimeout)(this._disablePointerEventsTimeoutId)}},{key:"componentWillReceiveProps",value:function(e){var t=this,n=this.state,r=n.scrollLeft,o=n.scrollTop;if(0===e.columnCount&&0!==r||0===e.rowCount&&0!==o)this.scrollToPosition({scrollLeft:0,scrollTop:0});else if(e.scrollLeft!==this.props.scrollLeft||e.scrollTop!==this.props.scrollTop){var a={};null!=e.scrollLeft&&(a.scrollLeft=e.scrollLeft),null!=e.scrollTop&&(a.scrollTop=e.scrollTop),this.scrollToPosition(a)}e.columnWidth===this.props.columnWidth&&e.rowHeight===this.props.rowHeight||(this._styleCache={}),this._columnWidthGetter=this._wrapSizeGetter(e.columnWidth),this._rowHeightGetter=this._wrapSizeGetter(e.rowHeight),this._columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:this._getEstimatedColumnSize(e)}),this._rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:this._getEstimatedRowSize(e)});var i=this.props,l=i.columnCount,s=i.rowCount;0!==l&&0!==s||(l=0,s=0),e.autoHeight&&!1===e.isScrolling&&!0===this.props.isScrolling&&this._resetStyleCache(),(0,m.default)({cellCount:l,cellSize:"number"==typeof this.props.columnWidth?this.props.columnWidth:null,computeMetadataCallback:function(){return t._columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"==typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:this.props.scrollToColumn,updateScrollOffsetForScrollToIndex:function(){return t._updateScrollLeftForScrollToColumn(e,t.state)}}),(0,m.default)({cellCount:s,cellSize:"number"==typeof this.props.rowHeight?this.props.rowHeight:null,computeMetadataCallback:function(){return t._rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"==typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:this.props.scrollToRow,updateScrollOffsetForScrollToIndex:function(){return t._updateScrollTopForScrollToRow(e,t.state)}})}},{key:"componentWillUpdate",value:function(e,t){this._calculateChildrenToRender(e,t)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,n=e.autoHeight,r=e.autoWidth,o=e.className,a=e.containerProps,i=e.containerRole,l=e.containerStyle,u=e.height,c=e.id,d=e.noContentRenderer,h=e.role,m=e.style,v=e.tabIndex,g=e.width,y=this._isScrolling(),b={boxSizing:"border-box",direction:"ltr",height:n?"auto":u,position:"relative",width:r?"auto":g,WebkitOverflowScrolling:"touch",willChange:"transform"},_=this._columnSizeAndPositionManager.getTotalSize(),C=this._rowSizeAndPositionManager.getTotalSize(),E=C>u?this._scrollbarSize:0,S=_>g?this._scrollbarSize:0;S===this._horizontalScrollBarSize&&E===this._verticalScrollBarSize||(this._horizontalScrollBarSize=S,this._verticalScrollBarSize=E,this._scrollbarPresenceChanged=!0),b.overflowX=_+E<=g?"hidden":"auto",b.overflowY=C+S<=u?"hidden":"auto";var w=this._childrenToDisplay,x=0===w.length&&u>0&&g>0;return p.default.createElement("div",s({ref:this._setScrollingContainerRef},a,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:(0,f.default)("ReactVirtualized__Grid",o),id:c,onScroll:this._onScroll,role:h,style:s({},b,m),tabIndex:v}),w.length>0&&p.default.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:i,style:s({width:t?"auto":_,height:C,maxWidth:_,maxHeight:C,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"},l)},w),x&&d())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e.cellRenderer,r=e.cellRangeRenderer,o=e.columnCount,a=e.deferredMeasurementCache,i=e.height,l=e.overscanColumnCount,s=e.overscanIndicesGetter,u=e.overscanRowCount,c=e.rowCount,p=e.width,d=t.scrollDirectionHorizontal,f=t.scrollDirectionVertical,h=t.scrollLeft,m=t.scrollTop,v=this._isScrolling(e,t);if(this._childrenToDisplay=[],i>0&&p>0){var g=this._columnSizeAndPositionManager.getVisibleCellRange({containerSize:p,offset:h}),y=this._rowSizeAndPositionManager.getVisibleCellRange({containerSize:i,offset:m}),b=this._columnSizeAndPositionManager.getOffsetAdjustment({containerSize:p,offset:h}),_=this._rowSizeAndPositionManager.getOffsetAdjustment({containerSize:i,offset:m});this._renderedColumnStartIndex=g.start,this._renderedColumnStopIndex=g.stop,this._renderedRowStartIndex=y.start,this._renderedRowStopIndex=y.stop;var C=s({direction:"horizontal",cellCount:o,overscanCellsCount:l,scrollDirection:d,startIndex:"number"==typeof this._renderedColumnStartIndex?this._renderedColumnStartIndex:0,stopIndex:"number"==typeof this._renderedColumnStopIndex?this._renderedColumnStopIndex:-1}),E=s({direction:"vertical",cellCount:c,overscanCellsCount:u,scrollDirection:f,startIndex:"number"==typeof this._renderedRowStartIndex?this._renderedRowStartIndex:0,stopIndex:"number"==typeof this._renderedRowStopIndex?this._renderedRowStopIndex:-1});this._columnStartIndex=C.overscanStartIndex,this._columnStopIndex=C.overscanStopIndex,this._rowStartIndex=E.overscanStartIndex,this._rowStopIndex=E.overscanStopIndex,this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:n,columnSizeAndPositionManager:this._columnSizeAndPositionManager,columnStartIndex:this._columnStartIndex,columnStopIndex:this._columnStopIndex,deferredMeasurementCache:a,horizontalOffsetAdjustment:b,isScrolling:v,parent:this,rowSizeAndPositionManager:this._rowSizeAndPositionManager,rowStartIndex:this._rowStartIndex,rowStopIndex:this._rowStopIndex,scrollLeft:h,scrollTop:m,styleCache:this._styleCache,verticalOffsetAdjustment:_,visibleColumnIndices:g,visibleRowIndices:y})}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&(0,P.cancelAnimationTimeout)(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=(0,P.requestAnimationTimeout)(this._debounceScrollEndedCallback,e)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"==typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"==typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex&&"number"==typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,o=e.totalColumnsWidth,a=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,i=t.props,l=i.height;(0,i.onScroll)({clientHeight:l,clientWidth:i.width,scrollHeight:a,scrollLeft:n,scrollTop:r,scrollWidth:o})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(t.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this._scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,r={scrollPositionChangeReason:F.REQUESTED};"number"==typeof t&&t>=0&&(r.scrollDirectionHorizontal=t>this.state.scrollLeft?_.SCROLL_DIRECTION_FORWARD:_.SCROLL_DIRECTION_BACKWARD,r.scrollLeft=t),"number"==typeof n&&n>=0&&(r.scrollDirectionVertical=n>this.state.scrollTop?_.SCROLL_DIRECTION_FORWARD:_.SCROLL_DIRECTION_BACKWARD,r.scrollTop=n),("number"==typeof t&&t>=0&&t!==this.state.scrollLeft||"number"==typeof n&&n>=0&&n!==this.state.scrollTop)&&this.setState(r)}},{key:"_wrapSizeGetter",value:function(e){return"function"==typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e.columnCount,r=e.height,o=e.scrollToAlignment,a=e.scrollToColumn,i=e.width,l=t.scrollLeft;if(n>0){var s=n-1,u=a<0?s:Math.min(s,a),c=this._rowSizeAndPositionManager.getTotalSize(),p=c>r?this._scrollbarSize:0;return this._columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:i-p,currentOffset:l,targetIndex:u})}}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=t.scrollLeft,r=this._getCalculatedScrollLeft(e,t);"number"==typeof r&&r>=0&&n!==r&&this.scrollToPosition({scrollLeft:r,scrollTop:-1})}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e.height,r=e.rowCount,o=e.scrollToAlignment,a=e.scrollToRow,i=e.width,l=t.scrollTop;if(r>0){var s=r-1,u=a<0?s:Math.min(s,a),c=this._columnSizeAndPositionManager.getTotalSize(),p=c>i?this._scrollbarSize:0;return this._rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:n-p,currentOffset:l,targetIndex:u})}}},{key:"_resetStyleCache",value:function(){var e=this._styleCache;this._cellCache={},this._styleCache={};for(var t=this._rowStartIndex;t<=this._rowStopIndex;t++)for(var n=this._columnStartIndex;n<=this._columnStopIndex;n++){var r=t+"-"+n;this._styleCache[r]=e[r]}this.setState({isScrolling:!1})}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=t.scrollTop,r=this._getCalculatedScrollTop(e,t);"number"==typeof r&&r>=0&&n!==r&&this.scrollToPosition({scrollLeft:-1,scrollTop:r})}}]),t}(p.default.PureComponent);j.defaultProps={"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:x.default,containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:k.default,noContentRenderer:L,onScroll:function(e){o(e)},onScrollbarPresenceChange:function(){},onSectionRendered:function(e){o(e)},overscanColumnCount:0,overscanIndicesGetter:C.default,overscanRowCount:10,role:"grid",scrollingResetTimeInterval:D,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0},j.propTypes={"aria-label":n(0).string.isRequired,"aria-readonly":n(0).bool,autoContainerWidth:n(0).bool.isRequired,autoHeight:n(0).bool.isRequired,autoWidth:n(0).bool.isRequired,cellRenderer:"function"==typeof N?N.isRequired?N.isRequired:N:n(0).shape(N).isRequired,cellRangeRenderer:"function"==typeof M?M.isRequired?M.isRequired:M:n(0).shape(M).isRequired,className:n(0).string,columnCount:n(0).number.isRequired,columnWidth:"function"==typeof I?I.isRequired?I.isRequired:I:n(0).shape(I).isRequired,containerProps:n(0).object,containerRole:n(0).string.isRequired,containerStyle:n(0).object.isRequired,deferredMeasurementCache:n(0).object,estimatedColumnSize:n(0).number.isRequired,estimatedRowSize:n(0).number.isRequired,getScrollbarSize:n(0).func.isRequired,height:n(0).number.isRequired,id:n(0).string,isScrolling:n(0).bool,noContentRenderer:"function"==typeof A?A.isRequired?A.isRequired:A:n(0).shape(A).isRequired,onScroll:n(0).func.isRequired,onScrollbarPresenceChange:n(0).func.isRequired,onSectionRendered:n(0).func.isRequired,overscanColumnCount:n(0).number.isRequired,overscanIndicesGetter:"function"==typeof O?O.isRequired?O.isRequired:O:n(0).shape(O).isRequired,overscanRowCount:n(0).number.isRequired,role:n(0).string.isRequired,rowHeight:"function"==typeof I?I.isRequired?I.isRequired:I:n(0).shape(I).isRequired,rowCount:n(0).number.isRequired,scrollingResetTimeInterval:n(0).number.isRequired,scrollLeft:n(0).number,scrollToAlignment:"function"==typeof R?R.isRequired?R.isRequired:R:n(0).shape(R).isRequired,scrollToColumn:n(0).number.isRequired,scrollTop:n(0).number,scrollToRow:n(0).number.isRequired,style:n(0).object.isRequired,tabIndex:n(0).number,width:n(0).number.isRequired},t.default=j},function(e,t,n){"use strict";function r(e){var t=e.cellCount,n=e.cellSize,r=e.computeMetadataCallback,o=e.computeMetadataCallbackProps,a=e.nextCellsCount,i=e.nextCellSize,l=e.nextScrollToIndex,s=e.scrollToIndex,u=e.updateScrollOffsetForScrollToIndex;t===a&&("number"!=typeof n&&"number"!=typeof i||n===i)||(r(o),s>=0&&s===l&&u())}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n=this._cellCount)throw Error("Requested index "+e+" is outside of range 0.."+this._cellCount);if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),n=t.offset+t.size,r=this._lastMeasuredIndex+1;r<=e;r++){var o=this._cellSizeGetter({index:r});if(void 0===o||isNaN(o))throw Error("Invalid size returned for cell "+r+" of value "+o);null===o?(this._cellSizeAndPositionData[r]={offset:n,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[r]={offset:n,size:o},n+=o,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,o=e.currentOffset,a=e.targetIndex;if(r<=0)return 0;var i=this.getSizeAndPositionOfCell(a),l=i.offset,s=l-r+i.size,u=void 0;switch(n){case"start":u=l;break;case"end":u=s;break;case"center":u=l-(r-i.size)/2;break;default:u=Math.max(s,Math.min(l,o))}var c=this.getTotalSize();return Math.max(0,Math.min(c-r,u))}},{key:"getVisibleCellRange",value:function(e){if(this._batchAllCells)return{start:0,stop:this._cellCount-1};var t=e.containerSize,n=e.offset;if(0===this.getTotalSize())return{};var r=n+t,o=this._findNearestCell(n),a=this.getSizeAndPositionOfCell(o);n=a.offset+a.size;for(var i=o;nn&&(e=r-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var n=1;e=e?this._binarySearch(n,0,e):this._exponentialSearch(n,e)}}]),e}());t.default=a},function(e,t,n){"use strict";function r(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(n){var r=n.callback,o=n.indices,a=Object.keys(o),i=!e||a.every(function(e){var t=o[e];return Array.isArray(t)?t.length>0:t>=0}),l=a.length!==Object.keys(t).length||a.some(function(e){var n=t[e],r=o[e];return Array.isArray(r)?n.join(",")!==r.join(","):n!==r});t=o,i&&l&&r(o)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){var t=e.cellSize,n=e.cellSizeAndPositionManager,r=e.previousCellsCount,o=e.previousCellSize,a=e.previousScrollToAlignment,i=e.previousScrollToIndex,l=e.previousSize,s=e.scrollOffset,u=e.scrollToAlignment,c=e.scrollToIndex,p=e.size,d=e.sizeJustIncreasedFromZero,f=e.updateScrollIndexCallback,h=n.getCellCount(),m=c>=0&&c0&&(pn.getTotalSize()-p&&f(h-1)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(55);(function(e){e&&e.__esModule})(o),n(6).babelPluginFlowReactPropTypes_proptype_CellSize||n(0).any,n(6).babelPluginFlowReactPropTypes_proptype_Alignment||n(0).any},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((!a||e)&&o.default){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),a=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return a};var r=n(233),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=void 0;e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=!("undefined"==typeof window||!window.document||!window.document.createElement),e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=void 0;r="undefined"!=typeof window?window:"undefined"!=typeof self?self:{};var o=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.oRequestAnimationFrame||r.msRequestAnimationFrame||function(e){return r.setTimeout(e,1e3/60)},a=r.cancelAnimationFrame||r.webkitCancelAnimationFrame||r.mozCancelAnimationFrame||r.oCancelAnimationFrame||r.msCancelAnimationFrame||function(e){r.clearTimeout(e)};t.raf=o,t.caf=a},function(e,t,n){"use strict";function r(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,a=e.startIndex,i=e.stopIndex;return n=Math.max(1,n),r===o?{overscanStartIndex:Math.max(0,a-1),overscanStopIndex:Math.min(t-1,i+n)}:{overscanStartIndex:Math.max(0,a-n),overscanStopIndex:Math.min(t-1,i+1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=(n(6).babelPluginFlowReactPropTypes_proptype_OverscanIndices||n(0).any,n(6).babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetterParams||n(0).any,t.SCROLL_DIRECTION_BACKWARD=-1,t.SCROLL_DIRECTION_FORWARD=1);t.SCROLL_DIRECTION_HORIZONTAL="horizontal",t.SCROLL_DIRECTION_VERTICAL="vertical"},function(e,t,n){"use strict";t.CITIES=[{name:"Abilene"},{name:"Addison"},{name:"Akron"},{name:"Alameda"},{name:"Albany"},{name:"Albany"},{name:"Albany"},{name:"Albuquerque"},{name:"Alexandria"},{name:"Alexandria"},{name:"Alhambra"},{name:"Aliso Viejo"},{name:"Allen"},{name:"Allentown"},{name:"Alpharetta"},{name:"Altamonte Springs"},{name:"Altoona"},{name:"Amarillo"},{name:"Ames"},{name:"Anaheim"},{name:"Anchorage"},{name:"Anderson"},{name:"Ankeny"},{name:"Ann Arbor"},{name:"Annapolis"},{name:"Antioch"},{name:"Apache Junction"},{name:"Apex"},{name:"Apopka"},{name:"Apple Valley"},{name:"Apple Valley"},{name:"Appleton"},{name:"Arcadia"},{name:"Arlington"},{name:"Arlington Heights"},{name:"Arvada"},{name:"Asheville"},{name:"Athens-Clarke County"},{name:"Atlanta"},{name:"Atlantic City"},{name:"Attleboro"},{name:"Auburn"},{name:"Auburn"},{name:"Augusta-Richmond County"},{name:"Aurora"},{name:"Aurora"},{name:"Austin"},{name:"Aventura"},{name:"Avondale"},{name:"Azusa"},{name:"Bakersfield"},{name:"Baldwin Park"},{name:"Baltimore"},{name:"Barnstable Town"},{name:"Bartlett"},{name:"Bartlett"},{name:"Baton Rouge"},{name:"Battle Creek"},{name:"Bayonne"},{name:"Baytown"},{name:"Beaumont"},{name:"Beaumont"},{name:"Beavercreek"},{name:"Beaverton"},{name:"Bedford"},{name:"Bell Gardens"},{name:"Belleville"},{name:"Bellevue"},{name:"Bellevue"},{name:"Bellflower"},{name:"Bellingham"},{name:"Beloit"},{name:"Bend"},{name:"Bentonville"},{name:"Berkeley"},{name:"Berwyn"},{name:"Bethlehem"},{name:"Beverly"},{name:"Billings"},{name:"Biloxi"},{name:"Binghamton"},{name:"Birmingham"},{name:"Bismarck"},{name:"Blacksburg"},{name:"Blaine"},{name:"Bloomington"},{name:"Bloomington"},{name:"Bloomington"},{name:"Blue Springs"},{name:"Boca Raton"},{name:"Boise City"},{name:"Bolingbrook"},{name:"Bonita Springs"},{name:"Bossier City"},{name:"Boston"},{name:"Boulder"},{name:"Bountiful"},{name:"Bowie"},{name:"Bowling Green"},{name:"Boynton Beach"},{name:"Bozeman"},{name:"Bradenton"},{name:"Brea"},{name:"Bremerton"},{name:"Brentwood"},{name:"Brentwood"},{name:"Bridgeport"},{name:"Bristol"},{name:"Brockton"},{name:"Broken Arrow"},{name:"Brookfield"},{name:"Brookhaven"},{name:"Brooklyn Park"},{name:"Broomfield"},{name:"Brownsville"},{name:"Bryan"},{name:"Buckeye"},{name:"Buena Park"},{name:"Buffalo"},{name:"Buffalo Grove"},{name:"Bullhead City"},{name:"Burbank"},{name:"Burien"},{name:"Burleson"},{name:"Burlington"},{name:"Burlington"},{name:"Burnsville"},{name:"Caldwell"},{name:"Calexico"},{name:"Calumet City"},{name:"Camarillo"},{name:"Cambridge"},{name:"Camden"},{name:"Campbell"},{name:"Canton"},{name:"Cape Coral"},{name:"Cape Girardeau"},{name:"Carlsbad"},{name:"Carmel"},{name:"Carol Stream"},{name:"Carpentersville"},{name:"Carrollton"},{name:"Carson"},{name:"Carson City"},{name:"Cary"},{name:"Casa Grande"},{name:"Casper"},{name:"Castle Rock"},{name:"Cathedral City"},{name:"Cedar Falls"},{name:"Cedar Hill"},{name:"Cedar Park"},{name:"Cedar Rapids"},{name:"Centennial"},{name:"Ceres"},{name:"Cerritos"},{name:"Champaign"},{name:"Chandler"},{name:"Chapel Hill"},{name:"Charleston"},{name:"Charleston"},{name:"Charlotte"},{name:"Charlottesville"},{name:"Chattanooga"},{name:"Chelsea"},{name:"Chesapeake"},{name:"Chesterfield"},{name:"Cheyenne"},{name:"Chicago"},{name:"Chico"},{name:"Chicopee"},{name:"Chino"},{name:"Chino Hills"},{name:"Chula Vista"},{name:"Cicero"},{name:"Cincinnati"},{name:"Citrus Heights"},{name:"Clarksville"},{name:"Clearwater"},{name:"Cleveland"},{name:"Cleveland"},{name:"Cleveland Heights"},{name:"Clifton"},{name:"Clovis"},{name:"Clovis"},{name:"Coachella"},{name:"Coconut Creek"},{name:"Coeur d'Alene"},{name:"College Station"},{name:"Collierville"},{name:"Colorado Springs"},{name:"Colton"},{name:"Columbia"},{name:"Columbia"},{name:"Columbus"},{name:"Columbus"},{name:"Columbus"},{name:"Commerce City"},{name:"Compton"},{name:"Concord"},{name:"Concord"},{name:"Concord"},{name:"Conroe"},{name:"Conway"},{name:"Coon Rapids"},{name:"Coppell"},{name:"Coral Gables"},{name:"Coral Springs"},{name:"Corona"},{name:"Corpus Christi"},{name:"Corvallis"},{name:"Costa Mesa"},{name:"Council Bluffs"},{name:"Covina"},{name:"Covington"},{name:"Cranston"},{name:"Crystal Lake"},{name:"Culver City"},{name:"Cupertino"},{name:"Cutler Bay"},{name:"Cuyahoga Falls"},{name:"Cypress"},{name:"Dallas"},{name:"Daly City"},{name:"Danbury"},{name:"Danville"},{name:"Danville"},{name:"Davenport"},{name:"Davie"},{name:"Davis"},{name:"Dayton"},{name:"Daytona Beach"},{name:"DeKalb"},{name:"DeSoto"},{name:"Dearborn"},{name:"Dearborn Heights"},{name:"Decatur"},{name:"Decatur"},{name:"Deerfield Beach"},{name:"Delano"},{name:"Delray Beach"},{name:"Deltona"},{name:"Denton"},{name:"Denver"},{name:"Des Moines"},{name:"Des Plaines"},{name:"Detroit"},{name:"Diamond Bar"},{name:"Doral"},{name:"Dothan"},{name:"Dover"},{name:"Downers Grove"},{name:"Downey"},{name:"Draper"},{name:"Dublin"},{name:"Dublin"},{name:"Dubuque"},{name:"Duluth"},{name:"Duncanville"},{name:"Dunwoody"},{name:"Durham"},{name:"Eagan"},{name:"East Lansing"},{name:"East Orange"},{name:"East Providence"},{name:"Eastvale"},{name:"Eau Claire"},{name:"Eden Prairie"},{name:"Edina"},{name:"Edinburg"},{name:"Edmond"},{name:"Edmonds"},{name:"El Cajon"},{name:"El Centro"},{name:"El Monte"},{name:"El Paso"},{name:"Elgin"},{name:"Elizabeth"},{name:"Elk Grove"},{name:"Elkhart"},{name:"Elmhurst"},{name:"Elyria"},{name:"Encinitas"},{name:"Enid"},{name:"Erie"},{name:"Escondido"},{name:"Euclid"},{name:"Eugene"},{name:"Euless"},{name:"Evanston"},{name:"Evansville"},{name:"Everett"},{name:"Everett"},{name:"Fairfield"},{name:"Fairfield"},{name:"Fall River"},{name:"Fargo"},{name:"Farmington"},{name:"Farmington Hills"},{name:"Fayetteville"},{name:"Fayetteville"},{name:"Federal Way"},{name:"Findlay"},{name:"Fishers"},{name:"Fitchburg"},{name:"Flagstaff"},{name:"Flint"},{name:"Florence"},{name:"Florence"},{name:"Florissant"},{name:"Flower Mound"},{name:"Folsom"},{name:"Fond du Lac"},{name:"Fontana"},{name:"Fort Collins"},{name:"Fort Lauderdale"},{name:"Fort Myers"},{name:"Fort Pierce"},{name:"Fort Smith"},{name:"Fort Wayne"},{name:"Fort Worth"},{name:"Fountain Valley"},{name:"Franklin"},{name:"Frederick"},{name:"Freeport"},{name:"Fremont"},{name:"Fresno"},{name:"Friendswood"},{name:"Frisco"},{name:"Fullerton"},{name:"Gainesville"},{name:"Gaithersburg"},{name:"Galveston"},{name:"Garden Grove"},{name:"Gardena"},{name:"Garland"},{name:"Gary"},{name:"Gastonia"},{name:"Georgetown"},{name:"Germantown"},{name:"Gilbert"},{name:"Gilroy"},{name:"Glendale"},{name:"Glendale"},{name:"Glendora"},{name:"Glenview"},{name:"Goodyear"},{name:"Goose Creek"},{name:"Grand Forks"},{name:"Grand Island"},{name:"Grand Junction"},{name:"Grand Prairie"},{name:"Grand Rapids"},{name:"Grapevine"},{name:"Great Falls"},{name:"Greeley"},{name:"Green Bay"},{name:"Greenacres"},{name:"Greenfield"},{name:"Greensboro"},{name:"Greenville"},{name:"Greenville"},{name:"Greenwood"},{name:"Gresham"},{name:"Grove City"},{name:"Gulfport"},{name:"Hackensack"},{name:"Hagerstown"},{name:"Hallandale Beach"},{name:"Haltom City"},{name:"Hamilton"},{name:"Hammond"},{name:"Hampton"},{name:"Hanford"},{name:"Hanover Park"},{name:"Harlingen"},{name:"Harrisburg"},{name:"Harrisonburg"},{name:"Hartford"},{name:"Hattiesburg"},{name:"Haverhill"},{name:"Hawthorne"},{name:"Hayward"},{name:"Hemet"},{name:"Hempstead"},{name:"Henderson"},{name:"Hendersonville"},{name:"Hesperia"},{name:"Hialeah"},{name:"Hickory"},{name:"High Point"},{name:"Highland"},{name:"Hillsboro"},{name:"Hilton Head Island"},{name:"Hoboken"},{name:"Hoffman Estates"},{name:"Hollywood"},{name:"Holyoke"},{name:"Homestead"},{name:"Honolulu"},{name:"Hoover"},{name:"Houston"},{name:"Huber Heights"},{name:"Huntersville"},{name:"Huntington"},{name:"Huntington Beach"},{name:"Huntington Park"},{name:"Huntsville"},{name:"Huntsville"},{name:"Hurst"},{name:"Hutchinson"},{name:"Idaho Falls"},{name:"Independence"},{name:"Indianapolis"},{name:"Indio"},{name:"Inglewood"},{name:"Iowa City"},{name:"Irvine"},{name:"Irving"},{name:"Jackson"},{name:"Jackson"},{name:"Jacksonville"},{name:"Jacksonville"},{name:"Janesville"},{name:"Jefferson City"},{name:"Jeffersonville"},{name:"Jersey City"},{name:"Johns Creek"},{name:"Johnson City"},{name:"Joliet"},{name:"Jonesboro"},{name:"Joplin"},{name:"Jupiter"},{name:"Jurupa Valley"},{name:"Kalamazoo"},{name:"Kannapolis"},{name:"Kansas City"},{name:"Kansas City"},{name:"Kearny"},{name:"Keizer"},{name:"Keller"},{name:"Kenner"},{name:"Kennewick"},{name:"Kenosha"},{name:"Kent"},{name:"Kentwood"},{name:"Kettering"},{name:"Killeen"},{name:"Kingsport"},{name:"Kirkland"},{name:"Kissimmee"},{name:"Knoxville"},{name:"Kokomo"},{name:"La Crosse"},{name:"La Habra"},{name:"La Mesa"},{name:"La Mirada"},{name:"La Puente"},{name:"La Quinta"},{name:"Lacey"},{name:"Lafayette"},{name:"Lafayette"},{name:"Laguna Niguel"},{name:"Lake Charles"},{name:"Lake Elsinore"},{name:"Lake Forest"},{name:"Lake Havasu City"},{name:"Lake Oswego"},{name:"Lakeland"},{name:"Lakeville"},{name:"Lakewood"},{name:"Lakewood"},{name:"Lakewood"},{name:"Lakewood"},{name:"Lancaster"},{name:"Lancaster"},{name:"Lancaster"},{name:"Lancaster"},{name:"Lansing"},{name:"Laredo"},{name:"Largo"},{name:"Las Cruces"},{name:"Las Vegas"},{name:"Lauderhill"},{name:"Lawrence"},{name:"Lawrence"},{name:"Lawrence"},{name:"Lawton"},{name:"Layton"},{name:"League City"},{name:"Lee's Summit"},{name:"Leesburg"},{name:"Lehi"},{name:"Lenexa"},{name:"Leominster"},{name:"Lewisville"},{name:"Lexington-Fayette"},{name:"Lima"},{name:"Lincoln"},{name:"Lincoln"},{name:"Lincoln Park"},{name:"Linden"},{name:"Little Rock"},{name:"Littleton"},{name:"Livermore"},{name:"Livonia"},{name:"Lodi"},{name:"Logan"},{name:"Lombard"},{name:"Lompoc"},{name:"Long Beach"},{name:"Longmont"},{name:"Longview"},{name:"Lorain"},{name:"Los Angeles"},{name:"Louisville/Jefferson County"},{name:"Loveland"},{name:"Lowell"},{name:"Lubbock"},{name:"Lynchburg"},{name:"Lynn"},{name:"Lynwood"},{name:"Macon"},{name:"Madera"},{name:"Madison"},{name:"Madison"},{name:"Malden"},{name:"Manassas"},{name:"Manchester"},{name:"Manhattan"},{name:"Mankato"},{name:"Mansfield"},{name:"Mansfield"},{name:"Manteca"},{name:"Maple Grove"},{name:"Maplewood"},{name:"Marana"},{name:"Margate"},{name:"Maricopa"},{name:"Marietta"},{name:"Marlborough"},{name:"Martinez"},{name:"Marysville"},{name:"McAllen"},{name:"McKinney"},{name:"Medford"},{name:"Medford"},{name:"Melbourne"},{name:"Memphis"},{name:"Menifee"},{name:"Mentor"},{name:"Merced"},{name:"Meriden"},{name:"Meridian"},{name:"Meridian"},{name:"Mesa"},{name:"Mesquite"},{name:"Methuen"},{name:"Miami"},{name:"Miami Beach"},{name:"Miami Gardens"},{name:"Middletown"},{name:"Middletown"},{name:"Midland"},{name:"Midland"},{name:"Midwest City"},{name:"Milford"},{name:"Milpitas"},{name:"Milwaukee"},{name:"Minneapolis"},{name:"Minnetonka"},{name:"Minot"},{name:"Miramar"},{name:"Mishawaka"},{name:"Mission"},{name:"Mission Viejo"},{name:"Missoula"},{name:"Missouri City"},{name:"Mobile"},{name:"Modesto"},{name:"Moline"},{name:"Monroe"},{name:"Monrovia"},{name:"Montclair"},{name:"Montebello"},{name:"Monterey Park"},{name:"Montgomery"},{name:"Moore"},{name:"Moorhead"},{name:"Moreno Valley"},{name:"Morgan Hill"},{name:"Mount Pleasant"},{name:"Mount Prospect"},{name:"Mount Vernon"},{name:"Mountain View"},{name:"Muncie"},{name:"Murfreesboro"},{name:"Murray"},{name:"Murrieta"},{name:"Muskegon"},{name:"Muskogee"},{name:"Nampa"},{name:"Napa"},{name:"Naperville"},{name:"Nashua"},{name:"Nashville-Davidson"},{name:"National City"},{name:"New Bedford"},{name:"New Berlin"},{name:"New Braunfels"},{name:"New Britain"},{name:"New Brunswick"},{name:"New Haven"},{name:"New Orleans"},{name:"New Rochelle"},{name:"New York"},{name:"Newark"},{name:"Newark"},{name:"Newark"},{name:"Newport Beach"},{name:"Newport News"},{name:"Newton"},{name:"Niagara Falls"},{name:"Noblesville"},{name:"Norfolk"},{name:"Normal"},{name:"Norman"},{name:"North Charleston"},{name:"North Las Vegas"},{name:"North Lauderdale"},{name:"North Little Rock"},{name:"North Miami"},{name:"North Miami Beach"},{name:"North Port"},{name:"North Richland Hills"},{name:"Northglenn"},{name:"Norwalk"},{name:"Norwalk"},{name:"Norwich"},{name:"Novato"},{name:"Novi"},{name:"O'Fallon"},{name:"Oak Lawn"},{name:"Oak Park"},{name:"Oakland"},{name:"Oakland Park"},{name:"Oakley"},{name:"Ocala"},{name:"Oceanside"},{name:"Ocoee"},{name:"Odessa"},{name:"Ogden"},{name:"Oklahoma City"},{name:"Olathe"},{name:"Olympia"},{name:"Omaha"},{name:"Ontario"},{name:"Orange"},{name:"Orem"},{name:"Orland Park"},{name:"Orlando"},{name:"Ormond Beach"},{name:"Oro Valley"},{name:"Oshkosh"},{name:"Overland Park"},{name:"Owensboro"},{name:"Oxnard"},{name:"Pacifica"},{name:"Palatine"},{name:"Palm Bay"},{name:"Palm Beach Gardens"},{name:"Palm Coast"},{name:"Palm Desert"},{name:"Palm Springs"},{name:"Palmdale"},{name:"Palo Alto"},{name:"Panama City"},{name:"Paramount"},{name:"Park Ridge"},{name:"Parker"},{name:"Parma"},{name:"Pasadena"},{name:"Pasadena"},{name:"Pasco"},{name:"Passaic"},{name:"Paterson"},{name:"Pawtucket"},{name:"Peabody"},{name:"Peachtree Corners"},{name:"Pearland"},{name:"Pembroke Pines"},{name:"Pensacola"},{name:"Peoria"},{name:"Peoria"},{name:"Perris"},{name:"Perth Amboy"},{name:"Petaluma"},{name:"Pflugerville"},{name:"Pharr"},{name:"Phenix City"},{name:"Philadelphia"},{name:"Phoenix"},{name:"Pico Rivera"},{name:"Pine Bluff"},{name:"Pinellas Park"},{name:"Pittsburg"},{name:"Pittsburgh"},{name:"Pittsfield"},{name:"Placentia"},{name:"Plainfield"},{name:"Plainfield"},{name:"Plano"},{name:"Plantation"},{name:"Pleasanton"},{name:"Plymouth"},{name:"Pocatello"},{name:"Pomona"},{name:"Pompano Beach"},{name:"Pontiac"},{name:"Port Arthur"},{name:"Port Orange"},{name:"Port St. Lucie"},{name:"Portage"},{name:"Porterville"},{name:"Portland"},{name:"Portland"},{name:"Portsmouth"},{name:"Poway"},{name:"Prescott"},{name:"Prescott Valley"},{name:"Providence"},{name:"Provo"},{name:"Pueblo"},{name:"Puyallup"},{name:"Quincy"},{name:"Quincy"},{name:"Racine"},{name:"Raleigh"},{name:"Rancho Cordova"},{name:"Rancho Cucamonga"},{name:"Rancho Palos Verdes"},{name:"Rancho Santa Margarita"},{name:"Rapid City"},{name:"Reading"},{name:"Redding"},{name:"Redlands"},{name:"Redmond"},{name:"Redondo Beach"},{name:"Redwood City"},{name:"Reno"},{name:"Renton"},{name:"Revere"},{name:"Rialto"},{name:"Richardson"},{name:"Richland"},{name:"Richmond"},{name:"Richmond"},{name:"Rio Rancho"},{name:"Riverside"},{name:"Riverton"},{name:"Roanoke"},{name:"Rochester"},{name:"Rochester"},{name:"Rochester Hills"},{name:"Rock Hill"},{name:"Rock Island"},{name:"Rockford"},{name:"Rocklin"},{name:"Rockville"},{name:"Rockwall"},{name:"Rocky Mount"},{name:"Rogers"},{name:"Rohnert Park"},{name:"Romeoville"},{name:"Rosemead"},{name:"Roseville"},{name:"Roseville"},{name:"Roswell"},{name:"Roswell"},{name:"Round Rock"},{name:"Rowlett"},{name:"Roy"},{name:"Royal Oak"},{name:"Sacramento"},{name:"Saginaw"},{name:"Salem"},{name:"Salem"},{name:"Salina"},{name:"Salinas"},{name:"Salt Lake City"},{name:"Sammamish"},{name:"San Angelo"},{name:"San Antonio"},{name:"San Bernardino"},{name:"San Bruno"},{name:"San Buenaventura (Ventura)"},{name:"San Clemente"},{name:"San Diego"},{name:"San Francisco"},{name:"San Gabriel"},{name:"San Jacinto"},{name:"San Jose"},{name:"San Leandro"},{name:"San Luis Obispo"},{name:"San Marcos"},{name:"San Marcos"},{name:"San Mateo"},{name:"San Rafael"},{name:"San Ramon"},{name:"Sandy"},{name:"Sandy Springs"},{name:"Sanford"},{name:"Santa Ana"},{name:"Santa Barbara"},{name:"Santa Clara"},{name:"Santa Clarita"},{name:"Santa Cruz"},{name:"Santa Fe"},{name:"Santa Maria"},{name:"Santa Monica"},{name:"Santa Rosa"},{name:"Santee"},{name:"Sarasota"},{name:"Savannah"},{name:"Sayreville"},{name:"Schaumburg"},{name:"Schenectady"},{name:"Scottsdale"},{name:"Scranton"},{name:"Seattle"},{name:"Shakopee"},{name:"Shawnee"},{name:"Sheboygan"},{name:"Shelton"},{name:"Sherman"},{name:"Shoreline"},{name:"Shreveport"},{name:"Sierra Vista"},{name:"Simi Valley"},{name:"Sioux City"},{name:"Sioux Falls"},{name:"Skokie"},{name:"Smyrna"},{name:"Smyrna"},{name:"Somerville"},{name:"South Bend"},{name:"South Gate"},{name:"South Jordan"},{name:"South San Francisco"},{name:"Southaven"},{name:"Southfield"},{name:"Spanish Fork"},{name:"Sparks"},{name:"Spartanburg"},{name:"Spokane"},{name:"Spokane Valley"},{name:"Springdale"},{name:"Springfield"},{name:"Springfield"},{name:"Springfield"},{name:"Springfield"},{name:"Springfield"},{name:"St. Charles"},{name:"St. Clair Shores"},{name:"St. Cloud"},{name:"St. Cloud"},{name:"St. George"},{name:"St. Joseph"},{name:"St. Louis"},{name:"St. Louis Park"},{name:"St. Paul"},{name:"St. Peters"},{name:"St. Petersburg"},{name:"Stamford"},{name:"Stanton"},{name:"State College"},{name:"Sterling Heights"},{name:"Stillwater"},{name:"Stockton"},{name:"Streamwood"},{name:"Strongsville"},{name:"Suffolk"},{name:"Sugar Land"},{name:"Summerville"},{name:"Sumter"},{name:"Sunnyvale"},{name:"Sunrise"},{name:"Surprise"},{name:"Syracuse"},{name:"Tacoma"},{name:"Tallahassee"},{name:"Tamarac"},{name:"Tampa"},{name:"Taunton"},{name:"Taylor"},{name:"Taylorsville"},{name:"Temecula"},{name:"Tempe"},{name:"Temple"},{name:"Terre Haute"},{name:"Texarkana"},{name:"Texas City"},{name:"The Colony"},{name:"Thornton"},{name:"Thousand Oaks"},{name:"Tigard"},{name:"Tinley Park"},{name:"Titusville"},{name:"Toledo"},{name:"Topeka"},{name:"Torrance"},{name:"Tracy"},{name:"Trenton"},{name:"Troy"},{name:"Troy"},{name:"Tucson"},{name:"Tulare"},{name:"Tulsa"},{name:"Turlock"},{name:"Tuscaloosa"},{name:"Tustin"},{name:"Twin Falls"},{name:"Tyler"},{name:"Union City"},{name:"Union City"},{name:"Upland"},{name:"Urbana"},{name:"Urbandale"},{name:"Utica"},{name:"Vacaville"},{name:"Valdosta"},{name:"Vallejo"},{name:"Valley Stream"},{name:"Vancouver"},{name:"Victoria"},{name:"Victorville"},{name:"Vineland"},{name:"Virginia Beach"},{name:"Visalia"},{name:"Vista"},{name:"Waco"},{name:"Walnut Creek"},{name:"Waltham"},{name:"Warner Robins"},{name:"Warren"},{name:"Warren"},{name:"Warwick"},{name:"Washington"},{name:"Waterbury"},{name:"Waterloo"},{name:"Watsonville"},{name:"Waukegan"},{name:"Waukesha"},{name:"Wausau"},{name:"Wauwatosa"},{name:"Wellington"},{name:"Weslaco"},{name:"West Allis"},{name:"West Covina"},{name:"West Des Moines"},{name:"West Haven"},{name:"West Jordan"},{name:"West New York"},{name:"West Palm Beach"},{name:"West Sacramento"},{name:"West Valley City"},{name:"Westerville"},{name:"Westfield"},{name:"Westland"},{name:"Westminster"},{name:"Westminster"},{name:"Weston"},{name:"Weymouth Town"},{name:"Wheaton"},{name:"Wheeling"},{name:"White Plains"},{name:"Whittier"},{name:"Wichita"},{name:"Wichita Falls"},{name:"Wilkes-Barre"},{name:"Wilmington"},{name:"Wilmington"},{name:"Wilson"},{name:"Winston-Salem"},{name:"Winter Garden"},{name:"Woburn"},{name:"Woodbury"},{name:"Woodland"},{name:"Woonsocket"},{name:"Worcester"},{name:"Wylie"},{name:"Wyoming"},{name:"Yakima"},{name:"Yonkers"},{name:"Yorba Linda"},{name:"York"},{name:"Youngstown"},{name:"Yuba City"},{name:"Yucaipa"},{name:"Yuma"}]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(2),a=r(o),i=n(13),l=r(i),s=n(0),u=r(s),c=n(11),p=r(c),d=n(238),f=(0,l.default)({displayName:"StatesField",propTypes:{label:u.default.string,searchable:u.default.bool},getDefaultProps:function(){return{label:"States:",searchable:!0}},getInitialState:function(){return{country:"AU",disabled:!1,searchable:this.props.searchable,selectValue:"new-south-wales",clearable:!0,rtl:!1}},switchCountry:function(e){var t=e.target.value;this.setState({country:t,selectValue:null})},updateValue:function(e){this.setState({selectValue:e})},focusStateSelect:function(){this.refs.stateSelect.focus()},toggleCheckbox:function(e){var t={};t[e.target.name]=e.target.checked,this.setState(t)},render:function(){var e=d[this.state.country];return a.default.createElement("div",{className:"section"},a.default.createElement("h3",{className:"section-heading"},this.props.label," ",a.default.createElement("a",{href:"https://github.com/JedWatson/react-select/tree/master/examples/src/components/States.js"},"(Source)")),a.default.createElement(p.default,{id:"state-select",ref:"stateSelect",autoFocus:!0,options:e,simpleValue:!0,clearable:this.state.clearable,name:"selected-state",disabled:this.state.disabled,value:this.state.selectValue,onChange:this.updateValue,rtl:this.state.rtl,searchable:this.state.searchable}),a.default.createElement("button",{style:{marginTop:"15px"},type:"button",onClick:this.focusStateSelect},"Focus Select"),a.default.createElement("div",{className:"checkbox-list"},a.default.createElement("label",{className:"checkbox"},a.default.createElement("input",{type:"checkbox",className:"checkbox-control",name:"searchable",checked:this.state.searchable,onChange:this.toggleCheckbox}),a.default.createElement("span",{className:"checkbox-label"},"Searchable")),a.default.createElement("label",{className:"checkbox"},a.default.createElement("input",{type:"checkbox",className:"checkbox-control",name:"disabled",checked:this.state.disabled,onChange:this.toggleCheckbox}),a.default.createElement("span",{className:"checkbox-label"},"Disabled")),a.default.createElement("label",{className:"checkbox"},a.default.createElement("input",{type:"checkbox",className:"checkbox-control",name:"clearable",checked:this.state.clearable,onChange:this.toggleCheckbox}),a.default.createElement("span",{className:"checkbox-label"},"Clearable")),a.default.createElement("label",{className:"checkbox"},a.default.createElement("input",{type:"checkbox",className:"checkbox-control",name:"rtl",checked:this.state.rtl,onChange:this.toggleCheckbox}),a.default.createElement("span",{className:"checkbox-label"},"rtl"))),a.default.createElement("div",{className:"checkbox-list"},a.default.createElement("label",{className:"checkbox"},a.default.createElement("input",{type:"radio",className:"checkbox-control",checked:"AU"===this.state.country,value:"AU",onChange:this.switchCountry}),a.default.createElement("span",{className:"checkbox-label"},"Australia")),a.default.createElement("label",{className:"checkbox"},a.default.createElement("input",{type:"radio",className:"checkbox-control",checked:"US"===this.state.country,value:"US",onChange:this.switchCountry}),a.default.createElement("span",{className:"checkbox-label"},"United States"))))}});e.exports=f},function(e,t,n){"use strict";t.AU=[{value:"australian-capital-territory",label:"Australian Capital Territory",className:"State-ACT"},{value:"new-south-wales",label:"New South Wales",className:"State-NSW"},{value:"victoria",label:"Victoria",className:"State-Vic"},{value:"queensland",label:"Queensland",className:"State-Qld"},{value:"western-australia",label:"Western Australia",className:"State-WA"},{value:"south-australia",label:"South Australia",className:"State-SA"},{value:"tasmania",label:"Tasmania",className:"State-Tas"},{value:"northern-territory",label:"Northern Territory",className:"State-NT"}],t.US=[{value:"AL",label:"Alabama",disabled:!0},{value:"AK",label:"Alaska"},{value:"AS",label:"American Samoa"},{value:"AZ",label:"Arizona"},{value:"AR",label:"Arkansas"},{value:"CA",label:"California"},{value:"CO",label:"Colorado"},{value:"CT",label:"Connecticut"},{value:"DE",label:"Delaware"},{value:"DC",label:"District Of Columbia"},{value:"FM",label:"Federated States Of Micronesia"},{value:"FL",label:"Florida"},{value:"GA",label:"Georgia"},{value:"GU",label:"Guam"},{value:"HI",label:"Hawaii"},{value:"ID",label:"Idaho"},{value:"IL",label:"Illinois"},{value:"IN",label:"Indiana"},{value:"IA",label:"Iowa"},{value:"KS",label:"Kansas"},{value:"KY",label:"Kentucky"},{value:"LA",label:"Louisiana"},{value:"ME",label:"Maine"},{value:"MH",label:"Marshall Islands"},{value:"MD",label:"Maryland"},{value:"MA",label:"Massachusetts"},{value:"MI",label:"Michigan"},{value:"MN",label:"Minnesota"},{value:"MS",label:"Mississippi"},{value:"MO",label:"Missouri"},{value:"MT",label:"Montana"},{value:"NE",label:"Nebraska"},{value:"NV",label:"Nevada"},{value:"NH",label:"New Hampshire"},{value:"NJ",label:"New Jersey"},{value:"NM",label:"New Mexico"},{value:"NY",label:"New York"},{value:"NC",label:"North Carolina"},{value:"ND",label:"North Dakota"},{value:"MP",label:"Northern Mariana Islands"},{value:"OH",label:"Ohio"},{value:"OK",label:"Oklahoma"},{value:"OR",label:"Oregon"},{value:"PW",label:"Palau"},{value:"PA",label:"Pennsylvania"},{value:"PR",label:"Puerto Rico"},{value:"RI",label:"Rhode Island"},{value:"SC",label:"South Carolina"},{value:"SD",label:"South Dakota"},{value:"TN",label:"Tennessee"},{value:"TX",label:"Texas"},{value:"UT",label:"Utah"},{value:"VT",label:"Vermont"},{value:"VI",label:"Virgin Islands"},{value:"VA",label:"Virginia"},{value:"WA",label:"Washington"},{value:"WV",label:"West Virginia"},{value:"WI",label:"Wisconsin"},{value:"WY",label:"Wyoming"}]}],[102]); \ No newline at end of file diff --git a/examples/dist/bundle.js b/examples/dist/bundle.js deleted file mode 100644 index 3248f69c1c..0000000000 --- a/examples/dist/bundle.js +++ /dev/null @@ -1,2580 +0,0 @@ -require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o _this2.props.value.length) { - _this2.clearOptions(); - } - _this2.props.onChange(newValues); - } - }; - - return children(_extends({}, this.props, props, { - isLoading: isLoading, - onInputChange: this._onInputChange - })); - } - }]); - - return Async; -})(_react.Component); - -exports['default'] = Async; - -Async.propTypes = propTypes; -Async.defaultProps = defaultProps; - -function defaultChildren(props) { - return _react2['default'].createElement(_Select2['default'], props); -} -module.exports = exports['default']; - -},{"./Select":5,"./utils/stripDiacritics":11,"prop-types":undefined,"react":undefined}],2:[function(require,module,exports){ -'use strict'; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - -var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _Select = require('./Select'); - -var _Select2 = _interopRequireDefault(_Select); - -var _Async = require('./Async'); - -var _Async2 = _interopRequireDefault(_Async); - -var _Creatable = require('./Creatable'); - -var _Creatable2 = _interopRequireDefault(_Creatable); - -function reduce(obj) { - var props = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - return Object.keys(obj).reduce(function (props, key) { - var value = obj[key]; - if (value !== undefined) props[key] = value; - return props; - }, props); -} - -var AsyncCreatableSelect = (function (_React$Component) { - _inherits(AsyncCreatableSelect, _React$Component); - - function AsyncCreatableSelect() { - _classCallCheck(this, AsyncCreatableSelect); - - _get(Object.getPrototypeOf(AsyncCreatableSelect.prototype), 'constructor', this).apply(this, arguments); - } - - _createClass(AsyncCreatableSelect, [{ - key: 'focus', - value: function focus() { - this.select.focus(); - } - }, { - key: 'render', - value: function render() { - var _this = this; - - return _react2['default'].createElement( - _Async2['default'], - this.props, - function (asyncProps) { - return _react2['default'].createElement( - _Creatable2['default'], - _this.props, - function (creatableProps) { - return _react2['default'].createElement(_Select2['default'], _extends({}, reduce(asyncProps, reduce(creatableProps, {})), { - onInputChange: function (input) { - creatableProps.onInputChange(input); - return asyncProps.onInputChange(input); - }, - ref: function (ref) { - _this.select = ref; - creatableProps.ref(ref); - asyncProps.ref(ref); - } - })); - } - ); - } - ); - } - }]); - - return AsyncCreatableSelect; -})(_react2['default'].Component); - -; - -module.exports = AsyncCreatableSelect; - -},{"./Async":1,"./Creatable":3,"./Select":5,"react":undefined}],3:[function(require,module,exports){ -'use strict'; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - -var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = require('prop-types'); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _Select = require('./Select'); - -var _Select2 = _interopRequireDefault(_Select); - -var _utilsDefaultFilterOptions = require('./utils/defaultFilterOptions'); - -var _utilsDefaultFilterOptions2 = _interopRequireDefault(_utilsDefaultFilterOptions); - -var _utilsDefaultMenuRenderer = require('./utils/defaultMenuRenderer'); - -var _utilsDefaultMenuRenderer2 = _interopRequireDefault(_utilsDefaultMenuRenderer); - -var CreatableSelect = (function (_React$Component) { - _inherits(CreatableSelect, _React$Component); - - function CreatableSelect(props, context) { - _classCallCheck(this, CreatableSelect); - - _get(Object.getPrototypeOf(CreatableSelect.prototype), 'constructor', this).call(this, props, context); - - this.filterOptions = this.filterOptions.bind(this); - this.menuRenderer = this.menuRenderer.bind(this); - this.onInputKeyDown = this.onInputKeyDown.bind(this); - this.onInputChange = this.onInputChange.bind(this); - this.onOptionSelect = this.onOptionSelect.bind(this); - } - - _createClass(CreatableSelect, [{ - key: 'createNewOption', - value: function createNewOption() { - var _props = this.props; - var isValidNewOption = _props.isValidNewOption; - var newOptionCreator = _props.newOptionCreator; - var onNewOptionClick = _props.onNewOptionClick; - var _props$options = _props.options; - var options = _props$options === undefined ? [] : _props$options; - var shouldKeyDownEventCreateNewOption = _props.shouldKeyDownEventCreateNewOption; - - if (isValidNewOption({ label: this.inputValue })) { - var option = newOptionCreator({ label: this.inputValue, labelKey: this.labelKey, valueKey: this.valueKey }); - var _isOptionUnique = this.isOptionUnique({ option: option }); - - // Don't add the same option twice. - if (_isOptionUnique) { - if (onNewOptionClick) { - onNewOptionClick(option); - } else { - options.unshift(option); - - this.select.selectValue(option); - } - } - } - } - }, { - key: 'filterOptions', - value: function filterOptions() { - var _props2 = this.props; - var filterOptions = _props2.filterOptions; - var isValidNewOption = _props2.isValidNewOption; - var options = _props2.options; - var promptTextCreator = _props2.promptTextCreator; - - // TRICKY Check currently selected options as well. - // Don't display a create-prompt for a value that's selected. - // This covers async edge-cases where a newly-created Option isn't yet in the async-loaded array. - var excludeOptions = arguments[2] || []; - - var filteredOptions = filterOptions.apply(undefined, arguments) || []; - - if (isValidNewOption({ label: this.inputValue })) { - var _newOptionCreator = this.props.newOptionCreator; - - var option = _newOptionCreator({ - label: this.inputValue, - labelKey: this.labelKey, - valueKey: this.valueKey - }); - - // TRICKY Compare to all options (not just filtered options) in case option has already been selected). - // For multi-selects, this would remove it from the filtered list. - var _isOptionUnique2 = this.isOptionUnique({ - option: option, - options: excludeOptions.concat(filteredOptions) - }); - - if (_isOptionUnique2) { - var _prompt = promptTextCreator(this.inputValue); - - this._createPlaceholderOption = _newOptionCreator({ - label: _prompt, - labelKey: this.labelKey, - valueKey: this.valueKey - }); - - filteredOptions.unshift(this._createPlaceholderOption); - } - } - - return filteredOptions; - } - }, { - key: 'isOptionUnique', - value: function isOptionUnique(_ref2) { - var option = _ref2.option; - var options = _ref2.options; - var isOptionUnique = this.props.isOptionUnique; - - options = options || this.select.filterOptions(); - - return isOptionUnique({ - labelKey: this.labelKey, - option: option, - options: options, - valueKey: this.valueKey - }); - } - }, { - key: 'menuRenderer', - value: function menuRenderer(params) { - var menuRenderer = this.props.menuRenderer; - - return menuRenderer(_extends({}, params, { - onSelect: this.onOptionSelect, - selectValue: this.onOptionSelect - })); - } - }, { - key: 'onInputChange', - value: function onInputChange(input) { - var onInputChange = this.props.onInputChange; - - if (onInputChange) { - onInputChange(input); - } - - // This value may be needed in between Select mounts (when this.select is null) - this.inputValue = input; - } - }, { - key: 'onInputKeyDown', - value: function onInputKeyDown(event) { - var _props3 = this.props; - var shouldKeyDownEventCreateNewOption = _props3.shouldKeyDownEventCreateNewOption; - var onInputKeyDown = _props3.onInputKeyDown; - - var focusedOption = this.select.getFocusedOption(); - - if (focusedOption && focusedOption === this._createPlaceholderOption && shouldKeyDownEventCreateNewOption({ keyCode: event.keyCode })) { - this.createNewOption(); - - // Prevent decorated Select from doing anything additional with this keyDown event - event.preventDefault(); - } else if (onInputKeyDown) { - onInputKeyDown(event); - } - } - }, { - key: 'onOptionSelect', - value: function onOptionSelect(option, event) { - if (option === this._createPlaceholderOption) { - this.createNewOption(); - } else { - this.select.selectValue(option); - } - } - }, { - key: 'focus', - value: function focus() { - this.select.focus(); - } - }, { - key: 'render', - value: function render() { - var _this = this; - - var _props4 = this.props; - var newOptionCreator = _props4.newOptionCreator; - var shouldKeyDownEventCreateNewOption = _props4.shouldKeyDownEventCreateNewOption; - - var restProps = _objectWithoutProperties(_props4, ['newOptionCreator', 'shouldKeyDownEventCreateNewOption']); - - var children = this.props.children; - - // We can't use destructuring default values to set the children, - // because it won't apply work if `children` is null. A falsy check is - // more reliable in real world use-cases. - if (!children) { - children = defaultChildren; - } - - var props = _extends({}, restProps, { - allowCreate: true, - filterOptions: this.filterOptions, - menuRenderer: this.menuRenderer, - onInputChange: this.onInputChange, - onInputKeyDown: this.onInputKeyDown, - ref: function ref(_ref) { - _this.select = _ref; - - // These values may be needed in between Select mounts (when this.select is null) - if (_ref) { - _this.labelKey = _ref.props.labelKey; - _this.valueKey = _ref.props.valueKey; - } - } - }); - - return children(props); - } - }]); - - return CreatableSelect; -})(_react2['default'].Component); - -; - -function defaultChildren(props) { - return _react2['default'].createElement(_Select2['default'], props); -}; - -function isOptionUnique(_ref3) { - var option = _ref3.option; - var options = _ref3.options; - var labelKey = _ref3.labelKey; - var valueKey = _ref3.valueKey; - - return options.filter(function (existingOption) { - return existingOption[labelKey] === option[labelKey] || existingOption[valueKey] === option[valueKey]; - }).length === 0; -}; - -function isValidNewOption(_ref4) { - var label = _ref4.label; - - return !!label; -}; - -function newOptionCreator(_ref5) { - var label = _ref5.label; - var labelKey = _ref5.labelKey; - var valueKey = _ref5.valueKey; - - var option = {}; - option[valueKey] = label; - option[labelKey] = label; - option.className = 'Select-create-option-placeholder'; - return option; -}; - -function promptTextCreator(label) { - return 'Create option "' + label + '"'; -} - -function shouldKeyDownEventCreateNewOption(_ref6) { - var keyCode = _ref6.keyCode; - - switch (keyCode) { - case 9: // TAB - case 13: // ENTER - case 188: - // COMMA - return true; - } - - return false; -}; - -// Default prop methods -CreatableSelect.isOptionUnique = isOptionUnique; -CreatableSelect.isValidNewOption = isValidNewOption; -CreatableSelect.newOptionCreator = newOptionCreator; -CreatableSelect.promptTextCreator = promptTextCreator; -CreatableSelect.shouldKeyDownEventCreateNewOption = shouldKeyDownEventCreateNewOption; - -CreatableSelect.defaultProps = { - filterOptions: _utilsDefaultFilterOptions2['default'], - isOptionUnique: isOptionUnique, - isValidNewOption: isValidNewOption, - menuRenderer: _utilsDefaultMenuRenderer2['default'], - newOptionCreator: newOptionCreator, - promptTextCreator: promptTextCreator, - shouldKeyDownEventCreateNewOption: shouldKeyDownEventCreateNewOption -}; - -CreatableSelect.propTypes = { - // Child function responsible for creating the inner Select component - // This component can be used to compose HOCs (eg Creatable and Async) - // (props: Object): PropTypes.element - children: _propTypes2['default'].func, - - // See Select.propTypes.filterOptions - filterOptions: _propTypes2['default'].any, - - // Searches for any matching option within the set of options. - // This function prevents duplicate options from being created. - // ({ option: Object, options: Array, labelKey: string, valueKey: string }): boolean - isOptionUnique: _propTypes2['default'].func, - - // Determines if the current input text represents a valid option. - // ({ label: string }): boolean - isValidNewOption: _propTypes2['default'].func, - - // See Select.propTypes.menuRenderer - menuRenderer: _propTypes2['default'].any, - - // Factory to create new option. - // ({ label: string, labelKey: string, valueKey: string }): Object - newOptionCreator: _propTypes2['default'].func, - - // input change handler: function (inputValue) {} - onInputChange: _propTypes2['default'].func, - - // input keyDown handler: function (event) {} - onInputKeyDown: _propTypes2['default'].func, - - // new option click handler: function (option) {} - onNewOptionClick: _propTypes2['default'].func, - - // See Select.propTypes.options - options: _propTypes2['default'].array, - - // Creates prompt/placeholder option text. - // (filterText: string): string - promptTextCreator: _propTypes2['default'].func, - - // Decides if a keyDown event (eg its `keyCode`) should result in the creation of a new option. - shouldKeyDownEventCreateNewOption: _propTypes2['default'].func -}; - -module.exports = CreatableSelect; - -},{"./Select":5,"./utils/defaultFilterOptions":9,"./utils/defaultMenuRenderer":10,"prop-types":undefined,"react":undefined}],4:[function(require,module,exports){ -'use strict'; - -var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - -var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = require('prop-types'); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _classnames = require('classnames'); - -var _classnames2 = _interopRequireDefault(_classnames); - -var Option = (function (_React$Component) { - _inherits(Option, _React$Component); - - function Option(props) { - _classCallCheck(this, Option); - - _get(Object.getPrototypeOf(Option.prototype), 'constructor', this).call(this, props); - - this.handleMouseDown = this.handleMouseDown.bind(this); - this.handleMouseEnter = this.handleMouseEnter.bind(this); - this.handleMouseMove = this.handleMouseMove.bind(this); - this.handleTouchStart = this.handleTouchStart.bind(this); - this.onFocus = this.onFocus.bind(this); - } - - _createClass(Option, [{ - key: 'blockEvent', - value: function blockEvent(event) { - event.preventDefault(); - event.stopPropagation(); - if (event.target.tagName !== 'A' || !('href' in event.target)) { - return; - } - if (event.target.target) { - window.open(event.target.href, event.target.target); - } else { - window.location.href = event.target.href; - } - } - }, { - key: 'handleMouseDown', - value: function handleMouseDown(event) { - event.preventDefault(); - event.stopPropagation(); - this.props.onSelect(this.props.option, event); - } - }, { - key: 'handleMouseEnter', - value: function handleMouseEnter(event) { - this.onFocus(event); - } - }, { - key: 'handleMouseMove', - value: function handleMouseMove(event) { - this.onFocus(event); - } - }, { - key: 'handleTouchEnd', - value: function handleTouchEnd(event) { - // Check if the view is being dragged, In this case - // we don't want to fire the click event (because the user only wants to scroll) - if (this.dragging) return; - - this.handleMouseDown(event); - } - }, { - key: 'handleTouchMove', - value: function handleTouchMove(event) { - // Set a flag that the view is being dragged - this.dragging = true; - } - }, { - key: 'handleTouchStart', - value: function handleTouchStart(event) { - // Set a flag that the view is not being dragged - this.dragging = false; - } - }, { - key: 'onFocus', - value: function onFocus(event) { - if (!this.props.isFocused) { - this.props.onFocus(this.props.option, event); - } - } - }, { - key: 'render', - value: function render() { - var _props = this.props; - var option = _props.option; - var instancePrefix = _props.instancePrefix; - var optionIndex = _props.optionIndex; - - var className = (0, _classnames2['default'])(this.props.className, option.className); - - return option.disabled ? _react2['default'].createElement( - 'div', - { className: className, - onMouseDown: this.blockEvent, - onClick: this.blockEvent }, - this.props.children - ) : _react2['default'].createElement( - 'div', - { className: className, - style: option.style, - role: 'option', - onMouseDown: this.handleMouseDown, - onMouseEnter: this.handleMouseEnter, - onMouseMove: this.handleMouseMove, - onTouchStart: this.handleTouchStart, - onTouchMove: this.handleTouchMove, - onTouchEnd: this.handleTouchEnd, - id: instancePrefix + '-option-' + optionIndex, - title: option.title }, - this.props.children - ); - } - }]); - - return Option; -})(_react2['default'].Component); - -; - -Option.propTypes = { - children: _propTypes2['default'].node, - className: _propTypes2['default'].string, // className (based on mouse position) - instancePrefix: _propTypes2['default'].string.isRequired, // unique prefix for the ids (used for aria) - isDisabled: _propTypes2['default'].bool, // the option is disabled - isFocused: _propTypes2['default'].bool, // the option is focused - isSelected: _propTypes2['default'].bool, // the option is selected - onFocus: _propTypes2['default'].func, // method to handle mouseEnter on option element - onSelect: _propTypes2['default'].func, // method to handle click on option element - onUnfocus: _propTypes2['default'].func, // method to handle mouseLeave on option element - option: _propTypes2['default'].object.isRequired, // object that is base for that option - optionIndex: _propTypes2['default'].number }; - -// index of the option, used to generate unique ids for aria -module.exports = Option; - -},{"classnames":undefined,"prop-types":undefined,"react":undefined}],5:[function(require,module,exports){ -/*! - Copyright (c) 2016 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/react-select -*/ - -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); - -var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - -var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _react = require('react'); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = require('prop-types'); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _reactDom = require('react-dom'); - -var _reactDom2 = _interopRequireDefault(_reactDom); - -var _reactInputAutosize = require('react-input-autosize'); - -var _reactInputAutosize2 = _interopRequireDefault(_reactInputAutosize); - -var _classnames = require('classnames'); - -var _classnames2 = _interopRequireDefault(_classnames); - -var _utilsDefaultArrowRenderer = require('./utils/defaultArrowRenderer'); - -var _utilsDefaultArrowRenderer2 = _interopRequireDefault(_utilsDefaultArrowRenderer); - -var _utilsDefaultFilterOptions = require('./utils/defaultFilterOptions'); - -var _utilsDefaultFilterOptions2 = _interopRequireDefault(_utilsDefaultFilterOptions); - -var _utilsDefaultMenuRenderer = require('./utils/defaultMenuRenderer'); - -var _utilsDefaultMenuRenderer2 = _interopRequireDefault(_utilsDefaultMenuRenderer); - -var _utilsDefaultClearRenderer = require('./utils/defaultClearRenderer'); - -var _utilsDefaultClearRenderer2 = _interopRequireDefault(_utilsDefaultClearRenderer); - -var _Option = require('./Option'); - -var _Option2 = _interopRequireDefault(_Option); - -var _Value = require('./Value'); - -var _Value2 = _interopRequireDefault(_Value); - -function stringifyValue(value) { - var valueType = typeof value; - if (valueType === 'string') { - return value; - } else if (valueType === 'object') { - return JSON.stringify(value); - } else if (valueType === 'number' || valueType === 'boolean') { - return String(value); - } else { - return ''; - } -} - -var stringOrNode = _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].node]); - -var instanceId = 1; - -var Select = (function (_React$Component) { - _inherits(Select, _React$Component); - - function Select(props) { - _classCallCheck(this, Select); - - _get(Object.getPrototypeOf(Select.prototype), 'constructor', this).call(this, props); - - this.handleTouchOutside = this.handleTouchOutside.bind(this); - this.handleTouchMove = this.handleTouchMove.bind(this); - this.handleTouchStart = this.handleTouchStart.bind(this); - this.handleTouchEnd = this.handleTouchEnd.bind(this); - this.handleTouchEndClearValue = this.handleTouchEndClearValue.bind(this); - this.handleMouseDown = this.handleMouseDown.bind(this); - this.handleMouseDownOnArrow = this.handleMouseDownOnArrow.bind(this); - this.handleMouseDownOnMenu = this.handleMouseDownOnMenu.bind(this); - this.handleInputFocus = this.handleInputFocus.bind(this); - this.handleInputBlur = this.handleInputBlur.bind(this); - this.handleInputChange = this.handleInputChange.bind(this); - this.handleInputValueChange = this.handleInputValueChange.bind(this); - this.handleKeyDown = this.handleKeyDown.bind(this); - this.handleValueClick = this.handleValueClick.bind(this); - this.handleMenuScroll = this.handleMenuScroll.bind(this); - this.handleRequired = this.handleRequired.bind(this); - this.getOptionLabel = this.getOptionLabel.bind(this); - this.onOptionRef = this.onOptionRef.bind(this); - this.clearValue = this.clearValue.bind(this); - this.removeValue = this.removeValue.bind(this); - this.selectValue = this.selectValue.bind(this); - this.focusOption = this.focusOption.bind(this); - - this.state = { - inputValue: '', - isFocused: false, - isOpen: false, - isPseudoFocused: false, - required: false - }; - } - - _createClass(Select, [{ - key: 'componentWillMount', - value: function componentWillMount() { - this._instancePrefix = 'react-select-' + (this.props.instanceId || ++instanceId) + '-'; - var valueArray = this.getValueArray(this.props.value); - - if (this.props.required) { - this.setState({ - required: this.handleRequired(valueArray[0], this.props.multi) - }); - } - } - }, { - key: 'componentDidMount', - value: function componentDidMount() { - if (this.props.autofocus) { - this.focus(); - } - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - var valueArray = this.getValueArray(nextProps.value, nextProps); - - if (nextProps.required) { - this.setState({ - required: this.handleRequired(valueArray[0], nextProps.multi) - }); - } - } - }, { - key: 'componentWillUpdate', - value: function componentWillUpdate(nextProps, nextState) { - if (nextState.isOpen !== this.state.isOpen) { - this.toggleTouchOutsideEvent(nextState.isOpen); - var handler = nextState.isOpen ? nextProps.onOpen : nextProps.onClose; - handler && handler(); - } - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate(prevProps, prevState) { - // focus to the selected option - if (this.menu && this.focused && this.state.isOpen && !this.hasScrolledToOption) { - var focusedOptionNode = _reactDom2['default'].findDOMNode(this.focused); - var menuNode = _reactDom2['default'].findDOMNode(this.menu); - menuNode.scrollTop = focusedOptionNode.offsetTop; - this.hasScrolledToOption = true; - } else if (!this.state.isOpen) { - this.hasScrolledToOption = false; - } - - if (this._scrollToFocusedOptionOnUpdate && this.focused && this.menu) { - this._scrollToFocusedOptionOnUpdate = false; - var focusedDOM = _reactDom2['default'].findDOMNode(this.focused); - var menuDOM = _reactDom2['default'].findDOMNode(this.menu); - var focusedRect = focusedDOM.getBoundingClientRect(); - var menuRect = menuDOM.getBoundingClientRect(); - if (focusedRect.bottom > menuRect.bottom || focusedRect.top < menuRect.top) { - menuDOM.scrollTop = focusedDOM.offsetTop + focusedDOM.clientHeight - menuDOM.offsetHeight; - } - } - if (this.props.scrollMenuIntoView && this.menuContainer) { - var menuContainerRect = this.menuContainer.getBoundingClientRect(); - if (window.innerHeight < menuContainerRect.bottom + this.props.menuBuffer) { - window.scrollBy(0, menuContainerRect.bottom + this.props.menuBuffer - window.innerHeight); - } - } - if (prevProps.disabled !== this.props.disabled) { - this.setState({ isFocused: false }); // eslint-disable-line react/no-did-update-set-state - this.closeMenu(); - } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - if (!document.removeEventListener && document.detachEvent) { - document.detachEvent('ontouchstart', this.handleTouchOutside); - } else { - document.removeEventListener('touchstart', this.handleTouchOutside); - } - } - }, { - key: 'toggleTouchOutsideEvent', - value: function toggleTouchOutsideEvent(enabled) { - if (enabled) { - if (!document.addEventListener && document.attachEvent) { - document.attachEvent('ontouchstart', this.handleTouchOutside); - } else { - document.addEventListener('touchstart', this.handleTouchOutside); - } - } else { - if (!document.removeEventListener && document.detachEvent) { - document.detachEvent('ontouchstart', this.handleTouchOutside); - } else { - document.removeEventListener('touchstart', this.handleTouchOutside); - } - } - } - }, { - key: 'handleTouchOutside', - value: function handleTouchOutside(event) { - // handle touch outside on ios to dismiss menu - if (this.wrapper && !this.wrapper.contains(event.target)) { - this.closeMenu(); - } - } - }, { - key: 'focus', - value: function focus() { - if (!this.input) return; - this.input.focus(); - } - }, { - key: 'blurInput', - value: function blurInput() { - if (!this.input) return; - this.input.blur(); - } - }, { - key: 'handleTouchMove', - value: function handleTouchMove(event) { - // Set a flag that the view is being dragged - this.dragging = true; - } - }, { - key: 'handleTouchStart', - value: function handleTouchStart(event) { - // Set a flag that the view is not being dragged - this.dragging = false; - } - }, { - key: 'handleTouchEnd', - value: function handleTouchEnd(event) { - // Check if the view is being dragged, In this case - // we don't want to fire the click event (because the user only wants to scroll) - if (this.dragging) return; - - // Fire the mouse events - this.handleMouseDown(event); - } - }, { - key: 'handleTouchEndClearValue', - value: function handleTouchEndClearValue(event) { - // Check if the view is being dragged, In this case - // we don't want to fire the click event (because the user only wants to scroll) - if (this.dragging) return; - - // Clear the value - this.clearValue(event); - } - }, { - key: 'handleMouseDown', - value: function handleMouseDown(event) { - // if the event was triggered by a mousedown and not the primary - // button, or if the component is disabled, ignore it. - if (this.props.disabled || event.type === 'mousedown' && event.button !== 0) { - return; - } - - if (event.target.tagName === 'INPUT') { - return; - } - - // prevent default event handlers - event.stopPropagation(); - event.preventDefault(); - - // for the non-searchable select, toggle the menu - if (!this.props.searchable) { - this.focus(); - return this.setState({ - isOpen: !this.state.isOpen - }); - } - - if (this.state.isFocused) { - // On iOS, we can get into a state where we think the input is focused but it isn't really, - // since iOS ignores programmatic calls to input.focus() that weren't triggered by a click event. - // Call focus() again here to be safe. - this.focus(); - - var input = this.input; - if (typeof input.getInput === 'function') { - // Get the actual DOM input if the ref is an component - input = input.getInput(); - } - - // clears the value so that the cursor will be at the end of input when the component re-renders - input.value = ''; - - // if the input is focused, ensure the menu is open - this.setState({ - isOpen: true, - isPseudoFocused: false - }); - } else { - // otherwise, focus the input and open the menu - this._openAfterFocus = true; - this.focus(); - } - } - }, { - key: 'handleMouseDownOnArrow', - value: function handleMouseDownOnArrow(event) { - // if the event was triggered by a mousedown and not the primary - // button, or if the component is disabled, ignore it. - if (this.props.disabled || event.type === 'mousedown' && event.button !== 0) { - return; - } - // If the menu isn't open, let the event bubble to the main handleMouseDown - if (!this.state.isOpen) { - return; - } - // prevent default event handlers - event.stopPropagation(); - event.preventDefault(); - // close the menu - this.closeMenu(); - } - }, { - key: 'handleMouseDownOnMenu', - value: function handleMouseDownOnMenu(event) { - // if the event was triggered by a mousedown and not the primary - // button, or if the component is disabled, ignore it. - if (this.props.disabled || event.type === 'mousedown' && event.button !== 0) { - return; - } - event.stopPropagation(); - event.preventDefault(); - - this._openAfterFocus = true; - this.focus(); - } - }, { - key: 'closeMenu', - value: function closeMenu() { - if (this.props.onCloseResetsInput) { - this.setState({ - isOpen: false, - isPseudoFocused: this.state.isFocused && !this.props.multi, - inputValue: this.handleInputValueChange('') - }); - } else { - this.setState({ - isOpen: false, - isPseudoFocused: this.state.isFocused && !this.props.multi - }); - } - this.hasScrolledToOption = false; - } - }, { - key: 'handleInputFocus', - value: function handleInputFocus(event) { - if (this.props.disabled) return; - var isOpen = this.state.isOpen || this._openAfterFocus || this.props.openOnFocus; - if (this.props.onFocus) { - this.props.onFocus(event); - } - this.setState({ - isFocused: true, - isOpen: isOpen - }); - this._openAfterFocus = false; - } - }, { - key: 'handleInputBlur', - value: function handleInputBlur(event) { - // The check for menu.contains(activeElement) is necessary to prevent IE11's scrollbar from closing the menu in certain contexts. - if (this.menu && (this.menu === document.activeElement || this.menu.contains(document.activeElement))) { - this.focus(); - return; - } - - if (this.props.onBlur) { - this.props.onBlur(event); - } - var onBlurredState = { - isFocused: false, - isOpen: false, - isPseudoFocused: false - }; - if (this.props.onBlurResetsInput) { - onBlurredState.inputValue = this.handleInputValueChange(''); - } - this.setState(onBlurredState); - } - }, { - key: 'handleInputChange', - value: function handleInputChange(event) { - var newInputValue = event.target.value; - - if (this.state.inputValue !== event.target.value) { - newInputValue = this.handleInputValueChange(newInputValue); - } - - this.setState({ - isOpen: true, - isPseudoFocused: false, - inputValue: newInputValue - }); - } - }, { - key: 'handleInputValueChange', - value: function handleInputValueChange(newValue) { - if (this.props.onInputChange) { - var nextState = this.props.onInputChange(newValue); - // Note: != used deliberately here to catch undefined and null - if (nextState != null && typeof nextState !== 'object') { - newValue = '' + nextState; - } - } - return newValue; - } - }, { - key: 'handleKeyDown', - value: function handleKeyDown(event) { - if (this.props.disabled) return; - - if (typeof this.props.onInputKeyDown === 'function') { - this.props.onInputKeyDown(event); - if (event.defaultPrevented) { - return; - } - } - - switch (event.keyCode) { - case 8: - // backspace - if (!this.state.inputValue && this.props.backspaceRemoves) { - event.preventDefault(); - this.popValue(); - } - return; - case 9: - // tab - if (event.shiftKey || !this.state.isOpen || !this.props.tabSelectsValue) { - return; - } - this.selectFocusedOption(); - return; - case 13: - // enter - if (!this.state.isOpen) return; - event.stopPropagation(); - this.selectFocusedOption(); - break; - case 27: - // escape - if (this.state.isOpen) { - this.closeMenu(); - event.stopPropagation(); - } else if (this.props.clearable && this.props.escapeClearsValue) { - this.clearValue(event); - event.stopPropagation(); - } - break; - case 38: - // up - this.focusPreviousOption(); - break; - case 40: - // down - this.focusNextOption(); - break; - case 33: - // page up - this.focusPageUpOption(); - break; - case 34: - // page down - this.focusPageDownOption(); - break; - case 35: - // end key - if (event.shiftKey) { - return; - } - this.focusEndOption(); - break; - case 36: - // home key - if (event.shiftKey) { - return; - } - this.focusStartOption(); - break; - case 46: - // backspace - if (!this.state.inputValue && this.props.deleteRemoves) { - event.preventDefault(); - this.popValue(); - } - return; - default: - return; - } - event.preventDefault(); - } - }, { - key: 'handleValueClick', - value: function handleValueClick(option, event) { - if (!this.props.onValueClick) return; - this.props.onValueClick(option, event); - } - }, { - key: 'handleMenuScroll', - value: function handleMenuScroll(event) { - if (!this.props.onMenuScrollToBottom) return; - var target = event.target; - - if (target.scrollHeight > target.offsetHeight && !(target.scrollHeight - target.offsetHeight - target.scrollTop)) { - this.props.onMenuScrollToBottom(); - } - } - }, { - key: 'handleRequired', - value: function handleRequired(value, multi) { - if (!value) return true; - return multi ? value.length === 0 : Object.keys(value).length === 0; - } - }, { - key: 'getOptionLabel', - value: function getOptionLabel(op) { - return op[this.props.labelKey]; - } - - /** - * Turns a value into an array from the given options - * @param {String|Number|Array} value - the value of the select input - * @param {Object} nextProps - optionally specify the nextProps so the returned array uses the latest configuration - * @returns {Array} the value of the select represented in an array - */ - }, { - key: 'getValueArray', - value: function getValueArray(value, nextProps) { - var _this = this; - - /** support optionally passing in the `nextProps` so `componentWillReceiveProps` updates will function as expected */ - var props = typeof nextProps === 'object' ? nextProps : this.props; - if (props.multi) { - if (typeof value === 'string') value = value.split(props.delimiter); - if (!Array.isArray(value)) { - if (value === null || value === undefined) return []; - value = [value]; - } - return value.map(function (value) { - return _this.expandValue(value, props); - }).filter(function (i) { - return i; - }); - } - var expandedValue = this.expandValue(value, props); - return expandedValue ? [expandedValue] : []; - } - - /** - * Retrieve a value from the given options and valueKey - * @param {String|Number|Array} value - the selected value(s) - * @param {Object} props - the Select component's props (or nextProps) - */ - }, { - key: 'expandValue', - value: function expandValue(value, props) { - var valueType = typeof value; - if (valueType !== 'string' && valueType !== 'number' && valueType !== 'boolean') return value; - var options = props.options; - var valueKey = props.valueKey; - - if (!options) return; - for (var i = 0; i < options.length; i++) { - if (options[i][valueKey] === value) return options[i]; - } - } - }, { - key: 'setValue', - value: function setValue(value) { - var _this2 = this; - - if (this.props.autoBlur) { - this.blurInput(); - } - if (!this.props.onChange) return; - if (this.props.required) { - var required = this.handleRequired(value, this.props.multi); - this.setState({ required: required }); - } - if (this.props.simpleValue && value) { - value = this.props.multi ? value.map(function (i) { - return i[_this2.props.valueKey]; - }).join(this.props.delimiter) : value[this.props.valueKey]; - } - this.props.onChange(value); - } - }, { - key: 'selectValue', - value: function selectValue(value) { - var _this3 = this; - - //NOTE: update value in the callback to make sure the input value is empty so that there are no styling issues (Chrome had issue otherwise) - this.hasScrolledToOption = false; - if (this.props.multi) { - this.setState({ - inputValue: this.handleInputValueChange(''), - focusedIndex: null - }, function () { - _this3.addValue(value); - }); - } else { - this.setState({ - isOpen: false, - inputValue: this.handleInputValueChange(''), - isPseudoFocused: this.state.isFocused - }, function () { - _this3.setValue(value); - }); - } - } - }, { - key: 'addValue', - value: function addValue(value) { - var valueArray = this.getValueArray(this.props.value); - var visibleOptions = this._visibleOptions.filter(function (val) { - return !val.disabled; - }); - var lastValueIndex = visibleOptions.indexOf(value); - this.setValue(valueArray.concat(value)); - if (visibleOptions.length - 1 === lastValueIndex) { - // the last option was selected; focus the second-last one - this.focusOption(visibleOptions[lastValueIndex - 1]); - } else if (visibleOptions.length > lastValueIndex) { - // focus the option below the selected one - this.focusOption(visibleOptions[lastValueIndex + 1]); - } - } - }, { - key: 'popValue', - value: function popValue() { - var valueArray = this.getValueArray(this.props.value); - if (!valueArray.length) return; - if (valueArray[valueArray.length - 1].clearableValue === false) return; - this.setValue(this.props.multi ? valueArray.slice(0, valueArray.length - 1) : null); - } - }, { - key: 'removeValue', - value: function removeValue(value) { - var valueArray = this.getValueArray(this.props.value); - this.setValue(valueArray.filter(function (i) { - return i !== value; - })); - this.focus(); - } - }, { - key: 'clearValue', - value: function clearValue(event) { - // if the event was triggered by a mousedown and not the primary - // button, ignore it. - if (event && event.type === 'mousedown' && event.button !== 0) { - return; - } - event.stopPropagation(); - event.preventDefault(); - this.setValue(this.getResetValue()); - this.setState({ - isOpen: false, - inputValue: this.handleInputValueChange('') - }, this.focus); - } - }, { - key: 'getResetValue', - value: function getResetValue() { - if (this.props.resetValue !== undefined) { - return this.props.resetValue; - } else if (this.props.multi) { - return []; - } else { - return null; - } - } - }, { - key: 'focusOption', - value: function focusOption(option) { - this.setState({ - focusedOption: option - }); - } - }, { - key: 'focusNextOption', - value: function focusNextOption() { - this.focusAdjacentOption('next'); - } - }, { - key: 'focusPreviousOption', - value: function focusPreviousOption() { - this.focusAdjacentOption('previous'); - } - }, { - key: 'focusPageUpOption', - value: function focusPageUpOption() { - this.focusAdjacentOption('page_up'); - } - }, { - key: 'focusPageDownOption', - value: function focusPageDownOption() { - this.focusAdjacentOption('page_down'); - } - }, { - key: 'focusStartOption', - value: function focusStartOption() { - this.focusAdjacentOption('start'); - } - }, { - key: 'focusEndOption', - value: function focusEndOption() { - this.focusAdjacentOption('end'); - } - }, { - key: 'focusAdjacentOption', - value: function focusAdjacentOption(dir) { - var options = this._visibleOptions.map(function (option, index) { - return { option: option, index: index }; - }).filter(function (option) { - return !option.option.disabled; - }); - this._scrollToFocusedOptionOnUpdate = true; - if (!this.state.isOpen) { - this.setState({ - isOpen: true, - inputValue: '', - focusedOption: this._focusedOption || (options.length ? options[dir === 'next' ? 0 : options.length - 1].option : null) - }); - return; - } - if (!options.length) return; - var focusedIndex = -1; - for (var i = 0; i < options.length; i++) { - if (this._focusedOption === options[i].option) { - focusedIndex = i; - break; - } - } - if (dir === 'next' && focusedIndex !== -1) { - focusedIndex = (focusedIndex + 1) % options.length; - } else if (dir === 'previous') { - if (focusedIndex > 0) { - focusedIndex = focusedIndex - 1; - } else { - focusedIndex = options.length - 1; - } - } else if (dir === 'start') { - focusedIndex = 0; - } else if (dir === 'end') { - focusedIndex = options.length - 1; - } else if (dir === 'page_up') { - var potentialIndex = focusedIndex - this.props.pageSize; - if (potentialIndex < 0) { - focusedIndex = 0; - } else { - focusedIndex = potentialIndex; - } - } else if (dir === 'page_down') { - var potentialIndex = focusedIndex + this.props.pageSize; - if (potentialIndex > options.length - 1) { - focusedIndex = options.length - 1; - } else { - focusedIndex = potentialIndex; - } - } - - if (focusedIndex === -1) { - focusedIndex = 0; - } - - this.setState({ - focusedIndex: options[focusedIndex].index, - focusedOption: options[focusedIndex].option - }); - } - }, { - key: 'getFocusedOption', - value: function getFocusedOption() { - return this._focusedOption; - } - }, { - key: 'getInputValue', - value: function getInputValue() { - return this.state.inputValue; - } - }, { - key: 'selectFocusedOption', - value: function selectFocusedOption() { - if (this._focusedOption) { - return this.selectValue(this._focusedOption); - } - } - }, { - key: 'renderLoading', - value: function renderLoading() { - if (!this.props.isLoading) return; - return _react2['default'].createElement( - 'span', - { className: 'Select-loading-zone', 'aria-hidden': 'true' }, - _react2['default'].createElement('span', { className: 'Select-loading' }) - ); - } - }, { - key: 'renderValue', - value: function renderValue(valueArray, isOpen) { - var _this4 = this; - - var renderLabel = this.props.valueRenderer || this.getOptionLabel; - var ValueComponent = this.props.valueComponent; - if (!valueArray.length) { - return !this.state.inputValue ? _react2['default'].createElement( - 'div', - { className: 'Select-placeholder' }, - this.props.placeholder - ) : null; - } - var onClick = this.props.onValueClick ? this.handleValueClick : null; - if (this.props.multi) { - return valueArray.map(function (value, i) { - return _react2['default'].createElement( - ValueComponent, - { - id: _this4._instancePrefix + '-value-' + i, - instancePrefix: _this4._instancePrefix, - disabled: _this4.props.disabled || value.clearableValue === false, - key: 'value-' + i + '-' + value[_this4.props.valueKey], - onClick: onClick, - onRemove: _this4.removeValue, - value: value - }, - renderLabel(value, i), - _react2['default'].createElement( - 'span', - { className: 'Select-aria-only' }, - ' ' - ) - ); - }); - } else if (!this.state.inputValue) { - if (isOpen) onClick = null; - return _react2['default'].createElement( - ValueComponent, - { - id: this._instancePrefix + '-value-item', - disabled: this.props.disabled, - instancePrefix: this._instancePrefix, - onClick: onClick, - value: valueArray[0] - }, - renderLabel(valueArray[0]) - ); - } - } - }, { - key: 'renderInput', - value: function renderInput(valueArray, focusedOptionIndex) { - var _classNames, - _this5 = this; - - var className = (0, _classnames2['default'])('Select-input', this.props.inputProps.className); - var isOpen = !!this.state.isOpen; - - var ariaOwns = (0, _classnames2['default'])((_classNames = {}, _defineProperty(_classNames, this._instancePrefix + '-list', isOpen), _defineProperty(_classNames, this._instancePrefix + '-backspace-remove-message', this.props.multi && !this.props.disabled && this.state.isFocused && !this.state.inputValue), _classNames)); - - // TODO: Check how this project includes Object.assign() - var inputProps = _extends({}, this.props.inputProps, { - role: 'combobox', - 'aria-expanded': '' + isOpen, - 'aria-owns': ariaOwns, - 'aria-haspopup': '' + isOpen, - 'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value', - 'aria-describedby': this.props['aria-describedby'], - 'aria-labelledby': this.props['aria-labelledby'], - 'aria-label': this.props['aria-label'], - className: className, - tabIndex: this.props.tabIndex, - onBlur: this.handleInputBlur, - onChange: this.handleInputChange, - onFocus: this.handleInputFocus, - ref: function ref(_ref) { - return _this5.input = _ref; - }, - required: this.state.required, - value: this.state.inputValue - }); - - if (this.props.inputRenderer) { - return this.props.inputRenderer(inputProps); - } - - if (this.props.disabled || !this.props.searchable) { - var _props$inputProps = this.props.inputProps; - var inputClassName = _props$inputProps.inputClassName; - - var divProps = _objectWithoutProperties(_props$inputProps, ['inputClassName']); - - var _ariaOwns = (0, _classnames2['default'])(_defineProperty({}, this._instancePrefix + '-list', isOpen)); - - return _react2['default'].createElement('div', _extends({}, divProps, { - role: 'combobox', - 'aria-expanded': isOpen, - 'aria-owns': _ariaOwns, - 'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value', - className: className, - tabIndex: this.props.tabIndex || 0, - onBlur: this.handleInputBlur, - onFocus: this.handleInputFocus, - ref: function (ref) { - return _this5.input = ref; - }, - 'aria-readonly': '' + !!this.props.disabled, - style: { border: 0, width: 1, display: 'inline-block' } })); - } - - if (this.props.autosize) { - return _react2['default'].createElement(_reactInputAutosize2['default'], _extends({}, inputProps, { minWidth: '5' })); - } - return _react2['default'].createElement( - 'div', - { className: className }, - _react2['default'].createElement('input', inputProps) - ); - } - }, { - key: 'renderClear', - value: function renderClear() { - - if (!this.props.clearable || this.props.value === undefined || this.props.value === null || this.props.multi && !this.props.value.length || this.props.disabled || this.props.isLoading) return; - var clear = this.props.clearRenderer(); - - return _react2['default'].createElement( - 'span', - { className: 'Select-clear-zone', title: this.props.multi ? this.props.clearAllText : this.props.clearValueText, - 'aria-label': this.props.multi ? this.props.clearAllText : this.props.clearValueText, - onMouseDown: this.clearValue, - onTouchStart: this.handleTouchStart, - onTouchMove: this.handleTouchMove, - onTouchEnd: this.handleTouchEndClearValue - }, - clear - ); - } - }, { - key: 'renderArrow', - value: function renderArrow() { - var onMouseDown = this.handleMouseDownOnArrow; - var isOpen = this.state.isOpen; - var arrow = this.props.arrowRenderer({ onMouseDown: onMouseDown, isOpen: isOpen }); - - return _react2['default'].createElement( - 'span', - { - className: 'Select-arrow-zone', - onMouseDown: onMouseDown - }, - arrow - ); - } - }, { - key: 'filterOptions', - value: function filterOptions(excludeOptions) { - var filterValue = this.state.inputValue; - var options = this.props.options || []; - if (this.props.filterOptions) { - // Maintain backwards compatibility with boolean attribute - var filterOptions = typeof this.props.filterOptions === 'function' ? this.props.filterOptions : _utilsDefaultFilterOptions2['default']; - - return filterOptions(options, filterValue, excludeOptions, { - filterOption: this.props.filterOption, - ignoreAccents: this.props.ignoreAccents, - ignoreCase: this.props.ignoreCase, - labelKey: this.props.labelKey, - matchPos: this.props.matchPos, - matchProp: this.props.matchProp, - valueKey: this.props.valueKey, - trimFilter: this.props.trimFilter - }); - } else { - return options; - } - } - }, { - key: 'onOptionRef', - value: function onOptionRef(ref, isFocused) { - if (isFocused) { - this.focused = ref; - } - } - }, { - key: 'renderMenu', - value: function renderMenu(options, valueArray, focusedOption) { - if (options && options.length) { - return this.props.menuRenderer({ - focusedOption: focusedOption, - focusOption: this.focusOption, - instancePrefix: this._instancePrefix, - labelKey: this.props.labelKey, - onFocus: this.focusOption, - onSelect: this.selectValue, - optionClassName: this.props.optionClassName, - optionComponent: this.props.optionComponent, - optionRenderer: this.props.optionRenderer || this.getOptionLabel, - options: options, - selectValue: this.selectValue, - valueArray: valueArray, - valueKey: this.props.valueKey, - onOptionRef: this.onOptionRef - }); - } else if (this.props.noResultsText) { - return _react2['default'].createElement( - 'div', - { className: 'Select-noresults' }, - this.props.noResultsText - ); - } else { - return null; - } - } - }, { - key: 'renderHiddenField', - value: function renderHiddenField(valueArray) { - var _this6 = this; - - if (!this.props.name) return; - if (this.props.joinValues) { - var value = valueArray.map(function (i) { - return stringifyValue(i[_this6.props.valueKey]); - }).join(this.props.delimiter); - return _react2['default'].createElement('input', { - type: 'hidden', - ref: function (ref) { - return _this6.value = ref; - }, - name: this.props.name, - value: value, - disabled: this.props.disabled }); - } - return valueArray.map(function (item, index) { - return _react2['default'].createElement('input', { key: 'hidden.' + index, - type: 'hidden', - ref: 'value' + index, - name: _this6.props.name, - value: stringifyValue(item[_this6.props.valueKey]), - disabled: _this6.props.disabled }); - }); - } - }, { - key: 'getFocusableOptionIndex', - value: function getFocusableOptionIndex(selectedOption) { - var options = this._visibleOptions; - if (!options.length) return null; - - var valueKey = this.props.valueKey; - var focusedOption = this.state.focusedOption || selectedOption; - if (focusedOption && !focusedOption.disabled) { - var focusedOptionIndex = -1; - options.some(function (option, index) { - var isOptionEqual = option[valueKey] === focusedOption[valueKey]; - if (isOptionEqual) { - focusedOptionIndex = index; - } - return isOptionEqual; - }); - if (focusedOptionIndex !== -1) { - return focusedOptionIndex; - } - } - - for (var i = 0; i < options.length; i++) { - if (!options[i].disabled) return i; - } - return null; - } - }, { - key: 'renderOuter', - value: function renderOuter(options, valueArray, focusedOption) { - var _this7 = this; - - var menu = this.renderMenu(options, valueArray, focusedOption); - if (!menu) { - return null; - } - - return _react2['default'].createElement( - 'div', - { ref: function (ref) { - return _this7.menuContainer = ref; - }, className: 'Select-menu-outer', style: this.props.menuContainerStyle }, - _react2['default'].createElement( - 'div', - { ref: function (ref) { - return _this7.menu = ref; - }, role: 'listbox', className: 'Select-menu', id: this._instancePrefix + '-list', - style: this.props.menuStyle, - onScroll: this.handleMenuScroll, - onMouseDown: this.handleMouseDownOnMenu }, - menu - ) - ); - } - }, { - key: 'render', - value: function render() { - var _this8 = this; - - var valueArray = this.getValueArray(this.props.value); - var options = this._visibleOptions = this.filterOptions(this.props.multi ? this.getValueArray(this.props.value) : null); - var isOpen = this.state.isOpen; - if (this.props.multi && !options.length && valueArray.length && !this.state.inputValue) isOpen = false; - var focusedOptionIndex = this.getFocusableOptionIndex(valueArray[0]); - - var focusedOption = null; - if (focusedOptionIndex !== null) { - focusedOption = this._focusedOption = options[focusedOptionIndex]; - } else { - focusedOption = this._focusedOption = null; - } - var className = (0, _classnames2['default'])('Select', this.props.className, { - 'Select--multi': this.props.multi, - 'Select--single': !this.props.multi, - 'is-clearable': this.props.clearable, - 'is-disabled': this.props.disabled, - 'is-focused': this.state.isFocused, - 'is-loading': this.props.isLoading, - 'is-open': isOpen, - 'is-pseudo-focused': this.state.isPseudoFocused, - 'is-searchable': this.props.searchable, - 'has-value': valueArray.length - }); - - var removeMessage = null; - if (this.props.multi && !this.props.disabled && valueArray.length && !this.state.inputValue && this.state.isFocused && this.props.backspaceRemoves) { - removeMessage = _react2['default'].createElement( - 'span', - { id: this._instancePrefix + '-backspace-remove-message', className: 'Select-aria-only', 'aria-live': 'assertive' }, - this.props.backspaceToRemoveMessage.replace('{label}', valueArray[valueArray.length - 1][this.props.labelKey]) - ); - } - - return _react2['default'].createElement( - 'div', - { ref: function (ref) { - return _this8.wrapper = ref; - }, - className: className, - style: this.props.wrapperStyle }, - this.renderHiddenField(valueArray), - _react2['default'].createElement( - 'div', - { ref: function (ref) { - return _this8.control = ref; - }, - className: 'Select-control', - style: this.props.style, - onKeyDown: this.handleKeyDown, - onMouseDown: this.handleMouseDown, - onTouchEnd: this.handleTouchEnd, - onTouchStart: this.handleTouchStart, - onTouchMove: this.handleTouchMove - }, - _react2['default'].createElement( - 'span', - { className: 'Select-multi-value-wrapper', id: this._instancePrefix + '-value' }, - this.renderValue(valueArray, isOpen), - this.renderInput(valueArray, focusedOptionIndex) - ), - removeMessage, - this.renderLoading(), - this.renderClear(), - this.renderArrow() - ), - isOpen ? this.renderOuter(options, !this.props.multi ? valueArray : null, focusedOption) : null - ); - } - }]); - - return Select; -})(_react2['default'].Component); - -; - -Select.propTypes = { - addLabelText: _propTypes2['default'].string, // placeholder displayed when you want to add a label on a multi-value input - 'aria-describedby': _propTypes2['default'].string, // HTML ID(s) of element(s) that should be used to describe this input (for assistive tech) - 'aria-label': _propTypes2['default'].string, // Aria label (for assistive tech) - 'aria-labelledby': _propTypes2['default'].string, // HTML ID of an element that should be used as the label (for assistive tech) - arrowRenderer: _propTypes2['default'].func, // Create drop-down caret element - autoBlur: _propTypes2['default'].bool, // automatically blur the component when an option is selected - autofocus: _propTypes2['default'].bool, // autofocus the component on mount - autosize: _propTypes2['default'].bool, // whether to enable autosizing or not - backspaceRemoves: _propTypes2['default'].bool, // whether backspace removes an item if there is no text input - backspaceToRemoveMessage: _propTypes2['default'].string, // Message to use for screenreaders to press backspace to remove the current item - {label} is replaced with the item label - className: _propTypes2['default'].string, // className for the outer element - clearAllText: stringOrNode, // title for the "clear" control when multi: true - clearRenderer: _propTypes2['default'].func, // create clearable x element - clearValueText: stringOrNode, // title for the "clear" control - clearable: _propTypes2['default'].bool, // should it be possible to reset value - deleteRemoves: _propTypes2['default'].bool, // whether backspace removes an item if there is no text input - delimiter: _propTypes2['default'].string, // delimiter to use to join multiple values for the hidden field value - disabled: _propTypes2['default'].bool, // whether the Select is disabled or not - escapeClearsValue: _propTypes2['default'].bool, // whether escape clears the value when the menu is closed - filterOption: _propTypes2['default'].func, // method to filter a single option (option, filterString) - filterOptions: _propTypes2['default'].any, // boolean to enable default filtering or function to filter the options array ([options], filterString, [values]) - ignoreAccents: _propTypes2['default'].bool, // whether to strip diacritics when filtering - ignoreCase: _propTypes2['default'].bool, // whether to perform case-insensitive filtering - inputProps: _propTypes2['default'].object, // custom attributes for the Input - inputRenderer: _propTypes2['default'].func, // returns a custom input component - instanceId: _propTypes2['default'].string, // set the components instanceId - isLoading: _propTypes2['default'].bool, // whether the Select is loading externally or not (such as options being loaded) - joinValues: _propTypes2['default'].bool, // joins multiple values into a single form field with the delimiter (legacy mode) - labelKey: _propTypes2['default'].string, // path of the label value in option objects - matchPos: _propTypes2['default'].string, // (any|start) match the start or entire string when filtering - matchProp: _propTypes2['default'].string, // (any|label|value) which option property to filter on - menuBuffer: _propTypes2['default'].number, // optional buffer (in px) between the bottom of the viewport and the bottom of the menu - menuContainerStyle: _propTypes2['default'].object, // optional style to apply to the menu container - menuRenderer: _propTypes2['default'].func, // renders a custom menu with options - menuStyle: _propTypes2['default'].object, // optional style to apply to the menu - multi: _propTypes2['default'].bool, // multi-value input - name: _propTypes2['default'].string, // generates a hidden tag with this field name for html forms - noResultsText: stringOrNode, // placeholder displayed when there are no matching search results - onBlur: _propTypes2['default'].func, // onBlur handler: function (event) {} - onBlurResetsInput: _propTypes2['default'].bool, // whether input is cleared on blur - onChange: _propTypes2['default'].func, // onChange handler: function (newValue) {} - onClose: _propTypes2['default'].func, // fires when the menu is closed - onCloseResetsInput: _propTypes2['default'].bool, // whether input is cleared when menu is closed through the arrow - onFocus: _propTypes2['default'].func, // onFocus handler: function (event) {} - onInputChange: _propTypes2['default'].func, // onInputChange handler: function (inputValue) {} - onInputKeyDown: _propTypes2['default'].func, // input keyDown handler: function (event) {} - onMenuScrollToBottom: _propTypes2['default'].func, // fires when the menu is scrolled to the bottom; can be used to paginate options - onOpen: _propTypes2['default'].func, // fires when the menu is opened - onValueClick: _propTypes2['default'].func, // onClick handler for value labels: function (value, event) {} - openAfterFocus: _propTypes2['default'].bool, // boolean to enable opening dropdown when focused - openOnFocus: _propTypes2['default'].bool, // always open options menu on focus - optionClassName: _propTypes2['default'].string, // additional class(es) to apply to the